@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,236 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file ChatReasoning.tsx
|
|
7
|
+
* @input Uses React, StyleX, theme tokens
|
|
8
|
+
* @output Exports ChatReasoning component
|
|
9
|
+
* @position Chat component — compact collapsible reasoning/thinking display
|
|
10
|
+
*
|
|
11
|
+
* Renders model reasoning/thinking content as a compact single-line
|
|
12
|
+
* collapsed element. Expanding reveals the full reasoning text.
|
|
13
|
+
*
|
|
14
|
+
* Design: extremely compact by default. One line with ellipsis overflow.
|
|
15
|
+
* Expandable on click.
|
|
16
|
+
*/
|
|
17
|
+
import { useState, useCallback } from 'react';
|
|
18
|
+
import * as stylex from '@stylexjs/stylex';
|
|
19
|
+
import '@astryxdesign/core/theme/tokens.stylex';
|
|
20
|
+
import { colorVars, spacingVars, typeScaleVars, typographyVars, fontWeightVars, durationVars, easeVars } from '@astryxdesign/core/theme/tokens.stylex';
|
|
21
|
+
import { mergeProps } from '@astryxdesign/core/utils';
|
|
22
|
+
import { themeProps } from '@astryxdesign/core/utils';
|
|
23
|
+
|
|
24
|
+
// =============================================================================
|
|
25
|
+
// Types
|
|
26
|
+
// =============================================================================
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
|
+
// =============================================================================
|
|
29
|
+
// Animations
|
|
30
|
+
// =============================================================================
|
|
31
|
+
|
|
32
|
+
const shimmerKeyframes = "x1ofn8cw-B";
|
|
33
|
+
|
|
34
|
+
// =============================================================================
|
|
35
|
+
// Styles
|
|
36
|
+
// =============================================================================
|
|
37
|
+
|
|
38
|
+
const styles = {
|
|
39
|
+
root: {
|
|
40
|
+
k1xSpc: "x78zum5",
|
|
41
|
+
kXwgrk: "xdt5ytf",
|
|
42
|
+
keoZOQ: "xtbrsbv",
|
|
43
|
+
$$css: true
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// =============================================================================
|
|
48
|
+
// Icons
|
|
49
|
+
// =============================================================================
|
|
50
|
+
|
|
51
|
+
function ThinkingIcon() {
|
|
52
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
53
|
+
width: "14",
|
|
54
|
+
height: "14",
|
|
55
|
+
viewBox: "0 0 14 14",
|
|
56
|
+
fill: "none",
|
|
57
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
58
|
+
cx: "7",
|
|
59
|
+
cy: "7",
|
|
60
|
+
r: "5.5",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
strokeWidth: "1.5",
|
|
63
|
+
strokeDasharray: "3 2"
|
|
64
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
65
|
+
cx: "5.5",
|
|
66
|
+
cy: "7",
|
|
67
|
+
r: "0.75",
|
|
68
|
+
fill: "currentColor"
|
|
69
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
70
|
+
cx: "8.5",
|
|
71
|
+
cy: "7",
|
|
72
|
+
r: "0.75",
|
|
73
|
+
fill: "currentColor"
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function ChevronDownIcon() {
|
|
78
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
79
|
+
width: "12",
|
|
80
|
+
height: "12",
|
|
81
|
+
viewBox: "0 0 12 12",
|
|
82
|
+
fill: "none",
|
|
83
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
84
|
+
d: "M3 4.5L6 7.5L9 4.5",
|
|
85
|
+
stroke: "currentColor",
|
|
86
|
+
strokeWidth: "1.5",
|
|
87
|
+
strokeLinecap: "round",
|
|
88
|
+
strokeLinejoin: "round"
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// =============================================================================
|
|
94
|
+
// Component
|
|
95
|
+
// =============================================================================
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Compact collapsible display for model reasoning/thinking content.
|
|
99
|
+
*
|
|
100
|
+
* Renders as a single line: icon + label + duration + ellipsized preview.
|
|
101
|
+
* Expands to show full reasoning on click.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```
|
|
105
|
+
* <ChatMessage sender="assistant">
|
|
106
|
+
* <ChatReasoning duration="12s">
|
|
107
|
+
* Let me work through the constraints on adjacent fields...
|
|
108
|
+
* </ChatReasoning>
|
|
109
|
+
* <Markdown>{response}</Markdown>
|
|
110
|
+
* </ChatMessage>
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
export function ChatReasoning(props) {
|
|
114
|
+
const {
|
|
115
|
+
children,
|
|
116
|
+
label = 'Thinking',
|
|
117
|
+
duration,
|
|
118
|
+
isStreaming = false,
|
|
119
|
+
isExpanded: controlledExpanded,
|
|
120
|
+
defaultIsExpanded = false,
|
|
121
|
+
onExpandedChange,
|
|
122
|
+
xstyle,
|
|
123
|
+
className,
|
|
124
|
+
style,
|
|
125
|
+
...rest
|
|
126
|
+
} = props;
|
|
127
|
+
const [internalExpanded, setInternalExpanded] = useState(defaultIsExpanded);
|
|
128
|
+
const isControlled = controlledExpanded !== undefined;
|
|
129
|
+
const isExpanded = isControlled ? controlledExpanded : internalExpanded;
|
|
130
|
+
const toggle = useCallback(() => {
|
|
131
|
+
const next = !isExpanded;
|
|
132
|
+
if (!isControlled) {
|
|
133
|
+
setInternalExpanded(next);
|
|
134
|
+
}
|
|
135
|
+
onExpandedChange?.(next);
|
|
136
|
+
}, [isExpanded, isControlled, onExpandedChange]);
|
|
137
|
+
const previewText = typeof children === 'string' ? children : null;
|
|
138
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
139
|
+
...mergeProps(themeProps('chat-reasoning', {
|
|
140
|
+
expanded: isExpanded ? 'expanded' : null,
|
|
141
|
+
streaming: isStreaming ? 'streaming' : null
|
|
142
|
+
}), stylex.props(styles.root, xstyle), className, style),
|
|
143
|
+
...rest,
|
|
144
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
145
|
+
role: "button",
|
|
146
|
+
tabIndex: 0,
|
|
147
|
+
"aria-expanded": isExpanded,
|
|
148
|
+
onClick: toggle,
|
|
149
|
+
onKeyDown: e => {
|
|
150
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
toggle();
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
...{
|
|
156
|
+
className: "x78zum5 x6s0dn4 x1s4dlld x1ypdohk x87ps6o xjwf9q1 x13f7esw"
|
|
157
|
+
},
|
|
158
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
159
|
+
...{
|
|
160
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1kky2od xlup9mm xv1l7n4"
|
|
161
|
+
},
|
|
162
|
+
children: /*#__PURE__*/_jsx(ThinkingIcon, {})
|
|
163
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
164
|
+
...{
|
|
165
|
+
className: "x78zum5 x6s0dn4 xzye2dw xeuugli xb3r6kr"
|
|
166
|
+
},
|
|
167
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
168
|
+
...{
|
|
169
|
+
0: {
|
|
170
|
+
className: "x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4 xuxw1ft x2lah0s"
|
|
171
|
+
},
|
|
172
|
+
1: {
|
|
173
|
+
className: "x141an7d x1ltkj2j x9ynric x1e4wzip xuxw1ft x2lah0s xct3ic7 xakli9p x1ta4xzc x19co3pv x3mlza6 xeaay5l x1esw782 xa4qsjk"
|
|
174
|
+
}
|
|
175
|
+
}[!!isStreaming << 0],
|
|
176
|
+
children: label
|
|
177
|
+
}), duration != null && !isStreaming && /*#__PURE__*/_jsxs(_Fragment, {
|
|
178
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
179
|
+
...{
|
|
180
|
+
className: "x141an7d xnbbluu x2lah0s"
|
|
181
|
+
},
|
|
182
|
+
children: "\xB7"
|
|
183
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
184
|
+
...{
|
|
185
|
+
className: "x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft x2lah0s"
|
|
186
|
+
},
|
|
187
|
+
children: duration
|
|
188
|
+
})]
|
|
189
|
+
}), !isExpanded && previewText && !isStreaming && /*#__PURE__*/_jsxs(_Fragment, {
|
|
190
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
191
|
+
...{
|
|
192
|
+
className: "x141an7d xnbbluu x2lah0s"
|
|
193
|
+
},
|
|
194
|
+
children: "\u2014"
|
|
195
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
196
|
+
...{
|
|
197
|
+
className: "x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv xeuugli"
|
|
198
|
+
},
|
|
199
|
+
children: previewText
|
|
200
|
+
})]
|
|
201
|
+
})]
|
|
202
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
203
|
+
...{
|
|
204
|
+
0: {
|
|
205
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd"
|
|
206
|
+
},
|
|
207
|
+
1: {
|
|
208
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x19jd1h0"
|
|
209
|
+
}
|
|
210
|
+
}[!!isExpanded << 0],
|
|
211
|
+
children: /*#__PURE__*/_jsx(ChevronDownIcon, {})
|
|
212
|
+
})]
|
|
213
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
214
|
+
...{
|
|
215
|
+
0: {
|
|
216
|
+
className: "xrvj5dj xihq33y xb0j27v"
|
|
217
|
+
},
|
|
218
|
+
1: {
|
|
219
|
+
className: "xrvj5dj xb0j27v x1tu4anv"
|
|
220
|
+
}
|
|
221
|
+
}[!!isExpanded << 0],
|
|
222
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
223
|
+
...{
|
|
224
|
+
className: "xb3r6kr x2lwn1j"
|
|
225
|
+
},
|
|
226
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
227
|
+
...{
|
|
228
|
+
className: "x1xye8es x1f43n9v x141an7d x1ltkj2j x9ynric xv1l7n4"
|
|
229
|
+
},
|
|
230
|
+
children: children
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
})]
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
ChatReasoning.displayName = 'ChatReasoning';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file CircularProgress.tsx
|
|
3
|
+
* @input Uses React, useId, stylex, SVG, color/spacing/duration/ease tokens
|
|
4
|
+
* @output Exports CircularProgress component, CircularProgressProps, CircularProgressSize, CircularProgressVariant types
|
|
5
|
+
* @position Core implementation; consumed by index.ts
|
|
6
|
+
*
|
|
7
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
8
|
+
* - /packages/core/src/CircularProgress/CircularProgress.doc.mjs (props table, features, implementation notes)
|
|
9
|
+
* - /packages/core/src/CircularProgress/CircularProgress.test.tsx (tests for new/changed behavior)
|
|
10
|
+
* - /packages/core/src/CircularProgress/index.ts (exports if types change)
|
|
11
|
+
* - /apps/storybook/stories/CircularProgress.stories.tsx (storybook stories)
|
|
12
|
+
* - /packages/cli/templates/blocks/components/CircularProgress/ (showcase blocks)
|
|
13
|
+
*/
|
|
14
|
+
import { type ReactNode } from 'react';
|
|
15
|
+
import type { BaseProps } from '@astryxdesign/core';
|
|
16
|
+
/**
|
|
17
|
+
* Extensible variant map for CircularProgress.
|
|
18
|
+
*
|
|
19
|
+
* Theme packages can add custom variants via TypeScript module augmentation:
|
|
20
|
+
* @example
|
|
21
|
+
* ```
|
|
22
|
+
* declare module '@astryxdesign/core/CircularProgress' {
|
|
23
|
+
* interface CircularProgressVariantMap {
|
|
24
|
+
* 'brand': true;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export interface CircularProgressVariantMap {
|
|
30
|
+
accent: true;
|
|
31
|
+
success: true;
|
|
32
|
+
warning: true;
|
|
33
|
+
error: true;
|
|
34
|
+
neutral: true;
|
|
35
|
+
}
|
|
36
|
+
export type CircularProgressVariant = keyof CircularProgressVariantMap;
|
|
37
|
+
export type CircularProgressSize = 'sm' | 'md' | 'lg';
|
|
38
|
+
export interface CircularProgressProps extends BaseProps<HTMLDivElement> {
|
|
39
|
+
/** Ref forwarded to the root element */
|
|
40
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
41
|
+
/**
|
|
42
|
+
* Current value of the circular progress.
|
|
43
|
+
* When omitted, the component renders an indeterminate spinning animation.
|
|
44
|
+
*/
|
|
45
|
+
value?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Maximum value.
|
|
48
|
+
* @default 100
|
|
49
|
+
*/
|
|
50
|
+
max?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Accessible label for the progress indicator. Required for a11y.
|
|
53
|
+
*/
|
|
54
|
+
label: string;
|
|
55
|
+
/**
|
|
56
|
+
* When true, the label is visually hidden but remains accessible to screen readers.
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
isLabelHidden?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Content displayed in the center of the ring.
|
|
62
|
+
* Typically a percentage string, icon, or custom content.
|
|
63
|
+
*/
|
|
64
|
+
children?: ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* Diameter of the circular progress.
|
|
67
|
+
* - 'sm': 32px
|
|
68
|
+
* - 'md': 48px
|
|
69
|
+
* - 'lg': 64px
|
|
70
|
+
* @default 'md'
|
|
71
|
+
*/
|
|
72
|
+
size?: CircularProgressSize;
|
|
73
|
+
/**
|
|
74
|
+
* Visual style variant mapped to semantic color tokens.
|
|
75
|
+
* @default 'accent'
|
|
76
|
+
*/
|
|
77
|
+
variant?: CircularProgressVariant;
|
|
78
|
+
/**
|
|
79
|
+
* Test ID for testing utilities.
|
|
80
|
+
*/
|
|
81
|
+
'data-testid'?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* A circular/radial progress indicator that shows completion as a ring.
|
|
85
|
+
*
|
|
86
|
+
* In determinate mode, displays a known value as an arc fill.
|
|
87
|
+
* In indeterminate mode, shows an animated spinning indicator.
|
|
88
|
+
* Supports center content via children for labels, percentages, or icons.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```
|
|
92
|
+
* <CircularProgress value={75} label="Upload progress" />
|
|
93
|
+
* <CircularProgress value={75} label="Progress" max={100}>75%</CircularProgress>
|
|
94
|
+
* <CircularProgress label="Loading..." />
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare function CircularProgress({ value, max, label, isLabelHidden, children, size, variant, xstyle, className, style, 'data-testid': dataTestId, ref, ...rest }: CircularProgressProps): import("react").JSX.Element;
|
|
98
|
+
export declare namespace CircularProgress {
|
|
99
|
+
var displayName: string;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=CircularProgress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircularProgress.d.ts","sourceRoot":"","sources":["../../src/CircularProgress/CircularProgress.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAY5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAGlD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,0BAA0B,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAQtD,MAAM,WAAW,qBAAsB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACtE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAiJD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,GAAS,EACT,KAAK,EACL,aAAoB,EACpB,QAAQ,EACR,IAAW,EACX,OAAkB,EAClB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,UAAU,EACzB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,qBAAqB,+BAyFvB;yBAvGe,gBAAgB"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file CircularProgress.tsx
|
|
7
|
+
* @input Uses React, useId, stylex, SVG, color/spacing/duration/ease tokens
|
|
8
|
+
* @output Exports CircularProgress component, CircularProgressProps, CircularProgressSize, CircularProgressVariant types
|
|
9
|
+
* @position Core implementation; consumed by index.ts
|
|
10
|
+
*
|
|
11
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
12
|
+
* - /packages/core/src/CircularProgress/CircularProgress.doc.mjs (props table, features, implementation notes)
|
|
13
|
+
* - /packages/core/src/CircularProgress/CircularProgress.test.tsx (tests for new/changed behavior)
|
|
14
|
+
* - /packages/core/src/CircularProgress/index.ts (exports if types change)
|
|
15
|
+
* - /apps/storybook/stories/CircularProgress.stories.tsx (storybook stories)
|
|
16
|
+
* - /packages/cli/templates/blocks/components/CircularProgress/ (showcase blocks)
|
|
17
|
+
*/
|
|
18
|
+
import { useId } from 'react';
|
|
19
|
+
import * as stylex from '@stylexjs/stylex';
|
|
20
|
+
import '@astryxdesign/core/theme/tokens.stylex';
|
|
21
|
+
import { colorVars, durationVars, easeVars, fontWeightVars, spacingVars, typeScaleVars } from '@astryxdesign/core/theme/tokens.stylex';
|
|
22
|
+
import { mergeProps } from '@astryxdesign/core/utils';
|
|
23
|
+
import { themeProps } from '@astryxdesign/core/utils';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Extensible variant map for CircularProgress.
|
|
27
|
+
*
|
|
28
|
+
* Theme packages can add custom variants via TypeScript module augmentation:
|
|
29
|
+
* @example
|
|
30
|
+
* ```
|
|
31
|
+
* declare module '@astryxdesign/core/CircularProgress' {
|
|
32
|
+
* interface CircularProgressVariantMap {
|
|
33
|
+
* 'brand': true;
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
39
|
+
const SIZE_CONFIG = {
|
|
40
|
+
sm: {
|
|
41
|
+
diameter: 32,
|
|
42
|
+
strokeWidth: 3
|
|
43
|
+
},
|
|
44
|
+
md: {
|
|
45
|
+
diameter: 48,
|
|
46
|
+
strokeWidth: 4
|
|
47
|
+
},
|
|
48
|
+
lg: {
|
|
49
|
+
diameter: 64,
|
|
50
|
+
strokeWidth: 5
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
// =============================================================================
|
|
54
|
+
// Indeterminate animation
|
|
55
|
+
// =============================================================================
|
|
56
|
+
|
|
57
|
+
const indeterminateRotation = "xqng64z-B";
|
|
58
|
+
const indeterminateDash = "xr5kuex-B";
|
|
59
|
+
|
|
60
|
+
// =============================================================================
|
|
61
|
+
// Styles
|
|
62
|
+
// =============================================================================
|
|
63
|
+
|
|
64
|
+
const styles = {
|
|
65
|
+
root: {
|
|
66
|
+
k1xSpc: "x3nfvp2",
|
|
67
|
+
kGNEyG: "x6s0dn4",
|
|
68
|
+
kjj79g: "xl56j7k",
|
|
69
|
+
kVAEAm: "x1n2onr6",
|
|
70
|
+
kmuXW: "x2lah0s",
|
|
71
|
+
$$css: true
|
|
72
|
+
},
|
|
73
|
+
rootWithLabel: {
|
|
74
|
+
kXwgrk: "xdt5ytf",
|
|
75
|
+
kOIVth: "xzye2dw",
|
|
76
|
+
$$css: true
|
|
77
|
+
},
|
|
78
|
+
track: {
|
|
79
|
+
kDwRjp: "xbh8q5q",
|
|
80
|
+
kjVXCG: "xpi25hw",
|
|
81
|
+
$$css: true
|
|
82
|
+
},
|
|
83
|
+
fill: {
|
|
84
|
+
kDwRjp: "xbh8q5q",
|
|
85
|
+
kU5bRw: "x1owpc8m",
|
|
86
|
+
k1ekBW: "xxnu56j",
|
|
87
|
+
kIyJzY: "x80gvsz",
|
|
88
|
+
kAMwcw: "xlr8y92",
|
|
89
|
+
$$css: true
|
|
90
|
+
},
|
|
91
|
+
fillIndeterminate: {
|
|
92
|
+
kDwRjp: "xbh8q5q",
|
|
93
|
+
kU5bRw: "x1owpc8m",
|
|
94
|
+
kKVMdj: "x1mla6dk",
|
|
95
|
+
k44tkh: "xmg6eyc xnh0sag",
|
|
96
|
+
kyAemX: "x4hg4is",
|
|
97
|
+
ko0y90: "xa4qsjk",
|
|
98
|
+
$$css: true
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const variantStyles = {
|
|
102
|
+
accent: {
|
|
103
|
+
kjVXCG: "xjsr54c",
|
|
104
|
+
$$css: true
|
|
105
|
+
},
|
|
106
|
+
success: {
|
|
107
|
+
kjVXCG: "x8y33gb",
|
|
108
|
+
$$css: true
|
|
109
|
+
},
|
|
110
|
+
warning: {
|
|
111
|
+
kjVXCG: "x9ezeq1",
|
|
112
|
+
$$css: true
|
|
113
|
+
},
|
|
114
|
+
error: {
|
|
115
|
+
kjVXCG: "x1vco6zm",
|
|
116
|
+
$$css: true
|
|
117
|
+
},
|
|
118
|
+
neutral: {
|
|
119
|
+
kjVXCG: "xuxf9kk",
|
|
120
|
+
$$css: true
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const trackVariantStyles = {
|
|
124
|
+
accent: {
|
|
125
|
+
kjVXCG: "ximx5ud",
|
|
126
|
+
$$css: true
|
|
127
|
+
},
|
|
128
|
+
success: {
|
|
129
|
+
kjVXCG: "x1uro670",
|
|
130
|
+
$$css: true
|
|
131
|
+
},
|
|
132
|
+
warning: {
|
|
133
|
+
kjVXCG: "x1wjzxuj",
|
|
134
|
+
$$css: true
|
|
135
|
+
},
|
|
136
|
+
error: {
|
|
137
|
+
kjVXCG: "xjswp7v",
|
|
138
|
+
$$css: true
|
|
139
|
+
},
|
|
140
|
+
neutral: {
|
|
141
|
+
kjVXCG: "xpi25hw",
|
|
142
|
+
$$css: true
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* A circular/radial progress indicator that shows completion as a ring.
|
|
148
|
+
*
|
|
149
|
+
* In determinate mode, displays a known value as an arc fill.
|
|
150
|
+
* In indeterminate mode, shows an animated spinning indicator.
|
|
151
|
+
* Supports center content via children for labels, percentages, or icons.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```
|
|
155
|
+
* <CircularProgress value={75} label="Upload progress" />
|
|
156
|
+
* <CircularProgress value={75} label="Progress" max={100}>75%</CircularProgress>
|
|
157
|
+
* <CircularProgress label="Loading..." />
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export function CircularProgress({
|
|
161
|
+
value,
|
|
162
|
+
max = 100,
|
|
163
|
+
label,
|
|
164
|
+
isLabelHidden = true,
|
|
165
|
+
children,
|
|
166
|
+
size = 'md',
|
|
167
|
+
variant = 'accent',
|
|
168
|
+
xstyle,
|
|
169
|
+
className,
|
|
170
|
+
style,
|
|
171
|
+
'data-testid': dataTestId,
|
|
172
|
+
ref,
|
|
173
|
+
...rest
|
|
174
|
+
}) {
|
|
175
|
+
const labelId = useId();
|
|
176
|
+
const isIndeterminate = value == null;
|
|
177
|
+
const {
|
|
178
|
+
diameter,
|
|
179
|
+
strokeWidth
|
|
180
|
+
} = SIZE_CONFIG[size];
|
|
181
|
+
const radius = (diameter - strokeWidth) / 2;
|
|
182
|
+
const circumference = 2 * Math.PI * radius;
|
|
183
|
+
const resolvedValue = value ?? 0;
|
|
184
|
+
const clampedValue = Math.min(Math.max(0, resolvedValue), max);
|
|
185
|
+
const percentage = max > 0 ? clampedValue / max : 0;
|
|
186
|
+
const dashoffset = circumference * (1 - percentage);
|
|
187
|
+
const center = diameter / 2;
|
|
188
|
+
const showLabel = !isLabelHidden;
|
|
189
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
190
|
+
ref: ref,
|
|
191
|
+
...mergeProps(themeProps('circular-progress', {
|
|
192
|
+
variant,
|
|
193
|
+
size
|
|
194
|
+
}), stylex.props(styles.root, showLabel && styles.rootWithLabel, xstyle), className, style),
|
|
195
|
+
"data-testid": dataTestId,
|
|
196
|
+
...rest,
|
|
197
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
198
|
+
id: labelId,
|
|
199
|
+
...{
|
|
200
|
+
0: {
|
|
201
|
+
className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr xzpqnlu xuxw1ft xc342km"
|
|
202
|
+
},
|
|
203
|
+
1: {
|
|
204
|
+
className: "x141an7d x1ltkj2j x1e4wzip xv1l7n4"
|
|
205
|
+
}
|
|
206
|
+
}[!!showLabel << 0],
|
|
207
|
+
children: label
|
|
208
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
209
|
+
...{
|
|
210
|
+
className: "x1n2onr6 x3nfvp2"
|
|
211
|
+
},
|
|
212
|
+
children: [/*#__PURE__*/_jsxs("svg", {
|
|
213
|
+
role: isIndeterminate ? 'progressbar' : 'meter',
|
|
214
|
+
"aria-labelledby": labelId,
|
|
215
|
+
"aria-valuenow": isIndeterminate ? undefined : clampedValue,
|
|
216
|
+
"aria-valuemin": isIndeterminate ? undefined : 0,
|
|
217
|
+
"aria-valuemax": isIndeterminate ? undefined : max,
|
|
218
|
+
width: diameter,
|
|
219
|
+
height: diameter,
|
|
220
|
+
viewBox: `0 0 ${diameter} ${diameter}`,
|
|
221
|
+
...{
|
|
222
|
+
0: {
|
|
223
|
+
className: "x1lliihq x9tu13d"
|
|
224
|
+
},
|
|
225
|
+
1: {
|
|
226
|
+
className: "x1lliihq x1ka1v4i x1c74tu6 xy02sl2 x1esw782 xa4qsjk"
|
|
227
|
+
}
|
|
228
|
+
}[!!isIndeterminate << 0],
|
|
229
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
230
|
+
...mergeProps(themeProps('circular-progress-track'), stylex.props(styles.track, trackVariantStyles[variant])),
|
|
231
|
+
cx: center,
|
|
232
|
+
cy: center,
|
|
233
|
+
r: radius,
|
|
234
|
+
strokeWidth: strokeWidth
|
|
235
|
+
}), isIndeterminate ? /*#__PURE__*/_jsx("circle", {
|
|
236
|
+
...mergeProps(themeProps('circular-progress-fill', {
|
|
237
|
+
variant
|
|
238
|
+
}), stylex.props(styles.fillIndeterminate, variantStyles[variant])),
|
|
239
|
+
cx: center,
|
|
240
|
+
cy: center,
|
|
241
|
+
r: radius,
|
|
242
|
+
strokeWidth: strokeWidth
|
|
243
|
+
}) : /*#__PURE__*/_jsx("circle", {
|
|
244
|
+
...mergeProps(themeProps('circular-progress-fill', {
|
|
245
|
+
variant
|
|
246
|
+
}), stylex.props(styles.fill, variantStyles[variant])),
|
|
247
|
+
cx: center,
|
|
248
|
+
cy: center,
|
|
249
|
+
r: radius,
|
|
250
|
+
strokeWidth: strokeWidth,
|
|
251
|
+
strokeDasharray: circumference,
|
|
252
|
+
strokeDashoffset: dashoffset
|
|
253
|
+
})]
|
|
254
|
+
}), children != null && /*#__PURE__*/_jsx("div", {
|
|
255
|
+
...{
|
|
256
|
+
className: "x10l6tqk x10a8y8t x78zum5 x6s0dn4 xl56j7k x47corl"
|
|
257
|
+
},
|
|
258
|
+
children: children
|
|
259
|
+
})]
|
|
260
|
+
})]
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
CircularProgress.displayName = 'CircularProgress';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file CircularProgress component barrel export
|
|
3
|
+
*/
|
|
4
|
+
export { CircularProgress } from './CircularProgress';
|
|
5
|
+
export type { CircularProgressProps, CircularProgressSize, CircularProgressVariant, CircularProgressVariantMap, } from './CircularProgress';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CircularProgress/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file CodeBlock component barrel export
|
|
3
|
+
* @deprecated Import from '@astryxdesign/core/CodeBlock' instead.
|
|
4
|
+
* This re-export exists for backwards compatibility.
|
|
5
|
+
*/
|
|
6
|
+
export { CodeBlock } from '@astryxdesign/core/CodeBlock';
|
|
7
|
+
export type { CodeBlockProps } from '@astryxdesign/core/CodeBlock';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/index.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AACvD,YAAY,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file CodeBlock component barrel export
|
|
5
|
+
* @deprecated Import from '@astryxdesign/core/CodeBlock' instead.
|
|
6
|
+
* This re-export exists for backwards compatibility.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { CodeBlock } from '@astryxdesign/core/CodeBlock';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { BaseProps } from '@astryxdesign/core';
|
|
2
|
+
import type { TokenLine } from '@astryxdesign/core/CodeBlock';
|
|
3
|
+
export interface CodeEditorProps extends Omit<BaseProps<HTMLDivElement>, 'onChange'> {
|
|
4
|
+
/** Ref forwarded to the root element */
|
|
5
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
+
/** Controlled value */
|
|
7
|
+
value: string;
|
|
8
|
+
/** Change handler */
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
/** Language for highlighting. @default "plaintext" */
|
|
11
|
+
language?: string;
|
|
12
|
+
/** Show line numbers. @default false */
|
|
13
|
+
hasLineNumbers?: boolean;
|
|
14
|
+
/** Read-only mode. @default false */
|
|
15
|
+
isReadOnly?: boolean;
|
|
16
|
+
/** Placeholder when empty */
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
/** Max height before scrolling */
|
|
19
|
+
maxHeight?: number | string;
|
|
20
|
+
/** Text size. @default "md" */
|
|
21
|
+
size?: 'sm' | 'md';
|
|
22
|
+
/** Custom tokenizer */
|
|
23
|
+
tokenizer?: (code: string, language: string) => TokenLine[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An editable code input using contentEditable="plaintext-only".
|
|
27
|
+
*
|
|
28
|
+
* Uses CSS Custom Highlight API for syntax coloring. Supports
|
|
29
|
+
* auto-indent, tab insertion, and bracket auto-closing.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const [code, setCode] = useState('');
|
|
34
|
+
* <CodeEditor
|
|
35
|
+
* value={code}
|
|
36
|
+
* onChange={setCode}
|
|
37
|
+
* language="typescript"
|
|
38
|
+
* hasLineNumbers
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function CodeEditor({ value, onChange, language, hasLineNumbers, isReadOnly, placeholder, maxHeight, size, tokenizer: customTokenizer, xstyle, className, style, ref, ...props }: CodeEditorProps): import("react").JSX.Element;
|
|
43
|
+
export declare namespace CodeEditor {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=CodeEditor.d.ts.map
|