An open source design system that's fully customizable and agent ready
TypeScript
fix(lab): normalize CircularProgress indeterminate dash (#5916)
freddymeta56f79662368e
diff --git a/apps/storybook/rtl-audit/verified-not-applicable.json b/apps/storybook/rtl-audit/verified-not-applicable.jsonindex ee11dcc032..9d6148d2c2 100644--- a/apps/storybook/rtl-audit/verified-not-applicable.json+++ b/apps/storybook/rtl-audit/verified-not-applicable.json@@ -22,5 +22,9 @@{"component": "core/Timestamp","reason": "Timestamp renders locale-formatted text and a direction-neutral hover card; it has no directional icons, contextual decorations, side-specific layout, order, scroll, drag, or directional keyboard behavior."+ },+ {+ "component": "lab/CircularProgress",+ "reason": "No direction-sensitive visual, layout, or behavior. The track and fill are concentric SVG circles sharing one center; size, stroke, dash, and clockwise rotation are intentionally identical in LTR and RTL. The optional label is vertically stacked and centered, with no inline positioning or directional glyph."}]diff --git a/packages/lab/src/CircularProgress/CircularProgress.tsx b/packages/lab/src/CircularProgress/CircularProgress.tsxindex bfbf492b5d..6543a2bb50 100644--- a/packages/lab/src/CircularProgress/CircularProgress.tsx+++ b/packages/lab/src/CircularProgress/CircularProgress.tsx@@ -143,18 +143,20 @@ const indeterminateRotation = stylex.keyframes({'100%': {transform: 'rotate(360deg)'},});+// SVG dash percentages scale with the square viewport. A 300% gap exceeds every+// ring circumference; shifting the 2% + 300% pattern by 302% closes the loop.const indeterminateDash = stylex.keyframes({'0%': {- strokeDasharray: '1, 150',- strokeDashoffset: '0',+ strokeDasharray: '2%, 300%',+ strokeDashoffset: '0%',},'50%': {- strokeDasharray: '90, 150',- strokeDashoffset: '-35',+ strokeDasharray: '175%, 300%',+ strokeDashoffset: '-68%',},'100%': {- strokeDasharray: '90, 150',- strokeDashoffset: '-124',+ strokeDasharray: '2%, 300%',+ strokeDashoffset: '-302%',},});