@charcoal-ui/react 3.3.0 → 3.5.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 (68) 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/Clickable/index.d.ts.map +1 -1
  4. package/dist/components/DropdownSelector/DropdownPopover.d.ts.map +1 -1
  5. package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
  6. package/dist/components/DropdownSelector/Popover/usePreventScroll.d.ts +2 -0
  7. package/dist/components/DropdownSelector/Popover/usePreventScroll.d.ts.map +1 -0
  8. package/dist/components/DropdownSelector/index.story.d.ts +1 -0
  9. package/dist/components/DropdownSelector/index.story.d.ts.map +1 -1
  10. package/dist/components/Icon/index.story.d.ts +1 -1
  11. package/dist/components/Modal/Dialog/index.d.ts +26 -0
  12. package/dist/components/Modal/Dialog/index.d.ts.map +1 -0
  13. package/dist/components/Modal/ModalBackgroundContext.d.ts +6 -0
  14. package/dist/components/Modal/ModalBackgroundContext.d.ts.map +1 -0
  15. package/dist/components/Modal/ModalPlumbing.d.ts.map +1 -1
  16. package/dist/components/Modal/__stories__/InternalScrollStory.d.ts +4 -0
  17. package/dist/components/Modal/__stories__/InternalScrollStory.d.ts.map +1 -0
  18. package/dist/components/Modal/index.d.ts +12 -2
  19. package/dist/components/Modal/index.d.ts.map +1 -1
  20. package/dist/components/Modal/index.story.d.ts +3 -2
  21. package/dist/components/Modal/index.story.d.ts.map +1 -1
  22. package/dist/components/TextArea/index.d.ts.map +1 -1
  23. package/dist/components/TextField/index.d.ts +4 -0
  24. package/dist/components/TextField/index.d.ts.map +1 -1
  25. package/dist/components/TextField/useFocusWithClick.d.ts +3 -0
  26. package/dist/components/TextField/useFocusWithClick.d.ts.map +1 -0
  27. package/dist/index.cjs.js +532 -426
  28. package/dist/index.cjs.js.map +1 -1
  29. package/dist/index.esm.js +482 -377
  30. package/dist/index.esm.js.map +1 -1
  31. package/package.json +6 -6
  32. package/src/_lib/useForwardedRef.tsx +16 -0
  33. package/src/components/Button/__snapshots__/index.story.storyshot +1971 -0
  34. package/src/components/Checkbox/__snapshots__/index.story.storyshot +390 -0
  35. package/src/components/Clickable/__snapshots__/index.story.storyshot +100 -0
  36. package/src/components/Clickable/index.tsx +17 -35
  37. package/src/components/DropdownSelector/DropdownPopover.tsx +0 -1
  38. package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +245 -0
  39. package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +555 -0
  40. package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +174 -0
  41. package/src/components/DropdownSelector/Popover/index.tsx +17 -2
  42. package/src/components/DropdownSelector/Popover/usePreventScroll.tsx +18 -0
  43. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +1241 -0
  44. package/src/components/DropdownSelector/index.story.tsx +69 -13
  45. package/src/components/Icon/__snapshots__/index.story.storyshot +12 -0
  46. package/src/components/{Button/__snapshots__/index.test.tsx.snap → IconButton/__snapshots__/index.story.storyshot} +94 -91
  47. package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +81 -0
  48. package/src/components/Modal/Dialog/index.tsx +82 -0
  49. package/src/components/Modal/ModalBackgroundContext.tsx +8 -0
  50. package/src/components/Modal/ModalPlumbing.tsx +16 -4
  51. package/src/components/Modal/__snapshots__/index.story.storyshot +533 -0
  52. package/src/components/Modal/__stories__/InternalScrollStory.tsx +75 -0
  53. package/src/components/Modal/index.story.tsx +57 -38
  54. package/src/components/Modal/index.tsx +63 -94
  55. package/src/components/MultiSelect/__snapshots__/index.story.storyshot +511 -0
  56. package/src/components/Radio/__snapshots__/index.story.storyshot +319 -0
  57. package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +483 -0
  58. package/src/components/Switch/__snapshots__/index.story.storyshot +454 -0
  59. package/src/components/TagItem/__snapshots__/index.story.storyshot +1181 -0
  60. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +1114 -0
  61. package/src/components/TextArea/index.tsx +38 -43
  62. package/src/components/TextField/TextField.story.tsx +2 -3
  63. package/src/components/TextField/__snapshots__/TextField.story.storyshot +1603 -0
  64. package/src/components/TextField/index.tsx +86 -84
  65. package/src/components/TextField/useFocusWithClick.tsx +22 -0
  66. package/dist/components/Button/index.test.d.ts +0 -4
  67. package/dist/components/Button/index.test.d.ts.map +0 -1
  68. package/src/components/Button/index.test.tsx +0 -24
@@ -0,0 +1,1114 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Storyshots TextArea Auto Height 1`] = `
4
+ .c3 {
5
+ font-size: 14px;
6
+ line-height: 22px;
7
+ font-weight: bold;
8
+ display: flow-root;
9
+ color: var(--charcoal-text1);
10
+ }
11
+
12
+ .c3::before {
13
+ display: block;
14
+ width: 0;
15
+ height: 0;
16
+ content: '';
17
+ margin-top: -4px;
18
+ }
19
+
20
+ .c3::after {
21
+ display: block;
22
+ width: 0;
23
+ height: 0;
24
+ content: '';
25
+ margin-bottom: -4px;
26
+ }
27
+
28
+ .c5 {
29
+ font-size: 14px;
30
+ line-height: 22px;
31
+ display: flow-root;
32
+ color: var(--charcoal-text3);
33
+ -webkit-transition: 0.2s color,0.2s box-shadow;
34
+ transition: 0.2s color,0.2s box-shadow;
35
+ }
36
+
37
+ .c5::before {
38
+ display: block;
39
+ width: 0;
40
+ height: 0;
41
+ content: '';
42
+ margin-top: -4px;
43
+ }
44
+
45
+ .c5::after {
46
+ display: block;
47
+ width: 0;
48
+ height: 0;
49
+ content: '';
50
+ margin-bottom: -4px;
51
+ }
52
+
53
+ .c5:hover:not(:disabled):not([aria-disabled]),
54
+ .c5:hover[aria-disabled=false] {
55
+ color: var(--charcoal-text3-hover);
56
+ }
57
+
58
+ .c5:active:not(:disabled):not([aria-disabled]),
59
+ .c5:active[aria-disabled=false] {
60
+ color: var(--charcoal-text3-press);
61
+ }
62
+
63
+ .c5:not(:disabled):not([aria-disabled]):focus,
64
+ .c5[aria-disabled=false]:focus,
65
+ .c5:not(:disabled):not([aria-disabled]):active,
66
+ .c5[aria-disabled=false]:active {
67
+ outline: none;
68
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
69
+ }
70
+
71
+ .c5:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
72
+ .c5[aria-disabled=false]:focus:not(:focus-visible),
73
+ .c5:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
74
+ .c5[aria-disabled=false]:active:not(:focus-visible) {
75
+ outline: none;
76
+ }
77
+
78
+ .c5:not(:disabled):not([aria-disabled]):focus-visible,
79
+ .c5[aria-disabled=false]:focus-visible {
80
+ outline: none;
81
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
82
+ }
83
+
84
+ .c1 {
85
+ display: -webkit-inline-box;
86
+ display: -webkit-inline-flex;
87
+ display: -ms-inline-flexbox;
88
+ display: inline-flex;
89
+ -webkit-align-items: center;
90
+ -webkit-box-align: center;
91
+ -ms-flex-align: center;
92
+ align-items: center;
93
+ }
94
+
95
+ .c1 > .c4 {
96
+ margin-left: auto;
97
+ }
98
+
99
+ .c2 {
100
+ margin-bottom: 8px;
101
+ }
102
+
103
+ .c0 {
104
+ display: -webkit-box;
105
+ display: -webkit-flex;
106
+ display: -ms-flexbox;
107
+ display: flex;
108
+ -webkit-flex-direction: column;
109
+ -ms-flex-direction: column;
110
+ flex-direction: column;
111
+ }
112
+
113
+ .c6 {
114
+ position: relative;
115
+ overflow: hidden;
116
+ color: var(--charcoal-text2);
117
+ background-color: var(--charcoal-surface3);
118
+ border-radius: 4px;
119
+ -webkit-transition: 0.2s background-color,0.2s box-shadow;
120
+ transition: 0.2s background-color,0.2s box-shadow;
121
+ height: calc(22px * 4 + 18px);
122
+ }
123
+
124
+ .c6:not([aria-disabled]):hover,
125
+ .c6 [aria-disabled='false']:hover {
126
+ background-color: var(--charcoal-surface3-hover);
127
+ }
128
+
129
+ .c6:focus-within {
130
+ outline: none;
131
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
132
+ }
133
+
134
+ .c7 {
135
+ border: none;
136
+ outline: none;
137
+ resize: none;
138
+ font-family: inherit;
139
+ color: inherit;
140
+ box-sizing: border-box;
141
+ -webkit-transform-origin: top left;
142
+ -ms-transform-origin: top left;
143
+ transform-origin: top left;
144
+ -webkit-transform: scale(0.875);
145
+ -ms-transform: scale(0.875);
146
+ transform: scale(0.875);
147
+ width: calc(100% / 0.875);
148
+ font-size: calc(14px / 0.875);
149
+ line-height: calc(22px / 0.875);
150
+ padding: calc(9px / 0.875) calc(8px / 0.875);
151
+ height: calc(22px / 0.875 * 4 + 20px);
152
+ -webkit-appearance: none;
153
+ -moz-appearance: none;
154
+ appearance: none;
155
+ background: none;
156
+ }
157
+
158
+ .c7::-webkit-input-placeholder {
159
+ color: var(--charcoal-text3);
160
+ }
161
+
162
+ .c7::-moz-placeholder {
163
+ color: var(--charcoal-text3);
164
+ }
165
+
166
+ .c7:-ms-input-placeholder {
167
+ color: var(--charcoal-text3);
168
+ }
169
+
170
+ .c7::placeholder {
171
+ color: var(--charcoal-text3);
172
+ }
173
+
174
+ <div
175
+ data-dark={false}
176
+ >
177
+ <div
178
+ className="c0"
179
+ >
180
+ <div
181
+ className="c1 c2"
182
+ style={
183
+ Object {
184
+ "border": 0,
185
+ "clip": "rect(0 0 0 0)",
186
+ "clipPath": "inset(50%)",
187
+ "height": 1,
188
+ "margin": "0 -1px -1px 0",
189
+ "overflow": "hidden",
190
+ "padding": 0,
191
+ "position": "absolute",
192
+ "whiteSpace": "nowrap",
193
+ "width": 1,
194
+ }
195
+ }
196
+ >
197
+ <label
198
+ className="c3"
199
+ htmlFor="test-id"
200
+ id="test-id"
201
+ onBlur={null}
202
+ onFocus={null}
203
+ >
204
+ Label
205
+ </label>
206
+ <div
207
+ className="c4 c5"
208
+ >
209
+ <span />
210
+ </div>
211
+ </div>
212
+ <div
213
+ className="c6"
214
+ rows={4}
215
+ >
216
+ <textarea
217
+ aria-labelledby="test-id"
218
+ className="c7"
219
+ disabled={false}
220
+ id="test-id"
221
+ onChange={[Function]}
222
+ placeholder="TextArea"
223
+ readOnly={false}
224
+ rows={4}
225
+ />
226
+ </div>
227
+ </div>
228
+ </div>
229
+ `;
230
+
231
+ exports[`Storyshots TextArea Default 1`] = `
232
+ .c7 {
233
+ cursor: pointer;
234
+ -webkit-appearance: none;
235
+ -moz-appearance: none;
236
+ appearance: none;
237
+ background: transparent;
238
+ padding: 0;
239
+ border-style: none;
240
+ outline: none;
241
+ color: inherit;
242
+ text-rendering: inherit;
243
+ -webkit-letter-spacing: inherit;
244
+ -moz-letter-spacing: inherit;
245
+ -ms-letter-spacing: inherit;
246
+ letter-spacing: inherit;
247
+ word-spacing: inherit;
248
+ font: inherit;
249
+ margin: 0;
250
+ overflow: visible;
251
+ text-transform: none;
252
+ }
253
+
254
+ .c7:disabled,
255
+ .c7[aria-disabled]:not([aria-disabled=false]) {
256
+ cursor: default;
257
+ }
258
+
259
+ .c7:focus {
260
+ outline: none;
261
+ }
262
+
263
+ .c7::-moz-focus-inner {
264
+ border-style: none;
265
+ padding: 0;
266
+ }
267
+
268
+ .c4 {
269
+ font-size: 14px;
270
+ line-height: 22px;
271
+ font-weight: bold;
272
+ display: flow-root;
273
+ color: var(--charcoal-text1);
274
+ }
275
+
276
+ .c4::before {
277
+ display: block;
278
+ width: 0;
279
+ height: 0;
280
+ content: '';
281
+ margin-top: -4px;
282
+ }
283
+
284
+ .c4::after {
285
+ display: block;
286
+ width: 0;
287
+ height: 0;
288
+ content: '';
289
+ margin-bottom: -4px;
290
+ }
291
+
292
+ .c6 {
293
+ font-size: 14px;
294
+ line-height: 22px;
295
+ display: flow-root;
296
+ color: var(--charcoal-text3);
297
+ -webkit-transition: 0.2s color,0.2s box-shadow;
298
+ transition: 0.2s color,0.2s box-shadow;
299
+ }
300
+
301
+ .c6::before {
302
+ display: block;
303
+ width: 0;
304
+ height: 0;
305
+ content: '';
306
+ margin-top: -4px;
307
+ }
308
+
309
+ .c6::after {
310
+ display: block;
311
+ width: 0;
312
+ height: 0;
313
+ content: '';
314
+ margin-bottom: -4px;
315
+ }
316
+
317
+ .c6:hover:not(:disabled):not([aria-disabled]),
318
+ .c6:hover[aria-disabled=false] {
319
+ color: var(--charcoal-text3-hover);
320
+ }
321
+
322
+ .c6:active:not(:disabled):not([aria-disabled]),
323
+ .c6:active[aria-disabled=false] {
324
+ color: var(--charcoal-text3-press);
325
+ }
326
+
327
+ .c6:not(:disabled):not([aria-disabled]):focus,
328
+ .c6[aria-disabled=false]:focus,
329
+ .c6:not(:disabled):not([aria-disabled]):active,
330
+ .c6[aria-disabled=false]:active {
331
+ outline: none;
332
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
333
+ }
334
+
335
+ .c6:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
336
+ .c6[aria-disabled=false]:focus:not(:focus-visible),
337
+ .c6:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
338
+ .c6[aria-disabled=false]:active:not(:focus-visible) {
339
+ outline: none;
340
+ }
341
+
342
+ .c6:not(:disabled):not([aria-disabled]):focus-visible,
343
+ .c6[aria-disabled=false]:focus-visible {
344
+ outline: none;
345
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
346
+ }
347
+
348
+ .c2 {
349
+ display: -webkit-inline-box;
350
+ display: -webkit-inline-flex;
351
+ display: -ms-inline-flexbox;
352
+ display: inline-flex;
353
+ -webkit-align-items: center;
354
+ -webkit-box-align: center;
355
+ -ms-flex-align: center;
356
+ align-items: center;
357
+ }
358
+
359
+ .c2 > .c5 {
360
+ margin-left: auto;
361
+ }
362
+
363
+ .c3 {
364
+ margin-bottom: 8px;
365
+ }
366
+
367
+ .c1 {
368
+ display: -webkit-box;
369
+ display: -webkit-flex;
370
+ display: -ms-flexbox;
371
+ display: flex;
372
+ -webkit-flex-direction: column;
373
+ -ms-flex-direction: column;
374
+ flex-direction: column;
375
+ }
376
+
377
+ .c8 {
378
+ position: relative;
379
+ overflow: hidden;
380
+ color: var(--charcoal-text2);
381
+ background-color: var(--charcoal-surface3);
382
+ border-radius: 4px;
383
+ -webkit-transition: 0.2s background-color,0.2s box-shadow;
384
+ transition: 0.2s background-color,0.2s box-shadow;
385
+ height: calc(22px * 4 + 18px);
386
+ }
387
+
388
+ .c8:not([aria-disabled]):hover,
389
+ .c8 [aria-disabled='false']:hover {
390
+ background-color: var(--charcoal-surface3-hover);
391
+ }
392
+
393
+ .c8:focus-within {
394
+ outline: none;
395
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
396
+ }
397
+
398
+ .c9 {
399
+ border: none;
400
+ outline: none;
401
+ resize: none;
402
+ font-family: inherit;
403
+ color: inherit;
404
+ box-sizing: border-box;
405
+ -webkit-transform-origin: top left;
406
+ -ms-transform-origin: top left;
407
+ transform-origin: top left;
408
+ -webkit-transform: scale(0.875);
409
+ -ms-transform: scale(0.875);
410
+ transform: scale(0.875);
411
+ width: calc(100% / 0.875);
412
+ font-size: calc(14px / 0.875);
413
+ line-height: calc(22px / 0.875);
414
+ padding: calc(9px / 0.875) calc(8px / 0.875);
415
+ height: calc(22px / 0.875 * 4 + 20px);
416
+ -webkit-appearance: none;
417
+ -moz-appearance: none;
418
+ appearance: none;
419
+ background: none;
420
+ }
421
+
422
+ .c9::-webkit-input-placeholder {
423
+ color: var(--charcoal-text3);
424
+ }
425
+
426
+ .c9::-moz-placeholder {
427
+ color: var(--charcoal-text3);
428
+ }
429
+
430
+ .c9:-ms-input-placeholder {
431
+ color: var(--charcoal-text3);
432
+ }
433
+
434
+ .c9::placeholder {
435
+ color: var(--charcoal-text3);
436
+ }
437
+
438
+ .c0 {
439
+ display: grid;
440
+ gap: 24px;
441
+ }
442
+
443
+ <div
444
+ data-dark={false}
445
+ >
446
+ <div
447
+ className="c0"
448
+ >
449
+ <div
450
+ className="c1"
451
+ >
452
+ <div
453
+ className="c2 c3"
454
+ style={
455
+ Object {
456
+ "border": 0,
457
+ "clip": "rect(0 0 0 0)",
458
+ "clipPath": "inset(50%)",
459
+ "height": 1,
460
+ "margin": "0 -1px -1px 0",
461
+ "overflow": "hidden",
462
+ "padding": 0,
463
+ "position": "absolute",
464
+ "whiteSpace": "nowrap",
465
+ "width": 1,
466
+ }
467
+ }
468
+ >
469
+ <label
470
+ className="c4"
471
+ htmlFor="test-id"
472
+ id="test-id"
473
+ onBlur={null}
474
+ onFocus={null}
475
+ >
476
+ Label
477
+ </label>
478
+ <div
479
+ className="c5 c6"
480
+ >
481
+ <span>
482
+ <button
483
+ className="c7"
484
+ onClick={[Function]}
485
+ >
486
+ Text Link
487
+ </button>
488
+ </span>
489
+ </div>
490
+ </div>
491
+ <div
492
+ className="c8"
493
+ rows={4}
494
+ >
495
+ <textarea
496
+ aria-labelledby="test-id"
497
+ className="c9"
498
+ disabled={false}
499
+ id="test-id"
500
+ onChange={[Function]}
501
+ placeholder="Text Area"
502
+ readOnly={false}
503
+ rows={4}
504
+ />
505
+ </div>
506
+ </div>
507
+ </div>
508
+ </div>
509
+ `;
510
+
511
+ exports[`Storyshots TextArea Has Count 1`] = `
512
+ .c7 {
513
+ cursor: pointer;
514
+ -webkit-appearance: none;
515
+ -moz-appearance: none;
516
+ appearance: none;
517
+ background: transparent;
518
+ padding: 0;
519
+ border-style: none;
520
+ outline: none;
521
+ color: inherit;
522
+ text-rendering: inherit;
523
+ -webkit-letter-spacing: inherit;
524
+ -moz-letter-spacing: inherit;
525
+ -ms-letter-spacing: inherit;
526
+ letter-spacing: inherit;
527
+ word-spacing: inherit;
528
+ font: inherit;
529
+ margin: 0;
530
+ overflow: visible;
531
+ text-transform: none;
532
+ }
533
+
534
+ .c7:disabled,
535
+ .c7[aria-disabled]:not([aria-disabled=false]) {
536
+ cursor: default;
537
+ }
538
+
539
+ .c7:focus {
540
+ outline: none;
541
+ }
542
+
543
+ .c7::-moz-focus-inner {
544
+ border-style: none;
545
+ padding: 0;
546
+ }
547
+
548
+ .c4 {
549
+ font-size: 14px;
550
+ line-height: 22px;
551
+ font-weight: bold;
552
+ display: flow-root;
553
+ color: var(--charcoal-text1);
554
+ }
555
+
556
+ .c4::before {
557
+ display: block;
558
+ width: 0;
559
+ height: 0;
560
+ content: '';
561
+ margin-top: -4px;
562
+ }
563
+
564
+ .c4::after {
565
+ display: block;
566
+ width: 0;
567
+ height: 0;
568
+ content: '';
569
+ margin-bottom: -4px;
570
+ }
571
+
572
+ .c6 {
573
+ font-size: 14px;
574
+ line-height: 22px;
575
+ display: flow-root;
576
+ color: var(--charcoal-text3);
577
+ -webkit-transition: 0.2s color,0.2s box-shadow;
578
+ transition: 0.2s color,0.2s box-shadow;
579
+ }
580
+
581
+ .c6::before {
582
+ display: block;
583
+ width: 0;
584
+ height: 0;
585
+ content: '';
586
+ margin-top: -4px;
587
+ }
588
+
589
+ .c6::after {
590
+ display: block;
591
+ width: 0;
592
+ height: 0;
593
+ content: '';
594
+ margin-bottom: -4px;
595
+ }
596
+
597
+ .c6:hover:not(:disabled):not([aria-disabled]),
598
+ .c6:hover[aria-disabled=false] {
599
+ color: var(--charcoal-text3-hover);
600
+ }
601
+
602
+ .c6:active:not(:disabled):not([aria-disabled]),
603
+ .c6:active[aria-disabled=false] {
604
+ color: var(--charcoal-text3-press);
605
+ }
606
+
607
+ .c6:not(:disabled):not([aria-disabled]):focus,
608
+ .c6[aria-disabled=false]:focus,
609
+ .c6:not(:disabled):not([aria-disabled]):active,
610
+ .c6[aria-disabled=false]:active {
611
+ outline: none;
612
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
613
+ }
614
+
615
+ .c6:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
616
+ .c6[aria-disabled=false]:focus:not(:focus-visible),
617
+ .c6:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
618
+ .c6[aria-disabled=false]:active:not(:focus-visible) {
619
+ outline: none;
620
+ }
621
+
622
+ .c6:not(:disabled):not([aria-disabled]):focus-visible,
623
+ .c6[aria-disabled=false]:focus-visible {
624
+ outline: none;
625
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
626
+ }
627
+
628
+ .c2 {
629
+ display: -webkit-inline-box;
630
+ display: -webkit-inline-flex;
631
+ display: -ms-inline-flexbox;
632
+ display: inline-flex;
633
+ -webkit-align-items: center;
634
+ -webkit-box-align: center;
635
+ -ms-flex-align: center;
636
+ align-items: center;
637
+ }
638
+
639
+ .c2 > .c5 {
640
+ margin-left: auto;
641
+ }
642
+
643
+ .c3 {
644
+ margin-bottom: 8px;
645
+ }
646
+
647
+ .c1 {
648
+ display: -webkit-box;
649
+ display: -webkit-flex;
650
+ display: -ms-flexbox;
651
+ display: flex;
652
+ -webkit-flex-direction: column;
653
+ -ms-flex-direction: column;
654
+ flex-direction: column;
655
+ }
656
+
657
+ .c8 {
658
+ position: relative;
659
+ overflow: hidden;
660
+ color: var(--charcoal-text2);
661
+ background-color: var(--charcoal-surface3);
662
+ border-radius: 4px;
663
+ -webkit-transition: 0.2s background-color,0.2s box-shadow;
664
+ transition: 0.2s background-color,0.2s box-shadow;
665
+ height: calc(22px * 5 + 18px);
666
+ }
667
+
668
+ .c8:not([aria-disabled]):hover,
669
+ .c8 [aria-disabled='false']:hover {
670
+ background-color: var(--charcoal-surface3-hover);
671
+ }
672
+
673
+ .c8:focus-within {
674
+ outline: none;
675
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
676
+ }
677
+
678
+ .c9 {
679
+ border: none;
680
+ outline: none;
681
+ resize: none;
682
+ font-family: inherit;
683
+ color: inherit;
684
+ box-sizing: border-box;
685
+ -webkit-transform-origin: top left;
686
+ -ms-transform-origin: top left;
687
+ transform-origin: top left;
688
+ -webkit-transform: scale(0.875);
689
+ -ms-transform: scale(0.875);
690
+ transform: scale(0.875);
691
+ width: calc(100% / 0.875);
692
+ font-size: calc(14px / 0.875);
693
+ line-height: calc(22px / 0.875);
694
+ padding: calc(9px / 0.875) calc(8px / 0.875) 0;
695
+ height: calc(22px / 0.875 * 4 + 9px);
696
+ -webkit-appearance: none;
697
+ -moz-appearance: none;
698
+ appearance: none;
699
+ background: none;
700
+ }
701
+
702
+ .c9::-webkit-input-placeholder {
703
+ color: var(--charcoal-text3);
704
+ }
705
+
706
+ .c9::-moz-placeholder {
707
+ color: var(--charcoal-text3);
708
+ }
709
+
710
+ .c9:-ms-input-placeholder {
711
+ color: var(--charcoal-text3);
712
+ }
713
+
714
+ .c9::placeholder {
715
+ color: var(--charcoal-text3);
716
+ }
717
+
718
+ .c10 {
719
+ position: absolute;
720
+ bottom: 9px;
721
+ right: 8px;
722
+ line-height: 22px;
723
+ font-size: 14px;
724
+ color: var(--charcoal-text3);
725
+ }
726
+
727
+ .c0 {
728
+ display: grid;
729
+ gap: 24px;
730
+ }
731
+
732
+ <div
733
+ data-dark={false}
734
+ >
735
+ <div
736
+ className="c0"
737
+ >
738
+ <div
739
+ className="c1"
740
+ >
741
+ <div
742
+ className="c2 c3"
743
+ style={
744
+ Object {
745
+ "border": 0,
746
+ "clip": "rect(0 0 0 0)",
747
+ "clipPath": "inset(50%)",
748
+ "height": 1,
749
+ "margin": "0 -1px -1px 0",
750
+ "overflow": "hidden",
751
+ "padding": 0,
752
+ "position": "absolute",
753
+ "whiteSpace": "nowrap",
754
+ "width": 1,
755
+ }
756
+ }
757
+ >
758
+ <label
759
+ className="c4"
760
+ htmlFor="test-id"
761
+ id="test-id"
762
+ onBlur={null}
763
+ onFocus={null}
764
+ >
765
+ Label
766
+ </label>
767
+ <div
768
+ className="c5 c6"
769
+ >
770
+ <span>
771
+ <button
772
+ className="c7"
773
+ onClick={[Function]}
774
+ >
775
+ Text Link
776
+ </button>
777
+ </span>
778
+ </div>
779
+ </div>
780
+ <div
781
+ className="c8"
782
+ rows={5}
783
+ >
784
+ <textarea
785
+ aria-labelledby="test-id"
786
+ className="c9"
787
+ disabled={false}
788
+ id="test-id"
789
+ maxLength={100}
790
+ onChange={[Function]}
791
+ placeholder="Text Area"
792
+ readOnly={false}
793
+ rows={4}
794
+ />
795
+ <span
796
+ className="c10"
797
+ >
798
+ 0/100
799
+ </span>
800
+ </div>
801
+ </div>
802
+ </div>
803
+ </div>
804
+ `;
805
+
806
+ exports[`Storyshots TextArea Has Label 1`] = `
807
+ .c9 {
808
+ cursor: pointer;
809
+ -webkit-appearance: none;
810
+ -moz-appearance: none;
811
+ appearance: none;
812
+ background: transparent;
813
+ padding: 0;
814
+ border-style: none;
815
+ outline: none;
816
+ color: inherit;
817
+ text-rendering: inherit;
818
+ -webkit-letter-spacing: inherit;
819
+ -moz-letter-spacing: inherit;
820
+ -ms-letter-spacing: inherit;
821
+ letter-spacing: inherit;
822
+ word-spacing: inherit;
823
+ font: inherit;
824
+ margin: 0;
825
+ overflow: visible;
826
+ text-transform: none;
827
+ }
828
+
829
+ .c9:disabled,
830
+ .c9[aria-disabled]:not([aria-disabled=false]) {
831
+ cursor: default;
832
+ }
833
+
834
+ .c9:focus {
835
+ outline: none;
836
+ }
837
+
838
+ .c9::-moz-focus-inner {
839
+ border-style: none;
840
+ padding: 0;
841
+ }
842
+
843
+ .c4 {
844
+ font-size: 14px;
845
+ line-height: 22px;
846
+ font-weight: bold;
847
+ display: flow-root;
848
+ color: var(--charcoal-text1);
849
+ }
850
+
851
+ .c4::before {
852
+ display: block;
853
+ width: 0;
854
+ height: 0;
855
+ content: '';
856
+ margin-top: -4px;
857
+ }
858
+
859
+ .c4::after {
860
+ display: block;
861
+ width: 0;
862
+ height: 0;
863
+ content: '';
864
+ margin-bottom: -4px;
865
+ }
866
+
867
+ .c6 {
868
+ font-size: 14px;
869
+ line-height: 22px;
870
+ display: flow-root;
871
+ color: var(--charcoal-text2);
872
+ }
873
+
874
+ .c6::before {
875
+ display: block;
876
+ width: 0;
877
+ height: 0;
878
+ content: '';
879
+ margin-top: -4px;
880
+ }
881
+
882
+ .c6::after {
883
+ display: block;
884
+ width: 0;
885
+ height: 0;
886
+ content: '';
887
+ margin-bottom: -4px;
888
+ }
889
+
890
+ .c8 {
891
+ font-size: 14px;
892
+ line-height: 22px;
893
+ display: flow-root;
894
+ color: var(--charcoal-text3);
895
+ -webkit-transition: 0.2s color,0.2s box-shadow;
896
+ transition: 0.2s color,0.2s box-shadow;
897
+ }
898
+
899
+ .c8::before {
900
+ display: block;
901
+ width: 0;
902
+ height: 0;
903
+ content: '';
904
+ margin-top: -4px;
905
+ }
906
+
907
+ .c8::after {
908
+ display: block;
909
+ width: 0;
910
+ height: 0;
911
+ content: '';
912
+ margin-bottom: -4px;
913
+ }
914
+
915
+ .c8:hover:not(:disabled):not([aria-disabled]),
916
+ .c8:hover[aria-disabled=false] {
917
+ color: var(--charcoal-text3-hover);
918
+ }
919
+
920
+ .c8:active:not(:disabled):not([aria-disabled]),
921
+ .c8:active[aria-disabled=false] {
922
+ color: var(--charcoal-text3-press);
923
+ }
924
+
925
+ .c8:not(:disabled):not([aria-disabled]):focus,
926
+ .c8[aria-disabled=false]:focus,
927
+ .c8:not(:disabled):not([aria-disabled]):active,
928
+ .c8[aria-disabled=false]:active {
929
+ outline: none;
930
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
931
+ }
932
+
933
+ .c8:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
934
+ .c8[aria-disabled=false]:focus:not(:focus-visible),
935
+ .c8:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
936
+ .c8[aria-disabled=false]:active:not(:focus-visible) {
937
+ outline: none;
938
+ }
939
+
940
+ .c8:not(:disabled):not([aria-disabled]):focus-visible,
941
+ .c8[aria-disabled=false]:focus-visible {
942
+ outline: none;
943
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
944
+ }
945
+
946
+ .c2 {
947
+ display: -webkit-inline-box;
948
+ display: -webkit-inline-flex;
949
+ display: -ms-inline-flexbox;
950
+ display: inline-flex;
951
+ -webkit-align-items: center;
952
+ -webkit-box-align: center;
953
+ -ms-flex-align: center;
954
+ align-items: center;
955
+ }
956
+
957
+ .c2 > .c5 {
958
+ margin-left: 4px;
959
+ }
960
+
961
+ .c2 > .c7 {
962
+ margin-left: auto;
963
+ }
964
+
965
+ .c3 {
966
+ margin-bottom: 8px;
967
+ }
968
+
969
+ .c12 {
970
+ font-size: 14px;
971
+ line-height: 22px;
972
+ margin-top: 4px;
973
+ margin-bottom: -4px;
974
+ color: var(--charcoal-text2);
975
+ }
976
+
977
+ .c1 {
978
+ display: -webkit-box;
979
+ display: -webkit-flex;
980
+ display: -ms-flexbox;
981
+ display: flex;
982
+ -webkit-flex-direction: column;
983
+ -ms-flex-direction: column;
984
+ flex-direction: column;
985
+ }
986
+
987
+ .c10 {
988
+ position: relative;
989
+ overflow: hidden;
990
+ color: var(--charcoal-text2);
991
+ background-color: var(--charcoal-surface3);
992
+ border-radius: 4px;
993
+ -webkit-transition: 0.2s background-color,0.2s box-shadow;
994
+ transition: 0.2s background-color,0.2s box-shadow;
995
+ height: calc(22px * 4 + 18px);
996
+ }
997
+
998
+ .c10:not([aria-disabled]):hover,
999
+ .c10 [aria-disabled='false']:hover {
1000
+ background-color: var(--charcoal-surface3-hover);
1001
+ }
1002
+
1003
+ .c10:focus-within {
1004
+ outline: none;
1005
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1006
+ }
1007
+
1008
+ .c11 {
1009
+ border: none;
1010
+ outline: none;
1011
+ resize: none;
1012
+ font-family: inherit;
1013
+ color: inherit;
1014
+ box-sizing: border-box;
1015
+ -webkit-transform-origin: top left;
1016
+ -ms-transform-origin: top left;
1017
+ transform-origin: top left;
1018
+ -webkit-transform: scale(0.875);
1019
+ -ms-transform: scale(0.875);
1020
+ transform: scale(0.875);
1021
+ width: calc(100% / 0.875);
1022
+ font-size: calc(14px / 0.875);
1023
+ line-height: calc(22px / 0.875);
1024
+ padding: calc(9px / 0.875) calc(8px / 0.875);
1025
+ height: calc(22px / 0.875 * 4 + 20px);
1026
+ -webkit-appearance: none;
1027
+ -moz-appearance: none;
1028
+ appearance: none;
1029
+ background: none;
1030
+ }
1031
+
1032
+ .c11::-webkit-input-placeholder {
1033
+ color: var(--charcoal-text3);
1034
+ }
1035
+
1036
+ .c11::-moz-placeholder {
1037
+ color: var(--charcoal-text3);
1038
+ }
1039
+
1040
+ .c11:-ms-input-placeholder {
1041
+ color: var(--charcoal-text3);
1042
+ }
1043
+
1044
+ .c11::placeholder {
1045
+ color: var(--charcoal-text3);
1046
+ }
1047
+
1048
+ .c0 {
1049
+ display: grid;
1050
+ gap: 24px;
1051
+ }
1052
+
1053
+ <div
1054
+ data-dark={false}
1055
+ >
1056
+ <div
1057
+ className="c0"
1058
+ >
1059
+ <div
1060
+ className="c1"
1061
+ >
1062
+ <div
1063
+ className="c2 c3"
1064
+ >
1065
+ <label
1066
+ className="c4"
1067
+ htmlFor="test-id"
1068
+ id="test-id"
1069
+ >
1070
+ Label
1071
+ </label>
1072
+ <span
1073
+ className="c5 c6"
1074
+ >
1075
+ *必須
1076
+ </span>
1077
+ <div
1078
+ className="c7 c8"
1079
+ >
1080
+ <span>
1081
+ <button
1082
+ className="c9"
1083
+ onClick={[Function]}
1084
+ >
1085
+ Text Link
1086
+ </button>
1087
+ </span>
1088
+ </div>
1089
+ </div>
1090
+ <div
1091
+ className="c10"
1092
+ rows={4}
1093
+ >
1094
+ <textarea
1095
+ aria-labelledby="test-id"
1096
+ aria-required={true}
1097
+ className="c11"
1098
+ disabled={false}
1099
+ id="test-id"
1100
+ onChange={[Function]}
1101
+ placeholder="Text Area"
1102
+ readOnly={false}
1103
+ rows={4}
1104
+ />
1105
+ </div>
1106
+ <p
1107
+ className="c12"
1108
+ >
1109
+ Assistive text
1110
+ </p>
1111
+ </div>
1112
+ </div>
1113
+ </div>
1114
+ `;