From a7f9b9e431b343cc3477e88b66f6480bc064de3a Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 23 Sep 2025 17:11:59 +0200 Subject: [PATCH] refactor: group input to use vanilla extract --- .changeset/evil-loops-check.md | 5 + .../__snapshots__/index.test.tsx.snap | 244 +++--- .../__snapshots__/index.test.tsx.snap | 20 +- .../__snapshots__/index.test.tsx.snap | 132 ++-- .../__snapshots__/index.test.tsx.snap | 732 ++++++++---------- .../ui/src/components/CheckboxGroup/index.tsx | 24 +- .../components/CheckboxGroup/styles.css.ts | 13 + .../__snapshots__/index.test.tsx.snap | 40 +- .../ui/src/components/RadioGroup/index.tsx | 12 +- .../src/components/RadioGroup/styles.css.ts | 7 + .../__snapshots__/index.test.tsx.snap | 330 ++++---- .../ui/src/components/ToggleGroup/index.tsx | 12 +- .../src/components/ToggleGroup/styles.css.ts | 7 + 13 files changed, 706 insertions(+), 872 deletions(-) create mode 100644 .changeset/evil-loops-check.md create mode 100644 packages/ui/src/components/CheckboxGroup/styles.css.ts create mode 100644 packages/ui/src/components/RadioGroup/styles.css.ts create mode 100644 packages/ui/src/components/ToggleGroup/styles.css.ts diff --git a/.changeset/evil-loops-check.md b/.changeset/evil-loops-check.md new file mode 100644 index 0000000000..c8424693f7 --- /dev/null +++ b/.changeset/evil-loops-check.md @@ -0,0 +1,5 @@ +--- +"@ultraviolet/ui": minor +--- + +Refactor ``, `` and `` to use vanilla extract diff --git a/packages/form/src/components/CheckboxGroupField/__tests__/__snapshots__/index.test.tsx.snap b/packages/form/src/components/CheckboxGroupField/__tests__/__snapshots__/index.test.tsx.snap index 82a254cab1..7a786d0767 100644 --- a/packages/form/src/components/CheckboxGroupField/__tests__/__snapshots__/index.test.tsx.snap +++ b/packages/form/src/components/CheckboxGroupField/__tests__/__snapshots__/index.test.tsx.snap @@ -3,12 +3,6 @@ exports[`checkboxField > should render correctly checked 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-3 { position: relative; display: -webkit-inline-box; display: -webkit-inline-flex; @@ -21,65 +15,65 @@ exports[`checkboxField > should render correctly checked 1`] = ` gap: 0.5rem; } -.emotion-3 .eqr7bqq3 { +.emotion-0 .eqr7bqq3 { cursor: pointer; } -.emotion-3[aria-disabled='true'] { +.emotion-0[aria-disabled='true'] { cursor: not-allowed; color: #b5b7bd; } -.emotion-3[aria-disabled='true'] .eqr7bqq3 { +.emotion-0[aria-disabled='true'] .eqr7bqq3 { cursor: not-allowed; } -.emotion-3[aria-disabled='true'] .emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-5 { fill: #e9eaeb; } -.emotion-3[aria-disabled='true'] .emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-5 .emotion-7 { stroke: #d9dadd; fill: #f3f3f4; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]:checked+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]:checked+.emotion-5 { fill: #ffd3e3; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]:checked+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]:checked+.emotion-5 .emotion-7 { stroke: #ffd3e3; fill: #ffd3e3; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]+.emotion-5 { fill: #ffebf2; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]+.emotion-5 .emotion-7 { stroke: #ffbbd3; fill: #ffebf2; } -.emotion-3[aria-disabled='true'] .emotion-6:checked+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3:checked+.emotion-5 { fill: #e5dbfd; } -.emotion-3[aria-disabled='true'] .emotion-6:checked+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3:checked+.emotion-5 .emotion-7 { stroke: #d8c5fc; fill: #d8c5fc; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-checked="mixed"]+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-checked="mixed"]+.emotion-5 { fill: #e5dbfd; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-checked="mixed"]+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-checked="mixed"]+.emotion-5 .emotion-7 { stroke: #e5dbfd; fill: #e5dbfd; } -.emotion-3 .emotion-6:checked+.emotion-8 path { +.emotion-0 .emotion-3:checked+.emotion-5 path { transform-origin: center; -webkit-transition: 200ms -webkit-transform ease-in-out; transition: 200ms transform ease-in-out; @@ -93,66 +87,60 @@ exports[`checkboxField > should render correctly checked 1`] = ` transform: translate(2px, 2px); } -.emotion-3 .emotion-6:checked+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3:checked+.emotion-5 .emotion-7 { fill: #8c40ef; stroke: #8c40ef; } -.emotion-3 .emotion-6[aria-invalid="true"]:checked+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3[aria-invalid="true"]:checked+.emotion-5 .emotion-7 { fill: #e51963; stroke: #e51963; } -.emotion-3 .emotion-6[aria-checked="mixed"]+.emotion-8 .eqr7bqq5 { +.emotion-0 .emotion-3[aria-checked="mixed"]+.emotion-5 .eqr7bqq5 { fill: #ffffff; } -.emotion-3 .emotion-6[aria-checked="mixed"]+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3[aria-checked="mixed"]+.emotion-5 .emotion-7 { fill: #8c40ef; stroke: #8c40ef; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='false'][aria-checked='false']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='false'][aria-checked='false']+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #e5dbfd; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='false'][aria-checked='true']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='false'][aria-checked='true']+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #792dd4; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='false'][aria-checked='mixed']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='false'][aria-checked='mixed']+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #792dd4; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='true'][aria-checked='false']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='true'][aria-checked='false']+.emotion-5 .emotion-7 { stroke: #92103f; fill: #ffd3e3; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='true'][aria-checked='true']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='true'][aria-checked='true']+.emotion-5 .emotion-7 { stroke: #d6175c; fill: #d6175c; } -.emotion-3 .emotion-6[aria-invalid="true"]+.emotion-8 { +.emotion-0 .emotion-3[aria-invalid="true"]+.emotion-5 { fill: #e51963; } -.emotion-3 .emotion-6[aria-invalid="true"]+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3[aria-invalid="true"]+.emotion-5 .emotion-7 { stroke: #e51963; fill: #ffebf2; } -.emotion-3 label { - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; -} - -.emotion-5 { +.emotion-2 { position: absolute; white-space: nowrap; height: 1.5rem; @@ -161,57 +149,57 @@ exports[`checkboxField > should render correctly checked 1`] = ` border-width: 0; } -.emotion-5:not(:disabled) { +.emotion-2:not(:disabled) { cursor: pointer; } -.emotion-5:disabled { +.emotion-2:disabled { cursor: not-allowed; } -.emotion-5:not(:disabled):checked+.emotion-8, -.emotion-5:not(:disabled)[aria-checked='mixed']+.emotion-8 { +.emotion-2:not(:disabled):checked+.emotion-5, +.emotion-2:not(:disabled)[aria-checked='mixed']+.emotion-5 { fill: #8c40ef; } -.emotion-5:not(:disabled):checked+.emotion-8 .emotion-10, -.emotion-5:not(:disabled)[aria-checked='mixed']+.emotion-8 .emotion-10 { +.emotion-2:not(:disabled):checked+.emotion-5 .emotion-7, +.emotion-2:not(:disabled)[aria-checked='mixed']+.emotion-5 .emotion-7 { stroke: #8c40ef; } -.emotion-5:not(:disabled)[aria-invalid='true']+.emotion-8, -.emotion-5:not(:disabled)[aria-invalid='mixed']+.emotion-8 { +.emotion-2:not(:disabled)[aria-invalid='true']+.emotion-5, +.emotion-2:not(:disabled)[aria-invalid='mixed']+.emotion-5 { fill: #ffebf2; } -.emotion-5:not(:disabled)[aria-invalid='true']+.emotion-8 .emotion-10, -.emotion-5:not(:disabled)[aria-invalid='mixed']+.emotion-8 .emotion-10 { +.emotion-2:not(:disabled)[aria-invalid='true']+.emotion-5 .emotion-7, +.emotion-2:not(:disabled)[aria-invalid='mixed']+.emotion-5 .emotion-7 { stroke: #b3144d; } -.emotion-5:focus+.emotion-8 { +.emotion-2:focus+.emotion-5 { background-color: #f1eefc; fill: #ffebf2; outline: 1px solid 0px 0px 0px 3px #8c40ef40; } -.emotion-5:focus+.emotion-8 .emotion-10 { +.emotion-2:focus+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #e5dbfd; } -.emotion-5[aria-invalid='true']:focus+.emotion-8 { +.emotion-2[aria-invalid='true']:focus+.emotion-5 { background-color: #ffebf2; fill: #ffebf2; outline: 1px solid 0px 0px 0px 3px #f91b6c40; } -.emotion-5[aria-invalid='true']:focus+.emotion-8 .emotion-10 { +.emotion-2[aria-invalid='true']:focus+.emotion-5 .emotion-7 { stroke: #92103f; fill: #ffd3e3; } -.emotion-7 { +.emotion-4 { border-radius: 0.25rem; height: 1.5rem; width: 1.5rem; @@ -219,7 +207,7 @@ exports[`checkboxField > should render correctly checked 1`] = ` min-height: 1.5rem; } -.emotion-7 path { +.emotion-4 path { fill: #ffffff; -webkit-transform: translate(2px, 2px); -moz-transform: translate(2px, 2px); @@ -231,12 +219,12 @@ exports[`checkboxField > should render correctly checked 1`] = ` transform: scale(0); } -.emotion-9 { +.emotion-6 { fill: #ffffff; stroke: #d9dadd; } -.emotion-11 { +.emotion-8 { width: 100%; cursor: pointer; } @@ -252,7 +240,7 @@ exports[`checkboxField > should render correctly checked 1`] = ` class="uv_toi52u0 uv_toi52u31 uv_toi52u2d uv_toi52u7d uv_toi52u7 uv_toi52u5d" >
should render correctly checked 1`] = ` >
should render correctly checked 1`] = ` style="--uv_4k0ekn3: 1;" >
should render correctly checked 1`] = ` style="--uv_4k0ekn3: 1;" >
should trigger events correctly with required prop 1`] >
should trigger events correctly with required prop 1`] style="--uv_4k0ekn3: 1;" >
should trigger events correctly with required prop 1`] style="--uv_4k0ekn3: 1;" >
should render correctly checked 1`] = ` class="uv_toi52u0 uv_toi52u31 uv_toi52u2d uv_toi52u7d uv_toi52u7 uv_toi52u5d" >
should render correctly checked 1`] = ` exports[`radioField > should trigger events correctly 1`] = ` - .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -
should trigger events correctly 1`] = ` class="uv_toi52u0 uv_toi52u31 uv_toi52u2d uv_toi52u7d uv_toi52u7 uv_toi52u5d" >
should render correctly checked 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -27,16 +21,16 @@ exports[`groupField > should render correctly checked 1`] = ` flex-direction: row-reverse; } -.emotion-2:active .emotion-5[data-disabled='false']:after { +.emotion-0:active .emotion-3[data-disabled='false']:after { width: calc(1rem * 1.3775); } -.emotion-2[aria-disabled="true"] { +.emotion-0[aria-disabled="true"] { cursor: not-allowed; color: #b5b7bd; } -.emotion-4 { +.emotion-2 { box-sizing: content-box; outline: none; overflow: hidden; @@ -58,11 +52,11 @@ exports[`groupField > should render correctly checked 1`] = ` height: 1.5rem; } -.emotion-4:hover { +.emotion-2:hover { background-color: #d9dadd; } -.emotion-4:after { +.emotion-2:after { content: ""; position: absolute; top: calc(1.5rem / 2 - 1rem / 2); @@ -75,25 +69,25 @@ exports[`groupField > should render correctly checked 1`] = ` transition: all 300ms; } -.emotion-4:focus-within, -.emotion-4:focus { +.emotion-2:focus-within, +.emotion-2:focus { box-shadow: 0px 0px 0px 3px #151a2d5c; } -.emotion-4[data-disabled="false"]:active:after { +.emotion-2[data-disabled="false"]:active:after { width: calc(1rem * 1.3775); } -.emotion-4:has(:checked) { +.emotion-2:has(:checked) { color: #222638; background-color: #8c40ef; } -.emotion-4:has(:checked):hover { +.emotion-2:has(:checked):hover { background-color: #792dd4; } -.emotion-4:has(:checked):after { +.emotion-2:has(:checked):after { left: calc(100% - 5px); -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); @@ -101,41 +95,41 @@ exports[`groupField > should render correctly checked 1`] = ` transform: translateX(-100%); } -.emotion-4:has(:checked):focus-within, -.emotion-4:has(:checked):focus { +.emotion-2:has(:checked):focus-within, +.emotion-2:has(:checked):focus { box-shadow: 0px 0px 0px 3px #8c40ef40; } -.emotion-4[data-disabled="true"] { +.emotion-2[data-disabled="true"] { background: #f3f3f4; } -.emotion-4[data-disabled="true"]:has(:checked) { +.emotion-2[data-disabled="true"]:has(:checked) { background: #e5dbfd; } -.emotion-4[data-error="true"] { +.emotion-2[data-error="true"] { background-color: #ffebf2; } -.emotion-4[data-error="true"]:focus-within, -.emotion-4[data-error="true"]:focus { +.emotion-2[data-error="true"]:focus-within, +.emotion-2[data-error="true"]:focus { box-shadow: 0px 0px 0px 3px #f91b6c40; } -.emotion-4[data-error="true"]:has(:checked) { +.emotion-2[data-error="true"]:has(:checked) { background-color: #e51963; } -.emotion-4[data-error="true"][data-disabled="true"] { +.emotion-2[data-error="true"][data-disabled="true"] { background-color: #fff3f7; } -.emotion-4[data-error="true"][data-disabled="true"]:has(:checked) { +.emotion-2[data-error="true"][data-disabled="true"]:has(:checked) { background-color: #ffd3e3; } -.emotion-6 { +.emotion-4 { position: absolute; opacity: 0; top: 0; @@ -145,7 +139,7 @@ exports[`groupField > should render correctly checked 1`] = ` cursor: pointer; } -.emotion-6[disabled] { +.emotion-4[disabled] { cursor: not-allowed; } @@ -160,7 +154,7 @@ exports[`groupField > should render correctly checked 1`] = ` class="uv_toi52u0 uv_toi52u31 uv_toi52u2d uv_toi52u7d uv_toi52u7 uv_toi52u5d" >
should render correctly checked 1`] = ` >
should render correctly checked 1`] = `
should render correctly checked 1`] = ` exports[`groupField > should trigger events correctly with required prop 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -279,16 +267,16 @@ exports[`groupField > should trigger events correctly with required prop 1`] = ` flex-direction: row-reverse; } -.emotion-2:active .emotion-5[data-disabled='false']:after { +.emotion-0:active .emotion-3[data-disabled='false']:after { width: calc(1rem * 1.3775); } -.emotion-2[aria-disabled="true"] { +.emotion-0[aria-disabled="true"] { cursor: not-allowed; color: #b5b7bd; } -.emotion-4 { +.emotion-2 { box-sizing: content-box; outline: none; overflow: hidden; @@ -310,11 +298,11 @@ exports[`groupField > should trigger events correctly with required prop 1`] = ` height: 1.5rem; } -.emotion-4:hover { +.emotion-2:hover { background-color: #d9dadd; } -.emotion-4:after { +.emotion-2:after { content: ""; position: absolute; top: calc(1.5rem / 2 - 1rem / 2); @@ -327,25 +315,25 @@ exports[`groupField > should trigger events correctly with required prop 1`] = ` transition: all 300ms; } -.emotion-4:focus-within, -.emotion-4:focus { +.emotion-2:focus-within, +.emotion-2:focus { box-shadow: 0px 0px 0px 3px #151a2d5c; } -.emotion-4[data-disabled="false"]:active:after { +.emotion-2[data-disabled="false"]:active:after { width: calc(1rem * 1.3775); } -.emotion-4:has(:checked) { +.emotion-2:has(:checked) { color: #222638; background-color: #8c40ef; } -.emotion-4:has(:checked):hover { +.emotion-2:has(:checked):hover { background-color: #792dd4; } -.emotion-4:has(:checked):after { +.emotion-2:has(:checked):after { left: calc(100% - 5px); -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); @@ -353,41 +341,41 @@ exports[`groupField > should trigger events correctly with required prop 1`] = ` transform: translateX(-100%); } -.emotion-4:has(:checked):focus-within, -.emotion-4:has(:checked):focus { +.emotion-2:has(:checked):focus-within, +.emotion-2:has(:checked):focus { box-shadow: 0px 0px 0px 3px #8c40ef40; } -.emotion-4[data-disabled="true"] { +.emotion-2[data-disabled="true"] { background: #f3f3f4; } -.emotion-4[data-disabled="true"]:has(:checked) { +.emotion-2[data-disabled="true"]:has(:checked) { background: #e5dbfd; } -.emotion-4[data-error="true"] { +.emotion-2[data-error="true"] { background-color: #ffebf2; } -.emotion-4[data-error="true"]:focus-within, -.emotion-4[data-error="true"]:focus { +.emotion-2[data-error="true"]:focus-within, +.emotion-2[data-error="true"]:focus { box-shadow: 0px 0px 0px 3px #f91b6c40; } -.emotion-4[data-error="true"]:has(:checked) { +.emotion-2[data-error="true"]:has(:checked) { background-color: #e51963; } -.emotion-4[data-error="true"][data-disabled="true"] { +.emotion-2[data-error="true"][data-disabled="true"] { background-color: #fff3f7; } -.emotion-4[data-error="true"][data-disabled="true"]:has(:checked) { +.emotion-2[data-error="true"][data-disabled="true"]:has(:checked) { background-color: #ffd3e3; } -.emotion-6 { +.emotion-4 { position: absolute; opacity: 0; top: 0; @@ -397,7 +385,7 @@ exports[`groupField > should trigger events correctly with required prop 1`] = ` cursor: pointer; } -.emotion-6[disabled] { +.emotion-4[disabled] { cursor: not-allowed; } @@ -412,7 +400,7 @@ exports[`groupField > should trigger events correctly with required prop 1`] = ` class="uv_toi52u0 uv_toi52u31 uv_toi52u2d uv_toi52u7d uv_toi52u7 uv_toi52u5d" >
should trigger events correctly with required prop 1`] = ` >
should trigger events correctly with required prop 1`] = `
renders correctly 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-3 { position: relative; display: -webkit-inline-box; display: -webkit-inline-flex; @@ -21,65 +15,65 @@ exports[`checkboxGroup > renders correctly 1`] = ` gap: 0.5rem; } -.emotion-3 .eqr7bqq3 { +.emotion-0 .eqr7bqq3 { cursor: pointer; } -.emotion-3[aria-disabled='true'] { +.emotion-0[aria-disabled='true'] { cursor: not-allowed; color: #b5b7bd; } -.emotion-3[aria-disabled='true'] .eqr7bqq3 { +.emotion-0[aria-disabled='true'] .eqr7bqq3 { cursor: not-allowed; } -.emotion-3[aria-disabled='true'] .emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-5 { fill: #e9eaeb; } -.emotion-3[aria-disabled='true'] .emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-5 .emotion-7 { stroke: #d9dadd; fill: #f3f3f4; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]:checked+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]:checked+.emotion-5 { fill: #ffd3e3; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]:checked+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]:checked+.emotion-5 .emotion-7 { stroke: #ffd3e3; fill: #ffd3e3; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]+.emotion-5 { fill: #ffebf2; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-invalid="true"]+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-invalid="true"]+.emotion-5 .emotion-7 { stroke: #ffbbd3; fill: #ffebf2; } -.emotion-3[aria-disabled='true'] .emotion-6:checked+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3:checked+.emotion-5 { fill: #e5dbfd; } -.emotion-3[aria-disabled='true'] .emotion-6:checked+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3:checked+.emotion-5 .emotion-7 { stroke: #d8c5fc; fill: #d8c5fc; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-checked="mixed"]+.emotion-8 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-checked="mixed"]+.emotion-5 { fill: #e5dbfd; } -.emotion-3[aria-disabled='true'] .emotion-6[aria-checked="mixed"]+.emotion-8 .emotion-10 { +.emotion-0[aria-disabled='true'] .emotion-3[aria-checked="mixed"]+.emotion-5 .emotion-7 { stroke: #e5dbfd; fill: #e5dbfd; } -.emotion-3 .emotion-6:checked+.emotion-8 path { +.emotion-0 .emotion-3:checked+.emotion-5 path { transform-origin: center; -webkit-transition: 200ms -webkit-transform ease-in-out; transition: 200ms transform ease-in-out; @@ -93,66 +87,60 @@ exports[`checkboxGroup > renders correctly 1`] = ` transform: translate(2px, 2px); } -.emotion-3 .emotion-6:checked+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3:checked+.emotion-5 .emotion-7 { fill: #8c40ef; stroke: #8c40ef; } -.emotion-3 .emotion-6[aria-invalid="true"]:checked+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3[aria-invalid="true"]:checked+.emotion-5 .emotion-7 { fill: #e51963; stroke: #e51963; } -.emotion-3 .emotion-6[aria-checked="mixed"]+.emotion-8 .eqr7bqq5 { +.emotion-0 .emotion-3[aria-checked="mixed"]+.emotion-5 .eqr7bqq5 { fill: #ffffff; } -.emotion-3 .emotion-6[aria-checked="mixed"]+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3[aria-checked="mixed"]+.emotion-5 .emotion-7 { fill: #8c40ef; stroke: #8c40ef; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='false'][aria-checked='false']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='false'][aria-checked='false']+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #e5dbfd; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='false'][aria-checked='true']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='false'][aria-checked='true']+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #792dd4; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='false'][aria-checked='mixed']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='false'][aria-checked='mixed']+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #792dd4; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='true'][aria-checked='false']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='true'][aria-checked='false']+.emotion-5 .emotion-7 { stroke: #92103f; fill: #ffd3e3; } -.emotion-3:hover[aria-disabled='false'] .emotion-6[aria-invalid='true'][aria-checked='true']+.emotion-8 .emotion-10 { +.emotion-0:hover[aria-disabled='false'] .emotion-3[aria-invalid='true'][aria-checked='true']+.emotion-5 .emotion-7 { stroke: #d6175c; fill: #d6175c; } -.emotion-3 .emotion-6[aria-invalid="true"]+.emotion-8 { +.emotion-0 .emotion-3[aria-invalid="true"]+.emotion-5 { fill: #e51963; } -.emotion-3 .emotion-6[aria-invalid="true"]+.emotion-8 .emotion-10 { +.emotion-0 .emotion-3[aria-invalid="true"]+.emotion-5 .emotion-7 { stroke: #e51963; fill: #ffebf2; } -.emotion-3 label { - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; -} - -.emotion-5 { +.emotion-2 { position: absolute; white-space: nowrap; height: 1.5rem; @@ -161,57 +149,57 @@ exports[`checkboxGroup > renders correctly 1`] = ` border-width: 0; } -.emotion-5:not(:disabled) { +.emotion-2:not(:disabled) { cursor: pointer; } -.emotion-5:disabled { +.emotion-2:disabled { cursor: not-allowed; } -.emotion-5:not(:disabled):checked+.emotion-8, -.emotion-5:not(:disabled)[aria-checked='mixed']+.emotion-8 { +.emotion-2:not(:disabled):checked+.emotion-5, +.emotion-2:not(:disabled)[aria-checked='mixed']+.emotion-5 { fill: #8c40ef; } -.emotion-5:not(:disabled):checked+.emotion-8 .emotion-10, -.emotion-5:not(:disabled)[aria-checked='mixed']+.emotion-8 .emotion-10 { +.emotion-2:not(:disabled):checked+.emotion-5 .emotion-7, +.emotion-2:not(:disabled)[aria-checked='mixed']+.emotion-5 .emotion-7 { stroke: #8c40ef; } -.emotion-5:not(:disabled)[aria-invalid='true']+.emotion-8, -.emotion-5:not(:disabled)[aria-invalid='mixed']+.emotion-8 { +.emotion-2:not(:disabled)[aria-invalid='true']+.emotion-5, +.emotion-2:not(:disabled)[aria-invalid='mixed']+.emotion-5 { fill: #ffebf2; } -.emotion-5:not(:disabled)[aria-invalid='true']+.emotion-8 .emotion-10, -.emotion-5:not(:disabled)[aria-invalid='mixed']+.emotion-8 .emotion-10 { +.emotion-2:not(:disabled)[aria-invalid='true']+.emotion-5 .emotion-7, +.emotion-2:not(:disabled)[aria-invalid='mixed']+.emotion-5 .emotion-7 { stroke: #b3144d; } -.emotion-5:focus+.emotion-8 { +.emotion-2:focus+.emotion-5 { background-color: #f1eefc; fill: #ffebf2; outline: 1px solid 0px 0px 0px 3px #8c40ef40; } -.emotion-5:focus+.emotion-8 .emotion-10 { +.emotion-2:focus+.emotion-5 .emotion-7 { stroke: #792dd4; fill: #e5dbfd; } -.emotion-5[aria-invalid='true']:focus+.emotion-8 { +.emotion-2[aria-invalid='true']:focus+.emotion-5 { background-color: #ffebf2; fill: #ffebf2; outline: 1px solid 0px 0px 0px 3px #f91b6c40; } -.emotion-5[aria-invalid='true']:focus+.emotion-8 .emotion-10 { +.emotion-2[aria-invalid='true']:focus+.emotion-5 .emotion-7 { stroke: #92103f; fill: #ffd3e3; } -.emotion-7 { +.emotion-4 { border-radius: 0.25rem; height: 1.5rem; width: 1.5rem; @@ -219,7 +207,7 @@ exports[`checkboxGroup > renders correctly 1`] = ` min-height: 1.5rem; } -.emotion-7 path { +.emotion-4 path { fill: #ffffff; -webkit-transform: translate(2px, 2px); -moz-transform: translate(2px, 2px); @@ -231,12 +219,12 @@ exports[`checkboxGroup > renders correctly 1`] = ` transform: scale(0); } -.emotion-9 { +.emotion-6 { fill: #ffffff; stroke: #d9dadd; } -.emotion-11 { +.emotion-8 { width: 100%; cursor: pointer; } @@ -248,7 +236,7 @@ exports[`checkboxGroup > renders correctly 1`] = ` class="styles__toi52u0 styles_alignItems_normal_xxsmall__toi52u31 styles_flexDirection_column_xxsmall__toi52u2d styles_flexWrap_nowrap_xxsmall__toi52u7d styles_gap_0.5rem_xxsmall__toi52u7 styles_justifyContent_normal_xxsmall__toi52u5d" >
renders correctly 1`] = ` >
renders correctly 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly with direction row 1`] = ` >
renders correctly with direction row 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly with direction row 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly with error content 1`] = ` >
@@ -1057,20 +1021,20 @@ exports[`checkboxGroup > renders correctly with error content 1`] = ` aria-checked="false" aria-describedby="«ru»-hint" aria-invalid="true" - class="emotion-5 emotion-6" + class="emotion-2 emotion-3" id="«ru»" name="Checkbox.value-1" type="checkbox" value="value-1" /> renders correctly with error content 1`] = ` style="--_4k0ekn3: 1;" >
@@ -1117,20 +1081,20 @@ exports[`checkboxGroup > renders correctly with error content 1`] = ` aria-checked="false" aria-describedby="«r11»-hint" aria-invalid="true" - class="emotion-5 emotion-6" + class="emotion-2 emotion-3" id="«r11»" name="Checkbox.value-2" type="checkbox" value="value-2" /> renders correctly with error content 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly with helper content 1`] = ` >
renders correctly with helper content 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly with helper content 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly with no CheckboxGroup.Checkbox name 1 >
renders correctly with no CheckboxGroup.Checkbox name 1 style="--_4k0ekn3: 1;" >
renders correctly with no CheckboxGroup.Checkbox name 1 style="--_4k0ekn3: 1;" >
renders correctly with required prop 1`] = ` >
renders correctly with required prop 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly with required prop 1`] = ` style="--_4k0ekn3: 1;" >
renders correctly 1`] = ` exports[`radioGroup > renders correctly with direction row 1`] = ` - .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -
renders correctly with direction row 1`] = ` exports[`radioGroup > renders correctly with error content 1`] = ` - .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -
renders correctly with error content 1`] = ` exports[`radioGroup > renders correctly with helper content 1`] = ` - .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -
-
+
{legend || description ? ( @@ -149,7 +143,7 @@ export const RadioGroup = ({ {children} -
+
{helper ? ( renders correctly 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -27,16 +21,16 @@ exports[`toggleGroup > renders correctly 1`] = ` flex-direction: row-reverse; } -.emotion-2:active .emotion-5[data-disabled='false']:after { +.emotion-0:active .emotion-3[data-disabled='false']:after { width: calc(1rem * 1.3775); } -.emotion-2[aria-disabled="true"] { +.emotion-0[aria-disabled="true"] { cursor: not-allowed; color: #b5b7bd; } -.emotion-4 { +.emotion-2 { box-sizing: content-box; outline: none; overflow: hidden; @@ -58,11 +52,11 @@ exports[`toggleGroup > renders correctly 1`] = ` height: 1.5rem; } -.emotion-4:hover { +.emotion-2:hover { background-color: #d9dadd; } -.emotion-4:after { +.emotion-2:after { content: ""; position: absolute; top: calc(1.5rem / 2 - 1rem / 2); @@ -75,25 +69,25 @@ exports[`toggleGroup > renders correctly 1`] = ` transition: all 300ms; } -.emotion-4:focus-within, -.emotion-4:focus { +.emotion-2:focus-within, +.emotion-2:focus { box-shadow: 0px 0px 0px 3px #151a2d5c; } -.emotion-4[data-disabled="false"]:active:after { +.emotion-2[data-disabled="false"]:active:after { width: calc(1rem * 1.3775); } -.emotion-4:has(:checked) { +.emotion-2:has(:checked) { color: #222638; background-color: #8c40ef; } -.emotion-4:has(:checked):hover { +.emotion-2:has(:checked):hover { background-color: #792dd4; } -.emotion-4:has(:checked):after { +.emotion-2:has(:checked):after { left: calc(100% - 5px); -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); @@ -101,41 +95,41 @@ exports[`toggleGroup > renders correctly 1`] = ` transform: translateX(-100%); } -.emotion-4:has(:checked):focus-within, -.emotion-4:has(:checked):focus { +.emotion-2:has(:checked):focus-within, +.emotion-2:has(:checked):focus { box-shadow: 0px 0px 0px 3px #8c40ef40; } -.emotion-4[data-disabled="true"] { +.emotion-2[data-disabled="true"] { background: #f3f3f4; } -.emotion-4[data-disabled="true"]:has(:checked) { +.emotion-2[data-disabled="true"]:has(:checked) { background: #e5dbfd; } -.emotion-4[data-error="true"] { +.emotion-2[data-error="true"] { background-color: #ffebf2; } -.emotion-4[data-error="true"]:focus-within, -.emotion-4[data-error="true"]:focus { +.emotion-2[data-error="true"]:focus-within, +.emotion-2[data-error="true"]:focus { box-shadow: 0px 0px 0px 3px #f91b6c40; } -.emotion-4[data-error="true"]:has(:checked) { +.emotion-2[data-error="true"]:has(:checked) { background-color: #e51963; } -.emotion-4[data-error="true"][data-disabled="true"] { +.emotion-2[data-error="true"][data-disabled="true"] { background-color: #fff3f7; } -.emotion-4[data-error="true"][data-disabled="true"]:has(:checked) { +.emotion-2[data-error="true"][data-disabled="true"]:has(:checked) { background-color: #ffd3e3; } -.emotion-6 { +.emotion-4 { position: absolute; opacity: 0; top: 0; @@ -145,7 +139,7 @@ exports[`toggleGroup > renders correctly 1`] = ` cursor: pointer; } -.emotion-6[disabled] { +.emotion-4[disabled] { cursor: not-allowed; } @@ -156,7 +150,7 @@ exports[`toggleGroup > renders correctly 1`] = ` class="styles__toi52u0 styles_alignItems_normal_xxsmall__toi52u31 styles_flexDirection_column_xxsmall__toi52u2d styles_flexWrap_nowrap_xxsmall__toi52u7d styles_gap_0.5rem_xxsmall__toi52u7 styles_justifyContent_normal_xxsmall__toi52u5d" >
renders correctly 1`] = ` >
renders correctly 1`] = `
renders correctly 1`] = ` exports[`toggleGroup > renders correctly with direction row 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -274,16 +262,16 @@ exports[`toggleGroup > renders correctly with direction row 1`] = ` flex-direction: row-reverse; } -.emotion-2:active .emotion-5[data-disabled='false']:after { +.emotion-0:active .emotion-3[data-disabled='false']:after { width: calc(1rem * 1.3775); } -.emotion-2[aria-disabled="true"] { +.emotion-0[aria-disabled="true"] { cursor: not-allowed; color: #b5b7bd; } -.emotion-4 { +.emotion-2 { box-sizing: content-box; outline: none; overflow: hidden; @@ -305,11 +293,11 @@ exports[`toggleGroup > renders correctly with direction row 1`] = ` height: 1.5rem; } -.emotion-4:hover { +.emotion-2:hover { background-color: #d9dadd; } -.emotion-4:after { +.emotion-2:after { content: ""; position: absolute; top: calc(1.5rem / 2 - 1rem / 2); @@ -322,25 +310,25 @@ exports[`toggleGroup > renders correctly with direction row 1`] = ` transition: all 300ms; } -.emotion-4:focus-within, -.emotion-4:focus { +.emotion-2:focus-within, +.emotion-2:focus { box-shadow: 0px 0px 0px 3px #151a2d5c; } -.emotion-4[data-disabled="false"]:active:after { +.emotion-2[data-disabled="false"]:active:after { width: calc(1rem * 1.3775); } -.emotion-4:has(:checked) { +.emotion-2:has(:checked) { color: #222638; background-color: #8c40ef; } -.emotion-4:has(:checked):hover { +.emotion-2:has(:checked):hover { background-color: #792dd4; } -.emotion-4:has(:checked):after { +.emotion-2:has(:checked):after { left: calc(100% - 5px); -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); @@ -348,41 +336,41 @@ exports[`toggleGroup > renders correctly with direction row 1`] = ` transform: translateX(-100%); } -.emotion-4:has(:checked):focus-within, -.emotion-4:has(:checked):focus { +.emotion-2:has(:checked):focus-within, +.emotion-2:has(:checked):focus { box-shadow: 0px 0px 0px 3px #8c40ef40; } -.emotion-4[data-disabled="true"] { +.emotion-2[data-disabled="true"] { background: #f3f3f4; } -.emotion-4[data-disabled="true"]:has(:checked) { +.emotion-2[data-disabled="true"]:has(:checked) { background: #e5dbfd; } -.emotion-4[data-error="true"] { +.emotion-2[data-error="true"] { background-color: #ffebf2; } -.emotion-4[data-error="true"]:focus-within, -.emotion-4[data-error="true"]:focus { +.emotion-2[data-error="true"]:focus-within, +.emotion-2[data-error="true"]:focus { box-shadow: 0px 0px 0px 3px #f91b6c40; } -.emotion-4[data-error="true"]:has(:checked) { +.emotion-2[data-error="true"]:has(:checked) { background-color: #e51963; } -.emotion-4[data-error="true"][data-disabled="true"] { +.emotion-2[data-error="true"][data-disabled="true"] { background-color: #fff3f7; } -.emotion-4[data-error="true"][data-disabled="true"]:has(:checked) { +.emotion-2[data-error="true"][data-disabled="true"]:has(:checked) { background-color: #ffd3e3; } -.emotion-6 { +.emotion-4 { position: absolute; opacity: 0; top: 0; @@ -392,7 +380,7 @@ exports[`toggleGroup > renders correctly with direction row 1`] = ` cursor: pointer; } -.emotion-6[disabled] { +.emotion-4[disabled] { cursor: not-allowed; } @@ -403,7 +391,7 @@ exports[`toggleGroup > renders correctly with direction row 1`] = ` class="styles__toi52u0 styles_alignItems_normal_xxsmall__toi52u31 styles_flexDirection_column_xxsmall__toi52u2d styles_flexWrap_nowrap_xxsmall__toi52u7d styles_gap_0.5rem_xxsmall__toi52u7 styles_justifyContent_normal_xxsmall__toi52u5d" >
renders correctly with direction row 1`] = ` >
renders correctly with direction row 1`] = `
renders correctly with direction row 1`] = ` exports[`toggleGroup > renders correctly with error content 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -521,16 +503,16 @@ exports[`toggleGroup > renders correctly with error content 1`] = ` flex-direction: row-reverse; } -.emotion-2:active .emotion-5[data-disabled='false']:after { +.emotion-0:active .emotion-3[data-disabled='false']:after { width: calc(1rem * 1.3775); } -.emotion-2[aria-disabled="true"] { +.emotion-0[aria-disabled="true"] { cursor: not-allowed; color: #b5b7bd; } -.emotion-4 { +.emotion-2 { box-sizing: content-box; outline: none; overflow: hidden; @@ -552,11 +534,11 @@ exports[`toggleGroup > renders correctly with error content 1`] = ` height: 1.5rem; } -.emotion-4:hover { +.emotion-2:hover { background-color: #d9dadd; } -.emotion-4:after { +.emotion-2:after { content: ""; position: absolute; top: calc(1.5rem / 2 - 1rem / 2); @@ -569,25 +551,25 @@ exports[`toggleGroup > renders correctly with error content 1`] = ` transition: all 300ms; } -.emotion-4:focus-within, -.emotion-4:focus { +.emotion-2:focus-within, +.emotion-2:focus { box-shadow: 0px 0px 0px 3px #151a2d5c; } -.emotion-4[data-disabled="false"]:active:after { +.emotion-2[data-disabled="false"]:active:after { width: calc(1rem * 1.3775); } -.emotion-4:has(:checked) { +.emotion-2:has(:checked) { color: #222638; background-color: #8c40ef; } -.emotion-4:has(:checked):hover { +.emotion-2:has(:checked):hover { background-color: #792dd4; } -.emotion-4:has(:checked):after { +.emotion-2:has(:checked):after { left: calc(100% - 5px); -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); @@ -595,41 +577,41 @@ exports[`toggleGroup > renders correctly with error content 1`] = ` transform: translateX(-100%); } -.emotion-4:has(:checked):focus-within, -.emotion-4:has(:checked):focus { +.emotion-2:has(:checked):focus-within, +.emotion-2:has(:checked):focus { box-shadow: 0px 0px 0px 3px #8c40ef40; } -.emotion-4[data-disabled="true"] { +.emotion-2[data-disabled="true"] { background: #f3f3f4; } -.emotion-4[data-disabled="true"]:has(:checked) { +.emotion-2[data-disabled="true"]:has(:checked) { background: #e5dbfd; } -.emotion-4[data-error="true"] { +.emotion-2[data-error="true"] { background-color: #ffebf2; } -.emotion-4[data-error="true"]:focus-within, -.emotion-4[data-error="true"]:focus { +.emotion-2[data-error="true"]:focus-within, +.emotion-2[data-error="true"]:focus { box-shadow: 0px 0px 0px 3px #f91b6c40; } -.emotion-4[data-error="true"]:has(:checked) { +.emotion-2[data-error="true"]:has(:checked) { background-color: #e51963; } -.emotion-4[data-error="true"][data-disabled="true"] { +.emotion-2[data-error="true"][data-disabled="true"] { background-color: #fff3f7; } -.emotion-4[data-error="true"][data-disabled="true"]:has(:checked) { +.emotion-2[data-error="true"][data-disabled="true"]:has(:checked) { background-color: #ffd3e3; } -.emotion-6 { +.emotion-4 { position: absolute; opacity: 0; top: 0; @@ -639,7 +621,7 @@ exports[`toggleGroup > renders correctly with error content 1`] = ` cursor: pointer; } -.emotion-6[disabled] { +.emotion-4[disabled] { cursor: not-allowed; } @@ -650,7 +632,7 @@ exports[`toggleGroup > renders correctly with error content 1`] = ` class="styles__toi52u0 styles_alignItems_normal_xxsmall__toi52u31 styles_flexDirection_column_xxsmall__toi52u2d styles_flexWrap_nowrap_xxsmall__toi52u7d styles_gap_0.5rem_xxsmall__toi52u7 styles_justifyContent_normal_xxsmall__toi52u5d" >
renders correctly with error content 1`] = ` >
renders correctly with error content 1`] = `
renders correctly with error content 1`] = ` exports[`toggleGroup > renders correctly with helper content 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -773,16 +749,16 @@ exports[`toggleGroup > renders correctly with helper content 1`] = ` flex-direction: row-reverse; } -.emotion-2:active .emotion-5[data-disabled='false']:after { +.emotion-0:active .emotion-3[data-disabled='false']:after { width: calc(1rem * 1.3775); } -.emotion-2[aria-disabled="true"] { +.emotion-0[aria-disabled="true"] { cursor: not-allowed; color: #b5b7bd; } -.emotion-4 { +.emotion-2 { box-sizing: content-box; outline: none; overflow: hidden; @@ -804,11 +780,11 @@ exports[`toggleGroup > renders correctly with helper content 1`] = ` height: 1.5rem; } -.emotion-4:hover { +.emotion-2:hover { background-color: #d9dadd; } -.emotion-4:after { +.emotion-2:after { content: ""; position: absolute; top: calc(1.5rem / 2 - 1rem / 2); @@ -821,25 +797,25 @@ exports[`toggleGroup > renders correctly with helper content 1`] = ` transition: all 300ms; } -.emotion-4:focus-within, -.emotion-4:focus { +.emotion-2:focus-within, +.emotion-2:focus { box-shadow: 0px 0px 0px 3px #151a2d5c; } -.emotion-4[data-disabled="false"]:active:after { +.emotion-2[data-disabled="false"]:active:after { width: calc(1rem * 1.3775); } -.emotion-4:has(:checked) { +.emotion-2:has(:checked) { color: #222638; background-color: #8c40ef; } -.emotion-4:has(:checked):hover { +.emotion-2:has(:checked):hover { background-color: #792dd4; } -.emotion-4:has(:checked):after { +.emotion-2:has(:checked):after { left: calc(100% - 5px); -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); @@ -847,41 +823,41 @@ exports[`toggleGroup > renders correctly with helper content 1`] = ` transform: translateX(-100%); } -.emotion-4:has(:checked):focus-within, -.emotion-4:has(:checked):focus { +.emotion-2:has(:checked):focus-within, +.emotion-2:has(:checked):focus { box-shadow: 0px 0px 0px 3px #8c40ef40; } -.emotion-4[data-disabled="true"] { +.emotion-2[data-disabled="true"] { background: #f3f3f4; } -.emotion-4[data-disabled="true"]:has(:checked) { +.emotion-2[data-disabled="true"]:has(:checked) { background: #e5dbfd; } -.emotion-4[data-error="true"] { +.emotion-2[data-error="true"] { background-color: #ffebf2; } -.emotion-4[data-error="true"]:focus-within, -.emotion-4[data-error="true"]:focus { +.emotion-2[data-error="true"]:focus-within, +.emotion-2[data-error="true"]:focus { box-shadow: 0px 0px 0px 3px #f91b6c40; } -.emotion-4[data-error="true"]:has(:checked) { +.emotion-2[data-error="true"]:has(:checked) { background-color: #e51963; } -.emotion-4[data-error="true"][data-disabled="true"] { +.emotion-2[data-error="true"][data-disabled="true"] { background-color: #fff3f7; } -.emotion-4[data-error="true"][data-disabled="true"]:has(:checked) { +.emotion-2[data-error="true"][data-disabled="true"]:has(:checked) { background-color: #ffd3e3; } -.emotion-6 { +.emotion-4 { position: absolute; opacity: 0; top: 0; @@ -891,7 +867,7 @@ exports[`toggleGroup > renders correctly with helper content 1`] = ` cursor: pointer; } -.emotion-6[disabled] { +.emotion-4[disabled] { cursor: not-allowed; } @@ -902,7 +878,7 @@ exports[`toggleGroup > renders correctly with helper content 1`] = ` class="styles__toi52u0 styles_alignItems_normal_xxsmall__toi52u31 styles_flexDirection_column_xxsmall__toi52u2d styles_flexWrap_nowrap_xxsmall__toi52u7d styles_gap_0.5rem_xxsmall__toi52u7 styles_justifyContent_normal_xxsmall__toi52u5d" >
renders correctly with helper content 1`] = ` >
renders correctly with helper content 1`] = `
renders correctly with helper content 1`] = ` exports[`toggleGroup > renders correctly with required prop 1`] = ` .emotion-0 { - border: none; - padding: 0; - margin: 0; -} - -.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -1025,16 +995,16 @@ exports[`toggleGroup > renders correctly with required prop 1`] = ` flex-direction: row-reverse; } -.emotion-2:active .emotion-5[data-disabled='false']:after { +.emotion-0:active .emotion-3[data-disabled='false']:after { width: calc(1rem * 1.3775); } -.emotion-2[aria-disabled="true"] { +.emotion-0[aria-disabled="true"] { cursor: not-allowed; color: #b5b7bd; } -.emotion-4 { +.emotion-2 { box-sizing: content-box; outline: none; overflow: hidden; @@ -1056,11 +1026,11 @@ exports[`toggleGroup > renders correctly with required prop 1`] = ` height: 1.5rem; } -.emotion-4:hover { +.emotion-2:hover { background-color: #d9dadd; } -.emotion-4:after { +.emotion-2:after { content: ""; position: absolute; top: calc(1.5rem / 2 - 1rem / 2); @@ -1073,25 +1043,25 @@ exports[`toggleGroup > renders correctly with required prop 1`] = ` transition: all 300ms; } -.emotion-4:focus-within, -.emotion-4:focus { +.emotion-2:focus-within, +.emotion-2:focus { box-shadow: 0px 0px 0px 3px #151a2d5c; } -.emotion-4[data-disabled="false"]:active:after { +.emotion-2[data-disabled="false"]:active:after { width: calc(1rem * 1.3775); } -.emotion-4:has(:checked) { +.emotion-2:has(:checked) { color: #222638; background-color: #8c40ef; } -.emotion-4:has(:checked):hover { +.emotion-2:has(:checked):hover { background-color: #792dd4; } -.emotion-4:has(:checked):after { +.emotion-2:has(:checked):after { left: calc(100% - 5px); -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); @@ -1099,41 +1069,41 @@ exports[`toggleGroup > renders correctly with required prop 1`] = ` transform: translateX(-100%); } -.emotion-4:has(:checked):focus-within, -.emotion-4:has(:checked):focus { +.emotion-2:has(:checked):focus-within, +.emotion-2:has(:checked):focus { box-shadow: 0px 0px 0px 3px #8c40ef40; } -.emotion-4[data-disabled="true"] { +.emotion-2[data-disabled="true"] { background: #f3f3f4; } -.emotion-4[data-disabled="true"]:has(:checked) { +.emotion-2[data-disabled="true"]:has(:checked) { background: #e5dbfd; } -.emotion-4[data-error="true"] { +.emotion-2[data-error="true"] { background-color: #ffebf2; } -.emotion-4[data-error="true"]:focus-within, -.emotion-4[data-error="true"]:focus { +.emotion-2[data-error="true"]:focus-within, +.emotion-2[data-error="true"]:focus { box-shadow: 0px 0px 0px 3px #f91b6c40; } -.emotion-4[data-error="true"]:has(:checked) { +.emotion-2[data-error="true"]:has(:checked) { background-color: #e51963; } -.emotion-4[data-error="true"][data-disabled="true"] { +.emotion-2[data-error="true"][data-disabled="true"] { background-color: #fff3f7; } -.emotion-4[data-error="true"][data-disabled="true"]:has(:checked) { +.emotion-2[data-error="true"][data-disabled="true"]:has(:checked) { background-color: #ffd3e3; } -.emotion-6 { +.emotion-4 { position: absolute; opacity: 0; top: 0; @@ -1143,7 +1113,7 @@ exports[`toggleGroup > renders correctly with required prop 1`] = ` cursor: pointer; } -.emotion-6[disabled] { +.emotion-4[disabled] { cursor: not-allowed; } @@ -1154,7 +1124,7 @@ exports[`toggleGroup > renders correctly with required prop 1`] = ` class="styles__toi52u0 styles_alignItems_normal_xxsmall__toi52u31 styles_flexDirection_column_xxsmall__toi52u2d styles_flexWrap_nowrap_xxsmall__toi52u7d styles_gap_0.5rem_xxsmall__toi52u7 styles_justifyContent_normal_xxsmall__toi52u5d" >
renders correctly with required prop 1`] = ` >
renders correctly with required prop 1`] = `
-
+
{legend || description ? ( @@ -142,7 +136,7 @@ export const ToggleGroup = ({ {children} -
+
{helper ? ( {helper} diff --git a/packages/ui/src/components/ToggleGroup/styles.css.ts b/packages/ui/src/components/ToggleGroup/styles.css.ts new file mode 100644 index 0000000000..ac49c1e34a --- /dev/null +++ b/packages/ui/src/components/ToggleGroup/styles.css.ts @@ -0,0 +1,7 @@ +import { style } from '@vanilla-extract/css' + +export const fieldset = style({ + border: 'none', + padding: 0, + margin: 0, +})