@trackunit/ui-design-tokens 0.0.69 → 0.0.72

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/index.cjs CHANGED
@@ -2,761 +2,755 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * A collection of all the tokens related to border radius in the theme.
7
- */
8
- const themeBorderRadius = {
9
- none: "0",
10
- sm: "0.125rem",
11
- DEFAULT: "0.25rem",
12
- md: "0.375rem",
13
- lg: "0.5rem",
14
- xl: "0.75rem",
15
- "2xl": "1rem",
16
- "3xl": "1.5rem",
17
- full: "9999px",
5
+ /**
6
+ * A collection of all the tokens related to border radius in the theme.
7
+ */
8
+ const themeBorderRadius = {
9
+ none: "0",
10
+ sm: "0.125rem",
11
+ DEFAULT: "0.25rem",
12
+ md: "0.375rem",
13
+ lg: "0.5rem",
14
+ xl: "0.75rem",
15
+ "2xl": "1rem",
16
+ "3xl": "1.5rem",
17
+ full: "9999px",
18
18
  };
19
19
 
20
- const DEFAULT_CHART_COLORS = [
21
- "#2580C7",
22
- "#36A2DA",
23
- "#3FBCEA",
24
- "#06708D",
25
- "#01B7A9",
26
- "#A2DEDA",
27
- "#F9E9A0",
28
- "#FDD008",
29
- "#FBB385",
30
- "#FF7373",
31
- "#E6BCF3",
32
- "#9D96F5",
33
- "#8378EA",
34
- "#96BFFF",
35
- "#979A9A",
36
- "#0065E5",
37
- "#FF5A5A",
38
- "#00A658",
39
- "#5AC8fA",
40
- "#5E5CE6",
41
- "#2066FF",
42
- "#FF9500",
43
- "#E2E8F0",
44
- ];
45
- /**
46
- * Re-ordered chart colors to ensure that adjacent colors are visually different.
47
- *
48
- * @returns {string[]} The reordered chart colors.
49
- */
50
- const getReorderedChartColors = () => [
51
- // DO NOT reorder the colors, or add new colors in the middle of the array until you verify that adjacent colors are visually different.
52
- // If you want to add a new color, you should almost always add it at the end of the array.
53
- DEFAULT_CHART_COLORS[0],
54
- DEFAULT_CHART_COLORS[4],
55
- DEFAULT_CHART_COLORS[7],
56
- DEFAULT_CHART_COLORS[9],
57
- DEFAULT_CHART_COLORS[12],
58
- DEFAULT_CHART_COLORS[5],
59
- DEFAULT_CHART_COLORS[6],
60
- DEFAULT_CHART_COLORS[8],
61
- DEFAULT_CHART_COLORS[10],
62
- DEFAULT_CHART_COLORS[1],
63
- DEFAULT_CHART_COLORS[11],
64
- DEFAULT_CHART_COLORS[3],
65
- DEFAULT_CHART_COLORS[2],
66
- DEFAULT_CHART_COLORS[13],
67
- DEFAULT_CHART_COLORS[22],
20
+ const DEFAULT_CHART_COLORS = [
21
+ "#2580C7",
22
+ "#36A2DA",
23
+ "#3FBCEA",
24
+ "#06708D",
25
+ "#01B7A9",
26
+ "#A2DEDA",
27
+ "#F9E9A0",
28
+ "#FDD008",
29
+ "#FBB385",
30
+ "#FF7373",
31
+ "#E6BCF3",
32
+ "#9D96F5",
33
+ "#8378EA",
34
+ "#96BFFF",
35
+ "#979A9A",
36
+ "#0065E5",
37
+ "#FF5A5A",
38
+ "#00A658",
39
+ "#5AC8fA",
40
+ "#5E5CE6",
41
+ "#2066FF",
42
+ "#FF9500",
43
+ "#E2E8F0",
44
+ ];
45
+ /**
46
+ * Re-ordered chart colors to ensure that adjacent colors are visually different.
47
+ *
48
+ * @returns {string[]} The reordered chart colors.
49
+ */
50
+ const getReorderedChartColors = () => [
51
+ // DO NOT reorder the colors, or add new colors in the middle of the array until you verify that adjacent colors are visually different.
52
+ // If you want to add a new color, you should almost always add it at the end of the array.
53
+ DEFAULT_CHART_COLORS[0],
54
+ DEFAULT_CHART_COLORS[4],
55
+ DEFAULT_CHART_COLORS[7],
56
+ DEFAULT_CHART_COLORS[9],
57
+ DEFAULT_CHART_COLORS[12],
58
+ DEFAULT_CHART_COLORS[5],
59
+ DEFAULT_CHART_COLORS[6],
60
+ DEFAULT_CHART_COLORS[8],
61
+ DEFAULT_CHART_COLORS[10],
62
+ DEFAULT_CHART_COLORS[1],
63
+ DEFAULT_CHART_COLORS[11],
64
+ DEFAULT_CHART_COLORS[3],
65
+ DEFAULT_CHART_COLORS[2],
66
+ DEFAULT_CHART_COLORS[13],
67
+ DEFAULT_CHART_COLORS[22],
68
68
  ];
69
69
 
70
- /**
71
- * Convert a css custom property from our design tokens to a useable css string.
72
- *
73
- * Our custom properties are saved as "rrr ggg bbb" rather than a full css color.
74
- *
75
- * This allows us to modify them with opacity values and more.
76
- *
77
- * @param variable CSS custom property for color
78
- * @example "--color-primart-400" --> "rgb(var(--color-primary-400) / var(--tw-bg-opacity)))"
79
- * @returns {string} Full css for using the color
80
- */
81
- function colorVariableToCss(variable) {
82
- return `rgb(var(${variable}) / var(--tw-bg-opacity))`;
70
+ /**
71
+ * Convert a css custom property from our design tokens to a useable css string.
72
+ *
73
+ * Our custom properties are saved as "rrr ggg bbb" rather than a full css color.
74
+ *
75
+ * This allows us to modify them with opacity values and more.
76
+ *
77
+ * @param variable CSS custom property for color
78
+ * @example "--color-primart-400" --> "rgb(var(--color-primary-400) / var(--tw-bg-opacity)))"
79
+ * @returns {string} Full css for using the color
80
+ */
81
+ function colorVariableToCss(variable) {
82
+ return `rgb(var(${variable}) / var(--tw-bg-opacity))`;
83
83
  }
84
84
 
85
- function componentToHex(c) {
86
- if (c === null || c === undefined) {
87
- return "00";
88
- }
89
- const hex = c.toString(16);
90
- return hex.length === 1 ? "0" + hex : hex;
91
- }
92
- function rgbToHex(r, g, b) {
93
- if (isNaN(r) || isNaN(g) || isNaN(b)) {
94
- return "#000000";
95
- }
96
- return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
97
- }
98
- /**
99
- * Returns the HEX color based on a Color from the theme.
100
- * Reads the RGB value from the underlying CSS variable and convert to HEX.
101
- *
102
- * Example: color("PRIMARY", 500, "HEX") -> #3b82f6
103
- *
104
- * @param variable A color from the `colors` object of the Theme
105
- * @returns {string} HEX color
106
- */
107
- const getHEX = (variable) => {
108
- var _a, _b;
109
- const regex = /rgb\(var\((.*?)\) \/ var\(--tw-bg-opacity\)\)/g;
110
- const root = document.documentElement;
111
- const match = regex.exec(variable);
112
- const colorValue = getComputedStyle(root).getPropertyValue((_b = (_a = match === null || match === void 0 ? void 0 : match[1]) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : variable);
113
- const RGB = colorValue
114
- .trim()
115
- .split(" ")
116
- .map(channel => Number(channel));
117
- return rgbToHex(RGB[0], RGB[1], RGB[2]);
85
+ function componentToHex(c) {
86
+ if (c === null || c === undefined) {
87
+ return "00";
88
+ }
89
+ const hex = c.toString(16);
90
+ return hex.length === 1 ? "0" + hex : hex;
91
+ }
92
+ function rgbToHex(r, g, b) {
93
+ if (isNaN(r) || isNaN(g) || isNaN(b)) {
94
+ return "#000000";
95
+ }
96
+ return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
97
+ }
98
+ /**
99
+ * Returns the HEX color based on a Color from the theme.
100
+ * Reads the RGB value from the underlying CSS variable and convert to HEX.
101
+ *
102
+ * Example: color("PRIMARY", 500, "HEX") -> #3b82f6
103
+ *
104
+ * @param variable A color from the `colors` object of the Theme
105
+ * @returns {string} HEX color
106
+ */
107
+ const getHEX = (variable) => {
108
+ var _a, _b;
109
+ const regex = /rgb\(var\((.*?)\) \/ var\(--tw-bg-opacity\)\)/g;
110
+ const root = document.documentElement;
111
+ const match = regex.exec(variable);
112
+ const colorValue = getComputedStyle(root).getPropertyValue((_b = (_a = match === null || match === void 0 ? void 0 : match[1]) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : variable);
113
+ const RGB = colorValue
114
+ .trim()
115
+ .split(" ")
116
+ .map(channel => Number(channel));
117
+ return rgbToHex(RGB[0], RGB[1], RGB[2]);
118
118
  };
119
119
 
120
- /**
121
- * The Tailwind color palette.
122
- * Contains the full tailwind default color theme.
123
- */
124
- const tailwindPalette = {
125
- slate: {
126
- 50: "248 250 252",
127
- 100: "241 245 249",
128
- 200: "226 232 240",
129
- 300: "203 213 225",
130
- 400: "148 163 184",
131
- 500: "100 116 139",
132
- 600: "71 85 105",
133
- 700: "51 65 85",
134
- 800: "30 41 59",
135
- 900: "15 23 42",
136
- },
137
- gray: {
138
- 50: "249 250 251",
139
- 100: "243 244 246",
140
- 200: "229 231 235",
141
- 300: "209 213 219",
142
- 400: "156 163 175",
143
- 500: "107 114 128",
144
- 600: "75 85 99",
145
- 700: "55 65 81",
146
- 800: "31 41 55",
147
- 900: "17 24 39",
148
- },
149
- zinc: {
150
- 50: "250 250 250",
151
- 100: "244 244 245",
152
- 200: "228 228 231",
153
- 300: "212 212 216",
154
- 400: "161 161 170",
155
- 500: "113 113 122",
156
- 600: "82 82 91",
157
- 700: "63 63 70",
158
- 800: "39 39 42",
159
- 900: "24 24 27",
160
- },
161
- neutral: {
162
- 50: "250 250 250",
163
- 100: "245 245 245",
164
- 200: "229 229 229",
165
- 300: "212 212 212",
166
- 400: "163 163 163",
167
- 500: "115 115 115",
168
- 600: "82 82 82",
169
- 700: "64 64 64",
170
- 800: "38 38 38",
171
- 900: "23 23 23",
172
- },
173
- stone: {
174
- 50: "250 250 249",
175
- 100: "245 245 244",
176
- 200: "231 229 228",
177
- 300: "214 211 209",
178
- 400: "168 162 158",
179
- 500: "120 113 108",
180
- 600: "87 83 78",
181
- 700: "68 64 60",
182
- 800: "41 37 36",
183
- 900: "28 25 23",
184
- },
185
- red: {
186
- 50: "254 242 242",
187
- 100: "254 226 226",
188
- 200: "254 202 202",
189
- 300: "252 165 165",
190
- 400: "248 113 113",
191
- 500: "239 68 68",
192
- 600: "220 38 38",
193
- 700: "185 28 28",
194
- 800: "153 27 27",
195
- 900: "127 29 29",
196
- },
197
- orange: {
198
- 50: "255 247 237",
199
- 100: "255 237 213",
200
- 200: "254 215 170",
201
- 300: "253 186 116",
202
- 400: "251 146 60",
203
- 500: "249 115 22",
204
- 600: "234 88 12",
205
- 700: "194 65 12",
206
- 800: "154 52 18",
207
- 900: "124 45 18",
208
- },
209
- amber: {
210
- 50: "255 251 235",
211
- 100: "254 243 199",
212
- 200: "253 230 138",
213
- 300: "252 211 77",
214
- 400: "251 191 36",
215
- 500: "245 158 11",
216
- 600: "217 119 6",
217
- 700: "180 83 9",
218
- 800: "146 64 14",
219
- 900: "120 53 15",
220
- },
221
- yellow: {
222
- 50: "254 252 232",
223
- 100: "254 249 195",
224
- 200: "254 240 138",
225
- 300: "253 224 71",
226
- 400: "250 204 21",
227
- 500: "234 179 8",
228
- 600: "202 138 4",
229
- 700: "161 98 7",
230
- 800: "133 77 14",
231
- 900: "113 63 18",
232
- },
233
- lime: {
234
- 50: "247 254 231",
235
- 100: "236 252 203",
236
- 200: "217 249 157",
237
- 300: "190 242 100",
238
- 400: "163 230 53",
239
- 500: "132 204 22",
240
- 600: "101 163 13",
241
- 700: "77 124 15",
242
- 800: "63 98 18",
243
- 900: "54 83 20",
244
- },
245
- green: {
246
- 50: "240 253 244",
247
- 100: "220 252 231",
248
- 200: "187 247 208",
249
- 300: "134 239 172",
250
- 400: "74 222 128",
251
- 500: "34 197 94",
252
- 600: "22 163 74",
253
- 700: "21 128 61",
254
- 800: "22 101 52",
255
- 900: "20 83 45",
256
- },
257
- emerald: {
258
- 50: "236 253 245",
259
- 100: "209 250 229",
260
- 200: "167 243 208",
261
- 300: "110 231 183",
262
- 400: "52 211 153",
263
- 500: "16 185 129",
264
- 600: "5 150 105",
265
- 700: "4 120 87",
266
- 800: "6 95 70",
267
- 900: "6 78 59",
268
- },
269
- teal: {
270
- 50: "240 253 250",
271
- 100: "204 251 241",
272
- 200: "153 246 228",
273
- 300: "94 234 212",
274
- 400: "45 212 191",
275
- 500: "20 184 166",
276
- 600: "13 148 136",
277
- 700: "15 118 110",
278
- 800: "17 94 89",
279
- 900: "19 78 74",
280
- },
281
- cyan: {
282
- 50: "236 254 255",
283
- 100: "207 250 254",
284
- 200: "165 243 252",
285
- 300: "103 232 249",
286
- 400: "34 211 238",
287
- 500: "6 182 212",
288
- 600: "8 145 178",
289
- 700: "14 116 144",
290
- 800: "21 94 117",
291
- 900: "22 78 99",
292
- },
293
- sky: {
294
- 50: "240 249 255",
295
- 100: "224 242 254",
296
- 200: "186 230 253",
297
- 300: "125 211 252",
298
- 400: "56 189 248",
299
- 500: "14 165 233",
300
- 600: "2 132 199",
301
- 700: "3 105 161",
302
- 800: "7 89 133",
303
- 900: "12 74 110",
304
- },
305
- blue: {
306
- 50: "239 246 255",
307
- 100: "219 234 254",
308
- 200: "191 219 254",
309
- 300: "147 197 253",
310
- 400: "96 165 250",
311
- 500: "59 130 246",
312
- 600: "37 99 235",
313
- 700: "29 78 216",
314
- 800: "30 64 175",
315
- 900: "30 58 138",
316
- },
317
- indigo: {
318
- 50: "238 242 255",
319
- 100: "224 231 255",
320
- 200: "199 210 254",
321
- 300: "165 180 252",
322
- 400: "129 140 248",
323
- 500: "99 102 241",
324
- 600: "79 70 229",
325
- 700: "67 56 202",
326
- 800: "55 48 163",
327
- 900: "49 46 129",
328
- },
329
- violet: {
330
- 50: "245 243 255",
331
- 100: "237 233 254",
332
- 200: "221 214 254",
333
- 300: "196 181 253",
334
- 400: "167 139 250",
335
- 500: "139 92 246",
336
- 600: "124 58 237",
337
- 700: "109 40 217",
338
- 800: "91 33 182",
339
- 900: "76 29 149",
340
- },
341
- purple: {
342
- 50: "250 245 255",
343
- 100: "243 232 255",
344
- 200: "233 213 255",
345
- 300: "216 180 254",
346
- 400: "192 132 252",
347
- 500: "168 85 247",
348
- 600: "147 51 234",
349
- 700: "126 34 206",
350
- 800: "107 33 168",
351
- 900: "88 28 135",
352
- },
353
- fuchsia: {
354
- 50: "253 244 255",
355
- 100: "250 232 255",
356
- 200: "245 208 254",
357
- 300: "240 171 252",
358
- 400: "232 121 249",
359
- 500: "217 70 239",
360
- 600: "192 38 211",
361
- 700: "162 28 175",
362
- 800: "134 25 143",
363
- 900: "112 26 117",
364
- },
365
- pink: {
366
- 50: "253 242 248",
367
- 100: "252 231 243",
368
- 200: "251 207 232",
369
- 300: "249 168 212",
370
- 400: "244 114 182",
371
- 500: "236 72 153",
372
- 600: "219 39 119",
373
- 700: "190 24 93",
374
- 800: "157 23 77",
375
- 900: "131 24 67",
376
- },
377
- rose: {
378
- 50: "255 241 242",
379
- 100: "255 228 230",
380
- 200: "254 205 211",
381
- 300: "253 164 175",
382
- 400: "251 113 133",
383
- 500: "244 63 94",
384
- 600: "225 29 72",
385
- 700: "190 18 60",
386
- 800: "159 18 57",
387
- 900: "136 19 55",
388
- },
120
+ /**
121
+ * The Tailwind color palette.
122
+ * Contains the full tailwind default color theme.
123
+ */
124
+ const tailwindPalette = {
125
+ slate: {
126
+ 50: "248 250 252",
127
+ 100: "241 245 249",
128
+ 200: "226 232 240",
129
+ 300: "203 213 225",
130
+ 400: "148 163 184",
131
+ 500: "100 116 139",
132
+ 600: "71 85 105",
133
+ 700: "51 65 85",
134
+ 800: "30 41 59",
135
+ 900: "15 23 42",
136
+ },
137
+ gray: {
138
+ 50: "249 250 251",
139
+ 100: "243 244 246",
140
+ 200: "229 231 235",
141
+ 300: "209 213 219",
142
+ 400: "156 163 175",
143
+ 500: "107 114 128",
144
+ 600: "75 85 99",
145
+ 700: "55 65 81",
146
+ 800: "31 41 55",
147
+ 900: "17 24 39",
148
+ },
149
+ zinc: {
150
+ 50: "250 250 250",
151
+ 100: "244 244 245",
152
+ 200: "228 228 231",
153
+ 300: "212 212 216",
154
+ 400: "161 161 170",
155
+ 500: "113 113 122",
156
+ 600: "82 82 91",
157
+ 700: "63 63 70",
158
+ 800: "39 39 42",
159
+ 900: "24 24 27",
160
+ },
161
+ neutral: {
162
+ 50: "250 250 250",
163
+ 100: "245 245 245",
164
+ 200: "229 229 229",
165
+ 300: "212 212 212",
166
+ 400: "163 163 163",
167
+ 500: "115 115 115",
168
+ 600: "82 82 82",
169
+ 700: "64 64 64",
170
+ 800: "38 38 38",
171
+ 900: "23 23 23",
172
+ },
173
+ stone: {
174
+ 50: "250 250 249",
175
+ 100: "245 245 244",
176
+ 200: "231 229 228",
177
+ 300: "214 211 209",
178
+ 400: "168 162 158",
179
+ 500: "120 113 108",
180
+ 600: "87 83 78",
181
+ 700: "68 64 60",
182
+ 800: "41 37 36",
183
+ 900: "28 25 23",
184
+ },
185
+ red: {
186
+ 50: "254 242 242",
187
+ 100: "254 226 226",
188
+ 200: "254 202 202",
189
+ 300: "252 165 165",
190
+ 400: "248 113 113",
191
+ 500: "239 68 68",
192
+ 600: "220 38 38",
193
+ 700: "185 28 28",
194
+ 800: "153 27 27",
195
+ 900: "127 29 29",
196
+ },
197
+ orange: {
198
+ 50: "255 247 237",
199
+ 100: "255 237 213",
200
+ 200: "254 215 170",
201
+ 300: "253 186 116",
202
+ 400: "251 146 60",
203
+ 500: "249 115 22",
204
+ 600: "234 88 12",
205
+ 700: "194 65 12",
206
+ 800: "154 52 18",
207
+ 900: "124 45 18",
208
+ },
209
+ amber: {
210
+ 50: "255 251 235",
211
+ 100: "254 243 199",
212
+ 200: "253 230 138",
213
+ 300: "252 211 77",
214
+ 400: "251 191 36",
215
+ 500: "245 158 11",
216
+ 600: "217 119 6",
217
+ 700: "180 83 9",
218
+ 800: "146 64 14",
219
+ 900: "120 53 15",
220
+ },
221
+ yellow: {
222
+ 50: "254 252 232",
223
+ 100: "254 249 195",
224
+ 200: "254 240 138",
225
+ 300: "253 224 71",
226
+ 400: "250 204 21",
227
+ 500: "234 179 8",
228
+ 600: "202 138 4",
229
+ 700: "161 98 7",
230
+ 800: "133 77 14",
231
+ 900: "113 63 18",
232
+ },
233
+ lime: {
234
+ 50: "247 254 231",
235
+ 100: "236 252 203",
236
+ 200: "217 249 157",
237
+ 300: "190 242 100",
238
+ 400: "163 230 53",
239
+ 500: "132 204 22",
240
+ 600: "101 163 13",
241
+ 700: "77 124 15",
242
+ 800: "63 98 18",
243
+ 900: "54 83 20",
244
+ },
245
+ green: {
246
+ 50: "240 253 244",
247
+ 100: "220 252 231",
248
+ 200: "187 247 208",
249
+ 300: "134 239 172",
250
+ 400: "74 222 128",
251
+ 500: "34 197 94",
252
+ 600: "22 163 74",
253
+ 700: "21 128 61",
254
+ 800: "22 101 52",
255
+ 900: "20 83 45",
256
+ },
257
+ emerald: {
258
+ 50: "236 253 245",
259
+ 100: "209 250 229",
260
+ 200: "167 243 208",
261
+ 300: "110 231 183",
262
+ 400: "52 211 153",
263
+ 500: "16 185 129",
264
+ 600: "5 150 105",
265
+ 700: "4 120 87",
266
+ 800: "6 95 70",
267
+ 900: "6 78 59",
268
+ },
269
+ teal: {
270
+ 50: "240 253 250",
271
+ 100: "204 251 241",
272
+ 200: "153 246 228",
273
+ 300: "94 234 212",
274
+ 400: "45 212 191",
275
+ 500: "20 184 166",
276
+ 600: "13 148 136",
277
+ 700: "15 118 110",
278
+ 800: "17 94 89",
279
+ 900: "19 78 74",
280
+ },
281
+ cyan: {
282
+ 50: "236 254 255",
283
+ 100: "207 250 254",
284
+ 200: "165 243 252",
285
+ 300: "103 232 249",
286
+ 400: "34 211 238",
287
+ 500: "6 182 212",
288
+ 600: "8 145 178",
289
+ 700: "14 116 144",
290
+ 800: "21 94 117",
291
+ 900: "22 78 99",
292
+ },
293
+ sky: {
294
+ 50: "240 249 255",
295
+ 100: "224 242 254",
296
+ 200: "186 230 253",
297
+ 300: "125 211 252",
298
+ 400: "56 189 248",
299
+ 500: "14 165 233",
300
+ 600: "2 132 199",
301
+ 700: "3 105 161",
302
+ 800: "7 89 133",
303
+ 900: "12 74 110",
304
+ },
305
+ blue: {
306
+ 50: "239 246 255",
307
+ 100: "219 234 254",
308
+ 200: "191 219 254",
309
+ 300: "147 197 253",
310
+ 400: "96 165 250",
311
+ 500: "59 130 246",
312
+ 600: "37 99 235",
313
+ 700: "29 78 216",
314
+ 800: "30 64 175",
315
+ 900: "30 58 138",
316
+ },
317
+ indigo: {
318
+ 50: "238 242 255",
319
+ 100: "224 231 255",
320
+ 200: "199 210 254",
321
+ 300: "165 180 252",
322
+ 400: "129 140 248",
323
+ 500: "99 102 241",
324
+ 600: "79 70 229",
325
+ 700: "67 56 202",
326
+ 800: "55 48 163",
327
+ 900: "49 46 129",
328
+ },
329
+ violet: {
330
+ 50: "245 243 255",
331
+ 100: "237 233 254",
332
+ 200: "221 214 254",
333
+ 300: "196 181 253",
334
+ 400: "167 139 250",
335
+ 500: "139 92 246",
336
+ 600: "124 58 237",
337
+ 700: "109 40 217",
338
+ 800: "91 33 182",
339
+ 900: "76 29 149",
340
+ },
341
+ purple: {
342
+ 50: "250 245 255",
343
+ 100: "243 232 255",
344
+ 200: "233 213 255",
345
+ 300: "216 180 254",
346
+ 400: "192 132 252",
347
+ 500: "168 85 247",
348
+ 600: "147 51 234",
349
+ 700: "126 34 206",
350
+ 800: "107 33 168",
351
+ 900: "88 28 135",
352
+ },
353
+ fuchsia: {
354
+ 50: "253 244 255",
355
+ 100: "250 232 255",
356
+ 200: "245 208 254",
357
+ 300: "240 171 252",
358
+ 400: "232 121 249",
359
+ 500: "217 70 239",
360
+ 600: "192 38 211",
361
+ 700: "162 28 175",
362
+ 800: "134 25 143",
363
+ 900: "112 26 117",
364
+ },
365
+ pink: {
366
+ 50: "253 242 248",
367
+ 100: "252 231 243",
368
+ 200: "251 207 232",
369
+ 300: "249 168 212",
370
+ 400: "244 114 182",
371
+ 500: "236 72 153",
372
+ 600: "219 39 119",
373
+ 700: "190 24 93",
374
+ 800: "157 23 77",
375
+ 900: "131 24 67",
376
+ },
377
+ rose: {
378
+ 50: "255 241 242",
379
+ 100: "255 228 230",
380
+ 200: "254 205 211",
381
+ 300: "253 164 175",
382
+ 400: "251 113 133",
383
+ 500: "244 63 94",
384
+ 600: "225 29 72",
385
+ 700: "190 18 60",
386
+ 800: "159 18 57",
387
+ 900: "136 19 55",
388
+ },
389
389
  };
390
390
 
391
- /**
392
- * The general color palette
393
- * Should be available in most if not all colored components
394
- */
395
- const generalPalette = {
396
- PRIMARY: tailwindPalette.blue,
397
- SECONDARY: tailwindPalette.slate,
398
- ACCENT: tailwindPalette.cyan,
399
- NEUTRAL: tailwindPalette.neutral,
400
- BLACK: { DEFAULT: "26 27 28" },
401
- WHITE: { DEFAULT: "255 255 255" },
402
- };
403
- /**
404
- * The intent color palette
405
- * Should be available for most colored components such as "Button", "Alert", "Indicator", "Badge"
406
- */
407
- const intentPalette = {
408
- INFO: tailwindPalette.blue,
409
- SUCCESS: tailwindPalette.green,
410
- WARNING: tailwindPalette.amber,
411
- DANGER: tailwindPalette.red,
412
- };
413
- /**
414
- * The Criticality color palette
415
- * Should be available in any component that could be used to display the criticality of an asset or event
416
- */
417
- const criticalityPalette = {
418
- GOOD: tailwindPalette.emerald,
419
- LOW: tailwindPalette.amber,
420
- CRITICAL: tailwindPalette.red,
421
- };
422
- /**
423
- * The Activity color palette
424
- * Should be available in any component that could be used to display the Activity state of an asset
425
- */
426
- const activityPalette = {
427
- WORKING: tailwindPalette.blue,
428
- IDLE: tailwindPalette.orange,
429
- STOPPED: tailwindPalette.violet,
430
- UNKNOWN: tailwindPalette.neutral,
431
- MOVING: { DEFAULT: "230 144 177" },
432
- ACTIVE: { DEFAULT: "63 219 147" },
433
- };
434
- /**
435
- * The Utilization color palette
436
- * Should be available in any component that could be used to display the Activity state of an asset
437
- */
438
- const utilizationPalette = {
439
- UNUSED: { 300: tailwindPalette.red["300"], 400: tailwindPalette.red["400"] },
440
- UTILIZED: { 400: tailwindPalette.blue["400"], 600: tailwindPalette.blue["600"] },
441
- HEAVILY_UTILIZED: { 300: tailwindPalette.amber["300"], 500: tailwindPalette.amber["500"] },
442
- };
443
- /**
444
- * The Rental status color palette
445
- * Should be available in any component that could be used to display the rental status of an asset
446
- */
447
- const rentalStatusPalette = {
448
- ON_RENT: { 100: "223 244 254", 600: "90 200 250" },
449
- RETURNED: { 100: "230 202 255", 600: "176 90 255" },
450
- AVAILABLE: { 100: "206 255 232", 600: "0 166 88" },
451
- PICKUP_READY: { 100: "255 236 209", 600: "255 149 0" },
452
- TRANSFER: { 100: "255 248 217", 600: "253 208 8" },
453
- IN_REPAIR: { 100: "255 233 233", 600: "255 90 90" },
454
- OTHER_RENTAL_STATUS: { 100: "238 239 239", 600: "151 154 154" },
455
- };
456
- /**
457
- * Colors of the different site types.
458
- *
459
- * The generator has an issue with underscores in variant names, which is why they are not used below.
460
- */
461
- const sitesPalette = {
462
- SITE: {
463
- AREA: tailwindPalette.blue["600"],
464
- CLASSIC_POI: tailwindPalette.neutral["500"],
465
- CLASSIC_ZONE: tailwindPalette.neutral["500"],
466
- DEPOT: tailwindPalette.emerald["500"],
467
- WORK_PLACE: tailwindPalette.violet["600"],
468
- CONSTRUCTION_SITE: tailwindPalette.amber["500"],
469
- UNKNOWN: tailwindPalette.neutral["500"],
470
- },
471
- };
472
- /**
473
- * Grouped Theme Colors
474
- */
475
- const groupedPalettes = {
476
- // General
477
- GENERAL: generalPalette,
478
- // UI Intent
479
- INTENT: intentPalette,
480
- // Asset Criticality
481
- CRITICALITY: criticalityPalette,
482
- // Activity
483
- ACTIVITY: activityPalette,
484
- // Utilization
485
- UTILIZATION: utilizationPalette,
486
- // Rental
487
- RENTAL: rentalStatusPalette,
488
- // Sites
489
- SITES: sitesPalette,
490
- };
491
- /**
492
- * The full theme color palette (flattened)
493
- */
391
+ /**
392
+ * The general color palette
393
+ * Should be available in most if not all colored components
394
+ */
395
+ const generalPalette = {
396
+ PRIMARY: tailwindPalette.blue,
397
+ SECONDARY: tailwindPalette.slate,
398
+ ACCENT: tailwindPalette.cyan,
399
+ NEUTRAL: tailwindPalette.neutral,
400
+ BLACK: { DEFAULT: "26 27 28" },
401
+ WHITE: { DEFAULT: "255 255 255" },
402
+ };
403
+ /**
404
+ * The intent color palette
405
+ * Should be available for most colored components such as "Button", "Alert", "Indicator", "Badge"
406
+ */
407
+ const intentPalette = {
408
+ INFO: tailwindPalette.blue,
409
+ SUCCESS: tailwindPalette.green,
410
+ WARNING: tailwindPalette.amber,
411
+ DANGER: tailwindPalette.red,
412
+ };
413
+ /**
414
+ * The Criticality color palette
415
+ * Should be available in any component that could be used to display the criticality of an asset or event
416
+ */
417
+ const criticalityPalette = {
418
+ GOOD: tailwindPalette.emerald,
419
+ LOW: tailwindPalette.amber,
420
+ CRITICAL: tailwindPalette.red,
421
+ };
422
+ /**
423
+ * The Activity color palette
424
+ * Should be available in any component that could be used to display the Activity state of an asset
425
+ */
426
+ const activityPalette = {
427
+ WORKING: tailwindPalette.blue,
428
+ IDLE: tailwindPalette.orange,
429
+ STOPPED: tailwindPalette.violet,
430
+ UNKNOWN: tailwindPalette.neutral,
431
+ MOVING: { DEFAULT: "230 144 177" },
432
+ ACTIVE: { DEFAULT: "63 219 147" },
433
+ };
434
+ /**
435
+ * The Utilization color palette
436
+ * Should be available in any component that could be used to display the Activity state of an asset
437
+ */
438
+ const utilizationPalette = {
439
+ UNUSED: { 300: tailwindPalette.red["300"], 400: tailwindPalette.red["400"] },
440
+ UTILIZED: { 400: tailwindPalette.blue["400"], 600: tailwindPalette.blue["600"] },
441
+ HEAVILY_UTILIZED: { 300: tailwindPalette.amber["300"], 500: tailwindPalette.amber["500"] },
442
+ };
443
+ /**
444
+ * The Rental status color palette
445
+ * Should be available in any component that could be used to display the rental status of an asset
446
+ */
447
+ const rentalStatusPalette = {
448
+ ON_RENT: { 100: "223 244 254", 600: "90 200 250" },
449
+ RETURNED: { 100: "230 202 255", 600: "176 90 255" },
450
+ AVAILABLE: { 100: "206 255 232", 600: "0 166 88" },
451
+ PICKUP_READY: { 100: "255 236 209", 600: "255 149 0" },
452
+ TRANSFER: { 100: "255 248 217", 600: "253 208 8" },
453
+ IN_REPAIR: { 100: "255 233 233", 600: "255 90 90" },
454
+ OTHER_RENTAL_STATUS: { 100: "238 239 239", 600: "151 154 154" },
455
+ };
456
+ /**
457
+ * Colors of the different site types.
458
+ *
459
+ * The generator has an issue with underscores in variant names, which is why they are not used below.
460
+ */
461
+ const sitesPalette = {
462
+ SITE: {
463
+ AREA: tailwindPalette.blue["600"],
464
+ CLASSIC_POI: tailwindPalette.neutral["500"],
465
+ CLASSIC_ZONE: tailwindPalette.neutral["500"],
466
+ DEPOT: tailwindPalette.emerald["500"],
467
+ WORK_PLACE: tailwindPalette.violet["600"],
468
+ CONSTRUCTION_SITE: tailwindPalette.amber["500"],
469
+ UNKNOWN: tailwindPalette.neutral["500"],
470
+ },
471
+ };
472
+ /**
473
+ * Grouped Theme Colors
474
+ */
475
+ const groupedPalettes = {
476
+ // General
477
+ GENERAL: generalPalette,
478
+ // UI Intent
479
+ INTENT: intentPalette,
480
+ // Asset Criticality
481
+ CRITICALITY: criticalityPalette,
482
+ // Activity
483
+ ACTIVITY: activityPalette,
484
+ // Utilization
485
+ UTILIZATION: utilizationPalette,
486
+ // Rental
487
+ RENTAL: rentalStatusPalette,
488
+ // Sites
489
+ SITES: sitesPalette,
490
+ };
491
+ /**
492
+ * The full theme color palette (flattened)
493
+ */
494
494
  const trackunitPalette = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generalPalette), intentPalette), criticalityPalette), activityPalette), utilizationPalette), rentalStatusPalette), sitesPalette);
495
495
 
496
- /**
497
- * A collection of all the tokens related to the named colors in the default theme.
498
- */
499
- /**
500
- * An object of all the Trackunit Theme colors and their available variants.
501
- * These colors does not include the default tailwind colors.
502
- */
503
- const themeColors = {
504
- PRIMARY: { name: "primary", variants: trackunitPalette.PRIMARY },
505
- SECONDARY: { name: "secondary", variants: trackunitPalette.SECONDARY },
506
- ACCENT: { name: "accent", variants: trackunitPalette.ACCENT },
507
- NEUTRAL: { name: "neutral", variants: trackunitPalette.NEUTRAL },
508
- BLACK: { name: "black", variants: trackunitPalette.BLACK, defaultVariant: "DEFAULT" },
509
- WHITE: { name: "white", variants: trackunitPalette.WHITE, defaultVariant: "DEFAULT" },
510
- INFO: { name: "info", variants: trackunitPalette.INFO },
511
- SUCCESS: { name: "success", variants: trackunitPalette.SUCCESS },
512
- WARNING: { name: "warning", variants: trackunitPalette.WARNING },
513
- DANGER: { name: "danger", variants: trackunitPalette.DANGER },
514
- GOOD: { name: "good", variants: trackunitPalette.GOOD },
515
- LOW: { name: "low", variants: trackunitPalette.LOW },
516
- CRITICAL: { name: "critical", variants: trackunitPalette.CRITICAL },
517
- WORKING: { name: "working", variants: trackunitPalette.WORKING },
518
- IDLE: { name: "idle", variants: trackunitPalette.IDLE },
519
- STOPPED: { name: "stopped", variants: trackunitPalette.STOPPED },
520
- ACTIVE: { name: "active", variants: trackunitPalette.ACTIVE, defaultVariant: "DEFAULT" },
521
- MOVING: { name: "moving", variants: trackunitPalette.MOVING, defaultVariant: "DEFAULT" },
522
- UNKNOWN: { name: "unknown", variants: trackunitPalette.UNKNOWN },
523
- AVAILABLE: { name: "available", variants: trackunitPalette.AVAILABLE },
524
- UNUSED: { name: "unused", variants: trackunitPalette.UNUSED },
525
- UTILIZED: { name: "utilized", variants: trackunitPalette.UTILIZED },
526
- HEAVILY_UTILIZED: { name: "heavily_utilized", variants: trackunitPalette.HEAVILY_UTILIZED },
527
- IN_REPAIR: { name: "in_repair", variants: trackunitPalette.IN_REPAIR },
528
- ON_RENT: { name: "on_rent", variants: trackunitPalette.ON_RENT },
529
- OTHER_RENTAL_STATUS: { name: "other_rental_status", variants: trackunitPalette.OTHER_RENTAL_STATUS },
530
- PICKUP_READY: { name: "pickup_ready", variants: trackunitPalette.PICKUP_READY },
531
- RETURNED: { name: "returned", variants: trackunitPalette.RETURNED },
532
- TRANSFER: { name: "transfer", variants: trackunitPalette.TRANSFER },
533
- SITE: { name: "site", variants: trackunitPalette.SITE },
496
+ /**
497
+ * A collection of all the tokens related to the named colors in the default theme.
498
+ */
499
+ /**
500
+ * An object of all the Trackunit Theme colors and their available variants.
501
+ * These colors does not include the default tailwind colors.
502
+ */
503
+ const themeColors = {
504
+ PRIMARY: { name: "primary", variants: trackunitPalette.PRIMARY },
505
+ SECONDARY: { name: "secondary", variants: trackunitPalette.SECONDARY },
506
+ ACCENT: { name: "accent", variants: trackunitPalette.ACCENT },
507
+ NEUTRAL: { name: "neutral", variants: trackunitPalette.NEUTRAL },
508
+ BLACK: { name: "black", variants: trackunitPalette.BLACK, defaultVariant: "DEFAULT" },
509
+ WHITE: { name: "white", variants: trackunitPalette.WHITE, defaultVariant: "DEFAULT" },
510
+ INFO: { name: "info", variants: trackunitPalette.INFO },
511
+ SUCCESS: { name: "success", variants: trackunitPalette.SUCCESS },
512
+ WARNING: { name: "warning", variants: trackunitPalette.WARNING },
513
+ DANGER: { name: "danger", variants: trackunitPalette.DANGER },
514
+ GOOD: { name: "good", variants: trackunitPalette.GOOD },
515
+ LOW: { name: "low", variants: trackunitPalette.LOW },
516
+ CRITICAL: { name: "critical", variants: trackunitPalette.CRITICAL },
517
+ WORKING: { name: "working", variants: trackunitPalette.WORKING },
518
+ IDLE: { name: "idle", variants: trackunitPalette.IDLE },
519
+ STOPPED: { name: "stopped", variants: trackunitPalette.STOPPED },
520
+ ACTIVE: { name: "active", variants: trackunitPalette.ACTIVE, defaultVariant: "DEFAULT" },
521
+ MOVING: { name: "moving", variants: trackunitPalette.MOVING, defaultVariant: "DEFAULT" },
522
+ UNKNOWN: { name: "unknown", variants: trackunitPalette.UNKNOWN },
523
+ AVAILABLE: { name: "available", variants: trackunitPalette.AVAILABLE },
524
+ UNUSED: { name: "unused", variants: trackunitPalette.UNUSED },
525
+ UTILIZED: { name: "utilized", variants: trackunitPalette.UTILIZED },
526
+ HEAVILY_UTILIZED: { name: "heavily_utilized", variants: trackunitPalette.HEAVILY_UTILIZED },
527
+ IN_REPAIR: { name: "in_repair", variants: trackunitPalette.IN_REPAIR },
528
+ ON_RENT: { name: "on_rent", variants: trackunitPalette.ON_RENT },
529
+ OTHER_RENTAL_STATUS: { name: "other_rental_status", variants: trackunitPalette.OTHER_RENTAL_STATUS },
530
+ PICKUP_READY: { name: "pickup_ready", variants: trackunitPalette.PICKUP_READY },
531
+ RETURNED: { name: "returned", variants: trackunitPalette.RETURNED },
532
+ TRANSFER: { name: "transfer", variants: trackunitPalette.TRANSFER },
533
+ SITE: { name: "site", variants: trackunitPalette.SITE },
534
534
  };
535
535
 
536
- const outputOptions = ["HEX", "CSS"];
537
- /**
538
- *
539
- Returns the color value in CSS or HEX format for a given theme color and variant.
540
- *
541
- @param ColorKey - A valid theme color name from the available ThemeColorKeys.
542
- @param {unknown} [arg2] - An optional argument that can be either an OutputOptions or a variant value.
543
- @param {unknown} [arg3] - An optional argument that can be either an OutputOptions or a variant value.
544
- @returns {string} - Returns a string containing the color value in CSS or HEX format for the provided arguments.
545
- */
546
- function color(ColorKey, arg2, arg3) {
547
- var _a, _b;
548
- const colorName = themeColors[ColorKey].name;
549
- const colorVariants = themeColors[ColorKey].variants;
550
- // defaultVariant or 600 or the "middel" value available.
551
- const defaultVariant = (_b = (_a = themeColors[ColorKey].defaultVariant) !== null && _a !== void 0 ? _a : (colorVariants[600] && 600)) !== null && _b !== void 0 ? _b : Object.keys(colorVariants)[Math.floor(Object.keys(colorVariants).length / 2)];
552
- let variant = defaultVariant;
553
- let output = "CSS";
554
- if (isOutputOption(arg2)) {
555
- output = arg2;
556
- }
557
- else {
558
- if (isOutputOption(arg3)) {
559
- output = arg3;
560
- }
561
- if (isValidVariant(colorVariants, arg2)) {
562
- variant = arg2;
563
- }
564
- }
565
- const variableName = `--color-${colorName}-${String(variant)}`.replace(/[^a-zA-Z0-9]/g, "-");
566
- if (output === "CSS") {
567
- return colorVariableToCss(variableName);
568
- }
569
- else if (output === "HEX") {
570
- return getHEX(variableName);
571
- }
572
- return colorName;
573
- }
574
- const isOutputOption = (something) => typeof something === "string" && outputOptions.includes(something);
536
+ const outputOptions = ["HEX", "CSS"];
537
+ /**
538
+ *
539
+ Returns the color value in CSS or HEX format for a given theme color and variant.
540
+ *
541
+ @param ColorKey - A valid theme color name from the available ThemeColorKeys.
542
+ @param {unknown} [arg2] - An optional argument that can be either an OutputOptions or a variant value.
543
+ @param {unknown} [arg3] - An optional argument that can be either an OutputOptions or a variant value.
544
+ @returns {string} - Returns a string containing the color value in CSS or HEX format for the provided arguments.
545
+ */
546
+ function color(ColorKey, arg2, arg3) {
547
+ var _a, _b;
548
+ const colorName = themeColors[ColorKey].name;
549
+ const colorVariants = themeColors[ColorKey].variants;
550
+ // defaultVariant or 600 or the "middel" value available.
551
+ const defaultVariant = (_b = (_a = themeColors[ColorKey].defaultVariant) !== null && _a !== void 0 ? _a :
552
+ // @ts-ignore - suppressImplicitAnyIndexErrors
553
+ (colorVariants[600] && 600)) !== null && _b !== void 0 ? _b : Object.keys(colorVariants)[Math.floor(Object.keys(colorVariants).length / 2)];
554
+ let variant = defaultVariant;
555
+ let output = "CSS";
556
+ if (isOutputOption(arg2)) {
557
+ output = arg2;
558
+ }
559
+ else {
560
+ if (isOutputOption(arg3)) {
561
+ output = arg3;
562
+ }
563
+ if (isValidVariant(colorVariants, arg2)) {
564
+ variant = arg2;
565
+ }
566
+ }
567
+ const variableName = `--color-${colorName}-${String(variant)}`.replace(/[^a-zA-Z0-9]/g, "-");
568
+ if (output === "CSS") {
569
+ return colorVariableToCss(variableName);
570
+ }
571
+ else if (output === "HEX") {
572
+ return getHEX(variableName);
573
+ }
574
+ return colorName;
575
+ }
576
+ const isOutputOption = (something) => typeof something === "string" && outputOptions.includes(something);
575
577
  const isValidVariant = (availableVariants, something) => Boolean(availableVariants[something]);
576
578
 
577
- /**
578
- * A collection of all the tokens related to elevation in the theme.
579
- */
580
- const themeBoxShadow = {
581
- sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
582
- DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
583
- md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
584
- lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
585
- xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
586
- "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
587
- inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
588
- none: "none",
589
- active: "0px 0px 1px 1px rgba(26, 27, 28, 0.13), 0px 1px 1px rgba(26, 27, 28, 0.15)",
590
- };
591
- /**
592
- * Elevation is based on N100 with an alpha channel. E(X)A variants
593
- * are for active versions(e.g. hover).
594
- */
595
- const elevation = {
596
- E05: themeBoxShadow.sm,
597
- E10: themeBoxShadow.DEFAULT,
598
- E10A: themeBoxShadow.md,
599
- E20: themeBoxShadow.lg,
600
- E30: themeBoxShadow.xl,
601
- E40: themeBoxShadow["2xl"],
579
+ /**
580
+ * A collection of all the tokens related to elevation in the theme.
581
+ */
582
+ const themeBoxShadow = {
583
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
584
+ DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
585
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
586
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
587
+ xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
588
+ "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
589
+ inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
590
+ none: "none",
591
+ active: "0px 0px 1px 1px rgba(26, 27, 28, 0.13), 0px 1px 1px rgba(26, 27, 28, 0.15)",
602
592
  };
603
-
604
- /**
605
- * A collection of all the tokens related to screen size in the theme.
606
- */
607
- const themeScreenSize = {
608
- xs: "0px",
609
- sm: "480px",
610
- md: "768px",
611
- lg: "1024px",
612
- xl: "1200px",
613
- "2xl": "1600px",
614
- "3xl": "1900px",
593
+ /**
594
+ * Elevation is based on N100 with an alpha channel. E(X)A variants
595
+ * are for active versions(e.g. hover).
596
+ */
597
+ const elevation = {
598
+ E05: themeBoxShadow.sm,
599
+ E10: themeBoxShadow.DEFAULT,
600
+ E10A: themeBoxShadow.md,
601
+ E20: themeBoxShadow.lg,
602
+ E30: themeBoxShadow.xl,
603
+ E40: themeBoxShadow["2xl"],
615
604
  };
616
605
 
617
- /**
618
- * A collection of all the tokens related to sizes in the theme.
619
- */
620
- const themeSpacing = {
621
- px: "1px",
622
- "0": "0px",
623
- "0.5": "0.125rem",
624
- "1": "0.25rem",
625
- "1.5": "0.375rem",
626
- "2": "0.5rem",
627
- "2.5": "0.625rem",
628
- "3": "0.75rem",
629
- "3.5": "0.875rem",
630
- "4": "1rem",
631
- "5": "1.25rem",
632
- "6": "1.5rem",
633
- "7": "1.75rem",
634
- "8": "2rem",
635
- "9": "2.25rem",
636
- "10": "2.5rem",
637
- "11": "2.75rem",
638
- "12": "3rem",
639
- "14": "3.5rem",
640
- "16": "4rem",
641
- "20": "5rem",
642
- "24": "6rem",
643
- "28": "7rem",
644
- "32": "8rem",
645
- "36": "9rem",
646
- "40": "10rem",
647
- "44": "11rem",
648
- "48": "12rem",
649
- "52": "13rem",
650
- "56": "14rem",
651
- "60": "15rem",
652
- "64": "16rem",
653
- "72": "18rem",
654
- "80": "20rem",
655
- "96": "24rem",
656
- };
657
- const size = {
658
- none: themeSpacing[0],
659
- tiny: themeSpacing[1],
660
- mini: themeSpacing[2],
661
- small: themeSpacing[3],
662
- medium: themeSpacing[4],
663
- large: themeSpacing[6],
664
- giant: themeSpacing[8],
665
- enormous: themeSpacing[10],
606
+ /**
607
+ * A collection of all the tokens related to screen size in the theme.
608
+ */
609
+ const themeScreenSize = {
610
+ xs: "0px",
611
+ sm: "480px",
612
+ md: "768px",
613
+ lg: "1024px",
614
+ xl: "1200px",
615
+ "2xl": "1600px",
616
+ "3xl": "1900px",
666
617
  };
667
618
 
668
- /**
669
- * A collection of all the tokens related to typography in the theme.
670
- */
671
- const themeFontSize = {
672
- xs: "0.75rem",
673
- sm: "0.875rem",
674
- base: "1rem",
675
- lg: "1.125rem",
676
- xl: "1.25rem",
677
- "2xl": "1.5rem",
678
- "3xl": "1.875rem",
679
- "4xl": "2.25rem",
680
- "5xl": "3rem",
681
- "6xl": "3.75rem",
682
- "7xl": "4.5rem",
683
- "8xl": "6rem",
684
- "9xl": "8rem",
685
- };
686
- const themeLineHeight = {
687
- xs: "1rem",
688
- sm: "1.25rem",
689
- base: "1.5rem",
690
- lg: "1.75rem",
691
- xl: "1.75rem",
692
- "2xl": "2rem",
693
- "3xl": "2.25rem",
694
- "4xl": "2.5rem",
695
- "5xl": "2.75rem",
696
- "6xl": "3rem",
697
- "7xl": "3.25rem",
698
- "8xl": "3.5rem",
699
- "9xl": "3.75rem",
700
- };
701
- const themeFontWeight = {
702
- thin: 100,
703
- extralight: 200,
704
- light: 300,
705
- normal: 400,
706
- medium: 500,
707
- bold: 600,
708
- extrabold: 700,
709
- black: 800,
710
- };
711
- /**
712
- * Based on a root size of 16px.
713
- */
714
- const fontSize = {
715
- primary: themeFontSize["3xl"],
716
- secondary: themeFontSize.lg,
717
- tertiary: themeFontSize.base,
718
- subtitle: themeFontSize.base,
719
- body: themeFontSize.sm,
720
- small: themeFontSize.xs, // 12px
721
- };
722
- /**
723
- * Primary font weights.
724
- */
725
- const fontWeight = {
726
- thin: themeFontWeight.thin,
727
- extralight: themeFontWeight.extralight,
728
- light: themeFontWeight.light,
729
- normal: themeFontWeight.normal,
730
- medium: themeFontWeight.medium,
731
- bold: themeFontWeight.bold,
732
- extrabold: themeFontWeight.extrabold,
733
- black: themeFontWeight.black,
619
+ /**
620
+ * A collection of all the tokens related to sizes in the theme.
621
+ */
622
+ const themeSpacing = {
623
+ px: "1px",
624
+ "0": "0px",
625
+ "0.5": "0.125rem",
626
+ "1": "0.25rem",
627
+ "1.5": "0.375rem",
628
+ "2": "0.5rem",
629
+ "2.5": "0.625rem",
630
+ "3": "0.75rem",
631
+ "3.5": "0.875rem",
632
+ "4": "1rem",
633
+ "5": "1.25rem",
634
+ "6": "1.5rem",
635
+ "7": "1.75rem",
636
+ "8": "2rem",
637
+ "9": "2.25rem",
638
+ "10": "2.5rem",
639
+ "11": "2.75rem",
640
+ "12": "3rem",
641
+ "14": "3.5rem",
642
+ "16": "4rem",
643
+ "20": "5rem",
644
+ "24": "6rem",
645
+ "28": "7rem",
646
+ "32": "8rem",
647
+ "36": "9rem",
648
+ "40": "10rem",
649
+ "44": "11rem",
650
+ "48": "12rem",
651
+ "52": "13rem",
652
+ "56": "14rem",
653
+ "60": "15rem",
654
+ "64": "16rem",
655
+ "72": "18rem",
656
+ "80": "20rem",
657
+ "96": "24rem",
658
+ };
659
+ const size = {
660
+ none: themeSpacing[0],
661
+ tiny: themeSpacing[1],
662
+ mini: themeSpacing[2],
663
+ small: themeSpacing[3],
664
+ medium: themeSpacing[4],
665
+ large: themeSpacing[6],
666
+ giant: themeSpacing[8],
667
+ enormous: themeSpacing[10],
734
668
  };
735
669
 
736
- const themeZIndex = {
737
- hidden: -1,
738
- default: 1,
739
- top: 5,
740
- overlay: 10,
741
- popover: 20,
742
- toast: 100,
743
- };
744
- const zIndex = {
745
- hidden: themeZIndex.hidden,
746
- default: themeZIndex.default,
747
- top: themeZIndex.top,
748
- overlay: themeZIndex.overlay,
749
- popover: themeZIndex.popover,
750
- toast: themeZIndex.toast,
670
+ /**
671
+ * A collection of all the tokens related to typography in the theme.
672
+ */
673
+ const themeFontSize = {
674
+ xs: "0.75rem",
675
+ sm: "0.875rem",
676
+ base: "1rem",
677
+ lg: "1.125rem",
678
+ xl: "1.25rem",
679
+ "2xl": "1.5rem",
680
+ "3xl": "1.875rem",
681
+ "4xl": "2.25rem",
682
+ "5xl": "3rem",
683
+ "6xl": "3.75rem",
684
+ "7xl": "4.5rem",
685
+ "8xl": "6rem",
686
+ "9xl": "8rem",
687
+ };
688
+ const themeLineHeight = {
689
+ xs: "1rem",
690
+ sm: "1.25rem",
691
+ base: "1.5rem",
692
+ lg: "1.75rem",
693
+ xl: "1.75rem",
694
+ "2xl": "2rem",
695
+ "3xl": "2.25rem",
696
+ "4xl": "2.5rem",
697
+ "5xl": "2.75rem",
698
+ "6xl": "3rem",
699
+ "7xl": "3.25rem",
700
+ "8xl": "3.5rem",
701
+ "9xl": "3.75rem",
751
702
  };
703
+ const themeFontWeight = {
704
+ thin: 100,
705
+ extralight: 200,
706
+ light: 300,
707
+ normal: 400,
708
+ medium: 500,
709
+ bold: 600,
710
+ extrabold: 700,
711
+ black: 800,
712
+ };
713
+ /**
714
+ * Based on a root size of 16px.
715
+ */
716
+ const fontSize = {
717
+ primary: themeFontSize["3xl"],
718
+ secondary: themeFontSize.lg,
719
+ tertiary: themeFontSize.base,
720
+ subtitle: themeFontSize.base,
721
+ body: themeFontSize.sm,
722
+ small: themeFontSize.xs, // 12px
723
+ };
724
+ /**
725
+ * Primary font weights.
726
+ */
727
+ const fontWeight = {
728
+ thin: themeFontWeight.thin,
729
+ extralight: themeFontWeight.extralight,
730
+ light: themeFontWeight.light,
731
+ normal: themeFontWeight.normal,
732
+ medium: themeFontWeight.medium,
733
+ bold: themeFontWeight.bold,
734
+ extrabold: themeFontWeight.extrabold,
735
+ black: themeFontWeight.black,
736
+ };
737
+ const fontFamily = `'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif`;
752
738
 
753
- const tokens = {
754
- size,
755
- fontSize,
756
- fontWeight,
757
- elevation,
758
- zIndex,
759
- fontFamily: `'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif`,
739
+ const themeZIndex = {
740
+ hidden: -1,
741
+ default: 1,
742
+ top: 5,
743
+ overlay: 10,
744
+ popover: 20,
745
+ toast: 100,
746
+ };
747
+ const zIndex = {
748
+ hidden: themeZIndex.hidden,
749
+ default: themeZIndex.default,
750
+ top: themeZIndex.top,
751
+ overlay: themeZIndex.overlay,
752
+ popover: themeZIndex.popover,
753
+ toast: themeZIndex.toast,
760
754
  };
761
755
 
762
756
  exports.DEFAULT_CHART_COLORS = DEFAULT_CHART_COLORS;
@@ -764,6 +758,7 @@ exports.activityPalette = activityPalette;
764
758
  exports.color = color;
765
759
  exports.criticalityPalette = criticalityPalette;
766
760
  exports.elevation = elevation;
761
+ exports.fontFamily = fontFamily;
767
762
  exports.fontSize = fontSize;
768
763
  exports.fontWeight = fontWeight;
769
764
  exports.generalPalette = generalPalette;
@@ -783,7 +778,6 @@ exports.themeLineHeight = themeLineHeight;
783
778
  exports.themeScreenSize = themeScreenSize;
784
779
  exports.themeSpacing = themeSpacing;
785
780
  exports.themeZIndex = themeZIndex;
786
- exports.tokens = tokens;
787
781
  exports.trackunitPalette = trackunitPalette;
788
782
  exports.utilizationPalette = utilizationPalette;
789
783
  exports.zIndex = zIndex;