@dtsports/design-system 0.2.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 +156 -0
- package/dist/components/accordion.d.ts +19 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +26 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert.d.ts +26 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/app-shell.d.ts +21 -0
- package/dist/components/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell.js +25 -0
- package/dist/components/app-shell.js.map +1 -0
- package/dist/components/aspect-ratio.d.ts +16 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +17 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/avatar-group.d.ts +31 -0
- package/dist/components/avatar-group.d.ts.map +1 -0
- package/dist/components/avatar.d.ts +15 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +20 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +27 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +51 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.d.ts +33 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +58 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +33 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/capacity-bar.d.ts +32 -0
- package/dist/components/capacity-bar.d.ts.map +1 -0
- package/dist/components/capacity-bar.js +29 -0
- package/dist/components/capacity-bar.js.map +1 -0
- package/dist/components/card.d.ts +26 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +20 -0
- package/dist/components/checkbox.d.ts +11 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +19 -0
- package/dist/components/chip.d.ts +23 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +32 -0
- package/dist/components/chip.js.map +1 -0
- package/dist/components/collapsible.d.ts +16 -0
- package/dist/components/collapsible.js +22 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +38 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +17 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/confirm-action.d.ts +36 -0
- package/dist/components/confirm-action.d.ts.map +1 -0
- package/dist/components/confirm-action.js +21 -0
- package/dist/components/confirm-action.js.map +1 -0
- package/dist/components/container.js.map +1 -0
- package/dist/components/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker.js +22 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +28 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.js +55 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +39 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +47 -0
- package/dist/components/empty-state.d.ts +15 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +6 -0
- package/dist/components/form-field.d.ts +32 -0
- package/dist/components/form-field.d.ts.map +1 -0
- package/dist/components/form-field.js +31 -0
- package/dist/components/form-field.js.map +1 -0
- package/dist/components/input.d.ts +10 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +6 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +11 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +13 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/live-pill.d.ts +14 -0
- package/dist/components/live-pill.js +15 -0
- package/dist/components/live-pill.js.map +1 -0
- package/dist/components/metric-tile.d.ts +23 -0
- package/dist/components/metric-tile.d.ts.map +1 -0
- package/dist/components/money-breakdown.d.ts +36 -0
- package/dist/components/money-breakdown.d.ts.map +1 -0
- package/dist/components/money-breakdown.js +12 -0
- package/dist/components/money-breakdown.js.map +1 -0
- package/dist/components/number-input.d.ts +16 -0
- package/dist/components/number-input.d.ts.map +1 -0
- package/dist/components/number-input.js +30 -0
- package/dist/components/number-input.js.map +1 -0
- package/dist/components/pagination.d.ts +27 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +52 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +24 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +28 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +13 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +17 -0
- package/dist/components/radio-group.d.ts +10 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +17 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +22 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +27 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +40 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +10 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +14 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +48 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +23 -0
- package/dist/components/skeleton.js +25 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +14 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +30 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/spec.d.ts +35 -0
- package/dist/components/spec.js +31 -0
- package/dist/components/spec.js.map +1 -0
- package/dist/components/spinner.d.ts +20 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +18 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stack.d.ts +48 -0
- package/dist/components/stack.d.ts.map +1 -0
- package/dist/components/stack.js +43 -0
- package/dist/components/stack.js.map +1 -0
- package/dist/components/status-pill.js +34 -0
- package/dist/components/status-pill.js.map +1 -0
- package/dist/components/switch.d.ts +9 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +15 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +31 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +22 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +28 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +8 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +6 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/theme-provider.d.ts +35 -0
- package/dist/components/theme-provider.d.ts.map +1 -0
- package/dist/components/theme-provider.js.map +1 -0
- package/dist/components/theme-toggle.d.ts +10 -0
- package/dist/components/theme-toggle.d.ts.map +1 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/components/three-state.d.ts +39 -0
- package/dist/components/three-state.d.ts.map +1 -0
- package/dist/components/three-state.js +24 -0
- package/dist/components/three-state.js.map +1 -0
- package/dist/components/timestamp.d.ts +24 -0
- package/dist/components/timestamp.js +64 -0
- package/dist/components/timestamp.js.map +1 -0
- package/dist/components/toaster.d.ts +27 -0
- package/dist/components/toaster.d.ts.map +1 -0
- package/dist/components/toaster.js +21 -0
- package/dist/components/toaster.js.map +1 -0
- package/dist/components/tooltip.d.ts +28 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/top-bar.d.ts +13 -0
- package/dist/components/top-bar.d.ts.map +1 -0
- package/dist/components/top-bar.js +16 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/marketing/footer.d.ts +31 -0
- package/dist/marketing/footer.d.ts.map +1 -0
- package/dist/marketing/footer.js +9 -0
- package/dist/marketing/footer.js.map +1 -0
- package/dist/marketing/hero.d.ts +29 -0
- package/dist/marketing/hero.d.ts.map +1 -0
- package/dist/marketing/hero.js +7 -0
- package/dist/marketing/hero.js.map +1 -0
- package/dist/marketing/index.d.ts +21 -0
- package/dist/marketing/index.d.ts.map +1 -0
- package/dist/marketing/index.js +21 -0
- package/dist/marketing/index.js.map +1 -0
- package/dist/marketing/logo-cloud.d.ts +15 -0
- package/dist/marketing/logo-cloud.d.ts.map +1 -0
- package/dist/marketing/logo-cloud.js +6 -0
- package/dist/marketing/logo-cloud.js.map +1 -0
- package/dist/marketing/nav.d.ts +33 -0
- package/dist/marketing/nav.d.ts.map +1 -0
- package/dist/marketing/nav.js +14 -0
- package/dist/marketing/nav.js.map +1 -0
- package/dist/marketing/prose.d.ts +12 -0
- package/dist/marketing/prose.d.ts.map +1 -0
- package/dist/marketing/prose.js +18 -0
- package/dist/marketing/prose.js.map +1 -0
- package/dist/marketing/section.d.ts +22 -0
- package/dist/marketing/section.d.ts.map +1 -0
- package/dist/marketing/section.js +7 -0
- package/dist/marketing/section.js.map +1 -0
- package/dist/showcase/components/code-block.d.ts +11 -0
- package/dist/showcase/components/code-block.d.ts.map +1 -0
- package/dist/showcase/components/code-block.js +20 -0
- package/dist/showcase/components/code-block.js.map +1 -0
- package/dist/showcase/components/example.d.ts +16 -0
- package/dist/showcase/components/example.d.ts.map +1 -0
- package/dist/showcase/components/example.js +14 -0
- package/dist/showcase/components/example.js.map +1 -0
- package/dist/showcase/components/section.d.ts +21 -0
- package/dist/showcase/components/section.d.ts.map +1 -0
- package/dist/showcase/components/section.js +10 -0
- package/dist/showcase/components/section.js.map +1 -0
- package/dist/showcase/components/swatch.d.ts +17 -0
- package/dist/showcase/components/swatch.d.ts.map +1 -0
- package/dist/showcase/components/swatch.js +6 -0
- package/dist/showcase/components/swatch.js.map +1 -0
- package/dist/showcase/index.d.ts +17 -0
- package/dist/showcase/index.d.ts.map +1 -0
- package/dist/showcase/index.js +17 -0
- package/dist/showcase/index.js.map +1 -0
- package/dist/showcase/page.d.ts +2 -0
- package/dist/showcase/page.d.ts.map +1 -0
- package/dist/showcase/page.js +1085 -0
- package/dist/showcase/page.js.map +1 -0
- package/dist/styles/generated/tokens.d.ts +131 -0
- package/dist/styles/generated/tokens.d.ts.map +1 -0
- package/dist/styles/generated/tokens.js +107 -0
- package/dist/styles/generated/tokens.js.map +1 -0
- package/dist/styles/globals.css +131 -0
- package/dist/styles/tailwind.preset.d.ts +181 -0
- package/dist/styles/tailwind.preset.d.ts.map +1 -0
- package/dist/styles/tailwind.preset.js +114 -0
- package/dist/styles/tailwind.preset.js.map +1 -0
- package/dist/tokens/index.d.ts +176 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +139 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/tokens.json +154 -0
- package/package.json +124 -0
- package/src/components/accordion.tsx +76 -0
- package/src/components/alert.tsx +113 -0
- package/src/components/app-shell.tsx +43 -0
- package/src/components/aspect-ratio.tsx +18 -0
- package/src/components/avatar-group.tsx +73 -0
- package/src/components/avatar.tsx +81 -0
- package/src/components/badge.tsx +77 -0
- package/src/components/breadcrumb.tsx +121 -0
- package/src/components/button.tsx +83 -0
- package/src/components/calendar.tsx +85 -0
- package/src/components/capacity-bar.tsx +80 -0
- package/src/components/card.tsx +104 -0
- package/src/components/checkbox.tsx +46 -0
- package/src/components/chip.tsx +74 -0
- package/src/components/collapsible.tsx +54 -0
- package/src/components/combobox.tsx +140 -0
- package/src/components/confirm-action.tsx +111 -0
- package/src/components/container.tsx +39 -0
- package/src/components/date-picker.tsx +98 -0
- package/src/components/dialog.tsx +174 -0
- package/src/components/drawer.tsx +157 -0
- package/src/components/dropdown-menu.tsx +200 -0
- package/src/components/empty-state.tsx +46 -0
- package/src/components/form-field.tsx +118 -0
- package/src/components/input.tsx +29 -0
- package/src/components/label.tsx +35 -0
- package/src/components/live-pill.tsx +35 -0
- package/src/components/metric-tile.tsx +83 -0
- package/src/components/money-breakdown.tsx +92 -0
- package/src/components/number-input.tsx +113 -0
- package/src/components/pagination.tsx +157 -0
- package/src/components/popover.tsx +46 -0
- package/src/components/progress.tsx +34 -0
- package/src/components/radio-group.tsx +46 -0
- package/src/components/scroll-area.tsx +55 -0
- package/src/components/select.tsx +169 -0
- package/src/components/separator.tsx +34 -0
- package/src/components/sidebar.tsx +168 -0
- package/src/components/skeleton.tsx +85 -0
- package/src/components/slider.tsx +58 -0
- package/src/components/spec.tsx +59 -0
- package/src/components/spinner.tsx +36 -0
- package/src/components/stack.tsx +80 -0
- package/src/components/status-pill.tsx +100 -0
- package/src/components/switch.tsx +37 -0
- package/src/components/table.tsx +129 -0
- package/src/components/tabs.tsx +72 -0
- package/src/components/textarea.tsx +27 -0
- package/src/components/theme-provider.tsx +131 -0
- package/src/components/theme-toggle.tsx +34 -0
- package/src/components/three-state.tsx +90 -0
- package/src/components/timestamp.tsx +107 -0
- package/src/components/toaster.tsx +55 -0
- package/src/components/tooltip.tsx +49 -0
- package/src/components/top-bar.tsx +29 -0
- package/src/index.ts +221 -0
- package/src/lib/utils.ts +10 -0
- package/src/marketing/footer.tsx +93 -0
- package/src/marketing/hero.tsx +92 -0
- package/src/marketing/index.ts +24 -0
- package/src/marketing/logo-cloud.tsx +35 -0
- package/src/marketing/nav.tsx +122 -0
- package/src/marketing/prose.tsx +45 -0
- package/src/marketing/section.tsx +77 -0
- package/src/showcase/components/code-block.tsx +66 -0
- package/src/showcase/components/example.tsx +47 -0
- package/src/showcase/components/section.tsx +70 -0
- package/src/showcase/components/swatch.tsx +52 -0
- package/src/showcase/index.tsx +16 -0
- package/src/showcase/page.tsx +4216 -0
- package/src/styles/generated/tokens.ts +119 -0
- package/src/styles/globals.css +131 -0
- package/src/styles/tailwind.preset.ts +134 -0
- package/src/test/a11y.test.tsx +638 -0
- package/src/test/marketing-a11y.test.tsx +138 -0
- package/src/test/setup.ts +47 -0
- package/src/tokens/index.ts +154 -0
- package/src/tokens/tokens.json +154 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
export const Pagination = React.forwardRef(({ currentPage, totalPages, onPageChange, siblingCount = 1, disabled, className, ...rest }, ref) => {
|
|
7
|
+
if (totalPages <= 1)
|
|
8
|
+
return null;
|
|
9
|
+
const pages = buildPageList(currentPage, totalPages, siblingCount);
|
|
10
|
+
const go = (p) => {
|
|
11
|
+
if (disabled)
|
|
12
|
+
return;
|
|
13
|
+
const clamped = Math.max(1, Math.min(totalPages, p));
|
|
14
|
+
if (clamped !== currentPage)
|
|
15
|
+
onPageChange(clamped);
|
|
16
|
+
};
|
|
17
|
+
return (_jsxs("nav", { ref: ref, "aria-label": "Pagination", className: cn("flex items-center gap-1", className), ...rest, children: [_jsx(PageButton, { "aria-label": "Previous page", onClick: () => go(currentPage - 1), disabled: disabled || currentPage <= 1, children: _jsx(ChevronLeft, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) }), pages.map((p, i) => p === "…" ? (_jsx("span", { role: "presentation", "aria-hidden": "true", className: "h-7 w-7 grid place-items-center text-text-subtle", children: _jsx(MoreHorizontal, { className: "h-3 w-3", strokeWidth: 1.75 }) }, `ellipsis-${i}`)) : (_jsx(PageButton, { "aria-label": `Page ${p}`, "aria-current": p === currentPage ? "page" : undefined, active: p === currentPage, onClick: () => go(p), disabled: disabled, children: p }, p))), _jsx(PageButton, { "aria-label": "Next page", onClick: () => go(currentPage + 1), disabled: disabled || currentPage >= totalPages, children: _jsx(ChevronRight, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) })] }));
|
|
18
|
+
});
|
|
19
|
+
Pagination.displayName = "Pagination";
|
|
20
|
+
function PageButton({ active, className, ...props }) {
|
|
21
|
+
return (_jsx("button", { type: "button", className: cn("min-w-7 h-7 px-2 rounded-sm text-xs font-medium tabular transition-colors",
|
|
22
|
+
// 44px targets on touch devices; dense 28px on desktop.
|
|
23
|
+
"pointer-coarse:min-w-11 pointer-coarse:h-11", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", active
|
|
24
|
+
? "bg-brand-forest text-brand-forest-foreground"
|
|
25
|
+
: "text-text-muted hover:bg-bg-subtle hover:text-foreground", "disabled:opacity-40 disabled:pointer-events-none", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function buildPageList(current, total, siblings) {
|
|
28
|
+
// Always include first + last; show ellipsis when there's a gap.
|
|
29
|
+
const range = (a, b) => {
|
|
30
|
+
const out = [];
|
|
31
|
+
for (let i = a; i <= b; i++)
|
|
32
|
+
out.push(i);
|
|
33
|
+
return out;
|
|
34
|
+
};
|
|
35
|
+
const totalShown = siblings * 2 + 5; // first + last + current + 2 ellipses
|
|
36
|
+
if (total <= totalShown)
|
|
37
|
+
return range(1, total);
|
|
38
|
+
const leftBound = Math.max(2, current - siblings);
|
|
39
|
+
const rightBound = Math.min(total - 1, current + siblings);
|
|
40
|
+
const showLeftDots = leftBound > 2;
|
|
41
|
+
const showRightDots = rightBound < total - 1;
|
|
42
|
+
const list = [1];
|
|
43
|
+
if (showLeftDots)
|
|
44
|
+
list.push("…");
|
|
45
|
+
for (const p of range(leftBound, rightBound))
|
|
46
|
+
list.push(p);
|
|
47
|
+
if (showRightDots)
|
|
48
|
+
list.push("…");
|
|
49
|
+
list.push(total);
|
|
50
|
+
return list;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AA2BlC,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACxC,CACE,EACE,WAAW,EACX,UAAU,EACV,YAAY,EACZ,YAAY,GAAG,CAAC,EAChB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,IAAI,UAAU,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,KAAK,GAAG,aAAa,CAAC,WAAW,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IAEnE,MAAM,EAAE,GAAG,CAAC,CAAS,EAAE,EAAE;QACvB,IAAI,QAAQ;YAAE,OAAO;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,OAAO,KAAK,WAAW;YAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF,OAAO,CACL,eACE,GAAG,EAAE,GAAG,gBACG,YAAY,EACvB,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,KAC/C,IAAI,aAER,KAAC,UAAU,kBACE,eAAe,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,CAA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ClC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjB,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
/**
|
|
4
|
+
* Popover — generic click-to-open floating panel.
|
|
5
|
+
*
|
|
6
|
+
* Use for:
|
|
7
|
+
* - Date pickers
|
|
8
|
+
* - Filter mini-menus
|
|
9
|
+
* - "Quick edit" inline form panels
|
|
10
|
+
* - Help text that's too long for a Tooltip
|
|
11
|
+
*
|
|
12
|
+
* Tooltip is hover-only and small; Popover is click + can hold any
|
|
13
|
+
* content (form, list, mini-chart). DropdownMenu is for action menus —
|
|
14
|
+
* if your popover content is "items you click," use DropdownMenu instead.
|
|
15
|
+
*
|
|
16
|
+
* Accessibility: PopoverContent renders with role="dialog", which needs
|
|
17
|
+
* an accessible name — always pass `aria-label` (or `aria-labelledby`
|
|
18
|
+
* pointing at a heading inside). The a11y test suite enforces this shape.
|
|
19
|
+
*/
|
|
20
|
+
export declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
21
|
+
export declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAG5D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,yCAAwB,CAAC;AAC7C,eAAO,MAAM,cAAc,gHAA2B,CAAC;AACvD,eAAO,MAAM,aAAa,4GAA0B,CAAC;AAErD,eAAO,MAAM,cAAc,gKAiBzB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* Popover — generic click-to-open floating panel.
|
|
8
|
+
*
|
|
9
|
+
* Use for:
|
|
10
|
+
* - Date pickers
|
|
11
|
+
* - Filter mini-menus
|
|
12
|
+
* - "Quick edit" inline form panels
|
|
13
|
+
* - Help text that's too long for a Tooltip
|
|
14
|
+
*
|
|
15
|
+
* Tooltip is hover-only and small; Popover is click + can hold any
|
|
16
|
+
* content (form, list, mini-chart). DropdownMenu is for action menus —
|
|
17
|
+
* if your popover content is "items you click," use DropdownMenu instead.
|
|
18
|
+
*
|
|
19
|
+
* Accessibility: PopoverContent renders with role="dialog", which needs
|
|
20
|
+
* an accessible name — always pass `aria-label` (or `aria-labelledby`
|
|
21
|
+
* pointing at a heading inside). The a11y test suite enforces this shape.
|
|
22
|
+
*/
|
|
23
|
+
export const Popover = PopoverPrimitive.Root;
|
|
24
|
+
export const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
25
|
+
export const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
26
|
+
export const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-72 rounded border border-border-strong bg-background p-3 text-sm text-foreground shadow-md outline-none", "data-[state=open]:animate-fade-in", className), ...props }) })));
|
|
27
|
+
PopoverContent.displayName = "PopoverContent";
|
|
28
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,gHAAgH,EAChH,mCAAmC,EACnC,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3
|
+
/**
|
|
4
|
+
* Progress — for multi-step flows (waiver → emergency contact → done),
|
|
5
|
+
* upload bars, anything with a known percent completion.
|
|
6
|
+
*
|
|
7
|
+
* If you don't know the percent (indeterminate), use Skeleton or Spinner.
|
|
8
|
+
*
|
|
9
|
+
* For "spots filled" use CapacityBar — same shape but with a min-to-run
|
|
10
|
+
* warning color and tabular count alongside.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAG9D;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,2JAiBnB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* Progress — for multi-step flows (waiver → emergency contact → done),
|
|
8
|
+
* upload bars, anything with a known percent completion.
|
|
9
|
+
*
|
|
10
|
+
* If you don't know the percent (indeterminate), use Skeleton or Spinner.
|
|
11
|
+
*
|
|
12
|
+
* For "spots filled" use CapacityBar — same shape but with a min-to-run
|
|
13
|
+
* warning color and tabular count alongside.
|
|
14
|
+
*/
|
|
15
|
+
export const Progress = React.forwardRef(({ className, value, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn("relative h-1.5 w-full overflow-hidden rounded-full bg-bg-muted", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: "h-full w-full flex-1 bg-brand-forest transition-transform duration-150", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
|
|
16
|
+
Progress.displayName = "Progress";
|
|
17
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
+
/**
|
|
4
|
+
* RadioGroup + RadioGroupItem — Radix-backed, keyboard-navigable
|
|
5
|
+
* (Arrow / Home / End). Always wrap items in a <RadioGroup> with a
|
|
6
|
+
* matching set of <Label htmlFor=> wiring.
|
|
7
|
+
*/
|
|
8
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAGnE;;;;GAIG;AACH,eAAO,MAAM,UAAU,+JASrB,CAAC;AAGH,eAAO,MAAM,cAAc,yKAqBzB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* RadioGroup + RadioGroupItem — Radix-backed, keyboard-navigable
|
|
8
|
+
* (Arrow / Home / End). Always wrap items in a <RadioGroup> with a
|
|
9
|
+
* matching set of <Label htmlFor=> wiring.
|
|
10
|
+
*/
|
|
11
|
+
export const RadioGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(RadioGroupPrimitive.Root, { ref: ref, className: cn("grid gap-2", className), ...props })));
|
|
12
|
+
RadioGroup.displayName = "RadioGroup";
|
|
13
|
+
export const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn("aspect-square h-4 w-4 rounded-full border border-border-strong bg-background transition-colors",
|
|
14
|
+
// Invisible hit-area extension: 24px desktop / 44px touch.
|
|
15
|
+
"relative after:absolute after:-inset-1 pointer-coarse:after:-inset-3.5", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:border-brand-forest", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx("span", { className: "h-2 w-2 rounded-full bg-brand-forest" }) }) })));
|
|
16
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
17
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,mBAAmB,CAAC,IAAI,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,KAClC,KAAK,GACT,CACH,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,mBAAmB,CAAC,IAAI,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,gGAAgG;IAChG,2DAA2D;IAC3D,wEAAwE,EACxE,0IAA0I,EAC1I,iDAAiD,EACjD,0CAA0C,EAC1C,SAAS,CACV,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,SAAS,IAAC,SAAS,EAAC,kCAAkC,YACzE,eAAM,SAAS,EAAC,sCAAsC,GAAG,GAC3B,GACP,CAC5B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAGnE;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,+JAerB,CAAC;AAGH,eAAO,MAAM,SAAS,wKAmBpB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* ScrollArea — styled, consistent custom scrollbars across browsers.
|
|
8
|
+
* Wraps content that needs to scroll within a bounded region.
|
|
9
|
+
*
|
|
10
|
+
* <ScrollArea className="h-72 w-48 rounded border">
|
|
11
|
+
* <div className="p-4">… long content …</div>
|
|
12
|
+
* </ScrollArea>
|
|
13
|
+
*
|
|
14
|
+
* For full-page scroll, use the browser default — don't wrap <body>.
|
|
15
|
+
*/
|
|
16
|
+
export const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, className: cn("relative overflow-hidden", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
|
|
17
|
+
ScrollArea.displayName = "ScrollArea";
|
|
18
|
+
export const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: cn("flex touch-none select-none transition-colors", orientation === "vertical" &&
|
|
19
|
+
"h-full w-2 border-l border-l-transparent p-[1px]", orientation === "horizontal" &&
|
|
20
|
+
"h-2 flex-col border-t border-t-transparent p-[1px]", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border-strong" }) })));
|
|
21
|
+
ScrollBar.displayName = "ScrollBar";
|
|
22
|
+
//# sourceMappingURL=scroll-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.js","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,MAAC,mBAAmB,CAAC,IAAI,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,aAET,KAAC,mBAAmB,CAAC,QAAQ,IAAC,SAAS,EAAC,iCAAiC,YACtE,QAAQ,GACoB,EAC/B,KAAC,SAAS,KAAG,EACb,KAAC,mBAAmB,CAAC,MAAM,KAAG,IACL,CAC5B,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5D,KAAC,mBAAmB,CAAC,mBAAmB,IACtC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,+CAA+C,EAC/C,WAAW,KAAK,UAAU;QACxB,kDAAkD,EACpD,WAAW,KAAK,YAAY;QAC1B,oDAAoD,EACtD,SAAS,CACV,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,eAAe,IAAC,SAAS,EAAC,+CAA+C,GAAG,GACzD,CAC3C,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
/**
|
|
4
|
+
* Select — keyboard-accessible dropdown built on Radix.
|
|
5
|
+
*
|
|
6
|
+
* <Select value={v} onValueChange={setV}>
|
|
7
|
+
* <SelectTrigger><SelectValue placeholder="Pick a venue" /></SelectTrigger>
|
|
8
|
+
* <SelectContent>
|
|
9
|
+
* <SelectItem value="astoria">Astoria Turf</SelectItem>
|
|
10
|
+
* …
|
|
11
|
+
* </SelectContent>
|
|
12
|
+
* </Select>
|
|
13
|
+
*
|
|
14
|
+
* Native <select> is fine for tiny lists in dense forms; reach for this
|
|
15
|
+
* when you want typeahead, item groups, or styled portals.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
18
|
+
export declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
export declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM,uCAAuB,CAAC;AAC3C,eAAO,MAAM,WAAW,yGAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,0GAAwB,CAAC;AAEjD,eAAO,MAAM,aAAa,oKAwBxB,CAAC;AAGH,eAAO,MAAM,oBAAoB,qKAc/B,CAAC;AAGH,eAAO,MAAM,sBAAsB,uKAcjC,CAAC;AAGH,eAAO,MAAM,aAAa,8JA8BxB,CAAC;AAGH,eAAO,MAAM,WAAW,4JAYtB,CAAC;AAGH,eAAO,MAAM,UAAU,2JAqBrB,CAAC;AAGH,eAAO,MAAM,eAAe,gKAS1B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
6
|
+
import { cn } from "../lib/utils.js";
|
|
7
|
+
/**
|
|
8
|
+
* Select — keyboard-accessible dropdown built on Radix.
|
|
9
|
+
*
|
|
10
|
+
* <Select value={v} onValueChange={setV}>
|
|
11
|
+
* <SelectTrigger><SelectValue placeholder="Pick a venue" /></SelectTrigger>
|
|
12
|
+
* <SelectContent>
|
|
13
|
+
* <SelectItem value="astoria">Astoria Turf</SelectItem>
|
|
14
|
+
* …
|
|
15
|
+
* </SelectContent>
|
|
16
|
+
* </Select>
|
|
17
|
+
*
|
|
18
|
+
* Native <select> is fine for tiny lists in dense forms; reach for this
|
|
19
|
+
* when you want typeahead, item groups, or styled portals.
|
|
20
|
+
*/
|
|
21
|
+
export const Select = SelectPrimitive.Root;
|
|
22
|
+
export const SelectGroup = SelectPrimitive.Group;
|
|
23
|
+
export const SelectValue = SelectPrimitive.Value;
|
|
24
|
+
export const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-8 pointer-coarse:h-11 w-full items-center justify-between gap-2 rounded-sm border border-border-strong bg-background px-2.5 text-sm", "placeholder:text-text-subtle", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50", "[&>span]:line-clamp-1", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-3.5 w-3.5 opacity-60 shrink-0", strokeWidth: 1.75 }) })] })));
|
|
25
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
26
|
+
export const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "h-3 w-3", strokeWidth: 1.75 }) })));
|
|
27
|
+
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
28
|
+
export const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "h-3 w-3", strokeWidth: 1.75 }) })));
|
|
29
|
+
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
30
|
+
export const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-80 min-w-[8rem] overflow-hidden rounded-md border border-border-strong bg-background text-foreground shadow-md", "data-[state=open]:animate-fade-in", position === "popper" &&
|
|
31
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
32
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
|
|
33
|
+
SelectContent.displayName = "SelectContent";
|
|
34
|
+
export const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("py-1.5 pl-7 pr-2 text-[10px] font-semibold uppercase tracking-[0.06em] text-text-muted", className), ...props })));
|
|
35
|
+
SelectLabel.displayName = "SelectLabel";
|
|
36
|
+
export const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pointer-coarse:min-h-11 pl-7 pr-2 text-sm outline-none transition-colors", "focus:bg-bg-subtle focus:text-foreground", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-3 w-3", strokeWidth: 2.5 }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
|
|
37
|
+
SelectItem.displayName = "SelectItem";
|
|
38
|
+
export const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props })));
|
|
39
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
40
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|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}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
/**
|
|
4
|
+
* Separator — a thin divider (`<hr>` for horizontal, vertical bar for
|
|
5
|
+
* vertical). Decorative by default. Set `decorative={false}` when the
|
|
6
|
+
* separator semantically separates content groups (screen readers will
|
|
7
|
+
* announce it).
|
|
8
|
+
*/
|
|
9
|
+
export declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAGhE;;;;;GAKG;AACH,eAAO,MAAM,SAAS,6JAoBrB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* Separator — a thin divider (`<hr>` for horizontal, vertical bar for
|
|
8
|
+
* vertical). Decorative by default. Set `decorative={false}` when the
|
|
9
|
+
* separator semantically separates content groups (screen readers will
|
|
10
|
+
* announce it).
|
|
11
|
+
*/
|
|
12
|
+
export const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-px w-full" : "h-full w-px", className), ...props })));
|
|
13
|
+
Separator.displayName = "Separator";
|
|
14
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAIvC,CACE,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EACtE,GAAG,EACH,EAAE,CAAC,CACH,KAAC,kBAAkB,CAAC,IAAI,IACtB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,oBAAoB,EACpB,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,EAC5D,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO,uGAalB,CAAC;AAGH,eAAO,MAAM,aAAa,6GASxB,CAAC;AAGH,eAAO,MAAM,WAAW,uGAStB,CAAC;AAGH,eAAO,MAAM,aAAa,6GASxB,CAAC;AAGH,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/E,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,4FAgBzB,CAAC;AAGH,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,iDAAiD;IACjD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,4FAsDvB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* Sidebar primitives — composable nav sidebar.
|
|
8
|
+
*
|
|
9
|
+
* <Sidebar>
|
|
10
|
+
* <SidebarHeader><BrandMark /></SidebarHeader>
|
|
11
|
+
* <SidebarBody>
|
|
12
|
+
* <SidebarSection label="Today">
|
|
13
|
+
* <SidebarItem asChild active>
|
|
14
|
+
* <Link href="/admin">
|
|
15
|
+
* <LayoutDashboard className="h-4 w-4" strokeWidth={1.75} />
|
|
16
|
+
* <span className="flex-1 truncate">Today</span>
|
|
17
|
+
* </Link>
|
|
18
|
+
* </SidebarItem>
|
|
19
|
+
* </SidebarSection>
|
|
20
|
+
* </SidebarBody>
|
|
21
|
+
* <SidebarFooter>v0.1</SidebarFooter>
|
|
22
|
+
* </Sidebar>
|
|
23
|
+
*
|
|
24
|
+
* For non-Next contexts, pass `href` prop directly; SidebarItem renders
|
|
25
|
+
* an <a> by default.
|
|
26
|
+
*/
|
|
27
|
+
export const Sidebar = React.forwardRef(({ className, ...props }, ref) => (_jsx("aside", { ref: ref, "aria-label": "Sidebar navigation", className: cn("hidden lg:flex flex-col w-56 shrink-0 border-r border-border bg-bg-subtle/40 sticky top-0 h-screen", className), ...props })));
|
|
28
|
+
Sidebar.displayName = "Sidebar";
|
|
29
|
+
export const SidebarHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("px-5 py-4 border-b border-border", className), ...props })));
|
|
30
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
31
|
+
export const SidebarBody = React.forwardRef(({ className, ...props }, ref) => (_jsx("nav", { ref: ref, className: cn("flex-1 overflow-y-auto scrollbar-thin py-3 px-2", className), ...props })));
|
|
32
|
+
SidebarBody.displayName = "SidebarBody";
|
|
33
|
+
export const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("px-3 py-3 border-t border-border", className), ...props })));
|
|
34
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
35
|
+
export const SidebarSection = React.forwardRef(({ className, label, children, ...props }, ref) => (_jsxs("div", { ref: ref, className: cn("mt-4 first:mt-0", className), ...props, children: [label && (_jsx("div", { className: "px-2.5 pb-1 text-[10px] font-semibold uppercase tracking-[0.06em] text-text-subtle", children: label })), _jsx("ul", { className: "space-y-0.5", children: React.Children.map(children, (child) => child == null || child === false ? null : _jsx("li", { children: child })) })] })));
|
|
36
|
+
SidebarSection.displayName = "SidebarSection";
|
|
37
|
+
export const SidebarItem = React.forwardRef(({ asChild, active, icon, badge, className, children, href, ...rest }, ref) => {
|
|
38
|
+
const baseClasses = cn("group flex items-center gap-2.5 rounded-sm px-2.5 py-1.5 text-sm transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", active
|
|
39
|
+
? "bg-bg-subtle text-foreground font-medium border-l-2 border-l-brand-forest -ml-px pl-[10px]"
|
|
40
|
+
: "text-text-muted hover:bg-bg-muted hover:text-foreground", className);
|
|
41
|
+
if (asChild) {
|
|
42
|
+
const SlotComp = Slot;
|
|
43
|
+
return (_jsx(SlotComp, { ref: ref, className: baseClasses, "aria-current": active ? "page" : undefined, ...rest, children: children }));
|
|
44
|
+
}
|
|
45
|
+
return (_jsxs("a", { ref: ref, href: href, className: baseClasses, "aria-current": active ? "page" : undefined, ...rest, children: [icon && (_jsx("span", { className: cn("shrink-0 flex items-center", active ? "text-brand-forest" : "text-text-muted"), children: icon })), _jsx("span", { className: "flex-1 truncate", children: children }), badge && _jsx("span", { className: "shrink-0", children: badge })] }));
|
|
46
|
+
});
|
|
47
|
+
SidebarItem.displayName = "SidebarItem";
|
|
48
|
+
//# sourceMappingURL=sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,gBACE,GAAG,EAAE,GAAG,gBACG,oBAAoB,EAC/B,SAAS,EAAE,EAAE,CACX,oGAAoG,EACpG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAG3C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,kCAAkC,EAAE,SAAS,CAAC,KACxD,KAAK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
* Skeleton — per design.md §12
|
|
4
|
+
* Use over spinners. Pulse opacity 0.5 → 1, 1.5s. Respects prefers-reduced-motion.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* SkeletonList — loading placeholder echoing a row list (§3.14:
|
|
9
|
+
* skeletons echo the final shape). Use as the `loading` slot of
|
|
10
|
+
* ThreeState for list views.
|
|
11
|
+
*/
|
|
12
|
+
export declare function SkeletonList({ rows, className, ...props }: React.HTMLAttributes<HTMLDivElement> & {
|
|
13
|
+
rows?: number;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* SkeletonTable — loading placeholder echoing a data table. Match
|
|
17
|
+
* `columns` to the real table so the layout doesn't jump on load.
|
|
18
|
+
*/
|
|
19
|
+
export declare function SkeletonTable({ rows, columns, className, ...props }: React.HTMLAttributes<HTMLDivElement> & {
|
|
20
|
+
rows?: number;
|
|
21
|
+
columns?: number;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* Skeleton — per design.md §12
|
|
5
|
+
* Use over spinners. Pulse opacity 0.5 → 1, 1.5s. Respects prefers-reduced-motion.
|
|
6
|
+
*/
|
|
7
|
+
export function Skeleton({ className, ...props }) {
|
|
8
|
+
return (_jsx("div", { className: cn("animate-pulse rounded bg-bg-muted", className), "aria-hidden": "true", ...props }));
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SkeletonList — loading placeholder echoing a row list (§3.14:
|
|
12
|
+
* skeletons echo the final shape). Use as the `loading` slot of
|
|
13
|
+
* ThreeState for list views.
|
|
14
|
+
*/
|
|
15
|
+
export function SkeletonList({ rows = 3, className, ...props }) {
|
|
16
|
+
return (_jsx("div", { className: cn("space-y-2", className), role: "status", "aria-label": "Loading", ...props, children: Array.from({ length: rows }, (_, i) => (_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Skeleton, { className: "h-8 w-8 rounded-full shrink-0" }), _jsxs("div", { className: "flex-1 space-y-1.5", children: [_jsx(Skeleton, { className: "h-3 w-2/5" }), _jsx(Skeleton, { className: "h-3 w-3/5" })] })] }, i))) }));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* SkeletonTable — loading placeholder echoing a data table. Match
|
|
20
|
+
* `columns` to the real table so the layout doesn't jump on load.
|
|
21
|
+
*/
|
|
22
|
+
export function SkeletonTable({ rows = 5, columns = 4, className, ...props }) {
|
|
23
|
+
return (_jsxs("div", { className: cn("space-y-2", className), role: "status", "aria-label": "Loading", ...props, children: [_jsx("div", { className: "flex gap-4 border-b border-border pb-2", children: Array.from({ length: columns }, (_, i) => (_jsx(Skeleton, { className: "h-3 flex-1" }, i))) }), Array.from({ length: rows }, (_, r) => (_jsx("div", { className: "flex gap-4 py-1", children: Array.from({ length: columns }, (_, c) => (_jsx(Skeleton, { className: "h-4 flex-1" }, c))) }, r)))] }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EAC6B;IACrC,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CAAC,mCAAmC,EAAE,SAAS,CAAC,iBACjD,MAAM,KACd,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,M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AAE,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACzC,KAAC,QAAQ,IAAS,SAAS,EAAC,YAAY,IAAzB,CAAC,CAA2B,CAC5C,CAAC,IAHM,CAAC,CAIL,CACP,CAAC,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
+
/**
|
|
4
|
+
* Slider — Radix-backed range input. Keyboard: arrows step, PageUp/Down
|
|
5
|
+
* big-step, Home/End min/max. Pass `aria-label` (or wire a Label to the
|
|
6
|
+
* thumb via `aria-labelledby`) — the a11y suite enforces a name.
|
|
7
|
+
*
|
|
8
|
+
* <Slider aria-label="Max price" min={0} max={50} step={5}
|
|
9
|
+
* defaultValue={[20]} />
|
|
10
|
+
*
|
|
11
|
+
* Supports multiple thumbs by passing more values: defaultValue={[10, 30]}.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAG1D;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,yJAwCjB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* Slider — Radix-backed range input. Keyboard: arrows step, PageUp/Down
|
|
8
|
+
* big-step, Home/End min/max. Pass `aria-label` (or wire a Label to the
|
|
9
|
+
* thumb via `aria-labelledby`) — the a11y suite enforces a name.
|
|
10
|
+
*
|
|
11
|
+
* <Slider aria-label="Max price" min={0} max={50} step={5}
|
|
12
|
+
* defaultValue={[20]} />
|
|
13
|
+
*
|
|
14
|
+
* Supports multiple thumbs by passing more values: defaultValue={[10, 30]}.
|
|
15
|
+
*/
|
|
16
|
+
export const Slider = React.forwardRef(({ className, "aria-label": ariaLabel, ...props }, ref) => {
|
|
17
|
+
const values = props.value ?? props.defaultValue ?? [0];
|
|
18
|
+
// role="slider" lives on each Radix THUMB, not the root — a label on
|
|
19
|
+
// the root is invisible to screen readers, so name the thumbs.
|
|
20
|
+
const thumbLabel = (i) => values.length > 1
|
|
21
|
+
? `${ariaLabel} (${i + 1} of ${values.length})`
|
|
22
|
+
: ariaLabel;
|
|
23
|
+
return (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn("relative flex w-full touch-none select-none items-center",
|
|
24
|
+
// Comfortable grab zone without visual bulk.
|
|
25
|
+
"h-5 pointer-coarse:h-11", "data-[disabled]:opacity-50 data-[disabled]:pointer-events-none", className), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative h-1 w-full grow overflow-hidden rounded-full bg-bg-muted", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-brand-forest" }) }), values.map((_, i) => (_jsx(SliderPrimitive.Thumb, { "aria-label": thumbLabel(i), className: cn("block h-4 w-4 rounded-full border-2 border-brand-forest bg-background shadow-sm transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
26
|
+
// Invisible hit-area extension: 24px desktop / 44px touch.
|
|
27
|
+
"relative after:absolute after:-inset-1 pointer-coarse:after:-inset-3.5") }, i)))] }));
|
|
28
|
+
});
|
|
29
|
+
Slider.displayName = "Slider";
|
|
30
|
+
//# sourceMappingURL=slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC1D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC;IACxD,qEAAqE;IACrE,+DAA+D;IAC/D,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,EAAE,CAC/B,MAAM,CAAC,MAAM,GAAG,CAAC;QACf,CAAC,CAAC,GAAG,SAAS,KAAK,CAAC,GAAG,CAAC,OAAO,MAAM,CAAC,MAAM,GAAG;QAC/C,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,CACL,MAAC,eAAe,CAAC,IAAI,IACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,0DAA0D;QAC1D,6CAA6C;QAC7C,yBAAyB,EACzB,gEAAgE,EAChE,SAAS,CACV,KACG,KAAK,aAET,KAAC,eAAe,CAAC,KAAK,IAAC,SAAS,EAAC,mEAAmE,YAClG,KAAC,eAAe,CAAC,KAAK,IAAC,SAAS,EAAC,iCAAiC,GAAG,GAC/C,EACvB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACpB,KAAC,eAAe,CAAC,KAAK,kBAER,UAAU,CAAC,CAAC,CAAC,EACzB,SAAS,EAAE,EAAE,CACX,mGAAmG,EACnG,0IAA0I;gBAC1I,2DAA2D;gBAC3D,wEAAwE,CACzE,IAPI,CAAC,CAQN,CACH,CAAC,IACmB,CACxB,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* SpecList + Spec — semantic key-value display (`<dl>` / `<dt>` / `<dd>`).
|
|
4
|
+
* Use for game detail "About this game" panels, settings summaries,
|
|
5
|
+
* receipts.
|
|
6
|
+
*
|
|
7
|
+
* <SpecList columns={2}>
|
|
8
|
+
* <Spec label="Format">5v5</Spec>
|
|
9
|
+
* <Spec label="Capacity">10 players</Spec>
|
|
10
|
+
* <Spec label="Start"><Timestamp iso={…} /></Spec>
|
|
11
|
+
* </SpecList>
|
|
12
|
+
*/
|
|
13
|
+
declare const COLUMNS_MAP: {
|
|
14
|
+
readonly 1: "grid-cols-1";
|
|
15
|
+
readonly 2: "grid-cols-2";
|
|
16
|
+
readonly 3: "grid-cols-3";
|
|
17
|
+
readonly 4: "grid-cols-4";
|
|
18
|
+
};
|
|
19
|
+
declare const GAP_MAP: {
|
|
20
|
+
readonly 2: "gap-2";
|
|
21
|
+
readonly 3: "gap-3";
|
|
22
|
+
readonly 4: "gap-4";
|
|
23
|
+
readonly 6: "gap-6";
|
|
24
|
+
};
|
|
25
|
+
export interface SpecListProps extends React.HTMLAttributes<HTMLDListElement> {
|
|
26
|
+
columns?: keyof typeof COLUMNS_MAP;
|
|
27
|
+
gap?: keyof typeof GAP_MAP;
|
|
28
|
+
}
|
|
29
|
+
export declare const SpecList: React.ForwardRefExoticComponent<SpecListProps & React.RefAttributes<HTMLDListElement>>;
|
|
30
|
+
export interface SpecProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
31
|
+
label: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export declare const Spec: React.ForwardRefExoticComponent<SpecProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* SpecList + Spec — semantic key-value display (`<dl>` / `<dt>` / `<dd>`).
|
|
6
|
+
* Use for game detail "About this game" panels, settings summaries,
|
|
7
|
+
* receipts.
|
|
8
|
+
*
|
|
9
|
+
* <SpecList columns={2}>
|
|
10
|
+
* <Spec label="Format">5v5</Spec>
|
|
11
|
+
* <Spec label="Capacity">10 players</Spec>
|
|
12
|
+
* <Spec label="Start"><Timestamp iso={…} /></Spec>
|
|
13
|
+
* </SpecList>
|
|
14
|
+
*/
|
|
15
|
+
const COLUMNS_MAP = {
|
|
16
|
+
1: "grid-cols-1",
|
|
17
|
+
2: "grid-cols-2",
|
|
18
|
+
3: "grid-cols-3",
|
|
19
|
+
4: "grid-cols-4",
|
|
20
|
+
};
|
|
21
|
+
const GAP_MAP = {
|
|
22
|
+
2: "gap-2",
|
|
23
|
+
3: "gap-3",
|
|
24
|
+
4: "gap-4",
|
|
25
|
+
6: "gap-6",
|
|
26
|
+
};
|
|
27
|
+
export const SpecList = React.forwardRef(({ className, columns = 2, gap = 4, ...props }, ref) => (_jsx("dl", { ref: ref, className: cn("grid", COLUMNS_MAP[columns], GAP_MAP[gap], className), ...props })));
|
|
28
|
+
SpecList.displayName = "SpecList";
|
|
29
|
+
export const Spec = React.forwardRef(({ className, label, children, ...props }, ref) => (_jsxs("div", { ref: ref, className: cn("", className), ...props, children: [_jsx("dt", { className: "text-[10px] font-medium uppercase tracking-[0.04em] text-text-muted", children: label }), _jsx("dd", { className: "text-sm mt-0.5 text-foreground", children: children })] })));
|
|
30
|
+
Spec.displayName = "Spec";
|
|
31
|
+
//# sourceMappingURL=spec.js.map
|