feat(Segmented): support name prop to enable grouping (#51725)
Some checks failed
Publish Any Commit / build (push) Has been cancelled
🔀 Sync mirror to Gitee / mirror (push) Has been cancelled
✅ test / lint (push) Has been cancelled
✅ test / test-react-legacy (16, 1/2) (push) Has been cancelled
✅ test / test-react-legacy (16, 2/2) (push) Has been cancelled
✅ test / test-react-legacy (17, 1/2) (push) Has been cancelled
✅ test / test-react-legacy (17, 2/2) (push) Has been cancelled
✅ test / test-node (push) Has been cancelled
✅ test / test-react-latest (dom, 1/2) (push) Has been cancelled
✅ test / test-react-latest (dom, 2/2) (push) Has been cancelled
✅ test / build (push) Has been cancelled
✅ test / test lib/es module (es, 1/2) (push) Has been cancelled
✅ test / test lib/es module (es, 2/2) (push) Has been cancelled
✅ test / test lib/es module (lib, 1/2) (push) Has been cancelled
✅ test / test lib/es module (lib, 2/2) (push) Has been cancelled
👁️ Visual Regression Persist Start / test image (push) Has been cancelled
✅ test / test-react-latest-dist (dist, 1/2) (push) Has been cancelled
✅ test / test-react-latest-dist (dist, 2/2) (push) Has been cancelled
✅ test / test-react-latest-dist (dist-min, 1/2) (push) Has been cancelled
✅ test / test-react-latest-dist (dist-min, 2/2) (push) Has been cancelled
✅ test / test-coverage (push) Has been cancelled

This commit is contained in:
thinkasany 2024-11-22 17:08:30 +08:00 committed by GitHub
parent 7fcb515f20
commit 291cb21ea4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 484 additions and 9 deletions

View File

@ -3990,6 +3990,7 @@ exports[`renders components/color-picker/demo/line-gradient.tsx extend context c
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -4007,6 +4008,7 @@ exports[`renders components/color-picker/demo/line-gradient.tsx extend context c
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -19,6 +19,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -36,6 +37,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -52,6 +54,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -68,6 +71,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -84,6 +88,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -100,6 +105,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -129,6 +135,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -146,6 +153,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -162,6 +170,7 @@ exports[`renders components/flex/demo/align.tsx extend context correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -19,6 +19,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -36,6 +37,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -52,6 +54,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -68,6 +71,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -84,6 +88,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -100,6 +105,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -129,6 +135,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -146,6 +153,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -162,6 +170,7 @@ exports[`renders components/flex/demo/align.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -30843,6 +30843,7 @@ exports[`renders components/form/demo/variant.tsx extend context correctly 1`] =
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -30859,6 +30860,7 @@ exports[`renders components/form/demo/variant.tsx extend context correctly 1`] =
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -30876,6 +30878,7 @@ exports[`renders components/form/demo/variant.tsx extend context correctly 1`] =
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -13088,6 +13088,7 @@ exports[`renders components/form/demo/variant.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -13104,6 +13105,7 @@ exports[`renders components/form/demo/variant.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -13121,6 +13123,7 @@ exports[`renders components/form/demo/variant.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -15,6 +15,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -32,6 +33,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -48,6 +50,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -15,6 +15,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -32,6 +33,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -48,6 +50,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -398,6 +398,7 @@ exports[`renders components/qr-code/demo/download.tsx extend context correctly 1
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -415,6 +416,7 @@ exports[`renders components/qr-code/demo/download.tsx extend context correctly 1
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -488,6 +490,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -505,6 +508,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -521,6 +525,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -537,6 +542,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -356,6 +356,7 @@ exports[`renders components/qr-code/demo/download.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -373,6 +374,7 @@ exports[`renders components/qr-code/demo/download.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -444,6 +446,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -461,6 +464,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -477,6 +481,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -493,6 +498,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -13,6 +13,7 @@ exports[`renders components/segmented/demo/basic.tsx extend context correctly 1`
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -30,6 +31,7 @@ exports[`renders components/segmented/demo/basic.tsx extend context correctly 1`
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -46,6 +48,7 @@ exports[`renders components/segmented/demo/basic.tsx extend context correctly 1`
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -62,6 +65,7 @@ exports[`renders components/segmented/demo/basic.tsx extend context correctly 1`
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -78,6 +82,7 @@ exports[`renders components/segmented/demo/basic.tsx extend context correctly 1`
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -109,6 +114,7 @@ exports[`renders components/segmented/demo/block.tsx extend context correctly 1`
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -126,6 +132,7 @@ exports[`renders components/segmented/demo/block.tsx extend context correctly 1`
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -142,6 +149,7 @@ exports[`renders components/segmented/demo/block.tsx extend context correctly 1`
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -173,6 +181,7 @@ exports[`renders components/segmented/demo/componentToken.tsx extend context cor
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -190,6 +199,7 @@ exports[`renders components/segmented/demo/componentToken.tsx extend context cor
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -206,6 +216,7 @@ exports[`renders components/segmented/demo/componentToken.tsx extend context cor
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -222,6 +233,7 @@ exports[`renders components/segmented/demo/componentToken.tsx extend context cor
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -238,6 +250,7 @@ exports[`renders components/segmented/demo/componentToken.tsx extend context cor
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -269,6 +282,7 @@ exports[`renders components/segmented/demo/controlled.tsx extend context correct
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -286,6 +300,7 @@ exports[`renders components/segmented/demo/controlled.tsx extend context correct
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -302,6 +317,7 @@ exports[`renders components/segmented/demo/controlled.tsx extend context correct
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -334,6 +350,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -351,6 +368,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -367,6 +385,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -394,6 +413,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -411,6 +431,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -427,6 +448,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -462,6 +484,7 @@ exports[`renders components/segmented/demo/custom.tsx extend context correctly 1
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -491,6 +514,7 @@ exports[`renders components/segmented/demo/custom.tsx extend context correctly 1
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -523,6 +547,7 @@ exports[`renders components/segmented/demo/custom.tsx extend context correctly 1
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -578,6 +603,7 @@ exports[`renders components/segmented/demo/custom.tsx extend context correctly 1
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -603,6 +629,7 @@ exports[`renders components/segmented/demo/custom.tsx extend context correctly 1
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -627,6 +654,7 @@ exports[`renders components/segmented/demo/custom.tsx extend context correctly 1
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -651,6 +679,7 @@ exports[`renders components/segmented/demo/custom.tsx extend context correctly 1
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -694,6 +723,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
@ -712,6 +742,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -729,6 +760,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -756,6 +788,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -773,6 +806,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -790,6 +824,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -806,6 +841,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -823,6 +859,7 @@ exports[`renders components/segmented/demo/disabled.tsx extend context correctly
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -858,6 +895,7 @@ exports[`renders components/segmented/demo/dynamic.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -875,6 +913,7 @@ exports[`renders components/segmented/demo/dynamic.tsx extend context correctly
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -891,6 +930,7 @@ exports[`renders components/segmented/demo/dynamic.tsx extend context correctly
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -931,6 +971,7 @@ exports[`renders components/segmented/demo/icon-only.tsx extend context correctl
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -969,6 +1010,7 @@ exports[`renders components/segmented/demo/icon-only.tsx extend context correctl
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1024,6 +1066,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1041,6 +1084,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1057,6 +1101,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1073,6 +1118,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1089,6 +1135,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1115,6 +1162,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1132,6 +1180,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1148,6 +1197,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1164,6 +1214,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1180,6 +1231,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1206,6 +1258,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1223,6 +1276,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1239,6 +1293,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1255,6 +1310,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1271,6 +1327,7 @@ exports[`renders components/segmented/demo/size.tsx extend context correctly 1`]
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1308,6 +1365,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1325,6 +1383,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1341,6 +1400,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1378,6 +1438,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1395,6 +1456,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1411,6 +1473,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1447,6 +1510,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1464,6 +1528,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1480,6 +1545,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1633,6 +1699,7 @@ exports[`renders components/segmented/demo/vertical.tsx extend context correctly
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1671,6 +1738,7 @@ exports[`renders components/segmented/demo/vertical.tsx extend context correctly
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1723,6 +1791,7 @@ exports[`renders components/segmented/demo/with-icon.tsx extend context correctl
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1764,6 +1833,7 @@ exports[`renders components/segmented/demo/with-icon.tsx extend context correctl
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1805,3 +1875,109 @@ exports[`renders components/segmented/demo/with-icon.tsx extend context correctl
`; `;
exports[`renders components/segmented/demo/with-icon.tsx extend context correctly 2`] = `[]`; exports[`renders components/segmented/demo/with-icon.tsx extend context correctly 2`] = `[]`;
exports[`renders components/segmented/demo/with-name.tsx extend context correctly 1`] = `
<div
aria-label="segmented control"
class="ant-segmented"
role="listbox"
>
<div
class="ant-segmented-group"
>
<label
class="ant-segmented-item ant-segmented-item-selected"
>
<input
aria-hidden="true"
checked=""
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="true"
class="ant-segmented-item-label"
role="option"
title="Daily"
>
Daily
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Weekly"
>
Weekly
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Monthly"
>
Monthly
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Quarterly"
>
Quarterly
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Yearly"
>
Yearly
</div>
</label>
</div>
</div>
`;
exports[`renders components/segmented/demo/with-name.tsx extend context correctly 2`] = `[]`;

View File

@ -13,6 +13,7 @@ exports[`renders components/segmented/demo/basic.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -30,6 +31,7 @@ exports[`renders components/segmented/demo/basic.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -46,6 +48,7 @@ exports[`renders components/segmented/demo/basic.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -62,6 +65,7 @@ exports[`renders components/segmented/demo/basic.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -78,6 +82,7 @@ exports[`renders components/segmented/demo/basic.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -107,6 +112,7 @@ exports[`renders components/segmented/demo/block.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -124,6 +130,7 @@ exports[`renders components/segmented/demo/block.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -140,6 +147,7 @@ exports[`renders components/segmented/demo/block.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -169,6 +177,7 @@ exports[`renders components/segmented/demo/componentToken.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -186,6 +195,7 @@ exports[`renders components/segmented/demo/componentToken.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -202,6 +212,7 @@ exports[`renders components/segmented/demo/componentToken.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -218,6 +229,7 @@ exports[`renders components/segmented/demo/componentToken.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -234,6 +246,7 @@ exports[`renders components/segmented/demo/componentToken.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -263,6 +276,7 @@ exports[`renders components/segmented/demo/controlled.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -280,6 +294,7 @@ exports[`renders components/segmented/demo/controlled.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -296,6 +311,7 @@ exports[`renders components/segmented/demo/controlled.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -326,6 +342,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -343,6 +360,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -359,6 +377,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -386,6 +405,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -403,6 +423,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -419,6 +440,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -452,6 +474,7 @@ exports[`renders components/segmented/demo/custom.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -481,6 +504,7 @@ exports[`renders components/segmented/demo/custom.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -513,6 +537,7 @@ exports[`renders components/segmented/demo/custom.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -568,6 +593,7 @@ exports[`renders components/segmented/demo/custom.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -593,6 +619,7 @@ exports[`renders components/segmented/demo/custom.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -617,6 +644,7 @@ exports[`renders components/segmented/demo/custom.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -641,6 +669,7 @@ exports[`renders components/segmented/demo/custom.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -682,6 +711,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
@ -700,6 +730,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -717,6 +748,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -744,6 +776,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -761,6 +794,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -778,6 +812,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -794,6 +829,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -811,6 +847,7 @@ exports[`renders components/segmented/demo/disabled.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -844,6 +881,7 @@ exports[`renders components/segmented/demo/dynamic.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -861,6 +899,7 @@ exports[`renders components/segmented/demo/dynamic.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -877,6 +916,7 @@ exports[`renders components/segmented/demo/dynamic.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -915,6 +955,7 @@ exports[`renders components/segmented/demo/icon-only.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -953,6 +994,7 @@ exports[`renders components/segmented/demo/icon-only.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1006,6 +1048,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1023,6 +1066,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1039,6 +1083,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1055,6 +1100,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1071,6 +1117,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1097,6 +1144,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1114,6 +1162,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1130,6 +1179,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1146,6 +1196,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1162,6 +1213,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1188,6 +1240,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1205,6 +1258,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1221,6 +1275,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1237,6 +1292,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1253,6 +1309,7 @@ exports[`renders components/segmented/demo/size.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1288,6 +1345,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1305,6 +1363,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1321,6 +1380,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1358,6 +1418,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1375,6 +1436,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1391,6 +1453,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1427,6 +1490,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1444,6 +1508,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1460,6 +1525,7 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1555,6 +1621,7 @@ exports[`renders components/segmented/demo/vertical.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1593,6 +1660,7 @@ exports[`renders components/segmented/demo/vertical.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1643,6 +1711,7 @@ exports[`renders components/segmented/demo/with-icon.tsx correctly 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1684,6 +1753,7 @@ exports[`renders components/segmented/demo/with-icon.tsx correctly 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1723,3 +1793,107 @@ exports[`renders components/segmented/demo/with-icon.tsx correctly 1`] = `
</div> </div>
</div> </div>
`; `;
exports[`renders components/segmented/demo/with-name.tsx correctly 1`] = `
<div
aria-label="segmented control"
class="ant-segmented"
role="listbox"
>
<div
class="ant-segmented-group"
>
<label
class="ant-segmented-item ant-segmented-item-selected"
>
<input
aria-hidden="true"
checked=""
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="true"
class="ant-segmented-item-label"
role="option"
title="Daily"
>
Daily
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Weekly"
>
Weekly
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Monthly"
>
Monthly
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Quarterly"
>
Quarterly
</div>
</label>
<label
class="ant-segmented-item"
>
<input
aria-hidden="true"
class="ant-segmented-item-input"
name="group"
type="radio"
/>
<div
aria-selected="false"
class="ant-segmented-item-label"
role="option"
title="Yearly"
>
Yearly
</div>
</label>
</div>
</div>
`;

View File

@ -25,6 +25,7 @@ exports[`Segmented render label with ReactNode 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -42,6 +43,7 @@ exports[`Segmented render label with ReactNode 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -61,6 +63,7 @@ exports[`Segmented render label with ReactNode 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -93,6 +96,7 @@ exports[`Segmented render segmented ok 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -110,6 +114,7 @@ exports[`Segmented render segmented ok 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -126,6 +131,7 @@ exports[`Segmented render segmented ok 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -155,6 +161,7 @@ exports[`Segmented render segmented with \`block\` 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -172,6 +179,7 @@ exports[`Segmented render segmented with \`block\` 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -188,6 +196,7 @@ exports[`Segmented render segmented with \`block\` 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -217,6 +226,7 @@ exports[`Segmented render segmented with \`size#large\` 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -234,6 +244,7 @@ exports[`Segmented render segmented with \`size#large\` 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -250,6 +261,7 @@ exports[`Segmented render segmented with \`size#large\` 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -279,6 +291,7 @@ exports[`Segmented render segmented with \`size#small\` 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -296,6 +309,7 @@ exports[`Segmented render segmented with \`size#small\` 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -312,6 +326,7 @@ exports[`Segmented render segmented with \`size#small\` 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -341,6 +356,7 @@ exports[`Segmented render segmented with mixed options 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -358,6 +374,7 @@ exports[`Segmented render segmented with mixed options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -374,6 +391,7 @@ exports[`Segmented render segmented with mixed options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -403,6 +421,7 @@ exports[`Segmented render segmented with numeric options 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -420,6 +439,7 @@ exports[`Segmented render segmented with numeric options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -436,6 +456,7 @@ exports[`Segmented render segmented with numeric options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -452,6 +473,7 @@ exports[`Segmented render segmented with numeric options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -468,6 +490,7 @@ exports[`Segmented render segmented with numeric options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -497,6 +520,7 @@ exports[`Segmented render segmented with options null/undefined 1`] = `
class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
@ -512,6 +536,7 @@ exports[`Segmented render segmented with options null/undefined 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -526,6 +551,7 @@ exports[`Segmented render segmented with options null/undefined 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -554,6 +580,7 @@ exports[`Segmented render segmented with options: disabled 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -571,6 +598,7 @@ exports[`Segmented render segmented with options: disabled 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -588,6 +616,7 @@ exports[`Segmented render segmented with options: disabled 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -617,6 +646,7 @@ exports[`Segmented render segmented with string options 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -634,6 +664,7 @@ exports[`Segmented render segmented with string options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -650,6 +681,7 @@ exports[`Segmented render segmented with string options 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -679,6 +711,7 @@ exports[`Segmented render segmented with thumb 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -696,6 +729,7 @@ exports[`Segmented render segmented with thumb 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -712,6 +746,7 @@ exports[`Segmented render segmented with thumb 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -741,6 +776,7 @@ exports[`Segmented render segmented: disabled 1`] = `
class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-selected ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
@ -759,6 +795,7 @@ exports[`Segmented render segmented: disabled 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -776,6 +813,7 @@ exports[`Segmented render segmented: disabled 1`] = `
class="ant-segmented-item ant-segmented-item-disabled" class="ant-segmented-item ant-segmented-item-disabled"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
disabled="" disabled=""
type="radio" type="radio"
@ -806,6 +844,7 @@ exports[`Segmented render with icons 1`] = `
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -844,6 +883,7 @@ exports[`Segmented render with icons 1`] = `
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -346,4 +346,15 @@ describe('Segmented', () => {
.textContent?.includes('KanbanYes'), .textContent?.includes('KanbanYes'),
).toBeTruthy(); ).toBeTruthy();
}); });
it('all children should have a name property', () => {
const GROUP_NAME = 'GROUP_NAME';
const { container } = render(
<Segmented options={['iOS', 'Android', 'Web']} name={GROUP_NAME} />,
);
container.querySelectorAll<HTMLInputElement>('input[type="radio"]').forEach((el) => {
expect(el.name).toEqual(GROUP_NAME);
});
});
}); });

View File

@ -0,0 +1,7 @@
## zh-CN
可以为 Segmented 配置 `name` 参数,为组合内的 input 元素赋予相同的 `name` 属性,使浏览器把 Segmented 下的 input 真正看作是一组(例如可以通过方向键始终**在同一组内**更改选项)。
## en-US
Passing the `name` property to all `input[type="radio"]` that are in the same Segmented. It is usually used to let the browser see your Segmented as a real "group" and keep the default behavior. For example, using left/right keyboard arrow to change your selection that in the same Segmented.

View File

@ -0,0 +1,8 @@
import React from 'react';
import { Segmented } from 'antd';
const Demo: React.FC = () => (
<Segmented<string> options={['Daily', 'Weekly', 'Monthly', 'Quarterly', 'Yearly']} name="group" />
);
export default Demo;

View File

@ -29,6 +29,7 @@ This component is available since `antd@4.20.0`.
<code src="./demo/size.tsx">Three sizes of Segmented</code> <code src="./demo/size.tsx">Three sizes of Segmented</code>
<code src="./demo/with-icon.tsx">With Icon</code> <code src="./demo/with-icon.tsx">With Icon</code>
<code src="./demo/icon-only.tsx">With Icon only</code> <code src="./demo/icon-only.tsx">With Icon only</code>
<code src="./demo/with-name.tsx" version="5.23.0">With name</code>
<code src="./demo/controlled-two.tsx" debug>Controlled Synced mode</code> <code src="./demo/controlled-two.tsx" debug>Controlled Synced mode</code>
<code src="./demo/size-consistent.tsx" debug>Consistent height</code> <code src="./demo/size-consistent.tsx" debug>Consistent height</code>
<code src="./demo/componentToken.tsx" debug>Custom component token</code> <code src="./demo/componentToken.tsx" debug>Custom component token</code>
@ -49,17 +50,17 @@ Common props ref[Common props](/docs/react/common-props)
| size | The size of the Segmented. | `large` \| `middle` \| `small` | `middle` | | | size | The size of the Segmented. | `large` \| `middle` \| `small` | `middle` | |
| vertical | Orientation | boolean | `false` | 5.21.0 | | vertical | Orientation | boolean | `false` | 5.21.0 |
| value | Currently selected value | string \| number | | | | value | Currently selected value | string \| number | | |
| name | The `name` property of all `input[type="radio"]` children | string | | 5.23.0 |
### SegmentedItemType ### SegmentedItemType
| Property | Description | Type | Default | Version |
| Property | Description | Type | Default | Version | | --------- | -------------------------------- | ---------------- | ------- | ------- |
| --- | --- | --- | --- | --- | | label | Display text for Segmented item | ReactNode | - | |
| label | Display text for Segmented item | ReactNode | - | | | value | Value for Segmented item | string \| number | - | |
| value | Value for Segmented item | string \| number | - | | | icon | Display icon for Segmented item | ReactNode | - | |
| icon | Display icon for Segmented item | ReactNode | - | | | disabled | Disabled state of segmented item | boolean | false | |
| disabled | Disabled state of segmented item | boolean | false | | | className | The additional css class | string | - | |
| className | The additional css class | string | - | |
## Design Token ## Design Token

View File

@ -30,6 +30,7 @@ demo:
<code src="./demo/size.tsx">三种大小</code> <code src="./demo/size.tsx">三种大小</code>
<code src="./demo/with-icon.tsx">设置图标</code> <code src="./demo/with-icon.tsx">设置图标</code>
<code src="./demo/icon-only.tsx">只设置图标</code> <code src="./demo/icon-only.tsx">只设置图标</code>
<code src="./demo/with-name.tsx" version="5.23.0">配合 name 使用</code>
<code src="./demo/controlled-two.tsx" debug>受控同步模式</code> <code src="./demo/controlled-two.tsx" debug>受控同步模式</code>
<code src="./demo/size-consistent.tsx" debug>统一高度</code> <code src="./demo/size-consistent.tsx" debug>统一高度</code>
<code src="./demo/componentToken.tsx" debug>自定义组件 Token</code> <code src="./demo/componentToken.tsx" debug>自定义组件 Token</code>
@ -52,6 +53,7 @@ demo:
| size | 控件尺寸 | `large` \| `middle` \| `small` | `middle` | | | size | 控件尺寸 | `large` \| `middle` \| `small` | `middle` | |
| vertical | 排列方向 | boolean | `false` | 5.21.0 | | vertical | 排列方向 | boolean | `false` | 5.21.0 |
| value | 当前选中的值 | string \| number | | | | value | 当前选中的值 | string \| number | | |
| name | Segmented 下所有 `input[type="radio"]``name` 属性 | string | | 5.23.0 |
### SegmentedItemType ### SegmentedItemType

View File

@ -2006,6 +2006,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -2022,6 +2023,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -2039,6 +2041,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -1675,6 +1675,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -1691,6 +1692,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -1708,6 +1710,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -15,6 +15,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -32,6 +33,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -48,6 +50,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -15,6 +15,7 @@ Array [
class="ant-segmented-item ant-segmented-item-selected" class="ant-segmented-item ant-segmented-item-selected"
> >
<input <input
aria-hidden="true"
checked="" checked=""
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
@ -32,6 +33,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />
@ -48,6 +50,7 @@ Array [
class="ant-segmented-item" class="ant-segmented-item"
> >
<input <input
aria-hidden="true"
class="ant-segmented-item-input" class="ant-segmented-item-input"
type="radio" type="radio"
/> />

View File

@ -139,7 +139,7 @@
"rc-progress": "~4.0.0", "rc-progress": "~4.0.0",
"rc-rate": "~2.13.0", "rc-rate": "~2.13.0",
"rc-resize-observer": "^1.4.0", "rc-resize-observer": "^1.4.0",
"rc-segmented": "~2.5.0", "rc-segmented": "~2.6.0",
"rc-select": "~14.16.3", "rc-select": "~14.16.3",
"rc-slider": "~11.1.7", "rc-slider": "~11.1.7",
"rc-steps": "~6.0.1", "rc-steps": "~6.0.1",