@phcdevworks/spectre-tokens 4.15.0 → 4.16.0
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/README.md +1 -1
- package/dist/index.cjs +22 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +40 -40
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/tokens.dtcg.json +45 -0
- package/package.json +11 -11
- package/tokens/modes.json +44 -0
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ contracts for specific frameworks and runtimes.
|
|
|
17
17
|
| Project team | `project-design` |
|
|
18
18
|
| Repository role | Spectre L1 design-token contract |
|
|
19
19
|
| Package/artifact | `@phcdevworks/spectre-tokens` |
|
|
20
|
-
| Current version/status | 4.
|
|
20
|
+
| Current version/status | 4.16.0 |
|
|
21
21
|
|
|
22
22
|
## Standard Workflow
|
|
23
23
|
|
package/dist/index.cjs
CHANGED
|
@@ -2828,6 +2828,20 @@ var coreTokens = {
|
|
|
2828
2828
|
"visited": "{colors.accent.300}",
|
|
2829
2829
|
"underline": "{colors.brand.400} / 0.4",
|
|
2830
2830
|
"underlineHover": "{colors.brand.300}"
|
|
2831
|
+
},
|
|
2832
|
+
"buttons": {
|
|
2833
|
+
"secondary": {
|
|
2834
|
+
"bg": "transparent",
|
|
2835
|
+
"bgHover": "{colors.neutral.800}",
|
|
2836
|
+
"bgActive": "{colors.neutral.700}",
|
|
2837
|
+
"bgDisabled": "transparent",
|
|
2838
|
+
"text": "{colors.info.300}",
|
|
2839
|
+
"textDisabled": "{colors.neutral.500}",
|
|
2840
|
+
"border": "{colors.info.400}",
|
|
2841
|
+
"borderDisabled": "{colors.neutral.700}",
|
|
2842
|
+
"focusRing": "{colors.info.500} / 0.4",
|
|
2843
|
+
"focusVisible": "{colors.info.500} / 0.4"
|
|
2844
|
+
}
|
|
2831
2845
|
}
|
|
2832
2846
|
},
|
|
2833
2847
|
"highContrast": {
|
|
@@ -5669,14 +5683,17 @@ var generateCssVariables = (tokens2, options = {}) => {
|
|
|
5669
5683
|
addDark(varName, actionValue(getPath(darkAction, [key]) ?? value));
|
|
5670
5684
|
addHighContrast(varName, actionValue(getPath(highContrastAction, [key]) ?? value));
|
|
5671
5685
|
});
|
|
5672
|
-
const
|
|
5673
|
-
|
|
5674
|
-
|
|
5686
|
+
const addButtonOverrides = (mode, add) => {
|
|
5687
|
+
const buttons = getPath(mode, ["buttons"]);
|
|
5688
|
+
if (!isPlainObject(buttons)) return;
|
|
5689
|
+
Object.entries(buttons).forEach(([variant, states]) => {
|
|
5675
5690
|
Object.entries(states).forEach(([state, value]) => {
|
|
5676
|
-
|
|
5691
|
+
add(toVariableName(prefix, "button", variant, state), pickSemantic(tokens2, value));
|
|
5677
5692
|
});
|
|
5678
5693
|
});
|
|
5679
|
-
}
|
|
5694
|
+
};
|
|
5695
|
+
addButtonOverrides(darkMode, addDark);
|
|
5696
|
+
addButtonOverrides(highContrastMode, addHighContrast);
|
|
5680
5697
|
const mapLines = Object.entries(declarations).filter(([name]) => !modeScopedNames.has(name)).map(([name, value]) => ` ${name}: ${value};`);
|
|
5681
5698
|
const rootBlock = `${selector} {
|
|
5682
5699
|
${[...baseLines, ...mapLines].join("\n")}
|