@charcoal-ui/react 3.5.0 → 3.7.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 (100) hide show
  1. package/dist/_lib/compat.d.ts +1 -0
  2. package/dist/_lib/compat.d.ts.map +1 -1
  3. package/dist/components/Button/StyledButton.d.ts +12 -0
  4. package/dist/components/Button/StyledButton.d.ts.map +1 -0
  5. package/dist/components/Button/index.d.ts +2 -2
  6. package/dist/components/Button/index.d.ts.map +1 -1
  7. package/dist/components/Button/lib/variantToBackground.d.ts +3 -0
  8. package/dist/components/Button/lib/variantToBackground.d.ts.map +1 -0
  9. package/dist/components/Button/lib/variantToFont.d.ts +3 -0
  10. package/dist/components/Button/lib/variantToFont.d.ts.map +1 -0
  11. package/dist/components/Checkbox/index.d.ts.map +1 -1
  12. package/dist/components/Checkbox/index.story.d.ts +6 -15
  13. package/dist/components/Checkbox/index.story.d.ts.map +1 -1
  14. package/dist/components/Clickable/index.story.d.ts +4 -6
  15. package/dist/components/Clickable/index.story.d.ts.map +1 -1
  16. package/dist/components/DropdownSelector/DropdownMenuItem.d.ts.map +1 -1
  17. package/dist/components/DropdownSelector/ListItem/index.d.ts.map +1 -1
  18. package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
  19. package/dist/components/DropdownSelector/index.d.ts.map +1 -1
  20. package/dist/components/DropdownSelector/index.story.d.ts +1 -0
  21. package/dist/components/DropdownSelector/index.story.d.ts.map +1 -1
  22. package/dist/components/FieldLabel/index.d.ts.map +1 -1
  23. package/dist/components/Icon/index.story.d.ts +1 -1
  24. package/dist/components/IconButton/index.d.ts.map +1 -1
  25. package/dist/components/LoadingSpinner/index.d.ts.map +1 -1
  26. package/dist/components/Modal/ModalPlumbing.d.ts.map +1 -1
  27. package/dist/components/Modal/index.d.ts.map +1 -1
  28. package/dist/components/Modal/index.story.d.ts +1 -0
  29. package/dist/components/Modal/index.story.d.ts.map +1 -1
  30. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  31. package/dist/components/MultiSelect/index.story.d.ts +2 -0
  32. package/dist/components/MultiSelect/index.story.d.ts.map +1 -1
  33. package/dist/components/Radio/index.d.ts.map +1 -1
  34. package/dist/components/SegmentedControl/RadioGroupContext.d.ts +1 -1
  35. package/dist/components/SegmentedControl/RadioGroupContext.d.ts.map +1 -1
  36. package/dist/components/SegmentedControl/index.d.ts.map +1 -1
  37. package/dist/components/Switch/index.d.ts.map +1 -1
  38. package/dist/components/TagItem/index.d.ts.map +1 -1
  39. package/dist/components/TextField/TextField.story.d.ts.map +1 -1
  40. package/dist/components/TextField/index.d.ts.map +1 -1
  41. package/dist/index.cjs.js +1026 -384
  42. package/dist/index.cjs.js.map +1 -1
  43. package/dist/index.esm.js +991 -349
  44. package/dist/index.esm.js.map +1 -1
  45. package/dist/styled.d.ts +4 -4
  46. package/package.json +18 -21
  47. package/src/_lib/compat.ts +8 -0
  48. package/src/components/Button/StyledButton.tsx +66 -0
  49. package/src/components/Button/__snapshots__/index.story.storyshot +312 -592
  50. package/src/components/Button/index.tsx +14 -70
  51. package/src/components/Button/lib/variantToBackground.tsx +19 -0
  52. package/src/components/Button/lib/variantToFont.tsx +19 -0
  53. package/src/components/Checkbox/__snapshots__/index.story.storyshot +209 -40
  54. package/src/components/Checkbox/index.story.tsx +82 -64
  55. package/src/components/Checkbox/index.tsx +47 -17
  56. package/src/components/Clickable/__snapshots__/index.story.storyshot +4 -0
  57. package/src/components/Clickable/index.story.tsx +12 -9
  58. package/src/components/Clickable/index.tsx +1 -0
  59. package/src/components/DropdownSelector/DropdownMenuItem.tsx +6 -3
  60. package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +3 -10
  61. package/src/components/DropdownSelector/ListItem/index.tsx +6 -4
  62. package/src/components/DropdownSelector/MenuItemGroup/index.tsx +1 -1
  63. package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +4 -13
  64. package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +20 -37
  65. package/src/components/DropdownSelector/Popover/index.tsx +5 -8
  66. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +227 -294
  67. package/src/components/DropdownSelector/index.story.tsx +33 -0
  68. package/src/components/DropdownSelector/index.tsx +63 -20
  69. package/src/components/FieldLabel/index.tsx +77 -12
  70. package/src/components/IconButton/__snapshots__/index.story.storyshot +30 -54
  71. package/src/components/IconButton/index.tsx +51 -26
  72. package/src/components/LoadingSpinner/index.tsx +3 -6
  73. package/src/components/Modal/Dialog/index.tsx +1 -1
  74. package/src/components/Modal/ModalPlumbing.tsx +26 -5
  75. package/src/components/Modal/__snapshots__/index.story.storyshot +2450 -108
  76. package/src/components/Modal/index.story.tsx +27 -0
  77. package/src/components/Modal/index.tsx +19 -4
  78. package/src/components/MultiSelect/__snapshots__/index.story.storyshot +528 -25
  79. package/src/components/MultiSelect/index.story.tsx +60 -0
  80. package/src/components/MultiSelect/index.tsx +82 -22
  81. package/src/components/Radio/__snapshots__/index.story.storyshot +32 -49
  82. package/src/components/Radio/index.tsx +71 -23
  83. package/src/components/SegmentedControl/RadioGroupContext.tsx +1 -1
  84. package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +9 -10
  85. package/src/components/SegmentedControl/index.tsx +36 -16
  86. package/src/components/Switch/__snapshots__/index.story.storyshot +6 -18
  87. package/src/components/Switch/index.tsx +10 -15
  88. package/src/components/TagItem/__snapshots__/index.story.storyshot +39 -158
  89. package/src/components/TagItem/index.tsx +84 -19
  90. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +55 -91
  91. package/src/components/TextField/TextField.story.tsx +35 -18
  92. package/src/components/TextField/__snapshots__/TextField.story.storyshot +92 -148
  93. package/src/components/TextField/index.tsx +0 -1
  94. package/dist/components/Checkbox/performance.test.d.ts +0 -4
  95. package/dist/components/Checkbox/performance.test.d.ts.map +0 -1
  96. package/dist/components/Checkbox/snapshot.test.d.ts +0 -2
  97. package/dist/components/Checkbox/snapshot.test.d.ts.map +0 -1
  98. package/src/components/Checkbox/__snapshots__/snapshot.test.tsx.snap +0 -763
  99. package/src/components/Checkbox/performance.test.tsx +0 -30
  100. package/src/components/Checkbox/snapshot.test.tsx +0 -66
@@ -1,763 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`using dark theme storiesOf(index.story.tsx).add(Labelled) snapshot 1`] = `
4
- .c0 {
5
- position: relative;
6
- display: -webkit-box;
7
- display: -webkit-flex;
8
- display: -ms-flexbox;
9
- display: flex;
10
- cursor: pointer;
11
- gap: 4px;
12
- }
13
-
14
- .c0:disabled,
15
- .c0[aria-disabled]:not([aria-disabled=false]) {
16
- cursor: default;
17
- }
18
-
19
- .c0:disabled,
20
- .c0[aria-disabled]:not([aria-disabled=false]) {
21
- opacity: 0.32;
22
- }
23
-
24
- .c1 {
25
- position: relative;
26
- }
27
-
28
- .c2[type='checkbox'] {
29
- -webkit-appearance: none;
30
- -moz-appearance: none;
31
- appearance: none;
32
- display: block;
33
- cursor: pointer;
34
- margin: 0;
35
- width: 20px;
36
- height: 20px;
37
- border-radius: 4px;
38
- -webkit-transition: 0.2s box-shadow;
39
- transition: 0.2s box-shadow;
40
- -webkit-transition: all 0.2s !important;
41
- transition: all 0.2s !important;
42
- }
43
-
44
- .c2[type='checkbox']:checked {
45
- background-color: var(--charcoal-brand);
46
- -webkit-transition: 0.2s background-color;
47
- transition: 0.2s background-color;
48
- }
49
-
50
- .c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
51
- .c2[type='checkbox']:checked:hover[aria-disabled=false] {
52
- background-color: var(--charcoal-brand-hover);
53
- }
54
-
55
- .c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
56
- .c2[type='checkbox']:checked:active[aria-disabled=false] {
57
- background-color: var(--charcoal-brand-press);
58
- }
59
-
60
- .c2[type='checkbox']:not(:checked) {
61
- border-width: 2px;
62
- border-style: solid;
63
- border-color: #5c5c5c;
64
- }
65
-
66
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
67
- .c2[type='checkbox'][aria-disabled=false]:focus,
68
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active,
69
- .c2[type='checkbox'][aria-disabled=false]:active {
70
- outline: none;
71
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
72
- }
73
-
74
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
75
- .c2[type='checkbox'][aria-disabled=false]:focus:not(:focus-visible),
76
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
77
- .c2[type='checkbox'][aria-disabled=false]:active:not(:focus-visible) {
78
- outline: none;
79
- }
80
-
81
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
82
- .c2[type='checkbox'][aria-disabled=false]:focus-visible {
83
- outline: none;
84
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
85
- }
86
-
87
- .c3 {
88
- position: absolute;
89
- top: -2px;
90
- left: -2px;
91
- box-sizing: border-box;
92
- display: -webkit-box;
93
- display: -webkit-flex;
94
- display: -ms-flexbox;
95
- display: flex;
96
- -webkit-align-items: center;
97
- -webkit-box-align: center;
98
- -ms-flex-align: center;
99
- align-items: center;
100
- -webkit-box-pack: center;
101
- -webkit-justify-content: center;
102
- -ms-flex-pack: center;
103
- justify-content: center;
104
- width: 24px;
105
- height: 24px;
106
- color: var(--charcoal-text5);
107
- visibility: hidden;
108
- }
109
-
110
- .c4 {
111
- color: var(--charcoal-text2);
112
- font-size: 14px;
113
- line-height: 20px;
114
- }
115
-
116
- <div>
117
- <div
118
- style={
119
- Object {
120
- "marginBottom": "1em",
121
- }
122
- }
123
- >
124
- <label
125
- aria-disabled={false}
126
- className="c0"
127
- >
128
- <div
129
- className="c1"
130
- >
131
- <input
132
- checked={false}
133
- className="c2"
134
- disabled={false}
135
- name="labelled"
136
- onBlur={[Function]}
137
- onChange={[Function]}
138
- onClick={[Function]}
139
- onDragStart={[Function]}
140
- onFocus={[Function]}
141
- onKeyDown={[Function]}
142
- onKeyUp={[Function]}
143
- onMouseDown={[Function]}
144
- onMouseEnter={[Function]}
145
- onMouseLeave={[Function]}
146
- onMouseUp={[Function]}
147
- onTouchCancel={[Function]}
148
- onTouchEnd={[Function]}
149
- onTouchMove={[Function]}
150
- onTouchStart={[Function]}
151
- type="checkbox"
152
- />
153
- <div
154
- aria-hidden={true}
155
- checked={false}
156
- className="c3"
157
- >
158
- <pixiv-icon
159
- name="24/Check"
160
- unsafe-non-guideline-scale={0.6666666666666666}
161
- />
162
- </div>
163
- </div>
164
- <div
165
- className="c4"
166
- >
167
- 同意する
168
- </div>
169
- </label>
170
- </div>
171
- <div>
172
- <label
173
- aria-disabled={false}
174
- className="c0"
175
- >
176
- <div
177
- className="c1"
178
- >
179
- <input
180
- checked={false}
181
- className="c2"
182
- disabled={false}
183
- name="labelled"
184
- onBlur={[Function]}
185
- onChange={[Function]}
186
- onClick={[Function]}
187
- onDragStart={[Function]}
188
- onFocus={[Function]}
189
- onKeyDown={[Function]}
190
- onKeyUp={[Function]}
191
- onMouseDown={[Function]}
192
- onMouseEnter={[Function]}
193
- onMouseLeave={[Function]}
194
- onMouseUp={[Function]}
195
- onTouchCancel={[Function]}
196
- onTouchEnd={[Function]}
197
- onTouchMove={[Function]}
198
- onTouchStart={[Function]}
199
- type="checkbox"
200
- />
201
- <div
202
- aria-hidden={true}
203
- checked={false}
204
- className="c3"
205
- >
206
- <pixiv-icon
207
- name="24/Check"
208
- unsafe-non-guideline-scale={0.6666666666666666}
209
- />
210
- </div>
211
- </div>
212
- <div
213
- className="c4"
214
- >
215
- <span
216
- style={
217
- Object {
218
- "display": "block",
219
- "width": 200,
220
- }
221
- }
222
- >
223
- 同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する
224
- </span>
225
- </div>
226
- </label>
227
- </div>
228
- </div>
229
- `;
230
-
231
- exports[`using dark theme storiesOf(index.story.tsx).add(Unlabelled) snapshot 1`] = `
232
- .c0 {
233
- position: relative;
234
- display: -webkit-box;
235
- display: -webkit-flex;
236
- display: -ms-flexbox;
237
- display: flex;
238
- cursor: pointer;
239
- gap: 4px;
240
- }
241
-
242
- .c0:disabled,
243
- .c0[aria-disabled]:not([aria-disabled=false]) {
244
- cursor: default;
245
- }
246
-
247
- .c0:disabled,
248
- .c0[aria-disabled]:not([aria-disabled=false]) {
249
- opacity: 0.32;
250
- }
251
-
252
- .c1 {
253
- position: relative;
254
- }
255
-
256
- .c2[type='checkbox'] {
257
- -webkit-appearance: none;
258
- -moz-appearance: none;
259
- appearance: none;
260
- display: block;
261
- cursor: pointer;
262
- margin: 0;
263
- width: 20px;
264
- height: 20px;
265
- border-radius: 4px;
266
- -webkit-transition: 0.2s box-shadow;
267
- transition: 0.2s box-shadow;
268
- -webkit-transition: all 0.2s !important;
269
- transition: all 0.2s !important;
270
- }
271
-
272
- .c2[type='checkbox']:checked {
273
- background-color: var(--charcoal-brand);
274
- -webkit-transition: 0.2s background-color;
275
- transition: 0.2s background-color;
276
- }
277
-
278
- .c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
279
- .c2[type='checkbox']:checked:hover[aria-disabled=false] {
280
- background-color: var(--charcoal-brand-hover);
281
- }
282
-
283
- .c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
284
- .c2[type='checkbox']:checked:active[aria-disabled=false] {
285
- background-color: var(--charcoal-brand-press);
286
- }
287
-
288
- .c2[type='checkbox']:not(:checked) {
289
- border-width: 2px;
290
- border-style: solid;
291
- border-color: #5c5c5c;
292
- }
293
-
294
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
295
- .c2[type='checkbox'][aria-disabled=false]:focus,
296
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active,
297
- .c2[type='checkbox'][aria-disabled=false]:active {
298
- outline: none;
299
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
300
- }
301
-
302
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
303
- .c2[type='checkbox'][aria-disabled=false]:focus:not(:focus-visible),
304
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
305
- .c2[type='checkbox'][aria-disabled=false]:active:not(:focus-visible) {
306
- outline: none;
307
- }
308
-
309
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
310
- .c2[type='checkbox'][aria-disabled=false]:focus-visible {
311
- outline: none;
312
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
313
- }
314
-
315
- .c3 {
316
- position: absolute;
317
- top: -2px;
318
- left: -2px;
319
- box-sizing: border-box;
320
- display: -webkit-box;
321
- display: -webkit-flex;
322
- display: -ms-flexbox;
323
- display: flex;
324
- -webkit-align-items: center;
325
- -webkit-box-align: center;
326
- -ms-flex-align: center;
327
- align-items: center;
328
- -webkit-box-pack: center;
329
- -webkit-justify-content: center;
330
- -ms-flex-pack: center;
331
- justify-content: center;
332
- width: 24px;
333
- height: 24px;
334
- color: var(--charcoal-text5);
335
- visibility: hidden;
336
- }
337
-
338
- <div>
339
- <label
340
- aria-disabled={false}
341
- className="c0"
342
- >
343
- <div
344
- className="c1"
345
- >
346
- <input
347
- aria-label="label"
348
- checked={false}
349
- className="c2"
350
- disabled={false}
351
- name="unlabelled"
352
- onBlur={[Function]}
353
- onChange={[Function]}
354
- onClick={[Function]}
355
- onDragStart={[Function]}
356
- onFocus={[Function]}
357
- onKeyDown={[Function]}
358
- onKeyUp={[Function]}
359
- onMouseDown={[Function]}
360
- onMouseEnter={[Function]}
361
- onMouseLeave={[Function]}
362
- onMouseUp={[Function]}
363
- onTouchCancel={[Function]}
364
- onTouchEnd={[Function]}
365
- onTouchMove={[Function]}
366
- onTouchStart={[Function]}
367
- type="checkbox"
368
- />
369
- <div
370
- aria-hidden={true}
371
- checked={false}
372
- className="c3"
373
- >
374
- <pixiv-icon
375
- name="24/Check"
376
- unsafe-non-guideline-scale={0.6666666666666666}
377
- />
378
- </div>
379
- </div>
380
- </label>
381
- </div>
382
- `;
383
-
384
- exports[`using light theme storiesOf(index.story.tsx).add(Labelled) snapshot 1`] = `
385
- .c0 {
386
- position: relative;
387
- display: -webkit-box;
388
- display: -webkit-flex;
389
- display: -ms-flexbox;
390
- display: flex;
391
- cursor: pointer;
392
- gap: 4px;
393
- }
394
-
395
- .c0:disabled,
396
- .c0[aria-disabled]:not([aria-disabled=false]) {
397
- cursor: default;
398
- }
399
-
400
- .c0:disabled,
401
- .c0[aria-disabled]:not([aria-disabled=false]) {
402
- opacity: 0.32;
403
- }
404
-
405
- .c1 {
406
- position: relative;
407
- }
408
-
409
- .c2[type='checkbox'] {
410
- -webkit-appearance: none;
411
- -moz-appearance: none;
412
- appearance: none;
413
- display: block;
414
- cursor: pointer;
415
- margin: 0;
416
- width: 20px;
417
- height: 20px;
418
- border-radius: 4px;
419
- -webkit-transition: 0.2s box-shadow;
420
- transition: 0.2s box-shadow;
421
- -webkit-transition: all 0.2s !important;
422
- transition: all 0.2s !important;
423
- }
424
-
425
- .c2[type='checkbox']:checked {
426
- background-color: var(--charcoal-brand);
427
- -webkit-transition: 0.2s background-color;
428
- transition: 0.2s background-color;
429
- }
430
-
431
- .c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
432
- .c2[type='checkbox']:checked:hover[aria-disabled=false] {
433
- background-color: var(--charcoal-brand-hover);
434
- }
435
-
436
- .c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
437
- .c2[type='checkbox']:checked:active[aria-disabled=false] {
438
- background-color: var(--charcoal-brand-press);
439
- }
440
-
441
- .c2[type='checkbox']:not(:checked) {
442
- border-width: 2px;
443
- border-style: solid;
444
- border-color: #adadad;
445
- }
446
-
447
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
448
- .c2[type='checkbox'][aria-disabled=false]:focus,
449
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active,
450
- .c2[type='checkbox'][aria-disabled=false]:active {
451
- outline: none;
452
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
453
- }
454
-
455
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
456
- .c2[type='checkbox'][aria-disabled=false]:focus:not(:focus-visible),
457
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
458
- .c2[type='checkbox'][aria-disabled=false]:active:not(:focus-visible) {
459
- outline: none;
460
- }
461
-
462
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
463
- .c2[type='checkbox'][aria-disabled=false]:focus-visible {
464
- outline: none;
465
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
466
- }
467
-
468
- .c3 {
469
- position: absolute;
470
- top: -2px;
471
- left: -2px;
472
- box-sizing: border-box;
473
- display: -webkit-box;
474
- display: -webkit-flex;
475
- display: -ms-flexbox;
476
- display: flex;
477
- -webkit-align-items: center;
478
- -webkit-box-align: center;
479
- -ms-flex-align: center;
480
- align-items: center;
481
- -webkit-box-pack: center;
482
- -webkit-justify-content: center;
483
- -ms-flex-pack: center;
484
- justify-content: center;
485
- width: 24px;
486
- height: 24px;
487
- color: var(--charcoal-text5);
488
- visibility: hidden;
489
- }
490
-
491
- .c4 {
492
- color: var(--charcoal-text2);
493
- font-size: 14px;
494
- line-height: 20px;
495
- }
496
-
497
- <div>
498
- <div
499
- style={
500
- Object {
501
- "marginBottom": "1em",
502
- }
503
- }
504
- >
505
- <label
506
- aria-disabled={false}
507
- className="c0"
508
- >
509
- <div
510
- className="c1"
511
- >
512
- <input
513
- checked={false}
514
- className="c2"
515
- disabled={false}
516
- name="labelled"
517
- onBlur={[Function]}
518
- onChange={[Function]}
519
- onClick={[Function]}
520
- onDragStart={[Function]}
521
- onFocus={[Function]}
522
- onKeyDown={[Function]}
523
- onKeyUp={[Function]}
524
- onMouseDown={[Function]}
525
- onMouseEnter={[Function]}
526
- onMouseLeave={[Function]}
527
- onMouseUp={[Function]}
528
- onTouchCancel={[Function]}
529
- onTouchEnd={[Function]}
530
- onTouchMove={[Function]}
531
- onTouchStart={[Function]}
532
- type="checkbox"
533
- />
534
- <div
535
- aria-hidden={true}
536
- checked={false}
537
- className="c3"
538
- >
539
- <pixiv-icon
540
- name="24/Check"
541
- unsafe-non-guideline-scale={0.6666666666666666}
542
- />
543
- </div>
544
- </div>
545
- <div
546
- className="c4"
547
- >
548
- 同意する
549
- </div>
550
- </label>
551
- </div>
552
- <div>
553
- <label
554
- aria-disabled={false}
555
- className="c0"
556
- >
557
- <div
558
- className="c1"
559
- >
560
- <input
561
- checked={false}
562
- className="c2"
563
- disabled={false}
564
- name="labelled"
565
- onBlur={[Function]}
566
- onChange={[Function]}
567
- onClick={[Function]}
568
- onDragStart={[Function]}
569
- onFocus={[Function]}
570
- onKeyDown={[Function]}
571
- onKeyUp={[Function]}
572
- onMouseDown={[Function]}
573
- onMouseEnter={[Function]}
574
- onMouseLeave={[Function]}
575
- onMouseUp={[Function]}
576
- onTouchCancel={[Function]}
577
- onTouchEnd={[Function]}
578
- onTouchMove={[Function]}
579
- onTouchStart={[Function]}
580
- type="checkbox"
581
- />
582
- <div
583
- aria-hidden={true}
584
- checked={false}
585
- className="c3"
586
- >
587
- <pixiv-icon
588
- name="24/Check"
589
- unsafe-non-guideline-scale={0.6666666666666666}
590
- />
591
- </div>
592
- </div>
593
- <div
594
- className="c4"
595
- >
596
- <span
597
- style={
598
- Object {
599
- "display": "block",
600
- "width": 200,
601
- }
602
- }
603
- >
604
- 同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する
605
- </span>
606
- </div>
607
- </label>
608
- </div>
609
- </div>
610
- `;
611
-
612
- exports[`using light theme storiesOf(index.story.tsx).add(Unlabelled) snapshot 1`] = `
613
- .c0 {
614
- position: relative;
615
- display: -webkit-box;
616
- display: -webkit-flex;
617
- display: -ms-flexbox;
618
- display: flex;
619
- cursor: pointer;
620
- gap: 4px;
621
- }
622
-
623
- .c0:disabled,
624
- .c0[aria-disabled]:not([aria-disabled=false]) {
625
- cursor: default;
626
- }
627
-
628
- .c0:disabled,
629
- .c0[aria-disabled]:not([aria-disabled=false]) {
630
- opacity: 0.32;
631
- }
632
-
633
- .c1 {
634
- position: relative;
635
- }
636
-
637
- .c2[type='checkbox'] {
638
- -webkit-appearance: none;
639
- -moz-appearance: none;
640
- appearance: none;
641
- display: block;
642
- cursor: pointer;
643
- margin: 0;
644
- width: 20px;
645
- height: 20px;
646
- border-radius: 4px;
647
- -webkit-transition: 0.2s box-shadow;
648
- transition: 0.2s box-shadow;
649
- -webkit-transition: all 0.2s !important;
650
- transition: all 0.2s !important;
651
- }
652
-
653
- .c2[type='checkbox']:checked {
654
- background-color: var(--charcoal-brand);
655
- -webkit-transition: 0.2s background-color;
656
- transition: 0.2s background-color;
657
- }
658
-
659
- .c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
660
- .c2[type='checkbox']:checked:hover[aria-disabled=false] {
661
- background-color: var(--charcoal-brand-hover);
662
- }
663
-
664
- .c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
665
- .c2[type='checkbox']:checked:active[aria-disabled=false] {
666
- background-color: var(--charcoal-brand-press);
667
- }
668
-
669
- .c2[type='checkbox']:not(:checked) {
670
- border-width: 2px;
671
- border-style: solid;
672
- border-color: #adadad;
673
- }
674
-
675
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
676
- .c2[type='checkbox'][aria-disabled=false]:focus,
677
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active,
678
- .c2[type='checkbox'][aria-disabled=false]:active {
679
- outline: none;
680
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
681
- }
682
-
683
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
684
- .c2[type='checkbox'][aria-disabled=false]:focus:not(:focus-visible),
685
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
686
- .c2[type='checkbox'][aria-disabled=false]:active:not(:focus-visible) {
687
- outline: none;
688
- }
689
-
690
- .c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
691
- .c2[type='checkbox'][aria-disabled=false]:focus-visible {
692
- outline: none;
693
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
694
- }
695
-
696
- .c3 {
697
- position: absolute;
698
- top: -2px;
699
- left: -2px;
700
- box-sizing: border-box;
701
- display: -webkit-box;
702
- display: -webkit-flex;
703
- display: -ms-flexbox;
704
- display: flex;
705
- -webkit-align-items: center;
706
- -webkit-box-align: center;
707
- -ms-flex-align: center;
708
- align-items: center;
709
- -webkit-box-pack: center;
710
- -webkit-justify-content: center;
711
- -ms-flex-pack: center;
712
- justify-content: center;
713
- width: 24px;
714
- height: 24px;
715
- color: var(--charcoal-text5);
716
- visibility: hidden;
717
- }
718
-
719
- <div>
720
- <label
721
- aria-disabled={false}
722
- className="c0"
723
- >
724
- <div
725
- className="c1"
726
- >
727
- <input
728
- aria-label="label"
729
- checked={false}
730
- className="c2"
731
- disabled={false}
732
- name="unlabelled"
733
- onBlur={[Function]}
734
- onChange={[Function]}
735
- onClick={[Function]}
736
- onDragStart={[Function]}
737
- onFocus={[Function]}
738
- onKeyDown={[Function]}
739
- onKeyUp={[Function]}
740
- onMouseDown={[Function]}
741
- onMouseEnter={[Function]}
742
- onMouseLeave={[Function]}
743
- onMouseUp={[Function]}
744
- onTouchCancel={[Function]}
745
- onTouchEnd={[Function]}
746
- onTouchMove={[Function]}
747
- onTouchStart={[Function]}
748
- type="checkbox"
749
- />
750
- <div
751
- aria-hidden={true}
752
- checked={false}
753
- className="c3"
754
- >
755
- <pixiv-icon
756
- name="24/Check"
757
- unsafe-non-guideline-scale={0.6666666666666666}
758
- />
759
- </div>
760
- </div>
761
- </label>
762
- </div>
763
- `;