@helsenorge/designsystem-react 1.0.0-beta76 → 1.0.0-beta80
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/Button-7200b617.js +2 -0
- package/Button-7200b617.js.map +1 -0
- package/Check-6291ad09.js +2 -0
- package/Check-6291ad09.js.map +1 -0
- package/Checkbox-ffdd3cb7.js +2 -0
- package/Checkbox-ffdd3cb7.js.map +1 -0
- package/FormGroup-17d2a3d3.js +2 -0
- package/FormGroup-17d2a3d3.js.map +1 -0
- package/Loader-9e099b42.js +2 -0
- package/Loader-9e099b42.js.map +1 -0
- package/Modal-5c2defa7.js +2 -0
- package/Modal-5c2defa7.js.map +1 -0
- package/Validation-e113da7e.js +2 -0
- package/Validation-e113da7e.js.map +1 -0
- package/components/Avatar/index.js +1 -1
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/index.js +1 -1
- package/components/Button/styles.module.scss +49 -35
- package/components/Button/styles.module.scss.d.ts +12 -25
- package/components/ButtonWithModal/ButtonWithModal.d.ts +1 -1
- package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
- package/components/ButtonWithModal/componentdata.json +3 -0
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/Checkbox.d.ts +31 -0
- package/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/components/Checkbox/componentdata.json +259 -0
- package/components/Checkbox/index.d.ts +3 -0
- package/components/Checkbox/index.d.ts.map +1 -0
- package/components/Checkbox/index.js +2 -0
- package/components/Checkbox/index.js.map +1 -0
- package/components/Checkbox/styles.module.scss +191 -0
- package/components/Checkbox/styles.module.scss.d.ts +25 -0
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/ExpanderList/styles.module.scss +14 -10
- package/components/ExpanderList/styles.module.scss.d.ts +2 -2
- package/components/FormExample/FormExample.d.ts +13 -0
- package/components/FormExample/FormExample.d.ts.map +1 -0
- package/components/FormExample/componentdata.json +63 -0
- package/components/FormExample/index.d.ts +3 -0
- package/components/FormExample/index.d.ts.map +1 -0
- package/components/FormExample/index.js +2 -0
- package/components/FormExample/index.js.map +1 -0
- package/components/FormGroup/FormGroup.d.ts +26 -0
- package/components/FormGroup/FormGroup.d.ts.map +1 -0
- package/components/FormGroup/componentdata.json +183 -0
- package/components/FormGroup/index.d.ts +3 -0
- package/components/FormGroup/index.d.ts.map +1 -0
- package/components/FormGroup/index.js +2 -0
- package/components/FormGroup/index.js.map +1 -0
- package/components/FormGroup/styles.module.scss +79 -0
- package/components/FormGroup/styles.module.scss.d.ts +22 -0
- package/components/LinkList/LinkList.d.ts.map +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/LinkList/styles.module.scss +13 -10
- package/components/LinkList/styles.module.scss.d.ts +1 -1
- package/components/Loader/Loader.d.ts +8 -0
- package/components/Loader/Loader.d.ts.map +1 -1
- package/components/Loader/componentdata.json +76 -0
- package/components/Loader/index.js +1 -1
- package/components/Loader/styles.module.scss +24 -0
- package/components/Loader/styles.module.scss.d.ts +3 -0
- package/components/Modal/Modal.d.ts +2 -1
- package/components/Modal/Modal.d.ts.map +1 -1
- package/components/Modal/componentdata.json +3 -0
- package/components/Modal/index.js +1 -1
- package/components/Modal/styles.module.scss +102 -66
- package/components/Modal/styles.module.scss.d.ts +19 -11
- package/components/Validation/Validation.d.ts +17 -0
- package/components/Validation/Validation.d.ts.map +1 -0
- package/components/Validation/componentdata.json +111 -0
- package/components/Validation/index.d.ts +3 -0
- package/components/Validation/index.d.ts.map +1 -0
- package/components/Validation/index.js +2 -0
- package/components/Validation/index.js.map +1 -0
- package/components/Validation/styles.module.scss +15 -0
- package/components/Validation/styles.module.scss.d.ts +10 -0
- package/package.json +3 -4
- package/scss/_palette.scss +3 -0
- package/utils/uuid.d.ts +2 -0
- package/utils/uuid.d.ts.map +1 -0
- package/uuid-484288be.js +2 -0
- package/uuid-484288be.js.map +1 -0
- package/Button-79ff79f4.js +0 -2
- package/Button-79ff79f4.js.map +0 -1
- package/Loader-ad8bcd78.js +0 -2
- package/Loader-ad8bcd78.js.map +0 -1
- package/Modal-ab87aab2.js +0 -2
- package/Modal-ab87aab2.js.map +0 -1
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
{
|
|
2
|
+
"props": {
|
|
3
|
+
"className": {
|
|
4
|
+
"defaultValue": null,
|
|
5
|
+
"description": "Adds custom classes to the element.",
|
|
6
|
+
"name": "className",
|
|
7
|
+
"parent": {
|
|
8
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
9
|
+
"name": "CheckboxProps"
|
|
10
|
+
},
|
|
11
|
+
"declarations": [
|
|
12
|
+
{
|
|
13
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
14
|
+
"name": "CheckboxProps"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"required": false,
|
|
18
|
+
"type": {
|
|
19
|
+
"name": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"checked": {
|
|
23
|
+
"defaultValue": null,
|
|
24
|
+
"description": "Sets checkbox as checked",
|
|
25
|
+
"name": "checked",
|
|
26
|
+
"parent": {
|
|
27
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
28
|
+
"name": "CheckboxProps"
|
|
29
|
+
},
|
|
30
|
+
"declarations": [
|
|
31
|
+
{
|
|
32
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
33
|
+
"name": "CheckboxProps"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"required": false,
|
|
37
|
+
"type": {
|
|
38
|
+
"name": "boolean"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"disabled": {
|
|
42
|
+
"defaultValue": null,
|
|
43
|
+
"description": "Disables the checkbox",
|
|
44
|
+
"name": "disabled",
|
|
45
|
+
"parent": {
|
|
46
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
47
|
+
"name": "CheckboxProps"
|
|
48
|
+
},
|
|
49
|
+
"declarations": [
|
|
50
|
+
{
|
|
51
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
52
|
+
"name": "CheckboxProps"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"required": false,
|
|
56
|
+
"type": {
|
|
57
|
+
"name": "boolean"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"label": {
|
|
61
|
+
"defaultValue": null,
|
|
62
|
+
"description": "The label text next to the checkbox",
|
|
63
|
+
"name": "label",
|
|
64
|
+
"parent": {
|
|
65
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
66
|
+
"name": "CheckboxProps"
|
|
67
|
+
},
|
|
68
|
+
"declarations": [
|
|
69
|
+
{
|
|
70
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
71
|
+
"name": "CheckboxProps"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"required": true,
|
|
75
|
+
"type": {
|
|
76
|
+
"name": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"inputid": {
|
|
80
|
+
"defaultValue": null,
|
|
81
|
+
"description": "input id of the checkbox",
|
|
82
|
+
"name": "inputid",
|
|
83
|
+
"parent": {
|
|
84
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
85
|
+
"name": "CheckboxProps"
|
|
86
|
+
},
|
|
87
|
+
"declarations": [
|
|
88
|
+
{
|
|
89
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
90
|
+
"name": "CheckboxProps"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"required": false,
|
|
94
|
+
"type": {
|
|
95
|
+
"name": "string"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"mode": {
|
|
99
|
+
"defaultValue": null,
|
|
100
|
+
"description": "Changes the visuals of the checkbox",
|
|
101
|
+
"name": "mode",
|
|
102
|
+
"parent": {
|
|
103
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
104
|
+
"name": "CheckboxProps"
|
|
105
|
+
},
|
|
106
|
+
"declarations": [
|
|
107
|
+
{
|
|
108
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
109
|
+
"name": "CheckboxProps"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"required": false,
|
|
113
|
+
"type": {
|
|
114
|
+
"name": "enum",
|
|
115
|
+
"raw": "\"on-white\" | \"on-blueberry\" | \"on-dark\" | undefined",
|
|
116
|
+
"value": [
|
|
117
|
+
{
|
|
118
|
+
"value": "undefined"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value": "\"on-white\""
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"value": "\"on-blueberry\""
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"value": "\"on-dark\""
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"name": {
|
|
133
|
+
"defaultValue": null,
|
|
134
|
+
"description": "Unique identifyer for the input tag",
|
|
135
|
+
"name": "name",
|
|
136
|
+
"parent": {
|
|
137
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
138
|
+
"name": "CheckboxProps"
|
|
139
|
+
},
|
|
140
|
+
"declarations": [
|
|
141
|
+
{
|
|
142
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
143
|
+
"name": "CheckboxProps"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"required": false,
|
|
147
|
+
"type": {
|
|
148
|
+
"name": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"value": {
|
|
152
|
+
"defaultValue": null,
|
|
153
|
+
"description": "Return value for the checkbox",
|
|
154
|
+
"name": "value",
|
|
155
|
+
"parent": {
|
|
156
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
157
|
+
"name": "CheckboxProps"
|
|
158
|
+
},
|
|
159
|
+
"declarations": [
|
|
160
|
+
{
|
|
161
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
162
|
+
"name": "CheckboxProps"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"required": false,
|
|
166
|
+
"type": {
|
|
167
|
+
"name": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"variant": {
|
|
171
|
+
"defaultValue": null,
|
|
172
|
+
"description": "Changes the visuals of the checkbox",
|
|
173
|
+
"name": "variant",
|
|
174
|
+
"parent": {
|
|
175
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
176
|
+
"name": "CheckboxProps"
|
|
177
|
+
},
|
|
178
|
+
"declarations": [
|
|
179
|
+
{
|
|
180
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
181
|
+
"name": "CheckboxProps"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"required": false,
|
|
185
|
+
"type": {
|
|
186
|
+
"name": "enum",
|
|
187
|
+
"raw": "\"normal\" | \"bigform\" | undefined",
|
|
188
|
+
"value": [
|
|
189
|
+
{
|
|
190
|
+
"value": "undefined"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"value": "\"normal\""
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"value": "\"bigform\""
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"error": {
|
|
202
|
+
"defaultValue": null,
|
|
203
|
+
"description": "Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup",
|
|
204
|
+
"name": "error",
|
|
205
|
+
"parent": {
|
|
206
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
207
|
+
"name": "CheckboxProps"
|
|
208
|
+
},
|
|
209
|
+
"declarations": [
|
|
210
|
+
{
|
|
211
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
212
|
+
"name": "CheckboxProps"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"required": false,
|
|
216
|
+
"type": {
|
|
217
|
+
"name": "boolean"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"errorText": {
|
|
221
|
+
"defaultValue": null,
|
|
222
|
+
"description": "Error text to show above the component",
|
|
223
|
+
"name": "errorText",
|
|
224
|
+
"parent": {
|
|
225
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
226
|
+
"name": "CheckboxProps"
|
|
227
|
+
},
|
|
228
|
+
"declarations": [
|
|
229
|
+
{
|
|
230
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
231
|
+
"name": "CheckboxProps"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"required": false,
|
|
235
|
+
"type": {
|
|
236
|
+
"name": "string"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"testId": {
|
|
240
|
+
"defaultValue": null,
|
|
241
|
+
"description": "Sets the data-testid attribute.",
|
|
242
|
+
"name": "testId",
|
|
243
|
+
"parent": {
|
|
244
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
245
|
+
"name": "CheckboxProps"
|
|
246
|
+
},
|
|
247
|
+
"declarations": [
|
|
248
|
+
{
|
|
249
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
250
|
+
"name": "CheckboxProps"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"required": false,
|
|
254
|
+
"type": {
|
|
255
|
+
"name": "string"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{C as o}from"../../Checkbox-ffdd3cb7.js";export{C as default}from"../../Checkbox-ffdd3cb7.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";import"react";import"../../index-9b84fabc.js";import"../../uuid-484288be.js";import"../../Check-6291ad09.js";import"../../constants-d1f48e8e.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"./styles.module.scss";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
@import '../../scss/_spacers.scss';
|
|
2
|
+
@import '../../scss/_breakpoints.scss';
|
|
3
|
+
@import '../../scss/_palette.scss';
|
|
4
|
+
@import '../../scss/font-settings.scss';
|
|
5
|
+
|
|
6
|
+
.checkbox-errors {
|
|
7
|
+
font-size: $font-size-sm;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
color: $cherry500;
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.checkbox-wrapper {
|
|
14
|
+
&--with-error {
|
|
15
|
+
padding: getSpacer(s) getSpacer(xs) getSpacer(m);
|
|
16
|
+
background-color: $cherry50;
|
|
17
|
+
border-left: 0.25rem solid $cherry500;
|
|
18
|
+
|
|
19
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
20
|
+
padding: getSpacer(s) getSpacer(m) getSpacer(l);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--with-error#{&}--bigform {
|
|
25
|
+
padding: getSpacer(m) getSpacer(m);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.checkbox-label {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
font-size: $font-size-sm;
|
|
34
|
+
margin: getSpacer(s) 0;
|
|
35
|
+
|
|
36
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
37
|
+
font-size: $font-size-md;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--on-dark {
|
|
41
|
+
color: $white;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--invalid {
|
|
45
|
+
color: $black;
|
|
46
|
+
padding: getSpacer(s);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--disabled {
|
|
50
|
+
cursor: default;
|
|
51
|
+
color: $neutral400;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--bigform {
|
|
55
|
+
margin: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
56
|
+
padding: 1.68rem getSpacer(l);
|
|
57
|
+
background-color: $neutral50;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--bigform#{&}--on-blueberry {
|
|
61
|
+
background-color: $blueberry50;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&--bigform#{&}--on-dark {
|
|
65
|
+
background-color: $blueberry800;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&--invalid,
|
|
69
|
+
&--bigform#{&}--invalid {
|
|
70
|
+
background-color: $white;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.checkbox-label:last-of-type {
|
|
75
|
+
margin-bottom: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.checkbox {
|
|
79
|
+
width: 0px;
|
|
80
|
+
|
|
81
|
+
-moz-appearance: none;
|
|
82
|
+
-webkit-appearance: none;
|
|
83
|
+
-o-appearance: none;
|
|
84
|
+
|
|
85
|
+
&__icon-wrapper {
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
margin: getSpacer(3xs) getSpacer(s) getSpacer(3xs) getSpacer(3xs);
|
|
90
|
+
height: 1.625rem;
|
|
91
|
+
width: 1.625rem;
|
|
92
|
+
min-width: auto !important;
|
|
93
|
+
min-height: auto !important;
|
|
94
|
+
color: $neutral700;
|
|
95
|
+
box-shadow: 0 0 0 getSpacer(3xs);
|
|
96
|
+
|
|
97
|
+
:hover > & {
|
|
98
|
+
box-shadow: 0 0 0 getSpacer(2xs);
|
|
99
|
+
background-color: $neutral100;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:active > & {
|
|
103
|
+
box-shadow: 0 0 0 getSpacer(2xs);
|
|
104
|
+
color: $black;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&--checked {
|
|
108
|
+
color: $blueberry500;
|
|
109
|
+
|
|
110
|
+
:hover > & {
|
|
111
|
+
background-color: $blueberry50;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&--on-blueberry {
|
|
116
|
+
color: $blueberry500;
|
|
117
|
+
|
|
118
|
+
:hover > & {
|
|
119
|
+
background-color: $blueberry100;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&--on-dark {
|
|
124
|
+
color: $neutral200;
|
|
125
|
+
|
|
126
|
+
:hover > & {
|
|
127
|
+
background-color: $inverted-hover;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&.checkbox__icon-wrapper--checked {
|
|
131
|
+
color: $blueberry200;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:active > & {
|
|
135
|
+
color: $white;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&--invalid {
|
|
140
|
+
color: $cherry500;
|
|
141
|
+
|
|
142
|
+
:hover > & {
|
|
143
|
+
background-color: $cherry100;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.checkbox__icon-wrapper--checked {
|
|
147
|
+
color: $cherry500;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:active > & {
|
|
151
|
+
color: $black;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&--disabled {
|
|
156
|
+
color: $neutral400;
|
|
157
|
+
&.checkbox__icon-wrapper--checked {
|
|
158
|
+
color: $neutral400;
|
|
159
|
+
}
|
|
160
|
+
:hover > & {
|
|
161
|
+
box-shadow: 0 0 0 getSpacer(3xs);
|
|
162
|
+
background-color: transparent;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:active > & {
|
|
166
|
+
color: $neutral400;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&__icon {
|
|
172
|
+
position: relative;
|
|
173
|
+
top: 0.1rem;
|
|
174
|
+
right: 0.05rem;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&:focus {
|
|
178
|
+
& + .checkbox__icon-wrapper {
|
|
179
|
+
box-shadow: 0 0 0 getSpacer(2xs);
|
|
180
|
+
color: $black;
|
|
181
|
+
|
|
182
|
+
&--on-dark {
|
|
183
|
+
color: $white;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&--invalid {
|
|
187
|
+
color: $black;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
checkbox: string;
|
|
3
|
+
checkbox__icon: string;
|
|
4
|
+
'checkbox__icon-wrapper': string;
|
|
5
|
+
'checkbox__icon-wrapper--checked': string;
|
|
6
|
+
'checkbox__icon-wrapper--disabled': string;
|
|
7
|
+
'checkbox__icon-wrapper--invalid': string;
|
|
8
|
+
'checkbox__icon-wrapper--on-blueberry': string;
|
|
9
|
+
'checkbox__icon-wrapper--on-dark': string;
|
|
10
|
+
'checkbox-errors': string;
|
|
11
|
+
'checkbox-label': string;
|
|
12
|
+
'checkbox-label--bigform': string;
|
|
13
|
+
'checkbox-label--disabled': string;
|
|
14
|
+
'checkbox-label--invalid': string;
|
|
15
|
+
'checkbox-label--on-blueberry': string;
|
|
16
|
+
'checkbox-label--on-dark': string;
|
|
17
|
+
'checkbox-wrapper--bigform': string;
|
|
18
|
+
'checkbox-wrapper--with-error': string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type ClassNames = keyof Styles;
|
|
22
|
+
|
|
23
|
+
declare const styles: Styles;
|
|
24
|
+
|
|
25
|
+
export default styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpanderList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpanderList/ExpanderList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYnD,oBAAY,kBAAkB,GAAG,YAAY,CAAC;AAC9C,oBAAY,YAAY,GAAG,KAAK,CAAC,yBAAyB,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;AAE/G,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACtI,QAAQ,EAAE,YAAY,CAAC;CACxB;AAMD,UAAU,iBAAiB;IACzB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gCAAgC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,aAAK,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,I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@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,a as
|
|
1
|
+
import{_ as e,a as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import n,{useState as a,useEffect as r}from"react";import{a as i,I as l}from"../../constants-d1f48e8e.js";import{u as d}from"../../useHover-57ad4df9.js";import{u as o,B as s}from"../../useBreakpoint-a8fa8a61.js";import{c}from"../../index-9b84fabc.js";import m from"./styles.module.scss";import"../../_tslib-51c8a283.js";import"../../useWindowSize-c22d7634.js";import"../../grid-11a70eb7.js";var p=function(e){var t=e.isExtraSmall,a=e.isHovered,r=n.createElement("path",{d:"M15.049 30.277l-1.419-1.409 10.371-10.451L34.37 28.868l-1.419 1.409L24 21.257z"}),i=n.createElement("path",{d:"M24.001 10.14L36.37 22.591 34.951 24 25 13.985V35h-2V13.985L13.049 24l-1.419-1.409z"}),l=n.createElement("path",{d:"M32.577 30.115l1.793-1.779-10.371-10.451L13.63 28.336l1.793 1.779 8.576-8.644z"});return t?a?n.createElement("path",{d:"M23.999 9.043L36.897 22.02l-1.794 1.78-9.841-9.9.001 20.205h-2.526L22.736 13.9l-9.839 9.9-1.794-1.78z"}):l:a?i:r},u=function(e){var t=e.isExtraSmall,a=e.isHovered,r=n.createElement("path",{d:"M32.951 18.788l1.419 1.409-10.371 10.451L13.63 20.197l1.419-1.409L24 27.809z"}),i=n.createElement("path",{d:"M25 13v20.083l9.951-10.013 1.419 1.409L23.999 36.93 11.63 24.479l1.419-1.409L23 33.085V13z"}),l=n.createElement("path",{d:"M32.577 17.885l1.793 1.779-10.371 10.451L13.63 19.664l1.793-1.779 8.576 8.644z"});return t?a?n.createElement("path",{d:"M25 13v20.083l9.951-10.013 1.419 1.409L23.999 36.93 11.63 24.479l1.419-1.409L23 33.085V13z"}):l:a?i:r},v=n.forwardRef((function(e,a){var r,v=e.id,f=e.children,E=e.padding,x=void 0===E||E,h=e.color,g=void 0===h?"neutral":h,_=e.className,L=void 0===_?"":_,k=e.icon,N=e.large,b=void 0!==N&&N,z=e.title,j=e.isExpanded,H=void 0!==j&&j,w=e.testId,M=void 0===w?"":w,B=e.handleExpanderClick,C=d(),S=C.hoverRef,V=C.isHovered,y=o(),I=c(m["expander-list-link"],m["expander-list-link--".concat(g)],(t(r={},m["expander-list-link--closed"],!H),t(r,m["expander-list-link--large"],b),r)),O=c(m["expander-list-link__main-content"],x?m["expander-list-link__main-content--padding"]:"");return n.createElement("li",{className:L,ref:a},n.createElement("button",{id:v,onClick:B,"data-testid":M,className:I,ref:S},k&&n.createElement("span",{className:m["expander-list-link__icon"]},n.cloneElement(k,{size:y===s.Xs?i.XSmall:i.Small,isHovered:V})),n.createElement("span",{className:m["expander-list-link__title"]},z),n.createElement("span",{className:m["expander-list-link__chevron"]},n.createElement(l,{size:i.XSmall,svgIcon:H?p:u,isHovered:V}))),H?n.createElement("div",{className:O},f):null)}));var f=n.forwardRef((function(i,l){var d=i.children,o=i.childPadding,s=void 0===o||o,p=i.large,u=i.isOpen,f=void 0!==u&&u,E=i.color,x=i.className,h=void 0===x?"":x,g=i.accordion,_=void 0!==g&&g,L=i.topBorder,k=void 0===L||L,N=i.bottomBorder,b=void 0===N||N,z=a({}),j=e(z,2),H=j[0],w=j[1],M=a(),B=e(M,2),C=B[0],S=B[1],V=n.Children.count(d),y=c(m["expander-list"],h);function I(e){var n,a=(null===(n=e.currentTarget)||void 0===n?void 0:n.id)||function(e,t){var n=(e.path||e.composedPath&&e.composedPath()).find((function(e){return e.tagName===t}));return n?n.id:""}(e,"BUTTON");f||(w((function(e){return _?t({},a,!e[a]):Object.assign(Object.assign({},e),t({},a,!e[a]))})),S(e.currentTarget))}return r((function(){var e,t,n,a,r;!_||!C||(e=C.getBoundingClientRect(),t=e.top,n=e.left,a=e.bottom,r=e.right,t>=0&&n>=0&&a<=(window.innerHeight||document.documentElement.clientHeight)&&r<=(window.innerWidth||document.documentElement.clientWidth))||C.scrollIntoView()}),[_,C]),n.createElement("ul",{className:y,ref:l},n.Children.map(d,(function(e,a){if(e.type===v){var r=f||H["expander-".concat(a)],i=function(e){var n;return c(m["expander-list__item"],(t(n={},m["expander-list__item--top"],0===e&&k),t(n,m["expander-list__item--no-bottom"],e===V-1&&!b),n))}(a);return n.cloneElement(e,{id:"expander-".concat(a),key:"expander-".concat(a),isExpanded:r,padding:s,color:E,large:p,"aria-expanded":r,className:i,handleExpanderClick:I})}return e})))}));f.Expander=v,v.displayName="ExpanderList.Expander";export default f;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
line-height: $lineheight-size-lg;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
&
|
|
119
|
+
&__title {
|
|
120
120
|
color: $black;
|
|
121
121
|
display: flex;
|
|
122
122
|
align-items: center;
|
|
@@ -128,6 +128,19 @@
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
&__icon {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
margin-right: getSpacer(xs);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__chevron {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
margin-left: auto;
|
|
141
|
+
padding-left: getSpacer(xs);
|
|
142
|
+
}
|
|
143
|
+
|
|
131
144
|
&__main-content {
|
|
132
145
|
padding: 0;
|
|
133
146
|
|
|
@@ -139,13 +152,4 @@
|
|
|
139
152
|
}
|
|
140
153
|
}
|
|
141
154
|
}
|
|
142
|
-
|
|
143
|
-
&__icon-container {
|
|
144
|
-
&--hasmargin {
|
|
145
|
-
margin-right: getSpacer(xs);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
&__icon {
|
|
149
|
-
vertical-align: middle;
|
|
150
|
-
}
|
|
151
155
|
}
|
|
@@ -4,11 +4,11 @@ export type Styles = {
|
|
|
4
4
|
'expander-list__item--no-bottom': string;
|
|
5
5
|
'expander-list__item--top': string;
|
|
6
6
|
'expander-list-link': string;
|
|
7
|
+
'expander-list-link__chevron': string;
|
|
7
8
|
'expander-list-link__icon': string;
|
|
8
|
-
'expander-list-link__icon-container--hasmargin': string;
|
|
9
|
-
'expander-list-link__link-content': string;
|
|
10
9
|
'expander-list-link__main-content': string;
|
|
11
10
|
'expander-list-link__main-content--padding': string;
|
|
11
|
+
'expander-list-link__title': string;
|
|
12
12
|
'expander-list-link--banana': string;
|
|
13
13
|
'expander-list-link--blueberry': string;
|
|
14
14
|
'expander-list-link--cherry': string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormVariant } from '../FormGroup/FormGroup';
|
|
3
|
+
interface FormExampleProps {
|
|
4
|
+
exampleType: FormExampleVariants;
|
|
5
|
+
variant?: FormVariant;
|
|
6
|
+
}
|
|
7
|
+
export declare enum FormExampleVariants {
|
|
8
|
+
formgroup = "formgroup",
|
|
9
|
+
checkbox = "checkbox"
|
|
10
|
+
}
|
|
11
|
+
export declare const FormExample: React.ForwardRefExoticComponent<FormExampleProps & React.RefAttributes<HTMLElement>>;
|
|
12
|
+
export default FormExample;
|
|
13
|
+
//# sourceMappingURL=FormExample.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormExample.d.ts","sourceRoot":"","sources":["../../../src/components/FormExample/FormExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAkB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIhE,UAAU,gBAAgB;IACxB,WAAW,EAAE,mBAAmB,CAAC;IACjC,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,oBAAY,mBAAmB;IAC7B,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,WAAW,sFA6DtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"props": {
|
|
3
|
+
"exampleType": {
|
|
4
|
+
"defaultValue": null,
|
|
5
|
+
"description": "",
|
|
6
|
+
"name": "exampleType",
|
|
7
|
+
"parent": {
|
|
8
|
+
"fileName": "designsystem/src/components/FormExample/FormExample.tsx",
|
|
9
|
+
"name": "FormExampleProps"
|
|
10
|
+
},
|
|
11
|
+
"declarations": [
|
|
12
|
+
{
|
|
13
|
+
"fileName": "designsystem/src/components/FormExample/FormExample.tsx",
|
|
14
|
+
"name": "FormExampleProps"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"required": true,
|
|
18
|
+
"type": {
|
|
19
|
+
"name": "enum",
|
|
20
|
+
"raw": "FormExampleVariants",
|
|
21
|
+
"value": [
|
|
22
|
+
{
|
|
23
|
+
"value": "\"formgroup\""
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"value": "\"checkbox\""
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"variant": {
|
|
32
|
+
"defaultValue": null,
|
|
33
|
+
"description": "",
|
|
34
|
+
"name": "variant",
|
|
35
|
+
"parent": {
|
|
36
|
+
"fileName": "designsystem/src/components/FormExample/FormExample.tsx",
|
|
37
|
+
"name": "FormExampleProps"
|
|
38
|
+
},
|
|
39
|
+
"declarations": [
|
|
40
|
+
{
|
|
41
|
+
"fileName": "designsystem/src/components/FormExample/FormExample.tsx",
|
|
42
|
+
"name": "FormExampleProps"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"required": false,
|
|
46
|
+
"type": {
|
|
47
|
+
"name": "enum",
|
|
48
|
+
"raw": "\"normal\" | \"bigform\" | undefined",
|
|
49
|
+
"value": [
|
|
50
|
+
{
|
|
51
|
+
"value": "undefined"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"value": "\"normal\""
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"value": "\"bigform\""
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormExample/index.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,eAAe,WAAW,CAAC"}
|