@navikt/ds-tokens 7.9.1 → 7.10.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/tokens.js CHANGED
@@ -175,6 +175,28 @@ export const ADataBorder3 = "rgba(199, 115, 0, 1)";
175
175
  export const ADataBorder4 = "rgba(54, 141, 168, 1)";
176
176
  export const ADataBorder5 = "rgba(42, 167, 88, 1)";
177
177
  export const ADataBorder6 = "rgba(130, 105, 162, 1)";
178
+ export const ASpace128 = "8rem";
179
+ export const ASpace96 = "6rem";
180
+ export const ASpace80 = "5rem";
181
+ export const ASpace72 = "4.5rem";
182
+ export const ASpace64 = "4rem";
183
+ export const ASpace56 = "3.5rem";
184
+ export const ASpace48 = "3rem";
185
+ export const ASpace44 = "2.75rem";
186
+ export const ASpace40 = "2.5rem";
187
+ export const ASpace36 = "2.25rem";
188
+ export const ASpace32 = "2rem";
189
+ export const ASpace28 = "1.75rem";
190
+ export const ASpace24 = "1.5rem";
191
+ export const ASpace20 = "1.25rem";
192
+ export const ASpace16 = "1rem";
193
+ export const ASpace12 = ".75rem";
194
+ export const ASpace8 = ".5rem";
195
+ export const ASpace6 = ".375rem";
196
+ export const ASpace4 = ".25rem";
197
+ export const ASpace2 = ".125rem";
198
+ export const ASpace1 = ".0625rem";
199
+ export const ASpace0 = "0rem";
178
200
  export const ATransparent = "rgba(255, 255, 255, 0)";
179
201
  export const AWhite = "rgba(255, 255, 255, 1)";
180
202
  export const ANavRed = "rgba(195, 0, 0, 1)";
package/dist/tokens.less CHANGED
@@ -174,6 +174,28 @@
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-space-128: 8rem;
178
+ @a-space-96: 6rem;
179
+ @a-space-80: 5rem;
180
+ @a-space-72: 4.5rem;
181
+ @a-space-64: 4rem;
182
+ @a-space-56: 3.5rem;
183
+ @a-space-48: 3rem;
184
+ @a-space-44: 2.75rem;
185
+ @a-space-40: 2.5rem;
186
+ @a-space-36: 2.25rem;
187
+ @a-space-32: 2rem;
188
+ @a-space-28: 1.75rem;
189
+ @a-space-24: 1.5rem;
190
+ @a-space-20: 1.25rem;
191
+ @a-space-16: 1rem;
192
+ @a-space-12: .75rem;
193
+ @a-space-8: .5rem;
194
+ @a-space-6: .375rem;
195
+ @a-space-4: .25rem;
196
+ @a-space-2: .125rem;
197
+ @a-space-1: .0625rem;
198
+ @a-space-0: 0rem;
177
199
  @a-transparent: rgba(255, 255, 255, 0);
178
200
  @a-white: rgba(255, 255, 255, 1);
179
201
  @a-nav-red: rgba(195, 0, 0, 1);
package/dist/tokens.scss CHANGED
@@ -174,6 +174,28 @@ $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-space-128: 8rem;
178
+ $a-space-96: 6rem;
179
+ $a-space-80: 5rem;
180
+ $a-space-72: 4.5rem;
181
+ $a-space-64: 4rem;
182
+ $a-space-56: 3.5rem;
183
+ $a-space-48: 3rem;
184
+ $a-space-44: 2.75rem;
185
+ $a-space-40: 2.5rem;
186
+ $a-space-36: 2.25rem;
187
+ $a-space-32: 2rem;
188
+ $a-space-28: 1.75rem;
189
+ $a-space-24: 1.5rem;
190
+ $a-space-20: 1.25rem;
191
+ $a-space-16: 1rem;
192
+ $a-space-12: .75rem;
193
+ $a-space-8: .5rem;
194
+ $a-space-6: .375rem;
195
+ $a-space-4: .25rem;
196
+ $a-space-2: .125rem;
197
+ $a-space-1: .0625rem;
198
+ $a-space-0: 0rem;
177
199
  $a-transparent: rgba(255, 255, 255, 0);
178
200
  $a-white: rgba(255, 255, 255, 1);
179
201
  $a-nav-red: rgba(195, 0, 0, 1);
package/docs.json CHANGED
@@ -541,6 +541,30 @@
541
541
  { "name": "--a-spacing-24", "value": "6rem" },
542
542
  { "name": "--a-spacing-32", "value": "8rem" }
543
543
  ],
544
+ "space": [
545
+ { "name": "--a-space-128", "value": "8rem" },
546
+ { "name": "--a-space-96", "value": "6rem" },
547
+ { "name": "--a-space-80", "value": "5rem" },
548
+ { "name": "--a-space-72", "value": "4.5rem" },
549
+ { "name": "--a-space-64", "value": "4rem" },
550
+ { "name": "--a-space-56", "value": "3.5rem" },
551
+ { "name": "--a-space-48", "value": "3rem" },
552
+ { "name": "--a-space-44", "value": "2.75rem" },
553
+ { "name": "--a-space-40", "value": "2.5rem" },
554
+ { "name": "--a-space-36", "value": "2.25rem" },
555
+ { "name": "--a-space-32", "value": "2rem" },
556
+ { "name": "--a-space-28", "value": "1.75rem" },
557
+ { "name": "--a-space-24", "value": "1.5rem" },
558
+ { "name": "--a-space-20", "value": "1.25rem" },
559
+ { "name": "--a-space-16", "value": "1rem" },
560
+ { "name": "--a-space-12", "value": ".75rem" },
561
+ { "name": "--a-space-8", "value": ".5rem" },
562
+ { "name": "--a-space-6", "value": ".375rem" },
563
+ { "name": "--a-space-4", "value": ".25rem" },
564
+ { "name": "--a-space-2", "value": ".125rem" },
565
+ { "name": "--a-space-1", "value": ".0625rem" },
566
+ { "name": "--a-space-0", "value": "0rem" }
567
+ ],
544
568
  "z-index": [
545
569
  { "name": "--a-z-index-focus", "value": 10 },
546
570
  { "name": "--a-z-index-popover", "value": 1000 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-tokens",
3
- "version": "7.9.1",
3
+ "version": "7.10.0",
4
4
  "description": "Design-tokens for Nav designsystem",
5
5
  "author": "Aksel | Nav designsystem team",
6
6
  "keywords": [
@@ -0,0 +1,26 @@
1
+ {
2
+ "a": {
3
+ "space-128": { "value": "8rem" },
4
+ "space-96": { "value": "6rem" },
5
+ "space-80": { "value": "5rem" },
6
+ "space-72": { "value": "4.5rem" },
7
+ "space-64": { "value": "4rem" },
8
+ "space-56": { "value": "3.5rem" },
9
+ "space-48": { "value": "3rem" },
10
+ "space-44": { "value": "2.75rem" },
11
+ "space-40": { "value": "2.5rem" },
12
+ "space-36": { "value": "2.25rem" },
13
+ "space-32": { "value": "2rem" },
14
+ "space-28": { "value": "1.75rem" },
15
+ "space-24": { "value": "1.5rem" },
16
+ "space-20": { "value": "1.25rem" },
17
+ "space-16": { "value": "1rem" },
18
+ "space-12": { "value": ".75rem" },
19
+ "space-8": { "value": ".5rem" },
20
+ "space-6": { "value": ".375rem" },
21
+ "space-4": { "value": ".25rem" },
22
+ "space-2": { "value": ".125rem" },
23
+ "space-1": { "value": ".0625rem" },
24
+ "space-0": { "value": "0rem" }
25
+ }
26
+ }
package/types.ts CHANGED
@@ -7,14 +7,15 @@ export const ColorRolesList = [
7
7
  "warning",
8
8
  "danger",
9
9
  "info",
10
- "brand-magenta",
11
- "brand-beige",
12
- "brand-blue",
13
- "meta-purple",
14
- "meta-lime",
10
+ "brand-1",
11
+ "brand-2",
12
+ "brand-3",
13
+ "meta-1",
14
+ "meta-2",
15
15
  ] as const;
16
16
 
17
- export type ColorRoles = (typeof ColorRolesList)[number];
17
+ export type GlobalColorRoles = (typeof ColorRolesList)[number];
18
+ export type SemanticColorRoles = Exclude<GlobalColorRoles, "neutral">;
18
19
 
19
20
  export type GlobalColorScale =
20
21
  | "100"
@@ -34,43 +35,63 @@ export type GlobalColorScale =
34
35
  | "400A";
35
36
 
36
37
  export type GlobalColorKeys =
37
- | `${Extract<ColorRoles, "neutral">}-${Extract<GlobalColorScale, "000">}`
38
- | `${ColorRoles}-${Exclude<GlobalColorScale, "000">}`;
38
+ | `${Extract<GlobalColorRoles, "neutral">}-${Extract<
39
+ GlobalColorScale,
40
+ "000"
41
+ >}`
42
+ | `${GlobalColorRoles}-${Exclude<GlobalColorScale, "000">}`;
39
43
 
40
44
  /* Semantic tokens */
41
45
 
42
- export type DefaultBgKeys =
46
+ export type StaticDefaultBgKeys =
43
47
  | "default"
44
48
  | "input"
45
49
  | "raised"
46
50
  | "sunken"
47
- | "overlay";
51
+ | "overlay"
52
+ | "soft"
53
+ | "moderate"
54
+ | "moderateA"
55
+ | "strong";
56
+
57
+ export type StatefulDefaultBgKeys =
58
+ | "hover"
59
+ | "hoverA"
60
+ | "moderate-hover"
61
+ | "moderate-hoverA"
62
+ | "moderate-pressed"
63
+ | "moderate-pressedA"
64
+ | "strong-hover"
65
+ | "strong-pressed";
48
66
 
49
67
  export type StaticBgKeys =
50
- | ColorRoles
51
- | `${ColorRoles}-moderate`
52
- | `${ColorRoles}-moderateA`
53
- | `${ColorRoles}-strong`
54
- | `${ColorRoles}-raised`;
68
+ | `${SemanticColorRoles}-soft`
69
+ | `${SemanticColorRoles}-moderate`
70
+ | `${SemanticColorRoles}-moderateA`
71
+ | `${SemanticColorRoles}-strong`;
55
72
 
56
73
  export type StatefulBgKeys =
57
- | `${ColorRoles}-hover`
58
- | `${ColorRoles}-hoverA`
59
- | `${ColorRoles}-moderate-hover`
60
- | `${ColorRoles}-moderate-hoverA`
61
- | `${ColorRoles}-moderate-pressed`
62
- | `${ColorRoles}-moderate-pressedA`
63
- | `${ColorRoles}-strong-hover`
64
- | `${ColorRoles}-strong-pressed`
65
- | `${ColorRoles}-raised-hover`;
66
-
67
- export type DefaultTextColorKeys = "default" | "subtle" | "icon" | "logo";
74
+ | `${SemanticColorRoles}-hover`
75
+ | `${SemanticColorRoles}-hoverA`
76
+ | `${SemanticColorRoles}-moderate-hover`
77
+ | `${SemanticColorRoles}-moderate-hoverA`
78
+ | `${SemanticColorRoles}-moderate-pressed`
79
+ | `${SemanticColorRoles}-moderate-pressedA`
80
+ | `${SemanticColorRoles}-strong-hover`
81
+ | `${SemanticColorRoles}-strong-pressed`;
82
+
83
+ export type DefaultTextColorKeys =
84
+ | "default"
85
+ | "subtle"
86
+ | "icon"
87
+ | "logo"
88
+ | "contrast";
68
89
 
69
90
  export type TextColorKeys =
70
- | ColorRoles
71
- | `${ColorRoles}-strong`
72
- | `${ColorRoles}-icon`
73
- | `${ColorRoles}-contrast`;
91
+ | SemanticColorRoles
92
+ | `${SemanticColorRoles}-strong`
93
+ | `${SemanticColorRoles}-icon`
94
+ | `${SemanticColorRoles}-contrast`;
74
95
 
75
96
  export type BorderColorKeys =
76
97
  | "default"
@@ -80,33 +101,17 @@ export type BorderColorKeys =
80
101
  | "focus";
81
102
 
82
103
  export type BorderColorWithRoleKeys =
83
- | ColorRoles
84
- | `${ColorRoles}-subtle`
85
- | `${ColorRoles}-subtleA`
86
- | `${ColorRoles}-strong`;
104
+ | SemanticColorRoles
105
+ | `${SemanticColorRoles}-subtle`
106
+ | `${SemanticColorRoles}-subtleA`
107
+ | `${SemanticColorRoles}-strong`;
108
+
109
+ export const spaceInPixels = [
110
+ 0, 1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 56, 64, 72, 80, 96,
111
+ 128,
112
+ ] as const;
87
113
 
88
- export type SpacingKeys =
89
- | "0"
90
- | "05"
91
- | "1"
92
- | "1-alt"
93
- | "2"
94
- | "3"
95
- | "4"
96
- | "5"
97
- | "6"
98
- | "7"
99
- | "8"
100
- | "9"
101
- | "10"
102
- | "11"
103
- | "12"
104
- | "14"
105
- | "16"
106
- | "18"
107
- | "20"
108
- | "24"
109
- | "32";
114
+ export type SpaceKeys = `space-${(typeof spaceInPixels)[number]}`;
110
115
 
111
116
  export type ShadowKeys = "dialog";
112
117
 
@@ -220,3 +225,26 @@ export type LegacyBorderColorKeys =
220
225
  | "border-alt-1"
221
226
  | "border-alt-2"
222
227
  | "border-alt-3";
228
+
229
+ export type LegacySpacingKeys =
230
+ | "0"
231
+ | "05"
232
+ | "1"
233
+ | "1-alt"
234
+ | "2"
235
+ | "3"
236
+ | "4"
237
+ | "5"
238
+ | "6"
239
+ | "7"
240
+ | "8"
241
+ | "9"
242
+ | "10"
243
+ | "11"
244
+ | "12"
245
+ | "14"
246
+ | "16"
247
+ | "18"
248
+ | "20"
249
+ | "24"
250
+ | "32";