@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,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
export const Textarea = forwardRef(({ className, invalid = false, "aria-invalid": ariaInvalid, ...props }, ref) => {
|
|
5
|
+
return (_jsx("textarea", { ref: ref, "data-slot": "textarea", "aria-invalid": invalid ? true : ariaInvalid, className: cn("field-sizing-content min-h-20 w-full resize-y rounded-lg border border-border bg-surface-inset px-3 py-2 text-sm text-fg", "placeholder:text-fg-tertiary", "transition-[border-color,box-shadow] duration-150 ease-[var(--ease-out-quart)]", "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", "selection:bg-primary selection:text-primary-foreground", "aria-invalid:border-error aria-invalid:ring-2 aria-invalid:ring-error/30", invalid && "border-error focus-visible:ring-error focus-visible:ring-offset-surface-base", className), ...props }));
|
|
6
|
+
});
|
|
7
|
+
Textarea.displayName = "Textarea";
|
|
8
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A card that tilts in 3D toward the pointer. The pointer position is mapped to a
|
|
4
|
+
* pair of rotations and written straight to the DOM via CSS custom properties
|
|
5
|
+
* (`--tilt-rx` / `--tilt-ry`, plus `--tilt-gx` / `--tilt-gy` for the glare) inside
|
|
6
|
+
* a single `requestAnimationFrame` — moving the pointer therefore never triggers a
|
|
7
|
+
* React re-render; the compositor recomputes the transform. A short
|
|
8
|
+
* `transition-transform` smooths the follow and eases the card back to flat on
|
|
9
|
+
* leave. Hover zoom and the glare sheen are toggled with a `data-tilting`
|
|
10
|
+
* attribute (CSS-driven). Unlike `SpotlightCard` (a flat radial glow), this is a
|
|
11
|
+
* real perspective transform with optional depth parallax.
|
|
12
|
+
*
|
|
13
|
+
* Performance: no state updates on `mousemove`; the pending frame is cancelled on
|
|
14
|
+
* every move, on leave, and on unmount. Accessibility: the effect is purely
|
|
15
|
+
* decorative — the card is not a control, keeps its natural focus/reading order,
|
|
16
|
+
* and is fully neutralised under `prefers-reduced-motion: reduce` (the transform
|
|
17
|
+
* is forced to `none` and the glare is hidden).
|
|
18
|
+
*/
|
|
19
|
+
export interface TiltCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
20
|
+
/** Maximum rotation, in degrees, reached on each axis at the card's edges. Higher feels more dramatic. @default 12 */
|
|
21
|
+
maxTilt?: number;
|
|
22
|
+
/** Render a soft pointer-following glare sheen across the surface. @default false */
|
|
23
|
+
glare?: boolean;
|
|
24
|
+
/** Uniform zoom applied while the pointer is over the card (`1` = none). @default 1.03 */
|
|
25
|
+
scale?: number;
|
|
26
|
+
/** Lift the content toward the viewer on hover for a layered parallax depth effect. @default false */
|
|
27
|
+
parallax?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare const TiltCard: import("react").ForwardRefExoticComponent<TiltCardProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
+
//# sourceMappingURL=tilt-card.d.ts.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useCallback, useEffect, useRef } from "react";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
const prefersReducedMotion = () => typeof window !== "undefined" &&
|
|
6
|
+
typeof window.matchMedia === "function" &&
|
|
7
|
+
window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
8
|
+
export const TiltCard = forwardRef(({ maxTilt = 12, glare = false, scale = 1.03, parallax = false, className, style, children, onMouseMove, onMouseEnter, onMouseLeave, ...props }, ref) => {
|
|
9
|
+
const localRef = useRef(null);
|
|
10
|
+
const frameRef = useRef(null);
|
|
11
|
+
const setRef = useCallback((node) => {
|
|
12
|
+
localRef.current = node;
|
|
13
|
+
if (typeof ref === "function") {
|
|
14
|
+
ref(node);
|
|
15
|
+
}
|
|
16
|
+
else if (ref) {
|
|
17
|
+
ref.current = node;
|
|
18
|
+
}
|
|
19
|
+
}, [ref]);
|
|
20
|
+
const handleMouseMove = useCallback((event) => {
|
|
21
|
+
const node = localRef.current;
|
|
22
|
+
if (node && !prefersReducedMotion()) {
|
|
23
|
+
const clientX = event.clientX;
|
|
24
|
+
const clientY = event.clientY;
|
|
25
|
+
if (frameRef.current !== null) {
|
|
26
|
+
cancelAnimationFrame(frameRef.current);
|
|
27
|
+
}
|
|
28
|
+
frameRef.current = requestAnimationFrame(() => {
|
|
29
|
+
frameRef.current = null;
|
|
30
|
+
const current = localRef.current;
|
|
31
|
+
if (!current) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const rect = current.getBoundingClientRect();
|
|
35
|
+
// Normalise pointer to 0..1 within the card, then clamp so a fast
|
|
36
|
+
// pointer that overshoots the bounds can't exceed maxTilt.
|
|
37
|
+
const px = Math.min(Math.max((clientX - rect.left) / rect.width, 0), 1);
|
|
38
|
+
const py = Math.min(Math.max((clientY - rect.top) / rect.height, 0), 1);
|
|
39
|
+
current.style.setProperty("--tilt-ry", `${(px - 0.5) * 2 * maxTilt}deg`);
|
|
40
|
+
current.style.setProperty("--tilt-rx", `${(0.5 - py) * 2 * maxTilt}deg`);
|
|
41
|
+
current.style.setProperty("--tilt-gx", `${px * 100}%`);
|
|
42
|
+
current.style.setProperty("--tilt-gy", `${py * 100}%`);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
onMouseMove?.(event);
|
|
46
|
+
}, [maxTilt, onMouseMove]);
|
|
47
|
+
const handleMouseEnter = useCallback((event) => {
|
|
48
|
+
const node = localRef.current;
|
|
49
|
+
if (node && !prefersReducedMotion()) {
|
|
50
|
+
node.style.setProperty("--tilt-scale", String(scale));
|
|
51
|
+
node.setAttribute("data-tilting", "true");
|
|
52
|
+
}
|
|
53
|
+
onMouseEnter?.(event);
|
|
54
|
+
}, [scale, onMouseEnter]);
|
|
55
|
+
const handleMouseLeave = useCallback((event) => {
|
|
56
|
+
if (frameRef.current !== null) {
|
|
57
|
+
cancelAnimationFrame(frameRef.current);
|
|
58
|
+
frameRef.current = null;
|
|
59
|
+
}
|
|
60
|
+
const node = localRef.current;
|
|
61
|
+
if (node) {
|
|
62
|
+
node.style.setProperty("--tilt-rx", "0deg");
|
|
63
|
+
node.style.setProperty("--tilt-ry", "0deg");
|
|
64
|
+
node.style.setProperty("--tilt-scale", "1");
|
|
65
|
+
node.removeAttribute("data-tilting");
|
|
66
|
+
}
|
|
67
|
+
onMouseLeave?.(event);
|
|
68
|
+
}, [onMouseLeave]);
|
|
69
|
+
// Cancel any in-flight frame if the card unmounts mid-tilt.
|
|
70
|
+
useEffect(() => () => {
|
|
71
|
+
if (frameRef.current !== null) {
|
|
72
|
+
cancelAnimationFrame(frameRef.current);
|
|
73
|
+
}
|
|
74
|
+
}, []);
|
|
75
|
+
return (_jsxs("div", { ref: setRef, "data-slot": "tilt-card", className: cn("group relative rounded-2xl border border-border bg-surface-raised p-6 text-fg shadow-sm", "[transform-style:preserve-3d] transition-[transform,box-shadow] duration-150 ease-out will-change-transform", "group-data-[tilting]:shadow-lg data-[tilting]:shadow-lg", "motion-reduce:transition-none motion-reduce:!transform-none", className), style: {
|
|
76
|
+
transform: "perspective(1000px) rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg)) scale(var(--tilt-scale, 1))",
|
|
77
|
+
...style,
|
|
78
|
+
}, onMouseMove: handleMouseMove, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: [glare ? (_jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 z-10 overflow-hidden rounded-[inherit] opacity-0 transition-opacity duration-300 group-data-[tilting]:opacity-100 motion-reduce:hidden motion-reduce:transition-none", style: {
|
|
79
|
+
background: "radial-gradient(600px circle at var(--tilt-gx, 50%) var(--tilt-gy, 50%), color-mix(in oklch, var(--cronus-fg) 16%, transparent), transparent 60%)",
|
|
80
|
+
} })) : null, _jsx("div", { className: cn("relative", parallax &&
|
|
81
|
+
"[transform:translateZ(0)] transition-transform duration-150 ease-out group-data-[tilting]:[transform:translateZ(42px)] motion-reduce:!transform-none"), children: children })] }));
|
|
82
|
+
});
|
|
83
|
+
TiltCard.displayName = "TiltCard";
|
|
84
|
+
//# sourceMappingURL=tilt-card.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A time picker that pairs a `Button` trigger (Clock icon + formatted value) with
|
|
3
|
+
* a `Popover` holding scrollable hour / minute (and optional second) columns.
|
|
4
|
+
*
|
|
5
|
+
* - **Value model**: controlled or uncontrolled via a `{ hours, minutes, seconds }`
|
|
6
|
+
* object (24-hour `hours`) or a `"HH:mm"` / `"HH:mm:ss"` string; `onChange`
|
|
7
|
+
* always emits the normalized object.
|
|
8
|
+
* - **12h / 24h**: `hourCycle` swaps a 0–23 hour column for a 1–12 column plus an
|
|
9
|
+
* AM/PM column. `minuteStep` / `secondStep` set each column's granularity.
|
|
10
|
+
* - **Keyboard**: each column is an ARIA `listbox` — Arrow Up/Down (wrapping),
|
|
11
|
+
* Home/End, PageUp/PageDown, type digits to jump to a value, and Enter to
|
|
12
|
+
* confirm & close. Selection is committed on move/click; focus roves between
|
|
13
|
+
* columns with Tab.
|
|
14
|
+
* - **Performance / a11y**: the active option is centered with `scrollIntoView`
|
|
15
|
+
* (instant on open, smooth after — and always instant under
|
|
16
|
+
* `prefers-reduced-motion: reduce`); the type-to-jump buffer's only timer is
|
|
17
|
+
* cleared on unmount. No `setState` runs on scroll.
|
|
18
|
+
*/
|
|
19
|
+
export interface TimeValue {
|
|
20
|
+
/** Hours in 24-hour form, 0–23. */
|
|
21
|
+
hours: number;
|
|
22
|
+
/** Minutes, 0–59. */
|
|
23
|
+
minutes: number;
|
|
24
|
+
/** Seconds, 0–59 (only surfaced when `showSeconds` is set). */
|
|
25
|
+
seconds?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface TimePickerProps {
|
|
28
|
+
/** Controlled value — a `{ hours, minutes, seconds }` object (24h `hours`) or a `"HH:mm"` / `"HH:mm:ss"` string. */
|
|
29
|
+
value?: TimeValue | string;
|
|
30
|
+
/** Initial value for uncontrolled usage. */
|
|
31
|
+
defaultValue?: TimeValue | string;
|
|
32
|
+
/** Fired with the normalized `{ hours, minutes, seconds }` whenever the time changes. */
|
|
33
|
+
onChange?: (value: TimeValue) => void;
|
|
34
|
+
/** `12` renders a 1–12 hour column plus an AM/PM column; `24` renders a 0–23 column. @default 12 */
|
|
35
|
+
hourCycle?: 12 | 24;
|
|
36
|
+
/** Granularity of the minute column, in minutes. @default 1 */
|
|
37
|
+
minuteStep?: number;
|
|
38
|
+
/** Render a seconds column. @default false */
|
|
39
|
+
showSeconds?: boolean;
|
|
40
|
+
/** Granularity of the seconds column, in seconds. @default 1 */
|
|
41
|
+
secondStep?: number;
|
|
42
|
+
/** Text shown on the trigger when no value is set. @default "Select time" */
|
|
43
|
+
placeholder?: string;
|
|
44
|
+
/** Disable the trigger and the whole panel. */
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/** Accessible name for the trigger when there is no visible label. */
|
|
47
|
+
"aria-label"?: string;
|
|
48
|
+
/** Extra classes for the trigger button. */
|
|
49
|
+
className?: string;
|
|
50
|
+
/** Extra classes for the popover panel. */
|
|
51
|
+
contentClassName?: string;
|
|
52
|
+
/** Native id for the trigger. */
|
|
53
|
+
id?: string;
|
|
54
|
+
/** Popover alignment relative to the trigger. @default "start" */
|
|
55
|
+
align?: "start" | "center" | "end";
|
|
56
|
+
}
|
|
57
|
+
export declare const TimePicker: import("react").ForwardRefExoticComponent<TimePickerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
58
|
+
//# sourceMappingURL=time-picker.d.ts.map
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Clock } from "lucide-react";
|
|
4
|
+
import { forwardRef, useEffect, useId, useRef, useState, } from "react";
|
|
5
|
+
import { cn } from "../lib/cn.js";
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
8
|
+
/** Vertical fade so the scroll columns read like a wheel without fragile spacer math. */
|
|
9
|
+
const COLUMN_FADE = "linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent)";
|
|
10
|
+
function clampInt(value, min, max) {
|
|
11
|
+
const rounded = Math.round(value);
|
|
12
|
+
return rounded < min ? min : rounded > max ? max : rounded;
|
|
13
|
+
}
|
|
14
|
+
function pad2(value) {
|
|
15
|
+
return String(value).padStart(2, "0");
|
|
16
|
+
}
|
|
17
|
+
/** Parse `"HH:mm"` or `"HH:mm:ss"` into a normalized `TimeValue`, or `null`. */
|
|
18
|
+
function parseTimeString(input) {
|
|
19
|
+
const match = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/.exec(input.trim());
|
|
20
|
+
if (!match)
|
|
21
|
+
return null;
|
|
22
|
+
return {
|
|
23
|
+
hours: clampInt(Number(match[1]), 0, 23),
|
|
24
|
+
minutes: clampInt(Number(match[2]), 0, 59),
|
|
25
|
+
seconds: match[3] !== undefined ? clampInt(Number(match[3]), 0, 59) : 0,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Coerce any accepted input into a clamped `TimeValue`, or `undefined` when unset/invalid. */
|
|
29
|
+
function normalize(value) {
|
|
30
|
+
if (value === undefined)
|
|
31
|
+
return undefined;
|
|
32
|
+
if (typeof value === "string")
|
|
33
|
+
return parseTimeString(value) ?? undefined;
|
|
34
|
+
return {
|
|
35
|
+
hours: clampInt(value.hours ?? 0, 0, 23),
|
|
36
|
+
minutes: clampInt(value.minutes ?? 0, 0, 59),
|
|
37
|
+
seconds: clampInt(value.seconds ?? 0, 0, 59),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function formatTime(time, hourCycle, showSeconds) {
|
|
41
|
+
const secondPart = showSeconds ? `:${pad2(time.seconds ?? 0)}` : "";
|
|
42
|
+
if (hourCycle === 24) {
|
|
43
|
+
return `${pad2(time.hours)}:${pad2(time.minutes)}${secondPart}`;
|
|
44
|
+
}
|
|
45
|
+
const period = time.hours < 12 ? "AM" : "PM";
|
|
46
|
+
const hour12 = time.hours % 12 === 0 ? 12 : time.hours % 12;
|
|
47
|
+
return `${pad2(hour12)}:${pad2(time.minutes)}${secondPart} ${period}`;
|
|
48
|
+
}
|
|
49
|
+
/** Convert a 1–12 clock hour + period into a 0–23 hour. */
|
|
50
|
+
function to24Hour(hour12, period) {
|
|
51
|
+
if (period === "AM")
|
|
52
|
+
return hour12 === 12 ? 0 : hour12;
|
|
53
|
+
return hour12 === 12 ? 12 : hour12 + 12;
|
|
54
|
+
}
|
|
55
|
+
function buildMinuteRange(step) {
|
|
56
|
+
const safe = Math.max(1, Math.floor(step));
|
|
57
|
+
const out = [];
|
|
58
|
+
for (let i = 0; i < 60; i += safe)
|
|
59
|
+
out.push(i);
|
|
60
|
+
return out;
|
|
61
|
+
}
|
|
62
|
+
/** One scrollable, single-select column rendered as an ARIA listbox. */
|
|
63
|
+
function TimeColumn({ label, header, options, selected, kind, disabled, onSelect, onConfirm, }) {
|
|
64
|
+
const baseId = useId();
|
|
65
|
+
const selectedRef = useRef(null);
|
|
66
|
+
const didScrollRef = useRef(false);
|
|
67
|
+
const bufferRef = useRef("");
|
|
68
|
+
const bufferTimerRef = useRef(null);
|
|
69
|
+
// The only timer in the component — reset the type-to-jump buffer and always
|
|
70
|
+
// clear it on unmount so nothing fires after the popover closes.
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
return () => {
|
|
73
|
+
if (bufferTimerRef.current !== null)
|
|
74
|
+
clearTimeout(bufferTimerRef.current);
|
|
75
|
+
};
|
|
76
|
+
}, []);
|
|
77
|
+
// Center the active option: instant on first paint (open), smooth afterwards,
|
|
78
|
+
// and always instant when the user prefers reduced motion.
|
|
79
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `selected` is the intended re-run trigger; the ref reads happen at effect time.
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
const node = selectedRef.current;
|
|
82
|
+
if (!node)
|
|
83
|
+
return;
|
|
84
|
+
const prefersReduced = typeof window !== "undefined" &&
|
|
85
|
+
typeof window.matchMedia === "function" &&
|
|
86
|
+
window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
87
|
+
node.scrollIntoView?.({
|
|
88
|
+
block: "center",
|
|
89
|
+
behavior: !didScrollRef.current || prefersReduced ? "auto" : "smooth",
|
|
90
|
+
});
|
|
91
|
+
didScrollRef.current = true;
|
|
92
|
+
}, [selected]);
|
|
93
|
+
const commitByIndex = (index) => {
|
|
94
|
+
const option = options[index];
|
|
95
|
+
if (option)
|
|
96
|
+
onSelect(option.value);
|
|
97
|
+
};
|
|
98
|
+
const move = (delta) => {
|
|
99
|
+
const length = options.length;
|
|
100
|
+
const current = selected === null ? -1 : options.findIndex((o) => o.value === selected);
|
|
101
|
+
const start = current < 0 ? (delta > 0 ? -1 : 0) : current;
|
|
102
|
+
const next = (((start + delta) % length) + length) % length;
|
|
103
|
+
commitByIndex(next);
|
|
104
|
+
};
|
|
105
|
+
const jumpByTyping = (key) => {
|
|
106
|
+
if (kind === "period") {
|
|
107
|
+
const lower = key.toLowerCase();
|
|
108
|
+
if (lower === "a")
|
|
109
|
+
onSelect("AM");
|
|
110
|
+
else if (lower === "p")
|
|
111
|
+
onSelect("PM");
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (!/^\d$/.test(key))
|
|
115
|
+
return;
|
|
116
|
+
if (bufferTimerRef.current !== null)
|
|
117
|
+
clearTimeout(bufferTimerRef.current);
|
|
118
|
+
bufferRef.current = (bufferRef.current + key).slice(-2);
|
|
119
|
+
const target = Number(bufferRef.current);
|
|
120
|
+
// Exact match when present, otherwise the nearest available (respects step).
|
|
121
|
+
let best = options[0];
|
|
122
|
+
let bestDiff = Number.POSITIVE_INFINITY;
|
|
123
|
+
for (const option of options) {
|
|
124
|
+
const diff = Math.abs(option.value - target);
|
|
125
|
+
if (diff < bestDiff) {
|
|
126
|
+
bestDiff = diff;
|
|
127
|
+
best = option;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (best)
|
|
131
|
+
onSelect(best.value);
|
|
132
|
+
bufferTimerRef.current = setTimeout(() => {
|
|
133
|
+
bufferRef.current = "";
|
|
134
|
+
}, 900);
|
|
135
|
+
};
|
|
136
|
+
const handleKeyDown = (event) => {
|
|
137
|
+
if (disabled)
|
|
138
|
+
return;
|
|
139
|
+
switch (event.key) {
|
|
140
|
+
case "ArrowDown":
|
|
141
|
+
event.preventDefault();
|
|
142
|
+
move(1);
|
|
143
|
+
break;
|
|
144
|
+
case "ArrowUp":
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
move(-1);
|
|
147
|
+
break;
|
|
148
|
+
case "PageDown":
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
move(5);
|
|
151
|
+
break;
|
|
152
|
+
case "PageUp":
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
move(-5);
|
|
155
|
+
break;
|
|
156
|
+
case "Home":
|
|
157
|
+
event.preventDefault();
|
|
158
|
+
commitByIndex(0);
|
|
159
|
+
break;
|
|
160
|
+
case "End":
|
|
161
|
+
event.preventDefault();
|
|
162
|
+
commitByIndex(options.length - 1);
|
|
163
|
+
break;
|
|
164
|
+
case "Enter":
|
|
165
|
+
event.preventDefault();
|
|
166
|
+
onConfirm?.();
|
|
167
|
+
break;
|
|
168
|
+
default:
|
|
169
|
+
jumpByTyping(event.key);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
const activeId = selected !== null ? `${baseId}-${selected}` : undefined;
|
|
173
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-1.5", children: [_jsx("span", { className: "text-[0.6875rem] font-medium uppercase tracking-[0.08em] text-fg-tertiary", children: header }), _jsx("div", { role: "listbox", "aria-label": label, "aria-activedescendant": activeId, "aria-disabled": disabled || undefined, tabIndex: disabled ? -1 : 0, onKeyDown: handleKeyDown, "data-slot": "time-picker-column", className: "h-48 w-16 space-y-1 overflow-y-auto overscroll-contain rounded-lg px-1 outline-none [scrollbar-width:none] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-floating [&::-webkit-scrollbar]:hidden", style: { maskImage: COLUMN_FADE, WebkitMaskImage: COLUMN_FADE }, children: options.map((option) => {
|
|
174
|
+
const isSelected = option.value === selected;
|
|
175
|
+
return (_jsx("div", { id: `${baseId}-${option.value}`, role: "option", "aria-selected": isSelected, ref: isSelected ? selectedRef : undefined, onClick: disabled ? undefined : () => onSelect(option.value), "data-slot": "time-picker-option", className: cn("flex h-9 scroll-my-2 items-center justify-center rounded-md text-sm tabular-nums transition-colors duration-150 motion-reduce:transition-none", disabled ? "cursor-default" : "cursor-pointer", isSelected
|
|
176
|
+
? "bg-[color-mix(in_oklch,var(--cronus-primary),black_30%)] font-semibold text-white shadow-xs"
|
|
177
|
+
: "text-fg-secondary hover:bg-surface-overlay hover:text-fg"), children: option.label }, String(option.value)));
|
|
178
|
+
}) })] }));
|
|
179
|
+
}
|
|
180
|
+
TimeColumn.displayName = "TimeColumn";
|
|
181
|
+
export const TimePicker = forwardRef(({ value: valueProp, defaultValue, onChange, hourCycle = 12, minuteStep = 1, showSeconds = false, secondStep = 1, placeholder = "Select time", disabled = false, "aria-label": ariaLabel, className, contentClassName, id, align = "start", }, ref) => {
|
|
182
|
+
const [open, setOpen] = useState(false);
|
|
183
|
+
const isControlled = valueProp !== undefined;
|
|
184
|
+
const [uncontrolled, setUncontrolled] = useState(() => normalize(defaultValue));
|
|
185
|
+
const currentValue = isControlled ? normalize(valueProp) : uncontrolled;
|
|
186
|
+
const isSet = currentValue !== undefined;
|
|
187
|
+
const time = currentValue ?? { hours: 0, minutes: 0, seconds: 0 };
|
|
188
|
+
const commit = (next) => {
|
|
189
|
+
const normalized = normalize(next) ?? { hours: 0, minutes: 0, seconds: 0 };
|
|
190
|
+
if (!isControlled)
|
|
191
|
+
setUncontrolled(normalized);
|
|
192
|
+
onChange?.(normalized);
|
|
193
|
+
};
|
|
194
|
+
const period = time.hours < 12 ? "AM" : "PM";
|
|
195
|
+
const hour12 = time.hours % 12 === 0 ? 12 : time.hours % 12;
|
|
196
|
+
const hourValues = hourCycle === 24
|
|
197
|
+
? Array.from({ length: 24 }, (_, i) => i)
|
|
198
|
+
: [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
199
|
+
const hourOptions = hourValues.map((v) => ({ value: v, label: pad2(v) }));
|
|
200
|
+
const minuteOptions = buildMinuteRange(minuteStep).map((v) => ({
|
|
201
|
+
value: v,
|
|
202
|
+
label: pad2(v),
|
|
203
|
+
}));
|
|
204
|
+
const secondOptions = buildMinuteRange(secondStep).map((v) => ({
|
|
205
|
+
value: v,
|
|
206
|
+
label: pad2(v),
|
|
207
|
+
}));
|
|
208
|
+
const selectedHour = !isSet ? null : hourCycle === 24 ? time.hours : hour12;
|
|
209
|
+
const selectedMinute = isSet ? time.minutes : null;
|
|
210
|
+
const selectedSecond = isSet ? (time.seconds ?? 0) : null;
|
|
211
|
+
const selectedPeriod = isSet ? period : null;
|
|
212
|
+
const handleHour = (value) => {
|
|
213
|
+
const h = value;
|
|
214
|
+
commit({ ...time, hours: hourCycle === 24 ? h : to24Hour(h, period) });
|
|
215
|
+
};
|
|
216
|
+
const handleMinute = (value) => {
|
|
217
|
+
commit({ ...time, minutes: value });
|
|
218
|
+
};
|
|
219
|
+
const handleSecond = (value) => {
|
|
220
|
+
commit({ ...time, seconds: value });
|
|
221
|
+
};
|
|
222
|
+
const handlePeriod = (value) => {
|
|
223
|
+
commit({ ...time, hours: to24Hour(hour12, value) });
|
|
224
|
+
};
|
|
225
|
+
const handleNow = () => {
|
|
226
|
+
const now = new Date();
|
|
227
|
+
commit({
|
|
228
|
+
hours: now.getHours(),
|
|
229
|
+
minutes: Math.floor(now.getMinutes() / Math.max(1, Math.floor(minuteStep))) *
|
|
230
|
+
Math.max(1, Math.floor(minuteStep)),
|
|
231
|
+
seconds: showSeconds
|
|
232
|
+
? Math.floor(now.getSeconds() / Math.max(1, Math.floor(secondStep))) *
|
|
233
|
+
Math.max(1, Math.floor(secondStep))
|
|
234
|
+
: 0,
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
const display = formatTime(time, hourCycle, showSeconds);
|
|
238
|
+
const closePanel = () => setOpen(false);
|
|
239
|
+
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { ref: ref, id: id, variant: "outline", disabled: disabled, "aria-haspopup": "dialog", "aria-label": ariaLabel ? (isSet ? `${ariaLabel}: ${display}` : ariaLabel) : undefined, "data-slot": "time-picker", className: cn("w-[240px] justify-start gap-2 font-normal", className), children: [_jsx(Clock, { className: "size-4 shrink-0 text-fg-tertiary" }), _jsx("span", { className: cn("tabular-nums", !isSet && "text-fg-muted"), children: isSet ? display : placeholder })] }) }), _jsxs(PopoverContent, { align: align, "aria-label": ariaLabel ?? "Choose a time", "data-slot": "time-picker-content", className: cn("w-auto p-3", contentClassName), children: [_jsxs("div", { className: "flex items-stretch justify-center gap-1", children: [_jsx(TimeColumn, { label: "Hour", header: "Hr", kind: "number", options: hourOptions, selected: selectedHour, disabled: disabled, onSelect: handleHour, onConfirm: closePanel }), _jsx(TimeColumn, { label: "Minute", header: "Min", kind: "number", options: minuteOptions, selected: selectedMinute, disabled: disabled, onSelect: handleMinute, onConfirm: closePanel }), showSeconds ? (_jsx(TimeColumn, { label: "Second", header: "Sec", kind: "number", options: secondOptions, selected: selectedSecond, disabled: disabled, onSelect: handleSecond, onConfirm: closePanel })) : null, hourCycle === 12 ? (_jsx(TimeColumn, { label: "AM or PM", header: "AM/PM", kind: "period", options: [
|
|
240
|
+
{ value: "AM", label: "AM" },
|
|
241
|
+
{ value: "PM", label: "PM" },
|
|
242
|
+
], selected: selectedPeriod, disabled: disabled, onSelect: handlePeriod, onConfirm: closePanel })) : null] }), _jsxs("div", { className: "mt-3 flex items-center justify-between gap-2 border-t border-border-soft pt-3", children: [_jsx(Button, { type: "button", variant: "ghost", size: "sm", disabled: disabled, onClick: handleNow, "data-slot": "time-picker-now", children: "Now" }), _jsx(Button, { type: "button", variant: "secondary", size: "sm", onClick: closePanel, "data-slot": "time-picker-done", children: "Done" })] })] })] }));
|
|
243
|
+
});
|
|
244
|
+
TimePicker.displayName = "TimePicker";
|
|
245
|
+
//# sourceMappingURL=time-picker.js.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes, type LiHTMLAttributes, type OlHTMLAttributes, type ReactNode, type TimeHTMLAttributes } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Vertical activity / history feed. Renders an ordered list (`<ol>`) of
|
|
5
|
+
* {@link TimelineItem}s, each with a dot on a left rail and a connector line
|
|
6
|
+
* running down to the next event. Purely presentational and SSR-safe — there
|
|
7
|
+
* is no state or effects. Compose items inside it:
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Timeline>
|
|
11
|
+
* <TimelineItem>
|
|
12
|
+
* <TimelineDot tone="success" />
|
|
13
|
+
* <TimelineContent>
|
|
14
|
+
* <TimelineTitle>Order shipped</TimelineTitle>
|
|
15
|
+
* <TimelineTime dateTime="2026-06-23">Jun 23</TimelineTime>
|
|
16
|
+
* <TimelineDescription>Left the warehouse.</TimelineDescription>
|
|
17
|
+
* </TimelineContent>
|
|
18
|
+
* </TimelineItem>
|
|
19
|
+
* </Timeline>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const Timeline: import("react").ForwardRefExoticComponent<OlHTMLAttributes<HTMLOListElement> & import("react").RefAttributes<HTMLOListElement>>;
|
|
23
|
+
export interface TimelineItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
24
|
+
/**
|
|
25
|
+
* Render the trailing connector line below this item's dot. Defaults to
|
|
26
|
+
* `true`; the rail draws a line down to the next event. Set `false` on the
|
|
27
|
+
* final item so the rail stops at its dot (auto-detected when the item is the
|
|
28
|
+
* last child of a {@link Timeline}, so this is rarely needed by hand).
|
|
29
|
+
*/
|
|
30
|
+
connector?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A single event row. Lays out as a two-column grid — a left rail holding the
|
|
34
|
+
* {@link TimelineDot} plus the vertical {@link TimelineConnector}, and the
|
|
35
|
+
* content column. The connector is rendered automatically (no trailing line on
|
|
36
|
+
* the last item); pass `connector={false}` to drop it explicitly. Any
|
|
37
|
+
* {@link TimelineDot} child is hoisted onto the rail, so the common markup is
|
|
38
|
+
* just the dot followed by the content.
|
|
39
|
+
*/
|
|
40
|
+
export declare const TimelineItem: import("react").ForwardRefExoticComponent<TimelineItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
41
|
+
declare const timelineDotVariants: (props?: ({
|
|
42
|
+
tone?: "default" | "success" | "warning" | "primary" | "error" | null | undefined;
|
|
43
|
+
withIcon?: boolean | null | undefined;
|
|
44
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
45
|
+
export interface TimelineDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, "color">, Omit<VariantProps<typeof timelineDotVariants>, "withIcon"> {
|
|
46
|
+
/**
|
|
47
|
+
* Optional glyph (e.g. a `lucide-react` icon) rendered inside the dot. When
|
|
48
|
+
* present the dot becomes a ring-bordered chip sized to hold it; otherwise it
|
|
49
|
+
* is a small solid disc.
|
|
50
|
+
*/
|
|
51
|
+
icon?: ReactNode;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The marker on a {@link TimelineItem}'s rail. Without an `icon` it is a small
|
|
55
|
+
* solid disc colored by `tone` (default = muted, primary/success/warning/error
|
|
56
|
+
* map to the matching token); with an `icon` it renders as a ring-bordered chip
|
|
57
|
+
* holding the glyph. Decorative styling only — the event's meaning lives in the
|
|
58
|
+
* adjacent {@link TimelineTitle}.
|
|
59
|
+
*/
|
|
60
|
+
export declare const TimelineDot: import("react").ForwardRefExoticComponent<TimelineDotProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
61
|
+
/**
|
|
62
|
+
* The vertical line linking one event to the next. Normally rendered for you by
|
|
63
|
+
* {@link TimelineItem} (which omits it on the last item); exposed for manual
|
|
64
|
+
* composition. Stretches to fill the rail below the dot and is decorative, so
|
|
65
|
+
* it is hidden from assistive tech.
|
|
66
|
+
*/
|
|
67
|
+
export declare const TimelineConnector: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
68
|
+
/** Wrapper for an item's text column. Stacks the title, time and description. */
|
|
69
|
+
export declare const TimelineContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
70
|
+
/** The event's headline. */
|
|
71
|
+
export declare const TimelineTitle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
72
|
+
/**
|
|
73
|
+
* The muted timestamp for an event. Renders a real `<time>` element — pass
|
|
74
|
+
* `dateTime` for the machine-readable value when the visible text is a friendly
|
|
75
|
+
* label.
|
|
76
|
+
*/
|
|
77
|
+
export declare const TimelineTime: import("react").ForwardRefExoticComponent<TimeHTMLAttributes<HTMLTimeElement> & import("react").RefAttributes<HTMLTimeElement>>;
|
|
78
|
+
/** Optional supporting copy under the title. */
|
|
79
|
+
export declare const TimelineDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
80
|
+
export { timelineDotVariants };
|
|
81
|
+
//# sourceMappingURL=timeline.d.ts.map
|