@charcoal-ui/react 4.0.0-beta.6 → 4.0.0-beta.7

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 (29) hide show
  1. package/dist/_lib/createDivComponent.d.ts +4 -0
  2. package/dist/_lib/createDivComponent.d.ts.map +1 -0
  3. package/dist/components/Modal/ModalPlumbing.d.ts.map +1 -1
  4. package/dist/components/TextArea/index.d.ts +1 -0
  5. package/dist/components/TextArea/index.d.ts.map +1 -1
  6. package/dist/components/TextField/AssistiveText/index.d.ts +5 -0
  7. package/dist/components/TextField/AssistiveText/index.d.ts.map +1 -0
  8. package/dist/components/TextField/index.d.ts +1 -3
  9. package/dist/components/TextField/index.d.ts.map +1 -1
  10. package/dist/index.cjs.js +209 -239
  11. package/dist/index.cjs.js.map +1 -1
  12. package/dist/index.css +156 -0
  13. package/dist/index.css.map +1 -1
  14. package/dist/index.esm.js +127 -157
  15. package/dist/index.esm.js.map +1 -1
  16. package/package.json +8 -8
  17. package/src/_lib/createDivComponent.tsx +11 -0
  18. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +8 -20
  19. package/src/components/DropdownSelector/index.tsx +2 -2
  20. package/src/components/Modal/ModalPlumbing.tsx +2 -11
  21. package/src/components/Modal/__snapshots__/index.story.storyshot +84 -276
  22. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +141 -813
  23. package/src/components/TextArea/index.css +78 -0
  24. package/src/components/TextArea/index.tsx +26 -96
  25. package/src/components/TextField/AssistiveText/index.css +10 -0
  26. package/src/components/TextField/AssistiveText/index.tsx +6 -0
  27. package/src/components/TextField/__snapshots__/TextField.story.storyshot +109 -1059
  28. package/src/components/TextField/index.css +87 -0
  29. package/src/components/TextField/index.tsx +24 -117
@@ -1,85 +1,12 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Storybook Tests react/TextArea AssistiveText 1`] = `
4
- .c3 {
5
- font-size: 14px;
6
- line-height: 22px;
7
- margin: 0;
8
- color: var(--charcoal-text2);
9
- }
10
-
11
- .c0 {
12
- display: grid;
13
- grid-template-columns: 1fr;
14
- grid-gap: 4px;
15
- }
16
-
17
- .c1 {
18
- position: relative;
19
- overflow: hidden;
20
- color: var(--charcoal-text2);
21
- background-color: var(--charcoal-surface3);
22
- border-radius: 4px;
23
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
24
- transition: 0.2s background-color,0.2s box-shadow;
25
- height: calc(22px * 4 + 18px);
26
- }
27
-
28
- .c1:not([aria-disabled]):hover,
29
- .c1 [aria-disabled='false']:hover {
30
- background-color: var(--charcoal-surface3-hover);
31
- }
32
-
33
- .c1:focus-within {
34
- outline: none;
35
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
36
- }
37
-
38
- .c2 {
39
- border: none;
40
- outline: none;
41
- resize: none;
42
- font-family: inherit;
43
- color: inherit;
44
- box-sizing: border-box;
45
- -webkit-transform-origin: top left;
46
- -ms-transform-origin: top left;
47
- transform-origin: top left;
48
- -webkit-transform: scale(0.875);
49
- -ms-transform: scale(0.875);
50
- transform: scale(0.875);
51
- width: calc(100% / 0.875);
52
- font-size: calc(14px / 0.875);
53
- line-height: calc(22px / 0.875);
54
- padding: calc(9px / 0.875) calc(8px / 0.875);
55
- height: calc(22px / 0.875 * 4 + 20px);
56
- -webkit-appearance: none;
57
- -moz-appearance: none;
58
- appearance: none;
59
- background: none;
60
- }
61
-
62
- .c2::-webkit-input-placeholder {
63
- color: var(--charcoal-text3);
64
- }
65
-
66
- .c2::-moz-placeholder {
67
- color: var(--charcoal-text3);
68
- }
69
-
70
- .c2:-ms-input-placeholder {
71
- color: var(--charcoal-text3);
72
- }
73
-
74
- .c2::placeholder {
75
- color: var(--charcoal-text3);
76
- }
77
-
78
4
  <div
79
5
  data-dark={false}
80
6
  >
81
7
  <div
82
- className="c0"
8
+ aria-disabled={false}
9
+ className="charcoal-text-area-root"
83
10
  >
84
11
  <div
85
12
  className="charcoal-field-label-root"
@@ -112,101 +39,43 @@ exports[`Storybook Tests react/TextArea AssistiveText 1`] = `
112
39
  </div>
113
40
  </div>
114
41
  <div
115
- className="c1"
116
- rows={4}
42
+ aria-invalid={false}
43
+ className="charcoal-text-area-container"
44
+ style={
45
+ Object {
46
+ "--charcoal-text-area-rows": "4",
47
+ }
48
+ }
117
49
  >
118
50
  <textarea
119
51
  aria-describedby="test-id"
120
52
  aria-labelledby="test-id"
121
- className="c2"
53
+ className="charcoal-text-area-textarea"
54
+ data-no-bottom-padding={false}
55
+ disabled={false}
122
56
  id="test-id"
123
57
  onChange={[Function]}
124
58
  rows={4}
125
59
  />
126
60
  </div>
127
- <p
128
- className="c3"
61
+ <div
62
+ className="charcoal-text-field-assistive-text"
63
+ data-invalid={false}
129
64
  id="test-id"
130
65
  >
131
66
  説明が入ります
132
- </p>
67
+ </div>
133
68
  </div>
134
69
  </div>
135
70
  `;
136
71
 
137
72
  exports[`Storybook Tests react/TextArea AutoHeight 1`] = `
138
- .c0 {
139
- display: grid;
140
- grid-template-columns: 1fr;
141
- grid-gap: 4px;
142
- }
143
-
144
- .c1 {
145
- position: relative;
146
- overflow: hidden;
147
- color: var(--charcoal-text2);
148
- background-color: var(--charcoal-surface3);
149
- border-radius: 4px;
150
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
151
- transition: 0.2s background-color,0.2s box-shadow;
152
- height: calc(22px * 4 + 18px);
153
- }
154
-
155
- .c1:not([aria-disabled]):hover,
156
- .c1 [aria-disabled='false']:hover {
157
- background-color: var(--charcoal-surface3-hover);
158
- }
159
-
160
- .c1:focus-within {
161
- outline: none;
162
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
163
- }
164
-
165
- .c2 {
166
- border: none;
167
- outline: none;
168
- resize: none;
169
- font-family: inherit;
170
- color: inherit;
171
- box-sizing: border-box;
172
- -webkit-transform-origin: top left;
173
- -ms-transform-origin: top left;
174
- transform-origin: top left;
175
- -webkit-transform: scale(0.875);
176
- -ms-transform: scale(0.875);
177
- transform: scale(0.875);
178
- width: calc(100% / 0.875);
179
- font-size: calc(14px / 0.875);
180
- line-height: calc(22px / 0.875);
181
- padding: calc(9px / 0.875) calc(8px / 0.875);
182
- height: calc(22px / 0.875 * 4 + 20px);
183
- -webkit-appearance: none;
184
- -moz-appearance: none;
185
- appearance: none;
186
- background: none;
187
- }
188
-
189
- .c2::-webkit-input-placeholder {
190
- color: var(--charcoal-text3);
191
- }
192
-
193
- .c2::-moz-placeholder {
194
- color: var(--charcoal-text3);
195
- }
196
-
197
- .c2:-ms-input-placeholder {
198
- color: var(--charcoal-text3);
199
- }
200
-
201
- .c2::placeholder {
202
- color: var(--charcoal-text3);
203
- }
204
-
205
73
  <div
206
74
  data-dark={false}
207
75
  >
208
76
  <div
209
- className="c0"
77
+ aria-disabled={false}
78
+ className="charcoal-text-area-root"
210
79
  >
211
80
  <div
212
81
  className="charcoal-field-label-root"
@@ -239,12 +108,19 @@ exports[`Storybook Tests react/TextArea AutoHeight 1`] = `
239
108
  </div>
240
109
  </div>
241
110
  <div
242
- className="c1"
243
- rows={4}
111
+ aria-invalid={false}
112
+ className="charcoal-text-area-container"
113
+ style={
114
+ Object {
115
+ "--charcoal-text-area-rows": "4",
116
+ }
117
+ }
244
118
  >
245
119
  <textarea
246
120
  aria-labelledby="test-id"
247
- className="c2"
121
+ className="charcoal-text-area-textarea"
122
+ data-no-bottom-padding={false}
123
+ disabled={false}
248
124
  id="test-id"
249
125
  onChange={[Function]}
250
126
  rows={4}
@@ -255,78 +131,12 @@ exports[`Storybook Tests react/TextArea AutoHeight 1`] = `
255
131
  `;
256
132
 
257
133
  exports[`Storybook Tests react/TextArea Default 1`] = `
258
- .c0 {
259
- display: grid;
260
- grid-template-columns: 1fr;
261
- grid-gap: 4px;
262
- }
263
-
264
- .c1 {
265
- position: relative;
266
- overflow: hidden;
267
- color: var(--charcoal-text2);
268
- background-color: var(--charcoal-surface3);
269
- border-radius: 4px;
270
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
271
- transition: 0.2s background-color,0.2s box-shadow;
272
- height: calc(22px * 4 + 18px);
273
- }
274
-
275
- .c1:not([aria-disabled]):hover,
276
- .c1 [aria-disabled='false']:hover {
277
- background-color: var(--charcoal-surface3-hover);
278
- }
279
-
280
- .c1:focus-within {
281
- outline: none;
282
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
283
- }
284
-
285
- .c2 {
286
- border: none;
287
- outline: none;
288
- resize: none;
289
- font-family: inherit;
290
- color: inherit;
291
- box-sizing: border-box;
292
- -webkit-transform-origin: top left;
293
- -ms-transform-origin: top left;
294
- transform-origin: top left;
295
- -webkit-transform: scale(0.875);
296
- -ms-transform: scale(0.875);
297
- transform: scale(0.875);
298
- width: calc(100% / 0.875);
299
- font-size: calc(14px / 0.875);
300
- line-height: calc(22px / 0.875);
301
- padding: calc(9px / 0.875) calc(8px / 0.875);
302
- height: calc(22px / 0.875 * 4 + 20px);
303
- -webkit-appearance: none;
304
- -moz-appearance: none;
305
- appearance: none;
306
- background: none;
307
- }
308
-
309
- .c2::-webkit-input-placeholder {
310
- color: var(--charcoal-text3);
311
- }
312
-
313
- .c2::-moz-placeholder {
314
- color: var(--charcoal-text3);
315
- }
316
-
317
- .c2:-ms-input-placeholder {
318
- color: var(--charcoal-text3);
319
- }
320
-
321
- .c2::placeholder {
322
- color: var(--charcoal-text3);
323
- }
324
-
325
134
  <div
326
135
  data-dark={false}
327
136
  >
328
137
  <div
329
- className="c0"
138
+ aria-disabled={false}
139
+ className="charcoal-text-area-root"
330
140
  >
331
141
  <div
332
142
  className="charcoal-field-label-root"
@@ -366,13 +176,20 @@ exports[`Storybook Tests react/TextArea Default 1`] = `
366
176
  </div>
367
177
  </div>
368
178
  <div
369
- className="c1"
370
- rows={4}
179
+ aria-invalid={false}
180
+ className="charcoal-text-area-container"
181
+ style={
182
+ Object {
183
+ "--charcoal-text-area-rows": "4",
184
+ }
185
+ }
371
186
  >
372
187
  <textarea
373
188
  aria-invalid={false}
374
189
  aria-labelledby="test-id"
375
- className="c2"
190
+ className="charcoal-text-area-textarea"
191
+ data-no-bottom-padding={false}
192
+ disabled={false}
376
193
  id="test-id"
377
194
  onChange={[Function]}
378
195
  placeholder="Text Area"
@@ -385,79 +202,12 @@ exports[`Storybook Tests react/TextArea Default 1`] = `
385
202
  `;
386
203
 
387
204
  exports[`Storybook Tests react/TextArea Disabled 1`] = `
388
- .c0 {
389
- display: grid;
390
- grid-template-columns: 1fr;
391
- grid-gap: 4px;
392
- opacity: 0.32;
393
- }
394
-
395
- .c1 {
396
- position: relative;
397
- overflow: hidden;
398
- color: var(--charcoal-text2);
399
- background-color: var(--charcoal-surface3);
400
- border-radius: 4px;
401
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
402
- transition: 0.2s background-color,0.2s box-shadow;
403
- height: calc(22px * 4 + 18px);
404
- }
405
-
406
- .c1:not([aria-disabled]):hover,
407
- .c1 [aria-disabled='false']:hover {
408
- background-color: var(--charcoal-surface3-hover);
409
- }
410
-
411
- .c1:focus-within {
412
- outline: none;
413
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
414
- }
415
-
416
- .c2 {
417
- border: none;
418
- outline: none;
419
- resize: none;
420
- font-family: inherit;
421
- color: inherit;
422
- box-sizing: border-box;
423
- -webkit-transform-origin: top left;
424
- -ms-transform-origin: top left;
425
- transform-origin: top left;
426
- -webkit-transform: scale(0.875);
427
- -ms-transform: scale(0.875);
428
- transform: scale(0.875);
429
- width: calc(100% / 0.875);
430
- font-size: calc(14px / 0.875);
431
- line-height: calc(22px / 0.875);
432
- padding: calc(9px / 0.875) calc(8px / 0.875);
433
- height: calc(22px / 0.875 * 4 + 20px);
434
- -webkit-appearance: none;
435
- -moz-appearance: none;
436
- appearance: none;
437
- background: none;
438
- }
439
-
440
- .c2::-webkit-input-placeholder {
441
- color: var(--charcoal-text3);
442
- }
443
-
444
- .c2::-moz-placeholder {
445
- color: var(--charcoal-text3);
446
- }
447
-
448
- .c2:-ms-input-placeholder {
449
- color: var(--charcoal-text3);
450
- }
451
-
452
- .c2::placeholder {
453
- color: var(--charcoal-text3);
454
- }
455
-
456
205
  <div
457
206
  data-dark={false}
458
207
  >
459
208
  <div
460
- className="c0"
209
+ aria-disabled={true}
210
+ className="charcoal-text-area-root"
461
211
  >
462
212
  <div
463
213
  className="charcoal-field-label-root"
@@ -491,12 +241,19 @@ exports[`Storybook Tests react/TextArea Disabled 1`] = `
491
241
  </div>
492
242
  <div
493
243
  aria-disabled="true"
494
- className="c1"
495
- rows={4}
244
+ aria-invalid={false}
245
+ className="charcoal-text-area-container"
246
+ style={
247
+ Object {
248
+ "--charcoal-text-area-rows": "4",
249
+ }
250
+ }
496
251
  >
497
252
  <textarea
498
253
  aria-labelledby="test-id"
499
- className="c2"
254
+ className="charcoal-text-area-textarea"
255
+ data-no-bottom-padding={false}
256
+ disabled={true}
500
257
  id="test-id"
501
258
  onChange={[Function]}
502
259
  rows={4}
@@ -507,86 +264,12 @@ exports[`Storybook Tests react/TextArea Disabled 1`] = `
507
264
  `;
508
265
 
509
266
  exports[`Storybook Tests react/TextArea Invalid 1`] = `
510
- .c3 {
511
- font-size: 14px;
512
- line-height: 22px;
513
- margin: 0;
514
- color: var(--charcoal-assertive);
515
- }
516
-
517
- .c0 {
518
- display: grid;
519
- grid-template-columns: 1fr;
520
- grid-gap: 4px;
521
- }
522
-
523
- .c1 {
524
- position: relative;
525
- overflow: hidden;
526
- color: var(--charcoal-text2);
527
- background-color: var(--charcoal-surface3);
528
- border-radius: 4px;
529
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
530
- transition: 0.2s background-color,0.2s box-shadow;
531
- height: calc(22px * 4 + 18px);
532
- box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
533
- }
534
-
535
- .c1:not([aria-disabled]):hover,
536
- .c1 [aria-disabled='false']:hover {
537
- background-color: var(--charcoal-surface3-hover);
538
- }
539
-
540
- .c1:focus-within {
541
- outline: none;
542
- box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
543
- }
544
-
545
- .c2 {
546
- border: none;
547
- outline: none;
548
- resize: none;
549
- font-family: inherit;
550
- color: inherit;
551
- box-sizing: border-box;
552
- -webkit-transform-origin: top left;
553
- -ms-transform-origin: top left;
554
- transform-origin: top left;
555
- -webkit-transform: scale(0.875);
556
- -ms-transform: scale(0.875);
557
- transform: scale(0.875);
558
- width: calc(100% / 0.875);
559
- font-size: calc(14px / 0.875);
560
- line-height: calc(22px / 0.875);
561
- padding: calc(9px / 0.875) calc(8px / 0.875);
562
- height: calc(22px / 0.875 * 4 + 20px);
563
- -webkit-appearance: none;
564
- -moz-appearance: none;
565
- appearance: none;
566
- background: none;
567
- }
568
-
569
- .c2::-webkit-input-placeholder {
570
- color: var(--charcoal-text3);
571
- }
572
-
573
- .c2::-moz-placeholder {
574
- color: var(--charcoal-text3);
575
- }
576
-
577
- .c2:-ms-input-placeholder {
578
- color: var(--charcoal-text3);
579
- }
580
-
581
- .c2::placeholder {
582
- color: var(--charcoal-text3);
583
- }
584
-
585
267
  <div
586
268
  data-dark={false}
587
269
  >
588
270
  <div
589
- className="c0"
271
+ aria-disabled={false}
272
+ className="charcoal-text-area-root"
590
273
  >
591
274
  <div
592
275
  className="charcoal-field-label-root"
@@ -619,102 +302,44 @@ exports[`Storybook Tests react/TextArea Invalid 1`] = `
619
302
  </div>
620
303
  </div>
621
304
  <div
622
- className="c1"
623
- rows={4}
305
+ aria-invalid={true}
306
+ className="charcoal-text-area-container"
307
+ style={
308
+ Object {
309
+ "--charcoal-text-area-rows": "4",
310
+ }
311
+ }
624
312
  >
625
313
  <textarea
626
314
  aria-describedby="test-id"
627
315
  aria-invalid={true}
628
316
  aria-labelledby="test-id"
629
- className="c2"
317
+ className="charcoal-text-area-textarea"
318
+ data-no-bottom-padding={false}
319
+ disabled={false}
630
320
  id="test-id"
631
321
  onChange={[Function]}
632
322
  rows={4}
633
323
  />
634
324
  </div>
635
- <p
636
- className="c3"
325
+ <div
326
+ className="charcoal-text-field-assistive-text"
327
+ data-invalid={true}
637
328
  id="test-id"
638
329
  >
639
330
  エラーメッセージ
640
- </p>
331
+ </div>
641
332
  </div>
642
333
  </div>
643
334
  `;
644
335
 
645
336
  exports[`Storybook Tests react/TextArea Label 1`] = `
646
- .c0 {
647
- display: grid;
648
- grid-template-columns: 1fr;
649
- grid-gap: 4px;
650
- }
651
-
652
- .c1 {
653
- position: relative;
654
- overflow: hidden;
655
- color: var(--charcoal-text2);
656
- background-color: var(--charcoal-surface3);
657
- border-radius: 4px;
658
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
659
- transition: 0.2s background-color,0.2s box-shadow;
660
- height: calc(22px * 4 + 18px);
661
- }
662
-
663
- .c1:not([aria-disabled]):hover,
664
- .c1 [aria-disabled='false']:hover {
665
- background-color: var(--charcoal-surface3-hover);
666
- }
667
-
668
- .c1:focus-within {
669
- outline: none;
670
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
671
- }
672
-
673
- .c2 {
674
- border: none;
675
- outline: none;
676
- resize: none;
677
- font-family: inherit;
678
- color: inherit;
679
- box-sizing: border-box;
680
- -webkit-transform-origin: top left;
681
- -ms-transform-origin: top left;
682
- transform-origin: top left;
683
- -webkit-transform: scale(0.875);
684
- -ms-transform: scale(0.875);
685
- transform: scale(0.875);
686
- width: calc(100% / 0.875);
687
- font-size: calc(14px / 0.875);
688
- line-height: calc(22px / 0.875);
689
- padding: calc(9px / 0.875) calc(8px / 0.875);
690
- height: calc(22px / 0.875 * 4 + 20px);
691
- -webkit-appearance: none;
692
- -moz-appearance: none;
693
- appearance: none;
694
- background: none;
695
- }
696
-
697
- .c2::-webkit-input-placeholder {
698
- color: var(--charcoal-text3);
699
- }
700
-
701
- .c2::-moz-placeholder {
702
- color: var(--charcoal-text3);
703
- }
704
-
705
- .c2:-ms-input-placeholder {
706
- color: var(--charcoal-text3);
707
- }
708
-
709
- .c2::placeholder {
710
- color: var(--charcoal-text3);
711
- }
712
-
713
337
  <div
714
338
  data-dark={false}
715
339
  >
716
340
  <div
717
- className="c0"
341
+ aria-disabled={false}
342
+ className="charcoal-text-area-root"
718
343
  >
719
344
  <div
720
345
  className="charcoal-field-label-root"
@@ -733,12 +358,19 @@ exports[`Storybook Tests react/TextArea Label 1`] = `
733
358
  </div>
734
359
  </div>
735
360
  <div
736
- className="c1"
737
- rows={4}
361
+ aria-invalid={false}
362
+ className="charcoal-text-area-container"
363
+ style={
364
+ Object {
365
+ "--charcoal-text-area-rows": "4",
366
+ }
367
+ }
738
368
  >
739
369
  <textarea
740
370
  aria-labelledby="test-id"
741
- className="c2"
371
+ className="charcoal-text-area-textarea"
372
+ data-no-bottom-padding={false}
373
+ disabled={false}
742
374
  id="test-id"
743
375
  onChange={[Function]}
744
376
  rows={4}
@@ -749,78 +381,12 @@ exports[`Storybook Tests react/TextArea Label 1`] = `
749
381
  `;
750
382
 
751
383
  exports[`Storybook Tests react/TextArea Placeholder 1`] = `
752
- .c0 {
753
- display: grid;
754
- grid-template-columns: 1fr;
755
- grid-gap: 4px;
756
- }
757
-
758
- .c1 {
759
- position: relative;
760
- overflow: hidden;
761
- color: var(--charcoal-text2);
762
- background-color: var(--charcoal-surface3);
763
- border-radius: 4px;
764
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
765
- transition: 0.2s background-color,0.2s box-shadow;
766
- height: calc(22px * 4 + 18px);
767
- }
768
-
769
- .c1:not([aria-disabled]):hover,
770
- .c1 [aria-disabled='false']:hover {
771
- background-color: var(--charcoal-surface3-hover);
772
- }
773
-
774
- .c1:focus-within {
775
- outline: none;
776
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
777
- }
778
-
779
- .c2 {
780
- border: none;
781
- outline: none;
782
- resize: none;
783
- font-family: inherit;
784
- color: inherit;
785
- box-sizing: border-box;
786
- -webkit-transform-origin: top left;
787
- -ms-transform-origin: top left;
788
- transform-origin: top left;
789
- -webkit-transform: scale(0.875);
790
- -ms-transform: scale(0.875);
791
- transform: scale(0.875);
792
- width: calc(100% / 0.875);
793
- font-size: calc(14px / 0.875);
794
- line-height: calc(22px / 0.875);
795
- padding: calc(9px / 0.875) calc(8px / 0.875);
796
- height: calc(22px / 0.875 * 4 + 20px);
797
- -webkit-appearance: none;
798
- -moz-appearance: none;
799
- appearance: none;
800
- background: none;
801
- }
802
-
803
- .c2::-webkit-input-placeholder {
804
- color: var(--charcoal-text3);
805
- }
806
-
807
- .c2::-moz-placeholder {
808
- color: var(--charcoal-text3);
809
- }
810
-
811
- .c2:-ms-input-placeholder {
812
- color: var(--charcoal-text3);
813
- }
814
-
815
- .c2::placeholder {
816
- color: var(--charcoal-text3);
817
- }
818
-
819
384
  <div
820
385
  data-dark={false}
821
386
  >
822
387
  <div
823
- className="c0"
388
+ aria-disabled={false}
389
+ className="charcoal-text-area-root"
824
390
  >
825
391
  <div
826
392
  className="charcoal-field-label-root"
@@ -853,12 +419,19 @@ exports[`Storybook Tests react/TextArea Placeholder 1`] = `
853
419
  </div>
854
420
  </div>
855
421
  <div
856
- className="c1"
857
- rows={4}
422
+ aria-invalid={false}
423
+ className="charcoal-text-area-container"
424
+ style={
425
+ Object {
426
+ "--charcoal-text-area-rows": "4",
427
+ }
428
+ }
858
429
  >
859
430
  <textarea
860
431
  aria-labelledby="test-id"
861
- className="c2"
432
+ className="charcoal-text-area-textarea"
433
+ data-no-bottom-padding={false}
434
+ disabled={false}
862
435
  id="test-id"
863
436
  onChange={[Function]}
864
437
  placeholder="Placeholder"
@@ -870,78 +443,12 @@ exports[`Storybook Tests react/TextArea Placeholder 1`] = `
870
443
  `;
871
444
 
872
445
  exports[`Storybook Tests react/TextArea ReadOnly 1`] = `
873
- .c0 {
874
- display: grid;
875
- grid-template-columns: 1fr;
876
- grid-gap: 4px;
877
- }
878
-
879
- .c1 {
880
- position: relative;
881
- overflow: hidden;
882
- color: var(--charcoal-text2);
883
- background-color: var(--charcoal-surface3);
884
- border-radius: 4px;
885
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
886
- transition: 0.2s background-color,0.2s box-shadow;
887
- height: calc(22px * 4 + 18px);
888
- }
889
-
890
- .c1:not([aria-disabled]):hover,
891
- .c1 [aria-disabled='false']:hover {
892
- background-color: var(--charcoal-surface3-hover);
893
- }
894
-
895
- .c1:focus-within {
896
- outline: none;
897
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
898
- }
899
-
900
- .c2 {
901
- border: none;
902
- outline: none;
903
- resize: none;
904
- font-family: inherit;
905
- color: inherit;
906
- box-sizing: border-box;
907
- -webkit-transform-origin: top left;
908
- -ms-transform-origin: top left;
909
- transform-origin: top left;
910
- -webkit-transform: scale(0.875);
911
- -ms-transform: scale(0.875);
912
- transform: scale(0.875);
913
- width: calc(100% / 0.875);
914
- font-size: calc(14px / 0.875);
915
- line-height: calc(22px / 0.875);
916
- padding: calc(9px / 0.875) calc(8px / 0.875);
917
- height: calc(22px / 0.875 * 4 + 20px);
918
- -webkit-appearance: none;
919
- -moz-appearance: none;
920
- appearance: none;
921
- background: none;
922
- }
923
-
924
- .c2::-webkit-input-placeholder {
925
- color: var(--charcoal-text3);
926
- }
927
-
928
- .c2::-moz-placeholder {
929
- color: var(--charcoal-text3);
930
- }
931
-
932
- .c2:-ms-input-placeholder {
933
- color: var(--charcoal-text3);
934
- }
935
-
936
- .c2::placeholder {
937
- color: var(--charcoal-text3);
938
- }
939
-
940
446
  <div
941
447
  data-dark={false}
942
448
  >
943
449
  <div
944
- className="c0"
450
+ aria-disabled={false}
451
+ className="charcoal-text-area-root"
945
452
  >
946
453
  <div
947
454
  className="charcoal-field-label-root"
@@ -974,12 +481,19 @@ exports[`Storybook Tests react/TextArea ReadOnly 1`] = `
974
481
  </div>
975
482
  </div>
976
483
  <div
977
- className="c1"
978
- rows={4}
484
+ aria-invalid={false}
485
+ className="charcoal-text-area-container"
486
+ style={
487
+ Object {
488
+ "--charcoal-text-area-rows": "4",
489
+ }
490
+ }
979
491
  >
980
492
  <textarea
981
493
  aria-labelledby="test-id"
982
- className="c2"
494
+ className="charcoal-text-area-textarea"
495
+ data-no-bottom-padding={false}
496
+ disabled={false}
983
497
  id="test-id"
984
498
  onChange={[Function]}
985
499
  readOnly={true}
@@ -992,78 +506,12 @@ exports[`Storybook Tests react/TextArea ReadOnly 1`] = `
992
506
  `;
993
507
 
994
508
  exports[`Storybook Tests react/TextArea Required 1`] = `
995
- .c0 {
996
- display: grid;
997
- grid-template-columns: 1fr;
998
- grid-gap: 4px;
999
- }
1000
-
1001
- .c1 {
1002
- position: relative;
1003
- overflow: hidden;
1004
- color: var(--charcoal-text2);
1005
- background-color: var(--charcoal-surface3);
1006
- border-radius: 4px;
1007
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
1008
- transition: 0.2s background-color,0.2s box-shadow;
1009
- height: calc(22px * 4 + 18px);
1010
- }
1011
-
1012
- .c1:not([aria-disabled]):hover,
1013
- .c1 [aria-disabled='false']:hover {
1014
- background-color: var(--charcoal-surface3-hover);
1015
- }
1016
-
1017
- .c1:focus-within {
1018
- outline: none;
1019
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1020
- }
1021
-
1022
- .c2 {
1023
- border: none;
1024
- outline: none;
1025
- resize: none;
1026
- font-family: inherit;
1027
- color: inherit;
1028
- box-sizing: border-box;
1029
- -webkit-transform-origin: top left;
1030
- -ms-transform-origin: top left;
1031
- transform-origin: top left;
1032
- -webkit-transform: scale(0.875);
1033
- -ms-transform: scale(0.875);
1034
- transform: scale(0.875);
1035
- width: calc(100% / 0.875);
1036
- font-size: calc(14px / 0.875);
1037
- line-height: calc(22px / 0.875);
1038
- padding: calc(9px / 0.875) calc(8px / 0.875);
1039
- height: calc(22px / 0.875 * 4 + 20px);
1040
- -webkit-appearance: none;
1041
- -moz-appearance: none;
1042
- appearance: none;
1043
- background: none;
1044
- }
1045
-
1046
- .c2::-webkit-input-placeholder {
1047
- color: var(--charcoal-text3);
1048
- }
1049
-
1050
- .c2::-moz-placeholder {
1051
- color: var(--charcoal-text3);
1052
- }
1053
-
1054
- .c2:-ms-input-placeholder {
1055
- color: var(--charcoal-text3);
1056
- }
1057
-
1058
- .c2::placeholder {
1059
- color: var(--charcoal-text3);
1060
- }
1061
-
1062
509
  <div
1063
510
  data-dark={false}
1064
511
  >
1065
512
  <div
1066
- className="c0"
513
+ aria-disabled={false}
514
+ className="charcoal-text-area-root"
1067
515
  >
1068
516
  <div
1069
517
  className="charcoal-field-label-root"
@@ -1101,12 +549,19 @@ exports[`Storybook Tests react/TextArea Required 1`] = `
1101
549
  </div>
1102
550
  </div>
1103
551
  <div
1104
- className="c1"
1105
- rows={4}
552
+ aria-invalid={false}
553
+ className="charcoal-text-area-container"
554
+ style={
555
+ Object {
556
+ "--charcoal-text-area-rows": "4",
557
+ }
558
+ }
1106
559
  >
1107
560
  <textarea
1108
561
  aria-labelledby="test-id"
1109
- className="c2"
562
+ className="charcoal-text-area-textarea"
563
+ data-no-bottom-padding={false}
564
+ disabled={false}
1110
565
  id="test-id"
1111
566
  onChange={[Function]}
1112
567
  rows={4}
@@ -1117,87 +572,12 @@ exports[`Storybook Tests react/TextArea Required 1`] = `
1117
572
  `;
1118
573
 
1119
574
  exports[`Storybook Tests react/TextArea ShowCount 1`] = `
1120
- .c0 {
1121
- display: grid;
1122
- grid-template-columns: 1fr;
1123
- grid-gap: 4px;
1124
- }
1125
-
1126
- .c1 {
1127
- position: relative;
1128
- overflow: hidden;
1129
- color: var(--charcoal-text2);
1130
- background-color: var(--charcoal-surface3);
1131
- border-radius: 4px;
1132
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
1133
- transition: 0.2s background-color,0.2s box-shadow;
1134
- height: calc(22px * 5 + 18px);
1135
- }
1136
-
1137
- .c1:not([aria-disabled]):hover,
1138
- .c1 [aria-disabled='false']:hover {
1139
- background-color: var(--charcoal-surface3-hover);
1140
- }
1141
-
1142
- .c1:focus-within {
1143
- outline: none;
1144
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1145
- }
1146
-
1147
- .c2 {
1148
- border: none;
1149
- outline: none;
1150
- resize: none;
1151
- font-family: inherit;
1152
- color: inherit;
1153
- box-sizing: border-box;
1154
- -webkit-transform-origin: top left;
1155
- -ms-transform-origin: top left;
1156
- transform-origin: top left;
1157
- -webkit-transform: scale(0.875);
1158
- -ms-transform: scale(0.875);
1159
- transform: scale(0.875);
1160
- width: calc(100% / 0.875);
1161
- font-size: calc(14px / 0.875);
1162
- line-height: calc(22px / 0.875);
1163
- padding: calc(9px / 0.875) calc(8px / 0.875) 0;
1164
- height: calc(22px / 0.875 * 4 + 9px);
1165
- -webkit-appearance: none;
1166
- -moz-appearance: none;
1167
- appearance: none;
1168
- background: none;
1169
- }
1170
-
1171
- .c2::-webkit-input-placeholder {
1172
- color: var(--charcoal-text3);
1173
- }
1174
-
1175
- .c2::-moz-placeholder {
1176
- color: var(--charcoal-text3);
1177
- }
1178
-
1179
- .c2:-ms-input-placeholder {
1180
- color: var(--charcoal-text3);
1181
- }
1182
-
1183
- .c2::placeholder {
1184
- color: var(--charcoal-text3);
1185
- }
1186
-
1187
- .c3 {
1188
- position: absolute;
1189
- bottom: 9px;
1190
- right: 8px;
1191
- line-height: 22px;
1192
- font-size: 14px;
1193
- color: var(--charcoal-text3);
1194
- }
1195
-
1196
575
  <div
1197
576
  data-dark={false}
1198
577
  >
1199
578
  <div
1200
- className="c0"
579
+ aria-disabled={false}
580
+ className="charcoal-text-area-root"
1201
581
  >
1202
582
  <div
1203
583
  className="charcoal-field-label-root"
@@ -1230,19 +610,26 @@ exports[`Storybook Tests react/TextArea ShowCount 1`] = `
1230
610
  </div>
1231
611
  </div>
1232
612
  <div
1233
- className="c1"
1234
- rows={5}
613
+ aria-invalid={false}
614
+ className="charcoal-text-area-container"
615
+ style={
616
+ Object {
617
+ "--charcoal-text-area-rows": "5",
618
+ }
619
+ }
1235
620
  >
1236
621
  <textarea
1237
622
  aria-labelledby="test-id"
1238
- className="c2"
623
+ className="charcoal-text-area-textarea"
624
+ data-no-bottom-padding={true}
625
+ disabled={false}
1239
626
  id="test-id"
1240
627
  maxLength={100}
1241
628
  onChange={[Function]}
1242
629
  rows={4}
1243
630
  />
1244
631
  <span
1245
- className="c3"
632
+ className="charcoal-text-area-counter"
1246
633
  >
1247
634
  0/100
1248
635
  </span>
@@ -1252,78 +639,12 @@ exports[`Storybook Tests react/TextArea ShowCount 1`] = `
1252
639
  `;
1253
640
 
1254
641
  exports[`Storybook Tests react/TextArea SubLabel 1`] = `
1255
- .c0 {
1256
- display: grid;
1257
- grid-template-columns: 1fr;
1258
- grid-gap: 4px;
1259
- }
1260
-
1261
- .c1 {
1262
- position: relative;
1263
- overflow: hidden;
1264
- color: var(--charcoal-text2);
1265
- background-color: var(--charcoal-surface3);
1266
- border-radius: 4px;
1267
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
1268
- transition: 0.2s background-color,0.2s box-shadow;
1269
- height: calc(22px * 4 + 18px);
1270
- }
1271
-
1272
- .c1:not([aria-disabled]):hover,
1273
- .c1 [aria-disabled='false']:hover {
1274
- background-color: var(--charcoal-surface3-hover);
1275
- }
1276
-
1277
- .c1:focus-within {
1278
- outline: none;
1279
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1280
- }
1281
-
1282
- .c2 {
1283
- border: none;
1284
- outline: none;
1285
- resize: none;
1286
- font-family: inherit;
1287
- color: inherit;
1288
- box-sizing: border-box;
1289
- -webkit-transform-origin: top left;
1290
- -ms-transform-origin: top left;
1291
- transform-origin: top left;
1292
- -webkit-transform: scale(0.875);
1293
- -ms-transform: scale(0.875);
1294
- transform: scale(0.875);
1295
- width: calc(100% / 0.875);
1296
- font-size: calc(14px / 0.875);
1297
- line-height: calc(22px / 0.875);
1298
- padding: calc(9px / 0.875) calc(8px / 0.875);
1299
- height: calc(22px / 0.875 * 4 + 20px);
1300
- -webkit-appearance: none;
1301
- -moz-appearance: none;
1302
- appearance: none;
1303
- background: none;
1304
- }
1305
-
1306
- .c2::-webkit-input-placeholder {
1307
- color: var(--charcoal-text3);
1308
- }
1309
-
1310
- .c2::-moz-placeholder {
1311
- color: var(--charcoal-text3);
1312
- }
1313
-
1314
- .c2:-ms-input-placeholder {
1315
- color: var(--charcoal-text3);
1316
- }
1317
-
1318
- .c2::placeholder {
1319
- color: var(--charcoal-text3);
1320
- }
1321
-
1322
642
  <div
1323
643
  data-dark={false}
1324
644
  >
1325
645
  <div
1326
- className="c0"
646
+ aria-disabled={false}
647
+ className="charcoal-text-area-root"
1327
648
  >
1328
649
  <div
1329
650
  className="charcoal-field-label-root"
@@ -1348,12 +669,19 @@ exports[`Storybook Tests react/TextArea SubLabel 1`] = `
1348
669
  </div>
1349
670
  </div>
1350
671
  <div
1351
- className="c1"
1352
- rows={4}
672
+ aria-invalid={false}
673
+ className="charcoal-text-area-container"
674
+ style={
675
+ Object {
676
+ "--charcoal-text-area-rows": "4",
677
+ }
678
+ }
1353
679
  >
1354
680
  <textarea
1355
681
  aria-labelledby="test-id"
1356
- className="c2"
682
+ className="charcoal-text-area-textarea"
683
+ data-no-bottom-padding={false}
684
+ disabled={false}
1357
685
  id="test-id"
1358
686
  onChange={[Function]}
1359
687
  rows={4}