@primer/primitives 11.7.0-rc.9e55ef3b → 11.7.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/DESIGN_TOKENS_SPEC.md +6 -10
- package/dist/build/platforms/css.js +1 -0
- package/dist/css/functional/size/border.css +4 -2
- package/dist/css/functional/themes/dark-colorblind-high-contrast.css +6 -4
- package/dist/css/functional/themes/dark-colorblind.css +6 -4
- package/dist/css/functional/themes/dark-dimmed-high-contrast.css +6 -4
- package/dist/css/functional/themes/dark-dimmed.css +6 -4
- package/dist/css/functional/themes/dark-high-contrast.css +6 -4
- package/dist/css/functional/themes/dark-tritanopia-high-contrast.css +6 -4
- package/dist/css/functional/themes/dark-tritanopia.css +6 -4
- package/dist/css/functional/themes/dark.css +6 -4
- package/dist/css/functional/themes/light-colorblind-high-contrast.css +6 -4
- package/dist/css/functional/themes/light-colorblind.css +6 -4
- package/dist/css/functional/themes/light-high-contrast.css +6 -4
- package/dist/css/functional/themes/light-tritanopia-high-contrast.css +6 -4
- package/dist/css/functional/themes/light-tritanopia.css +6 -4
- package/dist/css/functional/themes/light.css +6 -4
- package/dist/docs/functional/size/border.json +74 -12
- package/dist/docs/functional/themes/dark-colorblind-high-contrast.json +41 -11
- package/dist/docs/functional/themes/dark-colorblind.json +41 -11
- package/dist/docs/functional/themes/dark-dimmed-high-contrast.json +41 -11
- package/dist/docs/functional/themes/dark-dimmed.json +41 -11
- package/dist/docs/functional/themes/dark-high-contrast.json +41 -11
- package/dist/docs/functional/themes/dark-tritanopia-high-contrast.json +41 -11
- package/dist/docs/functional/themes/dark-tritanopia.json +41 -11
- package/dist/docs/functional/themes/dark.json +41 -11
- package/dist/docs/functional/themes/light-colorblind-high-contrast.json +41 -11
- package/dist/docs/functional/themes/light-colorblind.json +41 -11
- package/dist/docs/functional/themes/light-high-contrast.json +41 -11
- package/dist/docs/functional/themes/light-tritanopia-high-contrast.json +41 -11
- package/dist/docs/functional/themes/light-tritanopia.json +41 -11
- package/dist/docs/functional/themes/light.json +41 -11
- package/dist/fallbacks/color-fallbacks.json +1 -0
- package/dist/fallbacks/functional/size/border.json +2 -0
- package/dist/figma/dimension/dimension.json +46 -22
- package/dist/figma/figma.json +1 -1
- package/dist/figma/themes/dark-colorblind.json +34 -17
- package/dist/figma/themes/dark-dimmed.json +34 -17
- package/dist/figma/themes/dark-high-contrast.json +34 -17
- package/dist/figma/themes/dark-tritanopia.json +34 -17
- package/dist/figma/themes/dark.json +34 -17
- package/dist/figma/themes/light-colorblind.json +34 -17
- package/dist/figma/themes/light-high-contrast.json +34 -17
- package/dist/figma/themes/light-tritanopia.json +34 -17
- package/dist/figma/themes/light.json +34 -17
- package/dist/internalCss/dark-colorblind-high-contrast.css +12 -22
- package/dist/internalCss/dark-colorblind.css +12 -22
- package/dist/internalCss/dark-dimmed-high-contrast.css +12 -22
- package/dist/internalCss/dark-dimmed.css +12 -22
- package/dist/internalCss/dark-high-contrast.css +12 -22
- package/dist/internalCss/dark-tritanopia-high-contrast.css +12 -22
- package/dist/internalCss/dark-tritanopia.css +12 -22
- package/dist/internalCss/dark.css +12 -22
- package/dist/internalCss/light-colorblind-high-contrast.css +12 -22
- package/dist/internalCss/light-colorblind.css +12 -22
- package/dist/internalCss/light-high-contrast.css +12 -22
- package/dist/internalCss/light-tritanopia-high-contrast.css +12 -22
- package/dist/internalCss/light-tritanopia.css +12 -22
- package/dist/internalCss/light.css +12 -22
- package/dist/styleLint/functional/size/border.json +75 -13
- package/dist/styleLint/functional/themes/dark-colorblind-high-contrast.json +44 -10
- package/dist/styleLint/functional/themes/dark-colorblind.json +44 -10
- package/dist/styleLint/functional/themes/dark-dimmed-high-contrast.json +44 -10
- package/dist/styleLint/functional/themes/dark-dimmed.json +44 -10
- package/dist/styleLint/functional/themes/dark-high-contrast.json +44 -10
- package/dist/styleLint/functional/themes/dark-tritanopia-high-contrast.json +44 -10
- package/dist/styleLint/functional/themes/dark-tritanopia.json +44 -10
- package/dist/styleLint/functional/themes/dark.json +44 -10
- package/dist/styleLint/functional/themes/light-colorblind-high-contrast.json +44 -10
- package/dist/styleLint/functional/themes/light-colorblind.json +44 -10
- package/dist/styleLint/functional/themes/light-high-contrast.json +44 -10
- package/dist/styleLint/functional/themes/light-tritanopia-high-contrast.json +44 -10
- package/dist/styleLint/functional/themes/light-tritanopia.json +44 -10
- package/dist/styleLint/functional/themes/light.json +44 -10
- package/package.json +2 -2
- package/src/tokens/component/focus.json5 +104 -0
- package/src/tokens/fallback/color-fallbacks.json +1 -0
- package/src/tokens/functional/border/border.json5 +0 -20
- package/src/tokens/functional/size/border.json5 +0 -30
- package/src/tokens/functional/color/focus.json5 +0 -20
|
@@ -39609,7 +39609,11 @@
|
|
|
39609
39609
|
},
|
|
39610
39610
|
"focus-outline": {
|
|
39611
39611
|
"key": "{focus.outline}",
|
|
39612
|
-
"$value":
|
|
39612
|
+
"$value": {
|
|
39613
|
+
"color": "#0349b4",
|
|
39614
|
+
"style": "solid",
|
|
39615
|
+
"width": ["0.125rem", "2px"]
|
|
39616
|
+
},
|
|
39613
39617
|
"$type": "border",
|
|
39614
39618
|
"$description": "Focus ring outline for keyboard navigation and accessibility.",
|
|
39615
39619
|
"$extensions": {
|
|
@@ -39618,16 +39622,13 @@
|
|
|
39618
39622
|
"rules": "Always ensure focus states are visible. Do not override with custom focus styles that reduce visibility. Use for interactive elements like buttons, links, and form controls."
|
|
39619
39623
|
}
|
|
39620
39624
|
},
|
|
39621
|
-
"filePath": "src/tokens/
|
|
39625
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39622
39626
|
"isSource": true,
|
|
39623
39627
|
"original": {
|
|
39624
39628
|
"$value": {
|
|
39625
|
-
"color": "{focus.
|
|
39629
|
+
"color": "{focus.outline-color}",
|
|
39626
39630
|
"style": "solid",
|
|
39627
|
-
"width": {
|
|
39628
|
-
"value": 2,
|
|
39629
|
-
"unit": "px"
|
|
39630
|
-
}
|
|
39631
|
+
"width": "{focus.outline-width}"
|
|
39631
39632
|
},
|
|
39632
39633
|
"$type": "border",
|
|
39633
39634
|
"$description": "Focus ring outline for keyboard navigation and accessibility.",
|
|
@@ -39643,8 +39644,8 @@
|
|
|
39643
39644
|
"attributes": {},
|
|
39644
39645
|
"path": ["focus", "outline"]
|
|
39645
39646
|
},
|
|
39646
|
-
"focus-
|
|
39647
|
-
"key": "{focus.
|
|
39647
|
+
"focus-outline-color": {
|
|
39648
|
+
"key": "{focus.outline-color}",
|
|
39648
39649
|
"$value": "#0349b4",
|
|
39649
39650
|
"$type": "color",
|
|
39650
39651
|
"$description": "Outline color for focus states on interactive elements",
|
|
@@ -39659,7 +39660,7 @@
|
|
|
39659
39660
|
"rules": "Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements."
|
|
39660
39661
|
}
|
|
39661
39662
|
},
|
|
39662
|
-
"filePath": "src/tokens/
|
|
39663
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39663
39664
|
"isSource": true,
|
|
39664
39665
|
"original": {
|
|
39665
39666
|
"$value": "{borderColor.accent.emphasis}",
|
|
@@ -39676,6 +39677,39 @@
|
|
|
39676
39677
|
"rules": "Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements."
|
|
39677
39678
|
}
|
|
39678
39679
|
},
|
|
39680
|
+
"key": "{focus.outline-color}"
|
|
39681
|
+
},
|
|
39682
|
+
"name": "focus-outline-color",
|
|
39683
|
+
"attributes": {},
|
|
39684
|
+
"path": ["focus", "outline-color"]
|
|
39685
|
+
},
|
|
39686
|
+
"focus-outlineColor": {
|
|
39687
|
+
"key": "{focus.outlineColor}",
|
|
39688
|
+
"$value": "#0349b4",
|
|
39689
|
+
"$type": "color",
|
|
39690
|
+
"$deprecated": "#0349b4",
|
|
39691
|
+
"$description": "Deprecated. Use focus.outline-color instead.",
|
|
39692
|
+
"$extensions": {
|
|
39693
|
+
"org.primer.figma": {
|
|
39694
|
+
"collection": "mode",
|
|
39695
|
+
"group": "component (internal)",
|
|
39696
|
+
"scopes": ["borderColor", "effectColor"]
|
|
39697
|
+
}
|
|
39698
|
+
},
|
|
39699
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39700
|
+
"isSource": true,
|
|
39701
|
+
"original": {
|
|
39702
|
+
"$value": "{focus.outline-color}",
|
|
39703
|
+
"$type": "color",
|
|
39704
|
+
"$deprecated": "{focus.outline-color}",
|
|
39705
|
+
"$description": "Deprecated. Use focus.outline-color instead.",
|
|
39706
|
+
"$extensions": {
|
|
39707
|
+
"org.primer.figma": {
|
|
39708
|
+
"collection": "mode",
|
|
39709
|
+
"group": "component (internal)",
|
|
39710
|
+
"scopes": ["borderColor", "effectColor"]
|
|
39711
|
+
}
|
|
39712
|
+
},
|
|
39679
39713
|
"key": "{focus.outlineColor}"
|
|
39680
39714
|
},
|
|
39681
39715
|
"name": "focus-outlineColor",
|
|
@@ -39603,7 +39603,11 @@
|
|
|
39603
39603
|
},
|
|
39604
39604
|
"focus-outline": {
|
|
39605
39605
|
"key": "{focus.outline}",
|
|
39606
|
-
"$value":
|
|
39606
|
+
"$value": {
|
|
39607
|
+
"color": "#0969da",
|
|
39608
|
+
"style": "solid",
|
|
39609
|
+
"width": ["0.125rem", "2px"]
|
|
39610
|
+
},
|
|
39607
39611
|
"$type": "border",
|
|
39608
39612
|
"$description": "Focus ring outline for keyboard navigation and accessibility.",
|
|
39609
39613
|
"$extensions": {
|
|
@@ -39612,16 +39616,13 @@
|
|
|
39612
39616
|
"rules": "Always ensure focus states are visible. Do not override with custom focus styles that reduce visibility. Use for interactive elements like buttons, links, and form controls."
|
|
39613
39617
|
}
|
|
39614
39618
|
},
|
|
39615
|
-
"filePath": "src/tokens/
|
|
39619
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39616
39620
|
"isSource": true,
|
|
39617
39621
|
"original": {
|
|
39618
39622
|
"$value": {
|
|
39619
|
-
"color": "{focus.
|
|
39623
|
+
"color": "{focus.outline-color}",
|
|
39620
39624
|
"style": "solid",
|
|
39621
|
-
"width": {
|
|
39622
|
-
"value": 2,
|
|
39623
|
-
"unit": "px"
|
|
39624
|
-
}
|
|
39625
|
+
"width": "{focus.outline-width}"
|
|
39625
39626
|
},
|
|
39626
39627
|
"$type": "border",
|
|
39627
39628
|
"$description": "Focus ring outline for keyboard navigation and accessibility.",
|
|
@@ -39637,8 +39638,8 @@
|
|
|
39637
39638
|
"attributes": {},
|
|
39638
39639
|
"path": ["focus", "outline"]
|
|
39639
39640
|
},
|
|
39640
|
-
"focus-
|
|
39641
|
-
"key": "{focus.
|
|
39641
|
+
"focus-outline-color": {
|
|
39642
|
+
"key": "{focus.outline-color}",
|
|
39642
39643
|
"$value": "#0969da",
|
|
39643
39644
|
"$type": "color",
|
|
39644
39645
|
"$description": "Outline color for focus states on interactive elements",
|
|
@@ -39653,7 +39654,7 @@
|
|
|
39653
39654
|
"rules": "Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements."
|
|
39654
39655
|
}
|
|
39655
39656
|
},
|
|
39656
|
-
"filePath": "src/tokens/
|
|
39657
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39657
39658
|
"isSource": true,
|
|
39658
39659
|
"original": {
|
|
39659
39660
|
"$value": "{borderColor.accent.emphasis}",
|
|
@@ -39670,6 +39671,39 @@
|
|
|
39670
39671
|
"rules": "Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements."
|
|
39671
39672
|
}
|
|
39672
39673
|
},
|
|
39674
|
+
"key": "{focus.outline-color}"
|
|
39675
|
+
},
|
|
39676
|
+
"name": "focus-outline-color",
|
|
39677
|
+
"attributes": {},
|
|
39678
|
+
"path": ["focus", "outline-color"]
|
|
39679
|
+
},
|
|
39680
|
+
"focus-outlineColor": {
|
|
39681
|
+
"key": "{focus.outlineColor}",
|
|
39682
|
+
"$value": "#0969da",
|
|
39683
|
+
"$type": "color",
|
|
39684
|
+
"$deprecated": "#0969da",
|
|
39685
|
+
"$description": "Deprecated. Use focus.outline-color instead.",
|
|
39686
|
+
"$extensions": {
|
|
39687
|
+
"org.primer.figma": {
|
|
39688
|
+
"collection": "mode",
|
|
39689
|
+
"group": "component (internal)",
|
|
39690
|
+
"scopes": ["borderColor", "effectColor"]
|
|
39691
|
+
}
|
|
39692
|
+
},
|
|
39693
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39694
|
+
"isSource": true,
|
|
39695
|
+
"original": {
|
|
39696
|
+
"$value": "{focus.outline-color}",
|
|
39697
|
+
"$type": "color",
|
|
39698
|
+
"$deprecated": "{focus.outline-color}",
|
|
39699
|
+
"$description": "Deprecated. Use focus.outline-color instead.",
|
|
39700
|
+
"$extensions": {
|
|
39701
|
+
"org.primer.figma": {
|
|
39702
|
+
"collection": "mode",
|
|
39703
|
+
"group": "component (internal)",
|
|
39704
|
+
"scopes": ["borderColor", "effectColor"]
|
|
39705
|
+
}
|
|
39706
|
+
},
|
|
39673
39707
|
"key": "{focus.outlineColor}"
|
|
39674
39708
|
},
|
|
39675
39709
|
"name": "focus-outlineColor",
|
|
@@ -39601,7 +39601,11 @@
|
|
|
39601
39601
|
},
|
|
39602
39602
|
"focus-outline": {
|
|
39603
39603
|
"key": "{focus.outline}",
|
|
39604
|
-
"$value":
|
|
39604
|
+
"$value": {
|
|
39605
|
+
"color": "#0969da",
|
|
39606
|
+
"style": "solid",
|
|
39607
|
+
"width": ["0.125rem", "2px"]
|
|
39608
|
+
},
|
|
39605
39609
|
"$type": "border",
|
|
39606
39610
|
"$description": "Focus ring outline for keyboard navigation and accessibility.",
|
|
39607
39611
|
"$extensions": {
|
|
@@ -39610,16 +39614,13 @@
|
|
|
39610
39614
|
"rules": "Always ensure focus states are visible. Do not override with custom focus styles that reduce visibility. Use for interactive elements like buttons, links, and form controls."
|
|
39611
39615
|
}
|
|
39612
39616
|
},
|
|
39613
|
-
"filePath": "src/tokens/
|
|
39617
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39614
39618
|
"isSource": true,
|
|
39615
39619
|
"original": {
|
|
39616
39620
|
"$value": {
|
|
39617
|
-
"color": "{focus.
|
|
39621
|
+
"color": "{focus.outline-color}",
|
|
39618
39622
|
"style": "solid",
|
|
39619
|
-
"width": {
|
|
39620
|
-
"value": 2,
|
|
39621
|
-
"unit": "px"
|
|
39622
|
-
}
|
|
39623
|
+
"width": "{focus.outline-width}"
|
|
39623
39624
|
},
|
|
39624
39625
|
"$type": "border",
|
|
39625
39626
|
"$description": "Focus ring outline for keyboard navigation and accessibility.",
|
|
@@ -39635,8 +39636,8 @@
|
|
|
39635
39636
|
"attributes": {},
|
|
39636
39637
|
"path": ["focus", "outline"]
|
|
39637
39638
|
},
|
|
39638
|
-
"focus-
|
|
39639
|
-
"key": "{focus.
|
|
39639
|
+
"focus-outline-color": {
|
|
39640
|
+
"key": "{focus.outline-color}",
|
|
39640
39641
|
"$value": "#0969da",
|
|
39641
39642
|
"$type": "color",
|
|
39642
39643
|
"$description": "Outline color for focus states on interactive elements",
|
|
@@ -39651,7 +39652,7 @@
|
|
|
39651
39652
|
"rules": "Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements."
|
|
39652
39653
|
}
|
|
39653
39654
|
},
|
|
39654
|
-
"filePath": "src/tokens/
|
|
39655
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39655
39656
|
"isSource": true,
|
|
39656
39657
|
"original": {
|
|
39657
39658
|
"$value": "{borderColor.accent.emphasis}",
|
|
@@ -39668,6 +39669,39 @@
|
|
|
39668
39669
|
"rules": "Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements."
|
|
39669
39670
|
}
|
|
39670
39671
|
},
|
|
39672
|
+
"key": "{focus.outline-color}"
|
|
39673
|
+
},
|
|
39674
|
+
"name": "focus-outline-color",
|
|
39675
|
+
"attributes": {},
|
|
39676
|
+
"path": ["focus", "outline-color"]
|
|
39677
|
+
},
|
|
39678
|
+
"focus-outlineColor": {
|
|
39679
|
+
"key": "{focus.outlineColor}",
|
|
39680
|
+
"$value": "#0969da",
|
|
39681
|
+
"$type": "color",
|
|
39682
|
+
"$deprecated": "#0969da",
|
|
39683
|
+
"$description": "Deprecated. Use focus.outline-color instead.",
|
|
39684
|
+
"$extensions": {
|
|
39685
|
+
"org.primer.figma": {
|
|
39686
|
+
"collection": "mode",
|
|
39687
|
+
"group": "component (internal)",
|
|
39688
|
+
"scopes": ["borderColor", "effectColor"]
|
|
39689
|
+
}
|
|
39690
|
+
},
|
|
39691
|
+
"filePath": "src/tokens/component/focus.json5",
|
|
39692
|
+
"isSource": true,
|
|
39693
|
+
"original": {
|
|
39694
|
+
"$value": "{focus.outline-color}",
|
|
39695
|
+
"$type": "color",
|
|
39696
|
+
"$deprecated": "{focus.outline-color}",
|
|
39697
|
+
"$description": "Deprecated. Use focus.outline-color instead.",
|
|
39698
|
+
"$extensions": {
|
|
39699
|
+
"org.primer.figma": {
|
|
39700
|
+
"collection": "mode",
|
|
39701
|
+
"group": "component (internal)",
|
|
39702
|
+
"scopes": ["borderColor", "effectColor"]
|
|
39703
|
+
}
|
|
39704
|
+
},
|
|
39671
39705
|
"key": "{focus.outlineColor}"
|
|
39672
39706
|
},
|
|
39673
39707
|
"name": "focus-outlineColor",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/primitives",
|
|
3
|
-
"version": "11.7.0
|
|
3
|
+
"version": "11.7.0",
|
|
4
4
|
"description": "Typography, spacing, and color primitives for Primer design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -81,4 +81,4 @@
|
|
|
81
81
|
"zod-validation-error": "^4.0.1",
|
|
82
82
|
"colorjs.io": "^0.6.1"
|
|
83
83
|
}
|
|
84
|
-
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
focus: {
|
|
3
|
+
outline: {
|
|
4
|
+
$value: {
|
|
5
|
+
color: '{focus.outline-color}',
|
|
6
|
+
style: 'solid',
|
|
7
|
+
width: '{focus.outline-width}',
|
|
8
|
+
},
|
|
9
|
+
$type: 'border',
|
|
10
|
+
$description: 'Focus ring outline for keyboard navigation and accessibility.',
|
|
11
|
+
$extensions: {
|
|
12
|
+
'org.primer.llm': {
|
|
13
|
+
usage: ['focus-ring', 'keyboard-navigation', 'accessibility-indicator'],
|
|
14
|
+
rules: 'Always ensure focus states are visible. Do not override with custom focus styles that reduce visibility. Use for interactive elements like buttons, links, and form controls.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
'outline-color': {
|
|
19
|
+
$value: '{borderColor.accent.emphasis}',
|
|
20
|
+
$type: 'color',
|
|
21
|
+
$description: 'Outline color for focus states on interactive elements',
|
|
22
|
+
$extensions: {
|
|
23
|
+
'org.primer.figma': {
|
|
24
|
+
collection: 'mode',
|
|
25
|
+
group: 'component (internal)',
|
|
26
|
+
scopes: ['borderColor', 'effectColor'],
|
|
27
|
+
},
|
|
28
|
+
'org.primer.llm': {
|
|
29
|
+
usage: ['focus-ring', 'keyboard-navigation', 'accessibility-indicator'],
|
|
30
|
+
rules: 'Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements.',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
'outline-width': {
|
|
35
|
+
$value: {value: 2, unit: 'px'},
|
|
36
|
+
$type: 'dimension',
|
|
37
|
+
$description: 'Focus outline width (2px). Standard width for keyboard focus indicators to meet WCAG 2.4.7 accessibility requirements',
|
|
38
|
+
$extensions: {
|
|
39
|
+
'org.primer.figma': {
|
|
40
|
+
collection: 'functional/size',
|
|
41
|
+
scopes: ['borderWidth', 'effectFloat'],
|
|
42
|
+
},
|
|
43
|
+
'org.primer.llm': {
|
|
44
|
+
usage: ['focus-ring', 'keyboard-focus', 'accessibility'],
|
|
45
|
+
rules: 'MUST use for all keyboard focus indicators. Required for WCAG 2.4.7 compliance.',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
'outline-offset': {
|
|
50
|
+
$value: {value: -2, unit: 'px'},
|
|
51
|
+
$type: 'dimension',
|
|
52
|
+
$description: 'Focus outline offset (-2px). Negative value creates an inset outline for keyboard focus indicators, ensuring the focus ring stays within the element bounds',
|
|
53
|
+
$extensions: {
|
|
54
|
+
'org.primer.figma': {
|
|
55
|
+
collection: 'functional/size',
|
|
56
|
+
scopes: ['borderWidth', 'effectFloat'],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
// Deprecated: use focus.outline-color instead
|
|
61
|
+
outlineColor: {
|
|
62
|
+
$value: '{focus.outline-color}',
|
|
63
|
+
$type: 'color',
|
|
64
|
+
$deprecated: '{focus.outline-color}',
|
|
65
|
+
$description: 'Deprecated. Use focus.outline-color instead.',
|
|
66
|
+
$extensions: {
|
|
67
|
+
'org.primer.figma': {
|
|
68
|
+
collection: 'mode',
|
|
69
|
+
group: 'component (internal)',
|
|
70
|
+
scopes: ['borderColor', 'effectColor'],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
// Deprecated: use focus.outline-offset and focus.outline-width instead
|
|
76
|
+
outline: {
|
|
77
|
+
focus: {
|
|
78
|
+
offset: {
|
|
79
|
+
$value: '{focus.outline-offset}',
|
|
80
|
+
$type: 'dimension',
|
|
81
|
+
$deprecated: '{focus.outline-offset}',
|
|
82
|
+
$description: 'Deprecated. Use focus.outline-offset instead.',
|
|
83
|
+
$extensions: {
|
|
84
|
+
'org.primer.figma': {
|
|
85
|
+
collection: 'functional/size',
|
|
86
|
+
scopes: ['borderWidth', 'effectFloat'],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
width: {
|
|
91
|
+
$value: '{focus.outline-width}',
|
|
92
|
+
$type: 'dimension',
|
|
93
|
+
$deprecated: '{focus.outline-width}',
|
|
94
|
+
$description: 'Deprecated. Use focus.outline-width instead.',
|
|
95
|
+
$extensions: {
|
|
96
|
+
'org.primer.figma': {
|
|
97
|
+
collection: 'functional/size',
|
|
98
|
+
scopes: ['borderWidth', 'effectFloat'],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
}
|
|
@@ -172,6 +172,7 @@
|
|
|
172
172
|
"--buttonCounter-danger-fgColor-hover": "var(--color-btn-danger-hover-counter-fg)",
|
|
173
173
|
"--buttonCounter-danger-fgColor-disabled": "var(--color-btn-danger-disabled-counter-fg)",
|
|
174
174
|
"--focus-outlineColor": "var(--color-accent-fg)",
|
|
175
|
+
"--focus-outline-color": "var(--color-accent-fg)",
|
|
175
176
|
"--focus-outline": "var(--color-accent-fg solid 2px)",
|
|
176
177
|
"--menu-bgColor-active": "var(--color-menu-bg-active)",
|
|
177
178
|
"--overlay-bgColor": "var(--color-canvas-overlay)",
|
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
focus: {
|
|
3
|
-
outline: {
|
|
4
|
-
$value: {
|
|
5
|
-
color: '{focus.outlineColor}',
|
|
6
|
-
style: 'solid',
|
|
7
|
-
width: {
|
|
8
|
-
value: 2,
|
|
9
|
-
unit: 'px',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
$type: 'border',
|
|
13
|
-
$description: 'Focus ring outline for keyboard navigation and accessibility.',
|
|
14
|
-
$extensions: {
|
|
15
|
-
'org.primer.llm': {
|
|
16
|
-
usage: ['focus-ring', 'keyboard-navigation', 'accessibility-indicator'],
|
|
17
|
-
rules: 'Always ensure focus states are visible. Do not override with custom focus styles that reduce visibility. Use for interactive elements like buttons, links, and form controls.',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
2
|
border: {
|
|
23
3
|
$description: 'Semantic border tokens combining color, style, and width for consistent UI boundaries.',
|
|
24
4
|
$extensions: {
|
|
@@ -66,34 +66,4 @@
|
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
-
outline: {
|
|
70
|
-
focus: {
|
|
71
|
-
offset: {
|
|
72
|
-
$value: {value: -2, unit: 'px'},
|
|
73
|
-
$description: 'Focus outline offset (-2px). Negative value creates an inset outline for keyboard focus indicators, ensuring the focus ring stays within the element bounds',
|
|
74
|
-
$type: 'dimension',
|
|
75
|
-
$extensions: {
|
|
76
|
-
'org.primer.figma': {
|
|
77
|
-
collection: 'functional/size',
|
|
78
|
-
scopes: ['borderWidth', 'effectFloat'],
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
width: {
|
|
83
|
-
$value: {value: 2, unit: 'px'},
|
|
84
|
-
$description: 'Focus outline width (2px). Standard width for keyboard focus indicators to meet WCAG 2.4.7 accessibility requirements',
|
|
85
|
-
$type: 'dimension',
|
|
86
|
-
$extensions: {
|
|
87
|
-
'org.primer.figma': {
|
|
88
|
-
collection: 'functional/size',
|
|
89
|
-
scopes: ['borderWidth', 'effectFloat'],
|
|
90
|
-
},
|
|
91
|
-
'org.primer.llm': {
|
|
92
|
-
usage: ['focus-ring', 'keyboard-focus', 'accessibility'],
|
|
93
|
-
rules: 'MUST use for all keyboard focus indicators. Required for WCAG 2.4.7 compliance.',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
69
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
focus: {
|
|
3
|
-
outlineColor: {
|
|
4
|
-
$value: '{borderColor.accent.emphasis}',
|
|
5
|
-
$type: 'color',
|
|
6
|
-
$description: 'Outline color for focus states on interactive elements',
|
|
7
|
-
$extensions: {
|
|
8
|
-
'org.primer.figma': {
|
|
9
|
-
collection: 'mode',
|
|
10
|
-
group: 'component (internal)',
|
|
11
|
-
scopes: ['borderColor', 'effectColor'],
|
|
12
|
-
},
|
|
13
|
-
'org.primer.llm': {
|
|
14
|
-
usage: ['focus-ring', 'keyboard-navigation', 'accessibility-indicator'],
|
|
15
|
-
rules: 'Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements.',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
}
|