@oslokommune/punkt-css 18.0.0 → 18.3.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 +18 -0
- package/dist/css/components/calendar.css +2 -2
- package/dist/css/components/calendar.min.css +1 -1
- package/dist/css/components/card.css +3 -3
- package/dist/css/components/card.min.css +1 -1
- package/dist/css/components/fileupload.css +7 -7
- package/dist/css/components/fileupload.min.css +1 -1
- package/dist/css/components/footer.css +1 -1
- package/dist/css/components/footer.min.css +1 -1
- package/dist/css/components/header.css +1 -1
- package/dist/css/components/header.min.css +1 -1
- package/dist/css/components/inputwrapper.css +1 -1
- package/dist/css/components/inputwrapper.min.css +1 -1
- package/dist/css/components/listbox.css +2 -2
- package/dist/css/components/listbox.min.css +1 -1
- package/dist/css/components/loader.css +4 -4
- package/dist/css/components/loader.min.css +1 -1
- package/dist/css/components/modal.css +1 -1
- package/dist/css/components/modal.min.css +1 -1
- package/dist/css/components/progressbar.css +1 -1
- package/dist/css/components/progressbar.min.css +1 -1
- package/dist/css/components/stepper.css +5 -5
- package/dist/css/components/stepper.min.css +1 -1
- package/dist/css/components/tag.css +4 -18
- package/dist/css/components/tag.min.css +1 -1
- package/dist/css/elements/button.css +70 -48
- 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/form.css +4 -4
- package/dist/css/elements/form.min.css +1 -1
- package/dist/css/elements/hr.css +1 -1
- package/dist/css/elements/hr.min.css +1 -1
- package/dist/css/elements/input.css +1 -1
- package/dist/css/elements/input.min.css +1 -1
- package/dist/css/elements/list.css +1 -1
- package/dist/css/elements/list.min.css +1 -1
- package/dist/css/elements/section.css +11 -108
- package/dist/css/elements/section.min.css +1 -1
- package/dist/css/pkt-base.css +708 -75
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +32 -88
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-docs.css +832 -330
- package/dist/css/pkt-docs.min.css +1 -1
- package/dist/css/pkt-elements.css +91 -166
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt-tokens.css +113 -68
- package/dist/css/pkt-tokens.min.css +1 -1
- package/dist/css/pkt-utilities.css +594 -6
- package/dist/css/pkt-utilities.min.css +1 -1
- package/dist/css/pkt.css +831 -329
- package/dist/css/pkt.layer.css +684 -322
- package/dist/css/pkt.layer.min.css +1 -1
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/abstracts/functions/_index.scss +25 -0
- package/dist/scss/abstracts/variables/_colors.scss +155 -68
- package/dist/scss/abstracts/variables/_index.scss +1 -1
- package/dist/scss/base/_colors-tokens.scss +9 -75
- package/dist/scss/components/_calendar.scss +2 -2
- package/dist/scss/components/_card.scss +3 -3
- package/dist/scss/components/_fileupload.scss +8 -7
- package/dist/scss/components/_footer.scss +6 -5
- package/dist/scss/components/_header-service-mobile.scss +3 -2
- package/dist/scss/components/_header-shared.scss +3 -2
- package/dist/scss/components/_header.scss +1 -1
- package/dist/scss/components/_index.scss +0 -1
- package/dist/scss/components/_inputwrapper.scss +1 -1
- package/dist/scss/components/_listbox.scss +4 -2
- package/dist/scss/components/_loader.scss +5 -4
- package/dist/scss/components/_modal.scss +2 -1
- package/dist/scss/components/_progressbar.scss +1 -1
- package/dist/scss/components/_stepper.scss +5 -5
- package/dist/scss/components/_tag.scss +5 -17
- package/dist/scss/elements/_button.scss +71 -67
- package/dist/scss/elements/_form.scss +4 -4
- package/dist/scss/elements/_hr.scss +1 -1
- package/dist/scss/elements/_list.scss +3 -3
- package/dist/scss/elements/_section.scss +12 -40
- package/dist/scss/pkt-docs.scss +3 -1
- package/package.json +2 -2
- package/dist/css/components/badge.css +0 -41
- package/dist/css/components/badge.min.css +0 -1
- package/dist/scss/components/_badge.scss +0 -60
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
@use 'sass:map';
|
|
4
4
|
@use 'sass:string';
|
|
5
|
+
@use '../variables';
|
|
6
|
+
|
|
7
|
+
/// Fargetoken som CSS-variabel, med verdien fra color maps som fallback.
|
|
8
|
+
/// Fallbacken er alltid light mode.
|
|
9
|
+
/// Ukjent tokennavn gjør at bygget kræsjer.
|
|
10
|
+
///
|
|
11
|
+
/// @param {String} $name - navn på semantisk token eller basefarge, uten `--pkt-color-`
|
|
12
|
+
/// @return {String} - `var(--pkt-color-$name, <verdi>)`
|
|
13
|
+
///
|
|
14
|
+
/// @example scss
|
|
15
|
+
/// color: functions.color-token('text-body-default');
|
|
16
|
+
/// // => var(--pkt-color-text-body-default, #2a2859)
|
|
17
|
+
///
|
|
18
|
+
@function color-token($name) {
|
|
19
|
+
$value: map.get(variables.$pkt-semantic-colors, $name);
|
|
20
|
+
|
|
21
|
+
@if $value == null {
|
|
22
|
+
$value: map.get(variables.$pkt-colors, $name);
|
|
23
|
+
}
|
|
24
|
+
@if $value == null {
|
|
25
|
+
@error 'Ukjent fargetoken: #{$name}';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@return var(--pkt-color-#{$name}, #{$value});
|
|
29
|
+
}
|
|
5
30
|
|
|
6
31
|
/// Map deep get
|
|
7
32
|
/// @author Kitty Giraudel
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
1
2
|
@use 'sass:map';
|
|
2
3
|
$pkt-colors: (
|
|
3
4
|
// Blue
|
|
@@ -32,8 +33,16 @@ $pkt-colors: (
|
|
|
32
33
|
|
|
33
34
|
// Neutrals
|
|
34
35
|
brand-neutrals-white: #ffffff,
|
|
35
|
-
brand-neutrals-
|
|
36
|
-
brand-neutrals-
|
|
36
|
+
brand-neutrals-50: #f9f9f9,
|
|
37
|
+
brand-neutrals-100: #f2f2f2,
|
|
38
|
+
brand-neutrals-200: #e6e6e6,
|
|
39
|
+
brand-neutrals-300: #cccccc,
|
|
40
|
+
brand-neutrals-400: #b3b3b3,
|
|
41
|
+
brand-neutrals-500: #9a9a9a,
|
|
42
|
+
brand-neutrals-600: #808080,
|
|
43
|
+
brand-neutrals-700: #666666,
|
|
44
|
+
brand-neutrals-800: #4d4d4d,
|
|
45
|
+
brand-neutrals-900: #333333,
|
|
37
46
|
brand-neutrals-1000: #2c2c2c,
|
|
38
47
|
brand-neutrals-black: #000000,
|
|
39
48
|
brand-neutrals-transparent: transparent,
|
|
@@ -41,91 +50,169 @@ $pkt-colors: (
|
|
|
41
50
|
// Purple
|
|
42
51
|
brand-purple-1000: #e0adff,
|
|
43
52
|
|
|
44
|
-
// Grays
|
|
53
|
+
// Grays — deprecated, bruk brand-neutrals-*
|
|
45
54
|
grays-gray-100: #e6e6e6,
|
|
55
|
+
// brand-neutrals-200
|
|
46
56
|
grays-gray-200: #cccccc,
|
|
57
|
+
// brand-neutrals-300
|
|
47
58
|
grays-gray-300: #b3b3b3,
|
|
59
|
+
// brand-neutrals-400
|
|
48
60
|
grays-gray-400: #9a9a9a,
|
|
61
|
+
// brand-neutrals-500
|
|
49
62
|
grays-gray-500: #808080,
|
|
63
|
+
// brand-neutrals-600
|
|
50
64
|
grays-gray-600: #666666,
|
|
65
|
+
// brand-neutrals-700
|
|
51
66
|
grays-gray-700: #4d4d4d,
|
|
67
|
+
// brand-neutrals-800
|
|
52
68
|
grays-gray-800: #333333,
|
|
69
|
+
// brand-neutrals-900
|
|
53
70
|
grays-gray-900: #1a1a1a,
|
|
54
|
-
|
|
71
|
+
// utgår
|
|
72
|
+
grays-gray-1000: #2c2c2c // brand-neutrals-1000
|
|
55
73
|
) !default;
|
|
56
74
|
|
|
57
|
-
$pkt-
|
|
75
|
+
// Kilden for semantiske farger: (lys, mørk)-par av navn fra $pkt-colors.
|
|
76
|
+
// Mørk verdi er null når tokenet skal være identisk i begge moduser.
|
|
77
|
+
// Legg til nye tokens her, så både lys og mørk blir bestemt samtidig.
|
|
78
|
+
$pkt-semantic-color-modes: (
|
|
58
79
|
// Background
|
|
59
|
-
background-card:
|
|
60
|
-
background-default:
|
|
61
|
-
background-subtle:
|
|
62
|
-
background-transparent:
|
|
80
|
+
background-card: (brand-neutrals-white, brand-neutrals-1000),
|
|
81
|
+
background-default: (brand-neutrals-white, brand-neutrals-1000),
|
|
82
|
+
background-subtle: (brand-neutrals-50, brand-neutrals-900),
|
|
83
|
+
background-transparent: (brand-neutrals-transparent, null),
|
|
63
84
|
// Borders
|
|
64
|
-
border-default:
|
|
65
|
-
border-beige:
|
|
66
|
-
border-blue:
|
|
67
|
-
border-gray:
|
|
68
|
-
border-green:
|
|
69
|
-
border-light-beige:
|
|
70
|
-
border-red:
|
|
71
|
-
border-subtle:
|
|
72
|
-
border-yellow:
|
|
73
|
-
border-states-active:
|
|
74
|
-
border-states-disabled:
|
|
75
|
-
border-states-focus:
|
|
76
|
-
border-states-hover:
|
|
85
|
+
border-default: (brand-dark-blue-1000, brand-neutrals-white),
|
|
86
|
+
border-beige: (brand-dark-beige-1000, null),
|
|
87
|
+
border-blue: (brand-blue-1000, null),
|
|
88
|
+
border-gray: (brand-neutrals-300, null),
|
|
89
|
+
border-green: (brand-green-1000, null),
|
|
90
|
+
border-light-beige: (brand-light-beige-1000, null),
|
|
91
|
+
border-red: (brand-red-1000, null),
|
|
92
|
+
border-subtle: (brand-neutrals-100, brand-neutrals-800),
|
|
93
|
+
border-yellow: (brand-yellow-1000, null),
|
|
94
|
+
border-states-active: (brand-warm-blue-1000, brand-blue-500),
|
|
95
|
+
border-states-disabled: (brand-neutrals-400, brand-neutrals-600),
|
|
96
|
+
border-states-focus: (brand-purple-1000, null),
|
|
97
|
+
border-states-hover: (brand-warm-blue-1000, brand-blue-500),
|
|
77
98
|
// Surface
|
|
78
|
-
surface-default-faded-green:
|
|
79
|
-
surface-default-faded-red:
|
|
80
|
-
surface-default-gray:
|
|
81
|
-
surface-default-light-beige:
|
|
82
|
-
surface-default-light-blue:
|
|
83
|
-
surface-default-light-green:
|
|
84
|
-
surface-default-
|
|
85
|
-
surface-default-
|
|
86
|
-
surface-
|
|
87
|
-
surface-strong-
|
|
88
|
-
surface-strong-
|
|
89
|
-
surface-strong-dark-
|
|
90
|
-
surface-strong-
|
|
91
|
-
surface-strong-
|
|
92
|
-
surface-strong-
|
|
93
|
-
surface-strong-
|
|
94
|
-
surface-strong-
|
|
95
|
-
surface-
|
|
96
|
-
surface-subtle-light-
|
|
97
|
-
surface-subtle-
|
|
98
|
-
surface-subtle-
|
|
99
|
+
surface-default-faded-green: (brand-light-green-400, null),
|
|
100
|
+
surface-default-faded-red: (brand-red-400, null),
|
|
101
|
+
surface-default-gray: (brand-neutrals-100, null),
|
|
102
|
+
surface-default-light-beige: (brand-light-beige-1000, null),
|
|
103
|
+
surface-default-light-blue: (brand-blue-500, null),
|
|
104
|
+
surface-default-light-green: (brand-green-400, null),
|
|
105
|
+
surface-default-pale-blue: (brand-blue-300, null),
|
|
106
|
+
surface-default-red: (brand-red-600, null),
|
|
107
|
+
surface-default-yellow: (brand-yellow-500, null),
|
|
108
|
+
surface-strong-beige: (brand-dark-beige-1000, null),
|
|
109
|
+
surface-strong-blue: (brand-blue-1000, null),
|
|
110
|
+
surface-strong-dark-blue: (brand-dark-blue-1000, null),
|
|
111
|
+
surface-strong-dark-green: (brand-dark-green-1000, null),
|
|
112
|
+
surface-strong-gray: (brand-neutrals-200, null),
|
|
113
|
+
surface-strong-green: (brand-green-1000, null),
|
|
114
|
+
surface-strong-light-green: (brand-light-green-1000, null),
|
|
115
|
+
surface-strong-red: (brand-red-1000, null),
|
|
116
|
+
surface-strong-yellow: (brand-yellow-1000, null),
|
|
117
|
+
surface-subtle-light-blue: (brand-blue-200, null),
|
|
118
|
+
surface-subtle-light-red: (brand-red-100, null),
|
|
119
|
+
surface-subtle-gray: (brand-neutrals-50, null),
|
|
120
|
+
surface-subtle-pale-blue: (brand-blue-100, null),
|
|
121
|
+
surface-subtle-white: (brand-neutrals-white, null),
|
|
99
122
|
// Text
|
|
100
|
-
text-body-dark:
|
|
101
|
-
text-body-default:
|
|
102
|
-
text-body-light:
|
|
103
|
-
text-placeholder:
|
|
104
|
-
text-action-disabled:
|
|
105
|
-
text-action-active:
|
|
106
|
-
text-action-hover:
|
|
107
|
-
text-action-normal:
|
|
123
|
+
text-body-dark: (brand-dark-blue-1000, null),
|
|
124
|
+
text-body-default: (brand-dark-blue-1000, brand-neutrals-white),
|
|
125
|
+
text-body-light: (brand-neutrals-white, null),
|
|
126
|
+
text-placeholder: (brand-neutrals-700, brand-neutrals-400),
|
|
127
|
+
text-action-disabled: (brand-neutrals-700, brand-neutrals-300),
|
|
128
|
+
text-action-active: (brand-warm-blue-1000, brand-blue-500),
|
|
129
|
+
text-action-hover: (brand-warm-blue-1000, brand-blue-500),
|
|
130
|
+
text-action-normal: (brand-dark-blue-1000, brand-neutrals-white),
|
|
108
131
|
// Input (shared)
|
|
109
|
-
input-background-normal:
|
|
110
|
-
input-background-disabled:
|
|
111
|
-
input-
|
|
112
|
-
input-border-
|
|
113
|
-
input-border-
|
|
114
|
-
input-border-
|
|
115
|
-
input-border-
|
|
116
|
-
input-
|
|
117
|
-
input-text-
|
|
118
|
-
input-text-
|
|
119
|
-
input-text-
|
|
120
|
-
input-text-
|
|
121
|
-
input-text-
|
|
132
|
+
input-background-normal: (brand-neutrals-white, null),
|
|
133
|
+
input-background-disabled: (brand-neutrals-50, null),
|
|
134
|
+
input-background-open: (brand-warm-blue-1000, brand-blue-500),
|
|
135
|
+
input-border-active: (brand-warm-blue-1000, brand-blue-500),
|
|
136
|
+
input-border-disabled: (brand-neutrals-400, brand-neutrals-300),
|
|
137
|
+
input-border-error: (brand-red-1000, null),
|
|
138
|
+
input-border-hover: (brand-warm-blue-1000, brand-blue-500),
|
|
139
|
+
input-border-normal: (brand-dark-blue-1000, brand-neutrals-white),
|
|
140
|
+
input-text-active: (brand-warm-blue-1000, null),
|
|
141
|
+
input-text-disabled: (brand-neutrals-700, null),
|
|
142
|
+
input-text-hover: (brand-warm-blue-1000, null),
|
|
143
|
+
input-text-normal: (brand-dark-blue-1000, null),
|
|
144
|
+
input-text-error: (brand-red-1000, null),
|
|
145
|
+
input-text-open: (brand-neutrals-white, brand-dark-blue-1000),
|
|
146
|
+
// Tag
|
|
147
|
+
tag-text-normal: (brand-dark-blue-1000, null),
|
|
148
|
+
tag-text-hover: (brand-warm-blue-1000, brand-dark-blue-1000),
|
|
149
|
+
tag-text-active: (brand-warm-blue-1000, brand-dark-blue-1000),
|
|
150
|
+
tag-text-focus: (brand-warm-blue-1000, brand-dark-blue-1000),
|
|
122
151
|
// Input - Checkbox/Radio specific
|
|
123
|
-
input-check-background:
|
|
124
|
-
input-check-border:
|
|
125
|
-
input-check-text-active:
|
|
126
|
-
input-check-text-hover:
|
|
152
|
+
input-check-background: (brand-neutrals-white, brand-dark-blue-1000),
|
|
153
|
+
input-check-border: (brand-dark-blue-1000, brand-neutrals-white),
|
|
154
|
+
input-check-text-active: (brand-warm-blue-1000, brand-blue-500),
|
|
155
|
+
input-check-text-hover: (brand-warm-blue-1000, brand-blue-500),
|
|
156
|
+
// Button — fra Figma. Skinn-varianter i elements/_button.scss.
|
|
157
|
+
button-primary-background-normal: (brand-dark-blue-1000, brand-blue-500),
|
|
158
|
+
button-primary-background-hover: (brand-warm-blue-1000, brand-blue-1000),
|
|
159
|
+
button-primary-background-focus: (brand-warm-blue-1000, brand-blue-1000),
|
|
160
|
+
button-primary-background-active: (brand-warm-blue-1000, brand-blue-1000),
|
|
161
|
+
button-primary-background-disabled: (brand-neutrals-50, brand-neutrals-800),
|
|
162
|
+
button-primary-background-success: (brand-green-1000, null),
|
|
163
|
+
button-primary-background-danger: (brand-red-1000, null),
|
|
164
|
+
button-primary-border-focus: (brand-warm-blue-1000, brand-blue-1000),
|
|
165
|
+
button-primary-text-normal: (brand-neutrals-white, brand-dark-blue-1000),
|
|
166
|
+
button-primary-text-hover: (brand-neutrals-white, brand-dark-blue-1000),
|
|
167
|
+
button-primary-text-focus: (brand-neutrals-white, brand-dark-blue-1000),
|
|
168
|
+
button-primary-text-active: (brand-neutrals-white, brand-dark-blue-1000),
|
|
169
|
+
button-primary-text-disabled: (brand-neutrals-700, brand-neutrals-400),
|
|
170
|
+
button-secondary-background-hover: (brand-warm-blue-1000, brand-blue-500),
|
|
171
|
+
button-secondary-background-active: (brand-warm-blue-1000, brand-blue-500),
|
|
172
|
+
button-secondary-background-disabled: (brand-neutrals-50, brand-neutrals-800),
|
|
173
|
+
button-secondary-border-normal: (brand-dark-blue-1000, brand-neutrals-white),
|
|
174
|
+
button-secondary-border-yellow: (brand-yellow-1000, null),
|
|
175
|
+
button-secondary-border-focus: (brand-warm-blue-1000, brand-blue-500),
|
|
176
|
+
button-secondary-text-normal: (brand-dark-blue-1000, brand-neutrals-white),
|
|
177
|
+
button-secondary-text-hover: (brand-neutrals-white, brand-dark-blue-1000),
|
|
178
|
+
button-secondary-text-focus: (brand-warm-blue-1000, brand-blue-500),
|
|
179
|
+
button-secondary-text-active: (brand-neutrals-white, brand-dark-blue-1000),
|
|
180
|
+
button-secondary-text-disabled: (brand-neutrals-700, brand-neutrals-400),
|
|
181
|
+
button-tertiary-background-hover: (brand-neutrals-100, brand-dark-blue-700),
|
|
182
|
+
button-tertiary-background-focus: (brand-neutrals-100, brand-dark-blue-700),
|
|
183
|
+
button-tertiary-background-active: (brand-warm-blue-1000, brand-dark-blue-700),
|
|
184
|
+
button-tertiary-background-disabled: (brand-neutrals-50, brand-neutrals-800),
|
|
185
|
+
button-tertiary-border-focus: (brand-warm-blue-1000, brand-neutrals-transparent),
|
|
186
|
+
button-tertiary-text-normal: (brand-dark-blue-1000, brand-neutrals-white),
|
|
187
|
+
button-tertiary-text-hover: (brand-warm-blue-1000, brand-neutrals-white),
|
|
188
|
+
button-tertiary-text-focus: (brand-warm-blue-1000, brand-neutrals-white),
|
|
189
|
+
button-tertiary-text-active: (brand-neutrals-white, null),
|
|
190
|
+
button-tertiary-text-disabled: (brand-neutrals-700, brand-neutrals-400)
|
|
127
191
|
) !default;
|
|
128
192
|
|
|
193
|
+
// token -> farge, ett map per mode. Begge kommer fra $pkt-semantic-color-modes
|
|
194
|
+
// og inneholder alle tokens. Der dark-mode verdi er null i kilden står light-mode
|
|
195
|
+
// dark-mode sitt map, slik at oppslag alltid gir en farge.
|
|
196
|
+
// Begge kan overstyres med @use ... with (...) slik som før.
|
|
197
|
+
$-light-colors: ();
|
|
198
|
+
$-dark-colors: ();
|
|
199
|
+
|
|
200
|
+
@each $-name, $-pair in $pkt-semantic-color-modes {
|
|
201
|
+
$-light: map.get($pkt-colors, list.nth($-pair, 1));
|
|
202
|
+
$-dark-ref: list.nth($-pair, 2);
|
|
203
|
+
$-dark: $-light;
|
|
204
|
+
|
|
205
|
+
@if $-dark-ref != null {
|
|
206
|
+
$-dark: map.get($pkt-colors, $-dark-ref);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
$-light-colors: map.set($-light-colors, $-name, $-light);
|
|
210
|
+
$-dark-colors: map.set($-dark-colors, $-name, $-dark);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
$pkt-semantic-colors: $-light-colors !default;
|
|
214
|
+
$pkt-semantic-colors-dark: $-dark-colors !default;
|
|
215
|
+
|
|
129
216
|
// Deprecated colors
|
|
130
217
|
$colors: (
|
|
131
218
|
// brand
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/*
|
|
2
2
|
* Colors
|
|
3
3
|
* Brand
|
|
4
4
|
* Light mode
|
|
5
5
|
* Dark mode
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
@use 'sass:map';
|
|
8
9
|
@use '../abstracts/variables';
|
|
9
10
|
|
|
10
11
|
:root {
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
--pkt-color-#{$name}: #{$color};
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
// Semantic
|
|
21
|
+
// Semantic — lys modus
|
|
21
22
|
@each $name, $color in variables.$pkt-semantic-colors {
|
|
22
23
|
--pkt-color-#{$name}: #{$color};
|
|
23
24
|
}
|
|
@@ -27,80 +28,13 @@
|
|
|
27
28
|
--#{$name}: #{$color};
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
//
|
|
31
|
+
// Semantic — dark mode. Kun tokens som faktisk skiller seg fra light mode
|
|
31
32
|
&[data-mode='dark'],
|
|
32
33
|
[data-mode='dark'] {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// Borders
|
|
40
|
-
--pkt-color-border-default: var(--pkt-color-brand-neutrals-white);
|
|
41
|
-
--pkt-color-border-beige: var(--pkt-color-brand-dark-beige-1000);
|
|
42
|
-
--pkt-color-border-blue: var(--pkt-color-brand-blue-1000);
|
|
43
|
-
--pkt-color-border-green: var(--pkt-color-brand-green-1000);
|
|
44
|
-
--pkt-color-border-light-beige: var(--pkt-color-brand-light-beige-1000);
|
|
45
|
-
--pkt-color-border-red: var(--pkt-color-brand-red-1000);
|
|
46
|
-
--pkt-color-border-subtle: var(--pkt-color-brand-dark-blue-700);
|
|
47
|
-
--pkt-color-border-yellow: var(--pkt-color-brand-yellow-1000);
|
|
48
|
-
--pkt-color-border-states-active: var(--pkt-color-brand-blue-500);
|
|
49
|
-
--pkt-color-border-states-disabled: var(--pkt-color-grays-gray-500);
|
|
50
|
-
--pkt-color-border-states-focus: var(--pkt-color-brand-purple-1000);
|
|
51
|
-
--pkt-color-border-states-hover: var(--pkt-color-brand-blue-500);
|
|
52
|
-
|
|
53
|
-
// Surface
|
|
54
|
-
--pkt-color-surface-default-faded-green: var(--pkt-color-brand-light-green-400);
|
|
55
|
-
--pkt-color-surface-default-faded-red: var(--pkt-color-brand-red-400);
|
|
56
|
-
--pkt-color-surface-default-gray: var(--pkt-color-brand-neutrals-100);
|
|
57
|
-
--pkt-color-surface-default-light-beige: var(--pkt-color-brand-light-beige-1000);
|
|
58
|
-
--pkt-color-surface-default-light-blue: var(--pkt-color-brand-blue-300);
|
|
59
|
-
--pkt-color-surface-default-light-green: var(--pkt-color-brand-green-400);
|
|
60
|
-
--pkt-color-surface-default-red: var(--pkt-color-brand-red-600);
|
|
61
|
-
--pkt-color-surface-default-yellow: var(--pkt-color-brand-yellow-500);
|
|
62
|
-
--pkt-color-surface-strong-beige: var(--pkt-color-brand-dark-beige-1000);
|
|
63
|
-
--pkt-color-surface-strong-blue: var(--pkt-color-brand-blue-1000);
|
|
64
|
-
--pkt-color-surface-strong-dark-blue: var(--pkt-color-brand-dark-blue-1000);
|
|
65
|
-
--pkt-color-surface-strong-dark-green: var(--pkt-color-brand-dark-green-1000);
|
|
66
|
-
--pkt-color-surface-strong-gray: var(--pkt-color-brand-neutrals-200);
|
|
67
|
-
--pkt-color-surface-strong-green: var(--pkt-color-brand-green-1000);
|
|
68
|
-
--pkt-color-surface-strong-light-green: var(--pkt-color-brand-light-green-1000);
|
|
69
|
-
--pkt-color-surface-strong-red: var(--pkt-color-brand-red-1000);
|
|
70
|
-
--pkt-color-surface-strong-yellow: var(--pkt-color-brand-yellow-1000);
|
|
71
|
-
--pkt-color-surface-subtle-light-blue: var(--pkt-color-brand-blue-200);
|
|
72
|
-
--pkt-color-surface-subtle-light-red: var(--pkt-color-brand-red-100);
|
|
73
|
-
--pkt-color-surface-subtle-pale-blue: var(--pkt-color-brand-blue-100);
|
|
74
|
-
--pkt-color-surface-subtle-white: var(--pkt-color-brand-neutrals-white);
|
|
75
|
-
|
|
76
|
-
// Text
|
|
77
|
-
--pkt-color-text-body-dark: var(--pkt-color-brand-dark-blue-1000);
|
|
78
|
-
--pkt-color-text-body-default: var(--pkt-color-brand-neutrals-white);
|
|
79
|
-
--pkt-color-text-body-light: var(--pkt-color-brand-neutrals-white);
|
|
80
|
-
--pkt-color-text-placeholder: var(--pkt-color-grays-gray-300);
|
|
81
|
-
--pkt-color-text-action-disabled: var(--pkt-color-grays-gray-200);
|
|
82
|
-
--pkt-color-text-action-active: var(--pkt-color-brand-blue-500);
|
|
83
|
-
--pkt-color-text-action-hover: var(--pkt-color-brand-blue-500);
|
|
84
|
-
--pkt-color-text-action-normal: var(--pkt-color-brand-neutrals-white);
|
|
85
|
-
|
|
86
|
-
// Input (shared)
|
|
87
|
-
--pkt-color-input-background-normal: var(--pkt-color-brand-neutrals-white);
|
|
88
|
-
--pkt-color-input-border-active: var(--pkt-color-brand-blue-500);
|
|
89
|
-
--pkt-color-input-border-disabled: var(--pkt-color-grays-gray-200);
|
|
90
|
-
--pkt-color-input-border-error: var(--pkt-color-brand-red-1000);
|
|
91
|
-
--pkt-color-input-border-hover: var(--pkt-color-brand-blue-500);
|
|
92
|
-
--pkt-color-input-border-normal: var(--pkt-color-brand-neutrals-white);
|
|
93
|
-
--pkt-color-input-text-active: var(--pkt-color-brand-warm-blue-1000);
|
|
94
|
-
--pkt-color-input-text-disabled: var(--pkt-color-grays-gray-200);
|
|
95
|
-
--pkt-color-input-text-hover: var(--pkt-color-brand-warm-blue-1000);
|
|
96
|
-
--pkt-color-input-text-normal: var(--pkt-color-brand-dark-blue-1000);
|
|
97
|
-
--pkt-color-input-text-error: var(--pkt-color-brand-red-1000);
|
|
98
|
-
--pkt-color-input-text-open: var(--pkt-color-brand-dark-blue-1000);
|
|
99
|
-
|
|
100
|
-
// Input - Checkbox/Radio specific
|
|
101
|
-
--pkt-color-input-check-background: var(--pkt-color-brand-dark-blue-1000);
|
|
102
|
-
--pkt-color-input-check-border: var(--pkt-color-brand-neutrals-white);
|
|
103
|
-
--pkt-color-input-check-text-active: var(--pkt-color-brand-blue-500);
|
|
104
|
-
--pkt-color-input-check-text-hover: var(--pkt-color-brand-blue-500);
|
|
34
|
+
@each $name, $color in variables.$pkt-semantic-colors-dark {
|
|
35
|
+
@if $color != map.get(variables.$pkt-semantic-colors, $name) {
|
|
36
|
+
--pkt-color-#{$name}: #{$color};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
105
39
|
}
|
|
106
40
|
}
|
|
@@ -94,7 +94,7 @@ pkt-calendar {
|
|
|
94
94
|
.pkt-cal-other,
|
|
95
95
|
.pkt-cal-days [data-disabled] {
|
|
96
96
|
cursor: not-allowed;
|
|
97
|
-
color: var(--pkt-color-
|
|
97
|
+
color: var(--pkt-color-brand-neutrals-300);
|
|
98
98
|
background: transparent;
|
|
99
99
|
border: none;
|
|
100
100
|
}
|
|
@@ -144,7 +144,7 @@ pkt-calendar {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
.pkt-cal-excluded {
|
|
147
|
-
background-color: var(--pkt-color-brand-neutrals-
|
|
147
|
+
background-color: var(--pkt-color-brand-neutrals-50);
|
|
148
148
|
:before,
|
|
149
149
|
:after {
|
|
150
150
|
background-color: transparent;
|
|
@@ -235,7 +235,7 @@ pkt-card {
|
|
|
235
235
|
|
|
236
236
|
&.pkt-card--horizontal {
|
|
237
237
|
&.pkt-card--gray {
|
|
238
|
-
background-color: var(--pkt-color-brand-neutrals-
|
|
238
|
+
background-color: var(--pkt-color-brand-neutrals-50);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
&.pkt-card--blue {
|
|
@@ -261,7 +261,7 @@ pkt-card {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
&--outlined {
|
|
264
|
-
outline: 2px solid var(--pkt-color-
|
|
264
|
+
outline: 2px solid var(--pkt-color-brand-neutrals-200);
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
&--outlined-beige {
|
|
@@ -269,7 +269,7 @@ pkt-card {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
&--gray {
|
|
272
|
-
background-color: var(--pkt-color-brand-neutrals-
|
|
272
|
+
background-color: var(--pkt-color-brand-neutrals-50);
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
&--blue {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use '../abstracts/functions';
|
|
1
2
|
@use 'sass:map';
|
|
2
3
|
@use '../abstracts/variables';
|
|
3
4
|
@use '../abstracts/mixins/breakpoints' as *;
|
|
@@ -48,7 +49,7 @@ pkt-fileupload {
|
|
|
48
49
|
|
|
49
50
|
&--error {
|
|
50
51
|
.pkt-fileupload__drop-zone {
|
|
51
|
-
border-color:
|
|
52
|
+
border-color: functions.color-token('input-border-error');
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
.pkt-alert--error.pkt-fileupload__error-alert {
|
|
@@ -297,7 +298,7 @@ pkt-fileupload {
|
|
|
297
298
|
grid-row: 1;
|
|
298
299
|
align-self: center;
|
|
299
300
|
justify-self: center;
|
|
300
|
-
color:
|
|
301
|
+
color: functions.color-token('text-placeholder');
|
|
301
302
|
}
|
|
302
303
|
|
|
303
304
|
&__title {
|
|
@@ -465,7 +466,7 @@ pkt-fileupload {
|
|
|
465
466
|
@include typography.get-text('pkt-txt-12-medium');
|
|
466
467
|
display: block;
|
|
467
468
|
margin-block-start: 0.25rem;
|
|
468
|
-
color:
|
|
469
|
+
color: functions.color-token('text-placeholder');
|
|
469
470
|
}
|
|
470
471
|
|
|
471
472
|
&__actions {
|
|
@@ -483,7 +484,7 @@ pkt-fileupload {
|
|
|
483
484
|
border: none;
|
|
484
485
|
padding: 0;
|
|
485
486
|
cursor: pointer;
|
|
486
|
-
color:
|
|
487
|
+
color: functions.color-token('text-placeholder');
|
|
487
488
|
display: flex;
|
|
488
489
|
align-items: center;
|
|
489
490
|
justify-content: center;
|
|
@@ -623,7 +624,7 @@ pkt-fileupload {
|
|
|
623
624
|
@include typography.get-text('pkt-txt-12');
|
|
624
625
|
grid-column: 2;
|
|
625
626
|
grid-row: 2;
|
|
626
|
-
color:
|
|
627
|
+
color: functions.color-token('text-body-default');
|
|
627
628
|
}
|
|
628
629
|
|
|
629
630
|
// Override progress bar wrapper styles
|
|
@@ -838,7 +839,7 @@ pkt-modal.pkt-fileupload__image-preview-modal .pkt-modal {
|
|
|
838
839
|
.pkt-modal__content {
|
|
839
840
|
padding: 0 map.get(variables.$spacing, 'size-16') map.get(variables.$spacing, 'size-16');
|
|
840
841
|
// Strip scroll-hint gradients from `_modal.scss` so the image and counter stay clear.
|
|
841
|
-
background:
|
|
842
|
+
background: functions.color-token('background-default');
|
|
842
843
|
background-image: none;
|
|
843
844
|
box-shadow: none;
|
|
844
845
|
// Rejoin the modal flex/grid chain: visible overflow lets intrinsic image height ignore the viewport cap.
|
|
@@ -875,7 +876,7 @@ pkt-modal.pkt-fileupload__image-preview-modal .pkt-modal {
|
|
|
875
876
|
|
|
876
877
|
.pkt-fileupload__image-preview {
|
|
877
878
|
position: relative;
|
|
878
|
-
background-color:
|
|
879
|
+
background-color: functions.color-token('background-default');
|
|
879
880
|
display: grid;
|
|
880
881
|
grid-template-columns: auto 1fr auto;
|
|
881
882
|
// First row takes remaining space but may shrink (tall portraits); second row keeps the counter on-screen.
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* --pkt-footer-link-hover hover-farge på lenker (default: text-action-active)
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
@use '../abstracts/functions';
|
|
9
10
|
@use 'sass:map';
|
|
10
11
|
@use '../abstracts/variables';
|
|
11
12
|
@use '../abstracts/mixins/container-queries' as *;
|
|
@@ -23,8 +24,8 @@ $-footer-content-max-width: 75rem;
|
|
|
23
24
|
|
|
24
25
|
.pkt-footer {
|
|
25
26
|
&__band {
|
|
26
|
-
background-color: var(--pkt-footer-bg,
|
|
27
|
-
color: var(--pkt-footer-fg,
|
|
27
|
+
background-color: var(--pkt-footer-bg, #{functions.color-token('background-subtle')});
|
|
28
|
+
color: var(--pkt-footer-fg, #{functions.color-token('text-body-default')});
|
|
28
29
|
|
|
29
30
|
@include typography.get-text('pkt-txt-16-light');
|
|
30
31
|
|
|
@@ -33,9 +34,9 @@ $-footer-content-max-width: 75rem;
|
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
&--global {
|
|
36
|
-
--pkt-footer-bg:
|
|
37
|
-
--pkt-footer-fg:
|
|
38
|
-
--pkt-footer-link-hover:
|
|
37
|
+
--pkt-footer-bg: #{functions.color-token('surface-strong-dark-blue')};
|
|
38
|
+
--pkt-footer-fg: #{functions.color-token('text-body-light')};
|
|
39
|
+
--pkt-footer-link-hover: #{functions.color-token('brand-blue-1000')};
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
a {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use '../abstracts/functions';
|
|
1
2
|
@use 'sass:map';
|
|
2
3
|
@use '../abstracts/variables';
|
|
3
4
|
@use '../abstracts/mixins/breakpoints' as *;
|
|
@@ -105,8 +106,8 @@
|
|
|
105
106
|
&__mobile-menu.is-open {
|
|
106
107
|
background-color: var(--pkt-color-background-default);
|
|
107
108
|
z-index: 100;
|
|
108
|
-
border-top: 1px solid
|
|
109
|
-
border-bottom: 1px solid
|
|
109
|
+
border-top: 1px solid #{functions.color-token('border-subtle')};
|
|
110
|
+
border-bottom: 1px solid #{functions.color-token('border-subtle')};
|
|
110
111
|
|
|
111
112
|
&::after {
|
|
112
113
|
content: '';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* is not `@forward`ed from the component index.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
@use '../abstracts/functions';
|
|
12
13
|
@use 'sass:map';
|
|
13
14
|
@use '../abstracts/variables';
|
|
14
15
|
|
|
@@ -174,8 +175,8 @@
|
|
|
174
175
|
width: 100%;
|
|
175
176
|
max-width: 100%;
|
|
176
177
|
border: none;
|
|
177
|
-
border-top: 1px solid
|
|
178
|
-
border-bottom: 1px solid
|
|
178
|
+
border-top: 1px solid #{functions.color-token('border-subtle')};
|
|
179
|
+
border-bottom: 1px solid #{functions.color-token('border-subtle')};
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
&:not(button) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use '../abstracts/functions';
|
|
2
|
+
|
|
1
3
|
$listbox-padding: 0.75rem;
|
|
2
4
|
|
|
3
5
|
pkt-listbox {
|
|
@@ -93,7 +95,7 @@ pkt-listbox {
|
|
|
93
95
|
|
|
94
96
|
&[data-disabled] {
|
|
95
97
|
cursor: not-allowed;
|
|
96
|
-
color: var(--pkt-color-
|
|
98
|
+
color: var(--pkt-color-brand-neutrals-600);
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
|
|
@@ -114,7 +116,7 @@ pkt-listbox {
|
|
|
114
116
|
|
|
115
117
|
.pkt-listbox__empty {
|
|
116
118
|
padding: $listbox-padding;
|
|
117
|
-
color:
|
|
119
|
+
color: functions.color-token('text-placeholder');
|
|
118
120
|
list-style: none;
|
|
119
121
|
}
|
|
120
122
|
|