@charcoal-ui/react 4.0.0-beta.11 → 4.0.0-beta.13
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.
- package/dist/components/IconButton/index.d.ts +1 -2
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/Modal/useCustomModalOverlay.d.ts +1 -1
- package/dist/components/Modal/useCustomModalOverlay.d.ts.map +1 -1
- package/dist/index.cjs.js +8 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +11 -15
- package/src/_lib/index.ts +1 -1
- package/src/components/Button/__snapshots__/index.story.storyshot +9 -9
- package/src/components/Checkbox/CheckboxInput/__snapshots__/index.story.storyshot +6 -6
- package/src/components/Checkbox/__snapshots__/index.story.storyshot +6 -6
- package/src/components/Clickable/__snapshots__/index.story.storyshot +2 -2
- package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +3 -3
- package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +3 -3
- package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +5 -5
- package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +53 -53
- package/src/components/Icon/__snapshots__/index.story.storyshot +1 -1
- package/src/components/IconButton/__snapshots__/index.story.storyshot +3 -3
- package/src/components/IconButton/index.tsx +3 -6
- package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +8 -8
- package/src/components/Modal/__snapshots__/index.story.storyshot +45 -28
- package/src/components/Modal/index.story.tsx +2 -0
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/Modal/useCustomModalOverlay.tsx +7 -1
- package/src/components/Radio/__snapshots__/index.story.storyshot +10 -10
- package/src/components/Radio/index.test.tsx +4 -3
- package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +2 -2
- package/src/components/Switch/__snapshots__/index.story.storyshot +4 -4
- package/src/components/TagItem/__snapshots__/index.story.storyshot +16 -16
- package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +31 -31
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +25 -25
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/DropdownSelector AssistiveText 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/DropdownSelector > AssistiveText 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
7
7
|
<div
|
|
8
8
|
style={
|
|
9
|
-
{
|
|
9
|
+
Object {
|
|
10
10
|
"width": 288,
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -17,7 +17,7 @@ exports[`Storybook Tests react/DropdownSelector AssistiveText 1`] = `
|
|
|
17
17
|
<div
|
|
18
18
|
className="charcoal-field-label-root"
|
|
19
19
|
style={
|
|
20
|
-
{
|
|
20
|
+
Object {
|
|
21
21
|
"border": 0,
|
|
22
22
|
"clip": "rect(0 0 0 0)",
|
|
23
23
|
"clipPath": "inset(50%)",
|
|
@@ -46,7 +46,7 @@ exports[`Storybook Tests react/DropdownSelector AssistiveText 1`] = `
|
|
|
46
46
|
<div
|
|
47
47
|
aria-hidden="true"
|
|
48
48
|
style={
|
|
49
|
-
{
|
|
49
|
+
Object {
|
|
50
50
|
"border": 0,
|
|
51
51
|
"clip": "rect(0 0 0 0)",
|
|
52
52
|
"clipPath": "inset(50%)",
|
|
@@ -113,13 +113,13 @@ exports[`Storybook Tests react/DropdownSelector AssistiveText 1`] = `
|
|
|
113
113
|
</div>
|
|
114
114
|
`;
|
|
115
115
|
|
|
116
|
-
exports[`Storybook Tests react/DropdownSelector CustomChildren 1`] = `
|
|
116
|
+
exports[`Storybook Tests > react/DropdownSelector > CustomChildren 1`] = `
|
|
117
117
|
<div
|
|
118
118
|
data-dark={false}
|
|
119
119
|
>
|
|
120
120
|
<div
|
|
121
121
|
style={
|
|
122
|
-
{
|
|
122
|
+
Object {
|
|
123
123
|
"width": 288,
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -130,7 +130,7 @@ exports[`Storybook Tests react/DropdownSelector CustomChildren 1`] = `
|
|
|
130
130
|
<div
|
|
131
131
|
className="charcoal-field-label-root"
|
|
132
132
|
style={
|
|
133
|
-
{
|
|
133
|
+
Object {
|
|
134
134
|
"border": 0,
|
|
135
135
|
"clip": "rect(0 0 0 0)",
|
|
136
136
|
"clipPath": "inset(50%)",
|
|
@@ -159,7 +159,7 @@ exports[`Storybook Tests react/DropdownSelector CustomChildren 1`] = `
|
|
|
159
159
|
<div
|
|
160
160
|
aria-hidden="true"
|
|
161
161
|
style={
|
|
162
|
-
{
|
|
162
|
+
Object {
|
|
163
163
|
"border": 0,
|
|
164
164
|
"clip": "rect(0 0 0 0)",
|
|
165
165
|
"clipPath": "inset(50%)",
|
|
@@ -208,7 +208,7 @@ exports[`Storybook Tests react/DropdownSelector CustomChildren 1`] = `
|
|
|
208
208
|
>
|
|
209
209
|
<div
|
|
210
210
|
style={
|
|
211
|
-
{
|
|
211
|
+
Object {
|
|
212
212
|
"fontWeight": "bold",
|
|
213
213
|
}
|
|
214
214
|
}
|
|
@@ -226,13 +226,13 @@ exports[`Storybook Tests react/DropdownSelector CustomChildren 1`] = `
|
|
|
226
226
|
</div>
|
|
227
227
|
`;
|
|
228
228
|
|
|
229
|
-
exports[`Storybook Tests react/DropdownSelector Default 1`] = `
|
|
229
|
+
exports[`Storybook Tests > react/DropdownSelector > Default 1`] = `
|
|
230
230
|
<div
|
|
231
231
|
data-dark={false}
|
|
232
232
|
>
|
|
233
233
|
<div
|
|
234
234
|
style={
|
|
235
|
-
{
|
|
235
|
+
Object {
|
|
236
236
|
"width": 288,
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -243,7 +243,7 @@ exports[`Storybook Tests react/DropdownSelector Default 1`] = `
|
|
|
243
243
|
<div
|
|
244
244
|
className="charcoal-field-label-root"
|
|
245
245
|
style={
|
|
246
|
-
{
|
|
246
|
+
Object {
|
|
247
247
|
"border": 0,
|
|
248
248
|
"clip": "rect(0 0 0 0)",
|
|
249
249
|
"clipPath": "inset(50%)",
|
|
@@ -270,7 +270,7 @@ exports[`Storybook Tests react/DropdownSelector Default 1`] = `
|
|
|
270
270
|
<div
|
|
271
271
|
aria-hidden="true"
|
|
272
272
|
style={
|
|
273
|
-
{
|
|
273
|
+
Object {
|
|
274
274
|
"border": 0,
|
|
275
275
|
"clip": "rect(0 0 0 0)",
|
|
276
276
|
"clipPath": "inset(50%)",
|
|
@@ -327,13 +327,13 @@ exports[`Storybook Tests react/DropdownSelector Default 1`] = `
|
|
|
327
327
|
</div>
|
|
328
328
|
`;
|
|
329
329
|
|
|
330
|
-
exports[`Storybook Tests react/DropdownSelector Disabled 1`] = `
|
|
330
|
+
exports[`Storybook Tests > react/DropdownSelector > Disabled 1`] = `
|
|
331
331
|
<div
|
|
332
332
|
data-dark={false}
|
|
333
333
|
>
|
|
334
334
|
<div
|
|
335
335
|
style={
|
|
336
|
-
{
|
|
336
|
+
Object {
|
|
337
337
|
"width": 288,
|
|
338
338
|
}
|
|
339
339
|
}
|
|
@@ -345,7 +345,7 @@ exports[`Storybook Tests react/DropdownSelector Disabled 1`] = `
|
|
|
345
345
|
<div
|
|
346
346
|
className="charcoal-field-label-root"
|
|
347
347
|
style={
|
|
348
|
-
{
|
|
348
|
+
Object {
|
|
349
349
|
"border": 0,
|
|
350
350
|
"clip": "rect(0 0 0 0)",
|
|
351
351
|
"clipPath": "inset(50%)",
|
|
@@ -374,7 +374,7 @@ exports[`Storybook Tests react/DropdownSelector Disabled 1`] = `
|
|
|
374
374
|
<div
|
|
375
375
|
aria-hidden="true"
|
|
376
376
|
style={
|
|
377
|
-
{
|
|
377
|
+
Object {
|
|
378
378
|
"border": 0,
|
|
379
379
|
"clip": "rect(0 0 0 0)",
|
|
380
380
|
"clipPath": "inset(50%)",
|
|
@@ -434,13 +434,13 @@ exports[`Storybook Tests react/DropdownSelector Disabled 1`] = `
|
|
|
434
434
|
</div>
|
|
435
435
|
`;
|
|
436
436
|
|
|
437
|
-
exports[`Storybook Tests react/DropdownSelector DisabledItem 1`] = `
|
|
437
|
+
exports[`Storybook Tests > react/DropdownSelector > DisabledItem 1`] = `
|
|
438
438
|
<div
|
|
439
439
|
data-dark={false}
|
|
440
440
|
>
|
|
441
441
|
<div
|
|
442
442
|
style={
|
|
443
|
-
{
|
|
443
|
+
Object {
|
|
444
444
|
"width": 288,
|
|
445
445
|
}
|
|
446
446
|
}
|
|
@@ -451,7 +451,7 @@ exports[`Storybook Tests react/DropdownSelector DisabledItem 1`] = `
|
|
|
451
451
|
<div
|
|
452
452
|
className="charcoal-field-label-root"
|
|
453
453
|
style={
|
|
454
|
-
{
|
|
454
|
+
Object {
|
|
455
455
|
"border": 0,
|
|
456
456
|
"clip": "rect(0 0 0 0)",
|
|
457
457
|
"clipPath": "inset(50%)",
|
|
@@ -480,7 +480,7 @@ exports[`Storybook Tests react/DropdownSelector DisabledItem 1`] = `
|
|
|
480
480
|
<div
|
|
481
481
|
aria-hidden="true"
|
|
482
482
|
style={
|
|
483
|
-
{
|
|
483
|
+
Object {
|
|
484
484
|
"border": 0,
|
|
485
485
|
"clip": "rect(0 0 0 0)",
|
|
486
486
|
"clipPath": "inset(50%)",
|
|
@@ -550,14 +550,14 @@ exports[`Storybook Tests react/DropdownSelector DisabledItem 1`] = `
|
|
|
550
550
|
</div>
|
|
551
551
|
`;
|
|
552
552
|
|
|
553
|
-
exports[`Storybook Tests react/DropdownSelector InFormTag 1`] = `
|
|
553
|
+
exports[`Storybook Tests > react/DropdownSelector > InFormTag 1`] = `
|
|
554
554
|
<div
|
|
555
555
|
data-dark={false}
|
|
556
556
|
>
|
|
557
557
|
<form
|
|
558
558
|
onSubmit={[Function]}
|
|
559
559
|
style={
|
|
560
|
-
{
|
|
560
|
+
Object {
|
|
561
561
|
"display": "flex",
|
|
562
562
|
"width": 288,
|
|
563
563
|
}
|
|
@@ -569,7 +569,7 @@ exports[`Storybook Tests react/DropdownSelector InFormTag 1`] = `
|
|
|
569
569
|
<div
|
|
570
570
|
className="charcoal-field-label-root"
|
|
571
571
|
style={
|
|
572
|
-
{
|
|
572
|
+
Object {
|
|
573
573
|
"border": 0,
|
|
574
574
|
"clip": "rect(0 0 0 0)",
|
|
575
575
|
"clipPath": "inset(50%)",
|
|
@@ -598,7 +598,7 @@ exports[`Storybook Tests react/DropdownSelector InFormTag 1`] = `
|
|
|
598
598
|
<div
|
|
599
599
|
aria-hidden="true"
|
|
600
600
|
style={
|
|
601
|
-
{
|
|
601
|
+
Object {
|
|
602
602
|
"border": 0,
|
|
603
603
|
"clip": "rect(0 0 0 0)",
|
|
604
604
|
"clipPath": "inset(50%)",
|
|
@@ -658,7 +658,7 @@ exports[`Storybook Tests react/DropdownSelector InFormTag 1`] = `
|
|
|
658
658
|
className="charcoal-button"
|
|
659
659
|
data-variant="Primary"
|
|
660
660
|
style={
|
|
661
|
-
{
|
|
661
|
+
Object {
|
|
662
662
|
"marginLeft": 16,
|
|
663
663
|
}
|
|
664
664
|
}
|
|
@@ -670,13 +670,13 @@ exports[`Storybook Tests react/DropdownSelector InFormTag 1`] = `
|
|
|
670
670
|
</div>
|
|
671
671
|
`;
|
|
672
672
|
|
|
673
|
-
exports[`Storybook Tests react/DropdownSelector InModal 1`] = `
|
|
673
|
+
exports[`Storybook Tests > react/DropdownSelector > InModal 1`] = `
|
|
674
674
|
<div
|
|
675
675
|
data-dark={false}
|
|
676
676
|
>
|
|
677
677
|
<div
|
|
678
678
|
style={
|
|
679
|
-
{
|
|
679
|
+
Object {
|
|
680
680
|
"height": "10px",
|
|
681
681
|
}
|
|
682
682
|
}
|
|
@@ -690,13 +690,13 @@ exports[`Storybook Tests react/DropdownSelector InModal 1`] = `
|
|
|
690
690
|
</div>
|
|
691
691
|
`;
|
|
692
692
|
|
|
693
|
-
exports[`Storybook Tests react/DropdownSelector Invalid 1`] = `
|
|
693
|
+
exports[`Storybook Tests > react/DropdownSelector > Invalid 1`] = `
|
|
694
694
|
<div
|
|
695
695
|
data-dark={false}
|
|
696
696
|
>
|
|
697
697
|
<div
|
|
698
698
|
style={
|
|
699
|
-
{
|
|
699
|
+
Object {
|
|
700
700
|
"width": 288,
|
|
701
701
|
}
|
|
702
702
|
}
|
|
@@ -707,7 +707,7 @@ exports[`Storybook Tests react/DropdownSelector Invalid 1`] = `
|
|
|
707
707
|
<div
|
|
708
708
|
className="charcoal-field-label-root"
|
|
709
709
|
style={
|
|
710
|
-
{
|
|
710
|
+
Object {
|
|
711
711
|
"border": 0,
|
|
712
712
|
"clip": "rect(0 0 0 0)",
|
|
713
713
|
"clipPath": "inset(50%)",
|
|
@@ -736,7 +736,7 @@ exports[`Storybook Tests react/DropdownSelector Invalid 1`] = `
|
|
|
736
736
|
<div
|
|
737
737
|
aria-hidden="true"
|
|
738
738
|
style={
|
|
739
|
-
{
|
|
739
|
+
Object {
|
|
740
740
|
"border": 0,
|
|
741
741
|
"clip": "rect(0 0 0 0)",
|
|
742
742
|
"clipPath": "inset(50%)",
|
|
@@ -796,13 +796,13 @@ exports[`Storybook Tests react/DropdownSelector Invalid 1`] = `
|
|
|
796
796
|
</div>
|
|
797
797
|
`;
|
|
798
798
|
|
|
799
|
-
exports[`Storybook Tests react/DropdownSelector InvalidAssistiveText 1`] = `
|
|
799
|
+
exports[`Storybook Tests > react/DropdownSelector > InvalidAssistiveText 1`] = `
|
|
800
800
|
<div
|
|
801
801
|
data-dark={false}
|
|
802
802
|
>
|
|
803
803
|
<div
|
|
804
804
|
style={
|
|
805
|
-
{
|
|
805
|
+
Object {
|
|
806
806
|
"width": 288,
|
|
807
807
|
}
|
|
808
808
|
}
|
|
@@ -813,7 +813,7 @@ exports[`Storybook Tests react/DropdownSelector InvalidAssistiveText 1`] = `
|
|
|
813
813
|
<div
|
|
814
814
|
className="charcoal-field-label-root"
|
|
815
815
|
style={
|
|
816
|
-
{
|
|
816
|
+
Object {
|
|
817
817
|
"border": 0,
|
|
818
818
|
"clip": "rect(0 0 0 0)",
|
|
819
819
|
"clipPath": "inset(50%)",
|
|
@@ -842,7 +842,7 @@ exports[`Storybook Tests react/DropdownSelector InvalidAssistiveText 1`] = `
|
|
|
842
842
|
<div
|
|
843
843
|
aria-hidden="true"
|
|
844
844
|
style={
|
|
845
|
-
{
|
|
845
|
+
Object {
|
|
846
846
|
"border": 0,
|
|
847
847
|
"clip": "rect(0 0 0 0)",
|
|
848
848
|
"clipPath": "inset(50%)",
|
|
@@ -910,13 +910,13 @@ exports[`Storybook Tests react/DropdownSelector InvalidAssistiveText 1`] = `
|
|
|
910
910
|
</div>
|
|
911
911
|
`;
|
|
912
912
|
|
|
913
|
-
exports[`Storybook Tests react/DropdownSelector Label 1`] = `
|
|
913
|
+
exports[`Storybook Tests > react/DropdownSelector > Label 1`] = `
|
|
914
914
|
<div
|
|
915
915
|
data-dark={false}
|
|
916
916
|
>
|
|
917
917
|
<div
|
|
918
918
|
style={
|
|
919
|
-
{
|
|
919
|
+
Object {
|
|
920
920
|
"width": 288,
|
|
921
921
|
}
|
|
922
922
|
}
|
|
@@ -942,7 +942,7 @@ exports[`Storybook Tests react/DropdownSelector Label 1`] = `
|
|
|
942
942
|
<div
|
|
943
943
|
aria-hidden="true"
|
|
944
944
|
style={
|
|
945
|
-
{
|
|
945
|
+
Object {
|
|
946
946
|
"border": 0,
|
|
947
947
|
"clip": "rect(0 0 0 0)",
|
|
948
948
|
"clipPath": "inset(50%)",
|
|
@@ -1001,13 +1001,13 @@ exports[`Storybook Tests react/DropdownSelector Label 1`] = `
|
|
|
1001
1001
|
</div>
|
|
1002
1002
|
`;
|
|
1003
1003
|
|
|
1004
|
-
exports[`Storybook Tests react/DropdownSelector LongNames 1`] = `
|
|
1004
|
+
exports[`Storybook Tests > react/DropdownSelector > LongNames 1`] = `
|
|
1005
1005
|
<div
|
|
1006
1006
|
data-dark={false}
|
|
1007
1007
|
>
|
|
1008
1008
|
<div
|
|
1009
1009
|
style={
|
|
1010
|
-
{
|
|
1010
|
+
Object {
|
|
1011
1011
|
"width": 288,
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
@@ -1018,7 +1018,7 @@ exports[`Storybook Tests react/DropdownSelector LongNames 1`] = `
|
|
|
1018
1018
|
<div
|
|
1019
1019
|
className="charcoal-field-label-root"
|
|
1020
1020
|
style={
|
|
1021
|
-
{
|
|
1021
|
+
Object {
|
|
1022
1022
|
"border": 0,
|
|
1023
1023
|
"clip": "rect(0 0 0 0)",
|
|
1024
1024
|
"clipPath": "inset(50%)",
|
|
@@ -1047,7 +1047,7 @@ exports[`Storybook Tests react/DropdownSelector LongNames 1`] = `
|
|
|
1047
1047
|
<div
|
|
1048
1048
|
aria-hidden="true"
|
|
1049
1049
|
style={
|
|
1050
|
-
{
|
|
1050
|
+
Object {
|
|
1051
1051
|
"border": 0,
|
|
1052
1052
|
"clip": "rect(0 0 0 0)",
|
|
1053
1053
|
"clipPath": "inset(50%)",
|
|
@@ -1106,13 +1106,13 @@ exports[`Storybook Tests react/DropdownSelector LongNames 1`] = `
|
|
|
1106
1106
|
</div>
|
|
1107
1107
|
`;
|
|
1108
1108
|
|
|
1109
|
-
exports[`Storybook Tests react/DropdownSelector RequiredText 1`] = `
|
|
1109
|
+
exports[`Storybook Tests > react/DropdownSelector > RequiredText 1`] = `
|
|
1110
1110
|
<div
|
|
1111
1111
|
data-dark={false}
|
|
1112
1112
|
>
|
|
1113
1113
|
<div
|
|
1114
1114
|
style={
|
|
1115
|
-
{
|
|
1115
|
+
Object {
|
|
1116
1116
|
"width": 288,
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
@@ -1143,7 +1143,7 @@ exports[`Storybook Tests react/DropdownSelector RequiredText 1`] = `
|
|
|
1143
1143
|
<div
|
|
1144
1144
|
aria-hidden="true"
|
|
1145
1145
|
style={
|
|
1146
|
-
{
|
|
1146
|
+
Object {
|
|
1147
1147
|
"border": 0,
|
|
1148
1148
|
"clip": "rect(0 0 0 0)",
|
|
1149
1149
|
"clipPath": "inset(50%)",
|
|
@@ -1202,13 +1202,13 @@ exports[`Storybook Tests react/DropdownSelector RequiredText 1`] = `
|
|
|
1202
1202
|
</div>
|
|
1203
1203
|
`;
|
|
1204
1204
|
|
|
1205
|
-
exports[`Storybook Tests react/DropdownSelector Section 1`] = `
|
|
1205
|
+
exports[`Storybook Tests > react/DropdownSelector > Section 1`] = `
|
|
1206
1206
|
<div
|
|
1207
1207
|
data-dark={false}
|
|
1208
1208
|
>
|
|
1209
1209
|
<div
|
|
1210
1210
|
style={
|
|
1211
|
-
{
|
|
1211
|
+
Object {
|
|
1212
1212
|
"width": 288,
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
@@ -1219,7 +1219,7 @@ exports[`Storybook Tests react/DropdownSelector Section 1`] = `
|
|
|
1219
1219
|
<div
|
|
1220
1220
|
className="charcoal-field-label-root"
|
|
1221
1221
|
style={
|
|
1222
|
-
{
|
|
1222
|
+
Object {
|
|
1223
1223
|
"border": 0,
|
|
1224
1224
|
"clip": "rect(0 0 0 0)",
|
|
1225
1225
|
"clipPath": "inset(50%)",
|
|
@@ -1248,7 +1248,7 @@ exports[`Storybook Tests react/DropdownSelector Section 1`] = `
|
|
|
1248
1248
|
<div
|
|
1249
1249
|
aria-hidden="true"
|
|
1250
1250
|
style={
|
|
1251
|
-
{
|
|
1251
|
+
Object {
|
|
1252
1252
|
"border": 0,
|
|
1253
1253
|
"clip": "rect(0 0 0 0)",
|
|
1254
1254
|
"clipPath": "inset(50%)",
|
|
@@ -1322,13 +1322,13 @@ exports[`Storybook Tests react/DropdownSelector Section 1`] = `
|
|
|
1322
1322
|
</div>
|
|
1323
1323
|
`;
|
|
1324
1324
|
|
|
1325
|
-
exports[`Storybook Tests react/DropdownSelector SubLabel 1`] = `
|
|
1325
|
+
exports[`Storybook Tests > react/DropdownSelector > SubLabel 1`] = `
|
|
1326
1326
|
<div
|
|
1327
1327
|
data-dark={false}
|
|
1328
1328
|
>
|
|
1329
1329
|
<div
|
|
1330
1330
|
style={
|
|
1331
|
-
{
|
|
1331
|
+
Object {
|
|
1332
1332
|
"width": 288,
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
@@ -1356,7 +1356,7 @@ exports[`Storybook Tests react/DropdownSelector SubLabel 1`] = `
|
|
|
1356
1356
|
<div
|
|
1357
1357
|
aria-hidden="true"
|
|
1358
1358
|
style={
|
|
1359
|
-
{
|
|
1359
|
+
Object {
|
|
1360
1360
|
"border": 0,
|
|
1361
1361
|
"clip": "rect(0 0 0 0)",
|
|
1362
1362
|
"clipPath": "inset(50%)",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/IconButton Default 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/IconButton > Default 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -18,7 +18,7 @@ exports[`Storybook Tests react/IconButton Default 1`] = `
|
|
|
18
18
|
</div>
|
|
19
19
|
`;
|
|
20
20
|
|
|
21
|
-
exports[`Storybook Tests react/IconButton IsActive 1`] = `
|
|
21
|
+
exports[`Storybook Tests > react/IconButton > IsActive 1`] = `
|
|
22
22
|
<div
|
|
23
23
|
data-dark={false}
|
|
24
24
|
>
|
|
@@ -35,7 +35,7 @@ exports[`Storybook Tests react/IconButton IsActive 1`] = `
|
|
|
35
35
|
</div>
|
|
36
36
|
`;
|
|
37
37
|
|
|
38
|
-
exports[`Storybook Tests react/IconButton Overlay 1`] = `
|
|
38
|
+
exports[`Storybook Tests > react/IconButton > Overlay 1`] = `
|
|
39
39
|
<div
|
|
40
40
|
data-dark={false}
|
|
41
41
|
>
|
|
@@ -12,8 +12,7 @@ export type IconButtonProps<T extends React.ElementType = 'button'> = {
|
|
|
12
12
|
readonly size?: Size
|
|
13
13
|
readonly icon: keyof KnownIconType
|
|
14
14
|
readonly isActive?: boolean
|
|
15
|
-
|
|
16
|
-
componentAs?: React.ComponentPropsWithRef<T>['as']
|
|
15
|
+
component?: T
|
|
17
16
|
} & Omit<React.ComponentPropsWithRef<T>, 'children' | 'as'>
|
|
18
17
|
|
|
19
18
|
const IconButton = forwardRef(function IconButtonInner<
|
|
@@ -24,20 +23,18 @@ const IconButton = forwardRef(function IconButtonInner<
|
|
|
24
23
|
size = 'M',
|
|
25
24
|
icon,
|
|
26
25
|
isActive = false,
|
|
27
|
-
|
|
28
|
-
as,
|
|
26
|
+
component,
|
|
29
27
|
...rest
|
|
30
28
|
}: IconButtonProps<T>,
|
|
31
29
|
ref: ForwardedRef<HTMLButtonElement>
|
|
32
30
|
) {
|
|
33
31
|
validateIconSize(size, icon)
|
|
34
|
-
const Component = useMemo(() =>
|
|
32
|
+
const Component = useMemo(() => component ?? 'button', [component])
|
|
35
33
|
const classNames = useClassNames('charcoal-icon-button', rest.className)
|
|
36
34
|
|
|
37
35
|
return (
|
|
38
36
|
<Component
|
|
39
37
|
{...rest}
|
|
40
|
-
as={componentAs}
|
|
41
38
|
ref={ref}
|
|
42
39
|
className={classNames}
|
|
43
40
|
data-size={size}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/LoadingSpinner Default 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/LoadingSpinner > Default 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -9,7 +9,7 @@ exports[`Storybook Tests react/LoadingSpinner Default 1`] = `
|
|
|
9
9
|
data-transparent={false}
|
|
10
10
|
role="progressbar"
|
|
11
11
|
style={
|
|
12
|
-
{
|
|
12
|
+
Object {
|
|
13
13
|
"--charcoal-loading-spinner-padding": "16px",
|
|
14
14
|
"--charcoal-loading-spinner-size": "48px",
|
|
15
15
|
}
|
|
@@ -24,7 +24,7 @@ exports[`Storybook Tests react/LoadingSpinner Default 1`] = `
|
|
|
24
24
|
</div>
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
|
-
exports[`Storybook Tests react/LoadingSpinner Padding 1`] = `
|
|
27
|
+
exports[`Storybook Tests > react/LoadingSpinner > Padding 1`] = `
|
|
28
28
|
<div
|
|
29
29
|
data-dark={false}
|
|
30
30
|
>
|
|
@@ -33,7 +33,7 @@ exports[`Storybook Tests react/LoadingSpinner Padding 1`] = `
|
|
|
33
33
|
data-transparent={false}
|
|
34
34
|
role="progressbar"
|
|
35
35
|
style={
|
|
36
|
-
{
|
|
36
|
+
Object {
|
|
37
37
|
"--charcoal-loading-spinner-padding": "24px",
|
|
38
38
|
"--charcoal-loading-spinner-size": "48px",
|
|
39
39
|
}
|
|
@@ -48,7 +48,7 @@ exports[`Storybook Tests react/LoadingSpinner Padding 1`] = `
|
|
|
48
48
|
</div>
|
|
49
49
|
`;
|
|
50
50
|
|
|
51
|
-
exports[`Storybook Tests react/LoadingSpinner Size 1`] = `
|
|
51
|
+
exports[`Storybook Tests > react/LoadingSpinner > Size 1`] = `
|
|
52
52
|
<div
|
|
53
53
|
data-dark={false}
|
|
54
54
|
>
|
|
@@ -57,7 +57,7 @@ exports[`Storybook Tests react/LoadingSpinner Size 1`] = `
|
|
|
57
57
|
data-transparent={false}
|
|
58
58
|
role="progressbar"
|
|
59
59
|
style={
|
|
60
|
-
{
|
|
60
|
+
Object {
|
|
61
61
|
"--charcoal-loading-spinner-padding": "16px",
|
|
62
62
|
"--charcoal-loading-spinner-size": "128px",
|
|
63
63
|
}
|
|
@@ -72,7 +72,7 @@ exports[`Storybook Tests react/LoadingSpinner Size 1`] = `
|
|
|
72
72
|
</div>
|
|
73
73
|
`;
|
|
74
74
|
|
|
75
|
-
exports[`Storybook Tests react/LoadingSpinner Transparent 1`] = `
|
|
75
|
+
exports[`Storybook Tests > react/LoadingSpinner > Transparent 1`] = `
|
|
76
76
|
<div
|
|
77
77
|
data-dark={false}
|
|
78
78
|
>
|
|
@@ -81,7 +81,7 @@ exports[`Storybook Tests react/LoadingSpinner Transparent 1`] = `
|
|
|
81
81
|
data-transparent={true}
|
|
82
82
|
role="progressbar"
|
|
83
83
|
style={
|
|
84
|
-
{
|
|
84
|
+
Object {
|
|
85
85
|
"--charcoal-loading-spinner-padding": "16px",
|
|
86
86
|
"--charcoal-loading-spinner-size": "48px",
|
|
87
87
|
}
|