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