@trackunit/ui-design-tokens
Advanced tools
Comparing version 0.0.56 to 0.0.57
29
index.js
@@ -430,2 +430,17 @@ const DEFAULT_CHART_COLORS = [ | ||
/** | ||
* Colors of the different site types. | ||
* | ||
* The generator has an issue with underscores in variant names, which is why they are not used below. | ||
*/ | ||
const sitesPalette = { | ||
SITE: { | ||
AREA: tailwindPalette.blue["600"], | ||
CLASSIC_POI: tailwindPalette.neutral["500"], | ||
CLASSIC_ZONE: tailwindPalette.neutral["500"], | ||
DEPOT: tailwindPalette.violet["600"], | ||
WORK_PLACE: tailwindPalette.emerald["500"], | ||
CONSTRUCTION_SITE: tailwindPalette.amber["500"], | ||
}, | ||
}; | ||
/** | ||
* Grouped Theme Colors | ||
@@ -446,2 +461,4 @@ */ | ||
RENTAL: rentalStatusPalette, | ||
// Sites | ||
SITES: sitesPalette, | ||
}; | ||
@@ -451,3 +468,3 @@ /** | ||
*/ | ||
const trackunitPalette = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generalPalette), intentPalette), criticalityPalette), activityPalette), utilizationPalette), rentalStatusPalette); | ||
const trackunitPalette = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generalPalette), intentPalette), criticalityPalette), activityPalette), utilizationPalette), rentalStatusPalette), sitesPalette); | ||
@@ -491,2 +508,3 @@ /** | ||
TRANSFER: { name: "transfer", variants: trackunitPalette.TRANSFER }, | ||
SITE: { name: "site", variants: trackunitPalette.SITE }, | ||
}; | ||
@@ -514,7 +532,8 @@ | ||
} | ||
const variableName = `--color-${colorName}-${String(variant)}`.replace(/[^a-zA-Z0-9]/g, "-"); | ||
if (output === "CSS") { | ||
return colorVariableToCss(`--color-${colorName}-${String(variant)}`); | ||
return colorVariableToCss(variableName); | ||
} | ||
if (output === "HEX") { | ||
return getHEX(`--color-${colorName}-${String(variant)}`); | ||
else if (output === "HEX") { | ||
return getHEX(variableName); | ||
} | ||
@@ -595,2 +614,2 @@ return colorName; | ||
export { DEFAULT_CHART_COLORS, activityPalette, color, criticalityPalette, elevation, fontSize, fontWeight, generalPalette, getReorderedChartColors, groupedPalettes, intentPalette, rentalStatusPalette, tailwindPalette, themeColors, tokens, trackunitPalette, utilizationPalette }; | ||
export { DEFAULT_CHART_COLORS, activityPalette, color, criticalityPalette, elevation, fontSize, fontWeight, generalPalette, getReorderedChartColors, groupedPalettes, intentPalette, rentalStatusPalette, sitesPalette, tailwindPalette, themeColors, tokens, trackunitPalette, utilizationPalette }; |
{ | ||
"name": "@trackunit/ui-design-tokens", | ||
"version": "0.0.56", | ||
"version": "0.0.57", | ||
"repository": "https://github.com/Trackunit/manager", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.txt", |
@@ -306,2 +306,19 @@ /** | ||
/** | ||
* Colors of the different site types. | ||
* | ||
* The generator has an issue with underscores in variant names, which is why they are not used below. | ||
*/ | ||
export declare const sitesPalette: { | ||
readonly SITE: { | ||
readonly AREA: "37 99 235"; | ||
readonly CLASSIC_POI: "115 115 115"; | ||
readonly CLASSIC_ZONE: "115 115 115"; | ||
readonly DEPOT: "124 58 237"; | ||
readonly WORK_PLACE: "16 185 129"; | ||
readonly CONSTRUCTION_SITE: "245 158 11"; | ||
}; | ||
}; | ||
export type SitesColorKeys = keyof typeof sitesPalette; | ||
export type SitesColors = `${Lowercase<SitesColorKeys>}`; | ||
/** | ||
* Grouped Theme Colors | ||
@@ -554,2 +571,12 @@ */ | ||
}; | ||
readonly SITES: { | ||
readonly SITE: { | ||
readonly AREA: "37 99 235"; | ||
readonly CLASSIC_POI: "115 115 115"; | ||
readonly CLASSIC_ZONE: "115 115 115"; | ||
readonly DEPOT: "124 58 237"; | ||
readonly WORK_PLACE: "16 185 129"; | ||
readonly CONSTRUCTION_SITE: "245 158 11"; | ||
}; | ||
}; | ||
}; | ||
@@ -560,2 +587,10 @@ /** | ||
export declare const trackunitPalette: { | ||
readonly SITE: { | ||
readonly AREA: "37 99 235"; | ||
readonly CLASSIC_POI: "115 115 115"; | ||
readonly CLASSIC_ZONE: "115 115 115"; | ||
readonly DEPOT: "124 58 237"; | ||
readonly WORK_PLACE: "16 185 129"; | ||
readonly CONSTRUCTION_SITE: "245 158 11"; | ||
}; | ||
readonly ON_RENT: { | ||
@@ -562,0 +597,0 @@ readonly 100: "223 244 254"; |
62763
1866