@helsenorge/designsystem-react 14.10.0 → 14.11.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/lib/BabyMobileMedium.js +1 -1
- package/lib/CHANGELOG.md +10 -0
- package/lib/Checkbox.js +25 -48
- package/lib/Checkbox.js.map +1 -1
- package/lib/CheckboxMarker.js +60 -0
- package/lib/CheckboxMarker.js.map +1 -0
- package/lib/ChildMedium.js +1 -1
- package/lib/EyeContactMedium.js +79 -0
- package/lib/EyeContactMedium.js.map +1 -0
- package/lib/FacialRecognitionFingerprintMedium.js +1 -1
- package/lib/FormGroup.js +5 -5
- package/lib/FormGroup.js.map +1 -1
- package/lib/GiveBabyFoodMedium.js +1 -1
- package/lib/Illustration.js +1 -1
- package/lib/IllustrationNames.js +4 -0
- package/lib/IllustrationNames.js.map +1 -1
- package/lib/LazyIllustration.js +5 -1
- package/lib/LazyIllustration.js.map +1 -1
- package/lib/Radio.js +73 -0
- package/lib/Radio.js.map +1 -0
- package/lib/RadioButton.js +95 -3
- package/lib/RadioButton.js.map +1 -1
- package/lib/RadioButton2.js +3 -73
- package/lib/RadioButton2.js.map +1 -1
- package/lib/RadioMarker.js +37 -0
- package/lib/RadioMarker.js.map +1 -0
- package/lib/ReadLettersMedium.js +1 -1
- package/lib/SkinToSkinMedium.js +106 -0
- package/lib/SkinToSkinMedium.js.map +1 -0
- package/lib/StorkMedium.js +1 -1
- package/lib/StrollerMedium.js +1 -1
- package/lib/Support2Medium.js +1 -1
- package/lib/TableBody.js +1 -1
- package/lib/TableHead.js +1 -1
- package/lib/TableRow.js +1 -1
- package/lib/ThinkingMedium.js +1 -1
- package/lib/VisualCheckbox.js +77 -0
- package/lib/VisualCheckbox.js.map +1 -0
- package/lib/VisualRadio.js +77 -0
- package/lib/VisualRadio.js.map +1 -0
- package/lib/components/Checkbox/CheckboxMarker/CheckboxMarker.d.ts +20 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +309 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss.d.ts +25 -0
- package/lib/components/Checkbox/styles.module.scss +9 -269
- package/lib/components/Checkbox/styles.module.scss.d.ts +1 -17
- package/lib/components/Illustration/index.js +1 -1
- package/lib/components/Illustrations/BabyMobile.js +1 -1
- package/lib/components/Illustrations/Child.js +1 -1
- package/lib/components/Illustrations/Doctor.js +1 -1
- package/lib/components/Illustrations/EyeContact.d.ts +8 -0
- package/lib/components/Illustrations/EyeContact.js +16 -0
- package/lib/components/Illustrations/EyeContact.js.map +1 -0
- package/lib/components/Illustrations/EyeContactMedium.d.ts +3 -0
- package/lib/components/Illustrations/EyeContactMedium.js +2 -0
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +1 -1
- package/lib/components/Illustrations/GiveBabyFood.js +1 -1
- package/lib/components/Illustrations/HealthcarePersonnel.js +1 -1
- package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
- package/lib/components/Illustrations/ReadLetters.js +1 -1
- package/lib/components/Illustrations/SkinToSkin.d.ts +8 -0
- package/lib/components/Illustrations/SkinToSkin.js +16 -0
- package/lib/components/Illustrations/SkinToSkin.js.map +1 -0
- package/lib/components/Illustrations/SkinToSkinMedium.d.ts +3 -0
- package/lib/components/Illustrations/SkinToSkinMedium.js +2 -0
- package/lib/components/Illustrations/Stork.js +1 -1
- package/lib/components/Illustrations/Stroller.js +1 -1
- package/lib/components/Illustrations/Support2.js +1 -1
- package/lib/components/Illustrations/Thinking.js +1 -1
- package/lib/components/Panel/index.js +1 -1
- package/lib/components/PanelList/index.js +1 -1
- package/lib/components/RadioButton/RadioMarker/RadioMarker.d.ts +20 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss +259 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss.d.ts +24 -0
- package/lib/components/RadioButton/index.d.ts +0 -1
- package/lib/components/RadioButton/index.js +3 -3
- package/lib/components/RadioButton/styles.module.scss +11 -273
- package/lib/components/RadioButton/styles.module.scss.d.ts +1 -9
- package/lib/components/Table/index.js +1 -1
- package/lib/components/Validation/index.js +1 -1
- package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +5 -128
- package/lib/components/VisualCheckboxCloud/styles.module.scss +2 -9
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualCheckbox.d.ts +26 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualContent.d.ts +10 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js +5 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +7 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckboxGroup.d.ts +33 -0
- package/lib/components/VisualCheckboxGroup/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/index.js +43 -0
- package/lib/components/VisualCheckboxGroup/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss +6 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss.d.ts +10 -0
- package/lib/components/{VisualRadioButtonCloud/RadioButton/RadioButton.d.ts → VisualRadioCloud/Radio/Radio.d.ts} +3 -3
- package/lib/components/VisualRadioCloud/Radio/index.d.ts +3 -0
- package/lib/components/VisualRadioCloud/Radio/index.js +5 -0
- package/lib/components/VisualRadioCloud/Radio/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss +7 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss.d.ts +15 -0
- package/lib/components/{VisualRadioButtonCloud/VisualRadioButtonCloud.d.ts → VisualRadioCloud/VisualRadioCloud.d.ts} +8 -8
- package/lib/components/VisualRadioCloud/index.d.ts +3 -0
- package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/index.js +7 -7
- package/lib/components/VisualRadioCloud/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/styles.module.scss +6 -0
- package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/styles.module.scss.d.ts +1 -1
- package/lib/components/VisualRadioGroup/VisualRadio/VisualContent.d.ts +10 -0
- package/lib/components/VisualRadioGroup/VisualRadio/VisualRadio.d.ts +26 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js +5 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +7 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualRadioGroup/VisualRadioGroup.d.ts +39 -0
- package/lib/components/VisualRadioGroup/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/index.js +63 -0
- package/lib/components/VisualRadioGroup/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/styles.module.scss +6 -0
- package/lib/components/VisualRadioGroup/styles.module.scss.d.ts +10 -0
- package/lib/scss/_visual-form.scss +345 -0
- package/lib/utils3.js +10 -98
- package/lib/utils3.js.map +1 -1
- package/lib/utils4.js +28 -11
- package/lib/utils4.js.map +1 -1
- package/lib/utils5.js +58 -28
- package/lib/utils5.js.map +1 -1
- package/package.json +115 -1
- package/scss/_visual-form.scss +345 -0
- package/lib/components/RadioButton/utils.d.ts +0 -2
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.d.ts +0 -3
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.js +0 -5
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.js.map +0 -1
- package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss +0 -133
- package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss.d.ts +0 -15
- package/lib/components/VisualRadioButtonCloud/index.d.ts +0 -3
- package/lib/components/VisualRadioButtonCloud/index.js.map +0 -1
- package/lib/components/VisualRadioButtonCloud/styles.module.scss +0 -13
- package/lib/utils6.js +0 -60
- package/lib/utils6.js.map +0 -1
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
@use '../../../scss/spacers' as spacers;
|
|
2
|
+
@use '../../../scss/palette' as palette;
|
|
3
|
+
|
|
4
|
+
@mixin dashed-dotted-border() {
|
|
5
|
+
box-shadow: none;
|
|
6
|
+
|
|
7
|
+
--dot-size: 2px;
|
|
8
|
+
--dash-length: 5px;
|
|
9
|
+
--gap-length: 2px;
|
|
10
|
+
--corner-gap: 2px;
|
|
11
|
+
|
|
12
|
+
background-image:
|
|
13
|
+
// Square dots at corners
|
|
14
|
+
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
15
|
+
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
16
|
+
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
17
|
+
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
18
|
+
// Dashed lines
|
|
19
|
+
repeating-linear-gradient(
|
|
20
|
+
0deg,
|
|
21
|
+
palette.$neutral600,
|
|
22
|
+
palette.$neutral600 var(--dash-length),
|
|
23
|
+
transparent var(--dash-length),
|
|
24
|
+
transparent calc(var(--dash-length) + var(--gap-length))
|
|
25
|
+
),
|
|
26
|
+
repeating-linear-gradient(
|
|
27
|
+
90deg,
|
|
28
|
+
palette.$neutral600,
|
|
29
|
+
palette.$neutral600 var(--dash-length),
|
|
30
|
+
transparent var(--dash-length),
|
|
31
|
+
transparent calc(var(--dash-length) + var(--gap-length))
|
|
32
|
+
),
|
|
33
|
+
repeating-linear-gradient(
|
|
34
|
+
180deg,
|
|
35
|
+
palette.$neutral600,
|
|
36
|
+
palette.$neutral600 var(--dash-length),
|
|
37
|
+
transparent var(--dash-length),
|
|
38
|
+
transparent calc(var(--dash-length) + var(--gap-length))
|
|
39
|
+
),
|
|
40
|
+
repeating-linear-gradient(
|
|
41
|
+
270deg,
|
|
42
|
+
palette.$neutral600,
|
|
43
|
+
palette.$neutral600 var(--dash-length),
|
|
44
|
+
transparent var(--dash-length),
|
|
45
|
+
transparent calc(var(--dash-length) + var(--gap-length))
|
|
46
|
+
);
|
|
47
|
+
background-size:
|
|
48
|
+
// Top-left dot
|
|
49
|
+
var(--dot-size) var(--dot-size),
|
|
50
|
+
// Top-right dot
|
|
51
|
+
var(--dot-size) var(--dot-size),
|
|
52
|
+
// Bottom-right dot
|
|
53
|
+
var(--dot-size) var(--dot-size),
|
|
54
|
+
// Bottom-left dot
|
|
55
|
+
var(--dot-size) var(--dot-size),
|
|
56
|
+
// Left border
|
|
57
|
+
2px calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2),
|
|
58
|
+
// Top border
|
|
59
|
+
calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2) 2px,
|
|
60
|
+
// Right border
|
|
61
|
+
2px calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2),
|
|
62
|
+
// Bottom border
|
|
63
|
+
calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2) 2px;
|
|
64
|
+
background-position:
|
|
65
|
+
// Top-left dot
|
|
66
|
+
0 0,
|
|
67
|
+
// Top-right dot
|
|
68
|
+
100% 0,
|
|
69
|
+
// Bottom-right dot
|
|
70
|
+
100% 100%,
|
|
71
|
+
// Bottom-left dot
|
|
72
|
+
0 100%,
|
|
73
|
+
// Left border
|
|
74
|
+
0 calc(var(--dot-size) + var(--corner-gap)),
|
|
75
|
+
// Top border
|
|
76
|
+
calc(var(--dot-size) + var(--corner-gap)) 0,
|
|
77
|
+
// Right border
|
|
78
|
+
100% calc(var(--dot-size) + var(--corner-gap)),
|
|
79
|
+
// Bottom border
|
|
80
|
+
calc(var(--dot-size) + var(--corner-gap)) 100%;
|
|
81
|
+
background-repeat: no-repeat;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
$checkbox-icon-size: 1.625rem;
|
|
85
|
+
|
|
86
|
+
.checkbox {
|
|
87
|
+
&__marker {
|
|
88
|
+
display: flex;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
align-items: center;
|
|
91
|
+
height: $checkbox-icon-size;
|
|
92
|
+
width: $checkbox-icon-size;
|
|
93
|
+
min-height: $checkbox-icon-size;
|
|
94
|
+
min-width: $checkbox-icon-size;
|
|
95
|
+
box-shadow: inset 0 0 0 spacers.getSpacer(4xs);
|
|
96
|
+
|
|
97
|
+
// Vi overstyrer farger satt ved high-contrast mode i nettleser/os
|
|
98
|
+
@media (forced-colors: active) {
|
|
99
|
+
forced-color-adjust: none;
|
|
100
|
+
background-color: #000 !important;
|
|
101
|
+
color: #fff !important;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&--on-white,
|
|
105
|
+
&--on-grey {
|
|
106
|
+
color: palette.$neutral700;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&--on-blueberry {
|
|
110
|
+
color: palette.$blueberry500;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&--on-invalid {
|
|
114
|
+
color: palette.$cherry500;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&--on-dark {
|
|
118
|
+
color: palette.$neutral200;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&__regular {
|
|
122
|
+
&--checked {
|
|
123
|
+
background-color: palette.$blueberry500;
|
|
124
|
+
color: palette.$blueberry500;
|
|
125
|
+
box-shadow: inset 0 0 0 spacers.getSpacer(4xs);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&--checked#{&}--invalid {
|
|
129
|
+
background-color: palette.$cherry500;
|
|
130
|
+
color: palette.$cherry500;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&--checked#{&}--on-dark {
|
|
134
|
+
background-color: palette.$blueberry50;
|
|
135
|
+
color: palette.$blueberry50;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__large {
|
|
140
|
+
&--checked {
|
|
141
|
+
background-color: palette.$blueberry50;
|
|
142
|
+
box-shadow: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&--checked#{&}--invalid {
|
|
146
|
+
background-color: palette.$cherry500;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&--checked#{&}--disabled {
|
|
150
|
+
color: palette.$neutral600;
|
|
151
|
+
background-color: transparent;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&--disabled,
|
|
156
|
+
&--disabled#{&}--invalid,
|
|
157
|
+
&--disabled#{&}--on-dark {
|
|
158
|
+
@include dashed-dotted-border;
|
|
159
|
+
|
|
160
|
+
background-color: transparent;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// When any focusable element inside the wrapping <label>
|
|
164
|
+
// is focus-visible, style the .checkbox__marker.
|
|
165
|
+
// Specificity is doubled (&#{&}) so focus-visible styles win over the later
|
|
166
|
+
// label:hover rules below, while keeping the source order required by css:S4664.
|
|
167
|
+
label:has(:focus-visible) &#{&} {
|
|
168
|
+
box-shadow: 0 0 0 spacers.getSpacer(3xs) palette.$black;
|
|
169
|
+
color: palette.$black;
|
|
170
|
+
|
|
171
|
+
&__regular--checked {
|
|
172
|
+
border: 1px solid var(--color-action-border-ondark-focus);
|
|
173
|
+
|
|
174
|
+
& + .checkbox__marker__regular--on-dark {
|
|
175
|
+
border: 1px solid var(--color-action-border-onlight-focus);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&--on-dark {
|
|
180
|
+
color: palette.$white;
|
|
181
|
+
border: 1px solid var(--color-action-border-onlight-focus);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&--invalid {
|
|
185
|
+
color: palette.$black;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&__large {
|
|
189
|
+
&--checked {
|
|
190
|
+
background-color: palette.$blueberry200;
|
|
191
|
+
box-shadow: 0 0 0 spacers.getSpacer(3xs);
|
|
192
|
+
color: palette.$white;
|
|
193
|
+
border: 1px solid var(--color-action-border-onlight-focus);
|
|
194
|
+
|
|
195
|
+
// komboklasser fungerer ikke i nested struktur
|
|
196
|
+
&--invalid {
|
|
197
|
+
background-color: palette.$cherry500;
|
|
198
|
+
color: palette.$black;
|
|
199
|
+
border: 1px solid var(--color-action-border-ondark-focus);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&--disabled {
|
|
203
|
+
color: palette.$neutral700;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
label:hover &,
|
|
210
|
+
label:active & {
|
|
211
|
+
box-shadow:
|
|
212
|
+
inset 0 0 0 spacers.getSpacer(4xs),
|
|
213
|
+
0 0 0 spacers.getSpacer(4xs);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
label:hover &--on-white,
|
|
217
|
+
label:hover &--on-grey {
|
|
218
|
+
background-color: var(--color-action-graphics-ondark-hover);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
label:active &--on-white,
|
|
222
|
+
label:active &--on-grey {
|
|
223
|
+
background-color: palette.$blueberry100;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
label:hover &--on-blueberry {
|
|
227
|
+
background-color: palette.$blueberry100;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
label:hover &--on-invalid {
|
|
231
|
+
background-color: palette.$cherry50;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
label:active &--on-invalid {
|
|
235
|
+
background-color: palette.$cherry100;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
label:hover &--on-dark {
|
|
239
|
+
background-color: #ffffff1a;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
label:hover &__regular--checked,
|
|
243
|
+
label:active &__regular--checked {
|
|
244
|
+
box-shadow:
|
|
245
|
+
inset 0 0 0 spacers.getSpacer(4xs),
|
|
246
|
+
0 0 0 spacers.getSpacer(4xs);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
label:hover &__regular--checked {
|
|
250
|
+
background-color: palette.$blueberry600;
|
|
251
|
+
color: palette.$blueberry600;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
label:active &__regular--checked {
|
|
255
|
+
background-color: palette.$blueberry800;
|
|
256
|
+
color: palette.$blueberry800;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
label:hover &__regular--checked#{&}__regular--invalid {
|
|
260
|
+
background-color: palette.$cherry600;
|
|
261
|
+
color: palette.$cherry600;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
label:active &__regular--checked#{&}__regular--invalid {
|
|
265
|
+
background-color: palette.$cherry800;
|
|
266
|
+
color: palette.$cherry800;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
label:hover &__regular--checked#{&}__regular--on-dark {
|
|
270
|
+
background-color: palette.$blueberry100;
|
|
271
|
+
color: palette.$blueberry100;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
label:active &__regular--checked#{&}__regular--on-dark {
|
|
275
|
+
background-color: palette.$blueberry200;
|
|
276
|
+
color: palette.$blueberry200;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
label:hover &__large--checked {
|
|
280
|
+
background-color: palette.$blueberry200;
|
|
281
|
+
box-shadow: none;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
label:hover &__large--checked#{&}__large--invalid {
|
|
285
|
+
background-color: palette.$cherry600;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
label:hover &__large--checked#{&}__large--disabled {
|
|
289
|
+
background-color: transparent;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
label:hover &--disabled,
|
|
293
|
+
label:hover &--disabled#{&}--invalid,
|
|
294
|
+
label:hover &--disabled#{&}--on-dark {
|
|
295
|
+
box-shadow: none;
|
|
296
|
+
background-color: transparent;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&__marker-icon {
|
|
301
|
+
display: flex;
|
|
302
|
+
|
|
303
|
+
// Vi overstyrer farger satt ved high-contrast mode i nettleser/os
|
|
304
|
+
@media (forced-colors: active) {
|
|
305
|
+
forced-color-adjust: none;
|
|
306
|
+
stroke: #fff;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
checkbox__marker: string;
|
|
3
|
+
'checkbox__marker__large--checked': string;
|
|
4
|
+
'checkbox__marker__large--checked--disabled': string;
|
|
5
|
+
'checkbox__marker__large--checked--invalid': string;
|
|
6
|
+
'checkbox__marker__large--disabled': string;
|
|
7
|
+
'checkbox__marker__large--invalid': string;
|
|
8
|
+
'checkbox__marker__regular--checked': string;
|
|
9
|
+
'checkbox__marker__regular--invalid': string;
|
|
10
|
+
'checkbox__marker__regular--on-dark': string;
|
|
11
|
+
'checkbox__marker--disabled': string;
|
|
12
|
+
'checkbox__marker--invalid': string;
|
|
13
|
+
'checkbox__marker--on-blueberry': string;
|
|
14
|
+
'checkbox__marker--on-dark': string;
|
|
15
|
+
'checkbox__marker--on-grey': string;
|
|
16
|
+
'checkbox__marker--on-invalid': string;
|
|
17
|
+
'checkbox__marker--on-white': string;
|
|
18
|
+
'checkbox__marker-icon': string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type ClassNames = keyof Styles;
|
|
22
|
+
|
|
23
|
+
declare const styles: Styles;
|
|
24
|
+
|
|
25
|
+
export default styles;
|
|
@@ -5,87 +5,6 @@
|
|
|
5
5
|
@use '../../scss/screen-reader' as *;
|
|
6
6
|
@use '../../scss/breakpoints' as breakpoints;
|
|
7
7
|
|
|
8
|
-
@mixin dashed-dotted-border() {
|
|
9
|
-
box-shadow: none;
|
|
10
|
-
|
|
11
|
-
--dot-size: 2px;
|
|
12
|
-
--dash-length: 5px;
|
|
13
|
-
--gap-length: 2px;
|
|
14
|
-
--corner-gap: 2px;
|
|
15
|
-
|
|
16
|
-
background-image:
|
|
17
|
-
// Square dots at corners
|
|
18
|
-
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
19
|
-
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
20
|
-
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
21
|
-
linear-gradient(palette.$neutral600, palette.$neutral600),
|
|
22
|
-
// Dashed lines
|
|
23
|
-
repeating-linear-gradient(
|
|
24
|
-
0deg,
|
|
25
|
-
palette.$neutral600,
|
|
26
|
-
palette.$neutral600 var(--dash-length),
|
|
27
|
-
transparent var(--dash-length),
|
|
28
|
-
transparent calc(var(--dash-length) + var(--gap-length))
|
|
29
|
-
),
|
|
30
|
-
repeating-linear-gradient(
|
|
31
|
-
90deg,
|
|
32
|
-
palette.$neutral600,
|
|
33
|
-
palette.$neutral600 var(--dash-length),
|
|
34
|
-
transparent var(--dash-length),
|
|
35
|
-
transparent calc(var(--dash-length) + var(--gap-length))
|
|
36
|
-
),
|
|
37
|
-
repeating-linear-gradient(
|
|
38
|
-
180deg,
|
|
39
|
-
palette.$neutral600,
|
|
40
|
-
palette.$neutral600 var(--dash-length),
|
|
41
|
-
transparent var(--dash-length),
|
|
42
|
-
transparent calc(var(--dash-length) + var(--gap-length))
|
|
43
|
-
),
|
|
44
|
-
repeating-linear-gradient(
|
|
45
|
-
270deg,
|
|
46
|
-
palette.$neutral600,
|
|
47
|
-
palette.$neutral600 var(--dash-length),
|
|
48
|
-
transparent var(--dash-length),
|
|
49
|
-
transparent calc(var(--dash-length) + var(--gap-length))
|
|
50
|
-
);
|
|
51
|
-
background-size:
|
|
52
|
-
// Top-left dot
|
|
53
|
-
var(--dot-size) var(--dot-size),
|
|
54
|
-
// Top-right dot
|
|
55
|
-
var(--dot-size) var(--dot-size),
|
|
56
|
-
// Bottom-right dot
|
|
57
|
-
var(--dot-size) var(--dot-size),
|
|
58
|
-
// Bottom-left dot
|
|
59
|
-
var(--dot-size) var(--dot-size),
|
|
60
|
-
// Left border
|
|
61
|
-
2px calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2),
|
|
62
|
-
// Top border
|
|
63
|
-
calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2) 2px,
|
|
64
|
-
// Right border
|
|
65
|
-
2px calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2),
|
|
66
|
-
// Bottom border
|
|
67
|
-
calc(100% - var(--dot-size) * 2 - var(--corner-gap) * 2) 2px;
|
|
68
|
-
background-position:
|
|
69
|
-
// Top-left dot
|
|
70
|
-
0 0,
|
|
71
|
-
// Top-right dot
|
|
72
|
-
100% 0,
|
|
73
|
-
// Bottom-right dot
|
|
74
|
-
100% 100%,
|
|
75
|
-
// Bottom-left dot
|
|
76
|
-
0 100%,
|
|
77
|
-
// Left border
|
|
78
|
-
0 calc(var(--dot-size) + var(--corner-gap)),
|
|
79
|
-
// Top border
|
|
80
|
-
calc(var(--dot-size) + var(--corner-gap)) 0,
|
|
81
|
-
// Right border
|
|
82
|
-
100% calc(var(--dot-size) + var(--corner-gap)),
|
|
83
|
-
// Bottom border
|
|
84
|
-
calc(var(--dot-size) + var(--corner-gap)) 100%;
|
|
85
|
-
background-repeat: no-repeat;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
$checkbox-icon-size: 1.625rem;
|
|
89
8
|
$padding-clickable-area-top-bottom: 7px;
|
|
90
9
|
$padding-clickable-area-left: 8px;
|
|
91
10
|
|
|
@@ -117,9 +36,11 @@ $padding-clickable-area-left: 8px;
|
|
|
117
36
|
&--checked {
|
|
118
37
|
color: palette.$white;
|
|
119
38
|
}
|
|
39
|
+
|
|
120
40
|
&--checked#{&}--invalid {
|
|
121
41
|
color: palette.$black;
|
|
122
42
|
}
|
|
43
|
+
|
|
123
44
|
&--checked#{&}--disabled {
|
|
124
45
|
color: palette.$neutral700;
|
|
125
46
|
}
|
|
@@ -135,7 +56,7 @@ $padding-clickable-area-left: 8px;
|
|
|
135
56
|
}
|
|
136
57
|
|
|
137
58
|
&--disabled {
|
|
138
|
-
cursor:
|
|
59
|
+
cursor: not-allowed;
|
|
139
60
|
}
|
|
140
61
|
|
|
141
62
|
&__large {
|
|
@@ -150,6 +71,7 @@ $padding-clickable-area-left: 8px;
|
|
|
150
71
|
background-color: palette.$neutral100;
|
|
151
72
|
}
|
|
152
73
|
}
|
|
74
|
+
|
|
153
75
|
&--on-white#{&}--focus {
|
|
154
76
|
color: palette.$neutral500;
|
|
155
77
|
}
|
|
@@ -174,6 +96,7 @@ $padding-clickable-area-left: 8px;
|
|
|
174
96
|
background-color: palette.$blueberry100;
|
|
175
97
|
}
|
|
176
98
|
}
|
|
99
|
+
|
|
177
100
|
&--on-blueberry#{&}--focus {
|
|
178
101
|
color: palette.$blueberry500;
|
|
179
102
|
background-color: palette.$white;
|
|
@@ -186,6 +109,7 @@ $padding-clickable-area-left: 8px;
|
|
|
186
109
|
background-color: palette.$cherry100;
|
|
187
110
|
}
|
|
188
111
|
}
|
|
112
|
+
|
|
189
113
|
&--on-invalid#{&}--focus {
|
|
190
114
|
color: palette.$cherry400;
|
|
191
115
|
background-color: palette.$white;
|
|
@@ -206,6 +130,7 @@ $padding-clickable-area-left: 8px;
|
|
|
206
130
|
background-color: palette.$blueberry600;
|
|
207
131
|
}
|
|
208
132
|
}
|
|
133
|
+
|
|
209
134
|
&--checked#{&}--focus {
|
|
210
135
|
color: palette.$blueberry900;
|
|
211
136
|
background-color: palette.$blueberry500;
|
|
@@ -260,193 +185,8 @@ $padding-clickable-area-left: 8px;
|
|
|
260
185
|
.checkbox {
|
|
261
186
|
@include sr-only;
|
|
262
187
|
|
|
263
|
-
&
|
|
264
|
-
|
|
265
|
-
justify-content: center;
|
|
266
|
-
align-items: center;
|
|
267
|
-
margin: spacers.getSpacer(4xs) spacers.getSpacer(s) spacers.getSpacer(4xs) spacers.getSpacer(4xs);
|
|
268
|
-
height: $checkbox-icon-size;
|
|
269
|
-
width: $checkbox-icon-size;
|
|
270
|
-
min-height: $checkbox-icon-size;
|
|
271
|
-
min-width: $checkbox-icon-size;
|
|
272
|
-
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
273
|
-
|
|
274
|
-
// Vi overstyrer farger satt ved high-contrast mode i nettleser/os
|
|
275
|
-
@media (forced-colors: active) {
|
|
276
|
-
forced-color-adjust: none;
|
|
277
|
-
background-color: #000 !important;
|
|
278
|
-
color: #fff !important;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
:hover > & {
|
|
282
|
-
box-shadow: 0 0 0 spacers.getSpacer(3xs);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
&--on-white,
|
|
286
|
-
&--on-grey {
|
|
287
|
-
color: palette.$neutral700;
|
|
288
|
-
|
|
289
|
-
:hover > & {
|
|
290
|
-
background-color: palette.$neutral100;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
&--on-blueberry {
|
|
295
|
-
color: palette.$blueberry500;
|
|
296
|
-
|
|
297
|
-
:hover > & {
|
|
298
|
-
background-color: palette.$blueberry100;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
&--on-invalid {
|
|
303
|
-
color: palette.$cherry500;
|
|
304
|
-
|
|
305
|
-
:hover > & {
|
|
306
|
-
background-color: palette.$cherry100;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
&--on-dark {
|
|
311
|
-
color: palette.$neutral200;
|
|
312
|
-
|
|
313
|
-
:hover > & {
|
|
314
|
-
background-color: #ffffff1a;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
&__regular {
|
|
319
|
-
&--checked {
|
|
320
|
-
background-color: palette.$blueberry500;
|
|
321
|
-
color: palette.$blueberry500;
|
|
322
|
-
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
323
|
-
|
|
324
|
-
:hover > & {
|
|
325
|
-
background-color: palette.$blueberry600;
|
|
326
|
-
color: palette.$blueberry600;
|
|
327
|
-
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
&--checked#{&}--invalid {
|
|
331
|
-
background-color: palette.$cherry500;
|
|
332
|
-
color: palette.$cherry500;
|
|
333
|
-
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
334
|
-
|
|
335
|
-
:hover > & {
|
|
336
|
-
background-color: palette.$cherry600;
|
|
337
|
-
color: palette.$cherry600;
|
|
338
|
-
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
&--checked#{&}--on-dark {
|
|
342
|
-
background-color: palette.$blueberry50;
|
|
343
|
-
color: palette.$blueberry50;
|
|
344
|
-
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
345
|
-
|
|
346
|
-
:hover > & {
|
|
347
|
-
background-color: palette.$blueberry200;
|
|
348
|
-
color: palette.$blueberry200;
|
|
349
|
-
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
&__large {
|
|
355
|
-
&--checked {
|
|
356
|
-
background-color: palette.$blueberry50;
|
|
357
|
-
box-shadow: none;
|
|
358
|
-
|
|
359
|
-
:hover > & {
|
|
360
|
-
background-color: palette.$blueberry200;
|
|
361
|
-
box-shadow: none;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
&--checked#{&}--invalid {
|
|
365
|
-
background-color: palette.$cherry500;
|
|
366
|
-
|
|
367
|
-
:hover > & {
|
|
368
|
-
background-color: palette.$cherry600;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
&--checked#{&}--disabled {
|
|
372
|
-
color: palette.$neutral600;
|
|
373
|
-
background-color: transparent;
|
|
374
|
-
|
|
375
|
-
:hover > & {
|
|
376
|
-
background-color: transparent;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
&--disabled,
|
|
382
|
-
&--disabled#{&}--invalid,
|
|
383
|
-
&--disabled#{&}--on-dark {
|
|
384
|
-
@include dashed-dotted-border;
|
|
385
|
-
|
|
386
|
-
background-color: transparent;
|
|
387
|
-
|
|
388
|
-
:hover > & {
|
|
389
|
-
box-shadow: none;
|
|
390
|
-
background-color: transparent;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
&__icon {
|
|
396
|
-
position: relative;
|
|
397
|
-
top: 0.1rem;
|
|
398
|
-
right: 0.05rem;
|
|
399
|
-
|
|
400
|
-
// Vi overstyrer farger satt ved high-contrast mode i nettleser/os
|
|
401
|
-
@media (forced-colors: active) {
|
|
402
|
-
forced-color-adjust: none;
|
|
403
|
-
fill: #fff;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
&:focus {
|
|
408
|
-
/* stylelint-disable-next-line */
|
|
409
|
-
& + .checkbox__icon-wrapper {
|
|
410
|
-
box-shadow: 0 0 0 spacers.getSpacer(3xs);
|
|
411
|
-
color: palette.$black;
|
|
412
|
-
|
|
413
|
-
&__regular--checked {
|
|
414
|
-
border: 1px solid var(--color-action-border-ondark-focus);
|
|
415
|
-
|
|
416
|
-
& + .checkbox__icon-wrapper__regular--on-dark {
|
|
417
|
-
border: 1px solid var(--color-action-border-onlight-focus);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
&--on-dark {
|
|
422
|
-
color: palette.$white;
|
|
423
|
-
border: 1px solid var(--color-action-border-onlight-focus);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
&--invalid {
|
|
427
|
-
color: palette.$black;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
&__large {
|
|
431
|
-
&--checked {
|
|
432
|
-
background-color: palette.$blueberry200;
|
|
433
|
-
box-shadow: 0 0 0 spacers.getSpacer(3xs);
|
|
434
|
-
color: palette.$white;
|
|
435
|
-
border: 1px solid var(--color-action-border-onlight-focus);
|
|
436
|
-
|
|
437
|
-
// komboklasser fungerer ikke i nested struktur
|
|
438
|
-
&--invalid {
|
|
439
|
-
background-color: palette.$cherry500;
|
|
440
|
-
color: palette.$black;
|
|
441
|
-
border: 1px solid var(--color-action-border-ondark-focus);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
&--disabled {
|
|
445
|
-
color: palette.$neutral700;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
188
|
+
&__marker-wrapper {
|
|
189
|
+
margin-right: spacers.getSpacer(s);
|
|
450
190
|
}
|
|
451
191
|
|
|
452
192
|
&:focus-visible {
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
checkbox: string;
|
|
3
|
-
|
|
4
|
-
'checkbox__icon-wrapper': string;
|
|
5
|
-
'checkbox__icon-wrapper__large--checked': string;
|
|
6
|
-
'checkbox__icon-wrapper__large--checked--disabled': string;
|
|
7
|
-
'checkbox__icon-wrapper__large--checked--invalid': string;
|
|
8
|
-
'checkbox__icon-wrapper__large--disabled': string;
|
|
9
|
-
'checkbox__icon-wrapper__large--invalid': string;
|
|
10
|
-
'checkbox__icon-wrapper__regular--checked': string;
|
|
11
|
-
'checkbox__icon-wrapper__regular--invalid': string;
|
|
12
|
-
'checkbox__icon-wrapper__regular--on-dark': string;
|
|
13
|
-
'checkbox__icon-wrapper--disabled': string;
|
|
14
|
-
'checkbox__icon-wrapper--invalid': string;
|
|
15
|
-
'checkbox__icon-wrapper--on-blueberry': string;
|
|
16
|
-
'checkbox__icon-wrapper--on-dark': string;
|
|
17
|
-
'checkbox__icon-wrapper--on-grey': string;
|
|
18
|
-
'checkbox__icon-wrapper--on-invalid': string;
|
|
19
|
-
'checkbox__icon-wrapper--on-white': string;
|
|
3
|
+
'checkbox__marker-wrapper': string;
|
|
20
4
|
'checkbox-afterlabelchildren-wrapper': string;
|
|
21
5
|
'checkbox-errors': string;
|
|
22
6
|
'checkbox-label': string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as getIllustration, t as ViewBoxSize } from "../../
|
|
1
|
+
import { n as getIllustration, t as ViewBoxSize } from "../../utils3.js";
|
|
2
2
|
import { n as Illustration, t as Illustration_default } from "../../Illustration.js";
|
|
3
3
|
export { Illustration, ViewBoxSize, Illustration_default as default, getIllustration };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as BabyMobileMedium_default } from "../../BabyMobileMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var BabyMobile = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as ChildMedium_default } from "../../ChildMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Child = ({ size = 512, color, ...rest }) => {
|