@nswds/tokens 3.0.1 → 3.2.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.
Files changed (77) hide show
  1. package/dist/css/breakpoints/global.css +7 -0
  2. package/dist/css/colors/semantic/hex.css +76 -76
  3. package/dist/css/colors/semantic/hsl.css +76 -76
  4. package/dist/css/colors/semantic/oklch.css +76 -76
  5. package/dist/css/colors/semantic/rgb.css +76 -76
  6. package/dist/css/colors/themes/masterbrand/hex.css +57 -57
  7. package/dist/css/colors/themes/masterbrand/hsl.css +57 -57
  8. package/dist/css/colors/themes/masterbrand/oklch.css +57 -57
  9. package/dist/css/colors/themes/masterbrand/rgb.css +57 -57
  10. package/dist/css/radius/global.css +7 -0
  11. package/dist/css/space/global.css +14 -0
  12. package/dist/css/typography/global.css +32 -0
  13. package/dist/index.cjs +999 -31
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +417 -0
  16. package/dist/index.d.ts +417 -0
  17. package/dist/index.js +999 -31
  18. package/dist/index.js.map +1 -1
  19. package/dist/js/breakpoints/global.js +7 -0
  20. package/dist/js/radius/global.js +7 -0
  21. package/dist/js/space/global.js +14 -0
  22. package/dist/js/typography/global.js +42 -0
  23. package/dist/json/breakpoints/global.json +9 -0
  24. package/dist/json/radius/global.json +9 -0
  25. package/dist/json/space/global.json +16 -0
  26. package/dist/json/typography/global.json +42 -0
  27. package/dist/less/breakpoints/global.less +5 -0
  28. package/dist/less/colors/semantic/hex.less +76 -76
  29. package/dist/less/colors/semantic/hsl.less +76 -76
  30. package/dist/less/colors/semantic/oklch.less +76 -76
  31. package/dist/less/colors/semantic/rgb.less +76 -76
  32. package/dist/less/colors/themes/masterbrand/hex.less +57 -57
  33. package/dist/less/colors/themes/masterbrand/hsl.less +57 -57
  34. package/dist/less/colors/themes/masterbrand/oklch.less +57 -57
  35. package/dist/less/colors/themes/masterbrand/rgb.less +57 -57
  36. package/dist/less/radius/global.less +5 -0
  37. package/dist/less/space/global.less +12 -0
  38. package/dist/less/typography/global.less +30 -0
  39. package/dist/scss/breakpoints/global.scss +5 -0
  40. package/dist/scss/colors/semantic/hex.scss +76 -76
  41. package/dist/scss/colors/semantic/hsl.scss +76 -76
  42. package/dist/scss/colors/semantic/oklch.scss +76 -76
  43. package/dist/scss/colors/semantic/rgb.scss +76 -76
  44. package/dist/scss/colors/themes/masterbrand/hex.scss +57 -57
  45. package/dist/scss/colors/themes/masterbrand/hsl.scss +57 -57
  46. package/dist/scss/colors/themes/masterbrand/oklch.scss +57 -57
  47. package/dist/scss/colors/themes/masterbrand/rgb.scss +57 -57
  48. package/dist/scss/radius/global.scss +5 -0
  49. package/dist/scss/space/global.scss +12 -0
  50. package/dist/scss/typography/global.scss +30 -0
  51. package/dist/tailwind/breakpoints/global.css +7 -0
  52. package/dist/tailwind/radius/global.css +7 -0
  53. package/dist/tailwind/space/global.css +14 -0
  54. package/dist/tailwind/typography/global.css +32 -0
  55. package/dist/tokens/breakpoints.base.json +44 -0
  56. package/dist/tokens/global/breakpoints/canonical.json +44 -0
  57. package/dist/tokens/global/radius/canonical.json +44 -0
  58. package/dist/tokens/global/space/canonical.json +100 -0
  59. package/dist/tokens/global/typography/canonical.json +240 -0
  60. package/dist/tokens/radius.base.json +44 -0
  61. package/dist/tokens/semantic/color/canonical.json +76 -0
  62. package/dist/tokens/semantic/color/hex.json +76 -0
  63. package/dist/tokens/semantic/color/hsl.json +76 -0
  64. package/dist/tokens/semantic/color/oklch.json +76 -0
  65. package/dist/tokens/semantic/color/rgb.json +76 -0
  66. package/dist/tokens/space.base.json +100 -0
  67. package/dist/tokens/themes/color/masterbrand/canonical.json +57 -0
  68. package/dist/tokens/themes/color/masterbrand/hex.json +57 -0
  69. package/dist/tokens/themes/color/masterbrand/hsl.json +57 -0
  70. package/dist/tokens/themes/color/masterbrand/oklch.json +57 -0
  71. package/dist/tokens/themes/color/masterbrand/rgb.json +57 -0
  72. package/dist/tokens/typography.base.json +240 -0
  73. package/dist/ts/breakpoints/global.ts +7 -0
  74. package/dist/ts/radius/global.ts +7 -0
  75. package/dist/ts/space/global.ts +14 -0
  76. package/dist/ts/typography/global.ts +42 -0
  77. package/package.json +1 -1
@@ -0,0 +1,44 @@
1
+ {
2
+ "breakpoint": {
3
+ "xs": {
4
+ "$type": "dimension",
5
+ "$description": "Extra-small breakpoint — large phones and up.",
6
+ "$value": {
7
+ "value": 480,
8
+ "unit": "px"
9
+ }
10
+ },
11
+ "sm": {
12
+ "$type": "dimension",
13
+ "$description": "Small breakpoint — tablets portrait and up.",
14
+ "$value": {
15
+ "value": 768,
16
+ "unit": "px"
17
+ }
18
+ },
19
+ "md": {
20
+ "$type": "dimension",
21
+ "$description": "Medium breakpoint — tablets landscape / small laptops and up.",
22
+ "$value": {
23
+ "value": 992,
24
+ "unit": "px"
25
+ }
26
+ },
27
+ "lg": {
28
+ "$type": "dimension",
29
+ "$description": "Large breakpoint — desktops and up.",
30
+ "$value": {
31
+ "value": 1200,
32
+ "unit": "px"
33
+ }
34
+ },
35
+ "xl": {
36
+ "$type": "dimension",
37
+ "$description": "Extra-large breakpoint — wide desktops and up.",
38
+ "$value": {
39
+ "value": 1600,
40
+ "unit": "px"
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "breakpoint": {
3
+ "xs": {
4
+ "$type": "dimension",
5
+ "$description": "Extra-small breakpoint — large phones and up.",
6
+ "$value": {
7
+ "value": 480,
8
+ "unit": "px"
9
+ }
10
+ },
11
+ "sm": {
12
+ "$type": "dimension",
13
+ "$description": "Small breakpoint — tablets portrait and up.",
14
+ "$value": {
15
+ "value": 768,
16
+ "unit": "px"
17
+ }
18
+ },
19
+ "md": {
20
+ "$type": "dimension",
21
+ "$description": "Medium breakpoint — tablets landscape / small laptops and up.",
22
+ "$value": {
23
+ "value": 992,
24
+ "unit": "px"
25
+ }
26
+ },
27
+ "lg": {
28
+ "$type": "dimension",
29
+ "$description": "Large breakpoint — desktops and up.",
30
+ "$value": {
31
+ "value": 1200,
32
+ "unit": "px"
33
+ }
34
+ },
35
+ "xl": {
36
+ "$type": "dimension",
37
+ "$description": "Extra-large breakpoint — wide desktops and up.",
38
+ "$value": {
39
+ "value": 1600,
40
+ "unit": "px"
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "radius": {
3
+ "none": {
4
+ "$type": "dimension",
5
+ "$description": "Square corners — tables, full-bleed surfaces, and elements flush to container edges.",
6
+ "$value": {
7
+ "value": 0,
8
+ "unit": "px"
9
+ }
10
+ },
11
+ "sm": {
12
+ "$type": "dimension",
13
+ "$description": "Small rounding — inputs, buttons, tags, and compact controls.",
14
+ "$value": {
15
+ "value": 4,
16
+ "unit": "px"
17
+ }
18
+ },
19
+ "md": {
20
+ "$type": "dimension",
21
+ "$description": "Medium rounding — cards, panels, and modals.",
22
+ "$value": {
23
+ "value": 8,
24
+ "unit": "px"
25
+ }
26
+ },
27
+ "lg": {
28
+ "$type": "dimension",
29
+ "$description": "Large rounding — hero surfaces and prominent containers.",
30
+ "$value": {
31
+ "value": 16,
32
+ "unit": "px"
33
+ }
34
+ },
35
+ "pill": {
36
+ "$type": "dimension",
37
+ "$description": "Fully rounded ends — pills, badges, and circular icon buttons.",
38
+ "$value": {
39
+ "value": 9999,
40
+ "unit": "px"
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "space": {
3
+ "0": {
4
+ "$type": "dimension",
5
+ "$description": "Spacing step 0 on the 4px grid (0px at the default root font size). Use for padding, margins, and gaps.",
6
+ "$value": {
7
+ "value": 0,
8
+ "unit": "rem"
9
+ }
10
+ },
11
+ "1": {
12
+ "$type": "dimension",
13
+ "$description": "Spacing step 1 on the 4px grid (4px at the default root font size). Use for padding, margins, and gaps.",
14
+ "$value": {
15
+ "value": 0.25,
16
+ "unit": "rem"
17
+ }
18
+ },
19
+ "2": {
20
+ "$type": "dimension",
21
+ "$description": "Spacing step 2 on the 4px grid (8px at the default root font size). Use for padding, margins, and gaps.",
22
+ "$value": {
23
+ "value": 0.5,
24
+ "unit": "rem"
25
+ }
26
+ },
27
+ "3": {
28
+ "$type": "dimension",
29
+ "$description": "Spacing step 3 on the 4px grid (12px at the default root font size). Use for padding, margins, and gaps.",
30
+ "$value": {
31
+ "value": 0.75,
32
+ "unit": "rem"
33
+ }
34
+ },
35
+ "4": {
36
+ "$type": "dimension",
37
+ "$description": "Spacing step 4 on the 4px grid (16px at the default root font size). Use for padding, margins, and gaps.",
38
+ "$value": {
39
+ "value": 1,
40
+ "unit": "rem"
41
+ }
42
+ },
43
+ "5": {
44
+ "$type": "dimension",
45
+ "$description": "Spacing step 5 on the 4px grid (20px at the default root font size). Use for padding, margins, and gaps.",
46
+ "$value": {
47
+ "value": 1.25,
48
+ "unit": "rem"
49
+ }
50
+ },
51
+ "6": {
52
+ "$type": "dimension",
53
+ "$description": "Spacing step 6 on the 4px grid (24px at the default root font size). Use for padding, margins, and gaps.",
54
+ "$value": {
55
+ "value": 1.5,
56
+ "unit": "rem"
57
+ }
58
+ },
59
+ "8": {
60
+ "$type": "dimension",
61
+ "$description": "Spacing step 8 on the 4px grid (32px at the default root font size). Use for padding, margins, and gaps.",
62
+ "$value": {
63
+ "value": 2,
64
+ "unit": "rem"
65
+ }
66
+ },
67
+ "10": {
68
+ "$type": "dimension",
69
+ "$description": "Spacing step 10 on the 4px grid (40px at the default root font size). Use for padding, margins, and gaps.",
70
+ "$value": {
71
+ "value": 2.5,
72
+ "unit": "rem"
73
+ }
74
+ },
75
+ "12": {
76
+ "$type": "dimension",
77
+ "$description": "Spacing step 12 on the 4px grid (48px at the default root font size). Use for padding, margins, and gaps.",
78
+ "$value": {
79
+ "value": 3,
80
+ "unit": "rem"
81
+ }
82
+ },
83
+ "14": {
84
+ "$type": "dimension",
85
+ "$description": "Spacing step 14 on the 4px grid (56px at the default root font size). Use for padding, margins, and gaps.",
86
+ "$value": {
87
+ "value": 3.5,
88
+ "unit": "rem"
89
+ }
90
+ },
91
+ "16": {
92
+ "$type": "dimension",
93
+ "$description": "Spacing step 16 on the 4px grid (64px at the default root font size). Use for padding, margins, and gaps.",
94
+ "$value": {
95
+ "value": 4,
96
+ "unit": "rem"
97
+ }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,240 @@
1
+ {
2
+ "font-family": {
3
+ "sans": {
4
+ "$type": "fontFamily",
5
+ "$description": "Primary typeface — Public Sans (the NSW Government brand typeface) with system, Helvetica/Arial, and emoji fallbacks. Use for all UI and body text.",
6
+ "$value": [
7
+ "Public Sans",
8
+ "-apple-system",
9
+ "BlinkMacSystemFont",
10
+ "Segoe UI",
11
+ "Noto Sans",
12
+ "Helvetica",
13
+ "Arial",
14
+ "sans-serif",
15
+ "Apple Color Emoji",
16
+ "Segoe UI Emoji"
17
+ ]
18
+ },
19
+ "display": {
20
+ "$type": "fontFamily",
21
+ "$description": "Display typeface — currently the same stack as sans; a separate token so display/heading type can diverge from body text later without a breaking change.",
22
+ "$value": [
23
+ "Public Sans",
24
+ "-apple-system",
25
+ "BlinkMacSystemFont",
26
+ "Segoe UI",
27
+ "Noto Sans",
28
+ "Helvetica",
29
+ "Arial",
30
+ "sans-serif",
31
+ "Apple Color Emoji",
32
+ "Segoe UI Emoji"
33
+ ]
34
+ },
35
+ "system": {
36
+ "$type": "fontFamily",
37
+ "$description": "System typeface — currently the same stack as sans; a separate token for system-chrome contexts (toasts, native-feeling UI) that may diverge later.",
38
+ "$value": [
39
+ "Public Sans",
40
+ "-apple-system",
41
+ "BlinkMacSystemFont",
42
+ "Segoe UI",
43
+ "Noto Sans",
44
+ "Helvetica",
45
+ "Arial",
46
+ "sans-serif",
47
+ "Apple Color Emoji",
48
+ "Segoe UI Emoji"
49
+ ]
50
+ },
51
+ "mono": {
52
+ "$type": "fontFamily",
53
+ "$description": "Monospace stack — JetBrains Mono with ui-monospace and system fallbacks for code, tabular data, and technical content.",
54
+ "$value": [
55
+ "JetBrains Mono",
56
+ "ui-monospace",
57
+ "SFMono-Regular",
58
+ "SF Mono",
59
+ "Menlo",
60
+ "Consolas",
61
+ "Liberation Mono",
62
+ "monospace"
63
+ ]
64
+ }
65
+ },
66
+ "font-size": {
67
+ "12": {
68
+ "$type": "dimension",
69
+ "$description": "Font size 12px (0.75rem) — the step name is the px value at the default root font size.",
70
+ "$value": {
71
+ "value": 0.75,
72
+ "unit": "rem"
73
+ }
74
+ },
75
+ "14": {
76
+ "$type": "dimension",
77
+ "$description": "Font size 14px (0.875rem) — the step name is the px value at the default root font size.",
78
+ "$value": {
79
+ "value": 0.875,
80
+ "unit": "rem"
81
+ }
82
+ },
83
+ "16": {
84
+ "$type": "dimension",
85
+ "$description": "Font size 16px (1rem) — the step name is the px value at the default root font size.",
86
+ "$value": {
87
+ "value": 1,
88
+ "unit": "rem"
89
+ }
90
+ },
91
+ "18": {
92
+ "$type": "dimension",
93
+ "$description": "Font size 18px (1.125rem) — the step name is the px value at the default root font size.",
94
+ "$value": {
95
+ "value": 1.125,
96
+ "unit": "rem"
97
+ }
98
+ },
99
+ "20": {
100
+ "$type": "dimension",
101
+ "$description": "Font size 20px (1.25rem) — the step name is the px value at the default root font size.",
102
+ "$value": {
103
+ "value": 1.25,
104
+ "unit": "rem"
105
+ }
106
+ },
107
+ "22": {
108
+ "$type": "dimension",
109
+ "$description": "Font size 22px (1.375rem) — the step name is the px value at the default root font size.",
110
+ "$value": {
111
+ "value": 1.375,
112
+ "unit": "rem"
113
+ }
114
+ },
115
+ "24": {
116
+ "$type": "dimension",
117
+ "$description": "Font size 24px (1.5rem) — the step name is the px value at the default root font size.",
118
+ "$value": {
119
+ "value": 1.5,
120
+ "unit": "rem"
121
+ }
122
+ },
123
+ "30": {
124
+ "$type": "dimension",
125
+ "$description": "Font size 30px (1.875rem) — the step name is the px value at the default root font size.",
126
+ "$value": {
127
+ "value": 1.875,
128
+ "unit": "rem"
129
+ }
130
+ },
131
+ "36": {
132
+ "$type": "dimension",
133
+ "$description": "Font size 36px (2.25rem) — the step name is the px value at the default root font size.",
134
+ "$value": {
135
+ "value": 2.25,
136
+ "unit": "rem"
137
+ }
138
+ },
139
+ "48": {
140
+ "$type": "dimension",
141
+ "$description": "Font size 48px (3rem) — the step name is the px value at the default root font size.",
142
+ "$value": {
143
+ "value": 3,
144
+ "unit": "rem"
145
+ }
146
+ },
147
+ "56": {
148
+ "$type": "dimension",
149
+ "$description": "Font size 56px (3.5rem) — the step name is the px value at the default root font size.",
150
+ "$value": {
151
+ "value": 3.5,
152
+ "unit": "rem"
153
+ }
154
+ },
155
+ "64": {
156
+ "$type": "dimension",
157
+ "$description": "Font size 64px (4rem) — the step name is the px value at the default root font size.",
158
+ "$value": {
159
+ "value": 4,
160
+ "unit": "rem"
161
+ }
162
+ }
163
+ },
164
+ "font-weight": {
165
+ "light": {
166
+ "$type": "fontWeight",
167
+ "$description": "Light (300) — large display text only; avoid at body sizes for legibility.",
168
+ "$value": 300
169
+ },
170
+ "regular": {
171
+ "$type": "fontWeight",
172
+ "$description": "Regular (400) — default body text weight.",
173
+ "$value": 400
174
+ },
175
+ "medium": {
176
+ "$type": "fontWeight",
177
+ "$description": "Medium (500) — subtle emphasis, labels, and navigation.",
178
+ "$value": 500
179
+ },
180
+ "semibold": {
181
+ "$type": "fontWeight",
182
+ "$description": "Semibold (600) — headings and strong emphasis.",
183
+ "$value": 600
184
+ },
185
+ "bold": {
186
+ "$type": "fontWeight",
187
+ "$description": "Bold (700) — highest emphasis; key figures and primary headings.",
188
+ "$value": 700
189
+ }
190
+ },
191
+ "line-height": {
192
+ "none": {
193
+ "$type": "number",
194
+ "$description": "Solid (1) — display headings set at their own size (48/48, 56/56, 64/64 in the prose scale).",
195
+ "$value": 1
196
+ },
197
+ "tight": {
198
+ "$type": "number",
199
+ "$description": "Tight (1.2) — large headings (36/30 in the prose scale).",
200
+ "$value": 1.2
201
+ },
202
+ "snug": {
203
+ "$type": "number",
204
+ "$description": "Snug (1.3333333) — mid-size headings (32/24, 40/30 in the prose scale).",
205
+ "$value": 1.3333333
206
+ },
207
+ "base": {
208
+ "$type": "number",
209
+ "$description": "Base (1.5) — default for UI text and dense content (24/16, 36/24 in the prose scale); meets WCAG 1.4.12 text-spacing.",
210
+ "$value": 1.5
211
+ },
212
+ "relaxed": {
213
+ "$type": "number",
214
+ "$description": "Relaxed (1.6) — subheadings and lead text (32/20 in the prose scale).",
215
+ "$value": 1.6
216
+ },
217
+ "loose": {
218
+ "$type": "number",
219
+ "$description": "Loose (1.75) — long-form body text (28/16 in the prose scale).",
220
+ "$value": 1.75
221
+ }
222
+ },
223
+ "letter-spacing": {
224
+ "tight": {
225
+ "$type": "number",
226
+ "$description": "Tight tracking (-0.0125em) — large display headings. Value is an em multiplier; string outputs render it with the em unit.",
227
+ "$value": -0.0125
228
+ },
229
+ "normal": {
230
+ "$type": "number",
231
+ "$description": "Normal tracking (0em) — default for body text. Value is an em multiplier; string outputs render it with the em unit.",
232
+ "$value": 0
233
+ },
234
+ "wide": {
235
+ "$type": "number",
236
+ "$description": "Wide tracking (0.025em) — small caps, overlines, and small labels. Value is an em multiplier; string outputs render it with the em unit.",
237
+ "$value": 0.025
238
+ }
239
+ }
240
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "radius": {
3
+ "none": {
4
+ "$type": "dimension",
5
+ "$description": "Square corners — tables, full-bleed surfaces, and elements flush to container edges.",
6
+ "$value": {
7
+ "value": 0,
8
+ "unit": "px"
9
+ }
10
+ },
11
+ "sm": {
12
+ "$type": "dimension",
13
+ "$description": "Small rounding — inputs, buttons, tags, and compact controls.",
14
+ "$value": {
15
+ "value": 4,
16
+ "unit": "px"
17
+ }
18
+ },
19
+ "md": {
20
+ "$type": "dimension",
21
+ "$description": "Medium rounding — cards, panels, and modals.",
22
+ "$value": {
23
+ "value": 8,
24
+ "unit": "px"
25
+ }
26
+ },
27
+ "lg": {
28
+ "$type": "dimension",
29
+ "$description": "Large rounding — hero surfaces and prominent containers.",
30
+ "$value": {
31
+ "value": 16,
32
+ "unit": "px"
33
+ }
34
+ },
35
+ "pill": {
36
+ "$type": "dimension",
37
+ "$description": "Fully rounded ends — pills, badges, and circular icon buttons.",
38
+ "$value": {
39
+ "value": 9999,
40
+ "unit": "px"
41
+ }
42
+ }
43
+ }
44
+ }