@charcoal-ui/react 3.4.0 → 3.6.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/Button/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.story.d.ts +1 -0
- package/dist/components/Checkbox/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/FieldLabel/index.d.ts.map +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/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/TextArea/index.d.ts.map +1 -1
- package/dist/components/TextField/TextField.story.d.ts.map +1 -1
- package/dist/components/TextField/index.d.ts +4 -0
- package/dist/components/TextField/index.d.ts.map +1 -1
- package/dist/components/TextField/useFocusWithClick.d.ts +3 -0
- package/dist/components/TextField/useFocusWithClick.d.ts.map +1 -0
- package/dist/index.cjs.js +935 -494
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +863 -422
- package/dist/index.esm.js.map +1 -1
- package/dist/styled.d.ts +4 -4
- package/package.json +9 -9
- package/src/components/Button/__snapshots__/index.story.storyshot +312 -592
- package/src/components/Button/index.tsx +50 -14
- package/src/components/Checkbox/__snapshots__/index.story.storyshot +209 -40
- package/src/components/Checkbox/__snapshots__/snapshot.test.tsx.snap +410 -80
- package/src/components/Checkbox/index.story.tsx +24 -0
- package/src/components/Checkbox/index.tsx +47 -17
- package/src/components/Clickable/__snapshots__/index.story.storyshot +4 -0
- package/src/components/Clickable/index.tsx +1 -0
- package/src/components/DropdownSelector/DropdownMenuItem.tsx +19 -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 +60 -191
- package/src/components/DropdownSelector/index.tsx +70 -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 +2454 -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/__snapshots__/index.story.storyshot +18 -19
- package/src/components/SegmentedControl/index.tsx +35 -15
- 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 +126 -321
- package/src/components/TextArea/index.tsx +38 -43
- package/src/components/TextField/TextField.story.tsx +35 -19
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +309 -563
- package/src/components/TextField/index.tsx +85 -84
- package/src/components/TextField/useFocusWithClick.tsx +22 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react'
|
|
2
|
-
import styled from 'styled-components'
|
|
2
|
+
import styled, { css } from 'styled-components'
|
|
3
3
|
import { unreachable } from '../../_lib'
|
|
4
|
-
import { theme } from '../../styled'
|
|
5
4
|
import Clickable, { ClickableElement, ClickableProps } from '../Clickable'
|
|
6
5
|
|
|
7
6
|
type Variant = 'Primary' | 'Default' | 'Overlay' | 'Danger' | 'Navigation'
|
|
@@ -35,7 +34,8 @@ const Button = forwardRef<ClickableElement, ButtonProps>(function Button(
|
|
|
35
34
|
<StyledButton
|
|
36
35
|
{...rest}
|
|
37
36
|
disabled={disabled}
|
|
38
|
-
$
|
|
37
|
+
$background={variantToBackground(variant)}
|
|
38
|
+
$color={variantToFont(variant)}
|
|
39
39
|
$size={size}
|
|
40
40
|
$fullWidth={fixed}
|
|
41
41
|
ref={ref}
|
|
@@ -46,7 +46,20 @@ const Button = forwardRef<ClickableElement, ButtonProps>(function Button(
|
|
|
46
46
|
})
|
|
47
47
|
export default Button
|
|
48
48
|
|
|
49
|
-
const
|
|
49
|
+
const horizontalPaddingSmall = css`
|
|
50
|
+
padding-right: 16px;
|
|
51
|
+
padding-left: 16px;
|
|
52
|
+
`
|
|
53
|
+
const horizontalPaddingMedium = css`
|
|
54
|
+
padding-right: 24px;
|
|
55
|
+
padding-left: 24px;
|
|
56
|
+
`
|
|
57
|
+
|
|
58
|
+
type StyledButtonProps = Omit<StyledProps, '$variant'> & {
|
|
59
|
+
$background: ReturnType<typeof variantToBackground>
|
|
60
|
+
$color: ReturnType<typeof variantToFont>
|
|
61
|
+
}
|
|
62
|
+
const StyledButton = styled(Clickable)<StyledButtonProps>`
|
|
50
63
|
width: ${(p) => (p.$fullWidth ? 'stretch' : 'min-content')};
|
|
51
64
|
display: inline-grid;
|
|
52
65
|
align-items: center;
|
|
@@ -54,17 +67,40 @@ const StyledButton = styled(Clickable)<StyledProps>`
|
|
|
54
67
|
cursor: pointer;
|
|
55
68
|
user-select: none;
|
|
56
69
|
white-space: nowrap;
|
|
70
|
+
border-radius: 999999px;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
line-height: 22px;
|
|
73
|
+
font-weight: bold;
|
|
74
|
+
|
|
75
|
+
${(p) => (p.$size === 'M' ? horizontalPaddingMedium : horizontalPaddingSmall)}
|
|
57
76
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
color: var(--charcoal-${(p) => p.$color});
|
|
78
|
+
background-color: var(--charcoal-${(p) => p.$background});
|
|
79
|
+
transition: 0.2s color, 0.2s background-color, 0.2s box-shadow;
|
|
80
|
+
|
|
81
|
+
&:not(:disabled):not([aria-disabled]),
|
|
82
|
+
&[aria-disabled='false'] {
|
|
83
|
+
&:active,
|
|
84
|
+
&:focus,
|
|
85
|
+
&:focus-visible {
|
|
86
|
+
outline: none;
|
|
87
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:hover {
|
|
91
|
+
color: var(--charcoal-${(p) => p.$color}-hover);
|
|
92
|
+
background-color: var(--charcoal-${(p) => p.$background}-hover);
|
|
93
|
+
}
|
|
94
|
+
&:active {
|
|
95
|
+
color: var(--charcoal-${(p) => p.$color}-press);
|
|
96
|
+
background-color: var(--charcoal-${(p) => p.$background}-press);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:disabled,
|
|
101
|
+
&[aria-disabled]:not([aria-disabled='false']) {
|
|
102
|
+
opacity: 0.32;
|
|
103
|
+
}
|
|
68
104
|
|
|
69
105
|
/* よく考えたらheight=32って定義が存在しないな... */
|
|
70
106
|
height: ${(p) => (p.$size === 'M' ? 40 : 32)}px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storyshots Checkbox
|
|
3
|
+
exports[`Storyshots Checkbox Invalid 1`] = `
|
|
4
4
|
.c0 {
|
|
5
5
|
position: relative;
|
|
6
6
|
display: -webkit-box;
|
|
@@ -17,7 +17,7 @@ exports[`Storyshots Checkbox Labelled 1`] = `
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.c0:disabled,
|
|
20
|
-
.c0[aria-disabled]:not([aria-disabled=false]) {
|
|
20
|
+
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
21
21
|
opacity: 0.32;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -35,55 +35,223 @@ exports[`Storyshots Checkbox Labelled 1`] = `
|
|
|
35
35
|
width: 20px;
|
|
36
36
|
height: 20px;
|
|
37
37
|
border-radius: 4px;
|
|
38
|
-
-webkit-transition: 0.2s box-shadow;
|
|
39
|
-
transition: 0.2s box-shadow;
|
|
40
|
-
-webkit-transition: all 0.2s !important;
|
|
41
|
-
transition: all 0.2s !important;
|
|
38
|
+
-webkit-transition: 0.2s box-shadow,0.2s background-color;
|
|
39
|
+
transition: 0.2s box-shadow,0.2s background-color;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
.c2[type='checkbox']:checked {
|
|
45
43
|
background-color: var(--charcoal-brand);
|
|
46
|
-
-webkit-transition: 0.2s background-color;
|
|
47
|
-
transition: 0.2s background-color;
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
.c2[type='checkbox']:checked:
|
|
51
|
-
.c2[type='checkbox']:checked
|
|
46
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):hover,
|
|
47
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:hover {
|
|
52
48
|
background-color: var(--charcoal-brand-hover);
|
|
53
49
|
}
|
|
54
50
|
|
|
55
|
-
.c2[type='checkbox']:checked:
|
|
56
|
-
.c2[type='checkbox']:checked
|
|
51
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):active,
|
|
52
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:active {
|
|
57
53
|
background-color: var(--charcoal-brand-press);
|
|
58
54
|
}
|
|
59
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
|
+
|
|
60
82
|
.c2[type='checkbox']:not(:checked) {
|
|
61
83
|
border-width: 2px;
|
|
62
84
|
border-style: solid;
|
|
63
|
-
border-color:
|
|
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
|
+
<div
|
|
118
|
+
data-dark={false}
|
|
119
|
+
>
|
|
120
|
+
<label
|
|
121
|
+
aria-disabled={false}
|
|
122
|
+
className="c0"
|
|
123
|
+
>
|
|
124
|
+
<div
|
|
125
|
+
className="c1"
|
|
126
|
+
>
|
|
127
|
+
<input
|
|
128
|
+
aria-invalid={true}
|
|
129
|
+
checked={false}
|
|
130
|
+
className="c2"
|
|
131
|
+
disabled={false}
|
|
132
|
+
name="labelled"
|
|
133
|
+
onBlur={[Function]}
|
|
134
|
+
onChange={[Function]}
|
|
135
|
+
onClick={[Function]}
|
|
136
|
+
onDragStart={[Function]}
|
|
137
|
+
onFocus={[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={false}
|
|
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
|
+
同意する
|
|
165
|
+
</div>
|
|
166
|
+
</label>
|
|
167
|
+
</div>
|
|
168
|
+
`;
|
|
169
|
+
|
|
170
|
+
exports[`Storyshots Checkbox Labelled 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:disabled,
|
|
182
|
+
.c0[aria-disabled]:not([aria-disabled=false]) {
|
|
183
|
+
cursor: default;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.c0:disabled,
|
|
187
|
+
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
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']:checked {
|
|
210
|
+
background-color: var(--charcoal-brand);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):hover,
|
|
214
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:hover {
|
|
215
|
+
background-color: var(--charcoal-brand-hover);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):active,
|
|
219
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:active {
|
|
220
|
+
background-color: var(--charcoal-brand-press);
|
|
64
221
|
}
|
|
65
222
|
|
|
66
223
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
|
|
67
|
-
.c2[type='checkbox'][aria-disabled=false]:focus,
|
|
224
|
+
.c2[type='checkbox'][aria-disabled='false']:focus,
|
|
68
225
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):active,
|
|
69
|
-
.c2[type='checkbox'][aria-disabled=false]:active {
|
|
226
|
+
.c2[type='checkbox'][aria-disabled='false']:active {
|
|
70
227
|
outline: none;
|
|
71
228
|
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
72
229
|
}
|
|
73
230
|
|
|
74
231
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
|
|
75
|
-
.c2[type='checkbox'][aria-disabled=false]:focus:not(:focus-visible),
|
|
232
|
+
.c2[type='checkbox'][aria-disabled='false']:focus:not(:focus-visible),
|
|
76
233
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
|
|
77
|
-
.c2[type='checkbox'][aria-disabled=false]:active:not(:focus-visible) {
|
|
234
|
+
.c2[type='checkbox'][aria-disabled='false']:active:not(:focus-visible) {
|
|
78
235
|
outline: none;
|
|
79
236
|
}
|
|
80
237
|
|
|
81
238
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
|
|
82
|
-
.c2[type='checkbox'][aria-disabled=false]:focus-visible {
|
|
239
|
+
.c2[type='checkbox'][aria-disabled='false']:focus-visible {
|
|
83
240
|
outline: none;
|
|
84
241
|
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
85
242
|
}
|
|
86
243
|
|
|
244
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled])[aria-invalid='true'],
|
|
245
|
+
.c2[type='checkbox'][aria-disabled='false'][aria-invalid='true'] {
|
|
246
|
+
box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.c2[type='checkbox']:not(:checked) {
|
|
250
|
+
border-width: 2px;
|
|
251
|
+
border-style: solid;
|
|
252
|
+
border-color: var(--charcoal-text4);
|
|
253
|
+
}
|
|
254
|
+
|
|
87
255
|
.c3 {
|
|
88
256
|
position: absolute;
|
|
89
257
|
top: -2px;
|
|
@@ -249,7 +417,7 @@ exports[`Storyshots Checkbox Unlabelled 1`] = `
|
|
|
249
417
|
}
|
|
250
418
|
|
|
251
419
|
.c0:disabled,
|
|
252
|
-
.c0[aria-disabled]:not([aria-disabled=false]) {
|
|
420
|
+
.c0[aria-disabled]:not([aria-disabled='false']) {
|
|
253
421
|
opacity: 0.32;
|
|
254
422
|
}
|
|
255
423
|
|
|
@@ -267,55 +435,56 @@ exports[`Storyshots Checkbox Unlabelled 1`] = `
|
|
|
267
435
|
width: 20px;
|
|
268
436
|
height: 20px;
|
|
269
437
|
border-radius: 4px;
|
|
270
|
-
-webkit-transition: 0.2s box-shadow;
|
|
271
|
-
transition: 0.2s box-shadow;
|
|
272
|
-
-webkit-transition: all 0.2s !important;
|
|
273
|
-
transition: all 0.2s !important;
|
|
438
|
+
-webkit-transition: 0.2s box-shadow,0.2s background-color;
|
|
439
|
+
transition: 0.2s box-shadow,0.2s background-color;
|
|
274
440
|
}
|
|
275
441
|
|
|
276
442
|
.c2[type='checkbox']:checked {
|
|
277
443
|
background-color: var(--charcoal-brand);
|
|
278
|
-
-webkit-transition: 0.2s background-color;
|
|
279
|
-
transition: 0.2s background-color;
|
|
280
444
|
}
|
|
281
445
|
|
|
282
|
-
.c2[type='checkbox']:checked:
|
|
283
|
-
.c2[type='checkbox']:checked
|
|
446
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):hover,
|
|
447
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:hover {
|
|
284
448
|
background-color: var(--charcoal-brand-hover);
|
|
285
449
|
}
|
|
286
450
|
|
|
287
|
-
.c2[type='checkbox']:checked:
|
|
288
|
-
.c2[type='checkbox']:checked
|
|
451
|
+
.c2[type='checkbox']:checked:not(:disabled):not([aria-disabled]):active,
|
|
452
|
+
.c2[type='checkbox']:checked[aria-disabled='false']:active {
|
|
289
453
|
background-color: var(--charcoal-brand-press);
|
|
290
454
|
}
|
|
291
455
|
|
|
292
|
-
.c2[type='checkbox']:not(:checked) {
|
|
293
|
-
border-width: 2px;
|
|
294
|
-
border-style: solid;
|
|
295
|
-
border-color: #adadad;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
456
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
|
|
299
|
-
.c2[type='checkbox'][aria-disabled=false]:focus,
|
|
457
|
+
.c2[type='checkbox'][aria-disabled='false']:focus,
|
|
300
458
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):active,
|
|
301
|
-
.c2[type='checkbox'][aria-disabled=false]:active {
|
|
459
|
+
.c2[type='checkbox'][aria-disabled='false']:active {
|
|
302
460
|
outline: none;
|
|
303
461
|
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
304
462
|
}
|
|
305
463
|
|
|
306
464
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
|
|
307
|
-
.c2[type='checkbox'][aria-disabled=false]:focus:not(:focus-visible),
|
|
465
|
+
.c2[type='checkbox'][aria-disabled='false']:focus:not(:focus-visible),
|
|
308
466
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):active:not(:focus-visible),
|
|
309
|
-
.c2[type='checkbox'][aria-disabled=false]:active:not(:focus-visible) {
|
|
467
|
+
.c2[type='checkbox'][aria-disabled='false']:active:not(:focus-visible) {
|
|
310
468
|
outline: none;
|
|
311
469
|
}
|
|
312
470
|
|
|
313
471
|
.c2[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
|
|
314
|
-
.c2[type='checkbox'][aria-disabled=false]:focus-visible {
|
|
472
|
+
.c2[type='checkbox'][aria-disabled='false']:focus-visible {
|
|
315
473
|
outline: none;
|
|
316
474
|
box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
|
|
317
475
|
}
|
|
318
476
|
|
|
477
|
+
.c2[type='checkbox']:not(:disabled):not([aria-disabled])[aria-invalid='true'],
|
|
478
|
+
.c2[type='checkbox'][aria-disabled='false'][aria-invalid='true'] {
|
|
479
|
+
box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.c2[type='checkbox']:not(:checked) {
|
|
483
|
+
border-width: 2px;
|
|
484
|
+
border-style: solid;
|
|
485
|
+
border-color: var(--charcoal-text4);
|
|
486
|
+
}
|
|
487
|
+
|
|
319
488
|
.c3 {
|
|
320
489
|
position: absolute;
|
|
321
490
|
top: -2px;
|