@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,84 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Layout recipes for the `<dl>` root. Every layout styles either supported
|
|
5
|
+
* composition from the parent: raw alternating `<dt>`/`<dd>` children, or
|
|
6
|
+
* pairs grouped in a {@link DescriptionItem} (or any plain `<div>` — valid
|
|
7
|
+
* inside a `<dl>` per the HTML spec). Use one composition per list — the spec
|
|
8
|
+
* forbids mixing raw pairs with div-wrapped groups in the same `<dl>`.
|
|
9
|
+
*/
|
|
10
|
+
declare const descriptionListVariants: (props?: ({
|
|
11
|
+
layout?: "grid" | "horizontal" | "stacked" | null | undefined;
|
|
12
|
+
size?: "sm" | "md" | null | undefined;
|
|
13
|
+
striped?: boolean | null | undefined;
|
|
14
|
+
bordered?: boolean | null | undefined;
|
|
15
|
+
detailsAlign?: "end" | "start" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
export interface DescriptionListProps extends HTMLAttributes<HTMLDListElement>, VariantProps<typeof descriptionListVariants> {
|
|
18
|
+
/**
|
|
19
|
+
* How term/details pairs are arranged. `stacked` places each term above its
|
|
20
|
+
* details; `horizontal` aligns them into classic two-column rows with a
|
|
21
|
+
* divider between rows; `grid` spreads grouped pairs across a responsive
|
|
22
|
+
* 1 → 2 → 3 column set of card tiles.
|
|
23
|
+
* @default "stacked"
|
|
24
|
+
*/
|
|
25
|
+
layout?: "stacked" | "horizontal" | "grid";
|
|
26
|
+
/**
|
|
27
|
+
* Density preset controlling the type scale and spacing.
|
|
28
|
+
* @default "md"
|
|
29
|
+
*/
|
|
30
|
+
size?: "sm" | "md";
|
|
31
|
+
/**
|
|
32
|
+
* Tints alternate rows for scannability. The zebra counts only div-wrapped
|
|
33
|
+
* rows — wrap each pair in a {@link DescriptionItem} row (or a plain
|
|
34
|
+
* `<div>`); raw `<dt>`/`<dd>` pairs are never counted or tinted.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
striped?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Wraps the list in a rounded outer border and insets the content.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
bordered?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Alignment of the details column. Logical (`text-start`/`text-end`), so
|
|
45
|
+
* `end` stays correct in RTL.
|
|
46
|
+
* @default "start"
|
|
47
|
+
*/
|
|
48
|
+
detailsAlign?: "start" | "end";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Semantic `<dl>` for label/value content — detail panes, order summaries and
|
|
52
|
+
* settings review screens. Purely presentational and SSR-safe: all three
|
|
53
|
+
* layouts are driven from this root, so the children stay simple primitives.
|
|
54
|
+
* Compose raw pairs, or group each pair with {@link DescriptionItem} (required
|
|
55
|
+
* for the `grid` layout and for `striped` rows). Use one composition per list —
|
|
56
|
+
* the HTML spec forbids mixing raw `<dt>`/`<dd>` pairs with div-wrapped groups
|
|
57
|
+
* in the same `<dl>`:
|
|
58
|
+
*
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <DescriptionList layout="horizontal">
|
|
61
|
+
* <DescriptionItem term="Order">#10245</DescriptionItem>
|
|
62
|
+
* <DescriptionItem term="Status">Paid</DescriptionItem>
|
|
63
|
+
* </DescriptionList>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare const DescriptionList: import("react").ForwardRefExoticComponent<DescriptionListProps & import("react").RefAttributes<HTMLDListElement>>;
|
|
67
|
+
/** The label of a pair — a `<dt>` (exposed to assistive tech as a term). */
|
|
68
|
+
export declare const DescriptionTerm: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
69
|
+
/** The value of a pair — a `<dd>` (exposed to assistive tech as a definition). */
|
|
70
|
+
export declare const DescriptionDetails: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
71
|
+
export interface DescriptionItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
72
|
+
/** The label rendered in the pair's {@link DescriptionTerm}. */
|
|
73
|
+
term: ReactNode;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Convenience wrapper that groups one term/details pair in a `<div>` (valid
|
|
77
|
+
* `<dl>` structure per the HTML spec). The pair renders as
|
|
78
|
+
* `<dt>{term}</dt><dd>{children}</dd>`; the parent {@link DescriptionList}
|
|
79
|
+
* styles the wrapper per layout (a subgrid row in `horizontal`, a card tile in
|
|
80
|
+
* `grid`, a zebra row when `striped`).
|
|
81
|
+
*/
|
|
82
|
+
export declare const DescriptionItem: import("react").ForwardRefExoticComponent<DescriptionItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
83
|
+
export { descriptionListVariants };
|
|
84
|
+
//# sourceMappingURL=description-list.d.ts.map
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
/* ------------------------------------------------------------------ *
|
|
6
|
+
* DescriptionList (root)
|
|
7
|
+
* ------------------------------------------------------------------ */
|
|
8
|
+
/**
|
|
9
|
+
* Layout recipes for the `<dl>` root. Every layout styles either supported
|
|
10
|
+
* composition from the parent: raw alternating `<dt>`/`<dd>` children, or
|
|
11
|
+
* pairs grouped in a {@link DescriptionItem} (or any plain `<div>` — valid
|
|
12
|
+
* inside a `<dl>` per the HTML spec). Use one composition per list — the spec
|
|
13
|
+
* forbids mixing raw pairs with div-wrapped groups in the same `<dl>`.
|
|
14
|
+
*/
|
|
15
|
+
const descriptionListVariants = cva("w-full min-w-0", {
|
|
16
|
+
variants: {
|
|
17
|
+
layout: {
|
|
18
|
+
// Terms sit above their details; groups separate vertically (spacing
|
|
19
|
+
// lives in the size compounds below).
|
|
20
|
+
stacked: "[&_dd]:mt-1",
|
|
21
|
+
// Classic definition list: two aligned columns, one divider per row.
|
|
22
|
+
// Raw dt/dd children flow straight into the grid tracks; row wrappers
|
|
23
|
+
// become subgrid rows so their cells align to the same tracks.
|
|
24
|
+
horizontal: cn("grid grid-cols-[fit-content(50%)_minmax(0,1fr)]", "[&>div]:col-span-2 [&>div]:grid [&>div]:grid-cols-subgrid", "[&_dt]:col-start-1 [&_dd]:col-start-2",
|
|
25
|
+
// divide-y equivalent that draws one continuous line per row in either
|
|
26
|
+
// composition (whole wrappers, or a raw dt plus its adjacent dd).
|
|
27
|
+
"[&>div:not(:first-child)]:border-t [&>div:not(:first-child)]:border-border", "[&>dt:not(:first-child)]:border-t [&>dt:not(:first-child)]:border-border", "[&>dt:not(:first-child)+dd]:border-t [&>dt:not(:first-child)+dd]:border-border"),
|
|
28
|
+
// Responsive card tiles — group each pair with `DescriptionItem` (or a
|
|
29
|
+
// plain <div>) so every tile carries one term/details pair.
|
|
30
|
+
grid: cn("grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", "[&>div]:rounded-lg [&>div]:border [&>div]:border-border [&>div]:bg-surface-raised", "[&_dd]:mt-1"),
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
sm: "text-xs",
|
|
34
|
+
md: "text-sm",
|
|
35
|
+
},
|
|
36
|
+
striped: { true: "", false: "" },
|
|
37
|
+
bordered: {
|
|
38
|
+
true: "overflow-hidden rounded-lg border border-border",
|
|
39
|
+
false: "",
|
|
40
|
+
},
|
|
41
|
+
detailsAlign: {
|
|
42
|
+
start: "",
|
|
43
|
+
end: "[&_dd]:text-end",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
compoundVariants: [
|
|
47
|
+
// Vertical rhythm between stacked groups (row wrappers or raw pairs).
|
|
48
|
+
{
|
|
49
|
+
layout: "stacked",
|
|
50
|
+
size: "md",
|
|
51
|
+
class: "[&>div:not(:first-child)]:mt-4 [&>dt:not(:first-child)]:mt-4",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
layout: "stacked",
|
|
55
|
+
size: "sm",
|
|
56
|
+
class: "[&>div:not(:first-child)]:mt-3 [&>dt:not(:first-child)]:mt-3",
|
|
57
|
+
},
|
|
58
|
+
// Horizontal row padding. The term's `pe-*` doubles as the column gutter —
|
|
59
|
+
// a real grid gap would slice the row dividers into two segments.
|
|
60
|
+
{ layout: "horizontal", size: "md", class: "[&_dt]:pe-6 [&_dt]:py-3 [&_dd]:py-3" },
|
|
61
|
+
{ layout: "horizontal", size: "sm", class: "[&_dt]:pe-4 [&_dt]:py-2 [&_dd]:py-2" },
|
|
62
|
+
// Grid tile spacing.
|
|
63
|
+
{ layout: "grid", size: "md", class: "gap-4 [&>div]:p-4" },
|
|
64
|
+
{ layout: "grid", size: "sm", class: "gap-3 [&>div]:p-3" },
|
|
65
|
+
// Zebra tint on alternate grouped rows, with an inset so the wash never
|
|
66
|
+
// touches the text (logical padding keeps it RTL-safe). `nth-of-type`
|
|
67
|
+
// counts only the <div> row wrappers, so raw dt/dd children can never
|
|
68
|
+
// skew the row parity (they don't participate in the zebra at all).
|
|
69
|
+
{
|
|
70
|
+
layout: "stacked",
|
|
71
|
+
striped: true,
|
|
72
|
+
class: "[&>div]:rounded-md [&>div]:p-3 [&>div:nth-of-type(even)]:bg-surface-inset",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
layout: "horizontal",
|
|
76
|
+
striped: true,
|
|
77
|
+
class: "[&>div:nth-of-type(even)]:bg-surface-inset [&_dt]:ps-3 [&_dd]:pe-3",
|
|
78
|
+
},
|
|
79
|
+
{ layout: "grid", striped: true, class: "[&>div:nth-of-type(even)]:bg-surface-inset" },
|
|
80
|
+
// Inset the content away from the outer border.
|
|
81
|
+
{ layout: "stacked", bordered: true, class: "p-4" },
|
|
82
|
+
{ layout: "horizontal", bordered: true, class: "[&_dt]:ps-3 [&_dd]:pe-3" },
|
|
83
|
+
{ layout: "grid", bordered: true, class: "p-4" },
|
|
84
|
+
],
|
|
85
|
+
defaultVariants: {
|
|
86
|
+
layout: "stacked",
|
|
87
|
+
size: "md",
|
|
88
|
+
striped: false,
|
|
89
|
+
bordered: false,
|
|
90
|
+
detailsAlign: "start",
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Semantic `<dl>` for label/value content — detail panes, order summaries and
|
|
95
|
+
* settings review screens. Purely presentational and SSR-safe: all three
|
|
96
|
+
* layouts are driven from this root, so the children stay simple primitives.
|
|
97
|
+
* Compose raw pairs, or group each pair with {@link DescriptionItem} (required
|
|
98
|
+
* for the `grid` layout and for `striped` rows). Use one composition per list —
|
|
99
|
+
* the HTML spec forbids mixing raw `<dt>`/`<dd>` pairs with div-wrapped groups
|
|
100
|
+
* in the same `<dl>`:
|
|
101
|
+
*
|
|
102
|
+
* ```tsx
|
|
103
|
+
* <DescriptionList layout="horizontal">
|
|
104
|
+
* <DescriptionItem term="Order">#10245</DescriptionItem>
|
|
105
|
+
* <DescriptionItem term="Status">Paid</DescriptionItem>
|
|
106
|
+
* </DescriptionList>
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export const DescriptionList = forwardRef(({ className, layout, size, striped, bordered, detailsAlign, ...props }, ref) => {
|
|
110
|
+
return (_jsx("dl", { ref: ref, "data-slot": "description-list", className: cn(descriptionListVariants({ layout, size, striped, bordered, detailsAlign }), className), ...props }));
|
|
111
|
+
});
|
|
112
|
+
DescriptionList.displayName = "DescriptionList";
|
|
113
|
+
/* ------------------------------------------------------------------ *
|
|
114
|
+
* DescriptionTerm / DescriptionDetails
|
|
115
|
+
* ------------------------------------------------------------------ */
|
|
116
|
+
/** The label of a pair — a `<dt>` (exposed to assistive tech as a term). */
|
|
117
|
+
export const DescriptionTerm = forwardRef(({ className, ...props }, ref) => {
|
|
118
|
+
return (_jsx("dt", { ref: ref, "data-slot": "description-term", className: cn("font-medium text-fg-secondary", className), ...props }));
|
|
119
|
+
});
|
|
120
|
+
DescriptionTerm.displayName = "DescriptionTerm";
|
|
121
|
+
/** The value of a pair — a `<dd>` (exposed to assistive tech as a definition). */
|
|
122
|
+
export const DescriptionDetails = forwardRef(({ className, ...props }, ref) => {
|
|
123
|
+
return (_jsx("dd", { ref: ref, "data-slot": "description-details", className: cn("min-w-0 break-words text-fg", className), ...props }));
|
|
124
|
+
});
|
|
125
|
+
DescriptionDetails.displayName = "DescriptionDetails";
|
|
126
|
+
/**
|
|
127
|
+
* Convenience wrapper that groups one term/details pair in a `<div>` (valid
|
|
128
|
+
* `<dl>` structure per the HTML spec). The pair renders as
|
|
129
|
+
* `<dt>{term}</dt><dd>{children}</dd>`; the parent {@link DescriptionList}
|
|
130
|
+
* styles the wrapper per layout (a subgrid row in `horizontal`, a card tile in
|
|
131
|
+
* `grid`, a zebra row when `striped`).
|
|
132
|
+
*/
|
|
133
|
+
export const DescriptionItem = forwardRef(({ term, className, children, ...props }, ref) => {
|
|
134
|
+
return (_jsxs("div", { ref: ref, "data-slot": "description-item", className: cn("min-w-0", className), ...props, children: [_jsx(DescriptionTerm, { children: term }), _jsx(DescriptionDetails, { children: children })] }));
|
|
135
|
+
});
|
|
136
|
+
DescriptionItem.displayName = "DescriptionItem";
|
|
137
|
+
export { descriptionListVariants };
|
|
138
|
+
//# sourceMappingURL=description-list.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import { type ComponentPropsWithoutRef, type HTMLAttributes } from "react";
|
|
3
|
+
export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export declare const DialogPortal: import("react").FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export declare const DialogOverlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export interface DialogContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
9
|
+
/**
|
|
10
|
+
* Render the built-in top-right close button. Set `false` when the content
|
|
11
|
+
* supplies its own close affordance (e.g. a full-bleed gallery header).
|
|
12
|
+
*/
|
|
13
|
+
showCloseButton?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const DialogContent: import("react").ForwardRefExoticComponent<DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export declare const DialogHeader: {
|
|
17
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const DialogFooter: {
|
|
21
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
25
|
+
export declare const DialogDescription: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
26
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { forwardRef, } from "react";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
7
|
+
export const Dialog = DialogPrimitive.Root;
|
|
8
|
+
export const DialogTrigger = DialogPrimitive.Trigger;
|
|
9
|
+
export const DialogPortal = DialogPrimitive.Portal;
|
|
10
|
+
export const DialogClose = DialogPrimitive.Close;
|
|
11
|
+
export const DialogOverlay = forwardRef(({ className, ...props }, ref) => {
|
|
12
|
+
return (_jsx(DialogPrimitive.Overlay, { ref: ref, "data-slot": "dialog-overlay", className: cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-[cronus-overlay-in_200ms_var(--ease-out-quart)] data-[state=closed]:animate-[cronus-overlay-out_160ms_var(--ease-out-quart)]", className), ...props }));
|
|
13
|
+
});
|
|
14
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
15
|
+
export const DialogContent = forwardRef(({ className, children, showCloseButton = true, ...props }, ref) => {
|
|
16
|
+
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, "data-slot": "dialog-content", className: cn("fixed inset-0 z-50 m-auto grid h-fit w-full max-w-lg gap-4 rounded-xl border border-border bg-surface-floating p-6 text-fg shadow-lg data-[state=open]:animate-[cronus-pop-in_200ms_var(--ease-out-quart)_both] data-[state=closed]:animate-[cronus-pop-out_160ms_var(--ease-out-quart)_both]", className), ...props, children: [children, showCloseButton ? (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "absolute end-4 top-4 rounded-md text-fg-tertiary outline-none transition-opacity hover:text-fg focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-base disabled:pointer-events-none", children: [_jsx(X, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })) : null] })] }));
|
|
17
|
+
});
|
|
18
|
+
DialogContent.displayName = "DialogContent";
|
|
19
|
+
export const DialogHeader = ({ className, ...props }) => {
|
|
20
|
+
return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-1.5 text-center sm:text-start", className), ...props }));
|
|
21
|
+
};
|
|
22
|
+
DialogHeader.displayName = "DialogHeader";
|
|
23
|
+
export const DialogFooter = ({ className, ...props }) => {
|
|
24
|
+
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
25
|
+
};
|
|
26
|
+
DialogFooter.displayName = "DialogFooter";
|
|
27
|
+
export const DialogTitle = forwardRef(({ className, ...props }, ref) => {
|
|
28
|
+
return (_jsx(DialogPrimitive.Title, { ref: ref, "data-slot": "dialog-title", className: cn("font-display text-lg font-semibold text-fg", className), ...props }));
|
|
29
|
+
});
|
|
30
|
+
DialogTitle.displayName = "DialogTitle";
|
|
31
|
+
export const DialogDescription = forwardRef(({ className, ...props }, ref) => {
|
|
32
|
+
return (_jsx(DialogPrimitive.Description, { ref: ref, "data-slot": "dialog-description", className: cn("text-sm text-fg-secondary", className), ...props }));
|
|
33
|
+
});
|
|
34
|
+
DialogDescription.displayName = "DialogDescription";
|
|
35
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
/** A single dock entry — an icon button or, when `href` is set, a link. */
|
|
3
|
+
export interface DockItem {
|
|
4
|
+
/** The glyph shown in the dock (kept `aria-hidden`; the button carries the name). */
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
/** Accessible name — wired to both `title` and `aria-label`. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Activated on click (ignored when `href` is set). */
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
/** Render the item as a link to this destination instead of a button. */
|
|
11
|
+
href?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DockProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
/** The dock entries, left to right. */
|
|
15
|
+
items: DockItem[];
|
|
16
|
+
/** Peak scale an item reaches at the pointer's center. Defaults to `1.6`. */
|
|
17
|
+
magnification?: number;
|
|
18
|
+
/** Resting item size in pixels. Defaults to `44`. */
|
|
19
|
+
baseItemSize?: number;
|
|
20
|
+
/** Pointer influence radius in pixels — how far the magnify reaches. Defaults to `120`. */
|
|
21
|
+
distance?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A macOS-style icon dock with magnify-on-hover. Items grow as the pointer
|
|
25
|
+
* approaches and settle back as it moves away, smoothed with a spring. The bar
|
|
26
|
+
* is a rounded, bordered, backdrop-blurred surface of icon buttons (or links,
|
|
27
|
+
* when an item has an `href`).
|
|
28
|
+
*
|
|
29
|
+
* Each item is named by its `label` (via `title` + `aria-label`); the glyphs
|
|
30
|
+
* themselves stay `aria-hidden`. When the visitor prefers reduced motion the
|
|
31
|
+
* magnify is skipped entirely and every item renders at {@link DockProps.baseItemSize}.
|
|
32
|
+
*/
|
|
33
|
+
export declare const Dock: import("react").ForwardRefExoticComponent<DockProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
//# sourceMappingURL=dock.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useMotionValue, useReducedMotion, useSpring, useTransform, } from "motion/react";
|
|
4
|
+
import { forwardRef, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/cn.js";
|
|
6
|
+
const DEFAULT_MAGNIFICATION = 1.6;
|
|
7
|
+
const DEFAULT_BASE_ITEM_SIZE = 44;
|
|
8
|
+
const DEFAULT_DISTANCE = 120;
|
|
9
|
+
/**
|
|
10
|
+
* A macOS-style icon dock with magnify-on-hover. Items grow as the pointer
|
|
11
|
+
* approaches and settle back as it moves away, smoothed with a spring. The bar
|
|
12
|
+
* is a rounded, bordered, backdrop-blurred surface of icon buttons (or links,
|
|
13
|
+
* when an item has an `href`).
|
|
14
|
+
*
|
|
15
|
+
* Each item is named by its `label` (via `title` + `aria-label`); the glyphs
|
|
16
|
+
* themselves stay `aria-hidden`. When the visitor prefers reduced motion the
|
|
17
|
+
* magnify is skipped entirely and every item renders at {@link DockProps.baseItemSize}.
|
|
18
|
+
*/
|
|
19
|
+
export const Dock = forwardRef(({ items, magnification = DEFAULT_MAGNIFICATION, baseItemSize = DEFAULT_BASE_ITEM_SIZE, distance = DEFAULT_DISTANCE, className, onMouseMove, onMouseLeave, ...props }, ref) => {
|
|
20
|
+
const reducedMotion = useReducedMotion();
|
|
21
|
+
// Pointer X relative to the viewport; items read it to size themselves.
|
|
22
|
+
// Park it far away so nothing is magnified before the pointer arrives.
|
|
23
|
+
const pointerX = useMotionValue(Number.POSITIVE_INFINITY);
|
|
24
|
+
return (_jsx("div", { ref: ref, "data-slot": "dock", onMouseMove: (event) => {
|
|
25
|
+
if (!reducedMotion)
|
|
26
|
+
pointerX.set(event.clientX);
|
|
27
|
+
onMouseMove?.(event);
|
|
28
|
+
}, onMouseLeave: (event) => {
|
|
29
|
+
pointerX.set(Number.POSITIVE_INFINITY);
|
|
30
|
+
onMouseLeave?.(event);
|
|
31
|
+
}, className: cn("inline-flex items-end gap-2 rounded-2xl border border-border bg-surface-raised/70 px-3 py-2 backdrop-blur", className), ...props, children: items.map((item) => (_jsx(DockButton, { item: item, pointerX: pointerX, magnification: magnification, baseItemSize: baseItemSize, distance: distance, reducedMotion: !!reducedMotion }, item.label))) }));
|
|
32
|
+
});
|
|
33
|
+
Dock.displayName = "Dock";
|
|
34
|
+
function DockButton({ item, pointerX, magnification, baseItemSize, distance, reducedMotion, }) {
|
|
35
|
+
// Live element ref so the transforms can read this item's center on each
|
|
36
|
+
// frame; stable for the item's lifetime.
|
|
37
|
+
const ref = useRef(null);
|
|
38
|
+
// Signed distance from the pointer to this item's horizontal center. When the
|
|
39
|
+
// pointer is parked at +Infinity this resolves to Infinity, so the item rests
|
|
40
|
+
// at its base size.
|
|
41
|
+
const delta = useTransform(pointerX, (x) => {
|
|
42
|
+
const rect = ref.current?.getBoundingClientRect();
|
|
43
|
+
if (!rect)
|
|
44
|
+
return Number.POSITIVE_INFINITY;
|
|
45
|
+
return x - (rect.left + rect.width / 2);
|
|
46
|
+
});
|
|
47
|
+
const targetSize = useTransform(delta, [-distance, 0, distance], [baseItemSize, baseItemSize * magnification, baseItemSize], { clamp: true });
|
|
48
|
+
const size = useSpring(targetSize, { stiffness: 260, damping: 22, mass: 0.2 });
|
|
49
|
+
const sharedClassName = "inline-flex aspect-square items-center justify-center rounded-xl bg-surface-overlay text-fg outline-none transition-colors hover:bg-surface-base focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-base [&_svg]:size-1/2 [&_svg]:shrink-0 [&_svg]:pointer-events-none";
|
|
50
|
+
const style = reducedMotion ? { width: baseItemSize, height: baseItemSize } : { width: size };
|
|
51
|
+
const glyph = (_jsx("span", { "aria-hidden": "true", className: "contents", children: item.icon }));
|
|
52
|
+
if (item.href) {
|
|
53
|
+
return (_jsx(motion.a, { ref: (node) => {
|
|
54
|
+
ref.current = node;
|
|
55
|
+
}, href: item.href, title: item.label, "aria-label": item.label, "data-slot": "dock-item", style: style, className: sharedClassName, children: glyph }));
|
|
56
|
+
}
|
|
57
|
+
return (_jsx(motion.button, { ref: (node) => {
|
|
58
|
+
ref.current = node;
|
|
59
|
+
}, type: "button", title: item.label, "aria-label": item.label, "data-slot": "dock-item", onClick: item.onClick, style: style, className: sharedClassName, children: glyph }));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=dock.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type HTMLAttributes, type Ref } from "react";
|
|
2
|
+
export interface DotPatternProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
ref?: Ref<HTMLDivElement>;
|
|
4
|
+
/**
|
|
5
|
+
* Gap between dots, in pixels.
|
|
6
|
+
* @default 16
|
|
7
|
+
*/
|
|
8
|
+
gap?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Dot radius, in pixels.
|
|
11
|
+
* @default 1
|
|
12
|
+
*/
|
|
13
|
+
radius?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A faint SVG dotted field that sits behind content. Colour inherits
|
|
17
|
+
* `currentColor` (set `text-fg` / `text-primary` on the wrapper). Decorative
|
|
18
|
+
* (`aria-hidden`) with no motion of its own.
|
|
19
|
+
*/
|
|
20
|
+
export declare function DotPattern({ ref, className, children, gap, radius, ...props }: DotPatternProps): import("react").JSX.Element;
|
|
21
|
+
export declare namespace DotPattern {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=dot-pattern.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
function finiteOr(value, fallback) {
|
|
5
|
+
return Number.isFinite(value) ? value : fallback;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A faint SVG dotted field that sits behind content. Colour inherits
|
|
9
|
+
* `currentColor` (set `text-fg` / `text-primary` on the wrapper). Decorative
|
|
10
|
+
* (`aria-hidden`) with no motion of its own.
|
|
11
|
+
*/
|
|
12
|
+
export function DotPattern({ ref, className, children, gap = 16, radius = 1, ...props }) {
|
|
13
|
+
const patternId = useId();
|
|
14
|
+
const cell = Math.max(4, finiteOr(gap, 16));
|
|
15
|
+
const r = Math.max(0.25, finiteOr(radius, 1));
|
|
16
|
+
return (_jsxs("div", { ref: ref, "data-slot": "dot-pattern", className: cn("relative overflow-hidden text-fg", className), ...props, children: [_jsxs("svg", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 size-full opacity-[0.18]", children: [_jsx("defs", { children: _jsx("pattern", { id: patternId, width: cell, height: cell, patternUnits: "userSpaceOnUse", children: _jsx("circle", { cx: cell / 2, cy: cell / 2, r: r, fill: "currentColor" }) }) }), _jsx("rect", { width: "100%", height: "100%", fill: `url(#${patternId})` })] }), _jsx("div", { className: "relative", children: children })] }));
|
|
17
|
+
}
|
|
18
|
+
DotPattern.displayName = "DotPattern";
|
|
19
|
+
//# sourceMappingURL=dot-pattern.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
|
+
export declare const Drawer: {
|
|
4
|
+
({ shouldScaleBackground, ...props }: ComponentProps<typeof DrawerPrimitive.Root>): import("react").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const DrawerTrigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export declare const DrawerPortal: typeof import("vaul").Portal;
|
|
9
|
+
export declare const DrawerClose: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const DrawerOverlay: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const DrawerContent: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare const DrawerHeader: {
|
|
13
|
+
({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const DrawerFooter: {
|
|
17
|
+
({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const DrawerTitle: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
21
|
+
export declare const DrawerDescription: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, } from "react";
|
|
4
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
5
|
+
import { cn } from "../lib/cn.js";
|
|
6
|
+
export const Drawer = ({ shouldScaleBackground = true, ...props }) => {
|
|
7
|
+
return (_jsx(DrawerPrimitive.Root, { "data-slot": "drawer", shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
8
|
+
};
|
|
9
|
+
Drawer.displayName = "Drawer";
|
|
10
|
+
export const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
11
|
+
export const DrawerPortal = DrawerPrimitive.Portal;
|
|
12
|
+
export const DrawerClose = DrawerPrimitive.Close;
|
|
13
|
+
export const DrawerOverlay = forwardRef(({ className, ...props }, ref) => {
|
|
14
|
+
return (_jsx(DrawerPrimitive.Overlay, { ref: ref, "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-50 bg-black/50", className), ...props }));
|
|
15
|
+
});
|
|
16
|
+
DrawerOverlay.displayName = "DrawerOverlay";
|
|
17
|
+
export const DrawerContent = forwardRef(({ className, children, ...props }, ref) => {
|
|
18
|
+
return (_jsxs(DrawerPortal, { children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { ref: ref, "data-slot": "drawer-content", className: cn("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border border-border bg-surface-floating text-fg", className), ...props, children: [_jsx("div", { className: "mx-auto mt-4 h-1.5 w-12 shrink-0 rounded-full bg-border" }), children] })] }));
|
|
19
|
+
});
|
|
20
|
+
DrawerContent.displayName = "DrawerContent";
|
|
21
|
+
export const DrawerHeader = ({ className, ...props }) => {
|
|
22
|
+
return (_jsx("div", { "data-slot": "drawer-header", className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props }));
|
|
23
|
+
};
|
|
24
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
25
|
+
export const DrawerFooter = ({ className, ...props }) => {
|
|
26
|
+
return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
|
|
27
|
+
};
|
|
28
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
29
|
+
export const DrawerTitle = forwardRef(({ className, ...props }, ref) => {
|
|
30
|
+
return (_jsx(DrawerPrimitive.Title, { ref: ref, "data-slot": "drawer-title", className: cn("font-display text-lg font-semibold text-fg", className), ...props }));
|
|
31
|
+
});
|
|
32
|
+
DrawerTitle.displayName = "DrawerTitle";
|
|
33
|
+
export const DrawerDescription = forwardRef(({ className, ...props }, ref) => {
|
|
34
|
+
return (_jsx(DrawerPrimitive.Description, { ref: ref, "data-slot": "drawer-description", className: cn("text-sm text-fg-secondary", className), ...props }));
|
|
35
|
+
});
|
|
36
|
+
DrawerDescription.displayName = "DrawerDescription";
|
|
37
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import { type ComponentProps, type HTMLAttributes } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Non-modal by default. Radix's modal dropdown installs RemoveScroll on
|
|
5
|
+
* `body`, which unsticks site chrome (`position: sticky` + `overflow-x: clip`)
|
|
6
|
+
* and makes the navbar/sidebar jump. A menu is not a dialog — don't lock the page.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DropdownMenu({ modal, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react").JSX.Element;
|
|
9
|
+
export declare const DropdownMenuTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const DropdownMenuPortal: import("react").FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
12
|
+
export declare const DropdownMenuSub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
13
|
+
export declare const DropdownMenuRadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export declare const DropdownMenuSubTrigger: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export declare const DropdownMenuSubContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export declare const DropdownMenuContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export declare const DropdownMenuItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export declare const DropdownMenuCheckboxItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export declare const DropdownMenuRadioItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export declare const DropdownMenuLabel: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
25
|
+
inset?: boolean;
|
|
26
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export declare const DropdownMenuSeparator: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export declare const DropdownMenuShortcut: {
|
|
29
|
+
({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
5
|
+
import { forwardRef, } from "react";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
7
|
+
/**
|
|
8
|
+
* Non-modal by default. Radix's modal dropdown installs RemoveScroll on
|
|
9
|
+
* `body`, which unsticks site chrome (`position: sticky` + `overflow-x: clip`)
|
|
10
|
+
* and makes the navbar/sidebar jump. A menu is not a dialog — don't lock the page.
|
|
11
|
+
*/
|
|
12
|
+
export function DropdownMenu({ modal = false, ...props }) {
|
|
13
|
+
return _jsx(DropdownMenuPrimitive.Root, { modal: modal, ...props });
|
|
14
|
+
}
|
|
15
|
+
export const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
16
|
+
export const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
17
|
+
export const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
18
|
+
export const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
19
|
+
export const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
20
|
+
export const DropdownMenuSubTrigger = forwardRef(({ className, inset, children, ...props }, ref) => {
|
|
21
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, "data-slot": "dropdown-menu-sub-trigger", className: cn("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-surface-overlay focus:text-fg data-[state=open]:bg-surface-overlay data-[disabled]:opacity-50 data-[disabled]:pointer-events-none [&_svg]:size-4", inset && "ps-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ms-auto" })] }));
|
|
22
|
+
});
|
|
23
|
+
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
24
|
+
export const DropdownMenuSubContent = forwardRef(({ className, ...props }, ref) => {
|
|
25
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, "data-slot": "dropdown-menu-sub-content", className: cn("z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-surface-floating p-1 text-fg shadow-lg data-[state=open]:animate-[cronus-pop-in_180ms_var(--ease-out-quart)_both] data-[state=closed]:animate-[cronus-pop-out_140ms_var(--ease-out-quart)_both]", className), ...props }));
|
|
26
|
+
});
|
|
27
|
+
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
28
|
+
export const DropdownMenuContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
29
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-surface-floating p-1 text-fg shadow-lg data-[state=open]:animate-[cronus-pop-in_180ms_var(--ease-out-quart)_both] data-[state=closed]:animate-[cronus-pop-out_140ms_var(--ease-out-quart)_both]", className), ...props }) }));
|
|
30
|
+
});
|
|
31
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
32
|
+
export const DropdownMenuItem = forwardRef(({ className, inset, ...props }, ref) => {
|
|
33
|
+
return (_jsx(DropdownMenuPrimitive.Item, { ref: ref, "data-slot": "dropdown-menu-item", className: cn("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-surface-overlay focus:text-fg data-[disabled]:opacity-50 data-[disabled]:pointer-events-none [&_svg]:size-4", inset && "ps-8", className), ...props }));
|
|
34
|
+
});
|
|
35
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
36
|
+
export const DropdownMenuCheckboxItem = forwardRef(({ className, children, checked, ...props }, ref) => {
|
|
37
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, "data-slot": "dropdown-menu-checkbox-item", checked: checked, className: cn("relative flex cursor-default select-none items-center gap-2 rounded-md py-1.5 pe-2 ps-8 text-sm outline-none transition-colors focus:bg-surface-overlay focus:text-fg data-[disabled]:opacity-50 data-[disabled]:pointer-events-none [&_svg]:size-4", className), ...props, children: [_jsx("span", { className: "absolute start-2 flex size-4 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "size-4" }) }) }), children] }));
|
|
38
|
+
});
|
|
39
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
40
|
+
export const DropdownMenuRadioItem = forwardRef(({ className, children, ...props }, ref) => {
|
|
41
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, "data-slot": "dropdown-menu-radio-item", className: cn("relative flex cursor-default select-none items-center gap-2 rounded-md py-1.5 pe-2 ps-8 text-sm outline-none transition-colors focus:bg-surface-overlay focus:text-fg data-[disabled]:opacity-50 data-[disabled]:pointer-events-none [&_svg]:size-4", className), ...props, children: [_jsx("span", { className: "absolute start-2 flex size-4 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "size-2 fill-current" }) }) }), children] }));
|
|
42
|
+
});
|
|
43
|
+
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
44
|
+
export const DropdownMenuLabel = forwardRef(({ className, inset, ...props }, ref) => {
|
|
45
|
+
return (_jsx(DropdownMenuPrimitive.Label, { ref: ref, "data-slot": "dropdown-menu-label", className: cn("px-2 py-1.5 text-xs text-fg-tertiary", inset && "ps-8", className), ...props }));
|
|
46
|
+
});
|
|
47
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
48
|
+
export const DropdownMenuSeparator = forwardRef(({ className, ...props }, ref) => {
|
|
49
|
+
return (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, "data-slot": "dropdown-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
|
|
50
|
+
});
|
|
51
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
52
|
+
export const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
53
|
+
return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("ms-auto text-xs tracking-widest text-fg-tertiary", className), ...props }));
|
|
54
|
+
};
|
|
55
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
56
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
2
|
+
export interface DynamicIslandView {
|
|
3
|
+
id: string;
|
|
4
|
+
/** Accessible name for this view. */
|
|
5
|
+
label: string;
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface DynamicIslandProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
views: DynamicIslandView[];
|
|
11
|
+
/** Controlled active view id. */
|
|
12
|
+
value?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
onValueChange?: (id: string) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A compact live-activity pill that morphs between views. The shell resizes
|
|
18
|
+
* with a spring; inner content cross-fades. Views are a tablist so the
|
|
19
|
+
* control is keyboard-operable. Reduced-motion visitors get an instant
|
|
20
|
+
* resize instead of the morph.
|
|
21
|
+
*/
|
|
22
|
+
export declare function DynamicIsland({ ref, className, views, value, defaultValue, onValueChange, ...props }: DynamicIslandProps): import("react").JSX.Element;
|
|
23
|
+
export declare namespace DynamicIsland {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=dynamic-island.d.ts.map
|