@charcoal-ui/react 4.3.0-beta.5 → 4.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 (40) hide show
  1. package/dist/components/MultiSelect/context.d.ts +14 -0
  2. package/dist/components/MultiSelect/context.d.ts.map +1 -0
  3. package/dist/components/MultiSelect/index.d.ts +38 -0
  4. package/dist/components/MultiSelect/index.d.ts.map +1 -0
  5. package/dist/index.cjs.js +318 -216
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.css +111 -0
  8. package/dist/index.css.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.esm.js +281 -181
  12. package/dist/index.esm.js.map +1 -1
  13. package/dist/layered.css +111 -0
  14. package/dist/layered.css.map +1 -1
  15. package/package.json +6 -7
  16. package/src/components/Button/__snapshots__/index.story.storyshot +89 -71
  17. package/src/components/Checkbox/CheckboxInput/__snapshots__/index.story.storyshot +50 -53
  18. package/src/components/Checkbox/__snapshots__/index.story.storyshot +108 -102
  19. package/src/components/Clickable/__snapshots__/index.story.storyshot +19 -17
  20. package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +45 -54
  21. package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +238 -275
  22. package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +28 -50
  23. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +780 -1158
  24. package/src/components/Icon/__snapshots__/index.story.storyshot +9 -7
  25. package/src/components/IconButton/__snapshots__/index.story.storyshot +43 -37
  26. package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +52 -64
  27. package/src/components/Modal/__snapshots__/index.story.storyshot +568 -716
  28. package/src/components/MultiSelect/__snapshots__/index.story.storyshot +531 -0
  29. package/src/components/MultiSelect/context.ts +23 -0
  30. package/src/components/MultiSelect/index.css +139 -0
  31. package/src/components/MultiSelect/index.story.tsx +118 -0
  32. package/src/components/MultiSelect/index.test.tsx +255 -0
  33. package/src/components/MultiSelect/index.tsx +153 -0
  34. package/src/components/Radio/__snapshots__/index.story.storyshot +313 -367
  35. package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +116 -228
  36. package/src/components/Switch/__snapshots__/index.story.storyshot +74 -73
  37. package/src/components/TagItem/__snapshots__/index.story.storyshot +177 -193
  38. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +372 -533
  39. package/src/components/TextField/__snapshots__/TextField.story.storyshot +444 -583
  40. package/src/index.ts +6 -0
@@ -1,274 +1,230 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Storybook Tests > react/Modal > BackgroundScroll 1`] = `
4
- <div
5
- data-dark={false}
6
- >
4
+ <div>
7
5
  <div
8
- data-overlay-container={true}
6
+ data-dark="false"
9
7
  >
10
8
  <div
11
- style={
12
- Object {
13
- "height": 1024,
14
- }
15
- }
16
- >
17
- <button
18
- className="charcoal-button"
19
- onClick={[Function]}
20
- >
21
- Open Modal
22
- </button>
23
- </div>
24
- <div
25
- className="charcoal-modal-background"
26
- data-bottom-sheet={false}
27
- onClick={[Function]}
28
- onPointerDown={[Function]}
29
- style={
30
- Object {
31
- "zIndex": 10,
32
- }
33
- }
9
+ data-overlay-container="true"
34
10
  >
35
11
  <div
36
- className="charcoal-modal-dialog"
37
- data-bottom-sheet={false}
38
- data-size="M"
39
- onKeyDown={[Function]}
40
- role="dialog"
41
- style={Object {}}
42
- tabIndex={-1}
12
+ aria-hidden="true"
13
+ style="height: 1024px;"
43
14
  >
44
- <div
45
- className="charcoal-modal-header-root"
46
- data-bottom-sheet={false}
15
+ <button
16
+ class="charcoal-button"
47
17
  >
48
- <div
49
- className="charcoal-modal-header-title"
50
- >
51
- react/Title
52
- </div>
53
- </div>
18
+ Open Modal
19
+ </button>
20
+ </div>
21
+ <div
22
+ class="charcoal-modal-background"
23
+ data-bottom-sheet="false"
24
+ style="z-index: 10;"
25
+ >
54
26
  <div
55
- className="charcoal-modal-body"
27
+ class="charcoal-modal-dialog"
28
+ data-bottom-sheet="false"
29
+ data-size="M"
30
+ role="dialog"
31
+ tabindex="-1"
56
32
  >
57
33
  <div
58
- style={
59
- Object {
60
- "display": "grid",
61
- "gap": 24,
62
- }
63
- }
34
+ class="charcoal-modal-header-root"
35
+ data-bottom-sheet="false"
64
36
  >
65
37
  <div
66
- style={
67
- Object {
68
- "color": "var(--charcoal-text2)",
69
- "fontSize": 14,
70
- "lineHeight": "22px",
71
- "padding": "0 16px",
72
- }
73
- }
38
+ class="charcoal-modal-header-title"
74
39
  >
75
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
40
+ react/Title
76
41
  </div>
42
+ </div>
43
+ <div
44
+ class="charcoal-modal-body"
45
+ >
77
46
  <div
78
- className="charcoal-modal-align"
47
+ style="display: grid; gap: 24px;"
79
48
  >
80
49
  <div
81
- aria-disabled={false}
82
- className="charcoal-text-field-root"
50
+ style="font-size: 14px; line-height: 22px; padding: 0px 16px;"
51
+ >
52
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
53
+ </div>
54
+ <div
55
+ class="charcoal-modal-align"
83
56
  >
84
57
  <div
85
- className="charcoal-field-label-root"
58
+ aria-disabled="false"
59
+ class="charcoal-text-field-root"
86
60
  >
87
- <label
88
- className="charcoal-field-label"
89
- htmlFor="test-id"
90
- id="test-id"
61
+ <div
62
+ class="charcoal-field-label-root"
91
63
  >
92
- Name
93
- </label>
64
+ <label
65
+ class="charcoal-field-label"
66
+ for="test-id"
67
+ id="test-id"
68
+ >
69
+ Name
70
+ </label>
71
+ <div
72
+ class="charcoal-field-label-sub-label"
73
+ >
74
+ <span />
75
+ </div>
76
+ </div>
94
77
  <div
95
- className="charcoal-field-label-sub-label"
78
+ class="charcoal-text-field-container"
79
+ data-invalid="false"
96
80
  >
97
- <span />
81
+ <input
82
+ aria-labelledby="test-id"
83
+ class="charcoal-text-field-input"
84
+ data-invalid="false"
85
+ id="test-id"
86
+ placeholder="Nagisa"
87
+ type="text"
88
+ value=""
89
+ />
98
90
  </div>
99
91
  </div>
100
- <div
101
- className="charcoal-text-field-container"
102
- data-invalid={false}
103
- >
104
- <input
105
- aria-labelledby="test-id"
106
- className="charcoal-text-field-input"
107
- data-invalid={false}
108
- disabled={false}
109
- id="test-id"
110
- onChange={[Function]}
111
- placeholder="Nagisa"
112
- type="text"
113
- />
114
- </div>
115
92
  </div>
116
- </div>
117
- <div
118
- className="charcoal-modal-align"
119
- >
120
93
  <div
121
- aria-disabled={false}
122
- className="charcoal-text-field-root"
94
+ class="charcoal-modal-align"
123
95
  >
124
96
  <div
125
- className="charcoal-field-label-root"
97
+ aria-disabled="false"
98
+ class="charcoal-text-field-root"
126
99
  >
127
- <label
128
- className="charcoal-field-label"
129
- htmlFor="test-id"
130
- id="test-id"
100
+ <div
101
+ class="charcoal-field-label-root"
131
102
  >
132
- Country
133
- </label>
103
+ <label
104
+ class="charcoal-field-label"
105
+ for="test-id"
106
+ id="test-id"
107
+ >
108
+ Country
109
+ </label>
110
+ <div
111
+ class="charcoal-field-label-sub-label"
112
+ >
113
+ <span />
114
+ </div>
115
+ </div>
134
116
  <div
135
- className="charcoal-field-label-sub-label"
117
+ class="charcoal-text-field-container"
118
+ data-invalid="false"
136
119
  >
137
- <span />
120
+ <input
121
+ aria-labelledby="test-id"
122
+ class="charcoal-text-field-input"
123
+ data-invalid="false"
124
+ id="test-id"
125
+ placeholder="Tokyo"
126
+ type="text"
127
+ value=""
128
+ />
138
129
  </div>
139
130
  </div>
140
- <div
141
- className="charcoal-text-field-container"
142
- data-invalid={false}
143
- >
144
- <input
145
- aria-labelledby="test-id"
146
- autoFocus={true}
147
- className="charcoal-text-field-input"
148
- data-invalid={false}
149
- disabled={false}
150
- id="test-id"
151
- onChange={[Function]}
152
- placeholder="Tokyo"
153
- type="text"
154
- />
155
- </div>
156
131
  </div>
157
- </div>
158
- <div
159
- className="charcoal-modal-align"
160
- >
161
132
  <div
162
- className="charcoal-dropdown-selector-root"
133
+ class="charcoal-modal-align"
163
134
  >
164
135
  <div
165
- className="charcoal-field-label-root"
136
+ class="charcoal-dropdown-selector-root"
166
137
  >
167
- <label
168
- className="charcoal-field-label"
169
- id="test-id"
170
- >
171
- Fruits
172
- </label>
173
138
  <div
174
- className="charcoal-field-label-sub-label"
139
+ class="charcoal-field-label-root"
175
140
  >
176
- <span />
141
+ <label
142
+ class="charcoal-field-label"
143
+ id="test-id"
144
+ >
145
+ Fruits
146
+ </label>
147
+ <div
148
+ class="charcoal-field-label-sub-label"
149
+ >
150
+ <span />
151
+ </div>
177
152
  </div>
178
- </div>
179
- <div
180
- aria-hidden="true"
181
- style={
182
- Object {
183
- "border": 0,
184
- "clip": "rect(0 0 0 0)",
185
- "clipPath": "inset(50%)",
186
- "height": "1px",
187
- "margin": "-1px",
188
- "overflow": "hidden",
189
- "padding": 0,
190
- "position": "absolute",
191
- "whiteSpace": "nowrap",
192
- "width": "1px",
193
- }
194
- }
195
- >
196
- <select
197
- onChange={[Function]}
198
- tabIndex={-1}
199
- value="10"
153
+ <div
154
+ aria-hidden="true"
155
+ style="border: 0px; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap;"
200
156
  >
201
- <option
202
- value="10"
157
+ <select
158
+ tabindex="-1"
203
159
  >
204
- 10
205
- </option>
206
- <option
207
- value="20"
208
- >
209
- 20
210
- </option>
211
- <option
212
- value="30"
160
+ <option
161
+ value="10"
162
+ >
163
+ 10
164
+ </option>
165
+ <option
166
+ value="20"
167
+ >
168
+ 20
169
+ </option>
170
+ <option
171
+ value="30"
172
+ >
173
+ 30
174
+ </option>
175
+ </select>
176
+ </div>
177
+ <button
178
+ aria-labelledby="test-id"
179
+ class="charcoal-dropdown-selector-button"
180
+ data-active="false"
181
+ type="button"
182
+ >
183
+ <span
184
+ class="charcoal-ui-dropdown-selector-text"
185
+ data-placeholder="false"
213
186
  >
214
- 30
215
- </option>
216
- </select>
187
+ Apple
188
+ </span>
189
+ <pixiv-icon
190
+ class="charcoal-ui-dropdown-selector-icon"
191
+ name="16/Menu"
192
+ />
193
+ </button>
217
194
  </div>
218
- <button
219
- aria-labelledby="test-id"
220
- className="charcoal-dropdown-selector-button"
221
- data-active={false}
222
- onClick={[Function]}
223
- type="button"
224
- >
225
- <span
226
- className="charcoal-ui-dropdown-selector-text"
227
- data-placeholder={false}
228
- >
229
- Apple
230
- </span>
231
- <pixiv-icon
232
- class="charcoal-ui-dropdown-selector-icon"
233
- name="16/Menu"
234
- />
235
- </button>
236
195
  </div>
237
196
  </div>
238
- </div>
239
- <div
240
- className="charcoal-modal-buttons"
241
- >
242
- <button
243
- className="charcoal-button"
244
- data-full-width={true}
245
- data-variant="Primary"
246
- onClick={[Function]}
247
- >
248
- Apply
249
- </button>
250
- <button
251
- className="charcoal-button"
252
- data-full-width={true}
253
- onClick={[Function]}
197
+ <div
198
+ class="charcoal-modal-buttons"
254
199
  >
255
- Cancel
256
- </button>
200
+ <button
201
+ class="charcoal-button"
202
+ data-full-width="true"
203
+ data-variant="Primary"
204
+ >
205
+ Apply
206
+ </button>
207
+ <button
208
+ class="charcoal-button"
209
+ data-full-width="true"
210
+ >
211
+ Cancel
212
+ </button>
213
+ </div>
257
214
  </div>
215
+ <button
216
+ aria-label="Close"
217
+ class="charcoal-icon-button charcoal-modal-close-button"
218
+ data-active="false"
219
+ data-size="S"
220
+ data-variant="Default"
221
+ type="button"
222
+ >
223
+ <pixiv-icon
224
+ name="24/Close"
225
+ />
226
+ </button>
258
227
  </div>
259
- <button
260
- aria-label="Close"
261
- className="charcoal-icon-button charcoal-modal-close-button"
262
- data-active={false}
263
- data-size="S"
264
- data-variant="Default"
265
- onClick={[Function]}
266
- type="button"
267
- >
268
- <pixiv-icon
269
- name="24/Close"
270
- />
271
- </button>
272
228
  </div>
273
229
  </div>
274
230
  </div>
@@ -276,122 +232,100 @@ exports[`Storybook Tests > react/Modal > BackgroundScroll 1`] = `
276
232
  `;
277
233
 
278
234
  exports[`Storybook Tests > react/Modal > BottomSheet 1`] = `
279
- <div
280
- data-dark={false}
281
- >
235
+ <div>
282
236
  <div
283
- data-overlay-container={true}
237
+ data-dark="false"
284
238
  >
285
- <button
286
- className="charcoal-button"
287
- onClick={[Function]}
288
- >
289
- Open Modal
290
- </button>
291
239
  <div
292
- className="charcoal-modal-background"
293
- data-bottom-sheet={true}
294
- onClick={[Function]}
295
- onPointerDown={[Function]}
296
- style={
297
- Object {
298
- "zIndex": 10,
299
- }
300
- }
240
+ data-overlay-container="true"
301
241
  >
242
+ <button
243
+ aria-hidden="true"
244
+ class="charcoal-button"
245
+ >
246
+ Open Modal
247
+ </button>
302
248
  <div
303
- className="charcoal-modal-dialog"
304
- data-bottom-sheet={true}
305
- data-size="M"
306
- onKeyDown={[Function]}
307
- role="dialog"
308
- style={Object {}}
309
- tabIndex={-1}
249
+ class="charcoal-modal-background"
250
+ data-bottom-sheet="true"
251
+ style="z-index: 10;"
310
252
  >
311
253
  <div
312
- className="charcoal-modal-header-root"
313
- data-bottom-sheet={true}
314
- >
315
- <div
316
- className="charcoal-modal-header-title"
317
- >
318
- react/Title
319
- </div>
320
- </div>
321
- <div
322
- className="charcoal-modal-body"
254
+ class="charcoal-modal-dialog"
255
+ data-bottom-sheet="true"
256
+ data-size="M"
257
+ role="dialog"
258
+ tabindex="-1"
323
259
  >
324
260
  <div
325
- style={
326
- Object {
327
- "display": "grid",
328
- "gap": 24,
329
- }
330
- }
261
+ class="charcoal-modal-header-root"
262
+ data-bottom-sheet="true"
331
263
  >
332
264
  <div
333
- style={
334
- Object {
335
- "color": "var(--charcoal-text2)",
336
- "fontSize": 14,
337
- "lineHeight": "22px",
338
- "padding": "0 16px",
339
- }
340
- }
265
+ class="charcoal-modal-header-title"
341
266
  >
342
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
267
+ react/Title
343
268
  </div>
344
269
  </div>
345
270
  <div
346
- className="charcoal-modal-buttons"
271
+ class="charcoal-modal-body"
347
272
  >
348
- <label
349
- className="charcoal-checkbox__label"
350
- htmlFor="test-id"
273
+ <div
274
+ style="display: grid; gap: 24px;"
351
275
  >
352
- <input
353
- checked={true}
354
- className="charcoal-checkbox-input"
355
- id="test-id"
356
- onChange={[Function]}
357
- type="checkbox"
358
- />
359
276
  <div
360
- className="charcoal-checkbox__label_div"
277
+ style="font-size: 14px; line-height: 22px; padding: 0px 16px;"
361
278
  >
362
- test checkbox
279
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
363
280
  </div>
364
- </label>
365
- <button
366
- className="charcoal-button"
367
- data-full-width={true}
368
- data-variant="Danger"
369
- onClick={[Function]}
370
- >
371
- 削除する
372
- </button>
373
- <button
374
- className="charcoal-button"
375
- data-full-width={true}
376
- onClick={[Function]}
281
+ </div>
282
+ <div
283
+ class="charcoal-modal-buttons"
377
284
  >
378
- キャンセル
379
- </button>
285
+ <label
286
+ class="charcoal-checkbox__label"
287
+ for="test-id"
288
+ >
289
+ <input
290
+ checked=""
291
+ class="charcoal-checkbox-input"
292
+ id="test-id"
293
+ type="checkbox"
294
+ />
295
+ <div
296
+ class="charcoal-checkbox__label_div"
297
+ >
298
+ test checkbox
299
+ </div>
300
+ </label>
301
+ <button
302
+ class="charcoal-button"
303
+ data-full-width="true"
304
+ data-variant="Danger"
305
+ >
306
+ 削除する
307
+ </button>
308
+ <button
309
+ class="charcoal-button"
310
+ data-full-width="true"
311
+ >
312
+ キャンセル
313
+ </button>
314
+ </div>
380
315
  </div>
316
+ <button
317
+ aria-label="Close"
318
+ class="charcoal-icon-button charcoal-modal-close-button"
319
+ data-active="false"
320
+ data-size="S"
321
+ data-variant="Default"
322
+ type="button"
323
+ >
324
+ <pixiv-icon
325
+ name="24/Close"
326
+ />
327
+ </button>
381
328
  </div>
382
- <button
383
- aria-label="Close"
384
- className="charcoal-icon-button charcoal-modal-close-button"
385
- data-active={false}
386
- data-size="S"
387
- data-variant="Default"
388
- onClick={[Function]}
389
- type="button"
390
- >
391
- <pixiv-icon
392
- name="24/Close"
393
- />
394
- </button>
395
329
  </div>
396
330
  </div>
397
331
  </div>
@@ -399,266 +333,226 @@ exports[`Storybook Tests > react/Modal > BottomSheet 1`] = `
399
333
  `;
400
334
 
401
335
  exports[`Storybook Tests > react/Modal > Default 1`] = `
402
- <div
403
- data-dark={false}
404
- >
336
+ <div>
405
337
  <div
406
- data-overlay-container={true}
338
+ data-dark="false"
407
339
  >
408
- <button
409
- className="charcoal-button"
410
- onClick={[Function]}
411
- >
412
- Open Modal
413
- </button>
414
340
  <div
415
- className="charcoal-modal-background"
416
- data-bottom-sheet={false}
417
- onClick={[Function]}
418
- onPointerDown={[Function]}
419
- style={
420
- Object {
421
- "zIndex": 10,
422
- }
423
- }
341
+ data-overlay-container="true"
424
342
  >
343
+ <button
344
+ aria-hidden="true"
345
+ class="charcoal-button"
346
+ >
347
+ Open Modal
348
+ </button>
425
349
  <div
426
- className="charcoal-modal-dialog"
427
- data-bottom-sheet={false}
428
- data-size="M"
429
- onKeyDown={[Function]}
430
- role="dialog"
431
- style={Object {}}
432
- tabIndex={-1}
350
+ class="charcoal-modal-background"
351
+ data-bottom-sheet="false"
352
+ style="z-index: 10;"
433
353
  >
434
354
  <div
435
- className="charcoal-modal-header-root"
436
- data-bottom-sheet={false}
437
- >
438
- <div
439
- className="charcoal-modal-header-title"
440
- >
441
- react/Title
442
- </div>
443
- </div>
444
- <div
445
- className="charcoal-modal-body"
355
+ class="charcoal-modal-dialog"
356
+ data-bottom-sheet="false"
357
+ data-size="M"
358
+ role="dialog"
359
+ tabindex="-1"
446
360
  >
447
361
  <div
448
- style={
449
- Object {
450
- "display": "grid",
451
- "gap": 24,
452
- }
453
- }
362
+ class="charcoal-modal-header-root"
363
+ data-bottom-sheet="false"
454
364
  >
455
365
  <div
456
- style={
457
- Object {
458
- "color": "var(--charcoal-text2)",
459
- "fontSize": 14,
460
- "lineHeight": "22px",
461
- "padding": "0 16px",
462
- }
463
- }
366
+ class="charcoal-modal-header-title"
464
367
  >
465
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
368
+ react/Title
466
369
  </div>
370
+ </div>
371
+ <div
372
+ class="charcoal-modal-body"
373
+ >
467
374
  <div
468
- className="charcoal-modal-align"
375
+ style="display: grid; gap: 24px;"
469
376
  >
470
377
  <div
471
- aria-disabled={false}
472
- className="charcoal-text-field-root"
378
+ style="font-size: 14px; line-height: 22px; padding: 0px 16px;"
379
+ >
380
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
381
+ </div>
382
+ <div
383
+ class="charcoal-modal-align"
473
384
  >
474
385
  <div
475
- className="charcoal-field-label-root"
386
+ aria-disabled="false"
387
+ class="charcoal-text-field-root"
476
388
  >
477
- <label
478
- className="charcoal-field-label"
479
- htmlFor="test-id"
480
- id="test-id"
389
+ <div
390
+ class="charcoal-field-label-root"
481
391
  >
482
- Name
483
- </label>
392
+ <label
393
+ class="charcoal-field-label"
394
+ for="test-id"
395
+ id="test-id"
396
+ >
397
+ Name
398
+ </label>
399
+ <div
400
+ class="charcoal-field-label-sub-label"
401
+ >
402
+ <span />
403
+ </div>
404
+ </div>
484
405
  <div
485
- className="charcoal-field-label-sub-label"
406
+ class="charcoal-text-field-container"
407
+ data-invalid="false"
486
408
  >
487
- <span />
409
+ <input
410
+ aria-labelledby="test-id"
411
+ class="charcoal-text-field-input"
412
+ data-invalid="false"
413
+ id="test-id"
414
+ placeholder="Nagisa"
415
+ type="text"
416
+ value=""
417
+ />
488
418
  </div>
489
419
  </div>
490
- <div
491
- className="charcoal-text-field-container"
492
- data-invalid={false}
493
- >
494
- <input
495
- aria-labelledby="test-id"
496
- className="charcoal-text-field-input"
497
- data-invalid={false}
498
- disabled={false}
499
- id="test-id"
500
- onChange={[Function]}
501
- placeholder="Nagisa"
502
- type="text"
503
- />
504
- </div>
505
420
  </div>
506
- </div>
507
- <div
508
- className="charcoal-modal-align"
509
- >
510
421
  <div
511
- aria-disabled={false}
512
- className="charcoal-text-field-root"
422
+ class="charcoal-modal-align"
513
423
  >
514
424
  <div
515
- className="charcoal-field-label-root"
425
+ aria-disabled="false"
426
+ class="charcoal-text-field-root"
516
427
  >
517
- <label
518
- className="charcoal-field-label"
519
- htmlFor="test-id"
520
- id="test-id"
428
+ <div
429
+ class="charcoal-field-label-root"
521
430
  >
522
- Country
523
- </label>
431
+ <label
432
+ class="charcoal-field-label"
433
+ for="test-id"
434
+ id="test-id"
435
+ >
436
+ Country
437
+ </label>
438
+ <div
439
+ class="charcoal-field-label-sub-label"
440
+ >
441
+ <span />
442
+ </div>
443
+ </div>
524
444
  <div
525
- className="charcoal-field-label-sub-label"
445
+ class="charcoal-text-field-container"
446
+ data-invalid="false"
526
447
  >
527
- <span />
448
+ <input
449
+ aria-labelledby="test-id"
450
+ class="charcoal-text-field-input"
451
+ data-invalid="false"
452
+ id="test-id"
453
+ placeholder="Tokyo"
454
+ type="text"
455
+ value=""
456
+ />
528
457
  </div>
529
458
  </div>
530
- <div
531
- className="charcoal-text-field-container"
532
- data-invalid={false}
533
- >
534
- <input
535
- aria-labelledby="test-id"
536
- autoFocus={true}
537
- className="charcoal-text-field-input"
538
- data-invalid={false}
539
- disabled={false}
540
- id="test-id"
541
- onChange={[Function]}
542
- placeholder="Tokyo"
543
- type="text"
544
- />
545
- </div>
546
459
  </div>
547
- </div>
548
- <div
549
- className="charcoal-modal-align"
550
- >
551
460
  <div
552
- className="charcoal-dropdown-selector-root"
461
+ class="charcoal-modal-align"
553
462
  >
554
463
  <div
555
- className="charcoal-field-label-root"
464
+ class="charcoal-dropdown-selector-root"
556
465
  >
557
- <label
558
- className="charcoal-field-label"
559
- id="test-id"
560
- >
561
- Fruits
562
- </label>
563
466
  <div
564
- className="charcoal-field-label-sub-label"
467
+ class="charcoal-field-label-root"
565
468
  >
566
- <span />
469
+ <label
470
+ class="charcoal-field-label"
471
+ id="test-id"
472
+ >
473
+ Fruits
474
+ </label>
475
+ <div
476
+ class="charcoal-field-label-sub-label"
477
+ >
478
+ <span />
479
+ </div>
567
480
  </div>
568
- </div>
569
- <div
570
- aria-hidden="true"
571
- style={
572
- Object {
573
- "border": 0,
574
- "clip": "rect(0 0 0 0)",
575
- "clipPath": "inset(50%)",
576
- "height": "1px",
577
- "margin": "-1px",
578
- "overflow": "hidden",
579
- "padding": 0,
580
- "position": "absolute",
581
- "whiteSpace": "nowrap",
582
- "width": "1px",
583
- }
584
- }
585
- >
586
- <select
587
- onChange={[Function]}
588
- tabIndex={-1}
589
- value="10"
481
+ <div
482
+ aria-hidden="true"
483
+ style="border: 0px; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap;"
590
484
  >
591
- <option
592
- value="10"
593
- >
594
- 10
595
- </option>
596
- <option
597
- value="20"
485
+ <select
486
+ tabindex="-1"
598
487
  >
599
- 20
600
- </option>
601
- <option
602
- value="30"
488
+ <option
489
+ value="10"
490
+ >
491
+ 10
492
+ </option>
493
+ <option
494
+ value="20"
495
+ >
496
+ 20
497
+ </option>
498
+ <option
499
+ value="30"
500
+ >
501
+ 30
502
+ </option>
503
+ </select>
504
+ </div>
505
+ <button
506
+ aria-labelledby="test-id"
507
+ class="charcoal-dropdown-selector-button"
508
+ data-active="false"
509
+ type="button"
510
+ >
511
+ <span
512
+ class="charcoal-ui-dropdown-selector-text"
513
+ data-placeholder="false"
603
514
  >
604
- 30
605
- </option>
606
- </select>
515
+ Apple
516
+ </span>
517
+ <pixiv-icon
518
+ class="charcoal-ui-dropdown-selector-icon"
519
+ name="16/Menu"
520
+ />
521
+ </button>
607
522
  </div>
608
- <button
609
- aria-labelledby="test-id"
610
- className="charcoal-dropdown-selector-button"
611
- data-active={false}
612
- onClick={[Function]}
613
- type="button"
614
- >
615
- <span
616
- className="charcoal-ui-dropdown-selector-text"
617
- data-placeholder={false}
618
- >
619
- Apple
620
- </span>
621
- <pixiv-icon
622
- class="charcoal-ui-dropdown-selector-icon"
623
- name="16/Menu"
624
- />
625
- </button>
626
523
  </div>
627
524
  </div>
628
- </div>
629
- <div
630
- className="charcoal-modal-buttons"
631
- >
632
- <button
633
- className="charcoal-button"
634
- data-full-width={true}
635
- data-variant="Primary"
636
- onClick={[Function]}
637
- >
638
- Apply
639
- </button>
640
- <button
641
- className="charcoal-button"
642
- data-full-width={true}
643
- onClick={[Function]}
525
+ <div
526
+ class="charcoal-modal-buttons"
644
527
  >
645
- Cancel
646
- </button>
528
+ <button
529
+ class="charcoal-button"
530
+ data-full-width="true"
531
+ data-variant="Primary"
532
+ >
533
+ Apply
534
+ </button>
535
+ <button
536
+ class="charcoal-button"
537
+ data-full-width="true"
538
+ >
539
+ Cancel
540
+ </button>
541
+ </div>
647
542
  </div>
543
+ <button
544
+ aria-label="Close"
545
+ class="charcoal-icon-button charcoal-modal-close-button"
546
+ data-active="false"
547
+ data-size="S"
548
+ data-variant="Default"
549
+ type="button"
550
+ >
551
+ <pixiv-icon
552
+ name="24/Close"
553
+ />
554
+ </button>
648
555
  </div>
649
- <button
650
- aria-label="Close"
651
- className="charcoal-icon-button charcoal-modal-close-button"
652
- data-active={false}
653
- data-size="S"
654
- data-variant="Default"
655
- onClick={[Function]}
656
- type="button"
657
- >
658
- <pixiv-icon
659
- name="24/Close"
660
- />
661
- </button>
662
556
  </div>
663
557
  </div>
664
558
  </div>
@@ -666,185 +560,162 @@ exports[`Storybook Tests > react/Modal > Default 1`] = `
666
560
  `;
667
561
 
668
562
  exports[`Storybook Tests > react/Modal > FullBottomSheet 1`] = `
669
- <div
670
- data-dark={false}
671
- >
563
+ <div>
672
564
  <div
673
- data-overlay-container={true}
565
+ data-dark="false"
674
566
  >
675
- <button
676
- className="charcoal-button"
677
- onClick={[Function]}
678
- >
679
- Open Modal
680
- </button>
681
567
  <div
682
- className="charcoal-modal-background"
683
- data-bottom-sheet="full"
684
- onClick={[Function]}
685
- onPointerDown={[Function]}
686
- style={
687
- Object {
688
- "zIndex": 10,
689
- }
690
- }
568
+ data-overlay-container="true"
691
569
  >
570
+ <button
571
+ aria-hidden="true"
572
+ class="charcoal-button"
573
+ >
574
+ Open Modal
575
+ </button>
692
576
  <div
693
- className="charcoal-modal-dialog"
577
+ class="charcoal-modal-background"
694
578
  data-bottom-sheet="full"
695
- data-size="M"
696
- onKeyDown={[Function]}
697
- role="dialog"
698
- style={Object {}}
699
- tabIndex={-1}
579
+ style="z-index: 10;"
700
580
  >
701
581
  <div
702
- className="charcoal-modal-header-root"
582
+ class="charcoal-modal-dialog"
703
583
  data-bottom-sheet="full"
584
+ data-size="M"
585
+ role="dialog"
586
+ tabindex="-1"
704
587
  >
705
588
  <div
706
- className="charcoal-modal-header-title"
707
- >
708
- react/Title
709
- </div>
710
- </div>
711
- <div
712
- className="charcoal-modal-body"
713
- >
714
- <div
715
- style={
716
- Object {
717
- "display": "grid",
718
- "gap": 24,
719
- }
720
- }
589
+ class="charcoal-modal-header-root"
590
+ data-bottom-sheet="full"
721
591
  >
722
592
  <div
723
- style={
724
- Object {
725
- "color": "var(--charcoal-text2)",
726
- "fontSize": 14,
727
- "lineHeight": "22px",
728
- "padding": "0 16px",
729
- }
730
- }
593
+ class="charcoal-modal-header-title"
731
594
  >
732
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
595
+ react/Title
733
596
  </div>
597
+ </div>
598
+ <div
599
+ class="charcoal-modal-body"
600
+ >
734
601
  <div
735
- className="charcoal-modal-align"
602
+ style="display: grid; gap: 24px;"
736
603
  >
737
604
  <div
738
- aria-disabled={false}
739
- className="charcoal-text-field-root"
605
+ style="font-size: 14px; line-height: 22px; padding: 0px 16px;"
606
+ >
607
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
608
+ </div>
609
+ <div
610
+ class="charcoal-modal-align"
740
611
  >
741
612
  <div
742
- className="charcoal-field-label-root"
613
+ aria-disabled="false"
614
+ class="charcoal-text-field-root"
743
615
  >
744
- <label
745
- className="charcoal-field-label"
746
- htmlFor="test-id"
747
- id="test-id"
616
+ <div
617
+ class="charcoal-field-label-root"
748
618
  >
749
- Name
750
- </label>
619
+ <label
620
+ class="charcoal-field-label"
621
+ for="test-id"
622
+ id="test-id"
623
+ >
624
+ Name
625
+ </label>
626
+ <div
627
+ class="charcoal-field-label-sub-label"
628
+ >
629
+ <span />
630
+ </div>
631
+ </div>
751
632
  <div
752
- className="charcoal-field-label-sub-label"
633
+ class="charcoal-text-field-container"
634
+ data-invalid="false"
753
635
  >
754
- <span />
636
+ <input
637
+ aria-labelledby="test-id"
638
+ class="charcoal-text-field-input"
639
+ data-invalid="false"
640
+ id="test-id"
641
+ placeholder="Nagisa"
642
+ type="text"
643
+ value=""
644
+ />
755
645
  </div>
756
646
  </div>
757
- <div
758
- className="charcoal-text-field-container"
759
- data-invalid={false}
760
- >
761
- <input
762
- aria-labelledby="test-id"
763
- className="charcoal-text-field-input"
764
- data-invalid={false}
765
- disabled={false}
766
- id="test-id"
767
- onChange={[Function]}
768
- placeholder="Nagisa"
769
- type="text"
770
- />
771
- </div>
772
647
  </div>
773
- </div>
774
- <div
775
- className="charcoal-modal-align"
776
- >
777
648
  <div
778
- aria-disabled={false}
779
- className="charcoal-text-field-root"
649
+ class="charcoal-modal-align"
780
650
  >
781
651
  <div
782
- className="charcoal-field-label-root"
652
+ aria-disabled="false"
653
+ class="charcoal-text-field-root"
783
654
  >
784
- <label
785
- className="charcoal-field-label"
786
- htmlFor="test-id"
787
- id="test-id"
655
+ <div
656
+ class="charcoal-field-label-root"
788
657
  >
789
- Country
790
- </label>
658
+ <label
659
+ class="charcoal-field-label"
660
+ for="test-id"
661
+ id="test-id"
662
+ >
663
+ Country
664
+ </label>
665
+ <div
666
+ class="charcoal-field-label-sub-label"
667
+ >
668
+ <span />
669
+ </div>
670
+ </div>
791
671
  <div
792
- className="charcoal-field-label-sub-label"
672
+ class="charcoal-text-field-container"
673
+ data-invalid="false"
793
674
  >
794
- <span />
675
+ <input
676
+ aria-labelledby="test-id"
677
+ class="charcoal-text-field-input"
678
+ data-invalid="false"
679
+ id="test-id"
680
+ placeholder="Tokyo"
681
+ type="text"
682
+ value=""
683
+ />
795
684
  </div>
796
685
  </div>
797
- <div
798
- className="charcoal-text-field-container"
799
- data-invalid={false}
800
- >
801
- <input
802
- aria-labelledby="test-id"
803
- className="charcoal-text-field-input"
804
- data-invalid={false}
805
- disabled={false}
806
- id="test-id"
807
- onChange={[Function]}
808
- placeholder="Tokyo"
809
- type="text"
810
- />
811
- </div>
812
686
  </div>
813
687
  </div>
814
- </div>
815
- <div
816
- className="charcoal-modal-buttons"
817
- >
818
- <button
819
- className="charcoal-button"
820
- data-full-width={true}
821
- data-variant="Primary"
822
- onClick={[Function]}
823
- >
824
- Apply
825
- </button>
826
- <button
827
- className="charcoal-button"
828
- data-full-width={true}
829
- onClick={[Function]}
688
+ <div
689
+ class="charcoal-modal-buttons"
830
690
  >
831
- Cancel
832
- </button>
691
+ <button
692
+ class="charcoal-button"
693
+ data-full-width="true"
694
+ data-variant="Primary"
695
+ >
696
+ Apply
697
+ </button>
698
+ <button
699
+ class="charcoal-button"
700
+ data-full-width="true"
701
+ >
702
+ Cancel
703
+ </button>
704
+ </div>
833
705
  </div>
706
+ <button
707
+ aria-label="Close"
708
+ class="charcoal-icon-button charcoal-modal-close-button"
709
+ data-active="false"
710
+ data-size="S"
711
+ data-variant="Default"
712
+ type="button"
713
+ >
714
+ <pixiv-icon
715
+ name="24/Close"
716
+ />
717
+ </button>
834
718
  </div>
835
- <button
836
- aria-label="Close"
837
- className="charcoal-icon-button charcoal-modal-close-button"
838
- data-active={false}
839
- data-size="S"
840
- data-variant="Default"
841
- onClick={[Function]}
842
- type="button"
843
- >
844
- <pixiv-icon
845
- name="24/Close"
846
- />
847
- </button>
848
719
  </div>
849
720
  </div>
850
721
  </div>
@@ -852,83 +723,64 @@ exports[`Storybook Tests > react/Modal > FullBottomSheet 1`] = `
852
723
  `;
853
724
 
854
725
  exports[`Storybook Tests > react/Modal > NotDismmissableStory 1`] = `
855
- <div
856
- data-dark={false}
857
- >
726
+ <div>
858
727
  <div
859
- data-overlay-container={true}
728
+ data-dark="false"
860
729
  >
861
- <button
862
- className="charcoal-button"
863
- onClick={[Function]}
864
- >
865
- Open Modal
866
- </button>
867
730
  <div
868
- className="charcoal-modal-background"
869
- data-bottom-sheet={false}
870
- onClick={[Function]}
871
- onPointerDown={[Function]}
872
- style={
873
- Object {
874
- "zIndex": 10,
875
- }
876
- }
731
+ data-overlay-container="true"
877
732
  >
733
+ <button
734
+ aria-hidden="true"
735
+ class="charcoal-button"
736
+ >
737
+ Open Modal
738
+ </button>
878
739
  <div
879
- className="charcoal-modal-dialog"
880
- data-bottom-sheet={false}
881
- data-size="M"
882
- onKeyDown={[Function]}
883
- role="dialog"
884
- style={Object {}}
885
- tabIndex={-1}
740
+ class="charcoal-modal-background"
741
+ data-bottom-sheet="false"
742
+ style="z-index: 10;"
886
743
  >
887
744
  <div
888
- className="charcoal-modal-header-root"
889
- data-bottom-sheet={false}
890
- >
891
- <div
892
- className="charcoal-modal-header-title"
893
- >
894
- react/Title
895
- </div>
896
- </div>
897
- <div
898
- className="charcoal-modal-body"
745
+ class="charcoal-modal-dialog"
746
+ data-bottom-sheet="false"
747
+ data-size="M"
748
+ role="dialog"
749
+ tabindex="-1"
899
750
  >
900
751
  <div
901
- style={
902
- Object {
903
- "display": "grid",
904
- "gap": 24,
905
- }
906
- }
752
+ class="charcoal-modal-header-root"
753
+ data-bottom-sheet="false"
907
754
  >
908
755
  <div
909
- style={
910
- Object {
911
- "color": "var(--charcoal-text2)",
912
- "fontSize": 14,
913
- "lineHeight": "22px",
914
- "padding": "0 16px",
915
- }
916
- }
756
+ class="charcoal-modal-header-title"
917
757
  >
918
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
758
+ react/Title
919
759
  </div>
920
760
  </div>
921
761
  <div
922
- className="charcoal-modal-buttons"
762
+ class="charcoal-modal-body"
923
763
  >
924
- <button
925
- className="charcoal-button"
926
- data-full-width={true}
927
- data-variant="Primary"
928
- onClick={[Function]}
764
+ <div
765
+ style="display: grid; gap: 24px;"
766
+ >
767
+ <div
768
+ style="font-size: 14px; line-height: 22px; padding: 0px 16px;"
769
+ >
770
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod placeat tenetur, necessitatibus laudantium cumque exercitationem provident. Quaerat iure enim, eveniet dolores earum odio quo possimus fugiat aspernatur, numquam, commodi repellat.
771
+ </div>
772
+ </div>
773
+ <div
774
+ class="charcoal-modal-buttons"
929
775
  >
930
- OK
931
- </button>
776
+ <button
777
+ class="charcoal-button"
778
+ data-full-width="true"
779
+ data-variant="Primary"
780
+ >
781
+ OK
782
+ </button>
783
+ </div>
932
784
  </div>
933
785
  </div>
934
786
  </div>