@charcoal-ui/react 3.3.0-beta.0 → 3.4.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 (65) hide show
  1. package/dist/_lib/useForwardedRef.d.ts +3 -0
  2. package/dist/_lib/useForwardedRef.d.ts.map +1 -0
  3. package/dist/components/Checkbox/index.d.ts +1 -0
  4. package/dist/components/Checkbox/index.d.ts.map +1 -1
  5. package/dist/components/Checkbox/index.story.d.ts +1 -0
  6. package/dist/components/Checkbox/index.story.d.ts.map +1 -1
  7. package/dist/components/Clickable/index.d.ts.map +1 -1
  8. package/dist/components/DropdownSelector/DropdownPopover.d.ts.map +1 -1
  9. package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
  10. package/dist/components/DropdownSelector/Popover/usePreventScroll.d.ts +2 -0
  11. package/dist/components/DropdownSelector/Popover/usePreventScroll.d.ts.map +1 -0
  12. package/dist/components/DropdownSelector/index.story.d.ts +1 -0
  13. package/dist/components/DropdownSelector/index.story.d.ts.map +1 -1
  14. package/dist/components/Icon/index.story.d.ts +1 -1
  15. package/dist/components/Modal/Dialog/index.d.ts +26 -0
  16. package/dist/components/Modal/Dialog/index.d.ts.map +1 -0
  17. package/dist/components/Modal/ModalBackgroundContext.d.ts +6 -0
  18. package/dist/components/Modal/ModalBackgroundContext.d.ts.map +1 -0
  19. package/dist/components/Modal/ModalPlumbing.d.ts.map +1 -1
  20. package/dist/components/Modal/__stories__/InternalScrollStory.d.ts +4 -0
  21. package/dist/components/Modal/__stories__/InternalScrollStory.d.ts.map +1 -0
  22. package/dist/components/Modal/index.d.ts +12 -2
  23. package/dist/components/Modal/index.d.ts.map +1 -1
  24. package/dist/components/Modal/index.story.d.ts +3 -2
  25. package/dist/components/Modal/index.story.d.ts.map +1 -1
  26. package/dist/index.cjs.js +392 -301
  27. package/dist/index.cjs.js.map +1 -1
  28. package/dist/index.esm.js +354 -264
  29. package/dist/index.esm.js.map +1 -1
  30. package/package.json +6 -6
  31. package/src/_lib/useForwardedRef.tsx +16 -0
  32. package/src/components/Button/__snapshots__/index.story.storyshot +1971 -0
  33. package/src/components/Checkbox/__snapshots__/index.story.storyshot +390 -0
  34. package/src/components/Checkbox/index.story.tsx +3 -0
  35. package/src/components/Checkbox/index.tsx +7 -4
  36. package/src/components/Clickable/__snapshots__/index.story.storyshot +100 -0
  37. package/src/components/Clickable/index.tsx +17 -35
  38. package/src/components/DropdownSelector/DropdownPopover.tsx +0 -1
  39. package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +245 -0
  40. package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +555 -0
  41. package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +174 -0
  42. package/src/components/DropdownSelector/Popover/index.tsx +17 -2
  43. package/src/components/DropdownSelector/Popover/usePreventScroll.tsx +18 -0
  44. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +1241 -0
  45. package/src/components/DropdownSelector/index.story.tsx +69 -13
  46. package/src/components/Icon/__snapshots__/index.story.storyshot +12 -0
  47. package/src/components/{Button/__snapshots__/index.test.tsx.snap → IconButton/__snapshots__/index.story.storyshot} +94 -91
  48. package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +81 -0
  49. package/src/components/Modal/Dialog/index.tsx +82 -0
  50. package/src/components/Modal/ModalBackgroundContext.tsx +8 -0
  51. package/src/components/Modal/ModalPlumbing.tsx +16 -4
  52. package/src/components/Modal/__snapshots__/index.story.storyshot +533 -0
  53. package/src/components/Modal/__stories__/InternalScrollStory.tsx +75 -0
  54. package/src/components/Modal/index.story.tsx +57 -38
  55. package/src/components/Modal/index.tsx +63 -94
  56. package/src/components/MultiSelect/__snapshots__/index.story.storyshot +511 -0
  57. package/src/components/Radio/__snapshots__/index.story.storyshot +319 -0
  58. package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +483 -0
  59. package/src/components/Switch/__snapshots__/index.story.storyshot +454 -0
  60. package/src/components/TagItem/__snapshots__/index.story.storyshot +1181 -0
  61. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +1271 -0
  62. package/src/components/TextField/__snapshots__/TextField.story.storyshot +1800 -0
  63. package/dist/components/Button/index.test.d.ts +0 -4
  64. package/dist/components/Button/index.test.d.ts.map +0 -1
  65. package/src/components/Button/index.test.tsx +0 -24
@@ -0,0 +1,483 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Storyshots SegmentedControl Object Segments 1`] = `
4
+ .c0 {
5
+ display: -webkit-inline-box;
6
+ display: -webkit-inline-flex;
7
+ display: -ms-inline-flexbox;
8
+ display: inline-flex;
9
+ -webkit-align-items: center;
10
+ -webkit-box-align: center;
11
+ -ms-flex-align: center;
12
+ align-items: center;
13
+ background-color: var(--charcoal-surface3);
14
+ border-radius: 16px;
15
+ }
16
+
17
+ .c1 {
18
+ position: relative;
19
+ display: -webkit-box;
20
+ display: -webkit-flex;
21
+ display: -ms-flexbox;
22
+ display: flex;
23
+ -webkit-align-items: center;
24
+ -webkit-box-align: center;
25
+ -ms-flex-align: center;
26
+ align-items: center;
27
+ cursor: pointer;
28
+ height: 32px;
29
+ padding-right: 16px;
30
+ padding-left: 16px;
31
+ border-radius: 16px;
32
+ color: var(--charcoal-text2);
33
+ }
34
+
35
+ .c1:disabled,
36
+ .c1[aria-disabled]:not([aria-disabled=false]) {
37
+ cursor: default;
38
+ }
39
+
40
+ .c1:disabled,
41
+ .c1[aria-disabled]:not([aria-disabled=false]) {
42
+ opacity: 0.32;
43
+ }
44
+
45
+ .c2 {
46
+ position: absolute;
47
+ height: 0px;
48
+ width: 0px;
49
+ padding: 0;
50
+ margin: 0;
51
+ -webkit-appearance: none;
52
+ -moz-appearance: none;
53
+ appearance: none;
54
+ box-sizing: border-box;
55
+ overflow: hidden;
56
+ white-space: nowrap;
57
+ opacity: 0;
58
+ }
59
+
60
+ .c3 {
61
+ background: transparent;
62
+ display: -webkit-box;
63
+ display: -webkit-flex;
64
+ display: -ms-flexbox;
65
+ display: flex;
66
+ -webkit-align-items: center;
67
+ -webkit-box-align: center;
68
+ -ms-flex-align: center;
69
+ align-items: center;
70
+ height: 22px;
71
+ }
72
+
73
+ .c4 {
74
+ font-size: 14px;
75
+ line-height: 22px;
76
+ display: flow-root;
77
+ }
78
+
79
+ .c4::before {
80
+ display: block;
81
+ width: 0;
82
+ height: 0;
83
+ content: '';
84
+ margin-top: -4px;
85
+ }
86
+
87
+ .c4::after {
88
+ display: block;
89
+ width: 0;
90
+ height: 0;
91
+ content: '';
92
+ margin-bottom: -4px;
93
+ }
94
+
95
+ <div
96
+ data-dark={false}
97
+ >
98
+ <div
99
+ aria-label="test"
100
+ aria-orientation="vertical"
101
+ className="c0"
102
+ id="test-id"
103
+ onBlur={[Function]}
104
+ onFocus={[Function]}
105
+ onKeyDown={[Function]}
106
+ role="radiogroup"
107
+ >
108
+ <label
109
+ aria-disabled={false}
110
+ checked={false}
111
+ className="c1"
112
+ >
113
+ <input
114
+ checked={false}
115
+ className="c2"
116
+ disabled={false}
117
+ name="test-id"
118
+ onChange={[Function]}
119
+ onClick={[Function]}
120
+ onDragStart={[Function]}
121
+ onFocus={[Function]}
122
+ onKeyDown={[Function]}
123
+ onKeyUp={[Function]}
124
+ onMouseDown={[Function]}
125
+ onMouseEnter={[Function]}
126
+ onMouseLeave={[Function]}
127
+ onMouseUp={[Function]}
128
+ onTouchCancel={[Function]}
129
+ onTouchEnd={[Function]}
130
+ onTouchMove={[Function]}
131
+ onTouchStart={[Function]}
132
+ tabIndex={0}
133
+ type="radio"
134
+ value="option1"
135
+ />
136
+ <div
137
+ className="c3"
138
+ >
139
+ <div
140
+ className="c4"
141
+ >
142
+ 選択肢1
143
+ </div>
144
+ </div>
145
+ </label>
146
+ <label
147
+ aria-disabled={false}
148
+ checked={false}
149
+ className="c1"
150
+ >
151
+ <input
152
+ checked={false}
153
+ className="c2"
154
+ disabled={false}
155
+ name="test-id"
156
+ onChange={[Function]}
157
+ onClick={[Function]}
158
+ onDragStart={[Function]}
159
+ onFocus={[Function]}
160
+ onKeyDown={[Function]}
161
+ onKeyUp={[Function]}
162
+ onMouseDown={[Function]}
163
+ onMouseEnter={[Function]}
164
+ onMouseLeave={[Function]}
165
+ onMouseUp={[Function]}
166
+ onTouchCancel={[Function]}
167
+ onTouchEnd={[Function]}
168
+ onTouchMove={[Function]}
169
+ onTouchStart={[Function]}
170
+ tabIndex={0}
171
+ type="radio"
172
+ value="option2"
173
+ />
174
+ <div
175
+ className="c3"
176
+ >
177
+ <div
178
+ className="c4"
179
+ >
180
+ 選択肢2
181
+ </div>
182
+ </div>
183
+ </label>
184
+ <label
185
+ aria-disabled={false}
186
+ checked={false}
187
+ className="c1"
188
+ >
189
+ <input
190
+ checked={false}
191
+ className="c2"
192
+ disabled={false}
193
+ name="test-id"
194
+ onChange={[Function]}
195
+ onClick={[Function]}
196
+ onDragStart={[Function]}
197
+ onFocus={[Function]}
198
+ onKeyDown={[Function]}
199
+ onKeyUp={[Function]}
200
+ onMouseDown={[Function]}
201
+ onMouseEnter={[Function]}
202
+ onMouseLeave={[Function]}
203
+ onMouseUp={[Function]}
204
+ onTouchCancel={[Function]}
205
+ onTouchEnd={[Function]}
206
+ onTouchMove={[Function]}
207
+ onTouchStart={[Function]}
208
+ tabIndex={0}
209
+ type="radio"
210
+ value="option3"
211
+ />
212
+ <div
213
+ className="c3"
214
+ >
215
+ <div
216
+ className="c4"
217
+ >
218
+ 選択肢3
219
+ </div>
220
+ </div>
221
+ </label>
222
+ <label
223
+ aria-disabled={true}
224
+ checked={false}
225
+ className="c1"
226
+ >
227
+ <input
228
+ checked={false}
229
+ className="c2"
230
+ disabled={true}
231
+ name="test-id"
232
+ onChange={[Function]}
233
+ onClick={[Function]}
234
+ onDragStart={[Function]}
235
+ onKeyDown={[Function]}
236
+ onKeyUp={[Function]}
237
+ onMouseDown={[Function]}
238
+ onMouseEnter={[Function]}
239
+ onMouseLeave={[Function]}
240
+ onMouseUp={[Function]}
241
+ onTouchCancel={[Function]}
242
+ onTouchEnd={[Function]}
243
+ onTouchMove={[Function]}
244
+ onTouchStart={[Function]}
245
+ type="radio"
246
+ value="option4"
247
+ />
248
+ <div
249
+ className="c3"
250
+ >
251
+ <div
252
+ className="c4"
253
+ >
254
+ 選択肢4
255
+ </div>
256
+ </div>
257
+ </label>
258
+ </div>
259
+ </div>
260
+ `;
261
+
262
+ exports[`Storyshots SegmentedControl String Segments 1`] = `
263
+ .c0 {
264
+ display: -webkit-inline-box;
265
+ display: -webkit-inline-flex;
266
+ display: -ms-inline-flexbox;
267
+ display: inline-flex;
268
+ -webkit-align-items: center;
269
+ -webkit-box-align: center;
270
+ -ms-flex-align: center;
271
+ align-items: center;
272
+ background-color: var(--charcoal-surface3);
273
+ border-radius: 16px;
274
+ }
275
+
276
+ .c1 {
277
+ position: relative;
278
+ display: -webkit-box;
279
+ display: -webkit-flex;
280
+ display: -ms-flexbox;
281
+ display: flex;
282
+ -webkit-align-items: center;
283
+ -webkit-box-align: center;
284
+ -ms-flex-align: center;
285
+ align-items: center;
286
+ cursor: pointer;
287
+ height: 32px;
288
+ padding-right: 16px;
289
+ padding-left: 16px;
290
+ border-radius: 16px;
291
+ color: var(--charcoal-text2);
292
+ }
293
+
294
+ .c1:disabled,
295
+ .c1[aria-disabled]:not([aria-disabled=false]) {
296
+ cursor: default;
297
+ }
298
+
299
+ .c1:disabled,
300
+ .c1[aria-disabled]:not([aria-disabled=false]) {
301
+ opacity: 0.32;
302
+ }
303
+
304
+ .c2 {
305
+ position: absolute;
306
+ height: 0px;
307
+ width: 0px;
308
+ padding: 0;
309
+ margin: 0;
310
+ -webkit-appearance: none;
311
+ -moz-appearance: none;
312
+ appearance: none;
313
+ box-sizing: border-box;
314
+ overflow: hidden;
315
+ white-space: nowrap;
316
+ opacity: 0;
317
+ }
318
+
319
+ .c3 {
320
+ background: transparent;
321
+ display: -webkit-box;
322
+ display: -webkit-flex;
323
+ display: -ms-flexbox;
324
+ display: flex;
325
+ -webkit-align-items: center;
326
+ -webkit-box-align: center;
327
+ -ms-flex-align: center;
328
+ align-items: center;
329
+ height: 22px;
330
+ }
331
+
332
+ .c4 {
333
+ font-size: 14px;
334
+ line-height: 22px;
335
+ display: flow-root;
336
+ }
337
+
338
+ .c4::before {
339
+ display: block;
340
+ width: 0;
341
+ height: 0;
342
+ content: '';
343
+ margin-top: -4px;
344
+ }
345
+
346
+ .c4::after {
347
+ display: block;
348
+ width: 0;
349
+ height: 0;
350
+ content: '';
351
+ margin-bottom: -4px;
352
+ }
353
+
354
+ <div
355
+ data-dark={false}
356
+ >
357
+ <div
358
+ aria-label="test"
359
+ aria-orientation="vertical"
360
+ className="c0"
361
+ id="test-id"
362
+ onBlur={[Function]}
363
+ onFocus={[Function]}
364
+ onKeyDown={[Function]}
365
+ role="radiogroup"
366
+ >
367
+ <label
368
+ aria-disabled={false}
369
+ checked={false}
370
+ className="c1"
371
+ >
372
+ <input
373
+ checked={false}
374
+ className="c2"
375
+ disabled={false}
376
+ name="test-id"
377
+ onChange={[Function]}
378
+ onClick={[Function]}
379
+ onDragStart={[Function]}
380
+ onFocus={[Function]}
381
+ onKeyDown={[Function]}
382
+ onKeyUp={[Function]}
383
+ onMouseDown={[Function]}
384
+ onMouseEnter={[Function]}
385
+ onMouseLeave={[Function]}
386
+ onMouseUp={[Function]}
387
+ onTouchCancel={[Function]}
388
+ onTouchEnd={[Function]}
389
+ onTouchMove={[Function]}
390
+ onTouchStart={[Function]}
391
+ tabIndex={0}
392
+ type="radio"
393
+ value="option1"
394
+ />
395
+ <div
396
+ className="c3"
397
+ >
398
+ <div
399
+ className="c4"
400
+ >
401
+ option1
402
+ </div>
403
+ </div>
404
+ </label>
405
+ <label
406
+ aria-disabled={false}
407
+ checked={false}
408
+ className="c1"
409
+ >
410
+ <input
411
+ checked={false}
412
+ className="c2"
413
+ disabled={false}
414
+ name="test-id"
415
+ onChange={[Function]}
416
+ onClick={[Function]}
417
+ onDragStart={[Function]}
418
+ onFocus={[Function]}
419
+ onKeyDown={[Function]}
420
+ onKeyUp={[Function]}
421
+ onMouseDown={[Function]}
422
+ onMouseEnter={[Function]}
423
+ onMouseLeave={[Function]}
424
+ onMouseUp={[Function]}
425
+ onTouchCancel={[Function]}
426
+ onTouchEnd={[Function]}
427
+ onTouchMove={[Function]}
428
+ onTouchStart={[Function]}
429
+ tabIndex={0}
430
+ type="radio"
431
+ value="option2"
432
+ />
433
+ <div
434
+ className="c3"
435
+ >
436
+ <div
437
+ className="c4"
438
+ >
439
+ option2
440
+ </div>
441
+ </div>
442
+ </label>
443
+ <label
444
+ aria-disabled={false}
445
+ checked={false}
446
+ className="c1"
447
+ >
448
+ <input
449
+ checked={false}
450
+ className="c2"
451
+ disabled={false}
452
+ name="test-id"
453
+ onChange={[Function]}
454
+ onClick={[Function]}
455
+ onDragStart={[Function]}
456
+ onFocus={[Function]}
457
+ onKeyDown={[Function]}
458
+ onKeyUp={[Function]}
459
+ onMouseDown={[Function]}
460
+ onMouseEnter={[Function]}
461
+ onMouseLeave={[Function]}
462
+ onMouseUp={[Function]}
463
+ onTouchCancel={[Function]}
464
+ onTouchEnd={[Function]}
465
+ onTouchMove={[Function]}
466
+ onTouchStart={[Function]}
467
+ tabIndex={0}
468
+ type="radio"
469
+ value="option3"
470
+ />
471
+ <div
472
+ className="c3"
473
+ >
474
+ <div
475
+ className="c4"
476
+ >
477
+ option3
478
+ </div>
479
+ </div>
480
+ </label>
481
+ </div>
482
+ </div>
483
+ `;