@navikt/ds-tokens 7.21.1 → 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 +1125 -277
- package/dist/darkside/tokens.css +824 -819
- package/dist/darkside/tokens.d.ts +865 -17
- package/dist/darkside/tokens.js +865 -17
- package/dist/darkside/tokens.less +865 -17
- package/dist/darkside/tokens.scss +865 -17
- package/dist/tokens-cjs.js +336 -326
- package/dist/tokens.css +329 -324
- package/dist/tokens.d.ts +331 -326
- package/dist/tokens.js +17 -6
- package/dist/tokens.less +5 -0
- package/dist/tokens.scss +5 -0
- package/docs.json +6 -1
- package/internal-types.ts +88 -0
- package/package.json +4 -4
- package/src/future-border.json +11 -0
- package/token_docs.js +277 -433
- package/types.ts +139 -123
package/dist/tokens.js
CHANGED
|
@@ -14,7 +14,8 @@ export const ABreakpointXlDown = "1279px";
|
|
|
14
14
|
export const ABreakpoint2xl = "1440px";
|
|
15
15
|
export const ABreakpoint2xlDown = "1439px";
|
|
16
16
|
export const ATextWidthMax = "576px";
|
|
17
|
-
export const AFontFamily =
|
|
17
|
+
export const AFontFamily =
|
|
18
|
+
"'Source Sans 3', 'Source Sans Pro', Arial, sans-serif";
|
|
18
19
|
export const AFontLineHeightHeading2xlarge = "3.25rem";
|
|
19
20
|
export const AFontLineHeightHeadingXlarge = "2.5rem";
|
|
20
21
|
export const AFontLineHeightHeadingLarge = "2.25rem";
|
|
@@ -175,6 +176,11 @@ export const ADataBorder3 = "rgba(199, 115, 0, 1)";
|
|
|
175
176
|
export const ADataBorder4 = "rgba(54, 141, 168, 1)";
|
|
176
177
|
export const ADataBorder5 = "rgba(42, 167, 88, 1)";
|
|
177
178
|
export const ADataBorder6 = "rgba(130, 105, 162, 1)";
|
|
179
|
+
export const ARadius2 = "2px";
|
|
180
|
+
export const ARadius4 = "4px";
|
|
181
|
+
export const ARadius8 = "8px";
|
|
182
|
+
export const ARadius12 = "12px";
|
|
183
|
+
export const ARadiusFull = "9999px";
|
|
178
184
|
export const ASpace128 = "8rem";
|
|
179
185
|
export const ASpace96 = "6rem";
|
|
180
186
|
export const ASpace80 = "5rem";
|
|
@@ -302,11 +308,16 @@ export const APurple800 = "rgba(48, 31, 70, 1)";
|
|
|
302
308
|
export const APurple900 = "rgba(31, 20, 47, 1)";
|
|
303
309
|
export const AShadowFocus = "0 0 0 3px rgba(0, 52, 125, 1)";
|
|
304
310
|
export const AShadowFocusInverted = "0 0 0 3px rgba(153, 195, 255, 1)";
|
|
305
|
-
export const AShadowXsmall =
|
|
306
|
-
|
|
307
|
-
export const
|
|
308
|
-
|
|
309
|
-
export const
|
|
311
|
+
export const AShadowXsmall =
|
|
312
|
+
"0px 1px 3px 0px rgba(0, 0, 0, 0.15), 0px 0px 1px 0px rgba(0, 0, 0, 0.20)";
|
|
313
|
+
export const AShadowSmall =
|
|
314
|
+
"0px 3px 8px 0px rgba(0, 0, 0, 0.10), 0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 0px 1px 0px rgba(0, 0, 0, 0.18)";
|
|
315
|
+
export const AShadowMedium =
|
|
316
|
+
"0px 5px 12px 0px rgba(0, 0, 0, 0.13), 0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 0px 1px 0px rgba(0, 0, 0, 0.15)";
|
|
317
|
+
export const AShadowLarge =
|
|
318
|
+
"0px 2px 5px 0px rgba(0, 0, 0, 0.15), 0px 10px 16px 0px rgba(0, 0, 0, 0.12), 0px 0px 1px 0px rgba(0, 0, 0, 0.12)";
|
|
319
|
+
export const AShadowXlarge =
|
|
320
|
+
"0px 2px 5px 0px rgba(0, 0, 0, 0.15), 0px 10px 24px 0px rgba(0, 0, 0, 0.18), 0px 0px 1px 0px rgba(0, 0, 0, 0.08)";
|
|
310
321
|
export const ASpacing0 = "0";
|
|
311
322
|
export const ASpacing1 = "0.25rem";
|
|
312
323
|
export const ASpacing2 = "0.5rem";
|
package/dist/tokens.less
CHANGED
|
@@ -174,6 +174,11 @@
|
|
|
174
174
|
@a-data-border-4: rgba(54, 141, 168, 1);
|
|
175
175
|
@a-data-border-5: rgba(42, 167, 88, 1);
|
|
176
176
|
@a-data-border-6: rgba(130, 105, 162, 1);
|
|
177
|
+
@a-radius-2: 2px;
|
|
178
|
+
@a-radius-4: 4px;
|
|
179
|
+
@a-radius-8: 8px;
|
|
180
|
+
@a-radius-12: 12px;
|
|
181
|
+
@a-radius-full: 9999px;
|
|
177
182
|
@a-space-128: 8rem;
|
|
178
183
|
@a-space-96: 6rem;
|
|
179
184
|
@a-space-80: 5rem;
|
package/dist/tokens.scss
CHANGED
|
@@ -174,6 +174,11 @@ $a-data-border-3: rgba(199, 115, 0, 1);
|
|
|
174
174
|
$a-data-border-4: rgba(54, 141, 168, 1);
|
|
175
175
|
$a-data-border-5: rgba(42, 167, 88, 1);
|
|
176
176
|
$a-data-border-6: rgba(130, 105, 162, 1);
|
|
177
|
+
$a-radius-2: 2px;
|
|
178
|
+
$a-radius-4: 4px;
|
|
179
|
+
$a-radius-8: 8px;
|
|
180
|
+
$a-radius-12: 12px;
|
|
181
|
+
$a-radius-full: 9999px;
|
|
177
182
|
$a-space-128: 8rem;
|
|
178
183
|
$a-space-96: 6rem;
|
|
179
184
|
$a-space-80: 5rem;
|
package/docs.json
CHANGED
|
@@ -488,7 +488,12 @@
|
|
|
488
488
|
{ "name": "--a-border-radius-medium", "value": "4px" },
|
|
489
489
|
{ "name": "--a-border-radius-large", "value": "8px" },
|
|
490
490
|
{ "name": "--a-border-radius-xlarge", "value": "12px" },
|
|
491
|
-
{ "name": "--a-border-radius-full", "value": "9999px" }
|
|
491
|
+
{ "name": "--a-border-radius-full", "value": "9999px" },
|
|
492
|
+
{ "name": "--a-radius-2", "value": "2px" },
|
|
493
|
+
{ "name": "--a-radius-4", "value": "4px" },
|
|
494
|
+
{ "name": "--a-radius-8", "value": "8px" },
|
|
495
|
+
{ "name": "--a-radius-12", "value": "12px" },
|
|
496
|
+
{ "name": "--a-radius-full", "value": "9999px" }
|
|
492
497
|
],
|
|
493
498
|
"shadow": [
|
|
494
499
|
{
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { AkselColorRole, AkselSpaceToken } from "./types";
|
|
2
|
+
|
|
3
|
+
type GlobalColorScale =
|
|
4
|
+
| "100"
|
|
5
|
+
| "200"
|
|
6
|
+
| "300"
|
|
7
|
+
| "400"
|
|
8
|
+
| "500"
|
|
9
|
+
| "600"
|
|
10
|
+
| "700"
|
|
11
|
+
| "800"
|
|
12
|
+
| "900"
|
|
13
|
+
| "1000"
|
|
14
|
+
| "000"
|
|
15
|
+
| "100A"
|
|
16
|
+
| "200A"
|
|
17
|
+
| "300A"
|
|
18
|
+
| "400A";
|
|
19
|
+
|
|
20
|
+
type GlobalColorKeys =
|
|
21
|
+
| `${Extract<AkselColorRole, "neutral">}-${Extract<GlobalColorScale, "000">}`
|
|
22
|
+
| `${AkselColorRole}-${Exclude<GlobalColorScale, "000">}`;
|
|
23
|
+
|
|
24
|
+
type ExtractNumber<T> = T extends `space-${infer N extends number}` ? N : never;
|
|
25
|
+
|
|
26
|
+
const spaceObject: Record<ExtractNumber<AkselSpaceToken>, any> = {
|
|
27
|
+
"0": "",
|
|
28
|
+
"1": "",
|
|
29
|
+
"2": "",
|
|
30
|
+
"4": "",
|
|
31
|
+
"6": "",
|
|
32
|
+
"8": "",
|
|
33
|
+
"12": "",
|
|
34
|
+
"16": "",
|
|
35
|
+
"20": "",
|
|
36
|
+
"24": "",
|
|
37
|
+
"28": "",
|
|
38
|
+
"32": "",
|
|
39
|
+
"36": "",
|
|
40
|
+
"40": "",
|
|
41
|
+
"44": "",
|
|
42
|
+
"48": "",
|
|
43
|
+
"56": "",
|
|
44
|
+
"64": "",
|
|
45
|
+
"72": "",
|
|
46
|
+
"80": "",
|
|
47
|
+
"96": "",
|
|
48
|
+
"128": "",
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const spaceInPixels = Object.keys(spaceObject).map(Number);
|
|
52
|
+
|
|
53
|
+
/* ------------------------------ Font tokens ------------------------------- */
|
|
54
|
+
type FontFamilyKeys = "family";
|
|
55
|
+
|
|
56
|
+
type FontSizeKeys =
|
|
57
|
+
| "size-heading-2xlarge"
|
|
58
|
+
| "size-heading-xlarge"
|
|
59
|
+
| "size-heading-large"
|
|
60
|
+
| "size-heading-medium"
|
|
61
|
+
| "size-heading-small"
|
|
62
|
+
| "size-heading-xsmall"
|
|
63
|
+
| "size-xlarge"
|
|
64
|
+
| "size-large"
|
|
65
|
+
| "size-medium"
|
|
66
|
+
| "size-small";
|
|
67
|
+
|
|
68
|
+
type FontLineHeightKeys =
|
|
69
|
+
| "line-height-heading-2xlarge"
|
|
70
|
+
| "line-height-heading-xlarge"
|
|
71
|
+
| "line-height-heading-large"
|
|
72
|
+
| "line-height-heading-medium"
|
|
73
|
+
| "line-height-heading-small"
|
|
74
|
+
| "line-height-heading-xsmall"
|
|
75
|
+
| "line-height-xlarge"
|
|
76
|
+
| "line-height-large"
|
|
77
|
+
| "line-height-medium";
|
|
78
|
+
|
|
79
|
+
export type FontWeightKeys = "weight-bold" | "weight-regular";
|
|
80
|
+
|
|
81
|
+
export { spaceInPixels };
|
|
82
|
+
export type {
|
|
83
|
+
GlobalColorScale,
|
|
84
|
+
GlobalColorKeys,
|
|
85
|
+
FontFamilyKeys,
|
|
86
|
+
FontSizeKeys,
|
|
87
|
+
FontLineHeightKeys,
|
|
88
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-tokens",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.23.0",
|
|
4
4
|
"description": "Design-tokens for Nav designsystem",
|
|
5
5
|
"author": "Aksel | Nav designsystem team",
|
|
6
6
|
"keywords": [
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"/dist",
|
|
15
15
|
"/src",
|
|
16
16
|
"types.ts",
|
|
17
|
+
"internal-types.ts",
|
|
17
18
|
"docs.json",
|
|
18
19
|
"token_docs.js",
|
|
19
20
|
"!/dist/darkside",
|
|
@@ -35,14 +36,13 @@
|
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@figma/plugin-typings": "^1.100.2",
|
|
38
|
-
"color": "4.2.3",
|
|
39
39
|
"colorjs.io": "^0.5.2",
|
|
40
|
-
"esbuild": "^0.25.
|
|
40
|
+
"esbuild": "^0.25.5",
|
|
41
41
|
"lightningcss": "^1.29.3",
|
|
42
42
|
"lodash": "^4.17.21",
|
|
43
43
|
"style-dictionary": "^4.1.1",
|
|
44
44
|
"tsx": "^4.19.1",
|
|
45
|
-
"typescript": "5.
|
|
45
|
+
"typescript": "5.8.3",
|
|
46
46
|
"vitest": "^2.1.9"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|