@oslokommune/punkt-css 16.26.3 → 17.0.1
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 +110 -0
- package/dist/css/components/accordion.css +27 -5
- package/dist/css/components/accordion.min.css +1 -1
- package/dist/css/components/alert.css +37 -3
- package/dist/css/components/alert.min.css +1 -1
- package/dist/css/components/calendar.css +4 -0
- package/dist/css/components/calendar.min.css +1 -1
- package/dist/css/components/combobox.css +82 -0
- package/dist/css/components/combobox.min.css +1 -1
- package/dist/css/components/datepicker.css +82 -3
- package/dist/css/components/datepicker.min.css +1 -1
- package/dist/css/components/footer.css +232 -108
- package/dist/css/components/footer.min.css +1 -1
- package/dist/css/components/header-global.css +287 -0
- package/dist/css/components/header-global.min.css +1 -0
- package/dist/css/components/header-menu.css +364 -123
- package/dist/css/components/header-menu.min.css +1 -1
- package/dist/css/components/header-service-mobile.css +71 -22
- package/dist/css/components/header-service-mobile.min.css +1 -1
- package/dist/css/components/header-service.css +68 -14
- package/dist/css/components/header-service.min.css +1 -1
- package/dist/css/components/header-shared.css +49 -0
- package/dist/css/components/header-shared.min.css +0 -0
- package/dist/css/components/inputwrapper.css +58 -4
- package/dist/css/components/inputwrapper.min.css +1 -1
- package/dist/css/components/modal.css +0 -5
- package/dist/css/components/modal.min.css +1 -1
- package/dist/css/components/searchinput.css +71 -2
- package/dist/css/components/searchinput.min.css +1 -1
- package/dist/css/components/textarea.css +41 -0
- package/dist/css/components/textarea.min.css +1 -0
- package/dist/css/components/textinput.css +126 -6
- package/dist/css/components/textinput.min.css +1 -1
- package/dist/css/components/timepicker.css +133 -38
- package/dist/css/components/timepicker.min.css +1 -1
- package/dist/css/elements/button.css +20 -4
- package/dist/css/elements/button.min.css +1 -1
- package/dist/css/elements/checkbox-radio.css +3 -3
- package/dist/css/elements/checkbox-radio.min.css +1 -1
- package/dist/css/elements/input.css +121 -6
- package/dist/css/elements/input.min.css +1 -1
- package/dist/css/elements/select.css +137 -9
- package/dist/css/elements/select.min.css +1 -1
- package/dist/css/pkt-base.css +438 -5
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +1595 -342
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-docs.css +2081 -362
- package/dist/css/pkt-docs.min.css +1 -1
- package/dist/css/pkt-elements.css +160 -16
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +2081 -362
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/abstracts/variables/_index.scss +1 -1
- package/dist/scss/abstracts/variables/_spacing.scss +1 -0
- package/dist/scss/base/_typography.scss +5 -5
- package/dist/scss/components/_accordion.scss +7 -11
- package/dist/scss/components/_alert.scss +34 -4
- package/dist/scss/components/_calendar.scss +3 -0
- package/dist/scss/components/_combobox.scss +74 -0
- package/dist/scss/components/_datepicker.scss +75 -8
- package/dist/scss/components/_footer.scss +149 -123
- package/dist/scss/components/_header-global.scss +192 -0
- package/dist/scss/components/_header-menu.scss +30 -31
- package/dist/scss/components/_header-service-mobile.scss +4 -28
- package/dist/scss/components/_header-service.scss +4 -21
- package/dist/scss/components/_header-shared.scss +190 -0
- package/dist/scss/components/_index.scss +2 -0
- package/dist/scss/components/_inputwrapper.scss +62 -6
- package/dist/scss/components/_modal.scss +1 -5
- package/dist/scss/components/_searchinput.scss +58 -2
- package/dist/scss/components/_textarea.scss +48 -0
- package/dist/scss/components/_timepicker.scss +95 -34
- package/dist/scss/elements/_button.scss +12 -3
- package/dist/scss/elements/_input.scss +141 -7
- package/package.json +3 -3
|
@@ -53,7 +53,7 @@ a,
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// visited
|
|
56
|
-
&:visited:not(.pkt-linkcard
|
|
56
|
+
&:visited:not(.pkt-linkcard, .pkt-btn, .pkt-tabs__link):not(:hover) {
|
|
57
57
|
color: inherit;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -135,9 +135,7 @@ a,
|
|
|
135
135
|
align-self: center;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
&--external:hover::after
|
|
139
|
-
&:hover:not(.pkt-btn) pkt-icon,
|
|
140
|
-
&:hover:not(.pkt-btn) .pkt-icon {
|
|
138
|
+
&--external:hover::after {
|
|
141
139
|
// #1f42aa
|
|
142
140
|
filter: brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(2420%) hue-rotate(222deg) brightness(93%)
|
|
143
141
|
contrast(90%);
|
|
@@ -160,7 +158,9 @@ button.pkt-link {
|
|
|
160
158
|
filter: brightness(0) saturate(100%) invert(100%);
|
|
161
159
|
}
|
|
162
160
|
|
|
163
|
-
&--external:hover::after
|
|
161
|
+
&--external:hover::after,
|
|
162
|
+
&:hover:not(.pkt-btn) pkt-icon,
|
|
163
|
+
&:hover:not(.pkt-btn) .pkt-icon {
|
|
164
164
|
// #b3f5ff
|
|
165
165
|
filter: brightness(0) saturate(100%) invert(80%) sepia(54%) saturate(502%) hue-rotate(173deg) brightness(109%)
|
|
166
166
|
contrast(105%);
|
|
@@ -130,8 +130,8 @@ pkt-accordion[compact] {
|
|
|
130
130
|
}
|
|
131
131
|
// Accordion item
|
|
132
132
|
.pkt-accordion-item {
|
|
133
|
-
color: var(--pkt-color-
|
|
134
|
-
background-color: var(--pkt-color-
|
|
133
|
+
color: var(--pkt-color-text-body-default);
|
|
134
|
+
background-color: var(--pkt-color-background-default);
|
|
135
135
|
transition: transform 0.3s;
|
|
136
136
|
appearance: none;
|
|
137
137
|
text-align: left;
|
|
@@ -220,17 +220,13 @@ pkt-accordion[compact] {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
// "plus-minus" skin
|
|
224
|
-
//
|
|
225
|
-
// Minimal-chrome accordion used in dense surfaces like the global mega
|
|
226
|
-
// menu. The chevron is replaced with a plus icon when collapsed and a
|
|
227
|
-
// minus icon when expanded — both icons live in the DOM so the swap is
|
|
228
|
-
// purely CSS, no JS state needed.
|
|
229
223
|
.pkt-accordion--plus-minus,
|
|
230
|
-
pkt-accordion[skin='plus-minus'] {
|
|
224
|
+
pkt-accordion[skin='plus-minus']::part(container) {
|
|
231
225
|
row-gap: 0;
|
|
232
226
|
}
|
|
233
227
|
|
|
228
|
+
.pkt-accordion--plus-minus .pkt-accordion-item,
|
|
229
|
+
pkt-accordion[skin='plus-minus'] .pkt-accordion-item,
|
|
234
230
|
.pkt-accordion-item--plus-minus,
|
|
235
231
|
pkt-accordion-item[skin='plus-minus'] > .pkt-accordion-item {
|
|
236
232
|
background-color: transparent;
|
|
@@ -245,14 +241,14 @@ pkt-accordion-item[skin='plus-minus'] > .pkt-accordion-item {
|
|
|
245
241
|
text-decoration: underline;
|
|
246
242
|
|
|
247
243
|
.pkt-accordion-item__icon {
|
|
248
|
-
transform: none;
|
|
244
|
+
transform: none !important;
|
|
249
245
|
}
|
|
250
246
|
}
|
|
251
247
|
}
|
|
252
248
|
|
|
253
249
|
> .pkt-accordion-item__content {
|
|
254
250
|
padding: map.get(variables.$spacing, 'size-16');
|
|
255
|
-
background-color: var(--pkt-color-
|
|
251
|
+
background-color: var(--pkt-color-background-subtle);
|
|
256
252
|
}
|
|
257
253
|
|
|
258
254
|
.pkt-accordion-item__icon--plus,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
$-module-name: 'pkt-alert';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
$-spacing-6: map.get(variables.$spacing, 'size-6');
|
|
12
12
|
$-spacing-8: map.get(variables.$spacing, 'size-8');
|
|
13
13
|
$-spacing-12: map.get(variables.$spacing, 'size-12');
|
|
14
14
|
$-spacing-16: map.get(variables.$spacing, 'size-16');
|
|
@@ -123,16 +123,21 @@ pkt-alert {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
// 24×24 icon — used for standalone compact alerts and field errors on medium inputs
|
|
127
|
+
.pkt-alert--small,
|
|
126
128
|
.pkt-alert--compact {
|
|
127
|
-
|
|
129
|
+
display: flex;
|
|
130
|
+
min-height: 3rem;
|
|
131
|
+
padding: $-spacing-8 $-spacing-12;
|
|
128
132
|
|
|
129
133
|
.pkt-alert__grid {
|
|
130
134
|
gap: $-spacing-8;
|
|
135
|
+
width: 100%;
|
|
131
136
|
}
|
|
132
137
|
|
|
133
138
|
.pkt-alert__icon {
|
|
134
|
-
width: 1.
|
|
135
|
-
height: 1.
|
|
139
|
+
width: 1.5rem;
|
|
140
|
+
height: 1.5rem;
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
.pkt-alert__title {
|
|
@@ -143,3 +148,28 @@ pkt-alert {
|
|
|
143
148
|
@include get-text('pkt-txt-16-light');
|
|
144
149
|
}
|
|
145
150
|
}
|
|
151
|
+
|
|
152
|
+
// 20×20 icon — used for field errors on small/xsmall inputs
|
|
153
|
+
.pkt-alert--xsmall {
|
|
154
|
+
display: flex;
|
|
155
|
+
min-height: 2.5rem;
|
|
156
|
+
padding: $-spacing-6 $-spacing-12;
|
|
157
|
+
|
|
158
|
+
.pkt-alert__grid {
|
|
159
|
+
gap: $-spacing-6;
|
|
160
|
+
width: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.pkt-alert__icon {
|
|
164
|
+
width: 1.25rem;
|
|
165
|
+
height: 1.25rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.pkt-alert__title {
|
|
169
|
+
@include get-text('pkt-txt-14-medium');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.pkt-alert__text {
|
|
173
|
+
@include get-text('pkt-txt-14-light');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -74,6 +74,32 @@ pkt-combobox,
|
|
|
74
74
|
width: 100%;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
&--small {
|
|
78
|
+
min-height: 2.625rem;
|
|
79
|
+
padding: 0.375rem 2.5rem 0.375rem 0.375rem;
|
|
80
|
+
@include typography.get-text('pkt-txt-16-light');
|
|
81
|
+
|
|
82
|
+
.pkt-combobox__arrow-icon svg {
|
|
83
|
+
width: 1.25rem;
|
|
84
|
+
height: 1.25rem;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&--xsmall {
|
|
89
|
+
min-height: 2.25rem;
|
|
90
|
+
padding: 0.25rem 2.25rem 0.25rem 0.25rem;
|
|
91
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
92
|
+
|
|
93
|
+
.pkt-combobox__arrow-icon {
|
|
94
|
+
padding: 0.25rem 0.5rem;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.pkt-combobox__arrow-icon svg {
|
|
98
|
+
width: 1.125rem;
|
|
99
|
+
height: 1.125rem;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
77
103
|
&:hover:not(&--disabled):not(&--error) {
|
|
78
104
|
border-color: var(--pkt-color-input-border-hover);
|
|
79
105
|
|
|
@@ -207,3 +233,51 @@ pkt-combobox,
|
|
|
207
233
|
.pkt-inputwrapper:not([data-navtype='pointer']) .pkt-combobox__input:focus-within {
|
|
208
234
|
outline: 4px solid var(--pkt-color-border-states-focus);
|
|
209
235
|
}
|
|
236
|
+
|
|
237
|
+
// Dropdown scale follows input wrapper size (small / xsmall combobox fields)
|
|
238
|
+
.pkt-inputwrapper--small,
|
|
239
|
+
.pkt-inputwrapper--xsmall {
|
|
240
|
+
.pkt-listbox {
|
|
241
|
+
.pkt-listbox__option:not(.pkt-listbox__search) {
|
|
242
|
+
padding: map.get(variables.$spacing, 'size-8') map.get(variables.$spacing, 'size-16');
|
|
243
|
+
@include typography.get-text('pkt-txt-16-light');
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.pkt-listbox__empty,
|
|
247
|
+
.pkt-listbox__banner {
|
|
248
|
+
padding: map.get(variables.$spacing, 'size-8') map.get(variables.$spacing, 'size-16');
|
|
249
|
+
@include typography.get-text('pkt-txt-16-light');
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.pkt-listbox__search input {
|
|
253
|
+
padding: map.get(variables.$spacing, 'size-8') map.get(variables.$spacing, 'size-12');
|
|
254
|
+
@include typography.get-text('pkt-txt-16-light');
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.pkt-inputwrapper--xsmall {
|
|
260
|
+
.pkt-listbox {
|
|
261
|
+
.pkt-listbox__option:not(.pkt-listbox__search) {
|
|
262
|
+
padding: map.get(variables.$spacing, 'size-6') map.get(variables.$spacing, 'size-12');
|
|
263
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.pkt-listbox__empty,
|
|
267
|
+
.pkt-listbox__banner {
|
|
268
|
+
padding: map.get(variables.$spacing, 'size-6') map.get(variables.$spacing, 'size-12');
|
|
269
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.pkt-listbox__banner-icon,
|
|
273
|
+
.pkt-listbox__search-icon .pkt-icon {
|
|
274
|
+
width: 1.125rem;
|
|
275
|
+
height: 1.125rem;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.pkt-listbox__search input {
|
|
279
|
+
padding: map.get(variables.$spacing, 'size-6') map.get(variables.$spacing, 'size-8');
|
|
280
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// Primary selectors use CSS classes (framework-agnostic).
|
|
3
|
-
// Element selectors kept for backward compatibility with web components.
|
|
1
|
+
@use '../abstracts/mixins/typography';
|
|
4
2
|
|
|
5
3
|
.pkt-datepicker,
|
|
6
4
|
pkt-datepicker {
|
|
@@ -122,25 +120,94 @@ pkt-datepicker-multiple {
|
|
|
122
120
|
-webkit-appearance: none;
|
|
123
121
|
}
|
|
124
122
|
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
.pkt-datepicker__input.pkt-input--fullwidth.pkt-datepicker--multiple {
|
|
124
|
+
flex: 1;
|
|
125
|
+
min-width: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@mixin datepicker-field-size(
|
|
129
|
+
$segment-min-height,
|
|
130
|
+
$text-style,
|
|
131
|
+
$icon-size,
|
|
132
|
+
$input-width,
|
|
133
|
+
$button-width,
|
|
134
|
+
$line-height: null
|
|
135
|
+
) {
|
|
136
|
+
.pkt-datepicker__inputs {
|
|
137
|
+
.pkt-input,
|
|
138
|
+
.pkt-input-prefix,
|
|
139
|
+
.pkt-input-suffix,
|
|
140
|
+
.pkt-input-icon,
|
|
141
|
+
.pkt-input-separator {
|
|
142
|
+
min-height: $segment-min-height;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.pkt-datepicker__input,
|
|
146
|
+
.pkt-input-prefix,
|
|
147
|
+
.pkt-input-separator {
|
|
148
|
+
@include typography.get-text($text-style);
|
|
149
|
+
|
|
150
|
+
@if $line-height {
|
|
151
|
+
line-height: $line-height;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
button.pkt-input-icon {
|
|
156
|
+
padding-left: 0.5rem;
|
|
157
|
+
padding-right: 0.5rem;
|
|
158
|
+
|
|
159
|
+
pkt-icon,
|
|
160
|
+
.pkt-icon,
|
|
161
|
+
svg {
|
|
162
|
+
width: $icon-size;
|
|
163
|
+
height: $icon-size;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@supports not (-moz-appearance: none) {
|
|
168
|
+
.pkt-datepicker__input:not(.pkt-datepicker--multiple):not(.pkt-input--fullwidth) {
|
|
169
|
+
width: $input-width;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.pkt-datepicker__input:not(.pkt-datepicker--multiple):not(.pkt-datepicker--range) {
|
|
173
|
+
max-width: calc(100% - $button-width);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.pkt-datepicker--small {
|
|
180
|
+
@include datepicker-field-size(2.375rem, 'pkt-txt-16-light', 1.25rem, 7.3rem, 2.5rem);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.pkt-datepicker--xsmall {
|
|
184
|
+
@include datepicker-field-size(2rem, 'pkt-txt-14-light', 1.125rem, 6.5rem, 2rem, $line-height: 1rem);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@supports (-moz-appearance: none) {
|
|
127
188
|
.pkt-datepicker__inputs {
|
|
128
189
|
.pkt-datepicker__input {
|
|
129
190
|
padding-right: 0.5rem;
|
|
130
191
|
}
|
|
131
192
|
.pkt-datepicker__input:not(.pkt-datepicker--multiple) {
|
|
132
|
-
width:
|
|
133
|
-
max-width:
|
|
193
|
+
width: auto;
|
|
194
|
+
max-width: 100%;
|
|
134
195
|
}
|
|
135
196
|
.pkt-datepicker__input.pkt-input--fullwidth:not(.pkt-datepicker--multiple) {
|
|
136
197
|
width: auto;
|
|
137
198
|
flex: 1;
|
|
138
199
|
}
|
|
139
|
-
button.pkt-input-icon {
|
|
200
|
+
.pkt-input__container:has(.pkt-datepicker__input[type='date']) button.pkt-input-icon {
|
|
140
201
|
display: none;
|
|
141
202
|
}
|
|
142
203
|
input.pkt-datepicker__input:has(~ button):not(:has(~ .pkt-input-separator)):not(:has(~ .pkt-input-prefix)) {
|
|
143
204
|
border-right-width: 2px !important;
|
|
144
205
|
}
|
|
206
|
+
|
|
207
|
+
@media screen and (max-width: 30rem) {
|
|
208
|
+
.pkt-input__container .pkt-datepicker__input.pkt-datepicker--range {
|
|
209
|
+
justify-self: start;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
145
212
|
}
|
|
146
213
|
}
|