+
-
+
\ No newline at end of file
diff --git a/packages/tokens/dist/devdot/css/helpers/focus-ring.css b/packages/tokens/dist/devdot/css/helpers/focus-ring.css
index 176f913a06..a6f0aa4412 100644
--- a/packages/tokens/dist/devdot/css/helpers/focus-ring.css
+++ b/packages/tokens/dist/devdot/css/helpers/focus-ring.css
@@ -1,6 +1,7 @@
/**
* Do not edit directly
- * Generated on Tue, 22 Feb 2022 21:05:19 GMT
+ * Generated on Fri, 18 Mar 2022 20:06:01 GMT
*/
-.hds-focus-ring-box-shadow { box-shadow: var(--token-focus-ring-box-shadow); }
+.hds-focus-ring-action-box-shadow { box-shadow: var(--token-focus-ring-action-box-shadow); }
+.hds-focus-ring-critical-box-shadow { box-shadow: var(--token-focus-ring-critical-box-shadow); }
diff --git a/packages/tokens/dist/devdot/css/tokens.css b/packages/tokens/dist/devdot/css/tokens.css
index 9c27583a17..91b061d5d6 100644
--- a/packages/tokens/dist/devdot/css/tokens.css
+++ b/packages/tokens/dist/devdot/css/tokens.css
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Thu, 17 Mar 2022 08:19:13 GMT
+ * Generated on Fri, 18 Mar 2022 20:06:01 GMT
*/
:root {
@@ -238,7 +238,8 @@
--token-surface-high-box-shadow: 0 0 0 1px #656a7640, 0px 2px 3px 0px #656a7626, 0px 16px 16px -10px #656a7633;
--token-surface-higher-box-shadow: 0 0 0 1px #656a7633, 0px 2px 3px 0px #656a761a, 0px 12px 28px 0px #656a7640;
--token-surface-overlay-box-shadow: 0 0 0 1px #3b3d4566, 0px 2px 3px 0px #3b3d4580, 0px 12px 24px 0px #3b3d4599;
- --token-focus-ring-box-shadow: inset 0 0 0 1px #0c56e9, 0 0 0 3px #5990ff;
+ --token-focus-ring-action-box-shadow: inset 0 0 0 1px #0c56e9, 0 0 0 3px #5990ff;
+ --token-focus-ring-critical-box-shadow: inset 0 0 0 1px #c00005, 0 0 0 3px #dd7578;
--token-typography-font-stack-display: -apple-system, BlinkMacSystemFont, SF Pro Display, Segoe UI Display, Ubuntu, sans-serif;
--token-typography-font-stack-text: -apple-system, BlinkMacSystemFont, SF Pro Text, Segoe UI Text, Ubuntu, sans-serif;
--token-typography-font-stack-code: SF Mono, Consolas, Ubuntu Mono, monospace;
diff --git a/packages/tokens/dist/docs/devdot/tokens.json b/packages/tokens/dist/docs/devdot/tokens.json
index f7f482351c..d424502e31 100644
--- a/packages/tokens/dist/docs/devdot/tokens.json
+++ b/packages/tokens/dist/docs/devdot/tokens.json
@@ -5288,15 +5288,34 @@
{
"value": "inset 0 0 0 1px #0c56e9, 0 0 0 3px #5990ff",
"original": {
- "value": "{focus-ring.internal.box-shadow.value}, {focus-ring.external.box-shadow.value}"
+ "value": "{focus-ring.action.internal-box-shadow.value}, {focus-ring.action.external-box-shadow.value}"
},
- "name": "token-focus-ring-box-shadow",
+ "name": "token-focus-ring-action-box-shadow",
"attributes": {
"category": "focus-ring",
- "type": "box-shadow"
+ "type": "action",
+ "item": "box-shadow"
},
"path": [
"focus-ring",
+ "action",
+ "box-shadow"
+ ]
+ },
+ {
+ "value": "inset 0 0 0 1px #c00005, 0 0 0 3px #dd7578",
+ "original": {
+ "value": "{focus-ring.critical.internal-box-shadow.value}, {focus-ring.critical.external-box-shadow.value}"
+ },
+ "name": "token-focus-ring-critical-box-shadow",
+ "attributes": {
+ "category": "focus-ring",
+ "type": "critical",
+ "item": "box-shadow"
+ },
+ "path": [
+ "focus-ring",
+ "critical",
"box-shadow"
]
},
diff --git a/packages/tokens/dist/docs/products/tokens.json b/packages/tokens/dist/docs/products/tokens.json
index bbb184ffb0..6085af5fa9 100644
--- a/packages/tokens/dist/docs/products/tokens.json
+++ b/packages/tokens/dist/docs/products/tokens.json
@@ -5242,15 +5242,34 @@
{
"value": "inset 0 0 0 1px #0c56e9, 0 0 0 3px #5990ff",
"original": {
- "value": "{focus-ring.internal.box-shadow.value}, {focus-ring.external.box-shadow.value}"
+ "value": "{focus-ring.action.internal-box-shadow.value}, {focus-ring.action.external-box-shadow.value}"
},
- "name": "token-focus-ring-box-shadow",
+ "name": "token-focus-ring-action-box-shadow",
"attributes": {
"category": "focus-ring",
- "type": "box-shadow"
+ "type": "action",
+ "item": "box-shadow"
},
"path": [
"focus-ring",
+ "action",
+ "box-shadow"
+ ]
+ },
+ {
+ "value": "inset 0 0 0 1px #c00005, 0 0 0 3px #dd7578",
+ "original": {
+ "value": "{focus-ring.critical.internal-box-shadow.value}, {focus-ring.critical.external-box-shadow.value}"
+ },
+ "name": "token-focus-ring-critical-box-shadow",
+ "attributes": {
+ "category": "focus-ring",
+ "type": "critical",
+ "item": "box-shadow"
+ },
+ "path": [
+ "focus-ring",
+ "critical",
"box-shadow"
]
},
diff --git a/packages/tokens/dist/products/css/helpers/focus-ring.css b/packages/tokens/dist/products/css/helpers/focus-ring.css
index 176f913a06..a6f0aa4412 100644
--- a/packages/tokens/dist/products/css/helpers/focus-ring.css
+++ b/packages/tokens/dist/products/css/helpers/focus-ring.css
@@ -1,6 +1,7 @@
/**
* Do not edit directly
- * Generated on Tue, 22 Feb 2022 21:05:19 GMT
+ * Generated on Fri, 18 Mar 2022 20:06:01 GMT
*/
-.hds-focus-ring-box-shadow { box-shadow: var(--token-focus-ring-box-shadow); }
+.hds-focus-ring-action-box-shadow { box-shadow: var(--token-focus-ring-action-box-shadow); }
+.hds-focus-ring-critical-box-shadow { box-shadow: var(--token-focus-ring-critical-box-shadow); }
diff --git a/packages/tokens/dist/products/css/tokens.css b/packages/tokens/dist/products/css/tokens.css
index 386e18bb15..2b2ca8a1f5 100644
--- a/packages/tokens/dist/products/css/tokens.css
+++ b/packages/tokens/dist/products/css/tokens.css
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon, 07 Mar 2022 11:14:41 GMT
+ * Generated on Fri, 18 Mar 2022 20:06:01 GMT
*/
:root {
@@ -236,7 +236,8 @@
--token-surface-high-box-shadow: 0 0 0 1px #656a7640, 0px 2px 3px 0px #656a7626, 0px 16px 16px -10px #656a7633;
--token-surface-higher-box-shadow: 0 0 0 1px #656a7633, 0px 2px 3px 0px #656a761a, 0px 12px 28px 0px #656a7640;
--token-surface-overlay-box-shadow: 0 0 0 1px #3b3d4566, 0px 2px 3px 0px #3b3d4580, 0px 12px 24px 0px #3b3d4599;
- --token-focus-ring-box-shadow: inset 0 0 0 1px #0c56e9, 0 0 0 3px #5990ff;
+ --token-focus-ring-action-box-shadow: inset 0 0 0 1px #0c56e9, 0 0 0 3px #5990ff;
+ --token-focus-ring-critical-box-shadow: inset 0 0 0 1px #c00005, 0 0 0 3px #dd7578;
--token-typography-font-stack-display: -apple-system, BlinkMacSystemFont, SF Pro Display, Segoe UI Display, Ubuntu, sans-serif;
--token-typography-font-stack-text: -apple-system, BlinkMacSystemFont, SF Pro Text, Segoe UI Text, Ubuntu, sans-serif;
--token-typography-font-stack-code: SF Mono, Consolas, Ubuntu Mono, monospace;
diff --git a/packages/tokens/scripts/build-parts/generateFocusRingHelpers.ts b/packages/tokens/scripts/build-parts/generateFocusRingHelpers.ts
index c2deb7573a..3cd616b458 100644
--- a/packages/tokens/scripts/build-parts/generateFocusRingHelpers.ts
+++ b/packages/tokens/scripts/build-parts/generateFocusRingHelpers.ts
@@ -6,15 +6,15 @@ type Helpers = string[];
export function generateFocusRingHelpers(tokens: TransformedTokens): Helpers {
- // notice: even if the focus-ring case is much simpler than the other helpers I have
- // maintained the same code structure for consistency so it's easier to compare and refactor if needed
-
const helpersFocusRing: Helpers = [];
- if (tokens.hasOwnProperty('box-shadow')) {
- const selector = `.${PREFIX}-focus-ring-box-shadow`;
- helpersFocusRing.push(`${selector} { box-shadow: var(--token-focus-ring-box-shadow); }`);
- }
+ Object.keys(tokens).forEach((key: string) => {
+ const color = key;
+ if (tokens[color].hasOwnProperty('box-shadow')) {
+ const selector = `.${PREFIX}-focus-ring-${color}-box-shadow`;
+ helpersFocusRing.push(`${selector} { box-shadow: var(--token-focus-ring-${color}-box-shadow); }`);
+ }
+ });
return [...helpersFocusRing];
}
diff --git a/packages/tokens/src/global/focus-ring.json b/packages/tokens/src/global/focus-ring.json
index fb4b9d16c2..9cc28fca40 100644
--- a/packages/tokens/src/global/focus-ring.json
+++ b/packages/tokens/src/global/focus-ring.json
@@ -1,39 +1,30 @@
{
"focus-ring": {
- "internal": {
- "spread": {
- "value": "1",
- "type": "size",
+ "action": {
+ "internal-box-shadow": {
+ "value": "inset 0 0 0 1px {color.focus.action.internal.value}",
"private": true
},
- "color": {
- "value": "{color.palette.blue-300.value}",
- "type": "color",
+ "external-box-shadow": {
+ "value": "0 0 0 3px {color.focus.action.external.value}",
"private": true
},
"box-shadow": {
- "value": "inset 0 0 0 {focus-ring.internal.spread.value} {focus-ring.internal.color.value}",
- "private": true
+ "value": "{focus-ring.action.internal-box-shadow.value}, {focus-ring.action.external-box-shadow.value}"
}
},
- "external": {
- "spread": {
- "value": "3",
- "type": "size",
+ "critical": {
+ "internal-box-shadow": {
+ "value": "inset 0 0 0 1px {color.focus.critical.internal.value}",
"private": true
},
- "color": {
- "value": "{color.focus.action.external.value}",
- "type": "color",
+ "external-box-shadow": {
+ "value": "0 0 0 3px {color.focus.critical.external.value}",
"private": true
},
"box-shadow": {
- "value": "0 0 0 {focus-ring.external.spread.value} {focus-ring.external.color.value}",
- "private": true
+ "value": "{focus-ring.critical.internal-box-shadow.value}, {focus-ring.critical.external-box-shadow.value}"
}
- },
- "box-shadow": {
- "value": "{focus-ring.internal.box-shadow.value}, {focus-ring.external.box-shadow.value}"
}
}
}
\ No newline at end of file