@oslokommune/punkt-css 5.0.2 → 5.0.5
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 +37 -0
- package/dist/css/components/icon.css +4 -0
- package/dist/css/components/icon.min.css +1 -1
- package/dist/css/pkt-components.css +4 -0
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-elements.css +1 -1
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +5 -1
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/components/_icon.scss +5 -0
- package/dist/scss/elements/_button.scss +40 -32
- package/package.json +2 -2
|
@@ -15,21 +15,24 @@
|
|
|
15
15
|
|
|
16
16
|
$-module-name: 'pkt-btn';
|
|
17
17
|
$-sizes: (
|
|
18
|
-
'small': (
|
|
18
|
+
'small': (
|
|
19
|
+
'text-class': 'pkt-txt-14-medium',
|
|
19
20
|
'padding': 0 0.5rem,
|
|
20
21
|
'padding-icon-only': 0 0.5625rem,
|
|
21
22
|
'icon-size': 1.25rem,
|
|
22
23
|
'height': 2.625rem,
|
|
23
24
|
'line-height': 1.1,
|
|
24
25
|
),
|
|
25
|
-
'medium': (
|
|
26
|
+
'medium': (
|
|
27
|
+
'text-class': 'pkt-txt-18-medium',
|
|
26
28
|
'padding': 0 1rem,
|
|
27
29
|
'padding-icon-only': 0 0.625rem,
|
|
28
30
|
'icon-size': 1.5rem,
|
|
29
31
|
'height': 3rem,
|
|
30
32
|
'line-height': 1.1,
|
|
31
33
|
),
|
|
32
|
-
'large': (
|
|
34
|
+
'large': (
|
|
35
|
+
'text-class': 'pkt-txt-24-medium',
|
|
33
36
|
'padding': 0 1rem,
|
|
34
37
|
'padding-icon-only': 0 0.875rem,
|
|
35
38
|
'icon-size': 2rem,
|
|
@@ -38,7 +41,9 @@ $-sizes: (
|
|
|
38
41
|
),
|
|
39
42
|
);
|
|
40
43
|
$-skins: (
|
|
41
|
-
'primary': (
|
|
44
|
+
'primary': (
|
|
45
|
+
'light': (
|
|
46
|
+
'link-bg': --color-blue-dark,
|
|
42
47
|
'link-bc': --color-blue-dark,
|
|
43
48
|
'link-txt': --color-white,
|
|
44
49
|
'focus-bg': --color-active,
|
|
@@ -55,7 +60,8 @@ $-skins: (
|
|
|
55
60
|
'disabled-bc': --color-gray,
|
|
56
61
|
'disabled-txt': --color-disabled,
|
|
57
62
|
),
|
|
58
|
-
'dark': (
|
|
63
|
+
'dark': (
|
|
64
|
+
'link-bg': --color-blue-light,
|
|
59
65
|
'link-bc': --color-blue-light,
|
|
60
66
|
'link-txt': --color-blue-dark,
|
|
61
67
|
'focus-bg': --color-blue,
|
|
@@ -73,7 +79,9 @@ $-skins: (
|
|
|
73
79
|
'disabled-txt': --color-disabled,
|
|
74
80
|
),
|
|
75
81
|
),
|
|
76
|
-
'secondary': (
|
|
82
|
+
'secondary': (
|
|
83
|
+
'light': (
|
|
84
|
+
'link-bg': --color-transparent,
|
|
77
85
|
'link-bc': --color-blue-dark,
|
|
78
86
|
'link-txt': --color-blue-dark,
|
|
79
87
|
'focus-bg': --color-transparent,
|
|
@@ -90,7 +98,8 @@ $-skins: (
|
|
|
90
98
|
'disabled-bc': --color-gray,
|
|
91
99
|
'disabled-txt': --color-disabled,
|
|
92
100
|
),
|
|
93
|
-
'dark': (
|
|
101
|
+
'dark': (
|
|
102
|
+
'link-bg': --color-transparent,
|
|
94
103
|
'link-bc': --color-white,
|
|
95
104
|
'link-txt': --color-white,
|
|
96
105
|
'focus-bg': --color-transparent,
|
|
@@ -108,7 +117,9 @@ $-skins: (
|
|
|
108
117
|
'disabled-txt': --color-disabled,
|
|
109
118
|
),
|
|
110
119
|
),
|
|
111
|
-
'tertiary': (
|
|
120
|
+
'tertiary': (
|
|
121
|
+
'light': (
|
|
122
|
+
'link-bg': --color-transparent,
|
|
112
123
|
'link-bc': --color-transparent,
|
|
113
124
|
'link-txt': --color-blue-dark,
|
|
114
125
|
'focus-bg': --color-gray,
|
|
@@ -124,7 +135,8 @@ $-skins: (
|
|
|
124
135
|
'disabled-bc': --color-transparent,
|
|
125
136
|
'disabled-txt': --color-disabled,
|
|
126
137
|
),
|
|
127
|
-
'dark': (
|
|
138
|
+
'dark': (
|
|
139
|
+
'link-bg': --color-transparent,
|
|
128
140
|
'link-bc': --color-transparent,
|
|
129
141
|
'link-txt': --color-white,
|
|
130
142
|
'focus-bg': --color-blue-5,
|
|
@@ -145,12 +157,10 @@ $-skins: (
|
|
|
145
157
|
);
|
|
146
158
|
|
|
147
159
|
@mixin -print-skin-as-css-vars($name, $o, $mode) {
|
|
148
|
-
|
|
149
|
-
@each $key,
|
|
150
|
-
$value in $o {
|
|
151
|
-
|
|
160
|
+
@each $key, $value in $o {
|
|
152
161
|
// Only print primary skin and css vars that differ from primary
|
|
153
|
-
@if $name =='primary' or $value !=map.get($-skins, 'primary', $mode, $key)
|
|
162
|
+
@if $name == 'primary' or $value !=map.get($-skins, 'primary', $mode, $key)
|
|
163
|
+
{
|
|
154
164
|
--btn-#{$key}: var(#{$value});
|
|
155
165
|
}
|
|
156
166
|
}
|
|
@@ -195,9 +205,7 @@ $-skins: (
|
|
|
195
205
|
@extend %sr-only;
|
|
196
206
|
}
|
|
197
207
|
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
@else {
|
|
208
|
+
} @else {
|
|
201
209
|
&--#{$name} {
|
|
202
210
|
@include typography.get-text(map.get($o, 'text-class'));
|
|
203
211
|
height: map.get($o, 'height');
|
|
@@ -225,14 +233,16 @@ $-skins: (
|
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
.#{$-module-name}#{$css-skin} {
|
|
228
|
-
@include -print-skin-as-css-vars(
|
|
236
|
+
@include -print-skin-as-css-vars(
|
|
237
|
+
$name,
|
|
229
238
|
map.get($-skins, $name, 'light'),
|
|
230
239
|
'light'
|
|
231
240
|
);
|
|
232
241
|
}
|
|
233
242
|
|
|
234
243
|
@at-root [data-mode='dark'] .#{$-module-name}#{$css-skin} {
|
|
235
|
-
@include -print-skin-as-css-vars(
|
|
244
|
+
@include -print-skin-as-css-vars(
|
|
245
|
+
$name,
|
|
236
246
|
map.get($-skins, $name, 'dark'),
|
|
237
247
|
'dark'
|
|
238
248
|
);
|
|
@@ -240,8 +250,7 @@ $-skins: (
|
|
|
240
250
|
}
|
|
241
251
|
|
|
242
252
|
// Print css vars for hvert skin
|
|
243
|
-
@each $key,
|
|
244
|
-
$value in $-skins {
|
|
253
|
+
@each $key, $value in $-skins {
|
|
245
254
|
@include -skin($key, map.get($value, 'light'));
|
|
246
255
|
}
|
|
247
256
|
|
|
@@ -268,8 +277,8 @@ $value in $-skins {
|
|
|
268
277
|
align-items: center;
|
|
269
278
|
column-gap: 0.5rem;
|
|
270
279
|
|
|
271
|
-
&[class*='pkt-btn--icon']
|
|
272
|
-
display:
|
|
280
|
+
&[class*='pkt-btn--icon'] > .pkt-btn__icon {
|
|
281
|
+
display: flex;
|
|
273
282
|
}
|
|
274
283
|
|
|
275
284
|
&__icon {
|
|
@@ -284,8 +293,8 @@ $value in $-skins {
|
|
|
284
293
|
}
|
|
285
294
|
|
|
286
295
|
@at-root a.#{$-module-name}:focus,
|
|
287
|
-
|
|
288
|
-
|
|
296
|
+
&:enabled:focus,
|
|
297
|
+
&.#{$-module-name}--focus {
|
|
289
298
|
background-color: var(--btn-focus-bg);
|
|
290
299
|
color: var(--btn-focus-txt);
|
|
291
300
|
border-color: var(--btn-focus-bc);
|
|
@@ -294,8 +303,8 @@ $value in $-skins {
|
|
|
294
303
|
}
|
|
295
304
|
|
|
296
305
|
@at-root a.#{$-module-name}:hover,
|
|
297
|
-
|
|
298
|
-
|
|
306
|
+
&:enabled:hover,
|
|
307
|
+
&.#{$-module-name}--hover {
|
|
299
308
|
background-color: var(--btn-hover-bg);
|
|
300
309
|
border-color: var(--btn-hover-bc);
|
|
301
310
|
color: var(--btn-hover-txt);
|
|
@@ -304,9 +313,9 @@ $value in $-skins {
|
|
|
304
313
|
}
|
|
305
314
|
|
|
306
315
|
@at-root a.#{$-module-name}:active,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
316
|
+
&:enabled:active,
|
|
317
|
+
&.#{$-module-name}--active,
|
|
318
|
+
&.#{$-module-name}--active:hover {
|
|
310
319
|
background-color: var(--btn-active-bg);
|
|
311
320
|
border-color: var(--btn-active-bc);
|
|
312
321
|
color: var(--btn-active-txt);
|
|
@@ -322,8 +331,7 @@ $value in $-skins {
|
|
|
322
331
|
}
|
|
323
332
|
|
|
324
333
|
// button sizes & variants
|
|
325
|
-
@each $key,
|
|
326
|
-
$value in $-sizes {
|
|
334
|
+
@each $key, $value in $-sizes {
|
|
327
335
|
@include -size($key, $value);
|
|
328
336
|
}
|
|
329
337
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-css",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
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",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
56
56
|
},
|
|
57
57
|
"license": "MIT",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "cee64a5848cb61440dbd18cf3029dcd6113032cc"
|
|
59
59
|
}
|