@cronus-ui/ui 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +262 -0
- package/dist/charts/animation.d.ts +11 -0
- package/dist/charts/animation.js +29 -0
- package/dist/charts/area-chart-loading.d.ts +34 -0
- package/dist/charts/area-chart-loading.js +22 -0
- package/dist/charts/area-chart.d.ts +48 -0
- package/dist/charts/area-chart.js +57 -0
- package/dist/charts/area-gradient-defs.d.ts +20 -0
- package/dist/charts/area-gradient-defs.js +15 -0
- package/dist/charts/area.d.ts +76 -0
- package/dist/charts/area.js +104 -0
- package/dist/charts/background.d.ts +27 -0
- package/dist/charts/background.js +68 -0
- package/dist/charts/bar-chart-loading.d.ts +17 -0
- package/dist/charts/bar-chart-loading.js +14 -0
- package/dist/charts/bar-chart.d.ts +55 -0
- package/dist/charts/bar-chart.js +432 -0
- package/dist/charts/bar-depth-geometry.d.ts +33 -0
- package/dist/charts/bar-depth-geometry.js +38 -0
- package/dist/charts/bar-depth.d.ts +157 -0
- package/dist/charts/bar-depth.js +586 -0
- package/dist/charts/bar-squares-layout.d.ts +28 -0
- package/dist/charts/bar-squares-layout.js +47 -0
- package/dist/charts/bar-squares.d.ts +49 -0
- package/dist/charts/bar-squares.js +207 -0
- package/dist/charts/bar-x-axis.d.ts +14 -0
- package/dist/charts/bar-x-axis.js +73 -0
- package/dist/charts/bar-y-axis.d.ts +12 -0
- package/dist/charts/bar-y-axis.js +64 -0
- package/dist/charts/bar.d.ts +41 -0
- package/dist/charts/bar.js +208 -0
- package/dist/charts/candlestick-chart.d.ts +46 -0
- package/dist/charts/candlestick-chart.js +203 -0
- package/dist/charts/candlestick.d.ts +24 -0
- package/dist/charts/candlestick.js +139 -0
- package/dist/charts/chart-brush-handle.d.ts +15 -0
- package/dist/charts/chart-brush-handle.js +47 -0
- package/dist/charts/chart-brush-layout.d.ts +27 -0
- package/dist/charts/chart-brush-layout.js +42 -0
- package/dist/charts/chart-brush-selection-overlay.d.ts +19 -0
- package/dist/charts/chart-brush-selection-overlay.js +44 -0
- package/dist/charts/chart-brush-track-overlay.d.ts +23 -0
- package/dist/charts/chart-brush-track-overlay.js +65 -0
- package/dist/charts/chart-brush.d.ts +32 -0
- package/dist/charts/chart-brush.js +116 -0
- package/dist/charts/chart-center-typography.d.ts +12 -0
- package/dist/charts/chart-center-typography.js +12 -0
- package/dist/charts/chart-child-passthrough.d.ts +17 -0
- package/dist/charts/chart-child-passthrough.js +74 -0
- package/dist/charts/chart-config-context.d.ts +26 -0
- package/dist/charts/chart-config-context.js +47 -0
- package/dist/charts/chart-context.d.ts +199 -0
- package/dist/charts/chart-context.js +201 -0
- package/dist/charts/chart-defs.d.ts +13 -0
- package/dist/charts/chart-defs.js +49 -0
- package/dist/charts/chart-formatters.d.ts +10 -0
- package/dist/charts/chart-formatters.js +28 -0
- package/dist/charts/chart-legend-hover.d.ts +13 -0
- package/dist/charts/chart-legend-hover.js +18 -0
- package/dist/charts/chart-legend.d.ts +55 -0
- package/dist/charts/chart-legend.js +30 -0
- package/dist/charts/chart-loading-label.d.ts +10 -0
- package/dist/charts/chart-loading-label.js +21 -0
- package/dist/charts/chart-phase.d.ts +31 -0
- package/dist/charts/chart-phase.js +21 -0
- package/dist/charts/chart-reveal-clip.d.ts +24 -0
- package/dist/charts/chart-reveal-clip.js +24 -0
- package/dist/charts/chart-scale.d.ts +12 -0
- package/dist/charts/chart-scale.js +17 -0
- package/dist/charts/chart-stat-flow.d.ts +36 -0
- package/dist/charts/chart-stat-flow.js +23 -0
- package/dist/charts/choropleth/choropleth-chart.d.ts +43 -0
- package/dist/charts/choropleth/choropleth-chart.js +218 -0
- package/dist/charts/choropleth/choropleth-context.d.ts +86 -0
- package/dist/charts/choropleth/choropleth-context.js +106 -0
- package/dist/charts/choropleth/choropleth-feature.d.ts +13 -0
- package/dist/charts/choropleth/choropleth-feature.js +125 -0
- package/dist/charts/choropleth/choropleth-graticule.d.ts +11 -0
- package/dist/charts/choropleth/choropleth-graticule.js +12 -0
- package/dist/charts/choropleth/choropleth-tooltip.d.ts +31 -0
- package/dist/charts/choropleth/choropleth-tooltip.js +50 -0
- package/dist/charts/choropleth/index.d.ts +7 -0
- package/dist/charts/choropleth/index.js +6 -0
- package/dist/charts/composed-chart.d.ts +36 -0
- package/dist/charts/composed-chart.js +152 -0
- package/dist/charts/dash-tail-stroke.d.ts +18 -0
- package/dist/charts/dash-tail-stroke.js +13 -0
- package/dist/charts/decimate-time-series.d.ts +10 -0
- package/dist/charts/decimate-time-series.js +112 -0
- package/dist/charts/fade-edges.d.ts +34 -0
- package/dist/charts/fade-edges.js +35 -0
- package/dist/charts/filter-data-by-x-domain.d.ts +5 -0
- package/dist/charts/filter-data-by-x-domain.js +42 -0
- package/dist/charts/funnel-chart.d.ts +91 -0
- package/dist/charts/funnel-chart.js +302 -0
- package/dist/charts/gauge-label-layout.d.ts +22 -0
- package/dist/charts/gauge-label-layout.js +44 -0
- package/dist/charts/gauge.d.ts +56 -0
- package/dist/charts/gauge.js +307 -0
- package/dist/charts/generate-chart-skeleton-data.d.ts +16 -0
- package/dist/charts/generate-chart-skeleton-data.js +25 -0
- package/dist/charts/grid.d.ts +58 -0
- package/dist/charts/grid.js +80 -0
- package/dist/charts/heatmap/generate-heatmap-skeleton-data.d.ts +4 -0
- package/dist/charts/heatmap/generate-heatmap-skeleton-data.js +12 -0
- package/dist/charts/heatmap/heatmap-animation.d.ts +41 -0
- package/dist/charts/heatmap/heatmap-animation.js +85 -0
- package/dist/charts/heatmap/heatmap-cells.d.ts +21 -0
- package/dist/charts/heatmap/heatmap-cells.js +265 -0
- package/dist/charts/heatmap/heatmap-chart-loading.d.ts +21 -0
- package/dist/charts/heatmap/heatmap-chart-loading.js +14 -0
- package/dist/charts/heatmap/heatmap-chart.d.ts +80 -0
- package/dist/charts/heatmap/heatmap-chart.js +275 -0
- package/dist/charts/heatmap/heatmap-colors.d.ts +70 -0
- package/dist/charts/heatmap/heatmap-colors.js +113 -0
- package/dist/charts/heatmap/heatmap-context.d.ts +109 -0
- package/dist/charts/heatmap/heatmap-context.js +69 -0
- package/dist/charts/heatmap/heatmap-legend-gradient.d.ts +20 -0
- package/dist/charts/heatmap/heatmap-legend-gradient.js +44 -0
- package/dist/charts/heatmap/heatmap-legend-swatch.d.ts +8 -0
- package/dist/charts/heatmap/heatmap-legend-swatch.js +26 -0
- package/dist/charts/heatmap/heatmap-legend.d.ts +41 -0
- package/dist/charts/heatmap/heatmap-legend.js +68 -0
- package/dist/charts/heatmap/heatmap-pattern-defs.d.ts +5 -0
- package/dist/charts/heatmap/heatmap-pattern-defs.js +25 -0
- package/dist/charts/heatmap/heatmap-resolve-separator.d.ts +8 -0
- package/dist/charts/heatmap/heatmap-resolve-separator.js +82 -0
- package/dist/charts/heatmap/heatmap-separator.d.ts +63 -0
- package/dist/charts/heatmap/heatmap-separator.js +71 -0
- package/dist/charts/heatmap/heatmap-tooltip.d.ts +30 -0
- package/dist/charts/heatmap/heatmap-tooltip.js +20 -0
- package/dist/charts/heatmap/heatmap-utils.d.ts +175 -0
- package/dist/charts/heatmap/heatmap-utils.js +595 -0
- package/dist/charts/heatmap/heatmap-x-axis.d.ts +7 -0
- package/dist/charts/heatmap/heatmap-x-axis.js +54 -0
- package/dist/charts/heatmap/heatmap-y-axis.d.ts +14 -0
- package/dist/charts/heatmap/heatmap-y-axis.js +37 -0
- package/dist/charts/heatmap/index.d.ts +15 -0
- package/dist/charts/heatmap/index.js +15 -0
- package/dist/charts/heatmap/use-delayed-tooltip-data.d.ts +3 -0
- package/dist/charts/heatmap/use-delayed-tooltip-data.js +53 -0
- package/dist/charts/highlight-segment-bounds.d.ts +18 -0
- package/dist/charts/highlight-segment-bounds.js +36 -0
- package/dist/charts/highlight-segment.d.ts +22 -0
- package/dist/charts/highlight-segment.js +14 -0
- package/dist/charts/index.d.ts +106 -0
- package/dist/charts/index.js +133 -0
- package/dist/charts/indicator-fade.d.ts +15 -0
- package/dist/charts/indicator-fade.js +42 -0
- package/dist/charts/legend/index.d.ts +8 -0
- package/dist/charts/legend/index.js +10 -0
- package/dist/charts/legend/legend-context.d.ts +48 -0
- package/dist/charts/legend/legend-context.js +34 -0
- package/dist/charts/legend/legend-item.d.ts +12 -0
- package/dist/charts/legend/legend-item.js +11 -0
- package/dist/charts/legend/legend-label.d.ts +9 -0
- package/dist/charts/legend/legend-label.js +10 -0
- package/dist/charts/legend/legend-marker.d.ts +9 -0
- package/dist/charts/legend/legend-marker.js +11 -0
- package/dist/charts/legend/legend-progress.d.ts +13 -0
- package/dist/charts/legend/legend-progress.js +15 -0
- package/dist/charts/legend/legend-value.d.ts +17 -0
- package/dist/charts/legend/legend-value.js +11 -0
- package/dist/charts/legend/legend.d.ts +23 -0
- package/dist/charts/legend/legend.js +43 -0
- package/dist/charts/line-chart-loading.d.ts +34 -0
- package/dist/charts/line-chart-loading.js +22 -0
- package/dist/charts/line-chart.d.ts +46 -0
- package/dist/charts/line-chart.js +91 -0
- package/dist/charts/line-loading-pulse.d.ts +20 -0
- package/dist/charts/line-loading-pulse.js +124 -0
- package/dist/charts/line-loading-timing.d.ts +10 -0
- package/dist/charts/line-loading-timing.js +10 -0
- package/dist/charts/line-series-terminal-marker.d.ts +16 -0
- package/dist/charts/line-series-terminal-marker.js +46 -0
- package/dist/charts/line.d.ts +64 -0
- package/dist/charts/line.js +96 -0
- package/dist/charts/live-line-chart.d.ts +35 -0
- package/dist/charts/live-line-chart.js +374 -0
- package/dist/charts/live-line.d.ts +39 -0
- package/dist/charts/live-line.js +78 -0
- package/dist/charts/live-x-axis.d.ts +12 -0
- package/dist/charts/live-x-axis.js +85 -0
- package/dist/charts/live-y-axis.d.ts +16 -0
- package/dist/charts/live-y-axis.js +137 -0
- package/dist/charts/loading-sweep.d.ts +66 -0
- package/dist/charts/loading-sweep.js +174 -0
- package/dist/charts/markers/chart-markers.d.ts +25 -0
- package/dist/charts/markers/chart-markers.js +87 -0
- package/dist/charts/markers/index.d.ts +3 -0
- package/dist/charts/markers/index.js +3 -0
- package/dist/charts/markers/marker-group.d.ts +88 -0
- package/dist/charts/markers/marker-group.js +171 -0
- package/dist/charts/motion-utils.d.ts +9 -0
- package/dist/charts/motion-utils.js +28 -0
- package/dist/charts/notch-gauge-shared.d.ts +49 -0
- package/dist/charts/notch-gauge-shared.js +103 -0
- package/dist/charts/path-stroke-utils.d.ts +20 -0
- package/dist/charts/path-stroke-utils.js +55 -0
- package/dist/charts/pattern-area.d.ts +21 -0
- package/dist/charts/pattern-area.js +19 -0
- package/dist/charts/pattern-preset.d.ts +26 -0
- package/dist/charts/pattern-preset.js +83 -0
- package/dist/charts/pie-center-shell.d.ts +24 -0
- package/dist/charts/pie-center-shell.js +109 -0
- package/dist/charts/pie-center.d.ts +46 -0
- package/dist/charts/pie-center.js +46 -0
- package/dist/charts/pie-chart.d.ts +50 -0
- package/dist/charts/pie-chart.js +248 -0
- package/dist/charts/pie-context.d.ts +74 -0
- package/dist/charts/pie-context.js +95 -0
- package/dist/charts/pie-slice.d.ts +28 -0
- package/dist/charts/pie-slice.js +180 -0
- package/dist/charts/profit-loss-legend-hover.d.ts +11 -0
- package/dist/charts/profit-loss-legend-hover.js +12 -0
- package/dist/charts/profit-loss-legend.d.ts +17 -0
- package/dist/charts/profit-loss-legend.js +18 -0
- package/dist/charts/profit-loss-line.d.ts +27 -0
- package/dist/charts/profit-loss-line.js +77 -0
- package/dist/charts/profit-loss-segments.d.ts +12 -0
- package/dist/charts/profit-loss-segments.js +86 -0
- package/dist/charts/projection-config.d.ts +11 -0
- package/dist/charts/projection-config.js +80 -0
- package/dist/charts/projection-line-end-marker.d.ts +15 -0
- package/dist/charts/projection-line-end-marker.js +27 -0
- package/dist/charts/projection-line.d.ts +40 -0
- package/dist/charts/projection-line.js +79 -0
- package/dist/charts/projection-utils.d.ts +46 -0
- package/dist/charts/projection-utils.js +253 -0
- package/dist/charts/radar-area.d.ts +17 -0
- package/dist/charts/radar-area.js +84 -0
- package/dist/charts/radar-axis.d.ts +14 -0
- package/dist/charts/radar-axis.js +24 -0
- package/dist/charts/radar-chart.d.ts +36 -0
- package/dist/charts/radar-chart.js +89 -0
- package/dist/charts/radar-context.d.ts +68 -0
- package/dist/charts/radar-context.js +87 -0
- package/dist/charts/radar-grid.d.ts +16 -0
- package/dist/charts/radar-grid.js +40 -0
- package/dist/charts/radar-labels.d.ts +16 -0
- package/dist/charts/radar-labels.js +29 -0
- package/dist/charts/reference-area-config.d.ts +10 -0
- package/dist/charts/reference-area-config.js +39 -0
- package/dist/charts/reference-area-geometry.d.ts +23 -0
- package/dist/charts/reference-area-geometry.js +68 -0
- package/dist/charts/reference-area-registration-context.d.ts +8 -0
- package/dist/charts/reference-area-registration-context.js +7 -0
- package/dist/charts/reference-area.d.ts +52 -0
- package/dist/charts/reference-area.js +101 -0
- package/dist/charts/ring-center.d.ts +46 -0
- package/dist/charts/ring-center.js +41 -0
- package/dist/charts/ring-chart.d.ts +41 -0
- package/dist/charts/ring-chart.js +212 -0
- package/dist/charts/ring-context.d.ts +66 -0
- package/dist/charts/ring-context.js +92 -0
- package/dist/charts/ring.d.ts +11 -0
- package/dist/charts/ring.js +104 -0
- package/dist/charts/sankey/index.d.ts +6 -0
- package/dist/charts/sankey/index.js +6 -0
- package/dist/charts/sankey/sankey-chart.d.ts +39 -0
- package/dist/charts/sankey/sankey-chart.js +117 -0
- package/dist/charts/sankey/sankey-context.d.ts +69 -0
- package/dist/charts/sankey/sankey-context.js +23 -0
- package/dist/charts/sankey/sankey-link.d.ts +26 -0
- package/dist/charts/sankey/sankey-link.js +155 -0
- package/dist/charts/sankey/sankey-node.d.ts +29 -0
- package/dist/charts/sankey/sankey-node.js +200 -0
- package/dist/charts/sankey/sankey-tooltip.d.ts +24 -0
- package/dist/charts/sankey/sankey-tooltip.js +70 -0
- package/dist/charts/scatter-chart-shell.d.ts +21 -0
- package/dist/charts/scatter-chart-shell.js +152 -0
- package/dist/charts/scatter-chart.d.ts +32 -0
- package/dist/charts/scatter-chart.js +56 -0
- package/dist/charts/scatter-svg.d.ts +6 -0
- package/dist/charts/scatter-svg.js +16 -0
- package/dist/charts/scatter.d.ts +21 -0
- package/dist/charts/scatter.js +30 -0
- package/dist/charts/segment.d.ts +26 -0
- package/dist/charts/segment.js +42 -0
- package/dist/charts/series-bar-layout.d.ts +18 -0
- package/dist/charts/series-bar-layout.js +31 -0
- package/dist/charts/series-bar.d.ts +20 -0
- package/dist/charts/series-bar.js +120 -0
- package/dist/charts/series-dash-tail-overlay.d.ts +17 -0
- package/dist/charts/series-dash-tail-overlay.js +39 -0
- package/dist/charts/series-highlight-layer.d.ts +23 -0
- package/dist/charts/series-highlight-layer.js +21 -0
- package/dist/charts/series-hover-dim.d.ts +29 -0
- package/dist/charts/series-hover-dim.js +26 -0
- package/dist/charts/series-markers.d.ts +14 -0
- package/dist/charts/series-markers.js +98 -0
- package/dist/charts/series-path-utils.d.ts +19 -0
- package/dist/charts/series-path-utils.js +60 -0
- package/dist/charts/series-point-marker.d.ts +48 -0
- package/dist/charts/series-point-marker.js +48 -0
- package/dist/charts/shimmering-text.d.ts +23 -0
- package/dist/charts/shimmering-text.js +31 -0
- package/dist/charts/static-chart-preview-context.d.ts +7 -0
- package/dist/charts/static-chart-preview-context.js +12 -0
- package/dist/charts/sunburst-breadcrumb.d.ts +16 -0
- package/dist/charts/sunburst-breadcrumb.js +26 -0
- package/dist/charts/sunburst-center.d.ts +5 -0
- package/dist/charts/sunburst-center.js +17 -0
- package/dist/charts/sunburst-chart.d.ts +30 -0
- package/dist/charts/sunburst-chart.js +263 -0
- package/dist/charts/sunburst-context.d.ts +61 -0
- package/dist/charts/sunburst-context.js +112 -0
- package/dist/charts/sunburst-data.d.ts +9 -0
- package/dist/charts/sunburst-data.js +2 -0
- package/dist/charts/sunburst-hint.d.ts +13 -0
- package/dist/charts/sunburst-hint.js +31 -0
- package/dist/charts/sunburst-labels.d.ts +9 -0
- package/dist/charts/sunburst-labels.js +63 -0
- package/dist/charts/sunburst-segment.d.ts +11 -0
- package/dist/charts/sunburst-segment.js +78 -0
- package/dist/charts/sunburst.d.ts +101 -0
- package/dist/charts/sunburst.js +396 -0
- package/dist/charts/time-series-chart-shell.d.ts +47 -0
- package/dist/charts/time-series-chart-shell.js +390 -0
- package/dist/charts/tooltip/chart-tooltip.d.ts +76 -0
- package/dist/charts/tooltip/chart-tooltip.js +150 -0
- package/dist/charts/tooltip/date-ticker.d.ts +11 -0
- package/dist/charts/tooltip/date-ticker.js +77 -0
- package/dist/charts/tooltip/index.d.ts +7 -0
- package/dist/charts/tooltip/index.js +7 -0
- package/dist/charts/tooltip/tooltip-box.d.ts +48 -0
- package/dist/charts/tooltip/tooltip-box.js +114 -0
- package/dist/charts/tooltip/tooltip-content.d.ts +18 -0
- package/dist/charts/tooltip/tooltip-content.js +9 -0
- package/dist/charts/tooltip/tooltip-dot.d.ts +28 -0
- package/dist/charts/tooltip/tooltip-dot.js +54 -0
- package/dist/charts/tooltip/tooltip-indicator.d.ts +45 -0
- package/dist/charts/tooltip/tooltip-indicator.js +65 -0
- package/dist/charts/use-animated-series-path.d.ts +19 -0
- package/dist/charts/use-animated-series-path.js +93 -0
- package/dist/charts/use-animated-y-domains.d.ts +14 -0
- package/dist/charts/use-animated-y-domains.js +150 -0
- package/dist/charts/use-chart-interaction.d.ts +41 -0
- package/dist/charts/use-chart-interaction.js +244 -0
- package/dist/charts/use-chart-phase-orchestrator.d.ts +23 -0
- package/dist/charts/use-chart-phase-orchestrator.js +139 -0
- package/dist/charts/use-enter-complete.d.ts +8 -0
- package/dist/charts/use-enter-complete.js +23 -0
- package/dist/charts/use-grid-shimmer.d.ts +16 -0
- package/dist/charts/use-grid-shimmer.js +63 -0
- package/dist/charts/use-highlight-segment.d.ts +14 -0
- package/dist/charts/use-highlight-segment.js +34 -0
- package/dist/charts/use-mount-progress.d.ts +4 -0
- package/dist/charts/use-mount-progress.js +22 -0
- package/dist/charts/use-scatter-chart-interaction.d.ts +35 -0
- package/dist/charts/use-scatter-chart-interaction.js +228 -0
- package/dist/charts/use-scheduled-tooltip.d.ts +9 -0
- package/dist/charts/use-scheduled-tooltip.js +76 -0
- package/dist/charts/visx-pattern.d.ts +19 -0
- package/dist/charts/visx-pattern.js +20 -0
- package/dist/charts/x-axis.d.ts +27 -0
- package/dist/charts/x-axis.js +415 -0
- package/dist/charts/y-axis-scales.d.ts +26 -0
- package/dist/charts/y-axis-scales.js +72 -0
- package/dist/charts/y-axis-ticks.d.ts +12 -0
- package/dist/charts/y-axis-ticks.js +24 -0
- package/dist/charts/y-axis.d.ts +22 -0
- package/dist/charts/y-axis.js +80 -0
- package/dist/charts/y-domain-utils.d.ts +27 -0
- package/dist/charts/y-domain-utils.js +88 -0
- package/dist/components/accordion.d.ts +6 -0
- package/dist/components/accordion.js +20 -0
- package/dist/components/alert-dialog.d.ts +18 -0
- package/dist/components/alert-dialog.js +41 -0
- package/dist/components/alert.d.ts +24 -0
- package/dist/components/alert.js +46 -0
- package/dist/components/animated-button.d.ts +5 -0
- package/dist/components/animated-button.js +16 -0
- package/dist/components/animated-list.d.ts +26 -0
- package/dist/components/animated-list.js +25 -0
- package/dist/components/animated-number.d.ts +67 -0
- package/dist/components/animated-number.js +131 -0
- package/dist/components/app-shell.d.ts +27 -0
- package/dist/components/app-shell.js +18 -0
- package/dist/components/area-chart.d.ts +11 -0
- package/dist/components/area-chart.js +12 -0
- package/dist/components/aspect-ratio.d.ts +16 -0
- package/dist/components/aspect-ratio.js +14 -0
- package/dist/components/aurora-background.d.ts +3 -0
- package/dist/components/aurora-background.js +8 -0
- package/dist/components/autocomplete.d.ts +55 -0
- package/dist/components/autocomplete.js +279 -0
- package/dist/components/avatar-group.d.ts +39 -0
- package/dist/components/avatar-group.js +50 -0
- package/dist/components/avatar.d.ts +5 -0
- package/dist/components/avatar.js +17 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.js +35 -0
- package/dist/components/banner.d.ts +45 -0
- package/dist/components/banner.js +80 -0
- package/dist/components/bar-chart.d.ts +11 -0
- package/dist/components/bar-chart.js +9 -0
- package/dist/components/border-beam.d.ts +45 -0
- package/dist/components/border-beam.js +48 -0
- package/dist/components/breadcrumb.d.ts +12 -0
- package/dist/components/breadcrumb.js +35 -0
- package/dist/components/button-group.d.ts +7 -0
- package/dist/components/button-group.js +10 -0
- package/dist/components/button.d.ts +12 -0
- package/dist/components/button.js +39 -0
- package/dist/components/calendar.d.ts +7 -0
- package/dist/components/calendar.js +71 -0
- package/dist/components/candlestick-chart.d.ts +13 -0
- package/dist/components/candlestick-chart.js +66 -0
- package/dist/components/card-stack.d.ts +28 -0
- package/dist/components/card-stack.js +47 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.js +32 -0
- package/dist/components/carousel.d.ts +82 -0
- package/dist/components/carousel.js +310 -0
- package/dist/components/chart.d.ts +100 -0
- package/dist/components/chart.js +210 -0
- package/dist/components/checkbox.d.ts +3 -0
- package/dist/components/checkbox.js +11 -0
- package/dist/components/chip.d.ts +80 -0
- package/dist/components/chip.js +186 -0
- package/dist/components/choropleth-chart.d.ts +12 -0
- package/dist/components/choropleth-chart.js +31 -0
- package/dist/components/click-spark.d.ts +19 -0
- package/dist/components/click-spark.js +51 -0
- package/dist/components/code-block.d.ts +13 -0
- package/dist/components/code-block.js +20 -0
- package/dist/components/code-tabs.d.ts +51 -0
- package/dist/components/code-tabs.js +150 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/collapsible.js +12 -0
- package/dist/components/color-picker.d.ts +30 -0
- package/dist/components/color-picker.js +300 -0
- package/dist/components/combobox.d.ts +33 -0
- package/dist/components/combobox.js +32 -0
- package/dist/components/command.d.ts +87 -0
- package/dist/components/command.js +44 -0
- package/dist/components/comparison-slider.d.ts +17 -0
- package/dist/components/comparison-slider.js +81 -0
- package/dist/components/composed-chart.d.ts +13 -0
- package/dist/components/composed-chart.js +22 -0
- package/dist/components/confetti.d.ts +21 -0
- package/dist/components/confetti.js +111 -0
- package/dist/components/confirmation-dialog.d.ts +46 -0
- package/dist/components/confirmation-dialog.js +102 -0
- package/dist/components/context-menu.d.ts +28 -0
- package/dist/components/context-menu.js +52 -0
- package/dist/components/copy-button.d.ts +13 -0
- package/dist/components/copy-button.js +72 -0
- package/dist/components/countdown.d.ts +58 -0
- package/dist/components/countdown.js +106 -0
- package/dist/components/credit-card-input.d.ts +62 -0
- package/dist/components/credit-card-input.js +211 -0
- package/dist/components/currency-input.d.ts +86 -0
- package/dist/components/currency-input.js +215 -0
- package/dist/components/data-table.d.ts +232 -0
- package/dist/components/data-table.js +359 -0
- package/dist/components/date-picker.d.ts +66 -0
- package/dist/components/date-picker.js +55 -0
- package/dist/components/date-range-picker.d.ts +59 -0
- package/dist/components/date-range-picker.js +59 -0
- package/dist/components/description-list.d.ts +84 -0
- package/dist/components/description-list.js +138 -0
- package/dist/components/dialog.d.ts +26 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/dock.d.ts +34 -0
- package/dist/components/dock.js +61 -0
- package/dist/components/dot-pattern.d.ts +24 -0
- package/dist/components/dot-pattern.js +19 -0
- package/dist/components/drawer.d.ts +22 -0
- package/dist/components/drawer.js +37 -0
- package/dist/components/dropdown-menu.d.ts +32 -0
- package/dist/components/dropdown-menu.js +56 -0
- package/dist/components/dynamic-island.d.ts +26 -0
- package/dist/components/dynamic-island.js +31 -0
- package/dist/components/empty.d.ts +7 -0
- package/dist/components/empty.js +24 -0
- package/dist/components/expandable-tabs.d.ts +24 -0
- package/dist/components/expandable-tabs.js +30 -0
- package/dist/components/fab.d.ts +35 -0
- package/dist/components/fab.js +36 -0
- package/dist/components/field.d.ts +6 -0
- package/dist/components/field.js +22 -0
- package/dist/components/file-dropzone.d.ts +28 -0
- package/dist/components/file-dropzone.js +59 -0
- package/dist/components/flickering-grid.d.ts +25 -0
- package/dist/components/flickering-grid.js +30 -0
- package/dist/components/flip-card.d.ts +70 -0
- package/dist/components/flip-card.js +117 -0
- package/dist/components/floating-label-input.d.ts +34 -0
- package/dist/components/floating-label-input.js +25 -0
- package/dist/components/form.d.ts +25 -0
- package/dist/components/form.js +68 -0
- package/dist/components/frame.d.ts +12 -0
- package/dist/components/frame.js +10 -0
- package/dist/components/funnel-chart.d.ts +11 -0
- package/dist/components/funnel-chart.js +16 -0
- package/dist/components/gauge-chart.d.ts +8 -0
- package/dist/components/gauge-chart.js +10 -0
- package/dist/components/glare-hover.d.ts +15 -0
- package/dist/components/glare-hover.js +64 -0
- package/dist/components/glass-card.d.ts +3 -0
- package/dist/components/glass-card.js +8 -0
- package/dist/components/gradient-border.d.ts +7 -0
- package/dist/components/gradient-border.js +8 -0
- package/dist/components/gradient-text.d.ts +6 -0
- package/dist/components/gradient-text.js +10 -0
- package/dist/components/grid-pattern.d.ts +23 -0
- package/dist/components/grid-pattern.js +18 -0
- package/dist/components/heatmap-chart.d.ts +6 -0
- package/dist/components/heatmap-chart.js +8 -0
- package/dist/components/heatmap.d.ts +28 -0
- package/dist/components/heatmap.js +41 -0
- package/dist/components/highlighter.d.ts +20 -0
- package/dist/components/highlighter.js +19 -0
- package/dist/components/hover-card.d.ts +5 -0
- package/dist/components/hover-card.js +12 -0
- package/dist/components/image-zoom.d.ts +47 -0
- package/dist/components/image-zoom.js +125 -0
- package/dist/components/input-group.d.ts +10 -0
- package/dist/components/input-group.js +12 -0
- package/dist/components/input-otp.d.ts +18 -0
- package/dist/components/input-otp.js +38 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.js +8 -0
- package/dist/components/json-viewer.d.ts +43 -0
- package/dist/components/json-viewer.js +313 -0
- package/dist/components/kanban.d.ts +31 -0
- package/dist/components/kanban.js +143 -0
- package/dist/components/kbd.d.ts +3 -0
- package/dist/components/kbd.js +8 -0
- package/dist/components/label.d.ts +3 -0
- package/dist/components/label.js +9 -0
- package/dist/components/light-rays.d.ts +19 -0
- package/dist/components/light-rays.js +20 -0
- package/dist/components/lightbox.d.ts +24 -0
- package/dist/components/lightbox.js +68 -0
- package/dist/components/line-chart.d.ts +10 -0
- package/dist/components/line-chart.js +9 -0
- package/dist/components/live-line-chart.d.ts +12 -0
- package/dist/components/live-line-chart.js +42 -0
- package/dist/components/logo-carousel.d.ts +27 -0
- package/dist/components/logo-carousel.js +101 -0
- package/dist/components/magnetic.d.ts +44 -0
- package/dist/components/magnetic.js +172 -0
- package/dist/components/marquee.d.ts +71 -0
- package/dist/components/marquee.js +141 -0
- package/dist/components/masonry.d.ts +16 -0
- package/dist/components/masonry.js +84 -0
- package/dist/components/menubar.d.ts +33 -0
- package/dist/components/menubar.js +56 -0
- package/dist/components/meteors.d.ts +20 -0
- package/dist/components/meteors.js +39 -0
- package/dist/components/metric.d.ts +9 -0
- package/dist/components/metric.js +35 -0
- package/dist/components/mode-toggle.d.ts +32 -0
- package/dist/components/mode-toggle.js +40 -0
- package/dist/components/morphing-popover.d.ts +91 -0
- package/dist/components/morphing-popover.js +194 -0
- package/dist/components/motion-presets.d.ts +9 -0
- package/dist/components/motion-presets.js +20 -0
- package/dist/components/multi-select.d.ts +54 -0
- package/dist/components/multi-select.js +0 -0
- package/dist/components/navigation-menu.d.ts +12 -0
- package/dist/components/navigation-menu.js +42 -0
- package/dist/components/noise.d.ts +19 -0
- package/dist/components/noise.js +18 -0
- package/dist/components/notification-center.d.ts +68 -0
- package/dist/components/notification-center.js +57 -0
- package/dist/components/number-input.d.ts +45 -0
- package/dist/components/number-input.js +148 -0
- package/dist/components/orbit.d.ts +77 -0
- package/dist/components/orbit.js +100 -0
- package/dist/components/pagination.d.ts +16 -0
- package/dist/components/pagination.js +34 -0
- package/dist/components/particles.d.ts +18 -0
- package/dist/components/particles.js +92 -0
- package/dist/components/password-input.d.ts +16 -0
- package/dist/components/password-input.js +49 -0
- package/dist/components/phone-input.d.ts +67 -0
- package/dist/components/phone-input.js +225 -0
- package/dist/components/pie-chart.d.ts +12 -0
- package/dist/components/pie-chart.js +13 -0
- package/dist/components/pill-nav.d.ts +25 -0
- package/dist/components/pill-nav.js +66 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.js +15 -0
- package/dist/components/profit-loss-chart.d.ts +10 -0
- package/dist/components/profit-loss-chart.js +8 -0
- package/dist/components/progress.d.ts +10 -0
- package/dist/components/progress.js +17 -0
- package/dist/components/progressive-blur.d.ts +24 -0
- package/dist/components/progressive-blur.js +43 -0
- package/dist/components/radar-chart.d.ts +9 -0
- package/dist/components/radar-chart.js +9 -0
- package/dist/components/radio-group.d.ts +4 -0
- package/dist/components/radio-group.js +15 -0
- package/dist/components/rating.d.ts +29 -0
- package/dist/components/rating.js +94 -0
- package/dist/components/resizable.d.ts +57 -0
- package/dist/components/resizable.js +73 -0
- package/dist/components/retro-grid.d.ts +25 -0
- package/dist/components/retro-grid.js +26 -0
- package/dist/components/reveal.d.ts +9 -0
- package/dist/components/reveal.js +14 -0
- package/dist/components/rich-text-editor.d.ts +28 -0
- package/dist/components/rich-text-editor.js +83 -0
- package/dist/components/ring-chart.d.ts +13 -0
- package/dist/components/ring-chart.js +16 -0
- package/dist/components/ripple.d.ts +25 -0
- package/dist/components/ripple.js +26 -0
- package/dist/components/sankey-chart.d.ts +16 -0
- package/dist/components/sankey-chart.js +8 -0
- package/dist/components/scatter-chart.d.ts +12 -0
- package/dist/components/scatter-chart.js +9 -0
- package/dist/components/scheduler.d.ts +50 -0
- package/dist/components/scheduler.js +93 -0
- package/dist/components/scramble-text.d.ts +39 -0
- package/dist/components/scramble-text.js +78 -0
- package/dist/components/scroll-area.d.ts +13 -0
- package/dist/components/scroll-area.js +14 -0
- package/dist/components/scroll-progress.d.ts +19 -0
- package/dist/components/scroll-progress.js +67 -0
- package/dist/components/segmented-control.d.ts +48 -0
- package/dist/components/segmented-control.js +222 -0
- package/dist/components/select.d.ts +12 -0
- package/dist/components/select.js +43 -0
- package/dist/components/separator.d.ts +3 -0
- package/dist/components/separator.js +9 -0
- package/dist/components/sheet.d.ts +25 -0
- package/dist/components/sheet.js +47 -0
- package/dist/components/shimmer.d.ts +3 -0
- package/dist/components/shimmer.js +8 -0
- package/dist/components/shiny-text.d.ts +20 -0
- package/dist/components/shiny-text.js +24 -0
- package/dist/components/sidebar.d.ts +92 -0
- package/dist/components/sidebar.js +290 -0
- package/dist/components/signature-pad.d.ts +44 -0
- package/dist/components/signature-pad.js +317 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.js +8 -0
- package/dist/components/slider.d.ts +10 -0
- package/dist/components/slider.js +27 -0
- package/dist/components/sonner.d.ts +9 -0
- package/dist/components/sonner.js +17 -0
- package/dist/components/sparkles-text.d.ts +19 -0
- package/dist/components/sparkles-text.js +36 -0
- package/dist/components/sparkline.d.ts +22 -0
- package/dist/components/sparkline.js +100 -0
- package/dist/components/spinner.d.ts +10 -0
- package/dist/components/spinner.js +20 -0
- package/dist/components/spinning-text.d.ts +29 -0
- package/dist/components/spinning-text.js +40 -0
- package/dist/components/split-button.d.ts +71 -0
- package/dist/components/split-button.js +30 -0
- package/dist/components/spotlight-card.d.ts +11 -0
- package/dist/components/spotlight-card.js +63 -0
- package/dist/components/star-border.d.ts +19 -0
- package/dist/components/star-border.js +18 -0
- package/dist/components/status-dot.d.ts +60 -0
- package/dist/components/status-dot.js +76 -0
- package/dist/components/stepper.d.ts +98 -0
- package/dist/components/stepper.js +164 -0
- package/dist/components/sunburst-chart.d.ts +11 -0
- package/dist/components/sunburst-chart.js +45 -0
- package/dist/components/switch.d.ts +3 -0
- package/dist/components/switch.js +10 -0
- package/dist/components/table-of-contents.d.ts +64 -0
- package/dist/components/table-of-contents.js +0 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.js +38 -0
- package/dist/components/tabs.d.ts +6 -0
- package/dist/components/tabs.js +22 -0
- package/dist/components/tags-input.d.ts +39 -0
- package/dist/components/tags-input.js +86 -0
- package/dist/components/terminal.d.ts +86 -0
- package/dist/components/terminal.js +182 -0
- package/dist/components/text-effect.d.ts +71 -0
- package/dist/components/text-effect.js +166 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +8 -0
- package/dist/components/tilt-card.d.ts +30 -0
- package/dist/components/tilt-card.js +84 -0
- package/dist/components/time-picker.d.ts +58 -0
- package/dist/components/time-picker.js +245 -0
- package/dist/components/timeline.d.ts +81 -0
- package/dist/components/timeline.js +165 -0
- package/dist/components/toggle-group.d.ts +12 -0
- package/dist/components/toggle-group.js +23 -0
- package/dist/components/toggle.d.ts +12 -0
- package/dist/components/toggle.js +25 -0
- package/dist/components/toolbar.d.ts +14 -0
- package/dist/components/toolbar.js +89 -0
- package/dist/components/tooltip.d.ts +29 -0
- package/dist/components/tooltip.js +48 -0
- package/dist/components/tree-view.d.ts +45 -0
- package/dist/components/tree-view.js +197 -0
- package/dist/components/typing-text.d.ts +49 -0
- package/dist/components/typing-text.js +90 -0
- package/dist/components/usage-meter.d.ts +30 -0
- package/dist/components/usage-meter.js +90 -0
- package/dist/components/video-player.d.ts +48 -0
- package/dist/components/video-player.js +216 -0
- package/dist/components/word-rotate.d.ts +40 -0
- package/dist/components/word-rotate.js +34 -0
- package/dist/index.d.ts +306 -0
- package/dist/index.js +179 -0
- package/dist/lib/cn.d.ts +7 -0
- package/dist/lib/cn.js +10 -0
- package/dist/lib/demo-saas.d.ts +171 -0
- package/dist/lib/demo-saas.js +210 -0
- package/dist/lib/demo-store.d.ts +157 -0
- package/dist/lib/demo-store.js +353 -0
- package/dist/testing/index.d.ts +76 -0
- package/dist/testing/index.js +116 -0
- package/package.json +941 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
/**
|
|
6
|
+
* A determinate/indeterminate progress bar. The Radix Root is the
|
|
7
|
+
* `role="progressbar"` element, so `aria-label`/`aria-labelledby` (and any
|
|
8
|
+
* other prop) spread straight onto it — always pass one describing what the
|
|
9
|
+
* bar measures (e.g. "Upload progress") so the progressbar has an accessible
|
|
10
|
+
* name and satisfies `aria-progressbar-name` (WCAG 4.1.2).
|
|
11
|
+
*/
|
|
12
|
+
export const Progress = forwardRef(({ className, value, ...props }, ref) => {
|
|
13
|
+
const pct = Math.min(100, Math.max(0, value ?? 0));
|
|
14
|
+
return (_jsx(ProgressPrimitive.Root, { ref: ref, "data-slot": "progress", value: value, className: cn("relative h-2 w-full overflow-hidden rounded-full bg-surface-overlay", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: "h-full w-full flex-1 bg-primary transition-transform duration-300 ease-[var(--ease-out-quart)]", style: { transform: `translateX(-${100 - pct}%)` } }) }));
|
|
15
|
+
});
|
|
16
|
+
Progress.displayName = "Progress";
|
|
17
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { HTMLAttributes, Ref } from "react";
|
|
3
|
+
declare const progressiveBlurVariants: (props?: ({
|
|
4
|
+
side?: "bottom" | "top" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface ProgressiveBlurProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof progressiveBlurVariants> {
|
|
7
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
|
+
/**
|
|
9
|
+
* Height of the blur band.
|
|
10
|
+
* @default "6rem"
|
|
11
|
+
*/
|
|
12
|
+
height?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A stacked backdrop-blur that fades content out toward an edge — the iOS
|
|
16
|
+
* "scrolls under the chrome" treatment. Place it over a scroll region; the
|
|
17
|
+
* blur layers are decorative (`aria-hidden`).
|
|
18
|
+
*/
|
|
19
|
+
export declare function ProgressiveBlur({ ref, className, side, height, ...props }: ProgressiveBlurProps): import("react").JSX.Element;
|
|
20
|
+
export declare namespace ProgressiveBlur {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
export { progressiveBlurVariants };
|
|
24
|
+
//# sourceMappingURL=progressive-blur.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
const progressiveBlurVariants = cva("pointer-events-none absolute inset-x-0 z-10 motion-reduce:hidden", {
|
|
5
|
+
variants: {
|
|
6
|
+
side: {
|
|
7
|
+
top: "top-0",
|
|
8
|
+
bottom: "bottom-0",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: { side: "bottom" },
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* A stacked backdrop-blur that fades content out toward an edge — the iOS
|
|
15
|
+
* "scrolls under the chrome" treatment. Place it over a scroll region; the
|
|
16
|
+
* blur layers are decorative (`aria-hidden`).
|
|
17
|
+
*/
|
|
18
|
+
export function ProgressiveBlur({ ref, className, side = "bottom", height = "6rem", ...props }) {
|
|
19
|
+
const mask = side === "top"
|
|
20
|
+
? "linear-gradient(to bottom, black, transparent)"
|
|
21
|
+
: "linear-gradient(to top, black, transparent)";
|
|
22
|
+
return (_jsxs("div", { ref: ref, "data-slot": "progressive-blur", "aria-hidden": "true", className: cn(progressiveBlurVariants({ side }), className), style: { height }, ...props, children: [_jsx("div", { className: "absolute inset-0 backdrop-blur-[1px]", style: {
|
|
23
|
+
maskImage: mask,
|
|
24
|
+
WebkitMaskImage: mask,
|
|
25
|
+
} }), _jsx("div", { className: "absolute inset-0 backdrop-blur-[4px]", style: {
|
|
26
|
+
maskImage: side === "top"
|
|
27
|
+
? "linear-gradient(to bottom, black 30%, transparent 70%)"
|
|
28
|
+
: "linear-gradient(to top, black 30%, transparent 70%)",
|
|
29
|
+
WebkitMaskImage: side === "top"
|
|
30
|
+
? "linear-gradient(to bottom, black 30%, transparent 70%)"
|
|
31
|
+
: "linear-gradient(to top, black 30%, transparent 70%)",
|
|
32
|
+
} }), _jsx("div", { className: "absolute inset-0 backdrop-blur-[12px]", style: {
|
|
33
|
+
maskImage: side === "top"
|
|
34
|
+
? "linear-gradient(to bottom, black 10%, transparent 45%)"
|
|
35
|
+
: "linear-gradient(to top, black 10%, transparent 45%)",
|
|
36
|
+
WebkitMaskImage: side === "top"
|
|
37
|
+
? "linear-gradient(to bottom, black 10%, transparent 45%)"
|
|
38
|
+
: "linear-gradient(to top, black 10%, transparent 45%)",
|
|
39
|
+
} })] }));
|
|
40
|
+
}
|
|
41
|
+
ProgressiveBlur.displayName = "ProgressiveBlur";
|
|
42
|
+
export { progressiveBlurVariants };
|
|
43
|
+
//# sourceMappingURL=progressive-blur.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import { type ChartSeries } from "./chart.js";
|
|
3
|
+
export interface RadarChartProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
data: Record<string, unknown>[];
|
|
5
|
+
angleKey?: string;
|
|
6
|
+
series: ChartSeries[];
|
|
7
|
+
}
|
|
8
|
+
export declare function RadarChart({ data, angleKey, series, className, ...props }: RadarChartProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=radar-chart.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PolarAngleAxis, PolarGrid, Radar, RadarChart as RechartsRadarChart } from "recharts";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { ChartContainer, ChartTooltip, ChartTooltipContent, chartSeriesConfig, } from "./chart.js";
|
|
5
|
+
export function RadarChart({ data, angleKey = "metric", series, className, ...props }) {
|
|
6
|
+
const config = chartSeriesConfig(series);
|
|
7
|
+
return (_jsx("div", { "data-slot": "radar-chart", className: cn("h-64 w-full", className), ...props, children: _jsx(ChartContainer, { config: config, className: "h-full w-full", children: _jsxs(RechartsRadarChart, { data: data, cx: "50%", cy: "50%", outerRadius: "70%", children: [_jsx(PolarGrid, {}), _jsx(PolarAngleAxis, { dataKey: angleKey }), _jsx(ChartTooltip, { content: _jsx(ChartTooltipContent, {}) }), series.map((item) => (_jsx(Radar, { dataKey: item.key, stroke: `var(--color-${item.key})`, fill: `var(--color-${item.key})`, fillOpacity: 0.25 }, item.key)))] }) }) }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=radar-chart.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const RadioGroupItem: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
|
+
import { Circle } from "lucide-react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
7
|
+
export const RadioGroup = forwardRef(({ className, ...props }, ref) => {
|
|
8
|
+
return (_jsx(RadioGroupPrimitive.Root, { ref: ref, "data-slot": "radio-group", className: cn("grid gap-2", className), ...props }));
|
|
9
|
+
});
|
|
10
|
+
RadioGroup.displayName = "RadioGroup";
|
|
11
|
+
export const RadioGroupItem = forwardRef(({ className, ...props }, ref) => {
|
|
12
|
+
return (_jsx(RadioGroupPrimitive.Item, { ref: ref, "data-slot": "radio-group-item", className: cn("aspect-square size-4 rounded-full border border-border bg-surface-inset text-primary shadow-xs outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-base disabled:opacity-50 disabled:pointer-events-none data-[state=checked]:border-primary aria-invalid:border-error aria-invalid:ring-2 aria-invalid:ring-error/30", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx(Circle, { className: "size-2 fill-primary text-primary" }) }) }));
|
|
13
|
+
});
|
|
14
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
15
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare const ratingVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export interface RatingProps extends VariantProps<typeof ratingVariants> {
|
|
6
|
+
/** Controlled value. Pair with `onValueChange`. */
|
|
7
|
+
value?: number;
|
|
8
|
+
/** Initial value for uncontrolled usage. Defaults to `0`. */
|
|
9
|
+
defaultValue?: number;
|
|
10
|
+
/** Called with the new value whenever the rating changes. */
|
|
11
|
+
onValueChange?: (value: number) => void;
|
|
12
|
+
/** Number of stars. Defaults to `5`. */
|
|
13
|
+
max?: number;
|
|
14
|
+
/** Renders display-only with no interaction. Defaults to `false`. */
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
/** Allows half-star (0.5) granularity. Defaults to `false`. */
|
|
17
|
+
allowHalf?: boolean;
|
|
18
|
+
/** Star size preset. Defaults to `"md"`. */
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
/** Accessible name for the rating when there is no visible label. */
|
|
21
|
+
"aria-label"?: string;
|
|
22
|
+
/** ID of an element labelling the rating. */
|
|
23
|
+
"aria-labelledby"?: string;
|
|
24
|
+
/** Extra classes for the wrapper element. */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const Rating: import("react").ForwardRefExoticComponent<RatingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=rating.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { Star } from "lucide-react";
|
|
5
|
+
import { forwardRef, useCallback, useId, useState, } from "react";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
7
|
+
const ratingVariants = cva("inline-flex items-center", {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
sm: "gap-0.5 [&_svg]:size-3.5",
|
|
11
|
+
md: "gap-1 [&_svg]:size-5",
|
|
12
|
+
lg: "gap-1.5 [&_svg]:size-7",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: { size: "md" },
|
|
16
|
+
});
|
|
17
|
+
function clamp(value, min, max) {
|
|
18
|
+
return Math.min(Math.max(value, min), max);
|
|
19
|
+
}
|
|
20
|
+
/** One star: an empty outline with a clipped, filled overlay sized to `fill`. */
|
|
21
|
+
function StarIcon({ fill }) {
|
|
22
|
+
return (_jsxs("span", { className: "relative inline-flex shrink-0", "data-slot": "rating-star", children: [_jsx(Star, { "aria-hidden": "true", className: "text-fg-muted transition-colors duration-150 ease-[var(--ease-out-quart)]" }), _jsx("span", { className: "absolute inset-0 overflow-hidden",
|
|
23
|
+
// Clip the filled overlay to the fill fraction (0, 0.5, or 1). The
|
|
24
|
+
// outline underneath shows through for the unfilled remainder.
|
|
25
|
+
style: { width: `${clamp(fill, 0, 1) * 100}%` }, children: _jsx(Star, { "aria-hidden": "true", className: "fill-warning text-warning transition-[color,transform] duration-150 ease-[var(--ease-out-quart)]" }) })] }));
|
|
26
|
+
}
|
|
27
|
+
export const Rating = forwardRef(({ value: valueProp, defaultValue = 0, onValueChange, max = 5, readOnly = false, allowHalf = false, size = "md", className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }, ref) => {
|
|
28
|
+
const isControlled = valueProp !== undefined;
|
|
29
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
30
|
+
const value = clamp(isControlled ? valueProp : uncontrolledValue, 0, max);
|
|
31
|
+
// Hover preview overrides the displayed value while pointing at the stars
|
|
32
|
+
// (interactive only); `null` means "show the committed value".
|
|
33
|
+
const [hoverValue, setHoverValue] = useState(null);
|
|
34
|
+
const interactive = !readOnly;
|
|
35
|
+
const step = allowHalf ? 0.5 : 1;
|
|
36
|
+
const labelId = useId();
|
|
37
|
+
const commit = useCallback((next) => {
|
|
38
|
+
const clamped = clamp(next, 0, max);
|
|
39
|
+
if (!isControlled)
|
|
40
|
+
setUncontrolledValue(clamped);
|
|
41
|
+
onValueChange?.(clamped);
|
|
42
|
+
}, [isControlled, max, onValueChange]);
|
|
43
|
+
// Resolve the value a pointer event targets: the star's 1-based index, or
|
|
44
|
+
// its half when `allowHalf` and the pointer sits on the star's left edge.
|
|
45
|
+
// Typed as MouseEvent so both onClick and onPointerMove (a PointerEvent,
|
|
46
|
+
// which extends MouseEvent) can share it.
|
|
47
|
+
const valueFromPointer = useCallback((event, index) => {
|
|
48
|
+
if (!allowHalf)
|
|
49
|
+
return index + 1;
|
|
50
|
+
const { left, width } = event.currentTarget.getBoundingClientRect();
|
|
51
|
+
const isLeftHalf = event.clientX - left < width / 2;
|
|
52
|
+
return isLeftHalf ? index + 0.5 : index + 1;
|
|
53
|
+
}, [allowHalf]);
|
|
54
|
+
const handleKeyDown = useCallback((event) => {
|
|
55
|
+
if (!interactive)
|
|
56
|
+
return;
|
|
57
|
+
let next = null;
|
|
58
|
+
switch (event.key) {
|
|
59
|
+
case "ArrowRight":
|
|
60
|
+
case "ArrowUp":
|
|
61
|
+
next = value + step;
|
|
62
|
+
break;
|
|
63
|
+
case "ArrowLeft":
|
|
64
|
+
case "ArrowDown":
|
|
65
|
+
next = value - step;
|
|
66
|
+
break;
|
|
67
|
+
case "Home":
|
|
68
|
+
next = 0;
|
|
69
|
+
break;
|
|
70
|
+
case "End":
|
|
71
|
+
next = max;
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
commit(clamp(next, 0, max));
|
|
78
|
+
}, [interactive, value, step, max, commit]);
|
|
79
|
+
// What each star renders: hover preview when present, else the value.
|
|
80
|
+
const displayValue = hoverValue ?? value;
|
|
81
|
+
const valueText = `${value} out of ${max}`;
|
|
82
|
+
const stars = Array.from({ length: max }, (_, index) => {
|
|
83
|
+
const fill = clamp(displayValue - index, 0, 1);
|
|
84
|
+
if (!interactive) {
|
|
85
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: stars are positional and fixed in count
|
|
86
|
+
return _jsx(StarIcon, { fill: fill }, index);
|
|
87
|
+
}
|
|
88
|
+
return (_jsx("span", { "aria-hidden": "true", "data-slot": "rating-item", className: "inline-flex cursor-pointer transition-transform duration-150 ease-[var(--ease-out-quart)] hover:scale-110", onClick: (event) => commit(valueFromPointer(event, index)), onPointerMove: (event) => setHoverValue(valueFromPointer(event, index)), children: _jsx(StarIcon, { fill: fill }) }, index));
|
|
89
|
+
});
|
|
90
|
+
return (_jsxs("div", { ref: ref, "data-slot": "rating", role: "slider", tabIndex: interactive ? 0 : -1, "aria-label": ariaLabelledby ? undefined : ariaLabel, "aria-labelledby": ariaLabelledby ?? (ariaLabel ? undefined : labelId), "aria-valuemin": 0, "aria-valuemax": max, "aria-valuenow": value, "aria-valuetext": valueText, "aria-readonly": readOnly || undefined, "data-readonly": readOnly ? "" : undefined, className: cn(ratingVariants({ size }), interactive &&
|
|
91
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-base rounded-md", className), onKeyDown: handleKeyDown, onPointerLeave: interactive ? () => setHoverValue(null) : undefined, ...props, children: [!ariaLabel && !ariaLabelledby ? (_jsx("span", { id: labelId, className: "sr-only", children: "Rating" })) : null, stars] }));
|
|
92
|
+
});
|
|
93
|
+
Rating.displayName = "Rating";
|
|
94
|
+
//# sourceMappingURL=rating.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import { PanelResizeHandle as ResizablePrimitiveHandle, PanelGroup as ResizablePrimitivePanelGroup } from "react-resizable-panels";
|
|
3
|
+
/**
|
|
4
|
+
* Resizable layout primitives — a thin, themed wrapper over
|
|
5
|
+
* [`react-resizable-panels`](https://github.com/bvaughn/react-resizable-panels).
|
|
6
|
+
*
|
|
7
|
+
* The API mirrors shadcn's `resizable` so existing muscle memory carries over,
|
|
8
|
+
* but every surface wears Cronus design tokens and a `data-slot` hook. Compose
|
|
9
|
+
* {@link ResizablePanelGroup} → {@link ResizablePanel} → {@link ResizableHandle}.
|
|
10
|
+
* The group `direction` drives both axes (`"horizontal"` / `"vertical"`); the
|
|
11
|
+
* handle reads it back off `[data-panel-group-direction]` to orient itself.
|
|
12
|
+
*
|
|
13
|
+
* Imperative refs are forwarded by the underlying library (the group accepts an
|
|
14
|
+
* `ImperativePanelGroupHandle`, each panel an `ImperativePanelHandle`) — pass a
|
|
15
|
+
* `ref` straight through and it lands on the primitive unchanged.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ResizablePanelGroup({ className, ...props }: ComponentProps<typeof ResizablePrimitivePanelGroup>): import("react").JSX.Element;
|
|
18
|
+
export declare namespace ResizablePanelGroup {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A single resizable region. Re-exports the underlying `Panel` so the full
|
|
23
|
+
* imperative API (`defaultSize`, `minSize`, `collapsible`, `onResize`, the
|
|
24
|
+
* `ImperativePanelHandle` ref, …) is available unchanged.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLMapElement | HTMLAnchorElement | HTMLButtonElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
27
|
+
className?: string | undefined;
|
|
28
|
+
collapsedSize?: number | undefined;
|
|
29
|
+
collapsible?: boolean | undefined;
|
|
30
|
+
defaultSize?: number | undefined;
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
maxSize?: number | undefined;
|
|
33
|
+
minSize?: number | undefined;
|
|
34
|
+
onCollapse?: import("react-resizable-panels").PanelOnCollapse | undefined;
|
|
35
|
+
onExpand?: import("react-resizable-panels").PanelOnExpand | undefined;
|
|
36
|
+
onResize?: import("react-resizable-panels").PanelOnResize | undefined;
|
|
37
|
+
order?: number | undefined;
|
|
38
|
+
style?: object | undefined;
|
|
39
|
+
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
40
|
+
} & {
|
|
41
|
+
children?: import("react").ReactNode;
|
|
42
|
+
} & import("react").RefAttributes<import("react-resizable-panels").ImperativePanelHandle>>;
|
|
43
|
+
export interface ResizableHandleProps extends ComponentProps<typeof ResizablePrimitiveHandle> {
|
|
44
|
+
/** Render a centered grip affordance on the divider. Defaults to `false`. */
|
|
45
|
+
withHandle?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The draggable divider between two panels. Renders a hairline `bg-border`
|
|
49
|
+
* track that brightens to `ring-ring` on hover/keyboard focus, flips its
|
|
50
|
+
* geometry for vertical groups, and — when `withHandle` is set — hosts a small
|
|
51
|
+
* rounded grip with a {@link GripVertical} glyph for a clearer drag target.
|
|
52
|
+
*/
|
|
53
|
+
export declare function ResizableHandle({ withHandle, className, id: idFromProps, ...props }: ResizableHandleProps): import("react").JSX.Element;
|
|
54
|
+
export declare namespace ResizableHandle {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=resizable.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { GripVertical } from "lucide-react";
|
|
4
|
+
import { useId, useLayoutEffect } from "react";
|
|
5
|
+
import { PanelResizeHandle as ResizablePrimitiveHandle, Panel as ResizablePrimitivePanel, PanelGroup as ResizablePrimitivePanelGroup, } from "react-resizable-panels";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
7
|
+
const VALUE_ATTRS = ["aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
8
|
+
function ensureSplitterValues(el) {
|
|
9
|
+
if (!el.getAttribute("aria-valuenow"))
|
|
10
|
+
el.setAttribute("aria-valuenow", "50");
|
|
11
|
+
if (!el.getAttribute("aria-valuemin"))
|
|
12
|
+
el.setAttribute("aria-valuemin", "0");
|
|
13
|
+
if (!el.getAttribute("aria-valuemax"))
|
|
14
|
+
el.setAttribute("aria-valuemax", "100");
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resizable layout primitives — a thin, themed wrapper over
|
|
18
|
+
* [`react-resizable-panels`](https://github.com/bvaughn/react-resizable-panels).
|
|
19
|
+
*
|
|
20
|
+
* The API mirrors shadcn's `resizable` so existing muscle memory carries over,
|
|
21
|
+
* but every surface wears Cronus design tokens and a `data-slot` hook. Compose
|
|
22
|
+
* {@link ResizablePanelGroup} → {@link ResizablePanel} → {@link ResizableHandle}.
|
|
23
|
+
* The group `direction` drives both axes (`"horizontal"` / `"vertical"`); the
|
|
24
|
+
* handle reads it back off `[data-panel-group-direction]` to orient itself.
|
|
25
|
+
*
|
|
26
|
+
* Imperative refs are forwarded by the underlying library (the group accepts an
|
|
27
|
+
* `ImperativePanelGroupHandle`, each panel an `ImperativePanelHandle`) — pass a
|
|
28
|
+
* `ref` straight through and it lands on the primitive unchanged.
|
|
29
|
+
*/
|
|
30
|
+
export function ResizablePanelGroup({ className, ...props }) {
|
|
31
|
+
return (_jsx(ResizablePrimitivePanelGroup, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
ResizablePanelGroup.displayName = "ResizablePanelGroup";
|
|
34
|
+
/**
|
|
35
|
+
* A single resizable region. Re-exports the underlying `Panel` so the full
|
|
36
|
+
* imperative API (`defaultSize`, `minSize`, `collapsible`, `onResize`, the
|
|
37
|
+
* `ImperativePanelHandle` ref, …) is available unchanged.
|
|
38
|
+
*/
|
|
39
|
+
export const ResizablePanel = ResizablePrimitivePanel;
|
|
40
|
+
/**
|
|
41
|
+
* The draggable divider between two panels. Renders a hairline `bg-border`
|
|
42
|
+
* track that brightens to `ring-ring` on hover/keyboard focus, flips its
|
|
43
|
+
* geometry for vertical groups, and — when `withHandle` is set — hosts a small
|
|
44
|
+
* rounded grip with a {@link GripVertical} glyph for a clearer drag target.
|
|
45
|
+
*/
|
|
46
|
+
export function ResizableHandle({ withHandle = false, className, id: idFromProps, ...props }) {
|
|
47
|
+
const generatedId = useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
48
|
+
const handleId = idFromProps ?? `cronus-rh-${generatedId}`;
|
|
49
|
+
// react-resizable-panels paints role="separator" immediately but only writes
|
|
50
|
+
// aria-valuenow after it measures layout — and its effect cleanup removes
|
|
51
|
+
// the attributes between updates. Keep a numeric value on the splitter so
|
|
52
|
+
// axe (and AT) never see a separator without aria-valuenow.
|
|
53
|
+
useLayoutEffect(() => {
|
|
54
|
+
const el = document.querySelector(`[data-panel-resize-handle-id="${CSS.escape(handleId)}"]`);
|
|
55
|
+
if (!el)
|
|
56
|
+
return;
|
|
57
|
+
ensureSplitterValues(el);
|
|
58
|
+
const mo = new MutationObserver(() => ensureSplitterValues(el));
|
|
59
|
+
mo.observe(el, { attributes: true, attributeFilter: [...VALUE_ATTRS] });
|
|
60
|
+
return () => mo.disconnect();
|
|
61
|
+
}, [handleId]);
|
|
62
|
+
return (_jsx(ResizablePrimitiveHandle, { id: handleId, "data-slot": "resizable-handle", className: cn(
|
|
63
|
+
// Base divider: a 1px line that owns a small hit area via flex centering.
|
|
64
|
+
"relative flex w-px items-center justify-center bg-border", "transition-colors duration-150 ease-[var(--ease-out-quart)]",
|
|
65
|
+
// The actual interactive band straddles the line so it is easy to grab.
|
|
66
|
+
"after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",
|
|
67
|
+
// Highlight on hover + keyboard focus with the focus-ring colour.
|
|
68
|
+
"hover:bg-ring focus-visible:bg-ring", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", "data-[resize-handle-state=drag]:bg-ring",
|
|
69
|
+
// Vertical groups: rotate the geometry (full width, 1px tall, grip turned).
|
|
70
|
+
"data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full", "data-[panel-group-direction=vertical]:after:inset-x-0 data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:top-1/2 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0", "[&[data-panel-group-direction=vertical]>div]:rotate-90", className), ...props, children: withHandle ? (_jsx("div", { "data-slot": "resizable-handle-grip", "aria-hidden": "true", className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border bg-surface-floating text-fg-tertiary shadow-xs", children: _jsx(GripVertical, { className: "size-2.5" }) })) : null }));
|
|
71
|
+
}
|
|
72
|
+
ResizableHandle.displayName = "ResizableHandle";
|
|
73
|
+
//# sourceMappingURL=resizable.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes, Ref } from "react";
|
|
2
|
+
export interface RetroGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
ref?: Ref<HTMLDivElement>;
|
|
4
|
+
/**
|
|
5
|
+
* Seconds for one floor-scroll cycle.
|
|
6
|
+
* @default 8
|
|
7
|
+
*/
|
|
8
|
+
duration?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Perspective tilt of the floor, in degrees.
|
|
11
|
+
* @default 60
|
|
12
|
+
*/
|
|
13
|
+
angle?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A receding perspective grid floor — the synthwave stage behind a hero.
|
|
17
|
+
* Scrolls slowly toward the horizon and is fully suppressed under
|
|
18
|
+
* `prefers-reduced-motion: reduce` (the floor still renders, it just stops
|
|
19
|
+
* moving).
|
|
20
|
+
*/
|
|
21
|
+
export declare function RetroGrid({ ref, className, children, duration, angle, style, ...props }: RetroGridProps): import("react").JSX.Element;
|
|
22
|
+
export declare namespace RetroGrid {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=retro-grid.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
const RETRO_KEYFRAMES = "@keyframes cronus-retro-grid{from{transform:translateY(0)}to{transform:translateY(var(--retro-cell,48px))}}";
|
|
4
|
+
function finiteOr(value, fallback) {
|
|
5
|
+
return Number.isFinite(value) ? value : fallback;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A receding perspective grid floor — the synthwave stage behind a hero.
|
|
9
|
+
* Scrolls slowly toward the horizon and is fully suppressed under
|
|
10
|
+
* `prefers-reduced-motion: reduce` (the floor still renders, it just stops
|
|
11
|
+
* moving).
|
|
12
|
+
*/
|
|
13
|
+
export function RetroGrid({ ref, className, children, duration = 8, angle = 60, style, ...props }) {
|
|
14
|
+
const cycle = Math.max(1, finiteOr(duration, 8));
|
|
15
|
+
const tilt = finiteOr(angle, 60);
|
|
16
|
+
const gridStyle = {
|
|
17
|
+
"--retro-duration": `${cycle}s`,
|
|
18
|
+
perspective: "240px",
|
|
19
|
+
};
|
|
20
|
+
return (_jsxs("div", { ref: ref, "data-slot": "retro-grid", className: cn("relative overflow-hidden", className), style: { ...gridStyle, ...style }, ...props, children: [_jsxs("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 overflow-hidden [mask-image:linear-gradient(to_bottom,transparent,black_20%,black_70%,transparent)]", children: [_jsx("style", { children: RETRO_KEYFRAMES }), _jsx("div", { className: "absolute inset-x-0 -bottom-1/2 h-[200%] origin-[50%_0%] motion-reduce:[animation-name:none]", style: { transform: `rotateX(${tilt}deg)` }, children: _jsx("div", { className: "absolute inset-0 [animation-duration:var(--retro-duration)] [animation-iteration-count:infinite] [animation-name:cronus-retro-grid] [animation-timing-function:linear] motion-reduce:[animation-name:none]", style: {
|
|
21
|
+
backgroundImage: "linear-gradient(to right, color-mix(in oklch, var(--cronus-border) 70%, transparent) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in oklch, var(--cronus-border) 70%, transparent) 1px, transparent 1px)",
|
|
22
|
+
backgroundSize: "48px 48px",
|
|
23
|
+
} }) })] }), _jsx("div", { className: "relative", children: children })] }));
|
|
24
|
+
}
|
|
25
|
+
RetroGrid.displayName = "RetroGrid";
|
|
26
|
+
//# sourceMappingURL=retro-grid.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface RevealProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
delay?: number;
|
|
3
|
+
once?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const Reveal: {
|
|
6
|
+
({ className, delay, once, children, onDrag, onDragStart, onDragEnd, onAnimationStart, ...props }: RevealProps): import("react").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=reveal.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useInView } from "motion/react";
|
|
4
|
+
import { useRef } from "react";
|
|
5
|
+
import { fadeInUp } from "./motion-presets.js";
|
|
6
|
+
export const Reveal = ({ className, delay, once, children,
|
|
7
|
+
// omit handlers that clash with motion's prop signatures
|
|
8
|
+
onDrag, onDragStart, onDragEnd, onAnimationStart, ...props }) => {
|
|
9
|
+
const ref = useRef(null);
|
|
10
|
+
const inView = useInView(ref, { once: once ?? true, margin: "-80px" });
|
|
11
|
+
return (_jsx(motion.div, { ref: ref, "data-slot": "reveal", initial: "hidden", animate: inView ? "visible" : "hidden", variants: fadeInUp, transition: { delay }, className: className, ...props, children: children }));
|
|
12
|
+
};
|
|
13
|
+
Reveal.displayName = "Reveal";
|
|
14
|
+
//# sourceMappingURL=reveal.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface RichTextEditorProps {
|
|
2
|
+
/** Controlled HTML value. When provided, external changes are synced into the editor. */
|
|
3
|
+
value?: string;
|
|
4
|
+
/** Uncontrolled initial HTML content. Ignored once the editor has mounted. */
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
/** Called with the serialized HTML whenever the document changes. */
|
|
7
|
+
onChange?: (html: string) => void;
|
|
8
|
+
/** Placeholder shown while the document is empty. */
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
/** Whether the content is editable. Defaults to `true`. */
|
|
11
|
+
editable?: boolean;
|
|
12
|
+
/** Extra classes for the editor shell (toolbar + content wrapper). */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Accessible label for the editable region. */
|
|
15
|
+
"aria-label"?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A Tiptap-based WYSIWYG editor with a Cronus-styled formatting toolbar.
|
|
19
|
+
*
|
|
20
|
+
* SSR: `immediatelyRender: false` keeps Tiptap from rendering on the server, so
|
|
21
|
+
* Next.js (and other SSR setups) hydrate without a mismatch. Until the editor
|
|
22
|
+
* mounts on the client, the toolbar renders disabled.
|
|
23
|
+
*
|
|
24
|
+
* Placeholder: implemented with a token-styled overlay driven by the editor's
|
|
25
|
+
* empty state (no extra Tiptap extension, no new dependency).
|
|
26
|
+
*/
|
|
27
|
+
export declare const RichTextEditor: import("react").ForwardRefExoticComponent<RichTextEditorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
//# sourceMappingURL=rich-text-editor.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { EditorContent, useEditor } from "@tiptap/react";
|
|
4
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
5
|
+
import { Bold, Code, Heading1, Heading2, Heading3, Italic, List, ListOrdered, Minus, Quote, Redo2, SquareCode, Strikethrough, Undo2, } from "lucide-react";
|
|
6
|
+
import { forwardRef, useCallback, useEffect, useState } from "react";
|
|
7
|
+
import { cn } from "../lib/cn.js";
|
|
8
|
+
import { Separator } from "./separator.js";
|
|
9
|
+
import { Toggle } from "./toggle.js";
|
|
10
|
+
function ToolbarButton({ label, icon, onClick, active = false, disabled = false, }) {
|
|
11
|
+
return (_jsx(Toggle, { type: "button", size: "sm", className: "size-8 px-0", "aria-label": label, pressed: active, disabled: disabled,
|
|
12
|
+
// Prevent the editor from losing its selection on mousedown so commands
|
|
13
|
+
// act on the current range rather than a collapsed one.
|
|
14
|
+
onMouseDown: (event) => event.preventDefault(), onPressedChange: onClick, children: icon }));
|
|
15
|
+
}
|
|
16
|
+
/** The formatting toolbar. Rendered disabled until the editor instance exists. */
|
|
17
|
+
function Toolbar({ editor }) {
|
|
18
|
+
// Re-render the toolbar on every editor transaction so active/disabled states
|
|
19
|
+
// stay in sync with the current selection.
|
|
20
|
+
const [, forceRender] = useState(0);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!editor)
|
|
23
|
+
return;
|
|
24
|
+
const update = () => forceRender((n) => n + 1);
|
|
25
|
+
editor.on("transaction", update);
|
|
26
|
+
return () => {
|
|
27
|
+
editor.off("transaction", update);
|
|
28
|
+
};
|
|
29
|
+
}, [editor]);
|
|
30
|
+
const ready = editor?.isEditable ?? false;
|
|
31
|
+
return (_jsxs("div", { "data-slot": "rich-text-editor-toolbar", role: "toolbar", "aria-label": "Text formatting", "aria-controls": "rich-text-editor-content", className: "flex flex-wrap items-center gap-0.5 border-border border-b bg-surface-overlay/40 p-1.5", children: [_jsx(ToolbarButton, { label: "Bold", icon: _jsx(Bold, {}), active: !!editor?.isActive("bold"), disabled: !ready || !editor?.can().chain().focus().toggleBold().run(), onClick: () => editor?.chain().focus().toggleBold().run() }), _jsx(ToolbarButton, { label: "Italic", icon: _jsx(Italic, {}), active: !!editor?.isActive("italic"), disabled: !ready || !editor?.can().chain().focus().toggleItalic().run(), onClick: () => editor?.chain().focus().toggleItalic().run() }), _jsx(ToolbarButton, { label: "Strikethrough", icon: _jsx(Strikethrough, {}), active: !!editor?.isActive("strike"), disabled: !ready || !editor?.can().chain().focus().toggleStrike().run(), onClick: () => editor?.chain().focus().toggleStrike().run() }), _jsx(ToolbarButton, { label: "Inline code", icon: _jsx(Code, {}), active: !!editor?.isActive("code"), disabled: !ready || !editor?.can().chain().focus().toggleCode().run(), onClick: () => editor?.chain().focus().toggleCode().run() }), _jsx(Separator, { orientation: "vertical", className: "mx-1 h-6" }), _jsx(ToolbarButton, { label: "Heading 1", icon: _jsx(Heading1, {}), active: !!editor?.isActive("heading", { level: 1 }), disabled: !ready, onClick: () => editor?.chain().focus().toggleHeading({ level: 1 }).run() }), _jsx(ToolbarButton, { label: "Heading 2", icon: _jsx(Heading2, {}), active: !!editor?.isActive("heading", { level: 2 }), disabled: !ready, onClick: () => editor?.chain().focus().toggleHeading({ level: 2 }).run() }), _jsx(ToolbarButton, { label: "Heading 3", icon: _jsx(Heading3, {}), active: !!editor?.isActive("heading", { level: 3 }), disabled: !ready, onClick: () => editor?.chain().focus().toggleHeading({ level: 3 }).run() }), _jsx(Separator, { orientation: "vertical", className: "mx-1 h-6" }), _jsx(ToolbarButton, { label: "Bullet list", icon: _jsx(List, {}), active: !!editor?.isActive("bulletList"), disabled: !ready, onClick: () => editor?.chain().focus().toggleBulletList().run() }), _jsx(ToolbarButton, { label: "Ordered list", icon: _jsx(ListOrdered, {}), active: !!editor?.isActive("orderedList"), disabled: !ready, onClick: () => editor?.chain().focus().toggleOrderedList().run() }), _jsx(ToolbarButton, { label: "Blockquote", icon: _jsx(Quote, {}), active: !!editor?.isActive("blockquote"), disabled: !ready, onClick: () => editor?.chain().focus().toggleBlockquote().run() }), _jsx(ToolbarButton, { label: "Code block", icon: _jsx(SquareCode, {}), active: !!editor?.isActive("codeBlock"), disabled: !ready, onClick: () => editor?.chain().focus().toggleCodeBlock().run() }), _jsx(ToolbarButton, { label: "Horizontal rule", icon: _jsx(Minus, {}), disabled: !ready, onClick: () => editor?.chain().focus().setHorizontalRule().run() }), _jsx(Separator, { orientation: "vertical", className: "mx-1 h-6" }), _jsx(ToolbarButton, { label: "Undo", icon: _jsx(Undo2, {}), disabled: !ready || !editor?.can().undo(), onClick: () => editor?.chain().focus().undo().run() }), _jsx(ToolbarButton, { label: "Redo", icon: _jsx(Redo2, {}), disabled: !ready || !editor?.can().redo(), onClick: () => editor?.chain().focus().redo().run() })] }));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A Tiptap-based WYSIWYG editor with a Cronus-styled formatting toolbar.
|
|
35
|
+
*
|
|
36
|
+
* SSR: `immediatelyRender: false` keeps Tiptap from rendering on the server, so
|
|
37
|
+
* Next.js (and other SSR setups) hydrate without a mismatch. Until the editor
|
|
38
|
+
* mounts on the client, the toolbar renders disabled.
|
|
39
|
+
*
|
|
40
|
+
* Placeholder: implemented with a token-styled overlay driven by the editor's
|
|
41
|
+
* empty state (no extra Tiptap extension, no new dependency).
|
|
42
|
+
*/
|
|
43
|
+
export const RichTextEditor = forwardRef(({ value, defaultValue, onChange, placeholder, editable = true, className, "aria-label": ariaLabel, }, ref) => {
|
|
44
|
+
const handleUpdate = useCallback(({ editor }) => {
|
|
45
|
+
onChange?.(editor.getHTML());
|
|
46
|
+
}, [onChange]);
|
|
47
|
+
const editor = useEditor({
|
|
48
|
+
// Critical for SSR: do not render the editor on the server.
|
|
49
|
+
immediatelyRender: false,
|
|
50
|
+
extensions: [StarterKit],
|
|
51
|
+
content: value ?? defaultValue ?? "",
|
|
52
|
+
editable,
|
|
53
|
+
onUpdate: handleUpdate,
|
|
54
|
+
editorProps: {
|
|
55
|
+
attributes: {
|
|
56
|
+
id: "rich-text-editor-content",
|
|
57
|
+
role: "textbox",
|
|
58
|
+
"aria-multiline": "true",
|
|
59
|
+
...(ariaLabel ? { "aria-label": ariaLabel } : {}),
|
|
60
|
+
class: cn("min-h-40 w-full px-4 py-3 text-fg outline-none", "[&_h1]:mt-4 [&_h1]:mb-2 [&_h1]:font-display [&_h1]:font-semibold [&_h1]:text-2xl", "[&_h2]:mt-3 [&_h2]:mb-2 [&_h2]:font-display [&_h2]:font-semibold [&_h2]:text-xl", "[&_h3]:mt-3 [&_h3]:mb-1.5 [&_h3]:font-display [&_h3]:font-semibold [&_h3]:text-lg", "[&_p]:my-2 [&_p:first-child]:mt-0", "[&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-6", "[&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-6", "[&_li]:my-0.5", "[&_a]:text-primary-strong [&_a]:underline [&_a]:underline-offset-4", "[&_blockquote]:my-3 [&_blockquote]:border-border [&_blockquote]:border-l-2 [&_blockquote]:pl-4 [&_blockquote]:text-fg-secondary [&_blockquote]:italic", "[&_code]:rounded [&_code]:bg-surface-overlay [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-sm", "[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-surface-overlay [&_pre]:p-4 [&_pre]:font-mono [&_pre]:text-sm", "[&_pre_code]:bg-transparent [&_pre_code]:p-0", "[&_hr]:my-4 [&_hr]:border-border"),
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
// Sync external (controlled) value changes into the editor without firing
|
|
65
|
+
// onChange back out (emitUpdate: false avoids an update→onChange loop).
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!editor || value === undefined)
|
|
68
|
+
return;
|
|
69
|
+
if (value !== editor.getHTML()) {
|
|
70
|
+
editor.commands.setContent(value, { emitUpdate: false });
|
|
71
|
+
}
|
|
72
|
+
}, [editor, value]);
|
|
73
|
+
// Keep the editable flag in sync if it changes after mount.
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (editor && editor.isEditable !== editable) {
|
|
76
|
+
editor.setEditable(editable);
|
|
77
|
+
}
|
|
78
|
+
}, [editor, editable]);
|
|
79
|
+
const showPlaceholder = Boolean(placeholder) && (editor?.isEmpty ?? false);
|
|
80
|
+
return (_jsxs("div", { ref: ref, "data-slot": "rich-text-editor", className: cn("flex w-full min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-surface-base text-fg", "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-surface-base", className), children: [_jsx(Toolbar, { editor: editor }), _jsxs("div", { "data-slot": "rich-text-editor-content-wrapper", className: "relative", children: [showPlaceholder ? (_jsx("p", { "aria-hidden": "true", "data-slot": "rich-text-editor-placeholder", className: "pointer-events-none absolute top-3 left-4 select-none text-fg-muted", children: placeholder })) : null, _jsx(EditorContent, { editor: editor })] })] }));
|
|
81
|
+
});
|
|
82
|
+
RichTextEditor.displayName = "RichTextEditor";
|
|
83
|
+
//# sourceMappingURL=rich-text-editor.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import { type ChartSeries } from "./chart.js";
|
|
3
|
+
export interface RingChartItem {
|
|
4
|
+
key: string;
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
7
|
+
export interface RingChartProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
data: RingChartItem[];
|
|
9
|
+
series: ChartSeries[];
|
|
10
|
+
centerLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function RingChart({ data, series, centerLabel, className, ...props }: RingChartProps): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ring-chart.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Cell, Label, Pie, PieChart } from "recharts";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { ChartContainer, ChartTooltip, ChartTooltipContent, chartSeriesConfig, } from "./chart.js";
|
|
5
|
+
const TOTAL = new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 });
|
|
6
|
+
export function RingChart({ data, series, centerLabel = "Total", className, ...props }) {
|
|
7
|
+
const config = chartSeriesConfig(series);
|
|
8
|
+
const rows = data.map((item) => ({ ...item, fill: `var(--color-${item.key})` }));
|
|
9
|
+
const sum = data.reduce((acc, item) => acc + item.value, 0);
|
|
10
|
+
return (_jsx("div", { "data-slot": "ring-chart", className: cn("h-64 w-full", className), ...props, children: _jsx(ChartContainer, { config: config, className: "h-full w-full", children: _jsxs(PieChart, { accessibilityLayer: true, children: [_jsx(ChartTooltip, { content: _jsx(ChartTooltipContent, { hideLabel: true }) }), _jsxs(Pie, { data: rows, dataKey: "value", nameKey: "key", innerRadius: 64, outerRadius: 98, paddingAngle: 3, strokeWidth: 0, children: [rows.map((item) => (_jsx(Cell, { fill: item.fill }, item.key))), _jsx(Label, { content: ({ viewBox }) => {
|
|
11
|
+
if (!viewBox || !("cx" in viewBox) || !("cy" in viewBox))
|
|
12
|
+
return null;
|
|
13
|
+
return (_jsxs("text", { x: viewBox.cx, y: viewBox.cy, textAnchor: "middle", dominantBaseline: "middle", children: [_jsx("tspan", { x: viewBox.cx, y: viewBox.cy, className: "fill-fg text-2xl font-medium", children: TOTAL.format(sum) }), _jsx("tspan", { x: viewBox.cx, y: (viewBox.cy ?? 0) + 20, className: "fill-fg-tertiary text-xs", children: centerLabel })] }));
|
|
14
|
+
} })] })] }) }) }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ring-chart.js.map
|