@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.
- package/dist/_lib/compat.d.ts +1 -0
- package/dist/_lib/compat.d.ts.map +1 -1
- package/dist/components/Button/StyledButton.d.ts +12 -0
- package/dist/components/Button/StyledButton.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/lib/variantToBackground.d.ts +3 -0
- package/dist/components/Button/lib/variantToBackground.d.ts.map +1 -0
- package/dist/components/Button/lib/variantToFont.d.ts +3 -0
- package/dist/components/Button/lib/variantToFont.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.story.d.ts +6 -15
- package/dist/components/Checkbox/index.story.d.ts.map +1 -1
- package/dist/components/Clickable/index.story.d.ts +4 -6
- package/dist/components/Clickable/index.story.d.ts.map +1 -1
- package/dist/components/DropdownSelector/DropdownMenuItem.d.ts.map +1 -1
- package/dist/components/DropdownSelector/ListItem/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/index.story.d.ts +1 -0
- package/dist/components/DropdownSelector/index.story.d.ts.map +1 -1
- package/dist/components/FieldLabel/index.d.ts.map +1 -1
- package/dist/components/Icon/index.story.d.ts +1 -1
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/LoadingSpinner/index.d.ts.map +1 -1
- package/dist/components/Modal/ModalPlumbing.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.story.d.ts +1 -0
- package/dist/components/Modal/index.story.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.story.d.ts +2 -0
- package/dist/components/MultiSelect/index.story.d.ts.map +1 -1
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/RadioGroupContext.d.ts +1 -1
- package/dist/components/SegmentedControl/RadioGroupContext.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/TagItem/index.d.ts.map +1 -1
- package/dist/components/TextField/TextField.story.d.ts.map +1 -1
- package/dist/components/TextField/index.d.ts.map +1 -1
- package/dist/index.cjs.js +1026 -384
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +991 -349
- package/dist/index.esm.js.map +1 -1
- package/dist/styled.d.ts +4 -4
- package/package.json +18 -21
- package/src/_lib/compat.ts +8 -0
- package/src/components/Button/StyledButton.tsx +66 -0
- package/src/components/Button/__snapshots__/index.story.storyshot +312 -592
- package/src/components/Button/index.tsx +14 -70
- package/src/components/Button/lib/variantToBackground.tsx +19 -0
- package/src/components/Button/lib/variantToFont.tsx +19 -0
- package/src/components/Checkbox/__snapshots__/index.story.storyshot +209 -40
- package/src/components/Checkbox/index.story.tsx +82 -64
- package/src/components/Checkbox/index.tsx +47 -17
- package/src/components/Clickable/__snapshots__/index.story.storyshot +4 -0
- package/src/components/Clickable/index.story.tsx +12 -9
- package/src/components/Clickable/index.tsx +1 -0
- package/src/components/DropdownSelector/DropdownMenuItem.tsx +6 -3
- package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +3 -10
- package/src/components/DropdownSelector/ListItem/index.tsx +6 -4
- package/src/components/DropdownSelector/MenuItemGroup/index.tsx +1 -1
- package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +4 -13
- package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +20 -37
- package/src/components/DropdownSelector/Popover/index.tsx +5 -8
- package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +227 -294
- package/src/components/DropdownSelector/index.story.tsx +33 -0
- package/src/components/DropdownSelector/index.tsx +63 -20
- package/src/components/FieldLabel/index.tsx +77 -12
- package/src/components/IconButton/__snapshots__/index.story.storyshot +30 -54
- package/src/components/IconButton/index.tsx +51 -26
- package/src/components/LoadingSpinner/index.tsx +3 -6
- package/src/components/Modal/Dialog/index.tsx +1 -1
- package/src/components/Modal/ModalPlumbing.tsx +26 -5
- package/src/components/Modal/__snapshots__/index.story.storyshot +2450 -108
- package/src/components/Modal/index.story.tsx +27 -0
- package/src/components/Modal/index.tsx +19 -4
- package/src/components/MultiSelect/__snapshots__/index.story.storyshot +528 -25
- package/src/components/MultiSelect/index.story.tsx +60 -0
- package/src/components/MultiSelect/index.tsx +82 -22
- package/src/components/Radio/__snapshots__/index.story.storyshot +32 -49
- package/src/components/Radio/index.tsx +71 -23
- package/src/components/SegmentedControl/RadioGroupContext.tsx +1 -1
- package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +9 -10
- package/src/components/SegmentedControl/index.tsx +36 -16
- package/src/components/Switch/__snapshots__/index.story.storyshot +6 -18
- package/src/components/Switch/index.tsx +10 -15
- package/src/components/TagItem/__snapshots__/index.story.storyshot +39 -158
- package/src/components/TagItem/index.tsx +84 -19
- package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +55 -91
- package/src/components/TextField/TextField.story.tsx +35 -18
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +92 -148
- package/src/components/TextField/index.tsx +0 -1
- package/dist/components/Checkbox/performance.test.d.ts +0 -4
- package/dist/components/Checkbox/performance.test.d.ts.map +0 -1
- package/dist/components/Checkbox/snapshot.test.d.ts +0 -2
- package/dist/components/Checkbox/snapshot.test.d.ts.map +0 -1
- package/src/components/Checkbox/__snapshots__/snapshot.test.tsx.snap +0 -763
- package/src/components/Checkbox/performance.test.tsx +0 -30
- package/src/components/Checkbox/snapshot.test.tsx +0 -66
|
@@ -210,4 +210,31 @@ const BottomSheetStory = (args: ModalProps) => {
|
|
|
210
210
|
|
|
211
211
|
export const BottomSheet: Story<ModalProps> = BottomSheetStory.bind({})
|
|
212
212
|
|
|
213
|
+
export const NotDismmissableStory: Story<ModalProps> = (args: ModalProps) => {
|
|
214
|
+
const state = useOverlayTriggerState({})
|
|
215
|
+
return (
|
|
216
|
+
<OverlayProvider>
|
|
217
|
+
<Button onClick={() => state.open()}>Open Modal</Button>
|
|
218
|
+
|
|
219
|
+
<Modal {...args} isOpen={state.isOpen} onClose={() => state.close()}>
|
|
220
|
+
<ModalHeader />
|
|
221
|
+
<ModalBody>
|
|
222
|
+
<ModalVStack>
|
|
223
|
+
<StyledModalText>
|
|
224
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod
|
|
225
|
+
placeat tenetur, necessitatibus laudantium cumque exercitationem
|
|
226
|
+
provident. Quaerat iure enim, eveniet dolores earum odio quo
|
|
227
|
+
possimus fugiat aspernatur, numquam, commodi repellat.
|
|
228
|
+
</StyledModalText>
|
|
229
|
+
</ModalVStack>
|
|
230
|
+
<ModalButtons>
|
|
231
|
+
<Button variant="Primary" onClick={() => state.close()} fullWidth>
|
|
232
|
+
OK
|
|
233
|
+
</Button>
|
|
234
|
+
</ModalButtons>
|
|
235
|
+
</ModalBody>
|
|
236
|
+
</Modal>
|
|
237
|
+
</OverlayProvider>
|
|
238
|
+
)
|
|
239
|
+
}
|
|
213
240
|
export { InternalScrollStory as InternalScroll } from './__stories__/InternalScrollStory'
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
useModalOverlay,
|
|
7
7
|
} from '@react-aria/overlays'
|
|
8
8
|
import styled, { css, useTheme } from 'styled-components'
|
|
9
|
-
import { theme } from '../../styled'
|
|
10
9
|
import { AriaDialogProps } from '@react-types/dialog'
|
|
11
10
|
import { maxWidth } from '@charcoal-ui/utils'
|
|
12
11
|
import { useMedia } from '@charcoal-ui/styled'
|
|
@@ -83,7 +82,12 @@ const Modal = forwardRef<HTMLDivElement, ModalProps>(function ModalInner(
|
|
|
83
82
|
const ref = useObjectRef<HTMLDivElement>(external)
|
|
84
83
|
|
|
85
84
|
const { modalProps, underlayProps } = useModalOverlay(
|
|
86
|
-
|
|
85
|
+
{
|
|
86
|
+
...props,
|
|
87
|
+
isKeyboardDismissDisabled:
|
|
88
|
+
isDismissable === undefined || isDismissable === false,
|
|
89
|
+
},
|
|
90
|
+
|
|
87
91
|
{
|
|
88
92
|
close: onClose,
|
|
89
93
|
isOpen: isOpen,
|
|
@@ -214,7 +218,7 @@ const ModalBackground = animated(styled.div<{
|
|
|
214
218
|
padding: 40px 0;
|
|
215
219
|
box-sizing: border-box;
|
|
216
220
|
|
|
217
|
-
background-color:
|
|
221
|
+
background-color: var(--charcoal-surface4);
|
|
218
222
|
|
|
219
223
|
@media ${({ theme }) => maxWidth(theme.breakpoint.screen1)} {
|
|
220
224
|
${(p) =>
|
|
@@ -230,7 +234,18 @@ const ModalCrossButton = styled(IconButton)`
|
|
|
230
234
|
top: 8px;
|
|
231
235
|
right: 8px;
|
|
232
236
|
|
|
233
|
-
|
|
237
|
+
color: var(--charcoal-text3);
|
|
238
|
+
transition: 0.2s color;
|
|
239
|
+
|
|
240
|
+
&:not(:disabled):not([aria-disabled]),
|
|
241
|
+
&[aria-disabled='false'] {
|
|
242
|
+
&:hover {
|
|
243
|
+
color: var(--charcoal-text3-hover);
|
|
244
|
+
}
|
|
245
|
+
&:active {
|
|
246
|
+
color: var(--charcoal-text3-press);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
234
249
|
`
|
|
235
250
|
|
|
236
251
|
export function ModalTitle(props: React.HTMLAttributes<HTMLHeadingElement>) {
|
|
@@ -14,13 +14,9 @@ exports[`Storyshots MultiSelect Default 1`] = `
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.c1:disabled,
|
|
17
|
-
.c1[aria-disabled]:not([aria-disabled=false]) {
|
|
18
|
-
cursor: default;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.c1:disabled,
|
|
22
|
-
.c1[aria-disabled]:not([aria-disabled=false]) {
|
|
17
|
+
.c1[aria-disabled]:not([aria-disabled='false']) {
|
|
23
18
|
opacity: 0.32;
|
|
19
|
+
cursor: default;
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
.c4 {
|
|
@@ -64,33 +60,31 @@ exports[`Storyshots MultiSelect Default 1`] = `
|
|
|
64
60
|
margin: 0;
|
|
65
61
|
background-color: var(--charcoal-text3);
|
|
66
62
|
border-radius: 999999px;
|
|
67
|
-
-webkit-transition: 0.2s background-color;
|
|
68
|
-
transition: 0.2s background-color;
|
|
63
|
+
-webkit-transition: 0.2s background-color,0.2s box-shadow;
|
|
64
|
+
transition: 0.2s background-color,0.2s box-shadow;
|
|
69
65
|
}
|
|
70
66
|
|
|
71
67
|
.c2[type='checkbox']:checked {
|
|
72
68
|
background-color: var(--charcoal-brand);
|
|
73
|
-
-webkit-transition: 0.2s background-color;
|
|
74
|
-
transition: 0.2s background-color;
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
.c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
|
|
78
|
-
.c2[type='checkbox']:checked:hover[aria-disabled=false] {
|
|
72
|
+
.c2[type='checkbox']:checked:hover[aria-disabled='false'] {
|
|
79
73
|
background-color: var(--charcoal-brand-hover);
|
|
80
74
|
}
|
|
81
75
|
|
|
82
76
|
.c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
|
|
83
|
-
.c2[type='checkbox']:checked:active[aria-disabled=false] {
|
|
77
|
+
.c2[type='checkbox']:checked:active[aria-disabled='false'] {
|
|
84
78
|
background-color: var(--charcoal-brand-press);
|
|
85
79
|
}
|
|
86
80
|
|
|
87
81
|
.c2[type='checkbox']:hover:not(:disabled):not([aria-disabled]),
|
|
88
|
-
.c2[type='checkbox']:hover[aria-disabled=false] {
|
|
82
|
+
.c2[type='checkbox']:hover[aria-disabled='false'] {
|
|
89
83
|
background-color: var(--charcoal-text3-hover);
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
.c2[type='checkbox']:active:not(:disabled):not([aria-disabled]),
|
|
93
|
-
.c2[type='checkbox']:active[aria-disabled=false] {
|
|
87
|
+
.c2[type='checkbox']:active[aria-disabled='false'] {
|
|
94
88
|
background-color: var(--charcoal-text3-press);
|
|
95
89
|
}
|
|
96
90
|
|
|
@@ -115,6 +109,8 @@ exports[`Storyshots MultiSelect Default 1`] = `
|
|
|
115
109
|
height: 24px;
|
|
116
110
|
border-radius: 999999px;
|
|
117
111
|
color: var(--charcoal-text5);
|
|
112
|
+
-webkit-transition: 0.2s box-shadow;
|
|
113
|
+
transition: 0.2s box-shadow;
|
|
118
114
|
}
|
|
119
115
|
|
|
120
116
|
.c0 {
|
|
@@ -255,7 +251,263 @@ exports[`Storyshots MultiSelect Default 1`] = `
|
|
|
255
251
|
</div>
|
|
256
252
|
`;
|
|
257
253
|
|
|
258
|
-
exports[`Storyshots MultiSelect
|
|
254
|
+
exports[`Storyshots MultiSelect Invalid 1`] = `
|
|
255
|
+
.c1 {
|
|
256
|
+
display: grid;
|
|
257
|
+
grid-template-columns: auto 1fr;
|
|
258
|
+
-webkit-align-items: center;
|
|
259
|
+
-webkit-box-align: center;
|
|
260
|
+
-ms-flex-align: center;
|
|
261
|
+
align-items: center;
|
|
262
|
+
position: relative;
|
|
263
|
+
cursor: pointer;
|
|
264
|
+
gap: 4px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.c1:disabled,
|
|
268
|
+
.c1[aria-disabled]:not([aria-disabled='false']) {
|
|
269
|
+
opacity: 0.32;
|
|
270
|
+
cursor: default;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.c4 {
|
|
274
|
+
display: -webkit-box;
|
|
275
|
+
display: -webkit-flex;
|
|
276
|
+
display: -ms-flexbox;
|
|
277
|
+
display: flex;
|
|
278
|
+
-webkit-align-items: center;
|
|
279
|
+
-webkit-box-align: center;
|
|
280
|
+
-ms-flex-align: center;
|
|
281
|
+
align-items: center;
|
|
282
|
+
font-size: 14px;
|
|
283
|
+
line-height: 22px;
|
|
284
|
+
display: flow-root;
|
|
285
|
+
color: var(--charcoal-text2);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.c4::before {
|
|
289
|
+
display: block;
|
|
290
|
+
width: 0;
|
|
291
|
+
height: 0;
|
|
292
|
+
content: '';
|
|
293
|
+
margin-top: -4px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.c4::after {
|
|
297
|
+
display: block;
|
|
298
|
+
width: 0;
|
|
299
|
+
height: 0;
|
|
300
|
+
content: '';
|
|
301
|
+
margin-bottom: -4px;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.c2[type='checkbox'] {
|
|
305
|
+
-webkit-appearance: none;
|
|
306
|
+
-moz-appearance: none;
|
|
307
|
+
appearance: none;
|
|
308
|
+
display: block;
|
|
309
|
+
width: 20px;
|
|
310
|
+
height: 20px;
|
|
311
|
+
margin: 0;
|
|
312
|
+
background-color: var(--charcoal-text3);
|
|
313
|
+
border-radius: 999999px;
|
|
314
|
+
-webkit-transition: 0.2s background-color,0.2s box-shadow;
|
|
315
|
+
transition: 0.2s background-color,0.2s box-shadow;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.c2[type='checkbox']:checked {
|
|
319
|
+
background-color: var(--charcoal-brand);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
|
|
323
|
+
.c2[type='checkbox']:checked:hover[aria-disabled='false'] {
|
|
324
|
+
background-color: var(--charcoal-brand-hover);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
|
|
328
|
+
.c2[type='checkbox']:checked:active[aria-disabled='false'] {
|
|
329
|
+
background-color: var(--charcoal-brand-press);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.c2[type='checkbox']:hover:not(:disabled):not([aria-disabled]),
|
|
333
|
+
.c2[type='checkbox']:hover[aria-disabled='false'] {
|
|
334
|
+
background-color: var(--charcoal-text3-hover);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.c2[type='checkbox']:active:not(:disabled):not([aria-disabled]),
|
|
338
|
+
.c2[type='checkbox']:active[aria-disabled='false'] {
|
|
339
|
+
background-color: var(--charcoal-text3-press);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled]),
|
|
343
|
+
.c2[type='checkbox'][aria-disabled='false'] {
|
|
344
|
+
box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.c3 {
|
|
348
|
+
position: absolute;
|
|
349
|
+
top: -2px;
|
|
350
|
+
left: -2px;
|
|
351
|
+
box-sizing: border-box;
|
|
352
|
+
display: -webkit-box;
|
|
353
|
+
display: -webkit-flex;
|
|
354
|
+
display: -ms-flexbox;
|
|
355
|
+
display: flex;
|
|
356
|
+
-webkit-align-items: center;
|
|
357
|
+
-webkit-box-align: center;
|
|
358
|
+
-ms-flex-align: center;
|
|
359
|
+
align-items: center;
|
|
360
|
+
-webkit-box-pack: center;
|
|
361
|
+
-webkit-justify-content: center;
|
|
362
|
+
-ms-flex-pack: center;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
width: 24px;
|
|
365
|
+
height: 24px;
|
|
366
|
+
border-radius: 999999px;
|
|
367
|
+
color: var(--charcoal-text5);
|
|
368
|
+
-webkit-transition: 0.2s box-shadow;
|
|
369
|
+
transition: 0.2s box-shadow;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.c0 {
|
|
373
|
+
display: grid;
|
|
374
|
+
grid-template-columns: 1fr;
|
|
375
|
+
gap: 8px;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
<div
|
|
379
|
+
data-dark={false}
|
|
380
|
+
>
|
|
381
|
+
<div
|
|
382
|
+
aria-label=""
|
|
383
|
+
className="c0"
|
|
384
|
+
data-testid="SelectGroup"
|
|
385
|
+
>
|
|
386
|
+
<label
|
|
387
|
+
aria-disabled={false}
|
|
388
|
+
className="c1"
|
|
389
|
+
>
|
|
390
|
+
<input
|
|
391
|
+
aria-invalid={true}
|
|
392
|
+
checked={false}
|
|
393
|
+
className="c2"
|
|
394
|
+
disabled={false}
|
|
395
|
+
name="defaultName"
|
|
396
|
+
onChange={[Function]}
|
|
397
|
+
type="checkbox"
|
|
398
|
+
value="選択肢1"
|
|
399
|
+
/>
|
|
400
|
+
<div
|
|
401
|
+
aria-hidden={true}
|
|
402
|
+
className="c3"
|
|
403
|
+
>
|
|
404
|
+
<pixiv-icon
|
|
405
|
+
name="24/Check"
|
|
406
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
407
|
+
/>
|
|
408
|
+
</div>
|
|
409
|
+
<div
|
|
410
|
+
className="c4"
|
|
411
|
+
>
|
|
412
|
+
選択肢
|
|
413
|
+
1
|
|
414
|
+
</div>
|
|
415
|
+
</label>
|
|
416
|
+
<label
|
|
417
|
+
aria-disabled={false}
|
|
418
|
+
className="c1"
|
|
419
|
+
>
|
|
420
|
+
<input
|
|
421
|
+
aria-invalid={true}
|
|
422
|
+
checked={false}
|
|
423
|
+
className="c2"
|
|
424
|
+
disabled={false}
|
|
425
|
+
name="defaultName"
|
|
426
|
+
onChange={[Function]}
|
|
427
|
+
type="checkbox"
|
|
428
|
+
value="選択肢2"
|
|
429
|
+
/>
|
|
430
|
+
<div
|
|
431
|
+
aria-hidden={true}
|
|
432
|
+
className="c3"
|
|
433
|
+
>
|
|
434
|
+
<pixiv-icon
|
|
435
|
+
name="24/Check"
|
|
436
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
437
|
+
/>
|
|
438
|
+
</div>
|
|
439
|
+
<div
|
|
440
|
+
className="c4"
|
|
441
|
+
>
|
|
442
|
+
選択肢
|
|
443
|
+
2
|
|
444
|
+
</div>
|
|
445
|
+
</label>
|
|
446
|
+
<label
|
|
447
|
+
aria-disabled={false}
|
|
448
|
+
className="c1"
|
|
449
|
+
>
|
|
450
|
+
<input
|
|
451
|
+
aria-invalid={true}
|
|
452
|
+
checked={false}
|
|
453
|
+
className="c2"
|
|
454
|
+
disabled={false}
|
|
455
|
+
name="defaultName"
|
|
456
|
+
onChange={[Function]}
|
|
457
|
+
type="checkbox"
|
|
458
|
+
value="選択肢3"
|
|
459
|
+
/>
|
|
460
|
+
<div
|
|
461
|
+
aria-hidden={true}
|
|
462
|
+
className="c3"
|
|
463
|
+
>
|
|
464
|
+
<pixiv-icon
|
|
465
|
+
name="24/Check"
|
|
466
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
467
|
+
/>
|
|
468
|
+
</div>
|
|
469
|
+
<div
|
|
470
|
+
className="c4"
|
|
471
|
+
>
|
|
472
|
+
選択肢
|
|
473
|
+
3
|
|
474
|
+
</div>
|
|
475
|
+
</label>
|
|
476
|
+
<label
|
|
477
|
+
aria-disabled={false}
|
|
478
|
+
className="c1"
|
|
479
|
+
>
|
|
480
|
+
<input
|
|
481
|
+
aria-invalid={true}
|
|
482
|
+
checked={false}
|
|
483
|
+
className="c2"
|
|
484
|
+
disabled={false}
|
|
485
|
+
name="defaultName"
|
|
486
|
+
onChange={[Function]}
|
|
487
|
+
type="checkbox"
|
|
488
|
+
value="選択肢4"
|
|
489
|
+
/>
|
|
490
|
+
<div
|
|
491
|
+
aria-hidden={true}
|
|
492
|
+
className="c3"
|
|
493
|
+
>
|
|
494
|
+
<pixiv-icon
|
|
495
|
+
name="24/Check"
|
|
496
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
497
|
+
/>
|
|
498
|
+
</div>
|
|
499
|
+
<div
|
|
500
|
+
className="c4"
|
|
501
|
+
>
|
|
502
|
+
選択肢
|
|
503
|
+
4
|
|
504
|
+
</div>
|
|
505
|
+
</label>
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
`;
|
|
509
|
+
|
|
510
|
+
exports[`Storyshots MultiSelect Overlay 1`] = `
|
|
259
511
|
.c1 {
|
|
260
512
|
display: grid;
|
|
261
513
|
grid-template-columns: auto 1fr;
|
|
@@ -269,13 +521,264 @@ exports[`Storyshots MultiSelect Playground 1`] = `
|
|
|
269
521
|
}
|
|
270
522
|
|
|
271
523
|
.c1:disabled,
|
|
272
|
-
.c1[aria-disabled]:not([aria-disabled=false]) {
|
|
524
|
+
.c1[aria-disabled]:not([aria-disabled='false']) {
|
|
525
|
+
opacity: 0.32;
|
|
273
526
|
cursor: default;
|
|
274
527
|
}
|
|
275
528
|
|
|
529
|
+
.c4 {
|
|
530
|
+
display: -webkit-box;
|
|
531
|
+
display: -webkit-flex;
|
|
532
|
+
display: -ms-flexbox;
|
|
533
|
+
display: flex;
|
|
534
|
+
-webkit-align-items: center;
|
|
535
|
+
-webkit-box-align: center;
|
|
536
|
+
-ms-flex-align: center;
|
|
537
|
+
align-items: center;
|
|
538
|
+
font-size: 14px;
|
|
539
|
+
line-height: 22px;
|
|
540
|
+
display: flow-root;
|
|
541
|
+
color: var(--charcoal-text2);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.c4::before {
|
|
545
|
+
display: block;
|
|
546
|
+
width: 0;
|
|
547
|
+
height: 0;
|
|
548
|
+
content: '';
|
|
549
|
+
margin-top: -4px;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.c4::after {
|
|
553
|
+
display: block;
|
|
554
|
+
width: 0;
|
|
555
|
+
height: 0;
|
|
556
|
+
content: '';
|
|
557
|
+
margin-bottom: -4px;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.c2[type='checkbox'] {
|
|
561
|
+
-webkit-appearance: none;
|
|
562
|
+
-moz-appearance: none;
|
|
563
|
+
appearance: none;
|
|
564
|
+
display: block;
|
|
565
|
+
width: 20px;
|
|
566
|
+
height: 20px;
|
|
567
|
+
margin: 0;
|
|
568
|
+
background-color: var(--charcoal-text3);
|
|
569
|
+
border-radius: 999999px;
|
|
570
|
+
-webkit-transition: 0.2s background-color,0.2s box-shadow;
|
|
571
|
+
transition: 0.2s background-color,0.2s box-shadow;
|
|
572
|
+
background-color: var(--charcoal-surface4);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.c2[type='checkbox']:checked {
|
|
576
|
+
background-color: var(--charcoal-brand);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
|
|
580
|
+
.c2[type='checkbox']:checked:hover[aria-disabled='false'] {
|
|
581
|
+
background-color: var(--charcoal-brand-hover);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
|
|
585
|
+
.c2[type='checkbox']:checked:active[aria-disabled='false'] {
|
|
586
|
+
background-color: var(--charcoal-brand-press);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.c2[type='checkbox']:hover:not(:disabled):not([aria-disabled]),
|
|
590
|
+
.c2[type='checkbox']:hover[aria-disabled='false'] {
|
|
591
|
+
background-color: var(--charcoal-text3-hover);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.c2[type='checkbox']:active:not(:disabled):not([aria-disabled]),
|
|
595
|
+
.c2[type='checkbox']:active[aria-disabled='false'] {
|
|
596
|
+
background-color: var(--charcoal-text3-press);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.c3 {
|
|
600
|
+
position: absolute;
|
|
601
|
+
top: -2px;
|
|
602
|
+
left: -2px;
|
|
603
|
+
box-sizing: border-box;
|
|
604
|
+
display: -webkit-box;
|
|
605
|
+
display: -webkit-flex;
|
|
606
|
+
display: -ms-flexbox;
|
|
607
|
+
display: flex;
|
|
608
|
+
-webkit-align-items: center;
|
|
609
|
+
-webkit-box-align: center;
|
|
610
|
+
-ms-flex-align: center;
|
|
611
|
+
align-items: center;
|
|
612
|
+
-webkit-box-pack: center;
|
|
613
|
+
-webkit-justify-content: center;
|
|
614
|
+
-ms-flex-pack: center;
|
|
615
|
+
justify-content: center;
|
|
616
|
+
width: 24px;
|
|
617
|
+
height: 24px;
|
|
618
|
+
border-radius: 999999px;
|
|
619
|
+
color: var(--charcoal-text5);
|
|
620
|
+
-webkit-transition: 0.2s box-shadow;
|
|
621
|
+
transition: 0.2s box-shadow;
|
|
622
|
+
border-color: var(--charcoal-text5);
|
|
623
|
+
border-width: 2px;
|
|
624
|
+
border-style: solid;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.c0 {
|
|
628
|
+
display: grid;
|
|
629
|
+
grid-template-columns: 1fr;
|
|
630
|
+
gap: 8px;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
<div
|
|
634
|
+
data-dark={false}
|
|
635
|
+
>
|
|
636
|
+
<div
|
|
637
|
+
aria-label=""
|
|
638
|
+
className="c0"
|
|
639
|
+
data-testid="SelectGroup"
|
|
640
|
+
>
|
|
641
|
+
<label
|
|
642
|
+
aria-disabled={false}
|
|
643
|
+
className="c1"
|
|
644
|
+
>
|
|
645
|
+
<input
|
|
646
|
+
aria-invalid={false}
|
|
647
|
+
checked={false}
|
|
648
|
+
className="c2"
|
|
649
|
+
disabled={false}
|
|
650
|
+
name="defaultName"
|
|
651
|
+
onChange={[Function]}
|
|
652
|
+
type="checkbox"
|
|
653
|
+
value="選択肢1"
|
|
654
|
+
/>
|
|
655
|
+
<div
|
|
656
|
+
aria-hidden={true}
|
|
657
|
+
className="c3"
|
|
658
|
+
>
|
|
659
|
+
<pixiv-icon
|
|
660
|
+
name="24/Check"
|
|
661
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
662
|
+
/>
|
|
663
|
+
</div>
|
|
664
|
+
<div
|
|
665
|
+
className="c4"
|
|
666
|
+
>
|
|
667
|
+
選択肢
|
|
668
|
+
1
|
|
669
|
+
</div>
|
|
670
|
+
</label>
|
|
671
|
+
<label
|
|
672
|
+
aria-disabled={false}
|
|
673
|
+
className="c1"
|
|
674
|
+
>
|
|
675
|
+
<input
|
|
676
|
+
aria-invalid={false}
|
|
677
|
+
checked={false}
|
|
678
|
+
className="c2"
|
|
679
|
+
disabled={false}
|
|
680
|
+
name="defaultName"
|
|
681
|
+
onChange={[Function]}
|
|
682
|
+
type="checkbox"
|
|
683
|
+
value="選択肢2"
|
|
684
|
+
/>
|
|
685
|
+
<div
|
|
686
|
+
aria-hidden={true}
|
|
687
|
+
className="c3"
|
|
688
|
+
>
|
|
689
|
+
<pixiv-icon
|
|
690
|
+
name="24/Check"
|
|
691
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
692
|
+
/>
|
|
693
|
+
</div>
|
|
694
|
+
<div
|
|
695
|
+
className="c4"
|
|
696
|
+
>
|
|
697
|
+
選択肢
|
|
698
|
+
2
|
|
699
|
+
</div>
|
|
700
|
+
</label>
|
|
701
|
+
<label
|
|
702
|
+
aria-disabled={false}
|
|
703
|
+
className="c1"
|
|
704
|
+
>
|
|
705
|
+
<input
|
|
706
|
+
aria-invalid={false}
|
|
707
|
+
checked={false}
|
|
708
|
+
className="c2"
|
|
709
|
+
disabled={false}
|
|
710
|
+
name="defaultName"
|
|
711
|
+
onChange={[Function]}
|
|
712
|
+
type="checkbox"
|
|
713
|
+
value="選択肢3"
|
|
714
|
+
/>
|
|
715
|
+
<div
|
|
716
|
+
aria-hidden={true}
|
|
717
|
+
className="c3"
|
|
718
|
+
>
|
|
719
|
+
<pixiv-icon
|
|
720
|
+
name="24/Check"
|
|
721
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
722
|
+
/>
|
|
723
|
+
</div>
|
|
724
|
+
<div
|
|
725
|
+
className="c4"
|
|
726
|
+
>
|
|
727
|
+
選択肢
|
|
728
|
+
3
|
|
729
|
+
</div>
|
|
730
|
+
</label>
|
|
731
|
+
<label
|
|
732
|
+
aria-disabled={false}
|
|
733
|
+
className="c1"
|
|
734
|
+
>
|
|
735
|
+
<input
|
|
736
|
+
aria-invalid={false}
|
|
737
|
+
checked={false}
|
|
738
|
+
className="c2"
|
|
739
|
+
disabled={false}
|
|
740
|
+
name="defaultName"
|
|
741
|
+
onChange={[Function]}
|
|
742
|
+
type="checkbox"
|
|
743
|
+
value="選択肢4"
|
|
744
|
+
/>
|
|
745
|
+
<div
|
|
746
|
+
aria-hidden={true}
|
|
747
|
+
className="c3"
|
|
748
|
+
>
|
|
749
|
+
<pixiv-icon
|
|
750
|
+
name="24/Check"
|
|
751
|
+
unsafe-non-guideline-scale={0.6666666666666666}
|
|
752
|
+
/>
|
|
753
|
+
</div>
|
|
754
|
+
<div
|
|
755
|
+
className="c4"
|
|
756
|
+
>
|
|
757
|
+
選択肢
|
|
758
|
+
4
|
|
759
|
+
</div>
|
|
760
|
+
</label>
|
|
761
|
+
</div>
|
|
762
|
+
</div>
|
|
763
|
+
`;
|
|
764
|
+
|
|
765
|
+
exports[`Storyshots MultiSelect Playground 1`] = `
|
|
766
|
+
.c1 {
|
|
767
|
+
display: grid;
|
|
768
|
+
grid-template-columns: auto 1fr;
|
|
769
|
+
-webkit-align-items: center;
|
|
770
|
+
-webkit-box-align: center;
|
|
771
|
+
-ms-flex-align: center;
|
|
772
|
+
align-items: center;
|
|
773
|
+
position: relative;
|
|
774
|
+
cursor: pointer;
|
|
775
|
+
gap: 4px;
|
|
776
|
+
}
|
|
777
|
+
|
|
276
778
|
.c1:disabled,
|
|
277
|
-
.c1[aria-disabled]:not([aria-disabled=false]) {
|
|
779
|
+
.c1[aria-disabled]:not([aria-disabled='false']) {
|
|
278
780
|
opacity: 0.32;
|
|
781
|
+
cursor: default;
|
|
279
782
|
}
|
|
280
783
|
|
|
281
784
|
.c4 {
|
|
@@ -319,33 +822,31 @@ exports[`Storyshots MultiSelect Playground 1`] = `
|
|
|
319
822
|
margin: 0;
|
|
320
823
|
background-color: var(--charcoal-text3);
|
|
321
824
|
border-radius: 999999px;
|
|
322
|
-
-webkit-transition: 0.2s background-color;
|
|
323
|
-
transition: 0.2s background-color;
|
|
825
|
+
-webkit-transition: 0.2s background-color,0.2s box-shadow;
|
|
826
|
+
transition: 0.2s background-color,0.2s box-shadow;
|
|
324
827
|
}
|
|
325
828
|
|
|
326
829
|
.c2[type='checkbox']:checked {
|
|
327
830
|
background-color: var(--charcoal-brand);
|
|
328
|
-
-webkit-transition: 0.2s background-color;
|
|
329
|
-
transition: 0.2s background-color;
|
|
330
831
|
}
|
|
331
832
|
|
|
332
833
|
.c2[type='checkbox']:checked:hover:not(:disabled):not([aria-disabled]),
|
|
333
|
-
.c2[type='checkbox']:checked:hover[aria-disabled=false] {
|
|
834
|
+
.c2[type='checkbox']:checked:hover[aria-disabled='false'] {
|
|
334
835
|
background-color: var(--charcoal-brand-hover);
|
|
335
836
|
}
|
|
336
837
|
|
|
337
838
|
.c2[type='checkbox']:checked:active:not(:disabled):not([aria-disabled]),
|
|
338
|
-
.c2[type='checkbox']:checked:active[aria-disabled=false] {
|
|
839
|
+
.c2[type='checkbox']:checked:active[aria-disabled='false'] {
|
|
339
840
|
background-color: var(--charcoal-brand-press);
|
|
340
841
|
}
|
|
341
842
|
|
|
342
843
|
.c2[type='checkbox']:hover:not(:disabled):not([aria-disabled]),
|
|
343
|
-
.c2[type='checkbox']:hover[aria-disabled=false] {
|
|
844
|
+
.c2[type='checkbox']:hover[aria-disabled='false'] {
|
|
344
845
|
background-color: var(--charcoal-text3-hover);
|
|
345
846
|
}
|
|
346
847
|
|
|
347
848
|
.c2[type='checkbox']:active:not(:disabled):not([aria-disabled]),
|
|
348
|
-
.c2[type='checkbox']:active[aria-disabled=false] {
|
|
849
|
+
.c2[type='checkbox']:active[aria-disabled='false'] {
|
|
349
850
|
background-color: var(--charcoal-text3-press);
|
|
350
851
|
}
|
|
351
852
|
|
|
@@ -370,6 +871,8 @@ exports[`Storyshots MultiSelect Playground 1`] = `
|
|
|
370
871
|
height: 24px;
|
|
371
872
|
border-radius: 999999px;
|
|
372
873
|
color: var(--charcoal-text5);
|
|
874
|
+
-webkit-transition: 0.2s box-shadow;
|
|
875
|
+
transition: 0.2s box-shadow;
|
|
373
876
|
}
|
|
374
877
|
|
|
375
878
|
.c0 {
|