@navikt/ds-tokens 7.22.0 → 7.23.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/dist/darkside/tokens-cjs.js +11 -11
- package/dist/darkside/tokens.css +825 -825
- package/dist/darkside/tokens.d.ts +11 -11
- package/dist/darkside/tokens.js +11 -11
- package/dist/darkside/tokens.less +11 -11
- package/dist/darkside/tokens.scss +11 -11
- package/dist/tokens-cjs.js +336 -331
- package/dist/tokens.css +329 -329
- package/dist/tokens.d.ts +331 -331
- package/dist/tokens.js +12 -6
- package/internal-types.ts +88 -0
- package/package.json +3 -2
- package/token_docs.js +40 -45
- package/types.ts +133 -124
package/types.ts
CHANGED
|
@@ -1,98 +1,124 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
| "300A"
|
|
35
|
-
| "400A";
|
|
36
|
-
|
|
37
|
-
export type GlobalColorKeys =
|
|
38
|
-
| `${Extract<GlobalColorRoles, "neutral">}-${Extract<
|
|
39
|
-
GlobalColorScale,
|
|
40
|
-
"000"
|
|
41
|
-
>}`
|
|
42
|
-
| `${GlobalColorRoles}-${Exclude<GlobalColorScale, "000">}`;
|
|
43
|
-
|
|
44
|
-
/* Semantic tokens */
|
|
45
|
-
|
|
46
|
-
export type StaticDefaultBgKeys =
|
|
1
|
+
/* --------------------------------- Themes --------------------------------- */
|
|
2
|
+
type AkselColorTheme = "light" | "dark";
|
|
3
|
+
|
|
4
|
+
/* ------------------------------ Main colors ----------------------------- */
|
|
5
|
+
type AkselMainColorRole = "neutral" | "accent";
|
|
6
|
+
|
|
7
|
+
/* ------------------------------ Status colors ----------------------------- */
|
|
8
|
+
type AkselStatusColorRole = "info" | "success" | "warning" | "danger";
|
|
9
|
+
|
|
10
|
+
/* ------------------------------ Brand colors ------------------------------ */
|
|
11
|
+
type AkselBrandColorRole = "brand-magenta" | "brand-beige" | "brand-blue";
|
|
12
|
+
|
|
13
|
+
/* ------------------------------ Meta colors ------------------------------ */
|
|
14
|
+
type AkselMetaColorRole = "meta-purple" | "meta-lime";
|
|
15
|
+
|
|
16
|
+
/* ------------------------------- All colors ------------------------------- */
|
|
17
|
+
type AkselColorRole =
|
|
18
|
+
| AkselMainColorRole
|
|
19
|
+
| AkselStatusColorRole
|
|
20
|
+
| AkselBrandColorRole
|
|
21
|
+
| AkselMetaColorRole;
|
|
22
|
+
|
|
23
|
+
export type {
|
|
24
|
+
AkselColorTheme,
|
|
25
|
+
AkselColorRole,
|
|
26
|
+
AkselMainColorRole,
|
|
27
|
+
AkselStatusColorRole,
|
|
28
|
+
AkselBrandColorRole,
|
|
29
|
+
AkselMetaColorRole,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/* --------------------------- Backgrounds tokens --------------------------- */
|
|
33
|
+
type AkselRootBackgroundToken =
|
|
47
34
|
| "default"
|
|
48
35
|
| "input"
|
|
49
36
|
| "raised"
|
|
50
37
|
| "sunken"
|
|
51
38
|
| "overlay";
|
|
52
39
|
|
|
53
|
-
|
|
54
|
-
| `${
|
|
55
|
-
| `${
|
|
56
|
-
| `${
|
|
57
|
-
| `${
|
|
58
|
-
| `${
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
| `${
|
|
62
|
-
| `${
|
|
63
|
-
| `${
|
|
64
|
-
| `${
|
|
65
|
-
| `${
|
|
66
|
-
| `${
|
|
67
|
-
|
|
68
|
-
export type
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
|
80
|
-
| `${
|
|
81
|
-
| `${
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
40
|
+
type AkselColoredStatelessBackgroundToken =
|
|
41
|
+
| `${AkselColorRole}-soft`
|
|
42
|
+
| `${AkselColorRole}-softA`
|
|
43
|
+
| `${AkselColorRole}-moderate`
|
|
44
|
+
| `${AkselColorRole}-moderateA`
|
|
45
|
+
| `${AkselColorRole}-strong`;
|
|
46
|
+
|
|
47
|
+
type AkselColoredStatefulBackgroundToken =
|
|
48
|
+
| `${AkselColorRole}-moderate-hover`
|
|
49
|
+
| `${AkselColorRole}-moderate-hoverA`
|
|
50
|
+
| `${AkselColorRole}-moderate-pressed`
|
|
51
|
+
| `${AkselColorRole}-moderate-pressedA`
|
|
52
|
+
| `${AkselColorRole}-strong-hover`
|
|
53
|
+
| `${AkselColorRole}-strong-pressed`;
|
|
54
|
+
|
|
55
|
+
export type {
|
|
56
|
+
AkselRootBackgroundToken,
|
|
57
|
+
AkselColoredStatelessBackgroundToken,
|
|
58
|
+
AkselColoredStatefulBackgroundToken,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/* ------------------------------- Text tokens ------------------------------ */
|
|
62
|
+
type AkselRootTextToken = "logo";
|
|
63
|
+
|
|
64
|
+
type AkselColoredTextToken =
|
|
65
|
+
| AkselColoredStatefulBackgroundToken
|
|
66
|
+
| `${AkselColoredStatefulBackgroundToken}-subtle`
|
|
67
|
+
| `${AkselColoredStatefulBackgroundToken}-decoration`
|
|
68
|
+
| `${AkselColoredStatefulBackgroundToken}-contrast`;
|
|
69
|
+
|
|
70
|
+
export type { AkselRootTextToken, AkselColoredTextToken };
|
|
71
|
+
|
|
72
|
+
/* ------------------------------ Border tokens ----------------------------- */
|
|
73
|
+
type AkselRootBorderToken = "focus";
|
|
74
|
+
|
|
75
|
+
type AkselColoredBorderToken =
|
|
76
|
+
| AkselColorRole
|
|
77
|
+
| `${AkselColorRole}-subtle`
|
|
78
|
+
| `${AkselColorRole}-subtleA`
|
|
79
|
+
| `${AkselColorRole}-strong`;
|
|
80
|
+
|
|
81
|
+
export type { AkselRootBorderToken, AkselColoredBorderToken };
|
|
82
|
+
|
|
83
|
+
/* ------------------------------ Space tokens ------------------------------ */
|
|
84
|
+
type AkselSpaceToken =
|
|
85
|
+
| "space-0"
|
|
86
|
+
| "space-1"
|
|
87
|
+
| "space-2"
|
|
88
|
+
| "space-4"
|
|
89
|
+
| "space-6"
|
|
90
|
+
| "space-8"
|
|
91
|
+
| "space-12"
|
|
92
|
+
| "space-16"
|
|
93
|
+
| "space-20"
|
|
94
|
+
| "space-24"
|
|
95
|
+
| "space-28"
|
|
96
|
+
| "space-32"
|
|
97
|
+
| "space-36"
|
|
98
|
+
| "space-40"
|
|
99
|
+
| "space-44"
|
|
100
|
+
| "space-48"
|
|
101
|
+
| "space-56"
|
|
102
|
+
| "space-64"
|
|
103
|
+
| "space-72"
|
|
104
|
+
| "space-80"
|
|
105
|
+
| "space-96"
|
|
106
|
+
| "space-128";
|
|
107
|
+
|
|
108
|
+
export type { AkselSpaceToken };
|
|
109
|
+
|
|
110
|
+
/* ------------------------------ Shadow tokens ----------------------------- */
|
|
111
|
+
type AkselShadowToken = "dialog";
|
|
112
|
+
|
|
113
|
+
export type { AkselShadowToken };
|
|
114
|
+
|
|
115
|
+
/* ------------------------------ Border Radius tokens --------------------- */
|
|
116
|
+
type AkselBorderRadiusToken = "2" | "4" | "8" | "12" | "full";
|
|
117
|
+
|
|
118
|
+
export type { AkselBorderRadiusToken };
|
|
119
|
+
|
|
120
|
+
/* ------------------------------ Breakpoints tokens ------------------------ */
|
|
121
|
+
type AkselBreakpointToken =
|
|
96
122
|
| "xs"
|
|
97
123
|
| "sm"
|
|
98
124
|
| "sm-down"
|
|
@@ -105,52 +131,26 @@ export type BreakPointKeys =
|
|
|
105
131
|
| "2xl"
|
|
106
132
|
| "2xl-down";
|
|
107
133
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
| "size-heading-2xlarge"
|
|
113
|
-
| "size-heading-xlarge"
|
|
114
|
-
| "size-heading-large"
|
|
115
|
-
| "size-heading-medium"
|
|
116
|
-
| "size-heading-small"
|
|
117
|
-
| "size-heading-xsmall"
|
|
118
|
-
| "size-xlarge"
|
|
119
|
-
| "size-large"
|
|
120
|
-
| "size-medium"
|
|
121
|
-
| "size-small";
|
|
122
|
-
|
|
123
|
-
export type FontLineHeightKeys =
|
|
124
|
-
| "line-height-heading-2xlarge"
|
|
125
|
-
| "line-height-heading-xlarge"
|
|
126
|
-
| "line-height-heading-large"
|
|
127
|
-
| "line-height-heading-medium"
|
|
128
|
-
| "line-height-heading-small"
|
|
129
|
-
| "line-height-heading-xsmall"
|
|
130
|
-
| "line-height-xlarge"
|
|
131
|
-
| "line-height-large"
|
|
132
|
-
| "line-height-medium";
|
|
133
|
-
|
|
134
|
-
export type FontWeightKeys = "weight-bold" | "weight-regular";
|
|
135
|
-
|
|
136
|
-
/* Legacy tokens */
|
|
137
|
-
export type LegacyBorderRadiusKeys =
|
|
134
|
+
export type { AkselBreakpointToken };
|
|
135
|
+
|
|
136
|
+
/* ------------------------------ Legacy tokens ----------------------------- */
|
|
137
|
+
type AkselLegacyBorderRadiusToken =
|
|
138
138
|
| "small"
|
|
139
139
|
| "medium"
|
|
140
140
|
| "large"
|
|
141
141
|
| "xlarge"
|
|
142
142
|
| "full";
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
type AkselLegacyShadowToken =
|
|
145
145
|
| "xsmall"
|
|
146
146
|
| "small"
|
|
147
147
|
| "medium"
|
|
148
148
|
| "large"
|
|
149
149
|
| "xlarge";
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
type AkselLegacyBackgroundColorToken = "bg-default" | "bg-subtle";
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
type AkselLegacySurfaceColorToken =
|
|
154
154
|
| "surface-default"
|
|
155
155
|
| "surface-selected"
|
|
156
156
|
| "surface-subtle"
|
|
@@ -187,7 +187,7 @@ export type LegacySurfaceColorKeys =
|
|
|
187
187
|
| "surface-alt-3-strong"
|
|
188
188
|
| "surface-alt-3";
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
type AkselLegacyBorderColorToken =
|
|
191
191
|
| "border-default"
|
|
192
192
|
| "border-strong"
|
|
193
193
|
| "border-divider"
|
|
@@ -208,7 +208,7 @@ export type LegacyBorderColorKeys =
|
|
|
208
208
|
| "border-alt-2"
|
|
209
209
|
| "border-alt-3";
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
type AkselLegacySpacingToken =
|
|
212
212
|
| "0"
|
|
213
213
|
| "05"
|
|
214
214
|
| "1"
|
|
@@ -230,3 +230,12 @@ export type LegacySpacingKeys =
|
|
|
230
230
|
| "20"
|
|
231
231
|
| "24"
|
|
232
232
|
| "32";
|
|
233
|
+
|
|
234
|
+
export type {
|
|
235
|
+
AkselLegacyBorderRadiusToken,
|
|
236
|
+
AkselLegacyShadowToken,
|
|
237
|
+
AkselLegacyBackgroundColorToken,
|
|
238
|
+
AkselLegacySurfaceColorToken,
|
|
239
|
+
AkselLegacyBorderColorToken,
|
|
240
|
+
AkselLegacySpacingToken,
|
|
241
|
+
};
|