@trackunit/ui-design-tokens 0.0.53 → 0.0.54
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/package.json +1 -1
- package/src/tokens/colors/color.d.ts +1 -1
- package/src/tokens/colors/colors.d.ts +2 -2
- package/src/tokens/colors/trackunitPalette.d.ts +12 -12
- package/src/tokens/elevation.d.ts +1 -1
- package/src/tokens/size.d.ts +1 -1
- package/src/tokens/typography.d.ts +2 -2
- package/src/tokens/zIndex.d.ts +1 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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
|
|
66
|
-
export
|
|
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
|
|
126
|
-
export
|
|
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
|
|
@@ -173,8 +173,8 @@ export declare const criticalityPalette: {
|
|
|
173
173
|
* The Criticality color palette
|
|
174
174
|
* Should be available in any component that could be used to display the criticality of an asset or event
|
|
175
175
|
*/
|
|
176
|
-
export
|
|
177
|
-
export
|
|
176
|
+
export type CriticalityColorKeys = keyof typeof criticalityPalette;
|
|
177
|
+
export type CriticalityColors = `${Lowercase<CriticalityColorKeys>}`;
|
|
178
178
|
/**
|
|
179
179
|
* The Activity color palette
|
|
180
180
|
* Should be available in any component that could be used to display the Activity state of an asset
|
|
@@ -239,8 +239,8 @@ export declare const activityPalette: {
|
|
|
239
239
|
* The Activity color palette
|
|
240
240
|
* Should be available in any component that could be used to display the Activity state of an asset
|
|
241
241
|
*/
|
|
242
|
-
export
|
|
243
|
-
export
|
|
242
|
+
export type ActivityColorKeys = keyof typeof activityPalette;
|
|
243
|
+
export type ActivityColors = `${Lowercase<ActivityColorKeys>}`;
|
|
244
244
|
/**
|
|
245
245
|
* The Rental status color palette
|
|
246
246
|
* Should be available in any component that could be used to display the rental status of an asset
|
|
@@ -279,8 +279,8 @@ export declare const rentalStatusPalette: {
|
|
|
279
279
|
* The Rental status color palette
|
|
280
280
|
* Should be available in any component that could be used to display the rental status of an asset
|
|
281
281
|
*/
|
|
282
|
-
export
|
|
283
|
-
export
|
|
282
|
+
export type RentalStatusColorKeys = keyof typeof rentalStatusPalette;
|
|
283
|
+
export type RentalStatusColors = `${Lowercase<RentalStatusColorKeys>}`;
|
|
284
284
|
/**
|
|
285
285
|
* Grouped Theme Colors
|
|
286
286
|
*/
|
|
@@ -750,5 +750,5 @@ export declare const trackunitPalette: {
|
|
|
750
750
|
/**
|
|
751
751
|
* The full theme color palette (flattened)
|
|
752
752
|
*/
|
|
753
|
-
export
|
|
754
|
-
export
|
|
753
|
+
export type ThemeColorKeys = keyof typeof trackunitPalette;
|
|
754
|
+
export type ThemeColors = `${Lowercase<ThemeColorKeys>}`;
|
package/src/tokens/size.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
20
|
+
export type FontWeight = typeof fontWeight;
|
package/src/tokens/zIndex.d.ts
CHANGED