@charcoal-ui/react 3.10.1 → 3.12.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.
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/Popover/index.d.ts +1 -2
- package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/useCustomModalOverlay.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/Radio/index.d.ts +4 -4
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/TextArea/index.d.ts.map +1 -1
- package/dist/components/TextField/index.d.ts.map +1 -1
- package/dist/core/CharcoalProvider.d.ts +1 -1
- package/dist/core/CharcoalProvider.d.ts.map +1 -1
- package/dist/index.cjs.js +123 -351
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +85 -313
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -17
- package/src/components/Checkbox/__snapshots__/index.story.storyshot +601 -173
- package/src/components/Checkbox/index.story.tsx +57 -77
- package/src/components/Checkbox/index.tsx +7 -2
- package/src/components/DropdownSelector/Popover/index.tsx +1 -2
- package/src/components/IconButton/__snapshots__/index.story.storyshot +6 -8
- package/src/components/IconButton/index.story.tsx +14 -37
- package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +139 -1
- package/src/components/LoadingSpinner/index.story.tsx +18 -7
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/Modal/useCustomModalOverlay.tsx +5 -4
- package/src/components/MultiSelect/__snapshots__/index.story.storyshot +32 -44
- package/src/components/MultiSelect/index.story.tsx +88 -192
- package/src/components/MultiSelect/index.tsx +2 -1
- package/src/components/Radio/__snapshots__/index.story.storyshot +1 -1
- package/src/components/Radio/index.story.tsx +20 -21
- package/src/components/Radio/index.tsx +14 -13
- package/src/components/Switch/__snapshots__/index.story.storyshot +8 -9
- package/src/components/Switch/index.story.tsx +10 -18
- package/src/components/TagItem/__snapshots__/index.story.storyshot +791 -665
- package/src/components/TagItem/index.story.tsx +44 -161
- package/src/components/TextArea/TextArea.story.tsx +62 -24
- package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +1858 -472
- package/src/components/TextArea/index.tsx +2 -0
- package/src/components/TextField/TextField.story.tsx +77 -67
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +2004 -786
- package/src/components/TextField/index.tsx +2 -0
- package/src/components/a11y.test.tsx +1 -1
- package/src/core/CharcoalProvider.tsx +1 -1
- package/dist/components/Button/index.story.d.ts +0 -14
- package/dist/components/Button/index.story.d.ts.map +0 -1
- package/dist/components/Checkbox/index.story.d.ts +0 -8
- package/dist/components/Checkbox/index.story.d.ts.map +0 -1
- package/dist/components/Clickable/index.story.d.ts +0 -6
- package/dist/components/Clickable/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/ListItem/index.story.d.ts +0 -9
- package/dist/components/DropdownSelector/ListItem/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/MenuList/index.story.d.ts +0 -8
- package/dist/components/DropdownSelector/MenuList/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/Popover/index.story.d.ts +0 -5
- package/dist/components/DropdownSelector/Popover/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/index.story.d.ts +0 -19
- package/dist/components/DropdownSelector/index.story.d.ts.map +0 -1
- package/dist/components/Icon/index.story.d.ts +0 -6
- package/dist/components/Icon/index.story.d.ts.map +0 -1
- package/dist/components/IconButton/index.story.d.ts +0 -9
- package/dist/components/IconButton/index.story.d.ts.map +0 -1
- package/dist/components/LoadingSpinner/LoadingSpinnerIcon.story.d.ts +0 -8
- package/dist/components/LoadingSpinner/LoadingSpinnerIcon.story.d.ts.map +0 -1
- package/dist/components/LoadingSpinner/index.story.d.ts +0 -6
- package/dist/components/LoadingSpinner/index.story.d.ts.map +0 -1
- package/dist/components/Modal/index.story.d.ts +0 -21
- package/dist/components/Modal/index.story.d.ts.map +0 -1
- package/dist/components/MultiSelect/index.story.d.ts +0 -82
- package/dist/components/MultiSelect/index.story.d.ts.map +0 -1
- package/dist/components/MultiSelect/index.test.d.ts +0 -2
- package/dist/components/MultiSelect/index.test.d.ts.map +0 -1
- package/dist/components/Radio/index.story.d.ts +0 -26
- package/dist/components/Radio/index.story.d.ts.map +0 -1
- package/dist/components/Radio/index.test.d.ts +0 -2
- package/dist/components/Radio/index.test.d.ts.map +0 -1
- package/dist/components/SegmentedControl/index.story.d.ts +0 -7
- package/dist/components/SegmentedControl/index.story.d.ts.map +0 -1
- package/dist/components/Switch/index.story.d.ts +0 -9
- package/dist/components/Switch/index.story.d.ts.map +0 -1
- package/dist/components/TagItem/index.story.d.ts +0 -16
- package/dist/components/TagItem/index.story.d.ts.map +0 -1
- package/dist/components/TextArea/TextArea.story.d.ts +0 -9
- package/dist/components/TextArea/TextArea.story.d.ts.map +0 -1
- package/dist/components/TextField/TextField.story.d.ts +0 -22
- package/dist/components/TextField/TextField.story.d.ts.map +0 -1
- package/dist/components/a11y.test.d.ts +0 -2
- package/dist/components/a11y.test.d.ts.map +0 -1
- package/src/components/LoadingSpinner/LoadingSpinnerIcon.story.tsx +0 -13
|
@@ -1,5 +1,498 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Storybook Tests Checkbox Checked 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:has(input[readonly]) {
|
|
15
|
+
cursor: default;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.c0:disabled,
|
|
19
|
+
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
20
|
+
cursor: default;
|
|
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']:disabled {
|
|
43
|
+
cursor: default;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.c2[type='checkbox'][readonly] {
|
|
47
|
+
cursor: default;
|
|
48
|
+
opacity: 0.32;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.c2[type='checkbox']:checked {
|
|
52
|
+
background-color: var(--charcoal-brand);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):hover,
|
|
56
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:hover {
|
|
57
|
+
background-color: var(--charcoal-brand-hover);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):active,
|
|
61
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:active {
|
|
62
|
+
background-color: var(--charcoal-brand-press);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
|
|
66
|
+
.c2[type='checkbox'][aria-disabled='false']:focus {
|
|
67
|
+
outline: none;
|
|
68
|
+
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
|
|
72
|
+
.c2[type='checkbox'][aria-disabled='false']:focus:not(:focus-visible) {
|
|
73
|
+
box-shadow: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
|
|
77
|
+
.c2[type='checkbox'][aria-disabled='false']:focus-visible {
|
|
78
|
+
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled])[aria-invalid='true'],
|
|
82
|
+
.c2[type='checkbox'][aria-disabled='false'][aria-invalid='true'] {
|
|
83
|
+
box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.c2[type='checkbox']:not(:checked) {
|
|
87
|
+
border-width: 2px;
|
|
88
|
+
border-style: solid;
|
|
89
|
+
border-color: var(--charcoal-text4);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.c3 {
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: -2px;
|
|
95
|
+
left: -2px;
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
display: -webkit-box;
|
|
98
|
+
display: -webkit-flex;
|
|
99
|
+
display: -ms-flexbox;
|
|
100
|
+
display: flex;
|
|
101
|
+
-webkit-align-items: center;
|
|
102
|
+
-webkit-box-align: center;
|
|
103
|
+
-ms-flex-align: center;
|
|
104
|
+
align-items: center;
|
|
105
|
+
-webkit-box-pack: center;
|
|
106
|
+
-webkit-justify-content: center;
|
|
107
|
+
-ms-flex-pack: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
width: 24px;
|
|
110
|
+
height: 24px;
|
|
111
|
+
color: var(--charcoal-text5);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.c4 {
|
|
115
|
+
color: var(--charcoal-text2);
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
line-height: 20px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
<div
|
|
121
|
+
data-dark={false}
|
|
122
|
+
>
|
|
123
|
+
<label
|
|
124
|
+
aria-disabled={false}
|
|
125
|
+
className="c0"
|
|
126
|
+
>
|
|
127
|
+
<div
|
|
128
|
+
className="c1"
|
|
129
|
+
>
|
|
130
|
+
<input
|
|
131
|
+
checked={true}
|
|
132
|
+
className="c2"
|
|
133
|
+
disabled={false}
|
|
134
|
+
name="checked"
|
|
135
|
+
onChange={[Function]}
|
|
136
|
+
onClick={[Function]}
|
|
137
|
+
onDragStart={[Function]}
|
|
138
|
+
onKeyDown={[Function]}
|
|
139
|
+
onKeyUp={[Function]}
|
|
140
|
+
onMouseDown={[Function]}
|
|
141
|
+
onMouseEnter={[Function]}
|
|
142
|
+
onMouseLeave={[Function]}
|
|
143
|
+
onMouseUp={[Function]}
|
|
144
|
+
onTouchCancel={[Function]}
|
|
145
|
+
onTouchEnd={[Function]}
|
|
146
|
+
onTouchMove={[Function]}
|
|
147
|
+
onTouchStart={[Function]}
|
|
148
|
+
type="checkbox"
|
|
149
|
+
/>
|
|
150
|
+
<div
|
|
151
|
+
aria-hidden={true}
|
|
152
|
+
checked={true}
|
|
153
|
+
className="c3"
|
|
154
|
+
>
|
|
155
|
+
<pixiv-icon
|
|
156
|
+
name="24/Check"
|
|
157
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div
|
|
162
|
+
className="c4"
|
|
163
|
+
>
|
|
164
|
+
Checked
|
|
165
|
+
</div>
|
|
166
|
+
</label>
|
|
167
|
+
</div>
|
|
168
|
+
`;
|
|
169
|
+
|
|
170
|
+
exports[`Storybook Tests Checkbox Default 1`] = `
|
|
171
|
+
.c0 {
|
|
172
|
+
position: relative;
|
|
173
|
+
display: -webkit-box;
|
|
174
|
+
display: -webkit-flex;
|
|
175
|
+
display: -ms-flexbox;
|
|
176
|
+
display: flex;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
gap: 4px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.c0:has(input[readonly]) {
|
|
182
|
+
cursor: default;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.c0:disabled,
|
|
186
|
+
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
187
|
+
cursor: default;
|
|
188
|
+
opacity: 0.32;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.c1 {
|
|
192
|
+
position: relative;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.c2[type='checkbox'] {
|
|
196
|
+
-webkit-appearance: none;
|
|
197
|
+
-moz-appearance: none;
|
|
198
|
+
appearance: none;
|
|
199
|
+
display: block;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
margin: 0;
|
|
202
|
+
width: 20px;
|
|
203
|
+
height: 20px;
|
|
204
|
+
border-radius: 4px;
|
|
205
|
+
-webkit-transition: 0.2s box-shadow,0.2s background-color;
|
|
206
|
+
transition: 0.2s box-shadow,0.2s background-color;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.c2[type='checkbox']:disabled {
|
|
210
|
+
cursor: default;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.c2[type='checkbox'][readonly] {
|
|
214
|
+
cursor: default;
|
|
215
|
+
opacity: 0.32;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.c2[type='checkbox']:checked {
|
|
219
|
+
background-color: var(--charcoal-brand);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):hover,
|
|
223
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:hover {
|
|
224
|
+
background-color: var(--charcoal-brand-hover);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):active,
|
|
228
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:active {
|
|
229
|
+
background-color: var(--charcoal-brand-press);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
|
|
233
|
+
.c2[type='checkbox'][aria-disabled='false']:focus {
|
|
234
|
+
outline: none;
|
|
235
|
+
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
|
|
239
|
+
.c2[type='checkbox'][aria-disabled='false']:focus:not(:focus-visible) {
|
|
240
|
+
box-shadow: none;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
|
|
244
|
+
.c2[type='checkbox'][aria-disabled='false']:focus-visible {
|
|
245
|
+
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled])[aria-invalid='true'],
|
|
249
|
+
.c2[type='checkbox'][aria-disabled='false'][aria-invalid='true'] {
|
|
250
|
+
box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.c2[type='checkbox']:not(:checked) {
|
|
254
|
+
border-width: 2px;
|
|
255
|
+
border-style: solid;
|
|
256
|
+
border-color: var(--charcoal-text4);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.c3 {
|
|
260
|
+
position: absolute;
|
|
261
|
+
top: -2px;
|
|
262
|
+
left: -2px;
|
|
263
|
+
box-sizing: border-box;
|
|
264
|
+
display: -webkit-box;
|
|
265
|
+
display: -webkit-flex;
|
|
266
|
+
display: -ms-flexbox;
|
|
267
|
+
display: flex;
|
|
268
|
+
-webkit-align-items: center;
|
|
269
|
+
-webkit-box-align: center;
|
|
270
|
+
-ms-flex-align: center;
|
|
271
|
+
align-items: center;
|
|
272
|
+
-webkit-box-pack: center;
|
|
273
|
+
-webkit-justify-content: center;
|
|
274
|
+
-ms-flex-pack: center;
|
|
275
|
+
justify-content: center;
|
|
276
|
+
width: 24px;
|
|
277
|
+
height: 24px;
|
|
278
|
+
color: var(--charcoal-text5);
|
|
279
|
+
visibility: hidden;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
<div
|
|
283
|
+
data-dark={false}
|
|
284
|
+
>
|
|
285
|
+
<label
|
|
286
|
+
aria-disabled={false}
|
|
287
|
+
className="c0"
|
|
288
|
+
>
|
|
289
|
+
<div
|
|
290
|
+
className="c1"
|
|
291
|
+
>
|
|
292
|
+
<input
|
|
293
|
+
aria-label="label"
|
|
294
|
+
checked={false}
|
|
295
|
+
className="c2"
|
|
296
|
+
disabled={false}
|
|
297
|
+
name="default"
|
|
298
|
+
onChange={[Function]}
|
|
299
|
+
onClick={[Function]}
|
|
300
|
+
onDragStart={[Function]}
|
|
301
|
+
onKeyDown={[Function]}
|
|
302
|
+
onKeyUp={[Function]}
|
|
303
|
+
onMouseDown={[Function]}
|
|
304
|
+
onMouseEnter={[Function]}
|
|
305
|
+
onMouseLeave={[Function]}
|
|
306
|
+
onMouseUp={[Function]}
|
|
307
|
+
onTouchCancel={[Function]}
|
|
308
|
+
onTouchEnd={[Function]}
|
|
309
|
+
onTouchMove={[Function]}
|
|
310
|
+
onTouchStart={[Function]}
|
|
311
|
+
type="checkbox"
|
|
312
|
+
/>
|
|
313
|
+
<div
|
|
314
|
+
aria-hidden={true}
|
|
315
|
+
checked={false}
|
|
316
|
+
className="c3"
|
|
317
|
+
>
|
|
318
|
+
<pixiv-icon
|
|
319
|
+
name="24/Check"
|
|
320
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
321
|
+
/>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
</label>
|
|
325
|
+
</div>
|
|
326
|
+
`;
|
|
327
|
+
|
|
328
|
+
exports[`Storybook Tests Checkbox Disabled 1`] = `
|
|
329
|
+
.c0 {
|
|
330
|
+
position: relative;
|
|
331
|
+
display: -webkit-box;
|
|
332
|
+
display: -webkit-flex;
|
|
333
|
+
display: -ms-flexbox;
|
|
334
|
+
display: flex;
|
|
335
|
+
cursor: pointer;
|
|
336
|
+
gap: 4px;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.c0:has(input[readonly]) {
|
|
340
|
+
cursor: default;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.c0:disabled,
|
|
344
|
+
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
345
|
+
cursor: default;
|
|
346
|
+
opacity: 0.32;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.c1 {
|
|
350
|
+
position: relative;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.c2[type='checkbox'] {
|
|
354
|
+
-webkit-appearance: none;
|
|
355
|
+
-moz-appearance: none;
|
|
356
|
+
appearance: none;
|
|
357
|
+
display: block;
|
|
358
|
+
cursor: pointer;
|
|
359
|
+
margin: 0;
|
|
360
|
+
width: 20px;
|
|
361
|
+
height: 20px;
|
|
362
|
+
border-radius: 4px;
|
|
363
|
+
-webkit-transition: 0.2s box-shadow,0.2s background-color;
|
|
364
|
+
transition: 0.2s box-shadow,0.2s background-color;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.c2[type='checkbox']:disabled {
|
|
368
|
+
cursor: default;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.c2[type='checkbox'][readonly] {
|
|
372
|
+
cursor: default;
|
|
373
|
+
opacity: 0.32;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.c2[type='checkbox']:checked {
|
|
377
|
+
background-color: var(--charcoal-brand);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):hover,
|
|
381
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:hover {
|
|
382
|
+
background-color: var(--charcoal-brand-hover);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):active,
|
|
386
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:active {
|
|
387
|
+
background-color: var(--charcoal-brand-press);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
|
|
391
|
+
.c2[type='checkbox'][aria-disabled='false']:focus {
|
|
392
|
+
outline: none;
|
|
393
|
+
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
|
|
397
|
+
.c2[type='checkbox'][aria-disabled='false']:focus:not(:focus-visible) {
|
|
398
|
+
box-shadow: none;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
|
|
402
|
+
.c2[type='checkbox'][aria-disabled='false']:focus-visible {
|
|
403
|
+
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled])[aria-invalid='true'],
|
|
407
|
+
.c2[type='checkbox'][aria-disabled='false'][aria-invalid='true'] {
|
|
408
|
+
box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.c2[type='checkbox']:not(:checked) {
|
|
412
|
+
border-width: 2px;
|
|
413
|
+
border-style: solid;
|
|
414
|
+
border-color: var(--charcoal-text4);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.c3 {
|
|
418
|
+
position: absolute;
|
|
419
|
+
top: -2px;
|
|
420
|
+
left: -2px;
|
|
421
|
+
box-sizing: border-box;
|
|
422
|
+
display: -webkit-box;
|
|
423
|
+
display: -webkit-flex;
|
|
424
|
+
display: -ms-flexbox;
|
|
425
|
+
display: flex;
|
|
426
|
+
-webkit-align-items: center;
|
|
427
|
+
-webkit-box-align: center;
|
|
428
|
+
-ms-flex-align: center;
|
|
429
|
+
align-items: center;
|
|
430
|
+
-webkit-box-pack: center;
|
|
431
|
+
-webkit-justify-content: center;
|
|
432
|
+
-ms-flex-pack: center;
|
|
433
|
+
justify-content: center;
|
|
434
|
+
width: 24px;
|
|
435
|
+
height: 24px;
|
|
436
|
+
color: var(--charcoal-text5);
|
|
437
|
+
visibility: hidden;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.c4 {
|
|
441
|
+
color: var(--charcoal-text2);
|
|
442
|
+
font-size: 14px;
|
|
443
|
+
line-height: 20px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
<div
|
|
447
|
+
data-dark={false}
|
|
448
|
+
>
|
|
449
|
+
<label
|
|
450
|
+
aria-disabled={true}
|
|
451
|
+
className="c0"
|
|
452
|
+
>
|
|
453
|
+
<div
|
|
454
|
+
className="c1"
|
|
455
|
+
>
|
|
456
|
+
<input
|
|
457
|
+
checked={false}
|
|
458
|
+
className="c2"
|
|
459
|
+
disabled={true}
|
|
460
|
+
name="disabled"
|
|
461
|
+
onChange={[Function]}
|
|
462
|
+
onClick={[Function]}
|
|
463
|
+
onDragStart={[Function]}
|
|
464
|
+
onKeyDown={[Function]}
|
|
465
|
+
onKeyUp={[Function]}
|
|
466
|
+
onMouseDown={[Function]}
|
|
467
|
+
onMouseEnter={[Function]}
|
|
468
|
+
onMouseLeave={[Function]}
|
|
469
|
+
onMouseUp={[Function]}
|
|
470
|
+
onTouchCancel={[Function]}
|
|
471
|
+
onTouchEnd={[Function]}
|
|
472
|
+
onTouchMove={[Function]}
|
|
473
|
+
onTouchStart={[Function]}
|
|
474
|
+
type="checkbox"
|
|
475
|
+
/>
|
|
476
|
+
<div
|
|
477
|
+
aria-hidden={true}
|
|
478
|
+
checked={false}
|
|
479
|
+
className="c3"
|
|
480
|
+
>
|
|
481
|
+
<pixiv-icon
|
|
482
|
+
name="24/Check"
|
|
483
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
484
|
+
/>
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
<div
|
|
488
|
+
className="c4"
|
|
489
|
+
>
|
|
490
|
+
Disabled
|
|
491
|
+
</div>
|
|
492
|
+
</label>
|
|
493
|
+
</div>
|
|
494
|
+
`;
|
|
495
|
+
|
|
3
496
|
exports[`Storybook Tests Checkbox Invalid 1`] = `
|
|
4
497
|
.c0 {
|
|
5
498
|
position: relative;
|
|
@@ -11,6 +504,10 @@ exports[`Storybook Tests Checkbox Invalid 1`] = `
|
|
|
11
504
|
gap: 4px;
|
|
12
505
|
}
|
|
13
506
|
|
|
507
|
+
.c0:has(input[readonly]) {
|
|
508
|
+
cursor: default;
|
|
509
|
+
}
|
|
510
|
+
|
|
14
511
|
.c0:disabled,
|
|
15
512
|
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
16
513
|
cursor: default;
|
|
@@ -39,12 +536,9 @@ exports[`Storybook Tests Checkbox Invalid 1`] = `
|
|
|
39
536
|
cursor: default;
|
|
40
537
|
}
|
|
41
538
|
|
|
42
|
-
.c2[type='checkbox']
|
|
43
|
-
cursor: default;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.c2[type='checkbox']:read-only {
|
|
539
|
+
.c2[type='checkbox'][readonly] {
|
|
47
540
|
cursor: default;
|
|
541
|
+
opacity: 0.32;
|
|
48
542
|
}
|
|
49
543
|
|
|
50
544
|
.c2[type='checkbox']:checked {
|
|
@@ -132,12 +626,10 @@ exports[`Storybook Tests Checkbox Invalid 1`] = `
|
|
|
132
626
|
checked={false}
|
|
133
627
|
className="c2"
|
|
134
628
|
disabled={false}
|
|
135
|
-
name="
|
|
136
|
-
onBlur={[Function]}
|
|
629
|
+
name="invalid"
|
|
137
630
|
onChange={[Function]}
|
|
138
631
|
onClick={[Function]}
|
|
139
632
|
onDragStart={[Function]}
|
|
140
|
-
onFocus={[Function]}
|
|
141
633
|
onKeyDown={[Function]}
|
|
142
634
|
onKeyUp={[Function]}
|
|
143
635
|
onMouseDown={[Function]}
|
|
@@ -148,7 +640,6 @@ exports[`Storybook Tests Checkbox Invalid 1`] = `
|
|
|
148
640
|
onTouchEnd={[Function]}
|
|
149
641
|
onTouchMove={[Function]}
|
|
150
642
|
onTouchStart={[Function]}
|
|
151
|
-
readOnly={false}
|
|
152
643
|
type="checkbox"
|
|
153
644
|
/>
|
|
154
645
|
<div
|
|
@@ -165,13 +656,13 @@ exports[`Storybook Tests Checkbox Invalid 1`] = `
|
|
|
165
656
|
<div
|
|
166
657
|
className="c4"
|
|
167
658
|
>
|
|
168
|
-
|
|
659
|
+
Invalid
|
|
169
660
|
</div>
|
|
170
661
|
</label>
|
|
171
662
|
</div>
|
|
172
663
|
`;
|
|
173
664
|
|
|
174
|
-
exports[`Storybook Tests Checkbox
|
|
665
|
+
exports[`Storybook Tests Checkbox Label 1`] = `
|
|
175
666
|
.c0 {
|
|
176
667
|
position: relative;
|
|
177
668
|
display: -webkit-box;
|
|
@@ -182,6 +673,10 @@ exports[`Storybook Tests Checkbox Labelled 1`] = `
|
|
|
182
673
|
gap: 4px;
|
|
183
674
|
}
|
|
184
675
|
|
|
676
|
+
.c0:has(input[readonly]) {
|
|
677
|
+
cursor: default;
|
|
678
|
+
}
|
|
679
|
+
|
|
185
680
|
.c0:disabled,
|
|
186
681
|
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
187
682
|
cursor: default;
|
|
@@ -210,12 +705,9 @@ exports[`Storybook Tests Checkbox Labelled 1`] = `
|
|
|
210
705
|
cursor: default;
|
|
211
706
|
}
|
|
212
707
|
|
|
213
|
-
.c2[type='checkbox']
|
|
214
|
-
cursor: default;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.c2[type='checkbox']:read-only {
|
|
708
|
+
.c2[type='checkbox'][readonly] {
|
|
218
709
|
cursor: default;
|
|
710
|
+
opacity: 0.32;
|
|
219
711
|
}
|
|
220
712
|
|
|
221
713
|
.c2[type='checkbox']:checked {
|
|
@@ -291,125 +783,54 @@ exports[`Storybook Tests Checkbox Labelled 1`] = `
|
|
|
291
783
|
<div
|
|
292
784
|
data-dark={false}
|
|
293
785
|
>
|
|
294
|
-
<
|
|
786
|
+
<label
|
|
787
|
+
aria-disabled={false}
|
|
788
|
+
className="c0"
|
|
789
|
+
>
|
|
295
790
|
<div
|
|
296
|
-
|
|
297
|
-
Object {
|
|
298
|
-
"marginBottom": "1em",
|
|
299
|
-
}
|
|
300
|
-
}
|
|
791
|
+
className="c1"
|
|
301
792
|
>
|
|
302
|
-
<
|
|
303
|
-
|
|
304
|
-
className="
|
|
793
|
+
<input
|
|
794
|
+
checked={false}
|
|
795
|
+
className="c2"
|
|
796
|
+
disabled={false}
|
|
797
|
+
name="checkbox"
|
|
798
|
+
onChange={[Function]}
|
|
799
|
+
onClick={[Function]}
|
|
800
|
+
onDragStart={[Function]}
|
|
801
|
+
onKeyDown={[Function]}
|
|
802
|
+
onKeyUp={[Function]}
|
|
803
|
+
onMouseDown={[Function]}
|
|
804
|
+
onMouseEnter={[Function]}
|
|
805
|
+
onMouseLeave={[Function]}
|
|
806
|
+
onMouseUp={[Function]}
|
|
807
|
+
onTouchCancel={[Function]}
|
|
808
|
+
onTouchEnd={[Function]}
|
|
809
|
+
onTouchMove={[Function]}
|
|
810
|
+
onTouchStart={[Function]}
|
|
811
|
+
type="checkbox"
|
|
812
|
+
/>
|
|
813
|
+
<div
|
|
814
|
+
aria-hidden={true}
|
|
815
|
+
checked={false}
|
|
816
|
+
className="c3"
|
|
305
817
|
>
|
|
306
|
-
<
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
className="c2"
|
|
312
|
-
disabled={false}
|
|
313
|
-
name="labelled"
|
|
314
|
-
onBlur={[Function]}
|
|
315
|
-
onChange={[Function]}
|
|
316
|
-
onClick={[Function]}
|
|
317
|
-
onDragStart={[Function]}
|
|
318
|
-
onFocus={[Function]}
|
|
319
|
-
onKeyDown={[Function]}
|
|
320
|
-
onKeyUp={[Function]}
|
|
321
|
-
onMouseDown={[Function]}
|
|
322
|
-
onMouseEnter={[Function]}
|
|
323
|
-
onMouseLeave={[Function]}
|
|
324
|
-
onMouseUp={[Function]}
|
|
325
|
-
onTouchCancel={[Function]}
|
|
326
|
-
onTouchEnd={[Function]}
|
|
327
|
-
onTouchMove={[Function]}
|
|
328
|
-
onTouchStart={[Function]}
|
|
329
|
-
readOnly={false}
|
|
330
|
-
type="checkbox"
|
|
331
|
-
/>
|
|
332
|
-
<div
|
|
333
|
-
aria-hidden={true}
|
|
334
|
-
checked={false}
|
|
335
|
-
className="c3"
|
|
336
|
-
>
|
|
337
|
-
<pixiv-icon
|
|
338
|
-
name="24/Check"
|
|
339
|
-
unsafe-non-guideline-scale={0.6666666666666666}
|
|
340
|
-
/>
|
|
341
|
-
</div>
|
|
342
|
-
</div>
|
|
343
|
-
<div
|
|
344
|
-
className="c4"
|
|
345
|
-
>
|
|
346
|
-
同意する
|
|
347
|
-
</div>
|
|
348
|
-
</label>
|
|
818
|
+
<pixiv-icon
|
|
819
|
+
name="24/Check"
|
|
820
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
821
|
+
/>
|
|
822
|
+
</div>
|
|
349
823
|
</div>
|
|
350
|
-
<div
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
>
|
|
355
|
-
<div
|
|
356
|
-
className="c1"
|
|
357
|
-
>
|
|
358
|
-
<input
|
|
359
|
-
checked={false}
|
|
360
|
-
className="c2"
|
|
361
|
-
disabled={false}
|
|
362
|
-
name="labelled"
|
|
363
|
-
onBlur={[Function]}
|
|
364
|
-
onChange={[Function]}
|
|
365
|
-
onClick={[Function]}
|
|
366
|
-
onDragStart={[Function]}
|
|
367
|
-
onFocus={[Function]}
|
|
368
|
-
onKeyDown={[Function]}
|
|
369
|
-
onKeyUp={[Function]}
|
|
370
|
-
onMouseDown={[Function]}
|
|
371
|
-
onMouseEnter={[Function]}
|
|
372
|
-
onMouseLeave={[Function]}
|
|
373
|
-
onMouseUp={[Function]}
|
|
374
|
-
onTouchCancel={[Function]}
|
|
375
|
-
onTouchEnd={[Function]}
|
|
376
|
-
onTouchMove={[Function]}
|
|
377
|
-
onTouchStart={[Function]}
|
|
378
|
-
readOnly={false}
|
|
379
|
-
type="checkbox"
|
|
380
|
-
/>
|
|
381
|
-
<div
|
|
382
|
-
aria-hidden={true}
|
|
383
|
-
checked={false}
|
|
384
|
-
className="c3"
|
|
385
|
-
>
|
|
386
|
-
<pixiv-icon
|
|
387
|
-
name="24/Check"
|
|
388
|
-
unsafe-non-guideline-scale={0.6666666666666666}
|
|
389
|
-
/>
|
|
390
|
-
</div>
|
|
391
|
-
</div>
|
|
392
|
-
<div
|
|
393
|
-
className="c4"
|
|
394
|
-
>
|
|
395
|
-
<span
|
|
396
|
-
style={
|
|
397
|
-
Object {
|
|
398
|
-
"display": "block",
|
|
399
|
-
"width": 200,
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
>
|
|
403
|
-
同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する同意する
|
|
404
|
-
</span>
|
|
405
|
-
</div>
|
|
406
|
-
</label>
|
|
824
|
+
<div
|
|
825
|
+
className="c4"
|
|
826
|
+
>
|
|
827
|
+
Checkbox
|
|
407
828
|
</div>
|
|
408
|
-
</
|
|
829
|
+
</label>
|
|
409
830
|
</div>
|
|
410
831
|
`;
|
|
411
832
|
|
|
412
|
-
exports[`Storybook Tests Checkbox
|
|
833
|
+
exports[`Storybook Tests Checkbox ReadOnly 1`] = `
|
|
413
834
|
.c0 {
|
|
414
835
|
position: relative;
|
|
415
836
|
display: -webkit-box;
|
|
@@ -420,6 +841,10 @@ exports[`Storybook Tests Checkbox Unlabelled 1`] = `
|
|
|
420
841
|
gap: 4px;
|
|
421
842
|
}
|
|
422
843
|
|
|
844
|
+
.c0:has(input[readonly]) {
|
|
845
|
+
cursor: default;
|
|
846
|
+
}
|
|
847
|
+
|
|
423
848
|
.c0:disabled,
|
|
424
849
|
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
425
850
|
cursor: default;
|
|
@@ -448,12 +873,9 @@ exports[`Storybook Tests Checkbox Unlabelled 1`] = `
|
|
|
448
873
|
cursor: default;
|
|
449
874
|
}
|
|
450
875
|
|
|
451
|
-
.c2[type='checkbox']
|
|
452
|
-
cursor: default;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.c2[type='checkbox']:read-only {
|
|
876
|
+
.c2[type='checkbox'][readonly] {
|
|
456
877
|
cursor: default;
|
|
878
|
+
opacity: 0.32;
|
|
457
879
|
}
|
|
458
880
|
|
|
459
881
|
.c2[type='checkbox']:checked {
|
|
@@ -517,56 +939,62 @@ exports[`Storybook Tests Checkbox Unlabelled 1`] = `
|
|
|
517
939
|
width: 24px;
|
|
518
940
|
height: 24px;
|
|
519
941
|
color: var(--charcoal-text5);
|
|
520
|
-
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
.c4 {
|
|
945
|
+
color: var(--charcoal-text2);
|
|
946
|
+
font-size: 14px;
|
|
947
|
+
line-height: 20px;
|
|
521
948
|
}
|
|
522
949
|
|
|
523
950
|
<div
|
|
524
951
|
data-dark={false}
|
|
525
952
|
>
|
|
526
|
-
<
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
953
|
+
<label
|
|
954
|
+
aria-disabled={false}
|
|
955
|
+
className="c0"
|
|
956
|
+
>
|
|
957
|
+
<div
|
|
958
|
+
className="c1"
|
|
530
959
|
>
|
|
960
|
+
<input
|
|
961
|
+
aria-readonly={true}
|
|
962
|
+
checked={true}
|
|
963
|
+
className="c2"
|
|
964
|
+
disabled={false}
|
|
965
|
+
name="readonly"
|
|
966
|
+
onChange={[Function]}
|
|
967
|
+
onClick={[Function]}
|
|
968
|
+
onDragStart={[Function]}
|
|
969
|
+
onKeyDown={[Function]}
|
|
970
|
+
onKeyUp={[Function]}
|
|
971
|
+
onMouseDown={[Function]}
|
|
972
|
+
onMouseEnter={[Function]}
|
|
973
|
+
onMouseLeave={[Function]}
|
|
974
|
+
onMouseUp={[Function]}
|
|
975
|
+
onTouchCancel={[Function]}
|
|
976
|
+
onTouchEnd={[Function]}
|
|
977
|
+
onTouchMove={[Function]}
|
|
978
|
+
onTouchStart={[Function]}
|
|
979
|
+
readOnly={true}
|
|
980
|
+
type="checkbox"
|
|
981
|
+
/>
|
|
531
982
|
<div
|
|
532
|
-
|
|
983
|
+
aria-hidden={true}
|
|
984
|
+
checked={true}
|
|
985
|
+
className="c3"
|
|
533
986
|
>
|
|
534
|
-
<
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
className="c2"
|
|
538
|
-
disabled={false}
|
|
539
|
-
name="unlabelled"
|
|
540
|
-
onBlur={[Function]}
|
|
541
|
-
onChange={[Function]}
|
|
542
|
-
onClick={[Function]}
|
|
543
|
-
onDragStart={[Function]}
|
|
544
|
-
onFocus={[Function]}
|
|
545
|
-
onKeyDown={[Function]}
|
|
546
|
-
onKeyUp={[Function]}
|
|
547
|
-
onMouseDown={[Function]}
|
|
548
|
-
onMouseEnter={[Function]}
|
|
549
|
-
onMouseLeave={[Function]}
|
|
550
|
-
onMouseUp={[Function]}
|
|
551
|
-
onTouchCancel={[Function]}
|
|
552
|
-
onTouchEnd={[Function]}
|
|
553
|
-
onTouchMove={[Function]}
|
|
554
|
-
onTouchStart={[Function]}
|
|
555
|
-
readOnly={false}
|
|
556
|
-
type="checkbox"
|
|
987
|
+
<pixiv-icon
|
|
988
|
+
name="24/Check"
|
|
989
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
557
990
|
/>
|
|
558
|
-
<div
|
|
559
|
-
aria-hidden={true}
|
|
560
|
-
checked={false}
|
|
561
|
-
className="c3"
|
|
562
|
-
>
|
|
563
|
-
<pixiv-icon
|
|
564
|
-
name="24/Check"
|
|
565
|
-
unsafe-non-guideline-scale={0.6666666666666666}
|
|
566
|
-
/>
|
|
567
|
-
</div>
|
|
568
991
|
</div>
|
|
569
|
-
</
|
|
570
|
-
|
|
992
|
+
</div>
|
|
993
|
+
<div
|
|
994
|
+
className="c4"
|
|
995
|
+
>
|
|
996
|
+
ReadOnly
|
|
997
|
+
</div>
|
|
998
|
+
</label>
|
|
571
999
|
</div>
|
|
572
1000
|
`;
|