@charcoal-ui/react 3.6.0 → 3.7.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 (48) hide show
  1. package/dist/_lib/compat.d.ts +1 -0
  2. package/dist/_lib/compat.d.ts.map +1 -1
  3. package/dist/components/Button/StyledButton.d.ts +12 -0
  4. package/dist/components/Button/StyledButton.d.ts.map +1 -0
  5. package/dist/components/Button/index.d.ts +2 -2
  6. package/dist/components/Button/index.d.ts.map +1 -1
  7. package/dist/components/Button/lib/variantToBackground.d.ts +3 -0
  8. package/dist/components/Button/lib/variantToBackground.d.ts.map +1 -0
  9. package/dist/components/Button/lib/variantToFont.d.ts +3 -0
  10. package/dist/components/Button/lib/variantToFont.d.ts.map +1 -0
  11. package/dist/components/Checkbox/index.story.d.ts +6 -16
  12. package/dist/components/Checkbox/index.story.d.ts.map +1 -1
  13. package/dist/components/Clickable/index.story.d.ts +4 -6
  14. package/dist/components/Clickable/index.story.d.ts.map +1 -1
  15. package/dist/components/DropdownSelector/index.story.d.ts +1 -0
  16. package/dist/components/DropdownSelector/index.story.d.ts.map +1 -1
  17. package/dist/components/Icon/index.story.d.ts +1 -1
  18. package/dist/components/SegmentedControl/RadioGroupContext.d.ts +1 -1
  19. package/dist/components/SegmentedControl/RadioGroupContext.d.ts.map +1 -1
  20. package/dist/index.cjs.js +341 -123
  21. package/dist/index.cjs.js.map +1 -1
  22. package/dist/index.esm.js +310 -92
  23. package/dist/index.esm.js.map +1 -1
  24. package/package.json +17 -20
  25. package/src/_lib/compat.ts +8 -0
  26. package/src/components/Button/StyledButton.tsx +66 -0
  27. package/src/components/Button/index.tsx +12 -104
  28. package/src/components/Button/lib/variantToBackground.tsx +19 -0
  29. package/src/components/Button/lib/variantToFont.tsx +19 -0
  30. package/src/components/Checkbox/index.story.tsx +82 -88
  31. package/src/components/Clickable/index.story.tsx +12 -9
  32. package/src/components/DropdownSelector/DropdownMenuItem.tsx +1 -14
  33. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +173 -109
  34. package/src/components/DropdownSelector/index.story.tsx +33 -0
  35. package/src/components/DropdownSelector/index.tsx +8 -15
  36. package/src/components/Modal/__snapshots__/index.story.storyshot +19 -23
  37. package/src/components/SegmentedControl/RadioGroupContext.tsx +1 -1
  38. package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +9 -9
  39. package/src/components/SegmentedControl/index.tsx +1 -1
  40. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +17 -15
  41. package/src/components/TextField/__snapshots__/TextField.story.storyshot +21 -20
  42. package/dist/components/Checkbox/performance.test.d.ts +0 -4
  43. package/dist/components/Checkbox/performance.test.d.ts.map +0 -1
  44. package/dist/components/Checkbox/snapshot.test.d.ts +0 -2
  45. package/dist/components/Checkbox/snapshot.test.d.ts.map +0 -1
  46. package/src/components/Checkbox/__snapshots__/snapshot.test.tsx.snap +0 -1093
  47. package/src/components/Checkbox/performance.test.tsx +0 -30
  48. package/src/components/Checkbox/snapshot.test.tsx +0 -66
@@ -95,7 +95,7 @@ exports[`Storyshots SegmentedControl Object Segments 1`] = `
95
95
  aria-label="test"
96
96
  aria-orientation="vertical"
97
97
  className="c0"
98
- id="react-aria-1"
98
+ id="test-id"
99
99
  onBlur={[Function]}
100
100
  onFocus={[Function]}
101
101
  onKeyDown={[Function]}
@@ -110,7 +110,7 @@ exports[`Storyshots SegmentedControl Object Segments 1`] = `
110
110
  checked={false}
111
111
  className="c2"
112
112
  disabled={false}
113
- name="test"
113
+ name="test-id"
114
114
  onChange={[Function]}
115
115
  onClick={[Function]}
116
116
  onDragStart={[Function]}
@@ -149,7 +149,7 @@ exports[`Storyshots SegmentedControl Object Segments 1`] = `
149
149
  checked={false}
150
150
  className="c2"
151
151
  disabled={false}
152
- name="test"
152
+ name="test-id"
153
153
  onChange={[Function]}
154
154
  onClick={[Function]}
155
155
  onDragStart={[Function]}
@@ -188,7 +188,7 @@ exports[`Storyshots SegmentedControl Object Segments 1`] = `
188
188
  checked={false}
189
189
  className="c2"
190
190
  disabled={false}
191
- name="test"
191
+ name="test-id"
192
192
  onChange={[Function]}
193
193
  onClick={[Function]}
194
194
  onDragStart={[Function]}
@@ -227,7 +227,7 @@ exports[`Storyshots SegmentedControl Object Segments 1`] = `
227
227
  checked={false}
228
228
  className="c2"
229
229
  disabled={true}
230
- name="test"
230
+ name="test-id"
231
231
  onChange={[Function]}
232
232
  onClick={[Function]}
233
233
  onDragStart={[Function]}
@@ -354,7 +354,7 @@ exports[`Storyshots SegmentedControl String Segments 1`] = `
354
354
  aria-label="test"
355
355
  aria-orientation="vertical"
356
356
  className="c0"
357
- id="react-aria-5"
357
+ id="test-id"
358
358
  onBlur={[Function]}
359
359
  onFocus={[Function]}
360
360
  onKeyDown={[Function]}
@@ -369,7 +369,7 @@ exports[`Storyshots SegmentedControl String Segments 1`] = `
369
369
  checked={false}
370
370
  className="c2"
371
371
  disabled={false}
372
- name="test"
372
+ name="test-id"
373
373
  onChange={[Function]}
374
374
  onClick={[Function]}
375
375
  onDragStart={[Function]}
@@ -408,7 +408,7 @@ exports[`Storyshots SegmentedControl String Segments 1`] = `
408
408
  checked={false}
409
409
  className="c2"
410
410
  disabled={false}
411
- name="test"
411
+ name="test-id"
412
412
  onChange={[Function]}
413
413
  onClick={[Function]}
414
414
  onDragStart={[Function]}
@@ -447,7 +447,7 @@ exports[`Storyshots SegmentedControl String Segments 1`] = `
447
447
  checked={false}
448
448
  className="c2"
449
449
  disabled={false}
450
- name="test"
450
+ name="test-id"
451
451
  onChange={[Function]}
452
452
  onClick={[Function]}
453
453
  onDragStart={[Function]}
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, forwardRef, memo, useMemo, useRef } from 'react'
2
2
  import * as React from 'react'
3
- import { useRadioGroupState } from 'react-stately'
3
+ import { useRadioGroupState } from '@react-stately/radio'
4
4
  import {
5
5
  AriaRadioGroupProps,
6
6
  AriaRadioProps,
@@ -173,13 +173,13 @@ exports[`Storyshots TextArea Auto Height 1`] = `
173
173
  "border": 0,
174
174
  "clip": "rect(0 0 0 0)",
175
175
  "clipPath": "inset(50%)",
176
- "height": 1,
177
- "margin": "0 -1px -1px 0",
176
+ "height": "1px",
177
+ "margin": "-1px",
178
178
  "overflow": "hidden",
179
179
  "padding": 0,
180
180
  "position": "absolute",
181
181
  "whiteSpace": "nowrap",
182
- "width": 1,
182
+ "width": "1px",
183
183
  }
184
184
  }
185
185
  >
@@ -187,8 +187,6 @@ exports[`Storyshots TextArea Auto Height 1`] = `
187
187
  className="c3"
188
188
  htmlFor="test-id"
189
189
  id="test-id"
190
- onBlur={null}
191
- onFocus={null}
192
190
  >
193
191
  Label
194
192
  </label>
@@ -210,7 +208,9 @@ exports[`Storyshots TextArea Auto Height 1`] = `
210
208
  onChange={[Function]}
211
209
  placeholder="TextArea"
212
210
  readOnly={false}
211
+ required={false}
213
212
  rows={4}
213
+ value=""
214
214
  />
215
215
  </div>
216
216
  </div>
@@ -436,13 +436,13 @@ exports[`Storyshots TextArea Default 1`] = `
436
436
  "border": 0,
437
437
  "clip": "rect(0 0 0 0)",
438
438
  "clipPath": "inset(50%)",
439
- "height": 1,
440
- "margin": "0 -1px -1px 0",
439
+ "height": "1px",
440
+ "margin": "-1px",
441
441
  "overflow": "hidden",
442
442
  "padding": 0,
443
443
  "position": "absolute",
444
444
  "whiteSpace": "nowrap",
445
- "width": 1,
445
+ "width": "1px",
446
446
  }
447
447
  }
448
448
  >
@@ -450,8 +450,6 @@ exports[`Storyshots TextArea Default 1`] = `
450
450
  className="c4"
451
451
  htmlFor="test-id"
452
452
  id="test-id"
453
- onBlur={null}
454
- onFocus={null}
455
453
  >
456
454
  Label
457
455
  </label>
@@ -480,7 +478,9 @@ exports[`Storyshots TextArea Default 1`] = `
480
478
  onChange={[Function]}
481
479
  placeholder="Text Area"
482
480
  readOnly={false}
481
+ required={false}
483
482
  rows={4}
483
+ value=""
484
484
  />
485
485
  </div>
486
486
  </div>
@@ -716,13 +716,13 @@ exports[`Storyshots TextArea Has Count 1`] = `
716
716
  "border": 0,
717
717
  "clip": "rect(0 0 0 0)",
718
718
  "clipPath": "inset(50%)",
719
- "height": 1,
720
- "margin": "0 -1px -1px 0",
719
+ "height": "1px",
720
+ "margin": "-1px",
721
721
  "overflow": "hidden",
722
722
  "padding": 0,
723
723
  "position": "absolute",
724
724
  "whiteSpace": "nowrap",
725
- "width": 1,
725
+ "width": "1px",
726
726
  }
727
727
  }
728
728
  >
@@ -730,8 +730,6 @@ exports[`Storyshots TextArea Has Count 1`] = `
730
730
  className="c4"
731
731
  htmlFor="test-id"
732
732
  id="test-id"
733
- onBlur={null}
734
- onFocus={null}
735
733
  >
736
734
  Label
737
735
  </label>
@@ -761,7 +759,9 @@ exports[`Storyshots TextArea Has Count 1`] = `
761
759
  onChange={[Function]}
762
760
  placeholder="Text Area"
763
761
  readOnly={false}
762
+ required={false}
764
763
  rows={4}
764
+ value=""
765
765
  />
766
766
  <span
767
767
  className="c10"
@@ -1062,7 +1062,9 @@ exports[`Storyshots TextArea Has Label 1`] = `
1062
1062
  onChange={[Function]}
1063
1063
  placeholder="Text Area"
1064
1064
  readOnly={false}
1065
+ required={false}
1065
1066
  rows={4}
1067
+ value=""
1066
1068
  />
1067
1069
  </div>
1068
1070
  <p
@@ -230,13 +230,13 @@ exports[`Storyshots TextField Default 1`] = `
230
230
  "border": 0,
231
231
  "clip": "rect(0 0 0 0)",
232
232
  "clipPath": "inset(50%)",
233
- "height": 1,
234
- "margin": "0 -1px -1px 0",
233
+ "height": "1px",
234
+ "margin": "-1px",
235
235
  "overflow": "hidden",
236
236
  "padding": 0,
237
237
  "position": "absolute",
238
238
  "whiteSpace": "nowrap",
239
- "width": 1,
239
+ "width": "1px",
240
240
  }
241
241
  }
242
242
  >
@@ -244,8 +244,6 @@ exports[`Storyshots TextField Default 1`] = `
244
244
  className="c4"
245
245
  htmlFor="test-id"
246
246
  id="test-id"
247
- onBlur={null}
248
- onFocus={null}
249
247
  >
250
248
  Label
251
249
  </label>
@@ -272,7 +270,9 @@ exports[`Storyshots TextField Default 1`] = `
272
270
  onChange={[Function]}
273
271
  placeholder="TextField"
274
272
  readOnly={false}
273
+ required={false}
275
274
  type="text"
275
+ value=""
276
276
  />
277
277
  </div>
278
278
  </div>
@@ -493,13 +493,13 @@ exports[`Storyshots TextField Has Affix 1`] = `
493
493
  "border": 0,
494
494
  "clip": "rect(0 0 0 0)",
495
495
  "clipPath": "inset(50%)",
496
- "height": 1,
497
- "margin": "0 -1px -1px 0",
496
+ "height": "1px",
497
+ "margin": "-1px",
498
498
  "overflow": "hidden",
499
499
  "padding": 0,
500
500
  "position": "absolute",
501
501
  "whiteSpace": "nowrap",
502
- "width": 1,
502
+ "width": "1px",
503
503
  }
504
504
  }
505
505
  >
@@ -507,8 +507,6 @@ exports[`Storyshots TextField Has Affix 1`] = `
507
507
  className="c3"
508
508
  htmlFor="test-id"
509
509
  id="test-id"
510
- onBlur={null}
511
- onFocus={null}
512
510
  >
513
511
  Label
514
512
  </label>
@@ -535,7 +533,9 @@ exports[`Storyshots TextField Has Affix 1`] = `
535
533
  onChange={[Function]}
536
534
  placeholder="path/to/your/file"
537
535
  readOnly={false}
536
+ required={false}
538
537
  type="text"
538
+ value=""
539
539
  />
540
540
  <span
541
541
  className="c9"
@@ -800,13 +800,13 @@ exports[`Storyshots TextField Has Count 1`] = `
800
800
  "border": 0,
801
801
  "clip": "rect(0 0 0 0)",
802
802
  "clipPath": "inset(50%)",
803
- "height": 1,
804
- "margin": "0 -1px -1px 0",
803
+ "height": "1px",
804
+ "margin": "-1px",
805
805
  "overflow": "hidden",
806
806
  "padding": 0,
807
807
  "position": "absolute",
808
808
  "whiteSpace": "nowrap",
809
- "width": 1,
809
+ "width": "1px",
810
810
  }
811
811
  }
812
812
  >
@@ -814,8 +814,6 @@ exports[`Storyshots TextField Has Count 1`] = `
814
814
  className="c4"
815
815
  htmlFor="test-id"
816
816
  id="test-id"
817
- onBlur={null}
818
- onFocus={null}
819
817
  >
820
818
  Label
821
819
  </label>
@@ -843,7 +841,9 @@ exports[`Storyshots TextField Has Count 1`] = `
843
841
  onChange={[Function]}
844
842
  placeholder="TextField"
845
843
  readOnly={false}
844
+ required={false}
846
845
  type="text"
846
+ value=""
847
847
  />
848
848
  <span
849
849
  className="c10"
@@ -1157,7 +1157,9 @@ exports[`Storyshots TextField Has Label 1`] = `
1157
1157
  onChange={[Function]}
1158
1158
  placeholder="TextField"
1159
1159
  readOnly={false}
1160
+ required={false}
1160
1161
  type="text"
1162
+ value=""
1161
1163
  />
1162
1164
  </div>
1163
1165
  <p
@@ -1478,13 +1480,13 @@ exports[`Storyshots TextField Prefix Icon 1`] = `
1478
1480
  "border": 0,
1479
1481
  "clip": "rect(0 0 0 0)",
1480
1482
  "clipPath": "inset(50%)",
1481
- "height": 1,
1482
- "margin": "0 -1px -1px 0",
1483
+ "height": "1px",
1484
+ "margin": "-1px",
1483
1485
  "overflow": "hidden",
1484
1486
  "padding": 0,
1485
1487
  "position": "absolute",
1486
1488
  "whiteSpace": "nowrap",
1487
- "width": 1,
1489
+ "width": "1px",
1488
1490
  }
1489
1491
  }
1490
1492
  >
@@ -1492,8 +1494,6 @@ exports[`Storyshots TextField Prefix Icon 1`] = `
1492
1494
  className="c3"
1493
1495
  htmlFor="test-id"
1494
1496
  id="test-id"
1495
- onBlur={null}
1496
- onFocus={null}
1497
1497
  >
1498
1498
  Label
1499
1499
  </label>
@@ -1525,6 +1525,7 @@ exports[`Storyshots TextField Prefix Icon 1`] = `
1525
1525
  onChange={[Function]}
1526
1526
  placeholder="作品を検索"
1527
1527
  readOnly={false}
1528
+ required={false}
1528
1529
  type="text"
1529
1530
  value=""
1530
1531
  />
@@ -1,4 +0,0 @@
1
- import 'jest-styled-components';
2
- import renderer from 'react-test-renderer';
3
- export declare function render(children: JSX.Element): renderer.ReactTestRendererJSON | renderer.ReactTestRendererJSON[] | null;
4
- //# sourceMappingURL=performance.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"performance.test.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/performance.test.tsx"],"names":[],"mappings":"AACA,OAAO,wBAAwB,CAAA;AAG/B,OAAO,QAAQ,MAAM,qBAAqB,CAAA;AAI1C,wBAAgB,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,4EAI3C"}
@@ -1,2 +0,0 @@
1
- import 'jest-styled-components';
2
- //# sourceMappingURL=snapshot.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snapshot.test.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/snapshot.test.tsx"],"names":[],"mappings":"AAOA,OAAO,wBAAwB,CAAA"}