Skip to content

Commit 6c61d10

Browse files
committed
fix: classname checkbox (#5660)
1 parent 48d0e7e commit 6c61d10

File tree

14 files changed

+146
-141
lines changed

14 files changed

+146
-141
lines changed

.changeset/tangy-news-own.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ultraviolet/ui": patch
3+
---
4+
5+
`Checkbox`: fix classname

packages/form/src/components/CheckboxField/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports[`checkboxField > should render correctly 1`] = `
1111
>
1212
<div
1313
aria-disabled="false"
14-
class="uv_9pjq8o6 undefined"
14+
class="uv_9pjq8o6"
1515
data-checked="false"
1616
data-error="false"
1717
>
@@ -67,7 +67,7 @@ exports[`checkboxField > should render correctly checked without value 1`] = `
6767
>
6868
<div
6969
aria-disabled="false"
70-
class="uv_9pjq8o6 undefined"
70+
class="uv_9pjq8o6"
7171
data-checked="true"
7272
data-error="false"
7373
>
@@ -124,7 +124,7 @@ exports[`checkboxField > should render correctly disabled 1`] = `
124124
>
125125
<div
126126
aria-disabled="true"
127-
class="uv_9pjq8o6 undefined"
127+
class="uv_9pjq8o6"
128128
data-checked="false"
129129
data-error="false"
130130
>
@@ -181,7 +181,7 @@ exports[`checkboxField > should render correctly not checked without value 1`] =
181181
>
182182
<div
183183
aria-disabled="false"
184-
class="uv_9pjq8o6 undefined"
184+
class="uv_9pjq8o6"
185185
data-checked="false"
186186
data-error="false"
187187
>
@@ -237,7 +237,7 @@ exports[`checkboxField > should render correctly with aria-label 1`] = `
237237
>
238238
<div
239239
aria-disabled="false"
240-
class="uv_9pjq8o6 undefined"
240+
class="uv_9pjq8o6"
241241
data-checked="false"
242242
data-error="false"
243243
>
@@ -294,7 +294,7 @@ exports[`checkboxField > should render correctly with errors 1`] = `
294294
>
295295
<div
296296
aria-disabled="false"
297-
class="uv_9pjq8o6 undefined"
297+
class="uv_9pjq8o6"
298298
data-checked="false"
299299
data-error="true"
300300
>
@@ -375,7 +375,7 @@ exports[`checkboxField > should trigger events correctly 1`] = `
375375
>
376376
<div
377377
aria-disabled="false"
378-
class="uv_9pjq8o6 undefined"
378+
class="uv_9pjq8o6"
379379
data-checked="true"
380380
data-error="false"
381381
>

packages/form/src/components/CheckboxGroupField/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ exports[`checkboxField > should render correctly checked 1`] = `
3232
>
3333
<div
3434
aria-disabled="false"
35-
class="uv_9pjq8o6 uv_19cjf6j1"
35+
class="uv_19cjf6j1 uv_9pjq8o6"
3636
data-checked="false"
3737
data-error="false"
3838
>
@@ -91,7 +91,7 @@ exports[`checkboxField > should render correctly checked 1`] = `
9191
</div>
9292
<div
9393
aria-disabled="false"
94-
class="uv_9pjq8o6 uv_19cjf6j1"
94+
class="uv_19cjf6j1 uv_9pjq8o6"
9595
data-checked="true"
9696
data-error="false"
9797
>
@@ -198,7 +198,7 @@ exports[`checkboxField > should trigger events correctly with required prop 1`]
198198
>
199199
<div
200200
aria-disabled="false"
201-
class="uv_9pjq8o6 uv_19cjf6j1"
201+
class="uv_19cjf6j1 uv_9pjq8o6"
202202
data-checked="false"
203203
data-error="false"
204204
>
@@ -257,7 +257,7 @@ exports[`checkboxField > should trigger events correctly with required prop 1`]
257257
</div>
258258
<div
259259
aria-disabled="false"
260-
class="uv_9pjq8o6 uv_19cjf6j1"
260+
class="uv_19cjf6j1 uv_9pjq8o6"
261261
data-checked="false"
262262
data-error="false"
263263
>

packages/form/src/components/SelectableCardGroupField/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ exports[`selectableCardField > should render correctly checked as a checkbox 1`]
214214
>
215215
<div
216216
aria-disabled="false"
217-
class="uv_9pjq8o6 uv_475tndc"
217+
class="uv_475tndc uv_9pjq8o6"
218218
data-checked="true"
219219
data-error="false"
220220
>
@@ -435,7 +435,7 @@ exports[`selectableCardField > should trigger events correctly 1`] = `
435435
>
436436
<div
437437
aria-disabled="false"
438-
class="uv_9pjq8o6 uv_475tndc"
438+
class="uv_475tndc uv_9pjq8o6"
439439
data-checked="false"
440440
data-error="false"
441441
>
@@ -506,7 +506,7 @@ exports[`selectableCardField > should trigger events correctly 1`] = `
506506
>
507507
<div
508508
aria-disabled="false"
509-
class="uv_9pjq8o6 uv_475tndc"
509+
class="uv_475tndc uv_9pjq8o6"
510510
data-checked="false"
511511
data-error="false"
512512
>

packages/plus/src/components/OfferList/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7524,7 +7524,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
75247524
>
75257525
<div
75267526
aria-disabled="false"
7527-
class="uv_9pjq8o6 undefined"
7527+
class="uv_9pjq8o6"
75287528
data-checked="false"
75297529
data-error="false"
75307530
>
@@ -7597,7 +7597,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
75977597
>
75987598
<div
75997599
aria-disabled="false"
7600-
class="uv_9pjq8o6 undefined"
7600+
class="uv_9pjq8o6"
76017601
data-checked="true"
76027602
data-error="false"
76037603
>
@@ -7670,7 +7670,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
76707670
>
76717671
<div
76727672
aria-disabled="false"
7673-
class="uv_9pjq8o6 undefined"
7673+
class="uv_9pjq8o6"
76747674
data-checked="false"
76757675
data-error="false"
76767676
>
@@ -7743,7 +7743,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
77437743
>
77447744
<div
77457745
aria-disabled="false"
7746-
class="uv_9pjq8o6 undefined"
7746+
class="uv_9pjq8o6"
77477747
data-checked="false"
77487748
data-error="false"
77497749
>
@@ -7816,7 +7816,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
78167816
>
78177817
<div
78187818
aria-disabled="false"
7819-
class="uv_9pjq8o6 undefined"
7819+
class="uv_9pjq8o6"
78207820
data-checked="false"
78217821
data-error="false"
78227822
>
@@ -7890,7 +7890,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
78907890
>
78917891
<div
78927892
aria-disabled="false"
7893-
class="uv_9pjq8o6 undefined"
7893+
class="uv_9pjq8o6"
78947894
data-checked="false"
78957895
data-error="false"
78967896
>
@@ -7963,7 +7963,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
79637963
>
79647964
<div
79657965
aria-disabled="false"
7966-
class="uv_9pjq8o6 undefined"
7966+
class="uv_9pjq8o6"
79677967
data-checked="false"
79687968
data-error="false"
79697969
>
@@ -8036,7 +8036,7 @@ exports[`offerList > should work with selectable - checkbox 1`] = `
80368036
>
80378037
<div
80388038
aria-disabled="false"
8039-
class="uv_9pjq8o6 undefined"
8039+
class="uv_9pjq8o6"
80408040
data-checked="false"
80418041
data-error="false"
80428042
>

packages/ui/src/components/Checkbox/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`checkbox > renders correctly 1`] = `
77
>
88
<div
99
aria-disabled="false"
10-
class="styles__9pjq8o6 undefined"
10+
class="styles__9pjq8o6"
1111
data-checked="false"
1212
data-error="false"
1313
>
@@ -74,7 +74,7 @@ exports[`checkbox > renders correctly checked 1`] = `
7474
>
7575
<div
7676
aria-disabled="false"
77-
class="styles__9pjq8o6 undefined"
77+
class="styles__9pjq8o6"
7878
data-checked="true"
7979
data-error="false"
8080
>
@@ -141,7 +141,7 @@ exports[`checkbox > renders correctly checked and disabled 1`] = `
141141
>
142142
<div
143143
aria-disabled="true"
144-
class="styles__9pjq8o6 undefined"
144+
class="styles__9pjq8o6"
145145
data-checked="true"
146146
data-error="false"
147147
>
@@ -209,7 +209,7 @@ exports[`checkbox > renders correctly checked with helper 1`] = `
209209
>
210210
<div
211211
aria-disabled="false"
212-
class="styles__9pjq8o6 undefined"
212+
class="styles__9pjq8o6"
213213
data-checked="true"
214214
data-error="false"
215215
>
@@ -281,7 +281,7 @@ exports[`checkbox > renders correctly disabled 1`] = `
281281
>
282282
<div
283283
aria-disabled="true"
284-
class="styles__9pjq8o6 undefined"
284+
class="styles__9pjq8o6"
285285
data-checked="false"
286286
data-error="false"
287287
>
@@ -348,7 +348,7 @@ exports[`checkbox > renders correctly indeterminate 1`] = `
348348
>
349349
<div
350350
aria-disabled="false"
351-
class="styles__9pjq8o6 undefined"
351+
class="styles__9pjq8o6"
352352
data-checked="indeterminate"
353353
data-error="false"
354354
>
@@ -412,7 +412,7 @@ exports[`checkbox > renders correctly indeterminate and disabled 1`] = `
412412
>
413413
<div
414414
aria-disabled="true"
415-
class="styles__9pjq8o6 undefined"
415+
class="styles__9pjq8o6"
416416
data-checked="indeterminate"
417417
data-error="false"
418418
>
@@ -477,7 +477,7 @@ exports[`checkbox > renders correctly invisible 1`] = `
477477
>
478478
<div
479479
aria-disabled="false"
480-
class="styles__9pjq8o6 undefined"
480+
class="styles__9pjq8o6"
481481
data-checked="false"
482482
data-error="false"
483483
data-visibility="true"
@@ -544,7 +544,7 @@ exports[`checkbox > renders correctly no child 1`] = `
544544
>
545545
<div
546546
aria-disabled="false"
547-
class="styles__9pjq8o6 undefined"
547+
class="styles__9pjq8o6"
548548
data-checked="false"
549549
data-error="false"
550550
>
@@ -595,7 +595,7 @@ exports[`checkbox > renders correctly required 1`] = `
595595
>
596596
<div
597597
aria-disabled="false"
598-
class="styles__9pjq8o6 undefined"
598+
class="styles__9pjq8o6"
599599
data-checked="false"
600600
data-error="false"
601601
>
@@ -667,7 +667,7 @@ exports[`checkbox > renders correctly with a value 1`] = `
667667
>
668668
<div
669669
aria-disabled="false"
670-
class="styles__9pjq8o6 undefined"
670+
class="styles__9pjq8o6"
671671
data-checked="false"
672672
data-error="false"
673673
>
@@ -734,7 +734,7 @@ exports[`checkbox > renders correctly with an error 1`] = `
734734
>
735735
<div
736736
aria-disabled="false"
737-
class="styles__9pjq8o6 undefined"
737+
class="styles__9pjq8o6"
738738
data-checked="false"
739739
data-error="true"
740740
>
@@ -806,7 +806,7 @@ exports[`checkbox > renders correctly with indeterminate state 1`] = `
806806
>
807807
<div
808808
aria-disabled="false"
809-
class="styles__9pjq8o6 undefined"
809+
class="styles__9pjq8o6"
810810
data-checked="indeterminate"
811811
data-error="false"
812812
>
@@ -876,7 +876,7 @@ exports[`checkbox > renders correctly with tooltip 1`] = `
876876
>
877877
<div
878878
aria-disabled="false"
879-
class="styles__9pjq8o6 undefined"
879+
class="styles__9pjq8o6"
880880
data-checked="false"
881881
data-error="false"
882882
>

packages/ui/src/components/Checkbox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
106106
<Tooltip text={tooltip}>
107107
<div
108108
aria-disabled={disabled}
109-
className={`${checkboxContainer ? `${checkboxContainer} ` : ''}${className}`}
109+
className={`${className ? `${className} ` : ''}${checkboxContainer}`}
110110
data-checked={checked}
111111
data-error={!!error}
112112
data-testid={dataTestId}

0 commit comments

Comments
 (0)