@oslokommune/punkt-css 2.0.1 → 2.0.3
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 +9 -0
- package/dist/css/pkt-base.css +2 -0
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-elements.css +17 -34
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +19 -34
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/base/_defaults.scss +2 -0
- package/dist/scss/elements/_button.scss +24 -40
- package/package.json +2 -2
|
@@ -17,27 +17,27 @@ $-module-name: 'pkt-btn';
|
|
|
17
17
|
$-sizes: (
|
|
18
18
|
'small': (
|
|
19
19
|
'text-class': 'pkt-txt-14-medium',
|
|
20
|
-
'padding': 0.5rem
|
|
21
|
-
'
|
|
22
|
-
'icon-m-icon-right': 0 0 0 0.5rem,
|
|
23
|
-
'icon-m-icon-only': 0 -0.3125rem,
|
|
20
|
+
'padding': 0 0.5rem,
|
|
21
|
+
'padding-icon-only': 0 0.5625rem,
|
|
24
22
|
'icon-size': 1.25rem,
|
|
23
|
+
'height': 2.625rem,
|
|
24
|
+
'line-height': 1.1,
|
|
25
25
|
),
|
|
26
26
|
'medium': (
|
|
27
27
|
'text-class': 'pkt-txt-18-medium',
|
|
28
|
-
'padding': 0
|
|
29
|
-
'
|
|
30
|
-
'icon-m-icon-right': 0.09375rem 0 0 0.5rem,
|
|
31
|
-
'icon-m-icon-only': 0.09375rem -0.21875rem,
|
|
28
|
+
'padding': 0 1rem,
|
|
29
|
+
'padding-icon-only': 0 0.625rem,
|
|
32
30
|
'icon-size': 1.5rem,
|
|
31
|
+
'height': 3rem,
|
|
32
|
+
'line-height': 1.1,
|
|
33
33
|
),
|
|
34
34
|
'large': (
|
|
35
35
|
'text-class': 'pkt-txt-24-medium',
|
|
36
|
-
'padding': 0
|
|
37
|
-
'
|
|
38
|
-
'icon-m-icon-right': 0.0625rem 0 0 0.5rem,
|
|
39
|
-
'icon-m-icon-only': 0.0625rem -0.25rem,
|
|
36
|
+
'padding': 0 1rem,
|
|
37
|
+
'padding-icon-only': 0 0.875rem,
|
|
40
38
|
'icon-size': 2rem,
|
|
39
|
+
'height': 4rem,
|
|
40
|
+
'line-height': 1.1,
|
|
41
41
|
),
|
|
42
42
|
);
|
|
43
43
|
$-skins: (
|
|
@@ -169,12 +169,14 @@ $-skins: (
|
|
|
169
169
|
@mixin -size($name, $o) {
|
|
170
170
|
@if $name == medium {
|
|
171
171
|
@include typography.get-text(map.get($o, 'text-class'));
|
|
172
|
+
height: map.get($o, 'height');
|
|
173
|
+
line-height: map.get($o, 'line-height');
|
|
172
174
|
padding: map.get($o, 'padding');
|
|
173
175
|
|
|
174
176
|
&__icon {
|
|
175
177
|
height: map.get($o, 'icon-size');
|
|
176
|
-
width: map.get($o, 'icon-size');
|
|
177
178
|
margin: map.get($o, 'icon-margin');
|
|
179
|
+
width: map.get($o, 'icon-size');
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
// button variants (base)
|
|
@@ -186,54 +188,35 @@ $-skins: (
|
|
|
186
188
|
|
|
187
189
|
&--icon-left {
|
|
188
190
|
flex-direction: row;
|
|
189
|
-
|
|
190
|
-
.#{$-module-name}__icon {
|
|
191
|
-
margin: map.get($o, 'icon-m-icon-left');
|
|
192
|
-
}
|
|
193
191
|
}
|
|
194
192
|
|
|
195
193
|
&--icon-right {
|
|
196
194
|
flex-direction: row-reverse;
|
|
197
|
-
|
|
198
|
-
.#{$-module-name}__icon {
|
|
199
|
-
margin: map.get($o, 'icon-m-icon-right');
|
|
200
|
-
}
|
|
201
195
|
}
|
|
202
196
|
&--icons-right-and-left {
|
|
203
197
|
flex-direction: row;
|
|
204
|
-
.#{$-module-name}__icon:first-of-type {
|
|
205
|
-
margin: map.get($o, 'icon-m-icon-left');
|
|
206
|
-
}
|
|
207
|
-
.#{$-module-name}__icon:last-of-type {
|
|
208
|
-
margin: map.get($o, 'icon-m-icon-right');
|
|
209
|
-
}
|
|
210
198
|
}
|
|
211
199
|
&--icon-only {
|
|
200
|
+
padding: map.get($o, 'padding-icon-only');
|
|
201
|
+
|
|
212
202
|
.#{$-module-name}__text {
|
|
213
203
|
@extend %sr-only;
|
|
214
204
|
}
|
|
215
|
-
.#{$-module-name}__icon {
|
|
216
|
-
margin: map.get($o, 'icon-m-icon-only');
|
|
217
|
-
}
|
|
218
205
|
}
|
|
219
206
|
} @else {
|
|
220
207
|
&--#{$name} {
|
|
221
208
|
@include typography.get-text(map.get($o, 'text-class'));
|
|
209
|
+
height: map.get($o, 'height');
|
|
210
|
+
line-height: map.get($o, 'line-height');
|
|
222
211
|
padding: map.get($o, 'padding');
|
|
223
212
|
}
|
|
224
213
|
&--#{$name} &__icon {
|
|
225
214
|
height: map.get($o, 'icon-size');
|
|
226
|
-
width: map.get($o, 'icon-size');
|
|
227
215
|
margin: map.get($o, 'icon-margin');
|
|
216
|
+
width: map.get($o, 'icon-size');
|
|
228
217
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
.#{$-module-name}--#{$name}.#{$-module-name}--icon-right &__icon {
|
|
233
|
-
margin: map.get($o, 'icon-m-icon-right');
|
|
234
|
-
}
|
|
235
|
-
.#{$-module-name}--#{$name}.#{$-module-name}--icon-only &__icon {
|
|
236
|
-
margin: map.get($o, 'icon-m-icon-only');
|
|
218
|
+
&--#{$name}.#{$-module-name}--icon-only {
|
|
219
|
+
padding: map.get($o, 'padding-icon-only');
|
|
237
220
|
}
|
|
238
221
|
}
|
|
239
222
|
}
|
|
@@ -273,7 +256,6 @@ $-skins: (
|
|
|
273
256
|
font-family: inherit;
|
|
274
257
|
font-weight: normal;
|
|
275
258
|
margin: 6px;
|
|
276
|
-
overflow: hidden;
|
|
277
259
|
position: relative;
|
|
278
260
|
-moz-user-select: none;
|
|
279
261
|
-webkit-user-select: none;
|
|
@@ -287,6 +269,8 @@ $-skins: (
|
|
|
287
269
|
text-decoration-thickness: 1px;
|
|
288
270
|
text-underline-offset: 0.3em;
|
|
289
271
|
text-align: left;
|
|
272
|
+
align-items: center;
|
|
273
|
+
column-gap: 0.5rem;
|
|
290
274
|
|
|
291
275
|
&[class*='pkt-btn--icon'] > .pkt-btn__icon {
|
|
292
276
|
display: block;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-css",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
58
58
|
},
|
|
59
59
|
"license": "MIT",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "fd6b9eca772920f7333e212c6f3f1a54410f248d"
|
|
61
61
|
}
|