@trackunit/ui-design-tokens 0.0.70 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/ui-design-tokens",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
package/src/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- export * from "./tokens/borderRadius";
2
- export * from "./tokens/chartColorsDefault";
3
- export * from "./tokens/colors/index";
4
- export * from "./tokens/colors/trackunitPalette";
5
- export * from "./tokens/elevation";
6
- export * from "./tokens/screenSize";
7
- export * from "./tokens/size";
8
- export * from "./tokens/tokens";
9
- export * from "./tokens/typography";
10
- export * from "./tokens/zIndex";
1
+ export * from "./tokens/borderRadius";
2
+ export * from "./tokens/chartColorsDefault";
3
+ export * from "./tokens/colors/index";
4
+ export * from "./tokens/colors/trackunitPalette";
5
+ export * from "./tokens/elevation";
6
+ export * from "./tokens/screenSize";
7
+ export * from "./tokens/size";
8
+ export * from "./tokens/typography";
9
+ export * from "./tokens/zIndex";
@@ -1,14 +1,14 @@
1
- /**
2
- * A collection of all the tokens related to border radius in the theme.
3
- */
4
- export declare const themeBorderRadius: {
5
- readonly none: "0";
6
- readonly sm: "0.125rem";
7
- readonly DEFAULT: "0.25rem";
8
- readonly md: "0.375rem";
9
- readonly lg: "0.5rem";
10
- readonly xl: "0.75rem";
11
- readonly "2xl": "1rem";
12
- readonly "3xl": "1.5rem";
13
- readonly full: "9999px";
14
- };
1
+ /**
2
+ * A collection of all the tokens related to border radius in the theme.
3
+ */
4
+ export declare const themeBorderRadius: {
5
+ readonly none: "0";
6
+ readonly sm: "0.125rem";
7
+ readonly DEFAULT: "0.25rem";
8
+ readonly md: "0.375rem";
9
+ readonly lg: "0.5rem";
10
+ readonly xl: "0.75rem";
11
+ readonly "2xl": "1rem";
12
+ readonly "3xl": "1.5rem";
13
+ readonly full: "9999px";
14
+ };
@@ -1,7 +1,7 @@
1
- export declare const DEFAULT_CHART_COLORS: string[];
2
- /**
3
- * Re-ordered chart colors to ensure that adjacent colors are visually different.
4
- *
5
- * @returns {string[]} The reordered chart colors.
6
- */
7
- export declare const getReorderedChartColors: () => string[];
1
+ export declare const DEFAULT_CHART_COLORS: string[];
2
+ /**
3
+ * Re-ordered chart colors to ensure that adjacent colors are visually different.
4
+ *
5
+ * @returns {string[]} The reordered chart colors.
6
+ */
7
+ export declare const getReorderedChartColors: () => string[];
@@ -1,35 +1,35 @@
1
- import { ColorVariants } from "./colors";
2
- import { ThemeColorKeys } from "./trackunitPalette";
3
- declare const outputOptions: readonly ["HEX", "CSS"];
4
- type OutputOptions = typeof outputOptions[number];
5
- /**
6
- * Typesafe function to get css variable or hex value of our colors.
7
- *
8
- * The hex color values are read from the current css custom property.
9
- *
10
- * **Examples:**
11
- *
12
- * Need a hex value from one of our theme colors: `color("PRIMARY", "HEX")`
13
- *
14
- * Want the css variable: `color("PRIMARY", "CSS")`
15
- *
16
- * Need a specific variant: `color("PRIMARY", 200)`
17
- *
18
- * @example
19
- * color("PRIMARY", 200, "CSS") --> "rgb(var(--color-primary-200) / var(--tw-bg-opacity)))"
20
- * color("PRIMARY", 200, "HEX") --> "#bfdbfe"
21
- *
22
- * **Default variants:**
23
- * color("PRIMARY", "CSS") --> "rgb(var(--color-primary-600) / var(--tw-bg-opacity)))"
24
- * color("PRIMARY", "HEX") --> "#2563eb"
25
- *
26
- * **Default output:**
27
- * color("PRIMARY") --> "rgb(var(--color-primary-600) / var(--tw-bg-opacity)))"
28
- * color("PRIMARY", 200) --> "rgb(var(--color-primary-200) / var(--tw-bg-opacity)))"
29
- *"
30
- */
31
- declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName): string;
32
- declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName, variant?: ColorVariants<ColorName>): string;
33
- declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName, output?: OutputOptions): string;
34
- declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName, variant?: ColorVariants<ColorName>, output?: OutputOptions): string;
35
- export { color };
1
+ import { ColorVariants } from "./colors";
2
+ import { ThemeColorKeys } from "./trackunitPalette";
3
+ declare const outputOptions: readonly ["HEX", "CSS"];
4
+ type OutputOptions = (typeof outputOptions)[number];
5
+ /**
6
+ * Typesafe function to get css variable or hex value of our colors.
7
+ *
8
+ * The hex color values are read from the current css custom property.
9
+ *
10
+ * **Examples:**
11
+ *
12
+ * Need a hex value from one of our theme colors: `color("PRIMARY", "HEX")`
13
+ *
14
+ * Want the css variable: `color("PRIMARY", "CSS")`
15
+ *
16
+ * Need a specific variant: `color("PRIMARY", 200)`
17
+ *
18
+ * @example
19
+ * color("PRIMARY", 200, "CSS") --> "rgb(var(--color-primary-200) / var(--tw-bg-opacity)))"
20
+ * color("PRIMARY", 200, "HEX") --> "#bfdbfe"
21
+ *
22
+ * **Default variants:**
23
+ * color("PRIMARY", "CSS") --> "rgb(var(--color-primary-600) / var(--tw-bg-opacity)))"
24
+ * color("PRIMARY", "HEX") --> "#2563eb"
25
+ *
26
+ * **Default output:**
27
+ * color("PRIMARY") --> "rgb(var(--color-primary-600) / var(--tw-bg-opacity)))"
28
+ * color("PRIMARY", 200) --> "rgb(var(--color-primary-200) / var(--tw-bg-opacity)))"
29
+ *"
30
+ */
31
+ declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName): string;
32
+ declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName, variant?: ColorVariants<ColorName>): string;
33
+ declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName, output?: OutputOptions): string;
34
+ declare function color<ColorName extends ThemeColorKeys>(ColorKey: ColorName, variant?: ColorVariants<ColorName>, output?: OutputOptions): string;
35
+ export { color };
@@ -1,21 +1,21 @@
1
- /**
2
- * A collection of all the tokens related to the named colors in the default theme.
3
- */
4
- import { ThemeColorKeys, trackunitPalette } from "./trackunitPalette";
5
- /** Type used for available variants for a given ColorName */
6
- export type ColorVariants<ColorName extends ThemeColorKeys> = keyof typeof themeColors[ColorName]["variants"];
7
- export interface ThemeColorObject<T extends ThemeColorKeys> {
8
- name: Lowercase<T>;
9
- variants: {
10
- [key in keyof typeof trackunitPalette[T]]: string;
11
- };
12
- defaultVariant?: keyof typeof trackunitPalette[T];
13
- }
14
- export type ThemeColorsObject = {
15
- [key in ThemeColorKeys]: ThemeColorObject<key>;
16
- };
17
- /**
18
- * An object of all the Trackunit Theme colors and their available variants.
19
- * These colors does not include the default tailwind colors.
20
- */
21
- export declare const themeColors: ThemeColorsObject;
1
+ /**
2
+ * A collection of all the tokens related to the named colors in the default theme.
3
+ */
4
+ import { ThemeColorKeys, trackunitPalette } from "./trackunitPalette";
5
+ /** Type used for available variants for a given ColorName */
6
+ export type ColorVariants<ColorName extends ThemeColorKeys> = keyof typeof themeColors[ColorName]["variants"];
7
+ export interface ThemeColorObject<T extends ThemeColorKeys> {
8
+ name: Lowercase<T>;
9
+ variants: {
10
+ [key in keyof typeof trackunitPalette[T]]: string;
11
+ };
12
+ defaultVariant?: keyof typeof trackunitPalette[T];
13
+ }
14
+ export type ThemeColorsObject = {
15
+ [key in ThemeColorKeys]: ThemeColorObject<key>;
16
+ };
17
+ /**
18
+ * An object of all the Trackunit Theme colors and their available variants.
19
+ * These colors does not include the default tailwind colors.
20
+ */
21
+ export declare const themeColors: ThemeColorsObject;
@@ -1,4 +1,4 @@
1
- export * from "./color";
2
- export * from "./colors";
3
- export * from "./tailwindPalette";
4
- export * from "./trackunitPalette";
1
+ export * from "./color";
2
+ export * from "./colors";
3
+ export * from "./tailwindPalette";
4
+ export * from "./trackunitPalette";