diff --git a/docs/src/pages/@charcoal-ui/react/Radio/ExampleRadio.tsx b/docs/src/pages/@charcoal-ui/react/Radio/ExampleRadio.tsx index 954ea176a..0575aed84 100644 --- a/docs/src/pages/@charcoal-ui/react/Radio/ExampleRadio.tsx +++ b/docs/src/pages/@charcoal-ui/react/Radio/ExampleRadio.tsx @@ -7,12 +7,7 @@ export const ExampleRadio = () => { return (

value: {value}

- + value1 value2 value3 diff --git a/docs/src/pages/@charcoal-ui/react/Radio/apiData.tsx b/docs/src/pages/@charcoal-ui/react/Radio/apiData.tsx index 037eb9273..3ad8904ed 100644 --- a/docs/src/pages/@charcoal-ui/react/Radio/apiData.tsx +++ b/docs/src/pages/@charcoal-ui/react/Radio/apiData.tsx @@ -17,12 +17,6 @@ export const apiDataRadio: Partial> = } export const apiData: Partial> = { - label: { - default: '', - description: 'ラベル', - required: true, - type: 'string', - }, value: { default: '', description: '選択されている値', diff --git a/docs/src/pages/@charcoal-ui/react/Radio/index.page.tsx b/docs/src/pages/@charcoal-ui/react/Radio/index.page.tsx index c663720d5..2d5512972 100644 --- a/docs/src/pages/@charcoal-ui/react/Radio/index.page.tsx +++ b/docs/src/pages/@charcoal-ui/react/Radio/index.page.tsx @@ -18,7 +18,6 @@ function Preview(meta: PreviewMeta, i: number, j: number) { [] = [ previewMetas: [ { props: { - label: 'radio', name: 'radio', onChange: () => {}, disabled: true, @@ -21,7 +20,6 @@ export const sections: PreviewSection[] = [ previewMetas: [ { props: { - label: 'radio', name: 'radio', onChange: () => {}, invalid: true, @@ -35,7 +33,6 @@ export const sections: PreviewSection[] = [ previewMetas: [ { props: { - label: 'radio', name: 'radio', onChange: () => {}, readonly: true, diff --git a/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot b/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot index c85d25992..484634c3b 100644 --- a/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot +++ b/packages/react/src/components/DropdownSelector/__snapshots__/index.story.storyshot @@ -1,8 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Storybook Tests DropdownSelector AssistiveText 1`] = ` +.c4 { + font-size: 14px; + line-height: 22px; + margin: 0; + color: var(--charcoal-text2); +} + .c0 { - display: inline-block; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; width: 100%; } @@ -13,10 +22,8 @@ exports[`Storybook Tests DropdownSelector AssistiveText 1`] = ` } .c1 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; + display: grid; + grid-template-columns: 1fr auto; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; @@ -85,30 +92,6 @@ exports[`Storybook Tests DropdownSelector AssistiveText 1`] = ` color: var(--charcoal-text2); } -.c4 { - margin-top: 8px; - font-size: 14px; - color: var(--charcoal-text2); - line-height: 22px; - display: flow-root; -} - -.c4::before { - display: block; - width: 0; - height: 0; - content: ''; - margin-top: -4px; -} - -.c4::after { - display: block; - width: 0; - height: 0; - content: ''; - margin-bottom: -4px; -} -
@@ -176,11 +159,11 @@ exports[`Storybook Tests DropdownSelector AssistiveText 1`] = ` name="16/Menu" /> -
assistiveText -
+

@@ -188,7 +171,9 @@ exports[`Storybook Tests DropdownSelector AssistiveText 1`] = ` exports[`Storybook Tests DropdownSelector CustomChildren 1`] = ` .c0 { - display: inline-block; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; width: 100%; } @@ -199,10 +184,8 @@ exports[`Storybook Tests DropdownSelector CustomChildren 1`] = ` } .c1 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; + display: grid; + grid-template-columns: 1fr auto; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; @@ -353,7 +336,9 @@ exports[`Storybook Tests DropdownSelector CustomChildren 1`] = ` exports[`Storybook Tests DropdownSelector Default 1`] = ` .c0 { - display: inline-block; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; width: 100%; } @@ -364,10 +349,8 @@ exports[`Storybook Tests DropdownSelector Default 1`] = ` } .c1 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; + display: grid; + grid-template-columns: 1fr auto; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; @@ -510,7 +493,9 @@ exports[`Storybook Tests DropdownSelector Default 1`] = ` exports[`Storybook Tests DropdownSelector Disabled 1`] = ` .c0 { - display: inline-block; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; width: 100%; } @@ -521,10 +506,8 @@ exports[`Storybook Tests DropdownSelector Disabled 1`] = ` } .c1 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; + display: grid; + grid-template-columns: 1fr auto; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; @@ -669,7 +652,9 @@ exports[`Storybook Tests DropdownSelector Disabled 1`] = ` exports[`Storybook Tests DropdownSelector DisabledItem 1`] = ` .c0 { - display: inline-block; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; width: 100%; } @@ -680,10 +665,8 @@ exports[`Storybook Tests DropdownSelector DisabledItem 1`] = ` } .c1 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; + display: grid; + grid-template-columns: 1fr auto; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; @@ -837,7 +820,9 @@ exports[`Storybook Tests DropdownSelector DisabledItem 1`] = ` exports[`Storybook Tests DropdownSelector InFormTag 1`] = ` .c0 { - display: inline-block; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; width: 100%; } @@ -848,10 +833,8 @@ exports[`Storybook Tests DropdownSelector InFormTag 1`] = ` } .c1 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; + display: grid; + grid-template-columns: 1fr auto; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; @@ -1008,119 +991,89 @@ exports[`Storybook Tests DropdownSelector InFormTag 1`] = ` `; exports[`Storybook Tests DropdownSelector InModal 1`] = ` -.c9 { - font-size: 14px; - line-height: 22px; - font-weight: bold; - display: flow-root; - color: var(--charcoal-text1); -} - -.c9::before { - display: block; - width: 0; - height: 0; - content: ''; - margin-top: -4px; -} - -.c9::after { - display: block; - width: 0; - height: 0; - content: ''; - margin-bottom: -4px; -} - .c11 { - font-size: 14px; - line-height: 22px; - display: flow-root; - color: var(--charcoal-text2); -} - -.c11::before { - display: block; - width: 0; - height: 0; - content: ''; - margin-top: -4px; -} - -.c11::after { - display: block; - width: 0; - height: 0; - content: ''; - margin-bottom: -4px; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; } -.c13 { - font-size: 14px; +.c12 { + display: grid; + grid-template-columns: 1fr; + height: 40px; + -webkit-transition: 0.2s background-color,0.2s box-shadow; + transition: 0.2s background-color,0.2s box-shadow; + color: var(--charcoal-text2); + background-color: var(--charcoal-surface3); + border-radius: 4px; + gap: 4px; + padding: 0 8px; line-height: 22px; - display: flow-root; - color: var(--charcoal-text3); - -webkit-transition: 0.2s color,0.2s box-shadow; - transition: 0.2s color,0.2s box-shadow; + font-size: 14px; } -.c13::before { - display: block; - width: 0; - height: 0; - content: ''; - margin-top: -4px; +.c12:not(:disabled):not([aria-disabled]):hover, +.c12 [aria-disabled='false']:hover { + background-color: var(--charcoal-surface3-hover); } -.c13::after { - display: block; - width: 0; - height: 0; - content: ''; - margin-bottom: -4px; +.c12:focus-within { + outline: none; + box-shadow: 0 0 0 4px rgba(0,150,250,0.32); } -.c13:not(:disabled):not([aria-disabled]):hover, -.c13[aria-disabled='false']:hover { - color: var(--charcoal-text3-hover); +.c13 { + border: none; + box-sizing: border-box; + outline: none; + font-family: inherit; + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-transform: scale(0.875); + -ms-transform: scale(0.875); + transform: scale(0.875); + width: calc(100% / 0.875); + height: calc(100% / 0.875); + font-size: calc(14px / 0.875); + line-height: calc(22px / 0.875); + padding-left: 0; + padding-right: 0; + border-radius: calc(4px / 0.875); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: transparent; + color: var(--charcoal-text2); } -.c13:not(:disabled):not([aria-disabled]):active, -.c13[aria-disabled='false']:active { - color: var(--charcoal-text3-press); +.c13::-webkit-input-placeholder { + color: var(--charcoal-text3); } -.c13:not(:disabled):not([aria-disabled]):active, -.c13[aria-disabled='false']:active, -.c13:not(:disabled):not([aria-disabled]):focus, -.c13[aria-disabled='false']:focus, -.c13:not(:disabled):not([aria-disabled]):focus-visible, -.c13[aria-disabled='false']:focus-visible { - outline: none; - box-shadow: 0 0 0 4px rgba(0,150,250,0.32); +.c13::-moz-placeholder { + color: var(--charcoal-text3); } -.c7 { - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; +.c13:-ms-input-placeholder { + color: var(--charcoal-text3); } -.c7 > .c10 { - margin-left: 4px; +.c13::placeholder { + color: var(--charcoal-text3); } -.c7 > .c12 { - margin-left: auto; +.c10 { + font-size: 14px; + line-height: 22px; + margin: 0; + color: var(--charcoal-text2); } .c6 { - display: inline-block; + display: grid; + grid-template-columns: 1fr; + grid-gap: 4px; width: 100%; } @@ -1130,16 +1083,9 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` opacity: 0.32; } -.c8 { - width: 100%; - margin-bottom: 8px; -} - -.c14 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; +.c7 { + display: grid; + grid-template-columns: 1fr auto; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; @@ -1162,38 +1108,38 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` transition: 0.2s box-shadow,0.2s background-color; } -.c14:disabled, -.c14[aria-disabled]:not([aria-disabled=false]) { +.c7:disabled, +.c7[aria-disabled]:not([aria-disabled=false]) { cursor: default; } -.c14:not(:disabled):not([aria-disabled]):focus, -.c14[aria-disabled='false']:focus { +.c7:not(:disabled):not([aria-disabled]):focus, +.c7[aria-disabled='false']:focus { outline: none; box-shadow: 0 0 0 4px rgba(0,150,250,0.32); } -.c14:not(:disabled):not([aria-disabled]):focus:not(:focus-visible), -.c14[aria-disabled='false']:focus:not(:focus-visible) { +.c7:not(:disabled):not([aria-disabled]):focus:not(:focus-visible), +.c7[aria-disabled='false']:focus:not(:focus-visible) { box-shadow: none; } -.c14:not(:disabled):not([aria-disabled]):focus-visible, -.c14[aria-disabled='false']:focus-visible { +.c7:not(:disabled):not([aria-disabled]):focus-visible, +.c7[aria-disabled='false']:focus-visible { box-shadow: 0 0 0 4px rgba(0,150,250,0.32); } -.c14:not(:disabled):not([aria-disabled]):hover, -.c14[aria-disabled='false']:hover { +.c7:not(:disabled):not([aria-disabled]):hover, +.c7[aria-disabled='false']:hover { background-color: var(--charcoal-surface3-hover); } -.c14:not(:disabled):not([aria-disabled]):active, -.c14[aria-disabled='false']:active { +.c7:not(:disabled):not([aria-disabled]):active, +.c7[aria-disabled='false']:active { background-color: var(--charcoal-surface3-press); } -.c15 { +.c8 { text-align: left; font-size: 14px; line-height: 22px; @@ -1204,35 +1150,11 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` white-space: nowrap; } -.c16 { +.c9 { color: var(--charcoal-text2); } .c17 { - margin-top: 8px; - font-size: 14px; - color: var(--charcoal-text2); - line-height: 22px; - display: flow-root; -} - -.c17::before { - display: block; - width: 0; - height: 0; - content: ''; - margin-top: -4px; -} - -.c17::after { - display: block; - width: 0; - height: 0; - content: ''; - margin-bottom: -4px; -} - -.c26 { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; @@ -1258,36 +1180,36 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` transition: 0.2s background-color,0.2s box-shadow; } -.c26:not(:disabled):not([aria-disabled]):hover, -.c26[aria-disabled='false']:hover { +.c17:not(:disabled):not([aria-disabled]):hover, +.c17[aria-disabled='false']:hover { color: var(--charcoal-text3-hover); background-color: var(--charcoal-transparent-hover); } -.c26:not(:disabled):not([aria-disabled]):active, -.c26[aria-disabled='false']:active { +.c17:not(:disabled):not([aria-disabled]):active, +.c17[aria-disabled='false']:active { color: var(--charcoal-text3-press); background-color: var(--charcoal-transparent-press); } -.c26:not(:disabled):not([aria-disabled]):focus, -.c26[aria-disabled='false']:focus { +.c17:not(:disabled):not([aria-disabled]):focus, +.c17[aria-disabled='false']:focus { outline: none; box-shadow: 0 0 0 4px rgba(0,150,250,0.32); } -.c26:not(:disabled):not([aria-disabled]):focus:not(:focus-visible), -.c26[aria-disabled='false']:focus:not(:focus-visible) { +.c17:not(:disabled):not([aria-disabled]):focus:not(:focus-visible), +.c17[aria-disabled='false']:focus:not(:focus-visible) { box-shadow: none; } -.c26:not(:disabled):not([aria-disabled]):focus-visible, -.c26[aria-disabled='false']:focus-visible { +.c17:not(:disabled):not([aria-disabled]):focus-visible, +.c17[aria-disabled='false']:focus-visible { box-shadow: 0 0 0 4px rgba(0,150,250,0.32); } -.c26:disabled, -.c26[aria-disabled]:not([aria-disabled='false']) { +.c17:disabled, +.c17[aria-disabled]:not([aria-disabled='false']) { opacity: 0.32; } @@ -1328,7 +1250,7 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` background-color: var(--charcoal-surface4); } -.c27 { +.c18 { position: absolute; top: 8px; right: 8px; @@ -1337,13 +1259,13 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` transition: 0.2s color; } -.c27:not(:disabled):not([aria-disabled]):hover, -.c27[aria-disabled='false']:hover { +.c18:not(:disabled):not([aria-disabled]):hover, +.c18[aria-disabled='false']:hover { color: var(--charcoal-text3-hover); } -.c27:not(:disabled):not([aria-disabled]):active, -.c27[aria-disabled='false']:active { +.c18:not(:disabled):not([aria-disabled]):active, +.c18[aria-disabled='false']:active { color: var(--charcoal-text3-press); } @@ -1393,126 +1315,34 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` padding-bottom: 40px; } -.c18 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; -} - -.c19 { - margin-bottom: 8px; -} - -.c20 { +.c14 { display: grid; grid-template-columns: 1fr; - height: 40px; - -webkit-transition: 0.2s background-color,0.2s box-shadow; - transition: 0.2s background-color,0.2s box-shadow; + grid-gap: 4px; +} + +.c15 { + position: relative; + overflow: hidden; color: var(--charcoal-text2); background-color: var(--charcoal-surface3); border-radius: 4px; - gap: 4px; - padding: 0 8px; - line-height: 22px; - font-size: 14px; + -webkit-transition: 0.2s background-color,0.2s box-shadow; + transition: 0.2s background-color,0.2s box-shadow; + height: calc(22px * 4 + 18px); } -.c20:not(:disabled):not([aria-disabled]):hover, -.c20 [aria-disabled='false']:hover { +.c15:not([aria-disabled]):hover, +.c15 [aria-disabled='false']:hover { background-color: var(--charcoal-surface3-hover); } -.c20:focus-within { +.c15:focus-within { outline: none; box-shadow: 0 0 0 4px rgba(0,150,250,0.32); } -.c21 { - border: none; - box-sizing: border-box; - outline: none; - font-family: inherit; - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-transform: scale(0.875); - -ms-transform: scale(0.875); - transform: scale(0.875); - width: calc(100% / 0.875); - height: calc(100% / 0.875); - font-size: calc(14px / 0.875); - line-height: calc(22px / 0.875); - padding-left: 0; - padding-right: 0; - border-radius: calc(4px / 0.875); - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background: transparent; - color: var(--charcoal-text2); -} - -.c21::-webkit-input-placeholder { - color: var(--charcoal-text3); -} - -.c21::-moz-placeholder { - color: var(--charcoal-text3); -} - -.c21:-ms-input-placeholder { - color: var(--charcoal-text3); -} - -.c21::placeholder { - color: var(--charcoal-text3); -} - -.c22 { - font-size: 14px; - line-height: 22px; - margin-top: 4px; - margin-bottom: -4px; - color: var(--charcoal-text2); -} - -.c23 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; -} - -.c24 { - position: relative; - overflow: hidden; - color: var(--charcoal-text2); - background-color: var(--charcoal-surface3); - border-radius: 4px; - -webkit-transition: 0.2s background-color,0.2s box-shadow; - transition: 0.2s background-color,0.2s box-shadow; - height: calc(22px * 4 + 18px); -} - -.c24:not([aria-disabled]):hover, -.c24 [aria-disabled='false']:hover { - background-color: var(--charcoal-surface3-hover); -} - -.c24:focus-within { - outline: none; - box-shadow: 0 0 0 4px rgba(0,150,250,0.32); -} - -.c25 { +.c16 { border: none; outline: none; resize: none; @@ -1536,19 +1366,19 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` background: none; } -.c25::-webkit-input-placeholder { +.c16::-webkit-input-placeholder { color: var(--charcoal-text3); } -.c25::-moz-placeholder { +.c16::-moz-placeholder { color: var(--charcoal-text3); } -.c25:-ms-input-placeholder { +.c16:-ms-input-placeholder { color: var(--charcoal-text3); } -.c25::placeholder { +.c16::placeholder { color: var(--charcoal-text3); } @@ -1640,20 +1470,20 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` className="c6" >
- required - +
@@ -1698,57 +1528,57 @@ exports[`Storybook Tests DropdownSelector InModal 1`] = ` -
assistiveText -
+

- required - +

assistiveText

- required - +