@trackunit/ui-design-tokens 0.0.53 → 0.0.55

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.js CHANGED
@@ -404,6 +404,15 @@ const activityPalette = {
404
404
  MOVING: { DEFAULT: "230 144 177" },
405
405
  ACTIVE: { DEFAULT: "63 219 147" },
406
406
  };
407
+ /**
408
+ * The Utilization color palette
409
+ * Should be available in any component that could be used to display the Activity state of an asset
410
+ */
411
+ const utilizationPalette = {
412
+ UNUSED: { 300: tailwindPalette.red["300"], 400: tailwindPalette.red["400"] },
413
+ UTILIZED: { 400: tailwindPalette.blue["400"], 600: tailwindPalette.blue["600"] },
414
+ HEAVILY_UTILIZED: { 300: tailwindPalette.amber["300"], 500: tailwindPalette.amber["500"] },
415
+ };
407
416
  /**
408
417
  * The Rental status color palette
409
418
  * Should be available in any component that could be used to display the rental status of an asset
@@ -429,13 +438,15 @@ const groupedPalettes = {
429
438
  CRITICALITY: criticalityPalette,
430
439
  // Activity
431
440
  ACTIVITY: activityPalette,
441
+ // Utilization
442
+ UTILIZATION: utilizationPalette,
432
443
  // Rental
433
444
  RENTAL: rentalStatusPalette,
434
445
  };
435
446
  /**
436
447
  * The full theme color palette (flattened)
437
448
  */
438
- const trackunitPalette = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generalPalette), intentPalette), criticalityPalette), activityPalette), rentalStatusPalette);
449
+ const trackunitPalette = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generalPalette), intentPalette), criticalityPalette), activityPalette), utilizationPalette), rentalStatusPalette);
439
450
 
440
451
  /**
441
452
  * A collection of all the tokens related to the named colors in the default theme.
@@ -465,6 +476,9 @@ const themeColors = {
465
476
  MOVING: { name: "moving", variants: trackunitPalette.MOVING, defaultVariant: "DEFAULT" },
466
477
  UNKNOWN: { name: "unknown", variants: trackunitPalette.UNKNOWN },
467
478
  AVAILABLE: { name: "available", variants: trackunitPalette.AVAILABLE },
479
+ UNUSED: { name: "unused", variants: trackunitPalette.UNUSED },
480
+ UTILIZED: { name: "utilized", variants: trackunitPalette.UTILIZED },
481
+ HEAVILY_UTILIZED: { name: "heavily_utilized", variants: trackunitPalette.HEAVILY_UTILIZED },
468
482
  IN_REPAIR: { name: "in_repair", variants: trackunitPalette.IN_REPAIR },
469
483
  ON_RENT: { name: "on_rent", variants: trackunitPalette.ON_RENT },
470
484
  OTHER_RENTAL_STATUS: { name: "other_rental_status", variants: trackunitPalette.OTHER_RENTAL_STATUS },
@@ -573,4 +587,4 @@ const tokens = {
573
587
  fontFamily: `'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif`,
574
588
  };
575
589
 
576
- export { DEFAULT_CHART_COLORS, activityPalette, color, criticalityPalette, elevation, fontSize, fontWeight, generalPalette, getReorderedChartColors, groupedPalettes, intentPalette, rentalStatusPalette, tailwindPalette, themeColors, tokens, trackunitPalette };
590
+ export { DEFAULT_CHART_COLORS, activityPalette, color, criticalityPalette, elevation, fontSize, fontWeight, generalPalette, getReorderedChartColors, groupedPalettes, intentPalette, rentalStatusPalette, tailwindPalette, themeColors, tokens, trackunitPalette, utilizationPalette };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/ui-design-tokens",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "module": "./index.js",
@@ -1,7 +1,7 @@
1
1
  import { ColorVariants } from "./colors";
2
2
  import { ThemeColorKeys } from "./trackunitPalette";
3
3
  declare const outputOptions: readonly ["HEX", "CSS"];
4
- declare type OutputOptions = typeof outputOptions[number];
4
+ type OutputOptions = typeof outputOptions[number];
5
5
  /**
6
6
  * Typesafe function to get css variable or hex value of our colors.
7
7
  *
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { ThemeColorKeys, trackunitPalette } from "./trackunitPalette";
5
5
  /** Type used for available variants for a given ColorName */
6
- export declare type ColorVariants<ColorName extends ThemeColorKeys> = keyof typeof themeColors[ColorName]["variants"];
6
+ export type ColorVariants<ColorName extends ThemeColorKeys> = keyof typeof themeColors[ColorName]["variants"];
7
7
  export interface ThemeColorObject<T extends ThemeColorKeys> {
8
8
  name: Lowercase<T>;
9
9
  variants: {
@@ -11,7 +11,7 @@ export interface ThemeColorObject<T extends ThemeColorKeys> {
11
11
  };
12
12
  defaultVariant?: keyof typeof trackunitPalette[T];
13
13
  }
14
- export declare type ThemeColorsObject = {
14
+ export type ThemeColorsObject = {
15
15
  [key in ThemeColorKeys]: ThemeColorObject<key>;
16
16
  };
17
17
  /**
@@ -62,8 +62,8 @@ export declare const generalPalette: {
62
62
  * The general color palette
63
63
  * Should be available in most if not all colored components
64
64
  */
65
- export declare type GeneralColorKeys = keyof typeof generalPalette;
66
- export declare type GeneralColors = `${Lowercase<GeneralColorKeys>}`;
65
+ export type GeneralColorKeys = keyof typeof generalPalette;
66
+ export type GeneralColors = `${Lowercase<GeneralColorKeys>}`;
67
67
  /**
68
68
  * The intent color palette
69
69
  * Should be available for most colored components such as "Button", "Alert", "Indicator", "Badge"
@@ -122,8 +122,8 @@ export declare const intentPalette: {
122
122
  * The intent color palette
123
123
  * Should be available for most colored components such as "Button", "Alert", "Indicator", "Badge"
124
124
  */
125
- export declare type IntentColorKeys = keyof typeof intentPalette;
126
- export declare type IntentColors = `${Lowercase<IntentColorKeys>}`;
125
+ export type IntentColorKeys = keyof typeof intentPalette;
126
+ export type IntentColors = `${Lowercase<IntentColorKeys>}`;
127
127
  /**
128
128
  * The Criticality color palette
129
129
  * Should be available in any component that could be used to display the criticality of an asset or event
@@ -138,10 +138,7 @@ export declare const criticalityPalette: {
138
138
  readonly 500: "16 185 129";
139
139
  readonly 600: "5 150 105";
140
140
  readonly 700: "4 120 87";
141
- readonly 800: "6 95 70"; /**
142
- * The Rental status color palette
143
- * Should be available in any component that could be used to display the rental status of an asset
144
- */
141
+ readonly 800: "6 95 70";
145
142
  readonly 900: "6 78 59";
146
143
  };
147
144
  readonly LOW: {
@@ -173,8 +170,8 @@ export declare const criticalityPalette: {
173
170
  * The Criticality color palette
174
171
  * Should be available in any component that could be used to display the criticality of an asset or event
175
172
  */
176
- export declare type CriticalityColorKeys = keyof typeof criticalityPalette;
177
- export declare type CriticalityColors = `${Lowercase<CriticalityColorKeys>}`;
173
+ export type CriticalityColorKeys = keyof typeof criticalityPalette;
174
+ export type CriticalityColors = `${Lowercase<CriticalityColorKeys>}`;
178
175
  /**
179
176
  * The Activity color palette
180
177
  * Should be available in any component that could be used to display the Activity state of an asset
@@ -239,8 +236,32 @@ export declare const activityPalette: {
239
236
  * The Activity color palette
240
237
  * Should be available in any component that could be used to display the Activity state of an asset
241
238
  */
242
- export declare type ActivityColorKeys = keyof typeof activityPalette;
243
- export declare type ActivityColors = `${Lowercase<ActivityColorKeys>}`;
239
+ export type ActivityColorKeys = keyof typeof activityPalette;
240
+ export type ActivityColors = `${Lowercase<ActivityColorKeys>}`;
241
+ /**
242
+ * The Utilization color palette
243
+ * Should be available in any component that could be used to display the Activity state of an asset
244
+ */
245
+ export declare const utilizationPalette: {
246
+ readonly UNUSED: {
247
+ readonly 300: "252 165 165";
248
+ readonly 400: "248 113 113";
249
+ };
250
+ readonly UTILIZED: {
251
+ readonly 400: "96 165 250";
252
+ readonly 600: "37 99 235";
253
+ };
254
+ readonly HEAVILY_UTILIZED: {
255
+ readonly 300: "252 211 77";
256
+ readonly 500: "245 158 11";
257
+ };
258
+ };
259
+ /**
260
+ * The Utilization color palette
261
+ * Should be available in any component that could be used to display the Activity state of an asset
262
+ */
263
+ export type UtilizationColorKeys = keyof typeof utilizationPalette;
264
+ export type UtilizationColors = `${Lowercase<UtilizationColorKeys>}`;
244
265
  /**
245
266
  * The Rental status color palette
246
267
  * Should be available in any component that could be used to display the rental status of an asset
@@ -279,8 +300,8 @@ export declare const rentalStatusPalette: {
279
300
  * The Rental status color palette
280
301
  * Should be available in any component that could be used to display the rental status of an asset
281
302
  */
282
- export declare type RentalStatusColorKeys = keyof typeof rentalStatusPalette;
283
- export declare type RentalStatusColors = `${Lowercase<RentalStatusColorKeys>}`;
303
+ export type RentalStatusColorKeys = keyof typeof rentalStatusPalette;
304
+ export type RentalStatusColors = `${Lowercase<RentalStatusColorKeys>}`;
284
305
  /**
285
306
  * Grouped Theme Colors
286
307
  */
@@ -401,10 +422,7 @@ export declare const groupedPalettes: {
401
422
  readonly 500: "16 185 129";
402
423
  readonly 600: "5 150 105";
403
424
  readonly 700: "4 120 87";
404
- readonly 800: "6 95 70"; /**
405
- * The Rental status color palette
406
- * Should be available in any component that could be used to display the rental status of an asset
407
- */
425
+ readonly 800: "6 95 70";
408
426
  readonly 900: "6 78 59";
409
427
  };
410
428
  readonly LOW: {
@@ -488,6 +506,20 @@ export declare const groupedPalettes: {
488
506
  readonly DEFAULT: "63 219 147";
489
507
  };
490
508
  };
509
+ readonly UTILIZATION: {
510
+ readonly UNUSED: {
511
+ readonly 300: "252 165 165";
512
+ readonly 400: "248 113 113";
513
+ };
514
+ readonly UTILIZED: {
515
+ readonly 400: "96 165 250";
516
+ readonly 600: "37 99 235";
517
+ };
518
+ readonly HEAVILY_UTILIZED: {
519
+ readonly 300: "252 211 77";
520
+ readonly 500: "245 158 11";
521
+ };
522
+ };
491
523
  readonly RENTAL: {
492
524
  readonly ON_RENT: {
493
525
  readonly 100: "223 244 254";
@@ -551,6 +583,18 @@ export declare const trackunitPalette: {
551
583
  readonly 100: "238 239 239";
552
584
  readonly 600: "151 154 154";
553
585
  };
586
+ readonly UNUSED: {
587
+ readonly 300: "252 165 165";
588
+ readonly 400: "248 113 113";
589
+ };
590
+ readonly UTILIZED: {
591
+ readonly 400: "96 165 250";
592
+ readonly 600: "37 99 235";
593
+ };
594
+ readonly HEAVILY_UTILIZED: {
595
+ readonly 300: "252 211 77";
596
+ readonly 500: "245 158 11";
597
+ };
554
598
  readonly WORKING: {
555
599
  readonly 50: "239 246 255";
556
600
  readonly 100: "219 234 254";
@@ -614,10 +658,7 @@ export declare const trackunitPalette: {
614
658
  readonly 500: "16 185 129";
615
659
  readonly 600: "5 150 105";
616
660
  readonly 700: "4 120 87";
617
- readonly 800: "6 95 70"; /**
618
- * The Rental status color palette
619
- * Should be available in any component that could be used to display the rental status of an asset
620
- */
661
+ readonly 800: "6 95 70";
621
662
  readonly 900: "6 78 59";
622
663
  };
623
664
  readonly LOW: {
@@ -750,5 +791,5 @@ export declare const trackunitPalette: {
750
791
  /**
751
792
  * The full theme color palette (flattened)
752
793
  */
753
- export declare type ThemeColorKeys = keyof typeof trackunitPalette;
754
- export declare type ThemeColors = `${Lowercase<ThemeColorKeys>}`;
794
+ export type ThemeColorKeys = keyof typeof trackunitPalette;
795
+ export type ThemeColors = `${Lowercase<ThemeColorKeys>}`;
@@ -10,4 +10,4 @@ export declare const elevation: {
10
10
  readonly E30: "var(--box-shadow-xl)";
11
11
  readonly E40: "var(--box-shadow-2xl)";
12
12
  };
13
- export declare type Elevation = typeof elevation;
13
+ export type Elevation = typeof elevation;
@@ -16,4 +16,4 @@ export declare const size: {
16
16
  /** --spacing-10: 2.5rem; */
17
17
  readonly enormous: "var(--spacing-10)";
18
18
  };
19
- export declare type Size = typeof size;
19
+ export type Size = typeof size;
@@ -9,7 +9,7 @@ export declare const fontSize: {
9
9
  readonly body: "var(--font-size-sm)";
10
10
  readonly small: "var(--font-size-xs)";
11
11
  };
12
- export declare type FontSize = typeof fontSize;
12
+ export type FontSize = typeof fontSize;
13
13
  /**
14
14
  * Primary font weights.
15
15
  */
@@ -17,4 +17,4 @@ export declare const fontWeight: {
17
17
  readonly normal: 400;
18
18
  readonly bold: 600;
19
19
  };
20
- export declare type FontWeight = typeof fontWeight;
20
+ export type FontWeight = typeof fontWeight;
@@ -6,4 +6,4 @@ export declare const zIndex: {
6
6
  readonly popover: 20;
7
7
  readonly toast: 100;
8
8
  };
9
- export declare type ZIndex = typeof zIndex;
9
+ export type ZIndex = typeof zIndex;