@oslokommune/punkt-css 6.0.3 → 7.0.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/CHANGELOG.md +41 -0
- package/README.md +3 -3
- package/dist/css/components/inputwrapper.css +120 -0
- package/dist/css/components/inputwrapper.min.css +1 -0
- package/dist/css/components/textinput.css +39 -129
- package/dist/css/components/textinput.min.css +1 -1
- package/dist/css/pkt-base.css +7 -7
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +160 -129
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-elements.css +2 -2
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +169 -138
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/abstracts/variables/_typography.scss +1 -1
- package/dist/scss/base/_typography.scss +1 -1
- package/dist/scss/components/_index.scss +1 -0
- package/dist/scss/components/_inputwrapper.scss +140 -0
- package/dist/scss/components/_textinput.scss +23 -130
- package/dist/scss/elements/_checkbox-radio.scss +1 -1
- package/dist/scss/elements/_select.scss +1 -1
- package/package.json +3 -3
|
@@ -143,7 +143,7 @@ a,
|
|
|
143
143
|
|
|
144
144
|
&--external::after {
|
|
145
145
|
content: ' ';
|
|
146
|
-
--svg: url(https://punkt-cdn.oslo.kommune.no/
|
|
146
|
+
--svg: url(https://punkt-cdn.oslo.kommune.no/7.0/icons/new-window-small.svg);
|
|
147
147
|
background-image: var(--svg);
|
|
148
148
|
background-repeat: no-repeat;
|
|
149
149
|
background-size: 18px 18px;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/* inputwrapper */
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../abstracts/variables';
|
|
4
|
+
@use '../abstracts/functions';
|
|
5
|
+
@use '../abstracts/mixins/typography';
|
|
6
|
+
|
|
7
|
+
.pkt-inputwrapper {
|
|
8
|
+
&__label {
|
|
9
|
+
@include typography.get-text('pkt-txt-18-medium');
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: map.get(variables.$spacing, 'size-8');
|
|
14
|
+
> h2 {
|
|
15
|
+
font-size: inherit;
|
|
16
|
+
font-weight: inherit;
|
|
17
|
+
letter-spacing: inherit;
|
|
18
|
+
line-height: inherit;
|
|
19
|
+
display: inline;
|
|
20
|
+
margin-bottom: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__helptext {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
gap: map.get(variables.$spacing, 'size-4');
|
|
29
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
30
|
+
|
|
31
|
+
&-expandable {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
text-align: left;
|
|
34
|
+
align-items: center;
|
|
35
|
+
|
|
36
|
+
&-heading {
|
|
37
|
+
@include typography.get-text('pkt-txt-18-medium');
|
|
38
|
+
margin: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-open {
|
|
42
|
+
width: 100%;
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-closed {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&--disabled {
|
|
53
|
+
color: var(--color-disabled);
|
|
54
|
+
cursor: inherit;
|
|
55
|
+
|
|
56
|
+
.pkt-tag {
|
|
57
|
+
background-color: var(--color-disabled-light);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pkt-alert {
|
|
61
|
+
background-color: var(--color-disabled-light);
|
|
62
|
+
border-color: var(--color-disabled);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&--inline {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
vertical-align: middle;
|
|
69
|
+
margin-right: 8px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Alert
|
|
73
|
+
.pkt-alert {
|
|
74
|
+
width: 100%;
|
|
75
|
+
padding: 0.75rem 1rem 0.75rem calc(8px - 4px);
|
|
76
|
+
margin: 0 0 0.5rem 0;
|
|
77
|
+
|
|
78
|
+
&--error {
|
|
79
|
+
margin: 0.5rem 0 0.5rem 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__icon {
|
|
83
|
+
width: 1.375rem;
|
|
84
|
+
height: 1.375rem;
|
|
85
|
+
top: 0.81rem;
|
|
86
|
+
left: 1.25rem;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&__text {
|
|
90
|
+
@include typography.get-text('pkt-txt-16-light');
|
|
91
|
+
margin: 0 0 0 2.875rem;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Tag
|
|
96
|
+
.pkt-tag {
|
|
97
|
+
margin-left: 8px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.pkt-btn {
|
|
101
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
102
|
+
padding: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&--error {
|
|
106
|
+
.pkt-textinput__input,
|
|
107
|
+
.pkt-textinput__input-prefix,
|
|
108
|
+
.pkt-textinput__input-suffix,
|
|
109
|
+
.pkt-textinput__input-icon {
|
|
110
|
+
border-color: var(--color-red);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.pkt-textinput__input:hover,
|
|
114
|
+
.pkt-textinput__input-prefix-wrapper:hover .pkt-textinput__input,
|
|
115
|
+
.pkt-textinput__input-suffix-wrapper:hover .pkt-textinput__input,
|
|
116
|
+
.pkt-textinput__input-prefix-wrapper:hover .pkt-textinput__input-prefix,
|
|
117
|
+
.pkt-textinput__input-suffix-wrapper:hover .pkt-textinput__input-suffix,
|
|
118
|
+
.pkt-textinput__input-suffix-wrapper:hover .pkt-textinput__input-icon {
|
|
119
|
+
border-color: var(--color-red);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.pkt-textinput__input:focus-within,
|
|
123
|
+
.pkt-textinput__input-prefix-wrapper:focus-within
|
|
124
|
+
.pkt-textinput__input-icon,
|
|
125
|
+
.pkt-textinput__input-prefix-wrapper:focus-within .pkt-textinput__input,
|
|
126
|
+
.pkt-textinput__input-prefix-wrapper:focus-within
|
|
127
|
+
.pkt-textinput__input-prefix,
|
|
128
|
+
.pkt-textinput__input-prefix-wrapper:focus-within
|
|
129
|
+
.pkt-textinput__input-icon,
|
|
130
|
+
.pkt-textinput__input-suffix-wrapper:focus-within
|
|
131
|
+
.pkt-textinput__input-icon,
|
|
132
|
+
.pkt-textinput__input-suffix-wrapper:focus-within .pkt-textinput__input,
|
|
133
|
+
.pkt-textinput__input-suffix-wrapper:focus-within
|
|
134
|
+
.pkt-textinput__input-suffix,
|
|
135
|
+
.pkt-textinput__input-suffix-wrapper:focus-within
|
|
136
|
+
.pkt-textinput__input-icon {
|
|
137
|
+
border-color: var(--color-red);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -5,50 +5,6 @@
|
|
|
5
5
|
@use '../abstracts/mixins/typography';
|
|
6
6
|
|
|
7
7
|
.pkt-textinput {
|
|
8
|
-
&__label {
|
|
9
|
-
@include typography.get-text('pkt-txt-18-medium');
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: flex-start;
|
|
13
|
-
gap: map.get(variables.$spacing, 'size-8');
|
|
14
|
-
> h2 {
|
|
15
|
-
font-size: inherit;
|
|
16
|
-
font-weight: inherit;
|
|
17
|
-
letter-spacing: inherit;
|
|
18
|
-
line-height: inherit;
|
|
19
|
-
display: inline;
|
|
20
|
-
margin-bottom: 0;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&__helptext {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: flex-start;
|
|
28
|
-
gap: map.get(variables.$spacing, 'size-4');
|
|
29
|
-
@include typography.get-text('pkt-txt-14-light');
|
|
30
|
-
|
|
31
|
-
&-expandable {
|
|
32
|
-
display: inline-flex;
|
|
33
|
-
text-align: left;
|
|
34
|
-
align-items: center;
|
|
35
|
-
|
|
36
|
-
&-heading {
|
|
37
|
-
@include typography.get-text('pkt-txt-18-medium');
|
|
38
|
-
margin: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&-open {
|
|
42
|
-
width: 100%;
|
|
43
|
-
display: block;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&-closed {
|
|
47
|
-
display: none;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
8
|
&__input {
|
|
53
9
|
@include typography.get-text('pkt-txt-18-light');
|
|
54
10
|
display: flex;
|
|
@@ -62,6 +18,10 @@
|
|
|
62
18
|
padding: 0.5rem 1rem;
|
|
63
19
|
width: 100%;
|
|
64
20
|
|
|
21
|
+
&:is(textarea) {
|
|
22
|
+
min-height: map.get(variables.$spacing, 'size-128');
|
|
23
|
+
}
|
|
24
|
+
|
|
65
25
|
// 1. Override Firefox's default opacity
|
|
66
26
|
&::placeholder {
|
|
67
27
|
color: var(--color-grayscale-50);
|
|
@@ -228,22 +188,31 @@
|
|
|
228
188
|
margin-left: 0.5rem;
|
|
229
189
|
}
|
|
230
190
|
}
|
|
191
|
+
&--counter-error,
|
|
192
|
+
&--counter-error:focus {
|
|
193
|
+
border-color: var(--color-red);
|
|
194
|
+
background-color: var(--color-red-30);
|
|
195
|
+
}
|
|
196
|
+
&--counter-error:focus {
|
|
197
|
+
box-shadow: 0 0 0 2px var(--color-red);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&__counter {
|
|
202
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
203
|
+
width: 100%;
|
|
204
|
+
text-align: right;
|
|
205
|
+
&--error {
|
|
206
|
+
@include typography.get-text('pkt-txt-14-medium');
|
|
207
|
+
color: var(--color-red);
|
|
208
|
+
}
|
|
231
209
|
}
|
|
232
210
|
|
|
233
211
|
// Modifiers
|
|
234
|
-
|
|
212
|
+
@at-root .pkt-inputwrapper--disabled {
|
|
235
213
|
color: var(--color-disabled);
|
|
236
214
|
cursor: inherit;
|
|
237
215
|
|
|
238
|
-
.pkt-tag {
|
|
239
|
-
background-color: var(--color-disabled-light);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.pkt-alert {
|
|
243
|
-
background-color: var(--color-disabled-light);
|
|
244
|
-
border-color: var(--color-disabled);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
216
|
.pkt-textinput__input,
|
|
248
217
|
.pkt-textinput__input-prefix,
|
|
249
218
|
.pkt-textinput__input-suffix,
|
|
@@ -277,49 +246,6 @@
|
|
|
277
246
|
outline: none;
|
|
278
247
|
}
|
|
279
248
|
}
|
|
280
|
-
|
|
281
|
-
&--error {
|
|
282
|
-
.pkt-textinput__input,
|
|
283
|
-
.pkt-textinput__input-prefix,
|
|
284
|
-
.pkt-textinput__input-suffix,
|
|
285
|
-
.pkt-textinput__input-icon {
|
|
286
|
-
border-color: var(--color-red);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.pkt-textinput__input:hover,
|
|
290
|
-
.pkt-textinput__input-prefix-wrapper:hover .pkt-textinput__input,
|
|
291
|
-
.pkt-textinput__input-suffix-wrapper:hover .pkt-textinput__input,
|
|
292
|
-
.pkt-textinput__input-prefix-wrapper:hover .pkt-textinput__input-prefix,
|
|
293
|
-
.pkt-textinput__input-suffix-wrapper:hover .pkt-textinput__input-suffix,
|
|
294
|
-
.pkt-textinput__input-suffix-wrapper:hover .pkt-textinput__input-icon {
|
|
295
|
-
border-color: var(--color-red);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.pkt-textinput__input:focus-within,
|
|
299
|
-
.pkt-textinput__input-prefix-wrapper:focus-within
|
|
300
|
-
.pkt-textinput__input-icon,
|
|
301
|
-
.pkt-textinput__input-prefix-wrapper:focus-within .pkt-textinput__input,
|
|
302
|
-
.pkt-textinput__input-prefix-wrapper:focus-within
|
|
303
|
-
.pkt-textinput__input-prefix,
|
|
304
|
-
.pkt-textinput__input-prefix-wrapper:focus-within
|
|
305
|
-
.pkt-textinput__input-icon,
|
|
306
|
-
.pkt-textinput__input-suffix-wrapper:focus-within
|
|
307
|
-
.pkt-textinput__input-icon,
|
|
308
|
-
.pkt-textinput__input-suffix-wrapper:focus-within .pkt-textinput__input,
|
|
309
|
-
.pkt-textinput__input-suffix-wrapper:focus-within
|
|
310
|
-
.pkt-textinput__input-suffix,
|
|
311
|
-
.pkt-textinput__input-suffix-wrapper:focus-within
|
|
312
|
-
.pkt-textinput__input-icon {
|
|
313
|
-
border-color: var(--color-red);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
&--inline {
|
|
318
|
-
display: inline-block;
|
|
319
|
-
vertical-align: middle;
|
|
320
|
-
margin-right: 8px;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
249
|
// Dark mode
|
|
324
250
|
@at-root [data-mode='dark'] {
|
|
325
251
|
.pkt-textinput__input-prefix,
|
|
@@ -329,37 +255,4 @@
|
|
|
329
255
|
color: var(--color-blue-dark);
|
|
330
256
|
}
|
|
331
257
|
}
|
|
332
|
-
|
|
333
|
-
// Alert
|
|
334
|
-
.pkt-alert {
|
|
335
|
-
width: 100%;
|
|
336
|
-
padding: 0.75rem 1rem 0.75rem calc(8px - 4px);
|
|
337
|
-
margin: 0 0 0.5rem 0;
|
|
338
|
-
|
|
339
|
-
&--error {
|
|
340
|
-
margin: 0.5rem 0 0.5rem 0;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
&__icon {
|
|
344
|
-
width: 1.375rem;
|
|
345
|
-
height: 1.375rem;
|
|
346
|
-
top: 0.81rem;
|
|
347
|
-
left: 1.25rem;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
&__text {
|
|
351
|
-
@include typography.get-text('pkt-txt-16-light');
|
|
352
|
-
margin: 0 0 0 2.875rem;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// Tag
|
|
357
|
-
.pkt-tag {
|
|
358
|
-
margin-left: 8px;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.pkt-btn {
|
|
362
|
-
@include typography.get-text('pkt-txt-14-light');
|
|
363
|
-
padding: 0;
|
|
364
|
-
}
|
|
365
258
|
}
|
|
@@ -81,7 +81,7 @@ $-module-name: 'pkt-form-check-input';
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&[type='checkbox'] {
|
|
84
|
-
--svg: url(https://punkt-cdn.oslo.kommune.no/
|
|
84
|
+
--svg: url(https://punkt-cdn.oslo.kommune.no/7.0/icons/check-medium.svg);
|
|
85
85
|
position: relative;
|
|
86
86
|
background-color: blue;
|
|
87
87
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@use '../abstracts/functions';
|
|
11
11
|
|
|
12
12
|
.pkt-select {
|
|
13
|
-
--svg: url(https://punkt-cdn.oslo.kommune.no/
|
|
13
|
+
--svg: url(https://punkt-cdn.oslo.kommune.no/7.0/icons/chevron-thin-down.svg);
|
|
14
14
|
|
|
15
15
|
display: block;
|
|
16
16
|
background-color: var(--color-white);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-css",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "CSS-rammeverket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"preview": "astro preview"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@oslokommune/punkt-assets": "^
|
|
23
|
+
"@oslokommune/punkt-assets": "^7.0.0",
|
|
24
24
|
"astro": "^2.8.1",
|
|
25
25
|
"edit-json-file": "^1.7.0",
|
|
26
26
|
"fs-extra": "^11.1.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
56
56
|
},
|
|
57
57
|
"license": "MIT",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "1798ecaf405fba3b89e70aa8c12d39bc4b6edcc1"
|
|
59
59
|
}
|