@astryxdesign/lab 0.0.0-bootstrap.0 → 0.1.2-canary.04e71b2
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/CHANGELOG.md +67 -0
- package/LICENSE +21 -0
- package/README.md +47 -1
- package/dist/Chart/Chart.d.ts +77 -0
- package/dist/Chart/Chart.d.ts.map +1 -0
- package/dist/Chart/Chart.js +247 -0
- package/dist/Chart/ChartArea.d.ts +28 -0
- package/dist/Chart/ChartArea.d.ts.map +1 -0
- package/dist/Chart/ChartArea.js +71 -0
- package/dist/Chart/ChartAxis.d.ts +27 -0
- package/dist/Chart/ChartAxis.d.ts.map +1 -0
- package/dist/Chart/ChartAxis.js +147 -0
- package/dist/Chart/ChartBar.d.ts +19 -0
- package/dist/Chart/ChartBar.d.ts.map +1 -0
- package/dist/Chart/ChartBar.js +61 -0
- package/dist/Chart/ChartBrush.d.ts +59 -0
- package/dist/Chart/ChartBrush.d.ts.map +1 -0
- package/dist/Chart/ChartBrush.js +197 -0
- package/dist/Chart/ChartCandlestick.d.ts +50 -0
- package/dist/Chart/ChartCandlestick.d.ts.map +1 -0
- package/dist/Chart/ChartCandlestick.js +138 -0
- package/dist/Chart/ChartContext.d.ts +5 -0
- package/dist/Chart/ChartContext.d.ts.map +1 -0
- package/dist/Chart/ChartContext.js +20 -0
- package/dist/Chart/ChartDot.d.ts +18 -0
- package/dist/Chart/ChartDot.d.ts.map +1 -0
- package/dist/Chart/ChartDot.js +43 -0
- package/dist/Chart/ChartDotGL.d.ts +16 -0
- package/dist/Chart/ChartDotGL.d.ts.map +1 -0
- package/dist/Chart/ChartDotGL.js +135 -0
- package/dist/Chart/ChartDotGLInteractive.d.ts +41 -0
- package/dist/Chart/ChartDotGLInteractive.d.ts.map +1 -0
- package/dist/Chart/ChartDotGLInteractive.js +446 -0
- package/dist/Chart/ChartErrorBar.d.ts +23 -0
- package/dist/Chart/ChartErrorBar.d.ts.map +1 -0
- package/dist/Chart/ChartErrorBar.js +68 -0
- package/dist/Chart/ChartGrid.d.ts +17 -0
- package/dist/Chart/ChartGrid.d.ts.map +1 -0
- package/dist/Chart/ChartGrid.js +67 -0
- package/dist/Chart/ChartHeatmapGL.d.ts +10 -0
- package/dist/Chart/ChartHeatmapGL.d.ts.map +1 -0
- package/dist/Chart/ChartHeatmapGL.js +171 -0
- package/dist/Chart/ChartLegend.d.ts +60 -0
- package/dist/Chart/ChartLegend.d.ts.map +1 -0
- package/dist/Chart/ChartLegend.js +161 -0
- package/dist/Chart/ChartLine.d.ts +23 -0
- package/dist/Chart/ChartLine.d.ts.map +1 -0
- package/dist/Chart/ChartLine.js +64 -0
- package/dist/Chart/ChartReferenceLine.d.ts +11 -0
- package/dist/Chart/ChartReferenceLine.d.ts.map +1 -0
- package/dist/Chart/ChartReferenceLine.js +109 -0
- package/dist/Chart/ChartSelect.d.ts +9 -0
- package/dist/Chart/ChartSelect.d.ts.map +1 -0
- package/dist/Chart/ChartSelect.js +90 -0
- package/dist/Chart/ChartStreamGL.d.ts +17 -0
- package/dist/Chart/ChartStreamGL.d.ts.map +1 -0
- package/dist/Chart/ChartStreamGL.js +157 -0
- package/dist/Chart/ChartTooltip.d.ts +85 -0
- package/dist/Chart/ChartTooltip.d.ts.map +1 -0
- package/dist/Chart/ChartTooltip.js +335 -0
- package/dist/Chart/ChartZoom.d.ts +23 -0
- package/dist/Chart/ChartZoom.d.ts.map +1 -0
- package/dist/Chart/ChartZoom.js +314 -0
- package/dist/Chart/formatters.d.ts +33 -0
- package/dist/Chart/formatters.d.ts.map +1 -0
- package/dist/Chart/formatters.js +101 -0
- package/dist/Chart/getChartColors.d.ts +56 -0
- package/dist/Chart/getChartColors.d.ts.map +1 -0
- package/dist/Chart/getChartColors.js +150 -0
- package/dist/Chart/index.d.ts +29 -0
- package/dist/Chart/index.d.ts.map +1 -0
- package/dist/Chart/index.js +29 -0
- package/dist/Chart/m4.d.ts +36 -0
- package/dist/Chart/m4.d.ts.map +1 -0
- package/dist/Chart/m4.js +106 -0
- package/dist/Chart/types.d.ts +55 -0
- package/dist/Chart/types.d.ts.map +1 -0
- package/dist/Chart/types.js +1 -0
- package/dist/Chart/useChartColors.d.ts +16 -0
- package/dist/Chart/useChartColors.d.ts.map +1 -0
- package/dist/Chart/useChartColors.js +30 -0
- package/dist/Chart/useChartRange.d.ts +50 -0
- package/dist/Chart/useChartRange.d.ts.map +1 -0
- package/dist/Chart/useChartRange.js +90 -0
- package/dist/Chart/utils.d.ts +15 -0
- package/dist/Chart/utils.d.ts.map +1 -0
- package/dist/Chart/utils.js +24 -0
- package/dist/Chart/webgl.d.ts +62 -0
- package/dist/Chart/webgl.d.ts.map +1 -0
- package/dist/Chart/webgl.js +169 -0
- package/dist/ChartV2/Chart.d.ts +32 -0
- package/dist/ChartV2/Chart.d.ts.map +1 -0
- package/dist/ChartV2/Chart.js +281 -0
- package/dist/ChartV2/ChartAxis.d.ts +36 -0
- package/dist/ChartV2/ChartAxis.d.ts.map +1 -0
- package/dist/ChartV2/ChartAxis.js +161 -0
- package/dist/ChartV2/ChartGrid.d.ts +20 -0
- package/dist/ChartV2/ChartGrid.d.ts.map +1 -0
- package/dist/ChartV2/ChartGrid.js +76 -0
- package/dist/ChartV2/ChartLegend.d.ts +14 -0
- package/dist/ChartV2/ChartLegend.d.ts.map +1 -0
- package/dist/ChartV2/ChartLegend.js +54 -0
- package/dist/ChartV2/ChartSwatch.d.ts +36 -0
- package/dist/ChartV2/ChartSwatch.d.ts.map +1 -0
- package/dist/ChartV2/ChartSwatch.js +82 -0
- package/dist/ChartV2/ChartTooltip.d.ts +46 -0
- package/dist/ChartV2/ChartTooltip.d.ts.map +1 -0
- package/dist/ChartV2/ChartTooltip.js +267 -0
- package/dist/ChartV2/ChartV2Context.d.ts +4 -0
- package/dist/ChartV2/ChartV2Context.d.ts.map +1 -0
- package/dist/ChartV2/ChartV2Context.js +12 -0
- package/dist/ChartV2/index.d.ts +13 -0
- package/dist/ChartV2/index.d.ts.map +1 -0
- package/dist/ChartV2/index.js +10 -0
- package/dist/ChartV2/layout.d.ts +25 -0
- package/dist/ChartV2/layout.d.ts.map +1 -0
- package/dist/ChartV2/layout.js +195 -0
- package/dist/ChartV2/legend.d.ts +18 -0
- package/dist/ChartV2/legend.d.ts.map +1 -0
- package/dist/ChartV2/legend.js +24 -0
- package/dist/ChartV2/marks/area.d.ts +19 -0
- package/dist/ChartV2/marks/area.d.ts.map +1 -0
- package/dist/ChartV2/marks/area.js +109 -0
- package/dist/ChartV2/marks/band.d.ts +9 -0
- package/dist/ChartV2/marks/band.d.ts.map +1 -0
- package/dist/ChartV2/marks/band.js +59 -0
- package/dist/ChartV2/marks/bar.d.ts +17 -0
- package/dist/ChartV2/marks/bar.d.ts.map +1 -0
- package/dist/ChartV2/marks/bar.js +120 -0
- package/dist/ChartV2/marks/candlestick.d.ts +15 -0
- package/dist/ChartV2/marks/candlestick.d.ts.map +1 -0
- package/dist/ChartV2/marks/candlestick.js +83 -0
- package/dist/ChartV2/marks/dot.d.ts +15 -0
- package/dist/ChartV2/marks/dot.d.ts.map +1 -0
- package/dist/ChartV2/marks/dot.js +65 -0
- package/dist/ChartV2/marks/dotGL.d.ts +16 -0
- package/dist/ChartV2/marks/dotGL.d.ts.map +1 -0
- package/dist/ChartV2/marks/dotGL.js +178 -0
- package/dist/ChartV2/marks/dotGLInteractive.d.ts +30 -0
- package/dist/ChartV2/marks/dotGLInteractive.d.ts.map +1 -0
- package/dist/ChartV2/marks/dotGLInteractive.js +464 -0
- package/dist/ChartV2/marks/errorBar.d.ts +27 -0
- package/dist/ChartV2/marks/errorBar.d.ts.map +1 -0
- package/dist/ChartV2/marks/errorBar.js +87 -0
- package/dist/ChartV2/marks/heatmapGL.d.ts +23 -0
- package/dist/ChartV2/marks/heatmapGL.d.ts.map +1 -0
- package/dist/ChartV2/marks/heatmapGL.js +242 -0
- package/dist/ChartV2/marks/index.d.ts +13 -0
- package/dist/ChartV2/marks/index.d.ts.map +1 -0
- package/dist/ChartV2/marks/index.js +14 -0
- package/dist/ChartV2/marks/line.d.ts +18 -0
- package/dist/ChartV2/marks/line.d.ts.map +1 -0
- package/dist/ChartV2/marks/line.js +76 -0
- package/dist/ChartV2/marks/referenceLine.d.ts +35 -0
- package/dist/ChartV2/marks/referenceLine.d.ts.map +1 -0
- package/dist/ChartV2/marks/referenceLine.js +186 -0
- package/dist/ChartV2/marks/streamGL.d.ts +36 -0
- package/dist/ChartV2/marks/streamGL.d.ts.map +1 -0
- package/dist/ChartV2/marks/streamGL.js +204 -0
- package/dist/ChartV2/tooltip.d.ts +38 -0
- package/dist/ChartV2/tooltip.d.ts.map +1 -0
- package/dist/ChartV2/tooltip.js +54 -0
- package/dist/ChartV2/types.d.ts +115 -0
- package/dist/ChartV2/types.d.ts.map +1 -0
- package/dist/ChartV2/types.js +35 -0
- package/dist/ChatReasoning/ChatReasoning.d.ts +51 -0
- package/dist/ChatReasoning/ChatReasoning.d.ts.map +1 -0
- package/dist/ChatReasoning/ChatReasoning.js +236 -0
- package/dist/CircularProgress/CircularProgress.d.ts +101 -0
- package/dist/CircularProgress/CircularProgress.d.ts.map +1 -0
- package/dist/CircularProgress/CircularProgress.js +263 -0
- package/dist/CircularProgress/index.d.ts +6 -0
- package/dist/CircularProgress/index.d.ts.map +1 -0
- package/dist/CircularProgress/index.js +8 -0
- package/dist/CodeBlock/index.d.ts +8 -0
- package/dist/CodeBlock/index.d.ts.map +1 -0
- package/dist/CodeBlock/index.js +9 -0
- package/dist/CodeEditor/CodeEditor.d.ts +46 -0
- package/dist/CodeEditor/CodeEditor.d.ts.map +1 -0
- package/dist/CodeEditor/CodeEditor.js +396 -0
- package/dist/CodeEditor/index.d.ts +6 -0
- package/dist/CodeEditor/index.d.ts.map +1 -0
- package/dist/CodeEditor/index.js +7 -0
- package/dist/Radial/RadialArea.d.ts +25 -0
- package/dist/Radial/RadialArea.d.ts.map +1 -0
- package/dist/Radial/RadialArea.js +91 -0
- package/dist/Radial/RadialAxis.d.ts +14 -0
- package/dist/Radial/RadialAxis.d.ts.map +1 -0
- package/dist/Radial/RadialAxis.js +55 -0
- package/dist/Radial/RadialChart.d.ts +70 -0
- package/dist/Radial/RadialChart.d.ts.map +1 -0
- package/dist/Radial/RadialChart.js +174 -0
- package/dist/Radial/RadialContext.d.ts +5 -0
- package/dist/Radial/RadialContext.d.ts.map +1 -0
- package/dist/Radial/RadialContext.js +19 -0
- package/dist/Radial/RadialGrid.d.ts +14 -0
- package/dist/Radial/RadialGrid.d.ts.map +1 -0
- package/dist/Radial/RadialGrid.js +70 -0
- package/dist/Radial/RadialSlice.d.ts +23 -0
- package/dist/Radial/RadialSlice.d.ts.map +1 -0
- package/dist/Radial/RadialSlice.js +85 -0
- package/dist/Radial/RadialTooltip.d.ts +44 -0
- package/dist/Radial/RadialTooltip.d.ts.map +1 -0
- package/dist/Radial/RadialTooltip.js +284 -0
- package/dist/Radial/index.d.ts +9 -0
- package/dist/Radial/index.d.ts.map +1 -0
- package/dist/Radial/index.js +9 -0
- package/dist/Radial/types.d.ts +39 -0
- package/dist/Radial/types.d.ts.map +1 -0
- package/dist/Radial/types.js +1 -0
- package/dist/SVGIcon/SVGIcon.d.ts +87 -0
- package/dist/SVGIcon/SVGIcon.d.ts.map +1 -0
- package/dist/SVGIcon/SVGIcon.js +299 -0
- package/dist/SVGIcon/icons.d.ts +49 -0
- package/dist/SVGIcon/icons.d.ts.map +1 -0
- package/dist/SVGIcon/icons.js +326 -0
- package/dist/SVGIcon/index.d.ts +15 -0
- package/dist/SVGIcon/index.d.ts.map +1 -0
- package/dist/SVGIcon/index.js +22 -0
- package/dist/SVGIcon/pathTransforms.d.ts +35 -0
- package/dist/SVGIcon/pathTransforms.d.ts.map +1 -0
- package/dist/SVGIcon/pathTransforms.js +644 -0
- package/dist/SVGIcon/tokens.stylex.d.ts +37 -0
- package/dist/SVGIcon/tokens.stylex.d.ts.map +1 -0
- package/dist/SVGIcon/tokens.stylex.js +40 -0
- package/dist/SVGIcon/variations.stylex.d.ts +44 -0
- package/dist/SVGIcon/variations.stylex.d.ts.map +1 -0
- package/dist/SVGIcon/variations.stylex.js +119 -0
- package/dist/SVGIcon/xif-examples.d.ts +22 -0
- package/dist/SVGIcon/xif-examples.d.ts.map +1 -0
- package/dist/SVGIcon/xif-examples.js +202 -0
- package/dist/SVGIcon/xif-types.d.ts +129 -0
- package/dist/SVGIcon/xif-types.d.ts.map +1 -0
- package/dist/SVGIcon/xif-types.js +1 -0
- package/dist/Sankey/SankeyChart.d.ts +72 -0
- package/dist/Sankey/SankeyChart.d.ts.map +1 -0
- package/dist/Sankey/SankeyChart.js +162 -0
- package/dist/Sankey/SankeyContext.d.ts +5 -0
- package/dist/Sankey/SankeyContext.d.ts.map +1 -0
- package/dist/Sankey/SankeyContext.js +20 -0
- package/dist/Sankey/SankeyGrid.d.ts +20 -0
- package/dist/Sankey/SankeyGrid.d.ts.map +1 -0
- package/dist/Sankey/SankeyGrid.js +53 -0
- package/dist/Sankey/SankeyLabel.d.ts +11 -0
- package/dist/Sankey/SankeyLabel.d.ts.map +1 -0
- package/dist/Sankey/SankeyLabel.js +179 -0
- package/dist/Sankey/SankeyLink.d.ts +29 -0
- package/dist/Sankey/SankeyLink.d.ts.map +1 -0
- package/dist/Sankey/SankeyLink.js +139 -0
- package/dist/Sankey/SankeyNode.d.ts +15 -0
- package/dist/Sankey/SankeyNode.d.ts.map +1 -0
- package/dist/Sankey/SankeyNode.js +56 -0
- package/dist/Sankey/index.d.ts +8 -0
- package/dist/Sankey/index.d.ts.map +1 -0
- package/dist/Sankey/index.js +8 -0
- package/dist/Sankey/layout.d.ts +26 -0
- package/dist/Sankey/layout.d.ts.map +1 -0
- package/dist/Sankey/layout.js +157 -0
- package/dist/Sankey/types.d.ts +84 -0
- package/dist/Sankey/types.d.ts.map +1 -0
- package/dist/Sankey/types.js +1 -0
- package/dist/Schedule/CalendarEvent.d.ts +36 -0
- package/dist/Schedule/CalendarEvent.d.ts.map +1 -0
- package/dist/Schedule/CalendarEvent.js +35 -0
- package/dist/Schedule/DayView.d.ts +8 -0
- package/dist/Schedule/DayView.d.ts.map +1 -0
- package/dist/Schedule/DayView.js +105 -0
- package/dist/Schedule/ListView.d.ts +6 -0
- package/dist/Schedule/ListView.d.ts.map +1 -0
- package/dist/Schedule/ListView.js +171 -0
- package/dist/Schedule/MonthlyView.d.ts +6 -0
- package/dist/Schedule/MonthlyView.d.ts.map +1 -0
- package/dist/Schedule/MonthlyView.js +270 -0
- package/dist/Schedule/Schedule.d.ts +22 -0
- package/dist/Schedule/Schedule.d.ts.map +1 -0
- package/dist/Schedule/Schedule.js +185 -0
- package/dist/Schedule/TimeGridView.d.ts +12 -0
- package/dist/Schedule/TimeGridView.d.ts.map +1 -0
- package/dist/Schedule/TimeGridView.js +364 -0
- package/dist/Schedule/WeeklyView.d.ts +9 -0
- package/dist/Schedule/WeeklyView.d.ts.map +1 -0
- package/dist/Schedule/WeeklyView.js +112 -0
- package/dist/Schedule/context.d.ts +20 -0
- package/dist/Schedule/context.d.ts.map +1 -0
- package/dist/Schedule/context.js +19 -0
- package/dist/Schedule/dateMath.d.ts +21 -0
- package/dist/Schedule/dateMath.d.ts.map +1 -0
- package/dist/Schedule/dateMath.js +63 -0
- package/dist/Schedule/index.d.ts +19 -0
- package/dist/Schedule/index.d.ts.map +1 -0
- package/dist/Schedule/index.js +17 -0
- package/dist/Schedule/plugins/PaginationPlugin.d.ts +7 -0
- package/dist/Schedule/plugins/PaginationPlugin.d.ts.map +1 -0
- package/dist/Schedule/plugins/PaginationPlugin.js +81 -0
- package/dist/Schedule/plugins/ViewSelectorPlugin.d.ts +11 -0
- package/dist/Schedule/plugins/ViewSelectorPlugin.d.ts.map +1 -0
- package/dist/Schedule/plugins/ViewSelectorPlugin.js +78 -0
- package/dist/Schedule/plugins/index.d.ts +5 -0
- package/dist/Schedule/plugins/index.d.ts.map +1 -0
- package/dist/Schedule/plugins/index.js +14 -0
- package/dist/Schedule/shared.d.ts +923 -0
- package/dist/Schedule/shared.d.ts.map +1 -0
- package/dist/Schedule/shared.js +1325 -0
- package/dist/Schedule/types.d.ts +51 -0
- package/dist/Schedule/types.d.ts.map +1 -0
- package/dist/Schedule/types.js +1 -0
- package/dist/Schedule/useCurrentTime.d.ts +3 -0
- package/dist/Schedule/useCurrentTime.d.ts.map +1 -0
- package/dist/Schedule/useCurrentTime.js +43 -0
- package/dist/Schedule/zonedDateTime.d.ts +20 -0
- package/dist/Schedule/zonedDateTime.d.ts.map +1 -0
- package/dist/Schedule/zonedDateTime.js +31 -0
- package/dist/Stepper/Step.d.ts +120 -0
- package/dist/Stepper/Step.d.ts.map +1 -0
- package/dist/Stepper/Step.js +573 -0
- package/dist/Stepper/StepStatus.d.ts +24 -0
- package/dist/Stepper/StepStatus.d.ts.map +1 -0
- package/dist/Stepper/StepStatus.js +1 -0
- package/dist/Stepper/Stepper.d.ts +77 -0
- package/dist/Stepper/Stepper.d.ts.map +1 -0
- package/dist/Stepper/Stepper.js +104 -0
- package/dist/Stepper/StepperContext.d.ts +12 -0
- package/dist/Stepper/StepperContext.d.ts.map +1 -0
- package/dist/Stepper/StepperContext.js +24 -0
- package/dist/Stepper/index.d.ts +8 -0
- package/dist/Stepper/index.d.ts.map +1 -0
- package/dist/Stepper/index.js +7 -0
- package/dist/ThreeD/ThreeDAxis.d.ts +6 -0
- package/dist/ThreeD/ThreeDAxis.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDAxis.js +75 -0
- package/dist/ThreeD/ThreeDBar.d.ts +7 -0
- package/dist/ThreeD/ThreeDBar.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDBar.js +98 -0
- package/dist/ThreeD/ThreeDChart.d.ts +24 -0
- package/dist/ThreeD/ThreeDChart.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDChart.js +202 -0
- package/dist/ThreeD/ThreeDContext.d.ts +5 -0
- package/dist/ThreeD/ThreeDContext.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDContext.js +19 -0
- package/dist/ThreeD/ThreeDGrid.d.ts +5 -0
- package/dist/ThreeD/ThreeDGrid.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDGrid.js +55 -0
- package/dist/ThreeD/ThreeDScatter.d.ts +7 -0
- package/dist/ThreeD/ThreeDScatter.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDScatter.js +57 -0
- package/dist/ThreeD/ThreeDScatterGL.d.ts +7 -0
- package/dist/ThreeD/ThreeDScatterGL.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDScatterGL.js +243 -0
- package/dist/ThreeD/ThreeDSurface.d.ts +15 -0
- package/dist/ThreeD/ThreeDSurface.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDSurface.js +97 -0
- package/dist/ThreeD/index.d.ts +10 -0
- package/dist/ThreeD/index.d.ts.map +1 -0
- package/dist/ThreeD/index.js +10 -0
- package/dist/ThreeD/types.d.ts +57 -0
- package/dist/ThreeD/types.d.ts.map +1 -0
- package/dist/ThreeD/types.js +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/lab.css +423 -0
- package/package.json +69 -4
- package/src/Chart/Chart.tsx +312 -0
- package/src/Chart/ChartArea.doc.mjs +16 -0
- package/src/Chart/ChartArea.tsx +91 -0
- package/src/Chart/ChartAxis.tsx +186 -0
- package/src/Chart/ChartBar.doc.mjs +16 -0
- package/src/Chart/ChartBar.tsx +71 -0
- package/src/Chart/ChartBrush.tsx +237 -0
- package/src/Chart/ChartCandlestick.doc.mjs +16 -0
- package/src/Chart/ChartCandlestick.tsx +186 -0
- package/src/Chart/ChartContext.ts +23 -0
- package/src/Chart/ChartDot.doc.mjs +16 -0
- package/src/Chart/ChartDot.tsx +44 -0
- package/src/Chart/ChartDotGL.doc.mjs +16 -0
- package/src/Chart/ChartDotGL.tsx +151 -0
- package/src/Chart/ChartDotGLInteractive.doc.mjs +16 -0
- package/src/Chart/ChartDotGLInteractive.tsx +519 -0
- package/src/Chart/ChartErrorBar.tsx +84 -0
- package/src/Chart/ChartGrid.tsx +86 -0
- package/src/Chart/ChartHeatmapGL.doc.mjs +16 -0
- package/src/Chart/ChartHeatmapGL.tsx +219 -0
- package/src/Chart/ChartLegend.tsx +181 -0
- package/src/Chart/ChartLine.doc.mjs +16 -0
- package/src/Chart/ChartLine.tsx +70 -0
- package/src/Chart/ChartReferenceLine.tsx +76 -0
- package/src/Chart/ChartSelect.tsx +111 -0
- package/src/Chart/ChartStreamGL.doc.mjs +16 -0
- package/src/Chart/ChartStreamGL.tsx +189 -0
- package/src/Chart/ChartTooltip.tsx +451 -0
- package/src/Chart/ChartZoom.tsx +400 -0
- package/src/Chart/formatters.ts +95 -0
- package/src/Chart/getChartColors.ts +249 -0
- package/src/Chart/index.ts +90 -0
- package/src/Chart/m4.test.ts +66 -0
- package/src/Chart/m4.ts +128 -0
- package/src/Chart/types.ts +64 -0
- package/src/Chart/useChartColors.ts +34 -0
- package/src/Chart/useChartRange.test.ts +101 -0
- package/src/Chart/useChartRange.ts +146 -0
- package/src/Chart/utils.ts +31 -0
- package/src/Chart/webgl.ts +192 -0
- package/src/ChartV2/Chart.tsx +348 -0
- package/src/ChartV2/ChartAxis.tsx +209 -0
- package/src/ChartV2/ChartGrid.tsx +99 -0
- package/src/ChartV2/ChartLegend.tsx +69 -0
- package/src/ChartV2/ChartSwatch.doc.mjs +17 -0
- package/src/ChartV2/ChartSwatch.tsx +86 -0
- package/src/ChartV2/ChartTooltip.tsx +382 -0
- package/src/ChartV2/ChartV2.doc.mjs +16 -0
- package/src/ChartV2/ChartV2Context.ts +15 -0
- package/src/ChartV2/index.ts +62 -0
- package/src/ChartV2/layout.ts +223 -0
- package/src/ChartV2/legend.ts +32 -0
- package/src/ChartV2/marks/area.tsx +122 -0
- package/src/ChartV2/marks/band.tsx +70 -0
- package/src/ChartV2/marks/bar.tsx +159 -0
- package/src/ChartV2/marks/candlestick.tsx +106 -0
- package/src/ChartV2/marks/dot.tsx +64 -0
- package/src/ChartV2/marks/dotGL.tsx +202 -0
- package/src/ChartV2/marks/dotGLInteractive.tsx +546 -0
- package/src/ChartV2/marks/errorBar.tsx +89 -0
- package/src/ChartV2/marks/heatmapGL.tsx +299 -0
- package/src/ChartV2/marks/index.ts +14 -0
- package/src/ChartV2/marks/line.tsx +94 -0
- package/src/ChartV2/marks/referenceLine.tsx +224 -0
- package/src/ChartV2/marks/streamGL.tsx +251 -0
- package/src/ChartV2/tooltip.ts +70 -0
- package/src/ChartV2/types.ts +129 -0
- package/src/ChatReasoning/ChatReasoning.doc.mjs +16 -0
- package/src/ChatReasoning/ChatReasoning.test.tsx +56 -0
- package/src/ChatReasoning/ChatReasoning.tsx +322 -0
- package/src/CircularProgress/CircularProgress.doc.mjs +174 -0
- package/src/CircularProgress/CircularProgress.test.tsx +157 -0
- package/src/CircularProgress/CircularProgress.tsx +373 -0
- package/src/CircularProgress/index.ts +15 -0
- package/src/CodeBlock/index.ts +10 -0
- package/src/CodeEditor/CodeEditor.doc.mjs +16 -0
- package/src/CodeEditor/CodeEditor.tsx +466 -0
- package/src/CodeEditor/index.ts +8 -0
- package/src/Radial/RadialArea.tsx +103 -0
- package/src/Radial/RadialAxis.tsx +60 -0
- package/src/Radial/RadialChart.doc.mjs +16 -0
- package/src/Radial/RadialChart.tsx +219 -0
- package/src/Radial/RadialContext.ts +22 -0
- package/src/Radial/RadialGrid.tsx +81 -0
- package/src/Radial/RadialSlice.tsx +130 -0
- package/src/Radial/RadialTooltip.tsx +347 -0
- package/src/Radial/index.ts +14 -0
- package/src/Radial/types.ts +46 -0
- package/src/SVGIcon/SVGIcon.doc.mjs +16 -0
- package/src/SVGIcon/SVGIcon.tsx +406 -0
- package/src/SVGIcon/icons.ts +283 -0
- package/src/SVGIcon/index.ts +73 -0
- package/src/SVGIcon/pathTransforms.ts +612 -0
- package/src/SVGIcon/tokens.stylex.ts +53 -0
- package/src/SVGIcon/variations.stylex.ts +122 -0
- package/src/SVGIcon/xif-examples.ts +191 -0
- package/src/SVGIcon/xif-types.ts +181 -0
- package/src/Sankey/SankeyChart.doc.mjs +16 -0
- package/src/Sankey/SankeyChart.tsx +220 -0
- package/src/Sankey/SankeyContext.ts +23 -0
- package/src/Sankey/SankeyGrid.tsx +69 -0
- package/src/Sankey/SankeyLabel.tsx +234 -0
- package/src/Sankey/SankeyLink.tsx +167 -0
- package/src/Sankey/SankeyNode.tsx +66 -0
- package/src/Sankey/index.ts +22 -0
- package/src/Sankey/layout.ts +219 -0
- package/src/Sankey/types.ts +93 -0
- package/src/Schedule/CalendarEvent.ts +74 -0
- package/src/Schedule/DayView.tsx +112 -0
- package/src/Schedule/ListView.tsx +236 -0
- package/src/Schedule/MonthlyView.tsx +401 -0
- package/src/Schedule/Schedule.doc.mjs +16 -0
- package/src/Schedule/Schedule.test.tsx +405 -0
- package/src/Schedule/Schedule.tsx +307 -0
- package/src/Schedule/TimeGridView.tsx +589 -0
- package/src/Schedule/WeeklyView.tsx +130 -0
- package/src/Schedule/context.tsx +49 -0
- package/src/Schedule/dateMath.ts +112 -0
- package/src/Schedule/index.ts +61 -0
- package/src/Schedule/plugins/PaginationPlugin.tsx +98 -0
- package/src/Schedule/plugins/ViewSelectorPlugin.tsx +128 -0
- package/src/Schedule/plugins/index.tsx +20 -0
- package/src/Schedule/shared.tsx +1304 -0
- package/src/Schedule/types.ts +86 -0
- package/src/Schedule/useCurrentTime.ts +50 -0
- package/src/Schedule/zonedDateTime.ts +71 -0
- package/src/Stepper/Step.doc.mjs +17 -0
- package/src/Stepper/Step.tsx +756 -0
- package/src/Stepper/StepStatus.ts +26 -0
- package/src/Stepper/Stepper.doc.mjs +265 -0
- package/src/Stepper/Stepper.test.tsx +281 -0
- package/src/Stepper/Stepper.tsx +157 -0
- package/src/Stepper/StepperContext.ts +43 -0
- package/src/Stepper/index.ts +14 -0
- package/src/ThreeD/3DBar.doc.mjs +16 -0
- package/src/ThreeD/3DChart.doc.mjs +16 -0
- package/src/ThreeD/3DScatter.doc.mjs +16 -0
- package/src/ThreeD/3DScatterGL.doc.mjs +16 -0
- package/src/ThreeD/3DSurface.doc.mjs +16 -0
- package/src/ThreeD/ThreeDAxis.tsx +86 -0
- package/src/ThreeD/ThreeDBar.tsx +130 -0
- package/src/ThreeD/ThreeDChart.tsx +262 -0
- package/src/ThreeD/ThreeDContext.ts +22 -0
- package/src/ThreeD/ThreeDGrid.tsx +68 -0
- package/src/ThreeD/ThreeDScatter.tsx +63 -0
- package/src/ThreeD/ThreeDScatterGL.tsx +270 -0
- package/src/ThreeD/ThreeDSurface.tsx +142 -0
- package/src/ThreeD/index.ts +11 -0
- package/src/ThreeD/projection.test.ts +132 -0
- package/src/ThreeD/types.ts +62 -0
- package/src/index.ts +250 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file Step.tsx
|
|
7
|
+
* @input Uses React, stylex, theme tokens, StepperContext
|
|
8
|
+
* @output Exports Step component and StepProps
|
|
9
|
+
* @position Individual step item; used inside Stepper
|
|
10
|
+
*
|
|
11
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
12
|
+
* - /packages/lab/src/Stepper/Stepper.doc.mjs
|
|
13
|
+
* - /packages/lab/src/Stepper/Stepper.test.tsx
|
|
14
|
+
* - /packages/lab/src/Stepper/index.ts
|
|
15
|
+
* - /apps/storybook/stories/Stepper.stories.tsx
|
|
16
|
+
* - /packages/cli/templates/blocks/components/Stepper/ (showcase blocks)
|
|
17
|
+
*/
|
|
18
|
+
import * as stylex from '@stylexjs/stylex';
|
|
19
|
+
import '@astryxdesign/core/theme/tokens.stylex';
|
|
20
|
+
import { colorVars, spacingVars, radiusVars, fontWeightVars, typeScaleVars, durationVars, easeVars } from '@astryxdesign/core/theme/tokens.stylex';
|
|
21
|
+
import { mergeProps } from '@astryxdesign/core/utils';
|
|
22
|
+
import { useStepperContext } from "./StepperContext.js";
|
|
23
|
+
import { themeProps } from '@astryxdesign/core/utils';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Built-in indicator presets. Anything other than these strings passed to
|
|
27
|
+
* `indicator` is treated as a custom ReactNode (e.g. an `<Icon />`).
|
|
28
|
+
* - 'auto': numbered badge for not-yet-reached steps, a check once completed
|
|
29
|
+
* (default)
|
|
30
|
+
* - 'number': always a numbered badge
|
|
31
|
+
* - 'none': no indicator — just the progress bar and label
|
|
32
|
+
*/
|
|
33
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
|
+
// --- Default progress icons (16px) ---
|
|
35
|
+
|
|
36
|
+
/** Filled check — shown for completed steps in 'auto' mode. */
|
|
37
|
+
function CheckCircleIcon() {
|
|
38
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
39
|
+
width: "16",
|
|
40
|
+
height: "16",
|
|
41
|
+
viewBox: "0 0 16 16",
|
|
42
|
+
fill: "none",
|
|
43
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
44
|
+
cx: "8",
|
|
45
|
+
cy: "8",
|
|
46
|
+
r: "8",
|
|
47
|
+
fill: "currentColor"
|
|
48
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
49
|
+
d: "M5 8.5l2 2 4-4",
|
|
50
|
+
stroke: "white",
|
|
51
|
+
strokeWidth: "1.5",
|
|
52
|
+
strokeLinecap: "round",
|
|
53
|
+
strokeLinejoin: "round"
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Filled dot in a ring — shown for the active step in 'auto' mode. */
|
|
59
|
+
function CurrentIcon() {
|
|
60
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
61
|
+
width: "16",
|
|
62
|
+
height: "16",
|
|
63
|
+
viewBox: "0 0 16 16",
|
|
64
|
+
fill: "none",
|
|
65
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
66
|
+
cx: "8",
|
|
67
|
+
cy: "8",
|
|
68
|
+
r: "7",
|
|
69
|
+
stroke: "currentColor",
|
|
70
|
+
strokeWidth: "2"
|
|
71
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
72
|
+
cx: "8",
|
|
73
|
+
cy: "8",
|
|
74
|
+
r: "4",
|
|
75
|
+
fill: "currentColor"
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// --- Styles ---
|
|
81
|
+
|
|
82
|
+
const BAR_WIDTH = '4px';
|
|
83
|
+
const ICON_SIZE = spacingVars['--spacing-4'];
|
|
84
|
+
const NUMBER_SIZE = spacingVars['--spacing-5'];
|
|
85
|
+
const styles = {
|
|
86
|
+
verticalRoot: {
|
|
87
|
+
k1xSpc: "x78zum5",
|
|
88
|
+
kXwgrk: "x1q0g3np",
|
|
89
|
+
kGNEyG: "x1qjc9v5",
|
|
90
|
+
kVAEAm: "x1n2onr6",
|
|
91
|
+
kOIVth: "x1lsbc85",
|
|
92
|
+
$$css: true
|
|
93
|
+
},
|
|
94
|
+
verticalBar: {
|
|
95
|
+
kzqmXN: "x51ohtg",
|
|
96
|
+
kaIpWk: "xjspbzw",
|
|
97
|
+
kmuXW: "x2lah0s",
|
|
98
|
+
kSGwAc: "xkh2ocl",
|
|
99
|
+
$$css: true
|
|
100
|
+
},
|
|
101
|
+
barCompleted: {
|
|
102
|
+
kWkggS: "x1ewilqj",
|
|
103
|
+
$$css: true
|
|
104
|
+
},
|
|
105
|
+
barIncomplete: {
|
|
106
|
+
kWkggS: "x1m4xfpy",
|
|
107
|
+
$$css: true
|
|
108
|
+
},
|
|
109
|
+
barAccent: {
|
|
110
|
+
kWkggS: "x1ewilqj",
|
|
111
|
+
$$css: true
|
|
112
|
+
},
|
|
113
|
+
barSuccess: {
|
|
114
|
+
kWkggS: "xdsz4j9",
|
|
115
|
+
$$css: true
|
|
116
|
+
},
|
|
117
|
+
barWarning: {
|
|
118
|
+
kWkggS: "x1q8g9m5",
|
|
119
|
+
$$css: true
|
|
120
|
+
},
|
|
121
|
+
barError: {
|
|
122
|
+
kWkggS: "x1pjz0fi",
|
|
123
|
+
$$css: true
|
|
124
|
+
},
|
|
125
|
+
horizontalStep: {
|
|
126
|
+
k1xSpc: "x78zum5",
|
|
127
|
+
kXwgrk: "xdt5ytf",
|
|
128
|
+
kGNEyG: "x1cy8zhl",
|
|
129
|
+
kUk6DE: "x98rzlu",
|
|
130
|
+
$$css: true
|
|
131
|
+
},
|
|
132
|
+
horizontalBar: {
|
|
133
|
+
kzqmXN: "xh8yej3",
|
|
134
|
+
kZKoxP: "xqu0tyb",
|
|
135
|
+
kaIpWk: "xjspbzw",
|
|
136
|
+
kmuXW: "x2lah0s",
|
|
137
|
+
k1K539: "xlstkdb",
|
|
138
|
+
$$css: true
|
|
139
|
+
},
|
|
140
|
+
icon: {
|
|
141
|
+
k1xSpc: "x78zum5",
|
|
142
|
+
kGNEyG: "x6s0dn4",
|
|
143
|
+
kjj79g: "xl56j7k",
|
|
144
|
+
kzqmXN: "x12xnipv",
|
|
145
|
+
kZKoxP: "x6b6gus",
|
|
146
|
+
kmuXW: "x2lah0s",
|
|
147
|
+
$$css: true
|
|
148
|
+
},
|
|
149
|
+
iconCompleted: {
|
|
150
|
+
kMwMTN: "xqwr325",
|
|
151
|
+
$$css: true
|
|
152
|
+
},
|
|
153
|
+
iconInProgress: {
|
|
154
|
+
kMwMTN: "xqwr325",
|
|
155
|
+
$$css: true
|
|
156
|
+
},
|
|
157
|
+
iconNotStarted: {
|
|
158
|
+
kMwMTN: "xv9yike",
|
|
159
|
+
$$css: true
|
|
160
|
+
},
|
|
161
|
+
iconDisabled: {
|
|
162
|
+
kMwMTN: "xqa6c3m",
|
|
163
|
+
kSiTet: "xbyyjgo",
|
|
164
|
+
$$css: true
|
|
165
|
+
},
|
|
166
|
+
iconAccent: {
|
|
167
|
+
kMwMTN: "xqwr325",
|
|
168
|
+
$$css: true
|
|
169
|
+
},
|
|
170
|
+
iconSuccess: {
|
|
171
|
+
kMwMTN: "xtjic6",
|
|
172
|
+
$$css: true
|
|
173
|
+
},
|
|
174
|
+
iconWarning: {
|
|
175
|
+
kMwMTN: "xs3pv69",
|
|
176
|
+
$$css: true
|
|
177
|
+
},
|
|
178
|
+
iconError: {
|
|
179
|
+
kMwMTN: "xjt36v0",
|
|
180
|
+
$$css: true
|
|
181
|
+
},
|
|
182
|
+
numberBadge: {
|
|
183
|
+
k1xSpc: "xrvj5dj",
|
|
184
|
+
kgQiWS: "x1ku5rj1",
|
|
185
|
+
kzqmXN: "xfyiiit",
|
|
186
|
+
kZKoxP: "x1grt7ep",
|
|
187
|
+
kaIpWk: "xjspbzw",
|
|
188
|
+
kGuDYH: "x1k6wstc",
|
|
189
|
+
kGO01o: "x1j85h84",
|
|
190
|
+
k63SB2: "x2mo6ok",
|
|
191
|
+
kLWn49: "xo5v014",
|
|
192
|
+
kmuXW: "x2lah0s",
|
|
193
|
+
k9WMMc: "x2b8uid",
|
|
194
|
+
$$css: true
|
|
195
|
+
},
|
|
196
|
+
numberCompleted: {
|
|
197
|
+
kWkggS: "x1ewilqj",
|
|
198
|
+
kMwMTN: "xrkvqaz",
|
|
199
|
+
$$css: true
|
|
200
|
+
},
|
|
201
|
+
numberInProgress: {
|
|
202
|
+
kWkggS: "x1ewilqj",
|
|
203
|
+
kMwMTN: "xrkvqaz",
|
|
204
|
+
$$css: true
|
|
205
|
+
},
|
|
206
|
+
numberNotStarted: {
|
|
207
|
+
kWkggS: "xwmxj5m",
|
|
208
|
+
kMwMTN: "xv1l7n4",
|
|
209
|
+
$$css: true
|
|
210
|
+
},
|
|
211
|
+
numberDisabled: {
|
|
212
|
+
kWkggS: "xwmxj5m",
|
|
213
|
+
kMwMTN: "xnbbluu",
|
|
214
|
+
kSiTet: "xbyyjgo",
|
|
215
|
+
$$css: true
|
|
216
|
+
},
|
|
217
|
+
numberAccent: {
|
|
218
|
+
kWkggS: "x1ewilqj",
|
|
219
|
+
kMwMTN: "x17wrial",
|
|
220
|
+
$$css: true
|
|
221
|
+
},
|
|
222
|
+
numberSuccess: {
|
|
223
|
+
kWkggS: "xdsz4j9",
|
|
224
|
+
kMwMTN: "xri61p4",
|
|
225
|
+
$$css: true
|
|
226
|
+
},
|
|
227
|
+
numberWarning: {
|
|
228
|
+
kWkggS: "x1q8g9m5",
|
|
229
|
+
kMwMTN: "xrebv38",
|
|
230
|
+
$$css: true
|
|
231
|
+
},
|
|
232
|
+
numberError: {
|
|
233
|
+
kWkggS: "x1pjz0fi",
|
|
234
|
+
kMwMTN: "x1m024r3",
|
|
235
|
+
$$css: true
|
|
236
|
+
},
|
|
237
|
+
label: {
|
|
238
|
+
kGuDYH: "xjm74w1",
|
|
239
|
+
kLWn49: "xw6l6zx",
|
|
240
|
+
k63SB2: "x1sodnla",
|
|
241
|
+
kMwMTN: "x1tgivj0",
|
|
242
|
+
$$css: true
|
|
243
|
+
},
|
|
244
|
+
labelInProgress: {
|
|
245
|
+
k63SB2: "x2mo6ok",
|
|
246
|
+
$$css: true
|
|
247
|
+
},
|
|
248
|
+
labelNotStarted: {
|
|
249
|
+
kMwMTN: "xv1l7n4",
|
|
250
|
+
$$css: true
|
|
251
|
+
},
|
|
252
|
+
labelDisabled: {
|
|
253
|
+
kMwMTN: "xnbbluu",
|
|
254
|
+
$$css: true
|
|
255
|
+
},
|
|
256
|
+
descriptionRow: {
|
|
257
|
+
kZCmMZ: "x18gyask",
|
|
258
|
+
$$css: true
|
|
259
|
+
},
|
|
260
|
+
descriptionRowWithIndicator: {
|
|
261
|
+
kZCmMZ: "x31w388",
|
|
262
|
+
$$css: true
|
|
263
|
+
},
|
|
264
|
+
descriptionRowWithNumber: {
|
|
265
|
+
kZCmMZ: "xchaq28",
|
|
266
|
+
$$css: true
|
|
267
|
+
},
|
|
268
|
+
stepContent: {
|
|
269
|
+
kLKAdn: "x1xye8es",
|
|
270
|
+
$$css: true
|
|
271
|
+
},
|
|
272
|
+
stepContentWithIndicator: {
|
|
273
|
+
kZCmMZ: "x31w388",
|
|
274
|
+
$$css: true
|
|
275
|
+
},
|
|
276
|
+
stepContentWithNumber: {
|
|
277
|
+
kZCmMZ: "xchaq28",
|
|
278
|
+
$$css: true
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* An individual step within an Stepper. Renders a 4px progress-bar segment,
|
|
284
|
+
* an indicator (numbered badge, check, or any custom icon), a label with
|
|
285
|
+
* optional description, and an optional content slot.
|
|
286
|
+
*
|
|
287
|
+
* Progress (completed / active / not-started) is derived from the parent's
|
|
288
|
+
* `activeStep` and this step's `step` prop. The optional `status` prop layers a
|
|
289
|
+
* semantic color (`accent` / `success` / `warning` / `error`) on top — color
|
|
290
|
+
* only; it does not change layout or iconography.
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```
|
|
294
|
+
* <Step step={0} label="Account details" description="Enter your email" />
|
|
295
|
+
* ```
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```
|
|
299
|
+
* // Generic icon + semantic color
|
|
300
|
+
* <Step step={1} label="Payment" status="error" icon={<Icon icon="warning" />} />
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
303
|
+
export function Step({
|
|
304
|
+
step,
|
|
305
|
+
label,
|
|
306
|
+
description,
|
|
307
|
+
children,
|
|
308
|
+
icon,
|
|
309
|
+
status,
|
|
310
|
+
isDisabled = false,
|
|
311
|
+
isOptional = false,
|
|
312
|
+
endContent,
|
|
313
|
+
indicator: indicatorProp,
|
|
314
|
+
density: densityProp,
|
|
315
|
+
xstyle,
|
|
316
|
+
className,
|
|
317
|
+
style,
|
|
318
|
+
ref,
|
|
319
|
+
'data-testid': dataTestId,
|
|
320
|
+
...rest
|
|
321
|
+
}) {
|
|
322
|
+
const ctx = useStepperContext();
|
|
323
|
+
const {
|
|
324
|
+
activeStep,
|
|
325
|
+
orientation,
|
|
326
|
+
onStepClick,
|
|
327
|
+
density: ctxDensity
|
|
328
|
+
} = ctx;
|
|
329
|
+
const density = densityProp ?? ctxDensity;
|
|
330
|
+
|
|
331
|
+
// Resolve indicator prop — may be a preset string or a custom ReactNode.
|
|
332
|
+
const isCustomIndicator = indicatorProp != null && typeof indicatorProp !== 'string';
|
|
333
|
+
const indicator = isCustomIndicator ? 'auto' : indicatorProp ?? 'auto';
|
|
334
|
+
|
|
335
|
+
// Internal progress, derived from the parent's activeStep. This is NOT the
|
|
336
|
+
// public `status` prop — `status` controls semantic color only.
|
|
337
|
+
const progress = step === activeStep ? 'in-progress' : step < activeStep ? 'completed' : 'not-started';
|
|
338
|
+
const isVertical = orientation === 'vertical';
|
|
339
|
+
const isActive = progress === 'in-progress';
|
|
340
|
+
// Any non-disabled step is navigable when an onStepClick handler is provided,
|
|
341
|
+
// including not-started steps (free navigation across the flow).
|
|
342
|
+
const isClickable = !isDisabled && onStepClick != null;
|
|
343
|
+
const handleClick = () => {
|
|
344
|
+
if (isClickable && onStepClick) {
|
|
345
|
+
onStepClick(step);
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
// Bar fill is purely progress-based; `status` recolors it when set.
|
|
350
|
+
const isBarFilled = progress === 'completed' || progress === 'in-progress';
|
|
351
|
+
const statusBarStyle = status === 'accent' ? styles.barAccent : status === 'success' ? styles.barSuccess : status === 'warning' ? styles.barWarning : status === 'error' ? styles.barError : undefined;
|
|
352
|
+
|
|
353
|
+
// --- Build indicator node ---
|
|
354
|
+
// 'auto': number for not-started, check/dot icon once reached
|
|
355
|
+
// 'number': always number badge
|
|
356
|
+
// 'none': nothing
|
|
357
|
+
// custom ReactNode (or `icon` prop): render as-is
|
|
358
|
+
let indicatorNode = null;
|
|
359
|
+
const customIcon = isCustomIndicator ? indicatorProp : icon ?? null;
|
|
360
|
+
if (indicator !== 'none') {
|
|
361
|
+
const showNumber = customIcon == null && (indicator === 'number' || indicator === 'auto' && progress === 'not-started');
|
|
362
|
+
if (showNumber) {
|
|
363
|
+
const numberColorStyle = isDisabled ? styles.numberDisabled : status === 'accent' ? styles.numberAccent : status === 'success' ? styles.numberSuccess : status === 'warning' ? styles.numberWarning : status === 'error' ? styles.numberError : progress === 'completed' ? styles.numberCompleted : progress === 'in-progress' ? styles.numberInProgress : styles.numberNotStarted;
|
|
364
|
+
indicatorNode = /*#__PURE__*/_jsx("div", {
|
|
365
|
+
"aria-hidden": "true",
|
|
366
|
+
...stylex.props(styles.numberBadge, numberColorStyle),
|
|
367
|
+
children: step + 1
|
|
368
|
+
});
|
|
369
|
+
} else {
|
|
370
|
+
// Custom icon takes priority, otherwise the progress-derived default.
|
|
371
|
+
const iconContent = customIcon != null ? customIcon : progress === 'completed' ? /*#__PURE__*/_jsx(CheckCircleIcon, {}) : /*#__PURE__*/_jsx(CurrentIcon, {});
|
|
372
|
+
const iconColorStyle = isDisabled ? styles.iconDisabled : status === 'accent' ? styles.iconAccent : status === 'success' ? styles.iconSuccess : status === 'warning' ? styles.iconWarning : status === 'error' ? styles.iconError : progress === 'completed' ? styles.iconCompleted : progress === 'in-progress' ? styles.iconInProgress : styles.iconNotStarted;
|
|
373
|
+
indicatorNode = /*#__PURE__*/_jsx("div", {
|
|
374
|
+
"aria-hidden": "true",
|
|
375
|
+
...stylex.props(styles.icon, iconColorStyle),
|
|
376
|
+
children: iconContent
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
const hasIndicator = indicator !== 'none';
|
|
381
|
+
const isNumber = hasIndicator && customIcon == null && (indicator === 'number' || indicator === 'auto' && progress === 'not-started');
|
|
382
|
+
const labelColorStyle = isDisabled ? styles.labelDisabled : progress === 'not-started' ? styles.labelNotStarted : isActive ? styles.labelInProgress : undefined;
|
|
383
|
+
|
|
384
|
+
// Indicator + Label row
|
|
385
|
+
const iconLabelNode = /*#__PURE__*/_jsxs("div", {
|
|
386
|
+
...{
|
|
387
|
+
className: "x78zum5 x1q0g3np x6s0dn4 x1txdalj"
|
|
388
|
+
},
|
|
389
|
+
children: [indicatorNode, /*#__PURE__*/_jsx("span", {
|
|
390
|
+
...stylex.props(styles.label, labelColorStyle),
|
|
391
|
+
children: label
|
|
392
|
+
}), isOptional && /*#__PURE__*/_jsxs(_Fragment, {
|
|
393
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
394
|
+
...{
|
|
395
|
+
className: "xjm74w1 xv1l7n4"
|
|
396
|
+
},
|
|
397
|
+
children: "\u2022"
|
|
398
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
399
|
+
...{
|
|
400
|
+
className: "xjm74w1 xv1l7n4"
|
|
401
|
+
},
|
|
402
|
+
children: "Optional"
|
|
403
|
+
})]
|
|
404
|
+
}), endContent]
|
|
405
|
+
});
|
|
406
|
+
const descriptionNode = description != null ? /*#__PURE__*/_jsx("div", {
|
|
407
|
+
...stylex.props(hasIndicator ? isNumber ? styles.descriptionRowWithNumber : styles.descriptionRowWithIndicator : styles.descriptionRow),
|
|
408
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
409
|
+
...{
|
|
410
|
+
className: "x141an7d x1ltkj2j xv1l7n4"
|
|
411
|
+
},
|
|
412
|
+
children: description
|
|
413
|
+
})
|
|
414
|
+
}) : null;
|
|
415
|
+
const contentNode = children != null ? /*#__PURE__*/_jsx("div", {
|
|
416
|
+
...stylex.props(styles.stepContent, hasIndicator && (isNumber ? styles.stepContentWithNumber : styles.stepContentWithIndicator)),
|
|
417
|
+
children: children
|
|
418
|
+
}) : null;
|
|
419
|
+
|
|
420
|
+
// Theme data attributes reflect progress + optional semantic status.
|
|
421
|
+
const stepThemeProps = themeProps('step', {
|
|
422
|
+
progress,
|
|
423
|
+
status: status ?? undefined
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
// ======= VERTICAL =======
|
|
427
|
+
if (isVertical) {
|
|
428
|
+
return /*#__PURE__*/_jsxs("li", {
|
|
429
|
+
ref: ref,
|
|
430
|
+
...mergeProps(stepThemeProps, stylex.props(styles.verticalRoot, xstyle), className, style),
|
|
431
|
+
"aria-current": isActive ? 'step' : undefined,
|
|
432
|
+
"data-testid": dataTestId,
|
|
433
|
+
...rest,
|
|
434
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
435
|
+
...mergeProps(themeProps('step-bar'), stylex.props(styles.verticalBar, statusBarStyle ?? (isBarFilled ? styles.barCompleted : styles.barIncomplete))),
|
|
436
|
+
"aria-hidden": "true"
|
|
437
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
438
|
+
...{
|
|
439
|
+
className: "x78zum5 xdt5ytf x98rzlu"
|
|
440
|
+
},
|
|
441
|
+
children: [isClickable ? /*#__PURE__*/_jsxs("button", {
|
|
442
|
+
type: "button",
|
|
443
|
+
onClick: handleClick,
|
|
444
|
+
"aria-label": `Go to step ${step + 1}: ${label}`,
|
|
445
|
+
...{
|
|
446
|
+
0: {
|
|
447
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"
|
|
448
|
+
},
|
|
449
|
+
4: {
|
|
450
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xu0wf1k xf314gf"
|
|
451
|
+
},
|
|
452
|
+
2: {
|
|
453
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
|
|
454
|
+
},
|
|
455
|
+
6: {
|
|
456
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
|
|
457
|
+
},
|
|
458
|
+
1: {
|
|
459
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
460
|
+
},
|
|
461
|
+
5: {
|
|
462
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
463
|
+
},
|
|
464
|
+
3: {
|
|
465
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
466
|
+
},
|
|
467
|
+
7: {
|
|
468
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
469
|
+
}
|
|
470
|
+
}[!!(density === 'compact') << 2 | !!(density === 'balanced') << 1 | !!(density === 'spacious') << 0],
|
|
471
|
+
children: [iconLabelNode, descriptionNode]
|
|
472
|
+
}) : /*#__PURE__*/_jsxs("div", {
|
|
473
|
+
...{
|
|
474
|
+
0: {},
|
|
475
|
+
4: {
|
|
476
|
+
className: "xu0wf1k xf314gf"
|
|
477
|
+
},
|
|
478
|
+
2: {
|
|
479
|
+
className: "xce4md1 xf314gf"
|
|
480
|
+
},
|
|
481
|
+
6: {
|
|
482
|
+
className: "xce4md1 xf314gf"
|
|
483
|
+
},
|
|
484
|
+
1: {
|
|
485
|
+
className: "x8o8v82 xrrkdod"
|
|
486
|
+
},
|
|
487
|
+
5: {
|
|
488
|
+
className: "x8o8v82 xrrkdod"
|
|
489
|
+
},
|
|
490
|
+
3: {
|
|
491
|
+
className: "x8o8v82 xrrkdod"
|
|
492
|
+
},
|
|
493
|
+
7: {
|
|
494
|
+
className: "x8o8v82 xrrkdod"
|
|
495
|
+
}
|
|
496
|
+
}[!!(density === 'compact') << 2 | !!(density === 'balanced') << 1 | !!(density === 'spacious') << 0],
|
|
497
|
+
children: [iconLabelNode, descriptionNode]
|
|
498
|
+
}), contentNode]
|
|
499
|
+
})]
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// ======= HORIZONTAL =======
|
|
504
|
+
return /*#__PURE__*/_jsxs("li", {
|
|
505
|
+
ref: ref,
|
|
506
|
+
...mergeProps(stepThemeProps, stylex.props(styles.horizontalStep, xstyle), className, style),
|
|
507
|
+
"aria-current": isActive ? 'step' : undefined,
|
|
508
|
+
"data-testid": dataTestId,
|
|
509
|
+
...rest,
|
|
510
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
511
|
+
...mergeProps(themeProps('step-bar'), stylex.props(styles.horizontalBar, statusBarStyle ?? (isBarFilled ? styles.barCompleted : styles.barIncomplete))),
|
|
512
|
+
"aria-hidden": "true"
|
|
513
|
+
}), isClickable ? /*#__PURE__*/_jsxs("button", {
|
|
514
|
+
type: "button",
|
|
515
|
+
onClick: handleClick,
|
|
516
|
+
"aria-label": `Go to step ${step + 1}: ${label}`,
|
|
517
|
+
...{
|
|
518
|
+
0: {
|
|
519
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"
|
|
520
|
+
},
|
|
521
|
+
4: {
|
|
522
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xu0wf1k xf314gf"
|
|
523
|
+
},
|
|
524
|
+
2: {
|
|
525
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
|
|
526
|
+
},
|
|
527
|
+
6: {
|
|
528
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
|
|
529
|
+
},
|
|
530
|
+
1: {
|
|
531
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
532
|
+
},
|
|
533
|
+
5: {
|
|
534
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
535
|
+
},
|
|
536
|
+
3: {
|
|
537
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
538
|
+
},
|
|
539
|
+
7: {
|
|
540
|
+
className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
|
|
541
|
+
}
|
|
542
|
+
}[!!(density === 'compact') << 2 | !!(density === 'balanced') << 1 | !!(density === 'spacious') << 0],
|
|
543
|
+
children: [iconLabelNode, descriptionNode]
|
|
544
|
+
}) : /*#__PURE__*/_jsxs("div", {
|
|
545
|
+
...{
|
|
546
|
+
0: {},
|
|
547
|
+
4: {
|
|
548
|
+
className: "xu0wf1k xf314gf"
|
|
549
|
+
},
|
|
550
|
+
2: {
|
|
551
|
+
className: "xce4md1 xf314gf"
|
|
552
|
+
},
|
|
553
|
+
6: {
|
|
554
|
+
className: "xce4md1 xf314gf"
|
|
555
|
+
},
|
|
556
|
+
1: {
|
|
557
|
+
className: "x8o8v82 xrrkdod"
|
|
558
|
+
},
|
|
559
|
+
5: {
|
|
560
|
+
className: "x8o8v82 xrrkdod"
|
|
561
|
+
},
|
|
562
|
+
3: {
|
|
563
|
+
className: "x8o8v82 xrrkdod"
|
|
564
|
+
},
|
|
565
|
+
7: {
|
|
566
|
+
className: "x8o8v82 xrrkdod"
|
|
567
|
+
}
|
|
568
|
+
}[!!(density === 'compact') << 2 | !!(density === 'balanced') << 1 | !!(density === 'spacious') << 0],
|
|
569
|
+
children: [iconLabelNode, descriptionNode]
|
|
570
|
+
}), contentNode]
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
Step.displayName = 'Step';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file StepStatus.ts
|
|
3
|
+
* @input None
|
|
4
|
+
* @output Exports StepStatus type
|
|
5
|
+
* @position Shared type used by Step and the stepper docs
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Semantic color status for a step. Controls **color only** — it maps directly
|
|
9
|
+
* onto the Astryx global semantic color tokens and does not change layout,
|
|
10
|
+
* iconography, or behavior.
|
|
11
|
+
*
|
|
12
|
+
* Plain string values aligned with the global token semantics:
|
|
13
|
+
* - 'accent' → `--color-accent` (default emphasis / in-progress)
|
|
14
|
+
* - 'success' → `--color-success` (a positively-resolved step)
|
|
15
|
+
* - 'warning' → `--color-warning` (needs attention)
|
|
16
|
+
* - 'error' → `--color-error` (must be resolved)
|
|
17
|
+
*
|
|
18
|
+
* `status` is intentionally NOT a lifecycle enum (completed/active/etc.) — the
|
|
19
|
+
* step's progress is derived from the parent's `activeStep`. Use `status` only
|
|
20
|
+
* when you want to tint a step with a specific semantic color, e.g.
|
|
21
|
+
* `status="error"`.
|
|
22
|
+
*/
|
|
23
|
+
export type StepStatus = 'accent' | 'success' | 'warning' | 'error';
|
|
24
|
+
//# sourceMappingURL=StepStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepStatus.d.ts","sourceRoot":"","sources":["../../src/Stepper/StepStatus.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Stepper.tsx
|
|
3
|
+
* @input Uses React, stylex, theme tokens, StepperContext
|
|
4
|
+
* @output Exports Stepper component and StepperProps
|
|
5
|
+
* @position Core container component; consumed by index.ts
|
|
6
|
+
*
|
|
7
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
8
|
+
* - /packages/lab/src/Stepper/Stepper.doc.mjs (props table, features, implementation notes)
|
|
9
|
+
* - /packages/lab/src/Stepper/Stepper.test.tsx (tests for new/changed behavior)
|
|
10
|
+
* - /packages/lab/src/Stepper/index.ts (exports if types change)
|
|
11
|
+
* - /apps/storybook/stories/Stepper.stories.tsx (storybook stories)
|
|
12
|
+
* - /packages/cli/templates/blocks/components/Stepper/ (showcase blocks)
|
|
13
|
+
*/
|
|
14
|
+
import { type ReactNode } from 'react';
|
|
15
|
+
import type { BaseProps } from '@astryxdesign/core';
|
|
16
|
+
import { type StepperOrientation } from './StepperContext';
|
|
17
|
+
export interface StepperProps extends BaseProps<HTMLOListElement> {
|
|
18
|
+
/** Ref forwarded to the root element */
|
|
19
|
+
ref?: React.Ref<HTMLOListElement>;
|
|
20
|
+
/**
|
|
21
|
+
* Zero-based index of the active step.
|
|
22
|
+
*/
|
|
23
|
+
activeStep: number;
|
|
24
|
+
/**
|
|
25
|
+
* Step elements to render.
|
|
26
|
+
*/
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Layout direction of the stepper.
|
|
30
|
+
* @default 'horizontal'
|
|
31
|
+
*/
|
|
32
|
+
orientation?: StepperOrientation;
|
|
33
|
+
/**
|
|
34
|
+
* Called when a step indicator is clicked. Enables non-linear navigation.
|
|
35
|
+
* When provided, completed and current steps become clickable.
|
|
36
|
+
*/
|
|
37
|
+
onStepClick?: (index: number) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Accessible label describing the set of steps.
|
|
40
|
+
* @default 'Progress'
|
|
41
|
+
*/
|
|
42
|
+
label?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Controls density (padding) of all steps.
|
|
45
|
+
* @default 'balanced'
|
|
46
|
+
*/
|
|
47
|
+
density?: 'compact' | 'balanced' | 'spacious';
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A stepper component for multi-step workflows. Displays numbered steps
|
|
51
|
+
* with visual indicators for completed, active, and upcoming states.
|
|
52
|
+
*
|
|
53
|
+
* Each Step child must provide a `step` prop (zero-based index) so it
|
|
54
|
+
* can derive its state from the parent's activeStep. CSS :last-child
|
|
55
|
+
* handles connector hiding — no child introspection needed.
|
|
56
|
+
*
|
|
57
|
+
* Rendered as an ordered list (`<ol>`/`<li>`) rather than a `nav`
|
|
58
|
+
* landmark: a stepper communicates *progress through a sequence*, not a
|
|
59
|
+
* set of site navigation links. The active step is marked with
|
|
60
|
+
* `aria-current="step"` (handled per-step) and the list carries an
|
|
61
|
+
* accessible `label`. This follows the WAI-ARIA pattern for steppers /
|
|
62
|
+
* progress sequences and avoids polluting the page's landmark map.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```
|
|
66
|
+
* <Stepper activeStep={1}>
|
|
67
|
+
* <Step step={0} label="Account" />
|
|
68
|
+
* <Step step={1} label="Profile" />
|
|
69
|
+
* <Step step={2} label="Review" />
|
|
70
|
+
* </Stepper>
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function Stepper({ activeStep, children, orientation, onStepClick, label, density, xstyle, className, style, ref, ...rest }: StepperProps): import("react").JSX.Element;
|
|
74
|
+
export declare namespace Stepper {
|
|
75
|
+
var displayName: string;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../src/Stepper/Stepper.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC/D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;CAC/C;AAuBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,OAAO,CAAC,EACtB,UAAU,EACV,QAAQ,EACR,WAA0B,EAC1B,WAAW,EACX,KAAkB,EAClB,OAAoB,EACpB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,YAAY,+BAkCd;yBA9Ce,OAAO"}
|