diff --git a/scss/core/css/utility-classes.css b/scss/core/css/utility-classes.css index 2bb8f25a4a..2eceb533ce 100644 --- a/scss/core/css/utility-classes.css +++ b/scss/core/css/utility-classes.css @@ -1,7 +1,7 @@ /** * IMPORTANT: This file is the result of assembling design tokens * Do not edit directly - * Generated on Thu, 16 Feb 2023 10:37:12 GMT + * Generated on Thu, 16 Feb 2023 16:08:35 GMT */ .bg-dark { diff --git a/scss/core/css/variables.css b/scss/core/css/variables.css index c648768b7a..f0facabecd 100644 --- a/scss/core/css/variables.css +++ b/scss/core/css/variables.css @@ -1,7 +1,7 @@ /** * IMPORTANT: This file is the result of assembling design tokens * Do not edit directly - * Generated on Thu, 16 Feb 2023 10:37:12 GMT + * Generated on Thu, 16 Feb 2023 16:08:35 GMT */ :root { diff --git a/tokens/css-utilities.js b/tokens/css-utilities.js index 7dfd67fea0..5270abd7cc 100644 --- a/tokens/css-utilities.js +++ b/tokens/css-utilities.js @@ -2,9 +2,8 @@ * Implements bg-variant mixin from bootstrap. Creates utility classes for background colors based on theme color. */ function bgVariant(token) { - const { attributes: { type, item } } = token; + const { attributes: { type, item}, actions } = token; const parent = `.bg-${type}${item === 'base' ? '' : `-${item}`}`; - const action = token.name.replace(type, `action-default-${type}`); return `${parent} { background-color: ${`var(--${token.name})`} !important; } @@ -13,7 +12,7 @@ a${parent}:hover, a${parent}:focus, button${parent}:hover, button${parent}:focus { - background-color: ${`var(--${action})`} !important; + background-color: ${actions.default} !important; } `; @@ -23,16 +22,15 @@ button${parent}:focus { * Implements text-emphasis-variant mixin from bootstrap. Creates utility classes for text colors based on theme color. */ function textEmphasisVariant(token) { - const { attributes: { type, item } } = token; + const { attributes: { type, item}, actions } = token; const parent = `.text-${type}${item === 'base' ? '' : `-${item}`}`; - const action = token.name.replace(type, `action-default-${type}`); return `${parent} { color: ${`var(--${token.name})`} !important; } a${parent}:hover, a${parent}:focus { - color: ${`var(--${action})`} !important; + color: ${actions.default} !important; } `; diff --git a/tokens/src/global/color.json b/tokens/src/global/color.json index bc7b74074d..a9e2bf95d1 100644 --- a/tokens/src/global/color.json +++ b/tokens/src/global/color.json @@ -8,487 +8,913 @@ "yellow": { "value": "#FFD900", "type": "color", "source": "$yellow" }, "teal": { "value": "#006DAA", "type": "color", "source": "$teal" }, "accent": { - "a": { "value": "#00BBF9", "type": "color", "source": "$accent-a" }, - "b": { "value": "#FFEE88", "type": "color", "source": "$accent-b" } + "a": { + "value": "#00BBF9", + "type": "color", + "source": "$accent-a", + "actions": { + "default": "{color.action.default.accent.a.path}" + } + }, + "b": { + "value": "#FFEE88", + "type": "color", + "source": "$accent-b", + "actions": { + "default": "{color.action.default.accent.b.path}" + } + } }, "gray": { - "base": { "value": "#707070", "type": "color", "source": "$gray" }, - "100": { "value": "#EBEBEB", "type": "color", "source": "$gray-100" }, - "200": { "value": "#CCCCCC", "type": "color", "source": "$gray-200" }, - "300": { "value": "#ADADAD", "type": "color", "source": "$gray-300" }, - "400": { "value": "#8F8F8F", "type": "color", "source": "$gray-400" }, - "500": { "value": "{color.gray.base}", "type": "color", "source": "$gray-500" }, - "600": { "value": "#5C5C5C", "type": "color", "source": "$gray-600" }, - "700": { "value": "#454545", "type": "color", "source": "$gray-700" }, - "800": { "value": "#333333", "type": "color", "source": "$gray-800" }, - "900": { "value": "#212529", "type": "color", "source": "$gray-900" } + "base": { + "value": "#707070", + "type": "color", + "source": "$gray", + "actions": { + "default": "{color.action.default.gray.base.path}" + } + }, + "100": { + "value": "#EBEBEB", + "type": "color", + "source": "$gray-100", + "actions": { + "default": "{color.action.default.gray.100.path}" + } + }, + "200": { + "value": "#CCCCCC", + "type": "color", + "source": "$gray-200", + "actions": { + "default": "{color.action.default.gray.200.path}" + } + }, + "300": { + "value": "#ADADAD", + "type": "color", + "source": "$gray-300", + "actions": { + "default": "{color.action.default.gray.300.path}" + } + }, + "400": { + "value": "#8F8F8F", + "type": "color", + "source": "$gray-400", + "actions": { + "default": "{color.action.default.gray.400.path}" + } + }, + "500": { + "value": "{color.gray.base}", + "type": "color", + "source": "$gray-500", + "actions": { + "default": "{color.action.default.gray.500.path}" + } + }, + "600": { + "value": "#5C5C5C", + "type": "color", + "source": "$gray-600", + "actions": { + "default": "{color.action.default.gray.600.path}" + } + }, + "700": { + "value": "#454545", + "type": "color", + "source": "$gray-700", + "actions": { + "default": "{color.action.default.gray.700.path}" + } + }, + "800": { + "value": "#333333", + "type": "color", + "source": "$gray-800", + "actions": { + "default": "{color.action.default.gray.800.path}" + } + }, + "900": { + "value": "#212529", + "type": "color", + "source": "$gray-900", + "actions": { + "default": "{color.action.default.gray.900.path}" + } + } }, "primary": { - "base": { "value": "#0A3055", "type": "color", "source": "$primary" }, - "100": { + "base": { + "value": "#0A3055", + "type": "color", + "source": "$primary", + "actions": { + "default": "{color.action.default.primary.base.path}" + } + }, + "100": { "value": "{color.primary.base}", "type": "color", "source": "$primary-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.primary.100.path}" + } }, - "200": { + "200": { "value": "{color.primary.base}", "type": "color", "source": "$primary-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.primary.200.path}" + } }, - "300": { + "300": { "value": "{color.primary.base}", "type": "color", "source": "$primary-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50"}] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.primary.300.path}" + } }, - "400": { + "400": { "value": "{color.primary.base}", "type": "color", "source": "$primary-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.primary.400.path}" + } }, - "500": { "value": "{color.primary.base}", "type": "color", "source": "$primary-500" }, - "600": { + "500": { + "value": "{color.primary.base}", + "type": "color", + "source": "$primary-500", + "actions": { + "default": "{color.action.default.primary.500.path}" + } + }, + "600": { "value": "{color.primary.base}", "type": "color", "source": "$primary-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.primary.600.path}" + } }, - "700": { + "700": { "value": "{color.primary.base}", "type": "color", "source": "$primary-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.primary.700.path}" + } }, - "800": { + "800": { "value": "{color.primary.base}", "type": "color", "source": "$primary-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.primary.800.path}" + } }, - "900": { + "900": { "value": "{color.primary.base}", "type": "color", "source": "$primary-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.primary.900.path}" + } } }, "secondary": { - "base": { "value": "{color.gray.700}", "type": "color", "source": "$secondary" }, + "base": { + "value": "{color.gray.700}", + "type": "color", + "source": "$secondary", + "actions": { + "default": "{color.action.default.secondary.base.path}" + } + }, "100": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.secondary.100.path}" + } }, "200": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.secondary.200.path}" + } }, "300": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.secondary.300.path}" + } }, "400": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.secondary.400.path}" + } + }, + "500": { + "value": "{color.secondary.base}", + "type": "color", + "source": "$secondary-500", + "actions": { + "default": "{color.action.default.secondary.500.path}" + } }, - "500": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-500"}, "600": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.secondary.600.path}" + } }, "700": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.secondary.700.path}" + } }, "800": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.secondary.800.path}" + } }, "900": { "value": "{color.secondary.base}", "type": "color", "source": "$secondary-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.secondary.900.path}" + } } }, "brand": { - "base": { "value": "#9D0054", "type": "color", "source": "$brand" }, + "base": { + "value": "#9D0054", + "type": "color", + "source": "$brand", + "actions": { + "default": "{color.action.default.brand.base.path}" + } + }, "100": { "value": "{color.brand.base}", "type": "color", "source": "$brand-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.brand.100.path}" + } }, "200": { "value": "{color.brand.base}", "type": "color", "source": "$brand-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.brand.200.path}" + } }, "300": { "value": "{color.brand.base}", "type": "color", "source": "$brand-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.brand.300.path}" + } }, "400": { "value": "{color.brand.base}", "type": "color", "source": "$brand-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.brand.400.path}" + } + }, + "500": { + "value": "{color.brand.base}", + "type": "color", + "source": "$brand-500", + "actions": { + "default": "{color.action.default.brand.500.path}" + } }, - "500": { "value": "{color.brand.base}", "type": "color", "source": "$brand-500" }, "600": { "value": "{color.brand.base}", "type": "color", "source": "$brand-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.brand.600.path}" + } }, "700": { "value": "{color.brand.base}", "type": "color", "source": "$brand-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.brand.700.path}" + } }, "800": { "value": "{color.brand.base}", "type": "color", "source": "$brand-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.brand.800.path}" + } }, "900": { "value": "{color.brand.base}", "type": "color", "source": "$brand-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.brand.900.path}" + } } }, "success": { - "base": { "value": "{color.green}", "type": "color", "source": "$success" }, + "base": { + "value": "{color.green}", + "type": "color", + "source": "$success", + "actions": { + "default": "{color.action.default.success.base.path}" + } + }, "100": { "value": "{color.success.base}", "type": "color", "source": "$success-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.success.100.path}" + } }, "200": { "value": "{color.success.base}", "type": "color", "source": "$success-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.success.200.path}" + } }, "300": { "value": "{color.success.base}", "type": "color", "source": "$success-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.success.300.path}" + } }, "400": { "value": "{color.success.base}", "type": "color", "source": "$success-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.success.400.path}" + } + }, + "500": { + "value": "{color.success.base}", + "type": "color", + "source": "$success-500", + "actions": { + "default": "{color.action.default.success.500.path}" + } }, - "500": { "value": "{color.success.base}", "type": "color", "source": "$success-500" }, "600": { "value": "{color.success.base}", "type": "color", "source": "$success-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.success.600.path}" + } }, "700": { "value": "{color.success.base}", "type": "color", "source": "$success-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.success.700.path}" + } }, "800": { "value": "{color.success.base}", "type": "color", "source": "$success-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.success.800.path}" + } }, "900": { "value": "{color.success.base}", "type": "color", "source": "$success-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.success.900.path}" + } } }, "info": { - "base": { "value": "{color.teal}", "type": "color", "source": "$info" }, + "base": { + "value": "{color.teal}", + "type": "color", + "source": "$info", + "actions": { + "default": "{color.action.default.info.base.path}" + } + }, "100": { "value": "{color.info.base}", "type": "color", "source": "$info-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.info.100.path}" + } }, "200": { "value": "{color.info.base}", "type": "color", "source": "$info-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.info.200.path}" + } }, "300": { "value": "{color.info.base}", "type": "color", "source": "$info-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.info.300.path}" + } }, "400": { "value": "{color.info.base}", "type": "color", "source": "$info-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.info.400.path}" + } + }, + "500": { + "value": "{color.info.base}", + "type": "color", + "source": "$info-500", + "actions": { + "default": "{color.action.default.info.500.path}" + } }, - "500": { "value": "{color.info.base}", "type": "color", "source": "$info-500" }, "600": { "value": "{color.info.base}", "type": "color", "source": "$info-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.info.600.path}" + } }, "700": { "value": "{color.info.base}", "type": "color", "source": "$info-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.info.700.path}" + } }, "800": { "value": "{color.info.base}", "type": "color", "source": "$info-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25"}] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.info.800.path}" + } }, "900": { "value": "{color.info.base}", "type": "color", "source": "$info-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.info.900.path}" + } } }, "warning": { - "base": { "value": "{color.yellow}", "type": "color", "source": "$warning" }, + "base": { + "value": "{color.yellow}", + "type": "color", + "source": "$warning", + "actions": { + "default": "{color.action.default.warning.base.path}" + } + }, "100": { "value": "{color.warning.base}", "type": "color", "source": "$warning-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.warning.100.path}" + } }, "200": { "value": "{color.warning.base}", "type": "color", "source": "$warning-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.warning.200.path}" + } }, "300": { "value": "{color.warning.base}", "type": "color", "source": "$warning-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.warning.300.path}" + } }, "400": { "value": "{color.warning.base}", "type": "color", "source": "$warning-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.warning.400.path}" + } + }, + "500": { + "value": "{color.warning.base}", + "type": "color", + "source": "$warning-500", + "actions": { + "default": "{color.action.default.warning.500.path}" + } }, - "500": { "value": "{color.warning.base}", "type": "color", "source": "$warning-500" }, "600": { "value": "{color.warning.base}", "type": "color", "source": "$warning-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.warning.600.path}" + } }, "700": { "value": "{color.warning.base}", "type": "color", "source": "$warning-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.warning.700.path}" + } }, "800": { "value": "{color.warning.base}", "type": "color", "source": "$warning-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.warning.800.path}" + } }, "900": { "value": "{color.warning.base}", "type": "color", "source": "$warning-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.warning.900.path}" + } } }, "danger": { - "base": { "value": "{color.red}", "type": "color", "source": "$danger" }, + "base": { + "value": "{color.red}", + "type": "color", + "source": "$danger", + "actions": { + "default": "{color.action.default.danger.base.path}" + } + }, "100": { "value": "{color.danger.base}", "type": "color", "source": "$danger-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.danger.100.path}" + } }, "200": { "value": "{color.danger.base}", "type": "color", "source": "$danger-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.danger.200.path}" + } }, "300": { "value": "{color.danger.base}", "type": "color", "source": "$danger-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.danger.300.path}" + } }, "400": { "value": "{color.danger.base}", "type": "color", "source": "$danger-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.danger.400.path}" + } + }, + "500": { + "value": "{color.danger.base}", + "type": "color", + "source": "$danger-500", + "actions": { + "default": "{color.action.default.danger.500.path}" + } }, - "500": { "value": "{color.danger.base}", "type": "color", "source": "$danger-500" }, "600": { "value": "{color.danger.base}", "type": "color", "source": "$danger-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.danger.600.path}" + } }, "700": { "value": "{color.danger.base}", "type": "color", "source": "$danger-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.danger.700.path}" + } }, "800": { "value": "{color.danger.base}", "type": "color", "source": "$danger-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.danger.800.path}" + } }, "900": { "value": "{color.danger.base}", "type": "color", "source": "$danger-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.danger.900.path}" + } } }, "light": { - "base": { "value": "#E1DDDB", "type": "color", "source": "$light" }, + "base": { + "value": "#E1DDDB", + "type": "color", + "source": "$light", + "actions": { + "default": "{color.action.default.light.base.path}" + } + }, "100": { "value": "{color.light.base}", "type": "color", "source": "$light-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.light.100.path}" + } }, "200": { "value": "{color.light.base}", "type": "color", "source": "$light-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.light.200.path}" + } }, "300": { "value": "{color.light.base}", "type": "color", "source": "$light-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.light.300.path}" + } }, "400": { "value": "{color.light.base}", "type": "color", "source": "$light-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.light.400.path}" + } + }, + "500": { + "value": "{color.light.base}", + "type": "color", + "source": "$light-500", + "actions": { + "default": "{color.action.default.light.500.path}" + } }, - "500": { "value": "{color.light.base}", "type": "color", "source": "$light-500" }, "600": { "value": "{color.light.base}", "type": "color", "source": "$light-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.light.600.path}" + } }, "700": { "value": "{color.light.base}", "type": "color", "source": "$light-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.light.700.path}" + } }, "800": { "value": "{color.light.base}", "type": "color", "source": "$light-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.light.800.path}" + } }, "900": { "value": "{color.light.base}", "type": "color", "source": "$light-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.light.900.path}" + } } }, "dark": { - "base": { "value": "#273F2F", "type": "color", "source": "$dark" }, - "100": { + "base": { + "value": "#273F2F", + "type": "color", + "source": "$dark", + "actions": { + "default": "{color.action.default.dark.base.path}" + } + }, + "100": { "value": "{color.dark.base}", "type": "color", "source": "$dark-100", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.94" }], + "actions": { + "default": "{color.action.default.dark.100.path}" + } }, "200": { "value": "{color.dark.base}", "type": "color", "source": "$dark-200", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.75" }], + "actions": { + "default": "{color.action.default.dark.200.path}" + } }, "300": { "value": "{color.dark.base}", "type": "color", "source": "$dark-300", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.50" }], + "actions": { + "default": "{color.action.default.dark.300.path}" + } }, "400": { "value": "{color.dark.base}", "type": "color", "source": "$dark-400", - "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "white", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.dark.400.path}" + } + }, + "500": { + "value": "{color.dark.base}", + "type": "color", + "source": "$dark-500", + "actions": { + "default": "{color.action.default.dark.500.path}" + } }, - "500": { "value": "{color.dark.base}", "type": "color", "source": "$dark-500" }, "600": { "value": "{color.dark.base}", "type": "color", "source": "$dark-600", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.10" }], + "actions": { + "default": "{color.action.default.dark.600.path}" + } }, "700": { "value": "{color.dark.base}", "type": "color", "source": "$dark-700", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.20" }], + "actions": { + "default": "{color.action.default.dark.700.path}" + } }, "800": { "value": "{color.dark.base}", "type": "color", "source": "$dark-800", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.25" }], + "actions": { + "default": "{color.action.default.dark.800.path}" + } }, "900": { "value": "{color.dark.base}", "type": "color", "source": "$dark-900", - "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }] + "modify": [{ "type": "mix", "otherColor": "black", "amount": "0.30" }], + "actions": { + "default": "{color.action.default.dark.900.path}" + } } }, "action": { diff --git a/tokens/style-dictionary.js b/tokens/style-dictionary.js index c2cf345075..be2f874efc 100644 --- a/tokens/style-dictionary.js +++ b/tokens/style-dictionary.js @@ -143,6 +143,7 @@ StyleDictionary.registerFormat({ // eslint-disable-next-line no-restricted-syntax for (const token of tokens) { + token.actions = {"default": `var(--pgn-${token.actions.default.join('-')})`}; // eslint-disable-next-line no-restricted-syntax for (const funcName of utilityFunctionsToApply) { utilityClasses += cssUtilities[funcName](token);