@oslokommune/punkt-css 5.2.0 → 6.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 +36 -0
- package/CONTRIBUTING.md +0 -3
- package/dist/css/components/header.css +214 -76
- package/dist/css/components/header.min.css +1 -1
- package/dist/css/pkt-base.css +847 -7
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +214 -76
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-elements.css +23 -2
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +1084 -85
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/abstracts/variables/_spacing.scss +2 -0
- package/dist/scss/base/_typography.scss +12 -2
- package/dist/scss/components/_header.scss +230 -73
- package/dist/scss/elements/_checkbox-radio.scss +1 -1
- package/dist/scss/elements/_form.scss +3 -0
- package/dist/scss/elements/_list.scss +20 -0
- package/dist/scss/elements/_select.scss +1 -1
- package/package.json +3 -3
|
@@ -32,7 +32,8 @@ strong {
|
|
|
32
32
|
font-weight: map.get(variables.$font-weight, 'medium');
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
a
|
|
35
|
+
a,
|
|
36
|
+
.pkt-link {
|
|
36
37
|
// Order of pseudoclasses is important for specificity:
|
|
37
38
|
// link, visited, hover, focus, active
|
|
38
39
|
// but we don't use visited, so we can skip :link
|
|
@@ -142,7 +143,7 @@ a {
|
|
|
142
143
|
|
|
143
144
|
&--external::after {
|
|
144
145
|
content: ' ';
|
|
145
|
-
--svg: url(https://punkt-cdn.oslo.kommune.no/
|
|
146
|
+
--svg: url(https://punkt-cdn.oslo.kommune.no/6.0/icons/new-window-small.svg);
|
|
146
147
|
background-image: var(--svg);
|
|
147
148
|
background-repeat: no-repeat;
|
|
148
149
|
background-size: 18px 18px;
|
|
@@ -157,6 +158,15 @@ a {
|
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
|
|
161
|
+
button.pkt-link {
|
|
162
|
+
background: none;
|
|
163
|
+
border: none;
|
|
164
|
+
padding: 0;
|
|
165
|
+
font-family: inherit;
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
font-weight: inherit;
|
|
168
|
+
}
|
|
169
|
+
|
|
160
170
|
@at-root [data-mode='dark'] {
|
|
161
171
|
.pkt-link {
|
|
162
172
|
&--external::after {
|
|
@@ -6,120 +6,277 @@
|
|
|
6
6
|
@use '../abstracts/variables';
|
|
7
7
|
@use '../abstracts/mixins/' as *;
|
|
8
8
|
|
|
9
|
-
$-header-height: 56px;
|
|
10
|
-
$-header-height-phablet-up: 60px;
|
|
11
|
-
$-logo-width: calc($-header-height * 60 / 31);
|
|
12
|
-
$-logo-width-phablet-up: calc($-header-height-phablet-up * 60 / 31);
|
|
13
|
-
|
|
14
9
|
.pkt-header {
|
|
15
10
|
background-color: var(--color-white);
|
|
16
11
|
border-bottom: 1px solid var(--color-gray);
|
|
17
|
-
display:
|
|
18
|
-
|
|
19
|
-
grid-template-areas: 'header-logo header-actions';
|
|
20
|
-
grid-template-columns: minmax($-logo-width, $-logo-width-phablet-up) 1fr;
|
|
21
|
-
padding: map.get(variables.$spacing, 'size-16')
|
|
22
|
-
map.get(variables.$spacing, 'size-16');
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: space-between;
|
|
23
14
|
align-items: center;
|
|
15
|
+
padding: 0 map.get(variables.$spacing, 'size-16');
|
|
16
|
+
height: map.get(variables.$spacing, 'size-72');
|
|
17
|
+
|
|
18
|
+
@include bp('tablet-up') {
|
|
19
|
+
height: map.get(variables.$spacing, 'size-88');
|
|
20
|
+
}
|
|
24
21
|
|
|
25
22
|
@include bp('laptop-up') {
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
height: map.get(variables.$spacing, 'size-104');
|
|
24
|
+
padding: 0 map.get(variables.$spacing, 'size-48');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--fixed {
|
|
28
|
+
width: 100vw;
|
|
29
|
+
position: fixed;
|
|
30
|
+
top: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
z-index: 10;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--scroll-to-hide {
|
|
36
|
+
transform: translate3d(0, 0, 0);
|
|
37
|
+
transition: 0.5s transform ease-in-out;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--hidden {
|
|
41
|
+
transform: translate3d(0, -100%, 0);
|
|
28
42
|
}
|
|
29
43
|
|
|
30
44
|
&__logo {
|
|
31
|
-
|
|
45
|
+
flex: 0 1 auto;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: map.get(variables.$spacing, 'size-16');
|
|
49
|
+
margin: 0;
|
|
50
|
+
padding: 0;
|
|
32
51
|
|
|
33
|
-
|
|
34
|
-
|
|
52
|
+
@include bp('laptop-up') {
|
|
53
|
+
gap: map.get(variables.$spacing, 'size-24');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&-link,
|
|
57
|
+
&-service {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
margin: 0;
|
|
60
|
+
padding: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-service {
|
|
64
|
+
padding-top: 0.28rem;
|
|
65
|
+
display: none;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
|
|
70
|
+
@include get-text('pkt-txt-22-light');
|
|
71
|
+
|
|
72
|
+
@include bp('tablet-up') {
|
|
73
|
+
display: inline-block;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include bp('laptop-up') {
|
|
77
|
+
padding-top: 0.45rem;
|
|
78
|
+
@include get-text('pkt-txt-24-light');
|
|
79
|
+
}
|
|
35
80
|
}
|
|
36
81
|
|
|
37
82
|
&-svg {
|
|
38
|
-
height:
|
|
39
|
-
width: calc(
|
|
83
|
+
height: map.get(variables.$spacing, 'size-56');
|
|
84
|
+
width: calc(map.get(variables.$spacing, 'size-56') * 60 / 31);
|
|
40
85
|
|
|
41
|
-
@include bp('
|
|
42
|
-
height:
|
|
43
|
-
width: calc(
|
|
86
|
+
@include bp('laptop-up') {
|
|
87
|
+
height: map.get(variables.$spacing, 'size-64');
|
|
88
|
+
width: calc(map.get(variables.$spacing, 'size-64') * 60 / 31);
|
|
44
89
|
}
|
|
45
90
|
}
|
|
46
91
|
}
|
|
92
|
+
|
|
93
|
+
&--narrow {
|
|
94
|
+
padding: 0 map.get(variables.$spacing, 'size-16');
|
|
95
|
+
height: map.get(variables.$spacing, 'size-72');
|
|
96
|
+
|
|
97
|
+
.pkt-header__logo {
|
|
98
|
+
gap: map.get(variables.$spacing, 'size-16');
|
|
99
|
+
|
|
100
|
+
&-service {
|
|
101
|
+
padding-top: 0.28rem;
|
|
102
|
+
@include get-text('pkt-txt-18-light');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&-svg {
|
|
106
|
+
height: map.get(variables.$spacing, 'size-48');
|
|
107
|
+
width: calc(map.get(variables.$spacing, 'size-48') * 60 / 31);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&__menu-btn {
|
|
113
|
+
@media screen and (min-width: 0) and (max-width: map.get(variables.$breakpoints, 'tablet-big')) {
|
|
114
|
+
border: 0;
|
|
115
|
+
|
|
116
|
+
.pkt-btn__text {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&__user-btn {
|
|
123
|
+
border-color: var(--color-yellow);
|
|
124
|
+
}
|
|
125
|
+
|
|
47
126
|
&__actions {
|
|
48
|
-
|
|
127
|
+
flex: 1 0 auto;
|
|
49
128
|
display: flex;
|
|
50
129
|
justify-content: flex-end;
|
|
51
|
-
align-items:
|
|
130
|
+
align-items: stretch;
|
|
131
|
+
|
|
132
|
+
&-row {
|
|
133
|
+
list-style: none;
|
|
134
|
+
padding-left: 0;
|
|
135
|
+
margin: 0;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
gap: map.get(variables.$spacing, 'size-32');
|
|
139
|
+
|
|
140
|
+
> li {
|
|
141
|
+
padding: 0;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
52
144
|
}
|
|
53
145
|
|
|
54
|
-
&
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
146
|
+
&__dropdown {
|
|
147
|
+
z-index: 2;
|
|
148
|
+
position: absolute;
|
|
149
|
+
right: 0;
|
|
150
|
+
left: 0;
|
|
151
|
+
padding-left: 0;
|
|
152
|
+
margin: 0;
|
|
153
|
+
list-style: none;
|
|
154
|
+
visibility: hidden;
|
|
155
|
+
max-height: calc(100vh - 4.5rem);
|
|
156
|
+
overflow-x: hidden;
|
|
157
|
+
overflow-y: auto;
|
|
59
158
|
|
|
60
|
-
@include bp('
|
|
61
|
-
|
|
62
|
-
|
|
159
|
+
@include bp('tablet-up') {
|
|
160
|
+
left: auto;
|
|
161
|
+
right: 0;
|
|
162
|
+
min-width: 23rem;
|
|
163
|
+
width: auto;
|
|
63
164
|
}
|
|
64
165
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
align-items: center;
|
|
69
|
-
max-width: 3.125rem;
|
|
70
|
-
white-space: nowrap;
|
|
166
|
+
> li {
|
|
167
|
+
padding: map.get(variables.$spacing, 'size-32');
|
|
168
|
+
background-color: var(--color-white);
|
|
71
169
|
|
|
72
|
-
|
|
73
|
-
|
|
170
|
+
&.footer {
|
|
171
|
+
padding-top: map.get(variables.$spacing, 'size-16');
|
|
172
|
+
padding-bottom: map.get(variables.$spacing, 'size-16');
|
|
74
173
|
}
|
|
75
|
-
}
|
|
76
|
-
&-textrow {
|
|
77
|
-
display: inline-flex;
|
|
78
|
-
@include get-text('pkt-txt-18-light');
|
|
79
|
-
max-width: 3.125rem;
|
|
80
174
|
|
|
81
|
-
|
|
82
|
-
|
|
175
|
+
&:nth-child(odd) {
|
|
176
|
+
background-color: var(--color-gray-light);
|
|
83
177
|
}
|
|
84
|
-
|
|
85
|
-
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&__user-fullname {
|
|
182
|
+
display: none;
|
|
183
|
+
|
|
184
|
+
@include bp('laptop-up') {
|
|
185
|
+
display: inline;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&__user-shortname {
|
|
190
|
+
display: inline;
|
|
191
|
+
|
|
192
|
+
@include bp('laptop-up') {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&--has-dropdown {
|
|
198
|
+
@include bp('tablet-up') {
|
|
199
|
+
position: relative;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
> .pkt-btn {
|
|
203
|
+
&:hover .pkt-btn--closed {
|
|
204
|
+
--fg-color: var(--color-white);
|
|
86
205
|
}
|
|
87
206
|
}
|
|
88
|
-
|
|
89
|
-
|
|
207
|
+
|
|
208
|
+
.pkt-btn--open {
|
|
209
|
+
display: none;
|
|
90
210
|
}
|
|
91
211
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
height: 1.5rem;
|
|
95
|
-
line-height: 1rem;
|
|
96
|
-
width: 1.5rem;
|
|
97
|
-
margin-left: map.get(variables.$spacing, 'size-4');
|
|
212
|
+
.pkt-btn--closed {
|
|
213
|
+
display: none;
|
|
98
214
|
|
|
99
|
-
@include bp('
|
|
100
|
-
|
|
101
|
-
margin-left: 0.5rem;
|
|
102
|
-
width: 1.5rem;
|
|
215
|
+
@include bp('laptop-up') {
|
|
216
|
+
display: inline-block;
|
|
103
217
|
}
|
|
104
218
|
}
|
|
219
|
+
|
|
220
|
+
&.pkt-header--open-dropdown {
|
|
221
|
+
> .pkt-btn {
|
|
222
|
+
background-color: var(--color-active);
|
|
223
|
+
border-color: var(--color-active);
|
|
224
|
+
color: var(--color-white);
|
|
225
|
+
|
|
226
|
+
.pkt-btn--open {
|
|
227
|
+
--fg-color: var(--color-white);
|
|
228
|
+
@include bp('laptop-up') {
|
|
229
|
+
display: inline-block;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.pkt-btn--closed {
|
|
234
|
+
display: none;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.pkt-header__dropdown {
|
|
239
|
+
visibility: visible;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.pkt-user-menu {
|
|
246
|
+
p {
|
|
247
|
+
margin: 0;
|
|
248
|
+
}
|
|
249
|
+
&__label {
|
|
250
|
+
color: var(--color-grayscale-60);
|
|
251
|
+
@include get-text('pkt-txt-14-medium');
|
|
105
252
|
}
|
|
106
253
|
|
|
107
|
-
&
|
|
254
|
+
&__name {
|
|
108
255
|
@include get-text('pkt-txt-18-medium');
|
|
109
|
-
|
|
110
|
-
padding: map.get(variables.$spacing, 'size-12')
|
|
111
|
-
map.get(variables.$spacing, 'size-12');
|
|
256
|
+
}
|
|
112
257
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
258
|
+
&__last-logged-in,
|
|
259
|
+
&__org_number {
|
|
260
|
+
@include get-text('pkt-txt-16-light');
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.pkt-list {
|
|
264
|
+
margin: 0;
|
|
265
|
+
.pkt-link {
|
|
266
|
+
text-decoration: none;
|
|
267
|
+
|
|
268
|
+
&:hover {
|
|
269
|
+
text-decoration: underline;
|
|
270
|
+
}
|
|
120
271
|
}
|
|
121
|
-
|
|
122
|
-
|
|
272
|
+
|
|
273
|
+
> li > a {
|
|
274
|
+
grid-template-columns: 1.5rem auto;
|
|
275
|
+
gap: map.get(variables.$spacing, 'size-8');
|
|
123
276
|
}
|
|
124
277
|
}
|
|
278
|
+
|
|
279
|
+
.pkt-list-horizontal {
|
|
280
|
+
margin: 0;
|
|
281
|
+
}
|
|
125
282
|
}
|
|
@@ -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/6.0/icons/check-medium.svg);
|
|
85
85
|
position: relative;
|
|
86
86
|
background-color: blue;
|
|
87
87
|
}
|
|
@@ -38,6 +38,26 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
.pkt-list-horizontal {
|
|
42
|
+
display: flex;
|
|
43
|
+
list-style: none;
|
|
44
|
+
padding: 0;
|
|
45
|
+
li {
|
|
46
|
+
padding-right: map.get(variables.$spacing, 'size-16');
|
|
47
|
+
}
|
|
48
|
+
li + li {
|
|
49
|
+
padding-left: map.get(variables.$spacing, 'size-16');
|
|
50
|
+
}
|
|
51
|
+
li:last-child {
|
|
52
|
+
padding-right: 0;
|
|
53
|
+
}
|
|
54
|
+
&.bordered {
|
|
55
|
+
li + li {
|
|
56
|
+
border-left: 1px solid var(--color-grayscale-60);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
41
61
|
// ==========================================================================
|
|
42
62
|
// Definition lists
|
|
43
63
|
// ==========================================================================
|
|
@@ -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/6.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": "6.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": "^6.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": "2abe615a393680210345b1662767f1fd09f22a9d"
|
|
59
59
|
}
|