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