@charcoal-ui/react 3.4.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/components/Button/index.d.ts.map +1 -1
  2. package/dist/components/Checkbox/index.d.ts.map +1 -1
  3. package/dist/components/Checkbox/index.story.d.ts +1 -0
  4. package/dist/components/Checkbox/index.story.d.ts.map +1 -1
  5. package/dist/components/DropdownSelector/DropdownMenuItem.d.ts.map +1 -1
  6. package/dist/components/DropdownSelector/ListItem/index.d.ts.map +1 -1
  7. package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
  8. package/dist/components/DropdownSelector/index.d.ts.map +1 -1
  9. package/dist/components/FieldLabel/index.d.ts.map +1 -1
  10. package/dist/components/IconButton/index.d.ts.map +1 -1
  11. package/dist/components/LoadingSpinner/index.d.ts.map +1 -1
  12. package/dist/components/Modal/ModalPlumbing.d.ts.map +1 -1
  13. package/dist/components/Modal/index.d.ts.map +1 -1
  14. package/dist/components/Modal/index.story.d.ts +1 -0
  15. package/dist/components/Modal/index.story.d.ts.map +1 -1
  16. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  17. package/dist/components/MultiSelect/index.story.d.ts +2 -0
  18. package/dist/components/MultiSelect/index.story.d.ts.map +1 -1
  19. package/dist/components/Radio/index.d.ts.map +1 -1
  20. package/dist/components/SegmentedControl/index.d.ts.map +1 -1
  21. package/dist/components/Switch/index.d.ts.map +1 -1
  22. package/dist/components/TagItem/index.d.ts.map +1 -1
  23. package/dist/components/TextArea/index.d.ts.map +1 -1
  24. package/dist/components/TextField/TextField.story.d.ts.map +1 -1
  25. package/dist/components/TextField/index.d.ts +4 -0
  26. package/dist/components/TextField/index.d.ts.map +1 -1
  27. package/dist/components/TextField/useFocusWithClick.d.ts +3 -0
  28. package/dist/components/TextField/useFocusWithClick.d.ts.map +1 -0
  29. package/dist/index.cjs.js +935 -494
  30. package/dist/index.cjs.js.map +1 -1
  31. package/dist/index.esm.js +863 -422
  32. package/dist/index.esm.js.map +1 -1
  33. package/dist/styled.d.ts +4 -4
  34. package/package.json +9 -9
  35. package/src/components/Button/__snapshots__/index.story.storyshot +312 -592
  36. package/src/components/Button/index.tsx +50 -14
  37. package/src/components/Checkbox/__snapshots__/index.story.storyshot +209 -40
  38. package/src/components/Checkbox/__snapshots__/snapshot.test.tsx.snap +410 -80
  39. package/src/components/Checkbox/index.story.tsx +24 -0
  40. package/src/components/Checkbox/index.tsx +47 -17
  41. package/src/components/Clickable/__snapshots__/index.story.storyshot +4 -0
  42. package/src/components/Clickable/index.tsx +1 -0
  43. package/src/components/DropdownSelector/DropdownMenuItem.tsx +19 -3
  44. package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +3 -10
  45. package/src/components/DropdownSelector/ListItem/index.tsx +6 -4
  46. package/src/components/DropdownSelector/MenuItemGroup/index.tsx +1 -1
  47. package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +4 -13
  48. package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +20 -37
  49. package/src/components/DropdownSelector/Popover/index.tsx +5 -8
  50. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +60 -191
  51. package/src/components/DropdownSelector/index.tsx +70 -20
  52. package/src/components/FieldLabel/index.tsx +77 -12
  53. package/src/components/IconButton/__snapshots__/index.story.storyshot +30 -54
  54. package/src/components/IconButton/index.tsx +51 -26
  55. package/src/components/LoadingSpinner/index.tsx +3 -6
  56. package/src/components/Modal/Dialog/index.tsx +1 -1
  57. package/src/components/Modal/ModalPlumbing.tsx +26 -5
  58. package/src/components/Modal/__snapshots__/index.story.storyshot +2454 -108
  59. package/src/components/Modal/index.story.tsx +27 -0
  60. package/src/components/Modal/index.tsx +19 -4
  61. package/src/components/MultiSelect/__snapshots__/index.story.storyshot +528 -25
  62. package/src/components/MultiSelect/index.story.tsx +60 -0
  63. package/src/components/MultiSelect/index.tsx +82 -22
  64. package/src/components/Radio/__snapshots__/index.story.storyshot +32 -49
  65. package/src/components/Radio/index.tsx +71 -23
  66. package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +18 -19
  67. package/src/components/SegmentedControl/index.tsx +35 -15
  68. package/src/components/Switch/__snapshots__/index.story.storyshot +6 -18
  69. package/src/components/Switch/index.tsx +10 -15
  70. package/src/components/TagItem/__snapshots__/index.story.storyshot +39 -158
  71. package/src/components/TagItem/index.tsx +84 -19
  72. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +126 -321
  73. package/src/components/TextArea/index.tsx +38 -43
  74. package/src/components/TextField/TextField.story.tsx +35 -19
  75. package/src/components/TextField/__snapshots__/TextField.story.storyshot +309 -563
  76. package/src/components/TextField/index.tsx +85 -84
  77. package/src/components/TextField/useFocusWithClick.tsx +22 -0
@@ -9,12 +9,6 @@ exports[`Storyshots DropdownSelector Basic 1`] = `
9
9
  .c0:disabled,
10
10
  .c0[aria-disabled]:not([aria-disabled=false]) {
11
11
  cursor: default;
12
- }
13
-
14
- .c0:disabled:disabled,
15
- .c0[aria-disabled]:not([aria-disabled=false]):disabled,
16
- .c0:disabled[aria-disabled]:not([aria-disabled=false]),
17
- .c0[aria-disabled]:not([aria-disabled=false])[aria-disabled]:not([aria-disabled=false]) {
18
12
  opacity: 0.32;
19
13
  }
20
14
 
@@ -50,22 +44,11 @@ exports[`Storyshots DropdownSelector Basic 1`] = `
50
44
  }
51
45
 
52
46
  .c1:not(:disabled):not([aria-disabled]):focus,
53
- .c1[aria-disabled=false]:focus,
47
+ .c1[aria-disabled='false']:focus,
54
48
  .c1:not(:disabled):not([aria-disabled]):active,
55
- .c1[aria-disabled=false]:active {
56
- outline: none;
57
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
58
- }
59
-
60
- .c1:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
61
- .c1[aria-disabled=false]:focus:not(:focus-visible),
62
- .c1:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
63
- .c1[aria-disabled=false]:active:not(:focus-visible) {
64
- outline: none;
65
- }
66
-
49
+ .c1[aria-disabled='false']:active,
67
50
  .c1:not(:disabled):not([aria-disabled]):focus-visible,
68
- .c1[aria-disabled=false]:focus-visible {
51
+ .c1[aria-disabled='false']:focus-visible {
69
52
  outline: none;
70
53
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
71
54
  }
@@ -140,12 +123,6 @@ exports[`Storyshots DropdownSelector Custom Children 1`] = `
140
123
  .c0:disabled,
141
124
  .c0[aria-disabled]:not([aria-disabled=false]) {
142
125
  cursor: default;
143
- }
144
-
145
- .c0:disabled:disabled,
146
- .c0[aria-disabled]:not([aria-disabled=false]):disabled,
147
- .c0:disabled[aria-disabled]:not([aria-disabled=false]),
148
- .c0[aria-disabled]:not([aria-disabled=false])[aria-disabled]:not([aria-disabled=false]) {
149
126
  opacity: 0.32;
150
127
  }
151
128
 
@@ -181,22 +158,11 @@ exports[`Storyshots DropdownSelector Custom Children 1`] = `
181
158
  }
182
159
 
183
160
  .c1:not(:disabled):not([aria-disabled]):focus,
184
- .c1[aria-disabled=false]:focus,
161
+ .c1[aria-disabled='false']:focus,
185
162
  .c1:not(:disabled):not([aria-disabled]):active,
186
- .c1[aria-disabled=false]:active {
187
- outline: none;
188
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
189
- }
190
-
191
- .c1:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
192
- .c1[aria-disabled=false]:focus:not(:focus-visible),
193
- .c1:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
194
- .c1[aria-disabled=false]:active:not(:focus-visible) {
195
- outline: none;
196
- }
197
-
163
+ .c1[aria-disabled='false']:active,
198
164
  .c1:not(:disabled):not([aria-disabled]):focus-visible,
199
- .c1[aria-disabled=false]:focus-visible {
165
+ .c1[aria-disabled='false']:focus-visible {
200
166
  outline: none;
201
167
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
202
168
  }
@@ -280,12 +246,6 @@ exports[`Storyshots DropdownSelector In Form Tag 1`] = `
280
246
  .c0:disabled,
281
247
  .c0[aria-disabled]:not([aria-disabled=false]) {
282
248
  cursor: default;
283
- }
284
-
285
- .c0:disabled:disabled,
286
- .c0[aria-disabled]:not([aria-disabled=false]):disabled,
287
- .c0:disabled[aria-disabled]:not([aria-disabled=false]),
288
- .c0[aria-disabled]:not([aria-disabled=false])[aria-disabled]:not([aria-disabled=false]) {
289
249
  opacity: 0.32;
290
250
  }
291
251
 
@@ -321,22 +281,11 @@ exports[`Storyshots DropdownSelector In Form Tag 1`] = `
321
281
  }
322
282
 
323
283
  .c1:not(:disabled):not([aria-disabled]):focus,
324
- .c1[aria-disabled=false]:focus,
284
+ .c1[aria-disabled='false']:focus,
325
285
  .c1:not(:disabled):not([aria-disabled]):active,
326
- .c1[aria-disabled=false]:active {
327
- outline: none;
328
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
329
- }
330
-
331
- .c1:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
332
- .c1[aria-disabled=false]:focus:not(:focus-visible),
333
- .c1:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
334
- .c1[aria-disabled=false]:active:not(:focus-visible) {
335
- outline: none;
336
- }
337
-
286
+ .c1[aria-disabled='false']:active,
338
287
  .c1:not(:disabled):not([aria-disabled]):focus-visible,
339
- .c1[aria-disabled=false]:focus-visible {
288
+ .c1[aria-disabled='false']:focus-visible {
340
289
  outline: none;
341
290
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
342
291
  }
@@ -417,6 +366,8 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
417
366
  -ms-letter-spacing: inherit;
418
367
  letter-spacing: inherit;
419
368
  word-spacing: inherit;
369
+ -webkit-text-decoration: none;
370
+ text-decoration: none;
420
371
  font: inherit;
421
372
  margin: 0;
422
373
  overflow: visible;
@@ -445,12 +396,6 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
445
396
  .c7:disabled,
446
397
  .c7[aria-disabled]:not([aria-disabled=false]) {
447
398
  cursor: default;
448
- }
449
-
450
- .c7:disabled:disabled,
451
- .c7[aria-disabled]:not([aria-disabled=false]):disabled,
452
- .c7:disabled[aria-disabled]:not([aria-disabled=false]),
453
- .c7[aria-disabled]:not([aria-disabled=false])[aria-disabled]:not([aria-disabled=false]) {
454
399
  opacity: 0.32;
455
400
  }
456
401
 
@@ -486,22 +431,11 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
486
431
  }
487
432
 
488
433
  .c8:not(:disabled):not([aria-disabled]):focus,
489
- .c8[aria-disabled=false]:focus,
434
+ .c8[aria-disabled='false']:focus,
490
435
  .c8:not(:disabled):not([aria-disabled]):active,
491
- .c8[aria-disabled=false]:active {
492
- outline: none;
493
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
494
- }
495
-
496
- .c8:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
497
- .c8[aria-disabled=false]:focus:not(:focus-visible),
498
- .c8:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
499
- .c8[aria-disabled=false]:active:not(:focus-visible) {
500
- outline: none;
501
- }
502
-
436
+ .c8[aria-disabled='false']:active,
503
437
  .c8:not(:disabled):not([aria-disabled]):focus-visible,
504
- .c8[aria-disabled=false]:focus-visible {
438
+ .c8[aria-disabled='false']:focus-visible {
505
439
  outline: none;
506
440
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
507
441
  }
@@ -560,40 +494,29 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
560
494
  transition: 0.2s background-color,0.2s box-shadow;
561
495
  }
562
496
 
563
- .c12:hover:not(:disabled):not([aria-disabled]),
564
- .c12:hover[aria-disabled=false] {
565
- background-color: var(--charcoal-transparent-hover);
497
+ .c12:not(:disabled):not([aria-disabled]):hover,
498
+ .c12[aria-disabled='false']:hover {
499
+ background-color: var( --charcoal-transparent-hover );
566
500
  }
567
501
 
568
- .c12:active:not(:disabled):not([aria-disabled]),
569
- .c12:active[aria-disabled=false] {
570
- background-color: var(--charcoal-transparent-press);
571
- }
572
-
573
- .c12:disabled,
574
- .c12[aria-disabled]:not([aria-disabled=false]) {
575
- opacity: 0.32;
502
+ .c12:not(:disabled):not([aria-disabled]):active,
503
+ .c12[aria-disabled='false']:active {
504
+ background-color: var( --charcoal-transparent-press );
576
505
  }
577
506
 
578
507
  .c12:not(:disabled):not([aria-disabled]):focus,
579
- .c12[aria-disabled=false]:focus,
508
+ .c12[aria-disabled='false']:focus,
580
509
  .c12:not(:disabled):not([aria-disabled]):active,
581
- .c12[aria-disabled=false]:active {
510
+ .c12[aria-disabled='false']:active,
511
+ .c12:not(:disabled):not([aria-disabled]):focus-visible,
512
+ .c12[aria-disabled='false']:focus-visible {
582
513
  outline: none;
583
514
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
584
515
  }
585
516
 
586
- .c12:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
587
- .c12[aria-disabled=false]:focus:not(:focus-visible),
588
- .c12:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
589
- .c12[aria-disabled=false]:active:not(:focus-visible) {
590
- outline: none;
591
- }
592
-
593
- .c12:not(:disabled):not([aria-disabled]):focus-visible,
594
- .c12[aria-disabled=false]:focus-visible {
595
- outline: none;
596
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
517
+ .c12:disabled,
518
+ .c12[aria-disabled]:not([aria-disabled='false']) {
519
+ opacity: 0.32;
597
520
  }
598
521
 
599
522
  .c1 {
@@ -603,7 +526,7 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
603
526
  height: -moz-fit-content;
604
527
  height: fit-content;
605
528
  width: 440px;
606
- background-color: #ffffff;
529
+ background-color: var(--charcoal-surface1);
607
530
  border-radius: 24px;
608
531
  }
609
532
 
@@ -630,7 +553,7 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
630
553
  justify-content: center;
631
554
  padding: 40px 0;
632
555
  box-sizing: border-box;
633
- background-color: rgba(0,0,0,0.32);
556
+ background-color: var(--charcoal-surface4);
634
557
  }
635
558
 
636
559
  .c13 {
@@ -642,13 +565,13 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
642
565
  transition: 0.2s color;
643
566
  }
644
567
 
645
- .c13:hover:not(:disabled):not([aria-disabled]),
646
- .c13:hover[aria-disabled=false] {
568
+ .c13:not(:disabled):not([aria-disabled]):hover,
569
+ .c13[aria-disabled='false']:hover {
647
570
  color: var(--charcoal-text3-hover);
648
571
  }
649
572
 
650
- .c13:active:not(:disabled):not([aria-disabled]),
651
- .c13:active[aria-disabled=false] {
573
+ .c13:not(:disabled):not([aria-disabled]):active,
574
+ .c13[aria-disabled='false']:active {
652
575
  color: var(--charcoal-text3-press);
653
576
  }
654
577
 
@@ -844,11 +767,8 @@ exports[`Storyshots DropdownSelector In Modal 1`] = `
844
767
  </div>
845
768
  </div>
846
769
  <button
847
- className="c11 c12 c13 sc-hiCibw c13"
848
- height={32}
770
+ className="c11 c12 c13"
849
771
  onClick={[Function]}
850
- size="S"
851
- width={32}
852
772
  >
853
773
  <pixiv-icon
854
774
  name="24/Close"
@@ -877,6 +797,8 @@ exports[`Storyshots DropdownSelector Playground 1`] = `
877
797
  -ms-letter-spacing: inherit;
878
798
  letter-spacing: inherit;
879
799
  word-spacing: inherit;
800
+ -webkit-text-decoration: none;
801
+ text-decoration: none;
880
802
  font: inherit;
881
803
  margin: 0;
882
804
  overflow: visible;
@@ -916,65 +838,46 @@ exports[`Storyshots DropdownSelector Playground 1`] = `
916
838
  -ms-user-select: none;
917
839
  user-select: none;
918
840
  white-space: nowrap;
919
- color: var(--charcoal-text2);
920
- background-color: var(--charcoal-surface3);
841
+ border-radius: 999999px;
921
842
  font-size: 14px;
922
843
  line-height: 22px;
923
844
  font-weight: bold;
924
845
  padding-right: 24px;
925
846
  padding-left: 24px;
926
- border-radius: 999999px;
847
+ color: var(--charcoal-text2);
848
+ background-color: var(--charcoal-surface3);
927
849
  -webkit-transition: 0.2s color,0.2s background-color,0.2s box-shadow;
928
850
  transition: 0.2s color,0.2s background-color,0.2s box-shadow;
929
851
  height: 40px;
930
852
  }
931
853
 
932
- .c1:hover:not(:disabled):not([aria-disabled]),
933
- .c1:hover[aria-disabled=false] {
934
- color: var(--charcoal-text2-hover);
935
- }
936
-
937
- .c1:active:not(:disabled):not([aria-disabled]),
938
- .c1:active[aria-disabled=false] {
939
- color: var(--charcoal-text2-press);
854
+ .c1:not(:disabled):not([aria-disabled]):active,
855
+ .c1[aria-disabled='false']:active,
856
+ .c1:not(:disabled):not([aria-disabled]):focus,
857
+ .c1[aria-disabled='false']:focus,
858
+ .c1:not(:disabled):not([aria-disabled]):focus-visible,
859
+ .c1[aria-disabled='false']:focus-visible {
860
+ outline: none;
861
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
940
862
  }
941
863
 
942
- .c1:hover:not(:disabled):not([aria-disabled]),
943
- .c1:hover[aria-disabled=false] {
864
+ .c1:not(:disabled):not([aria-disabled]):hover,
865
+ .c1[aria-disabled='false']:hover {
866
+ color: var(--charcoal-text2-hover);
944
867
  background-color: var(--charcoal-surface3-hover);
945
868
  }
946
869
 
947
- .c1:active:not(:disabled):not([aria-disabled]),
948
- .c1:active[aria-disabled=false] {
870
+ .c1:not(:disabled):not([aria-disabled]):active,
871
+ .c1[aria-disabled='false']:active {
872
+ color: var(--charcoal-text2-press);
949
873
  background-color: var(--charcoal-surface3-press);
950
874
  }
951
875
 
952
876
  .c1:disabled,
953
- .c1[aria-disabled]:not([aria-disabled=false]) {
877
+ .c1[aria-disabled]:not([aria-disabled='false']) {
954
878
  opacity: 0.32;
955
879
  }
956
880
 
957
- .c1:not(:disabled):not([aria-disabled]):focus,
958
- .c1[aria-disabled=false]:focus,
959
- .c1:not(:disabled):not([aria-disabled]):active,
960
- .c1[aria-disabled=false]:active {
961
- outline: none;
962
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
963
- }
964
-
965
- .c1:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
966
- .c1[aria-disabled=false]:focus:not(:focus-visible),
967
- .c1:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
968
- .c1[aria-disabled=false]:active:not(:focus-visible) {
969
- outline: none;
970
- }
971
-
972
- .c1:not(:disabled):not([aria-disabled]):focus-visible,
973
- .c1[aria-disabled=false]:focus-visible {
974
- outline: none;
975
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
976
- }
977
-
978
881
  .c2 {
979
882
  display: inline-block;
980
883
  width: 100%;
@@ -983,12 +886,6 @@ exports[`Storyshots DropdownSelector Playground 1`] = `
983
886
  .c2:disabled,
984
887
  .c2[aria-disabled]:not([aria-disabled=false]) {
985
888
  cursor: default;
986
- }
987
-
988
- .c2:disabled:disabled,
989
- .c2[aria-disabled]:not([aria-disabled=false]):disabled,
990
- .c2:disabled[aria-disabled]:not([aria-disabled=false]),
991
- .c2[aria-disabled]:not([aria-disabled=false])[aria-disabled]:not([aria-disabled=false]) {
992
889
  opacity: 0.32;
993
890
  }
994
891
 
@@ -1024,22 +921,11 @@ exports[`Storyshots DropdownSelector Playground 1`] = `
1024
921
  }
1025
922
 
1026
923
  .c3:not(:disabled):not([aria-disabled]):focus,
1027
- .c3[aria-disabled=false]:focus,
924
+ .c3[aria-disabled='false']:focus,
1028
925
  .c3:not(:disabled):not([aria-disabled]):active,
1029
- .c3[aria-disabled=false]:active {
1030
- outline: none;
1031
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1032
- }
1033
-
1034
- .c3:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1035
- .c3[aria-disabled=false]:focus:not(:focus-visible),
1036
- .c3:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
1037
- .c3[aria-disabled=false]:active:not(:focus-visible) {
1038
- outline: none;
1039
- }
1040
-
926
+ .c3[aria-disabled='false']:active,
1041
927
  .c3:not(:disabled):not([aria-disabled]):focus-visible,
1042
- .c3[aria-disabled=false]:focus-visible {
928
+ .c3[aria-disabled='false']:focus-visible {
1043
929
  outline: none;
1044
930
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1045
931
  }
@@ -1118,12 +1004,6 @@ exports[`Storyshots DropdownSelector Section List 1`] = `
1118
1004
  .c0:disabled,
1119
1005
  .c0[aria-disabled]:not([aria-disabled=false]) {
1120
1006
  cursor: default;
1121
- }
1122
-
1123
- .c0:disabled:disabled,
1124
- .c0[aria-disabled]:not([aria-disabled=false]):disabled,
1125
- .c0:disabled[aria-disabled]:not([aria-disabled=false]),
1126
- .c0[aria-disabled]:not([aria-disabled=false])[aria-disabled]:not([aria-disabled=false]) {
1127
1007
  opacity: 0.32;
1128
1008
  }
1129
1009
 
@@ -1159,22 +1039,11 @@ exports[`Storyshots DropdownSelector Section List 1`] = `
1159
1039
  }
1160
1040
 
1161
1041
  .c1:not(:disabled):not([aria-disabled]):focus,
1162
- .c1[aria-disabled=false]:focus,
1042
+ .c1[aria-disabled='false']:focus,
1163
1043
  .c1:not(:disabled):not([aria-disabled]):active,
1164
- .c1[aria-disabled=false]:active {
1165
- outline: none;
1166
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1167
- }
1168
-
1169
- .c1:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1170
- .c1[aria-disabled=false]:focus:not(:focus-visible),
1171
- .c1:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
1172
- .c1[aria-disabled=false]:active:not(:focus-visible) {
1173
- outline: none;
1174
- }
1175
-
1044
+ .c1[aria-disabled='false']:active,
1176
1045
  .c1:not(:disabled):not([aria-disabled]):focus-visible,
1177
- .c1[aria-disabled=false]:focus-visible {
1046
+ .c1[aria-disabled='false']:focus-visible {
1178
1047
  outline: none;
1179
1048
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1180
1049
  }
@@ -1,9 +1,8 @@
1
1
  import { ReactNode, useState, useRef } from 'react'
2
- import styled from 'styled-components'
2
+ import styled, { css } from 'styled-components'
3
3
  import { disabledSelector } from '@charcoal-ui/utils'
4
4
  import Icon from '../Icon'
5
5
  import FieldLabel from '../FieldLabel'
6
- import { theme } from '../../styled'
7
6
  import { DropdownPopover } from './DropdownPopover'
8
7
  import { findPreviewRecursive } from './utils/findPreviewRecursive'
9
8
  import MenuList, { MenuListChildren } from './MenuList'
@@ -90,14 +89,13 @@ const DropdownSelectorRoot = styled.div`
90
89
 
91
90
  ${disabledSelector} {
92
91
  cursor: default;
93
- ${theme((o) => o.disabled)}
92
+ opacity: 0.32;
94
93
  }
95
94
  `
96
95
 
97
96
  const DropdownFieldLabel = styled(FieldLabel)`
98
97
  width: 100%;
99
-
100
- ${theme((o) => o.margin.bottom(8))}
98
+ margin-bottom: 8px;
101
99
  `
102
100
 
103
101
  const DropdownButton = styled.button<{ invalid?: boolean }>`
@@ -115,31 +113,83 @@ const DropdownButton = styled.button<{ invalid?: boolean }>`
115
113
  cursor: default;
116
114
  }
117
115
 
116
+ padding-right: 8px;
117
+ padding-left: 8px;
118
+ background-color: var(--charcoal-surface3);
119
+ border-radius: 4px;
120
+
121
+ transition: 0.2s box-shadow;
122
+
123
+ &:not(:disabled):not([aria-disabled]),
124
+ &[aria-disabled='false'] {
125
+ &:focus,
126
+ &:active,
127
+ &:focus-visible {
128
+ outline: none;
129
+ box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
130
+ }
131
+ }
132
+
118
133
  ${({ invalid }) =>
119
- theme((o) => [
120
- o.padding.horizontal(8),
121
- o.outline.default.focus,
122
- o.bg.surface3,
123
- o.borderRadius(4),
124
- invalid === true && o.outline.assertive,
125
- ])}
134
+ invalid === true &&
135
+ css`
136
+ &:not(:disabled):not([aria-disabled]),
137
+ &[aria-disabled='false'] {
138
+ box-shadow: 0 0 0 4px rgba(255, 43, 0, 0.32);
139
+ }
140
+ `}
126
141
  `
127
142
 
128
143
  const DropdownButtonText = styled.span`
129
144
  text-align: left;
130
-
131
- ${theme((o) => [o.typography(14), o.font.text2])}
145
+ font-size: 14px;
146
+ line-height: 22px;
147
+ display: flow-root;
148
+ color: var(--charcoal-text2);
149
+ &::before {
150
+ display: block;
151
+ width: 0;
152
+ height: 0;
153
+ content: '';
154
+ margin-top: -4px;
155
+ }
156
+ &::after {
157
+ display: block;
158
+ width: 0;
159
+ height: 0;
160
+ content: '';
161
+ margin-bottom: -4px;
162
+ }
132
163
  `
133
164
 
134
165
  const DropdownButtonIcon = styled(Icon)`
135
- ${theme((o) => [o.font.text2])}
166
+ color: var(--charcoal-text2);
136
167
  `
137
168
 
138
169
  const AssertiveText = styled.div<{ invalid?: boolean }>`
170
+ margin-top: 8px;
171
+ font-size: 14px;
172
+ color: var(--charcoal-text2);
173
+ line-height: 22px;
174
+ display: flow-root;
175
+ &::before {
176
+ display: block;
177
+ width: 0;
178
+ height: 0;
179
+ content: '';
180
+ margin-top: -4px;
181
+ }
182
+ &::after {
183
+ display: block;
184
+ width: 0;
185
+ height: 0;
186
+ content: '';
187
+ margin-bottom: -4px;
188
+ }
189
+
139
190
  ${({ invalid }) =>
140
- theme((o) => [
141
- o.typography(14),
142
- o.margin.top(8),
143
- invalid === true ? o.font.assertive : o.font.text2,
144
- ])}
191
+ invalid === true &&
192
+ css`
193
+ color: var(--charcoal-assertive);
194
+ `}
145
195
  `
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react'
2
2
  import styled from 'styled-components'
3
- import { createTheme } from '@charcoal-ui/styled'
4
3
 
5
4
  export interface FieldLabelProps
6
5
  extends React.LabelHTMLAttributes<HTMLLabelElement> {
@@ -41,22 +40,88 @@ const FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(
41
40
 
42
41
  export default FieldLabel
43
42
 
44
- const theme = createTheme(styled)
45
-
46
43
  const Label = styled.label`
47
- ${theme((o) => [o.typography(14).bold, o.font.text1])}
44
+ font-size: 14px;
45
+ line-height: 22px;
46
+ font-weight: bold;
47
+ display: flow-root;
48
+ color: var(--charcoal-text1);
49
+
50
+ &::before {
51
+ display: block;
52
+ width: 0;
53
+ height: 0;
54
+ content: '';
55
+ margin-top: -4px;
56
+ }
57
+ &::after {
58
+ display: block;
59
+ width: 0;
60
+ height: 0;
61
+ content: '';
62
+ margin-bottom: -4px;
63
+ }
48
64
  `
49
65
 
50
66
  const RequiredText = styled.span`
51
- ${theme((o) => [o.typography(14), o.font.text2])}
67
+ font-size: 14px;
68
+ line-height: 22px;
69
+ display: flow-root;
70
+ color: var(--charcoal-text2);
71
+
72
+ &::before {
73
+ display: block;
74
+ width: 0;
75
+ height: 0;
76
+ content: '';
77
+ margin-top: -4px;
78
+ }
79
+ &::after {
80
+ display: block;
81
+ width: 0;
82
+ height: 0;
83
+ content: '';
84
+ margin-bottom: -4px;
85
+ }
52
86
  `
53
87
 
54
88
  const SubLabelClickable = styled.div`
55
- ${theme((o) => [
56
- o.typography(14),
57
- o.font.text3.hover.press,
58
- o.outline.default.focus,
59
- ])}
89
+ font-size: 14px;
90
+ line-height: 22px;
91
+ display: flow-root;
92
+ color: var(--charcoal-text3);
93
+ transition: 0.2s color, 0.2s box-shadow;
94
+
95
+ &::before {
96
+ display: block;
97
+ width: 0;
98
+ height: 0;
99
+ content: '';
100
+ margin-top: -4px;
101
+ }
102
+ &::after {
103
+ display: block;
104
+ width: 0;
105
+ height: 0;
106
+ content: '';
107
+ margin-bottom: -4px;
108
+ }
109
+
110
+ &:not(:disabled):not([aria-disabled]),
111
+ &[aria-disabled='false'] {
112
+ &:hover {
113
+ color: var(--charcoal-text3-hover);
114
+ }
115
+ &:active {
116
+ color: var(--charcoal-text3-press);
117
+ }
118
+ &:active,
119
+ &:focus,
120
+ &:focus-visible {
121
+ outline: none;
122
+ box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
123
+ }
124
+ }
60
125
  `
61
126
 
62
127
  const FieldLabelWrapper = styled.div`
@@ -64,10 +129,10 @@ const FieldLabelWrapper = styled.div`
64
129
  align-items: center;
65
130
 
66
131
  > ${RequiredText} {
67
- ${theme((o) => o.margin.left(4))}
132
+ margin-left: 4px;
68
133
  }
69
134
 
70
135
  > ${SubLabelClickable} {
71
- ${theme((o) => o.margin.left('auto'))}
136
+ margin-left: auto;
72
137
  }
73
138
  `