@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.
Files changed (340) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/components/accordion.d.ts +19 -0
  4. package/dist/components/accordion.d.ts.map +1 -0
  5. package/dist/components/accordion.js +26 -0
  6. package/dist/components/accordion.js.map +1 -0
  7. package/dist/components/alert.d.ts +26 -0
  8. package/dist/components/alert.d.ts.map +1 -0
  9. package/dist/components/alert.js.map +1 -0
  10. package/dist/components/app-shell.d.ts +21 -0
  11. package/dist/components/app-shell.d.ts.map +1 -0
  12. package/dist/components/app-shell.js +25 -0
  13. package/dist/components/app-shell.js.map +1 -0
  14. package/dist/components/aspect-ratio.d.ts +16 -0
  15. package/dist/components/aspect-ratio.d.ts.map +1 -0
  16. package/dist/components/aspect-ratio.js +17 -0
  17. package/dist/components/aspect-ratio.js.map +1 -0
  18. package/dist/components/avatar-group.d.ts +31 -0
  19. package/dist/components/avatar-group.d.ts.map +1 -0
  20. package/dist/components/avatar.d.ts +15 -0
  21. package/dist/components/avatar.d.ts.map +1 -0
  22. package/dist/components/avatar.js +20 -0
  23. package/dist/components/avatar.js.map +1 -0
  24. package/dist/components/badge.d.ts +27 -0
  25. package/dist/components/badge.d.ts.map +1 -0
  26. package/dist/components/badge.js +51 -0
  27. package/dist/components/badge.js.map +1 -0
  28. package/dist/components/breadcrumb.js.map +1 -0
  29. package/dist/components/button.d.ts +33 -0
  30. package/dist/components/button.d.ts.map +1 -0
  31. package/dist/components/button.js +58 -0
  32. package/dist/components/button.js.map +1 -0
  33. package/dist/components/calendar.d.ts +15 -0
  34. package/dist/components/calendar.d.ts.map +1 -0
  35. package/dist/components/calendar.js +33 -0
  36. package/dist/components/calendar.js.map +1 -0
  37. package/dist/components/capacity-bar.d.ts +32 -0
  38. package/dist/components/capacity-bar.d.ts.map +1 -0
  39. package/dist/components/capacity-bar.js +29 -0
  40. package/dist/components/capacity-bar.js.map +1 -0
  41. package/dist/components/card.d.ts +26 -0
  42. package/dist/components/card.d.ts.map +1 -0
  43. package/dist/components/card.js +20 -0
  44. package/dist/components/checkbox.d.ts +11 -0
  45. package/dist/components/checkbox.d.ts.map +1 -0
  46. package/dist/components/checkbox.js +19 -0
  47. package/dist/components/chip.d.ts +23 -0
  48. package/dist/components/chip.d.ts.map +1 -0
  49. package/dist/components/chip.js +32 -0
  50. package/dist/components/chip.js.map +1 -0
  51. package/dist/components/collapsible.d.ts +16 -0
  52. package/dist/components/collapsible.js +22 -0
  53. package/dist/components/collapsible.js.map +1 -0
  54. package/dist/components/combobox.d.ts +38 -0
  55. package/dist/components/combobox.d.ts.map +1 -0
  56. package/dist/components/combobox.js +17 -0
  57. package/dist/components/combobox.js.map +1 -0
  58. package/dist/components/confirm-action.d.ts +36 -0
  59. package/dist/components/confirm-action.d.ts.map +1 -0
  60. package/dist/components/confirm-action.js +21 -0
  61. package/dist/components/confirm-action.js.map +1 -0
  62. package/dist/components/container.js.map +1 -0
  63. package/dist/components/date-picker.d.ts.map +1 -0
  64. package/dist/components/date-picker.js +22 -0
  65. package/dist/components/date-picker.js.map +1 -0
  66. package/dist/components/dialog.d.ts +28 -0
  67. package/dist/components/dialog.d.ts.map +1 -0
  68. package/dist/components/dialog.js.map +1 -0
  69. package/dist/components/drawer.js +55 -0
  70. package/dist/components/drawer.js.map +1 -0
  71. package/dist/components/dropdown-menu.d.ts +39 -0
  72. package/dist/components/dropdown-menu.d.ts.map +1 -0
  73. package/dist/components/dropdown-menu.js +47 -0
  74. package/dist/components/empty-state.d.ts +15 -0
  75. package/dist/components/empty-state.d.ts.map +1 -0
  76. package/dist/components/empty-state.js +6 -0
  77. package/dist/components/form-field.d.ts +32 -0
  78. package/dist/components/form-field.d.ts.map +1 -0
  79. package/dist/components/form-field.js +31 -0
  80. package/dist/components/form-field.js.map +1 -0
  81. package/dist/components/input.d.ts +10 -0
  82. package/dist/components/input.d.ts.map +1 -0
  83. package/dist/components/input.js +6 -0
  84. package/dist/components/input.js.map +1 -0
  85. package/dist/components/label.d.ts +11 -0
  86. package/dist/components/label.d.ts.map +1 -0
  87. package/dist/components/label.js +13 -0
  88. package/dist/components/label.js.map +1 -0
  89. package/dist/components/live-pill.d.ts +14 -0
  90. package/dist/components/live-pill.js +15 -0
  91. package/dist/components/live-pill.js.map +1 -0
  92. package/dist/components/metric-tile.d.ts +23 -0
  93. package/dist/components/metric-tile.d.ts.map +1 -0
  94. package/dist/components/money-breakdown.d.ts +36 -0
  95. package/dist/components/money-breakdown.d.ts.map +1 -0
  96. package/dist/components/money-breakdown.js +12 -0
  97. package/dist/components/money-breakdown.js.map +1 -0
  98. package/dist/components/number-input.d.ts +16 -0
  99. package/dist/components/number-input.d.ts.map +1 -0
  100. package/dist/components/number-input.js +30 -0
  101. package/dist/components/number-input.js.map +1 -0
  102. package/dist/components/pagination.d.ts +27 -0
  103. package/dist/components/pagination.d.ts.map +1 -0
  104. package/dist/components/pagination.js +52 -0
  105. package/dist/components/pagination.js.map +1 -0
  106. package/dist/components/popover.d.ts +24 -0
  107. package/dist/components/popover.d.ts.map +1 -0
  108. package/dist/components/popover.js +28 -0
  109. package/dist/components/popover.js.map +1 -0
  110. package/dist/components/progress.d.ts +13 -0
  111. package/dist/components/progress.d.ts.map +1 -0
  112. package/dist/components/progress.js +17 -0
  113. package/dist/components/radio-group.d.ts +10 -0
  114. package/dist/components/radio-group.d.ts.map +1 -0
  115. package/dist/components/radio-group.js +17 -0
  116. package/dist/components/radio-group.js.map +1 -0
  117. package/dist/components/scroll-area.d.ts.map +1 -0
  118. package/dist/components/scroll-area.js +22 -0
  119. package/dist/components/scroll-area.js.map +1 -0
  120. package/dist/components/select.d.ts +27 -0
  121. package/dist/components/select.d.ts.map +1 -0
  122. package/dist/components/select.js +40 -0
  123. package/dist/components/select.js.map +1 -0
  124. package/dist/components/separator.d.ts +10 -0
  125. package/dist/components/separator.d.ts.map +1 -0
  126. package/dist/components/separator.js +14 -0
  127. package/dist/components/separator.js.map +1 -0
  128. package/dist/components/sidebar.d.ts.map +1 -0
  129. package/dist/components/sidebar.js +48 -0
  130. package/dist/components/sidebar.js.map +1 -0
  131. package/dist/components/skeleton.d.ts +23 -0
  132. package/dist/components/skeleton.js +25 -0
  133. package/dist/components/skeleton.js.map +1 -0
  134. package/dist/components/slider.d.ts +14 -0
  135. package/dist/components/slider.d.ts.map +1 -0
  136. package/dist/components/slider.js +30 -0
  137. package/dist/components/slider.js.map +1 -0
  138. package/dist/components/spec.d.ts +35 -0
  139. package/dist/components/spec.js +31 -0
  140. package/dist/components/spec.js.map +1 -0
  141. package/dist/components/spinner.d.ts +20 -0
  142. package/dist/components/spinner.d.ts.map +1 -0
  143. package/dist/components/spinner.js +18 -0
  144. package/dist/components/spinner.js.map +1 -0
  145. package/dist/components/stack.d.ts +48 -0
  146. package/dist/components/stack.d.ts.map +1 -0
  147. package/dist/components/stack.js +43 -0
  148. package/dist/components/stack.js.map +1 -0
  149. package/dist/components/status-pill.js +34 -0
  150. package/dist/components/status-pill.js.map +1 -0
  151. package/dist/components/switch.d.ts +9 -0
  152. package/dist/components/switch.d.ts.map +1 -0
  153. package/dist/components/switch.js +15 -0
  154. package/dist/components/switch.js.map +1 -0
  155. package/dist/components/table.d.ts +31 -0
  156. package/dist/components/table.d.ts.map +1 -0
  157. package/dist/components/tabs.d.ts +22 -0
  158. package/dist/components/tabs.d.ts.map +1 -0
  159. package/dist/components/tabs.js +28 -0
  160. package/dist/components/tabs.js.map +1 -0
  161. package/dist/components/textarea.d.ts +8 -0
  162. package/dist/components/textarea.d.ts.map +1 -0
  163. package/dist/components/textarea.js +6 -0
  164. package/dist/components/textarea.js.map +1 -0
  165. package/dist/components/theme-provider.d.ts +35 -0
  166. package/dist/components/theme-provider.d.ts.map +1 -0
  167. package/dist/components/theme-provider.js.map +1 -0
  168. package/dist/components/theme-toggle.d.ts +10 -0
  169. package/dist/components/theme-toggle.d.ts.map +1 -0
  170. package/dist/components/theme-toggle.js.map +1 -0
  171. package/dist/components/three-state.d.ts +39 -0
  172. package/dist/components/three-state.d.ts.map +1 -0
  173. package/dist/components/three-state.js +24 -0
  174. package/dist/components/three-state.js.map +1 -0
  175. package/dist/components/timestamp.d.ts +24 -0
  176. package/dist/components/timestamp.js +64 -0
  177. package/dist/components/timestamp.js.map +1 -0
  178. package/dist/components/toaster.d.ts +27 -0
  179. package/dist/components/toaster.d.ts.map +1 -0
  180. package/dist/components/toaster.js +21 -0
  181. package/dist/components/toaster.js.map +1 -0
  182. package/dist/components/tooltip.d.ts +28 -0
  183. package/dist/components/tooltip.d.ts.map +1 -0
  184. package/dist/components/tooltip.js.map +1 -0
  185. package/dist/components/top-bar.d.ts +13 -0
  186. package/dist/components/top-bar.d.ts.map +1 -0
  187. package/dist/components/top-bar.js +16 -0
  188. package/dist/index.d.ts +76 -0
  189. package/dist/index.d.ts.map +1 -0
  190. package/dist/index.js +86 -0
  191. package/dist/index.js.map +1 -0
  192. package/dist/lib/utils.d.ts +7 -0
  193. package/dist/lib/utils.d.ts.map +1 -0
  194. package/dist/lib/utils.js +10 -0
  195. package/dist/lib/utils.js.map +1 -0
  196. package/dist/marketing/footer.d.ts +31 -0
  197. package/dist/marketing/footer.d.ts.map +1 -0
  198. package/dist/marketing/footer.js +9 -0
  199. package/dist/marketing/footer.js.map +1 -0
  200. package/dist/marketing/hero.d.ts +29 -0
  201. package/dist/marketing/hero.d.ts.map +1 -0
  202. package/dist/marketing/hero.js +7 -0
  203. package/dist/marketing/hero.js.map +1 -0
  204. package/dist/marketing/index.d.ts +21 -0
  205. package/dist/marketing/index.d.ts.map +1 -0
  206. package/dist/marketing/index.js +21 -0
  207. package/dist/marketing/index.js.map +1 -0
  208. package/dist/marketing/logo-cloud.d.ts +15 -0
  209. package/dist/marketing/logo-cloud.d.ts.map +1 -0
  210. package/dist/marketing/logo-cloud.js +6 -0
  211. package/dist/marketing/logo-cloud.js.map +1 -0
  212. package/dist/marketing/nav.d.ts +33 -0
  213. package/dist/marketing/nav.d.ts.map +1 -0
  214. package/dist/marketing/nav.js +14 -0
  215. package/dist/marketing/nav.js.map +1 -0
  216. package/dist/marketing/prose.d.ts +12 -0
  217. package/dist/marketing/prose.d.ts.map +1 -0
  218. package/dist/marketing/prose.js +18 -0
  219. package/dist/marketing/prose.js.map +1 -0
  220. package/dist/marketing/section.d.ts +22 -0
  221. package/dist/marketing/section.d.ts.map +1 -0
  222. package/dist/marketing/section.js +7 -0
  223. package/dist/marketing/section.js.map +1 -0
  224. package/dist/showcase/components/code-block.d.ts +11 -0
  225. package/dist/showcase/components/code-block.d.ts.map +1 -0
  226. package/dist/showcase/components/code-block.js +20 -0
  227. package/dist/showcase/components/code-block.js.map +1 -0
  228. package/dist/showcase/components/example.d.ts +16 -0
  229. package/dist/showcase/components/example.d.ts.map +1 -0
  230. package/dist/showcase/components/example.js +14 -0
  231. package/dist/showcase/components/example.js.map +1 -0
  232. package/dist/showcase/components/section.d.ts +21 -0
  233. package/dist/showcase/components/section.d.ts.map +1 -0
  234. package/dist/showcase/components/section.js +10 -0
  235. package/dist/showcase/components/section.js.map +1 -0
  236. package/dist/showcase/components/swatch.d.ts +17 -0
  237. package/dist/showcase/components/swatch.d.ts.map +1 -0
  238. package/dist/showcase/components/swatch.js +6 -0
  239. package/dist/showcase/components/swatch.js.map +1 -0
  240. package/dist/showcase/index.d.ts +17 -0
  241. package/dist/showcase/index.d.ts.map +1 -0
  242. package/dist/showcase/index.js +17 -0
  243. package/dist/showcase/index.js.map +1 -0
  244. package/dist/showcase/page.d.ts +2 -0
  245. package/dist/showcase/page.d.ts.map +1 -0
  246. package/dist/showcase/page.js +1085 -0
  247. package/dist/showcase/page.js.map +1 -0
  248. package/dist/styles/generated/tokens.d.ts +131 -0
  249. package/dist/styles/generated/tokens.d.ts.map +1 -0
  250. package/dist/styles/generated/tokens.js +107 -0
  251. package/dist/styles/generated/tokens.js.map +1 -0
  252. package/dist/styles/globals.css +131 -0
  253. package/dist/styles/tailwind.preset.d.ts +181 -0
  254. package/dist/styles/tailwind.preset.d.ts.map +1 -0
  255. package/dist/styles/tailwind.preset.js +114 -0
  256. package/dist/styles/tailwind.preset.js.map +1 -0
  257. package/dist/tokens/index.d.ts +176 -0
  258. package/dist/tokens/index.d.ts.map +1 -0
  259. package/dist/tokens/index.js +139 -0
  260. package/dist/tokens/index.js.map +1 -0
  261. package/dist/tokens/tokens.json +154 -0
  262. package/package.json +124 -0
  263. package/src/components/accordion.tsx +76 -0
  264. package/src/components/alert.tsx +113 -0
  265. package/src/components/app-shell.tsx +43 -0
  266. package/src/components/aspect-ratio.tsx +18 -0
  267. package/src/components/avatar-group.tsx +73 -0
  268. package/src/components/avatar.tsx +81 -0
  269. package/src/components/badge.tsx +77 -0
  270. package/src/components/breadcrumb.tsx +121 -0
  271. package/src/components/button.tsx +83 -0
  272. package/src/components/calendar.tsx +85 -0
  273. package/src/components/capacity-bar.tsx +80 -0
  274. package/src/components/card.tsx +104 -0
  275. package/src/components/checkbox.tsx +46 -0
  276. package/src/components/chip.tsx +74 -0
  277. package/src/components/collapsible.tsx +54 -0
  278. package/src/components/combobox.tsx +140 -0
  279. package/src/components/confirm-action.tsx +111 -0
  280. package/src/components/container.tsx +39 -0
  281. package/src/components/date-picker.tsx +98 -0
  282. package/src/components/dialog.tsx +174 -0
  283. package/src/components/drawer.tsx +157 -0
  284. package/src/components/dropdown-menu.tsx +200 -0
  285. package/src/components/empty-state.tsx +46 -0
  286. package/src/components/form-field.tsx +118 -0
  287. package/src/components/input.tsx +29 -0
  288. package/src/components/label.tsx +35 -0
  289. package/src/components/live-pill.tsx +35 -0
  290. package/src/components/metric-tile.tsx +83 -0
  291. package/src/components/money-breakdown.tsx +92 -0
  292. package/src/components/number-input.tsx +113 -0
  293. package/src/components/pagination.tsx +157 -0
  294. package/src/components/popover.tsx +46 -0
  295. package/src/components/progress.tsx +34 -0
  296. package/src/components/radio-group.tsx +46 -0
  297. package/src/components/scroll-area.tsx +55 -0
  298. package/src/components/select.tsx +169 -0
  299. package/src/components/separator.tsx +34 -0
  300. package/src/components/sidebar.tsx +168 -0
  301. package/src/components/skeleton.tsx +85 -0
  302. package/src/components/slider.tsx +58 -0
  303. package/src/components/spec.tsx +59 -0
  304. package/src/components/spinner.tsx +36 -0
  305. package/src/components/stack.tsx +80 -0
  306. package/src/components/status-pill.tsx +100 -0
  307. package/src/components/switch.tsx +37 -0
  308. package/src/components/table.tsx +129 -0
  309. package/src/components/tabs.tsx +72 -0
  310. package/src/components/textarea.tsx +27 -0
  311. package/src/components/theme-provider.tsx +131 -0
  312. package/src/components/theme-toggle.tsx +34 -0
  313. package/src/components/three-state.tsx +90 -0
  314. package/src/components/timestamp.tsx +107 -0
  315. package/src/components/toaster.tsx +55 -0
  316. package/src/components/tooltip.tsx +49 -0
  317. package/src/components/top-bar.tsx +29 -0
  318. package/src/index.ts +221 -0
  319. package/src/lib/utils.ts +10 -0
  320. package/src/marketing/footer.tsx +93 -0
  321. package/src/marketing/hero.tsx +92 -0
  322. package/src/marketing/index.ts +24 -0
  323. package/src/marketing/logo-cloud.tsx +35 -0
  324. package/src/marketing/nav.tsx +122 -0
  325. package/src/marketing/prose.tsx +45 -0
  326. package/src/marketing/section.tsx +77 -0
  327. package/src/showcase/components/code-block.tsx +66 -0
  328. package/src/showcase/components/example.tsx +47 -0
  329. package/src/showcase/components/section.tsx +70 -0
  330. package/src/showcase/components/swatch.tsx +52 -0
  331. package/src/showcase/index.tsx +16 -0
  332. package/src/showcase/page.tsx +4216 -0
  333. package/src/styles/generated/tokens.ts +119 -0
  334. package/src/styles/globals.css +131 -0
  335. package/src/styles/tailwind.preset.ts +134 -0
  336. package/src/test/a11y.test.tsx +638 -0
  337. package/src/test/marketing-a11y.test.tsx +138 -0
  338. package/src/test/setup.ts +47 -0
  339. package/src/tokens/index.ts +154 -0
  340. package/src/tokens/tokens.json +154 -0
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../lib/utils.js";
7
+ /**
8
+ * Button — per design.md §10
9
+ *
10
+ * Variants:
11
+ * - accent The single loudest CTA on the screen (Book, Pay, Go Live). Lime, black text.
12
+ * - primary Default primary action. Forest, white text.
13
+ * - secondary Outline button. Cancel, alt actions.
14
+ * - ghost Toolbar / table row actions.
15
+ * - destructive Cancel game, refund, delete.
16
+ * - link In-flow inline link button.
17
+ *
18
+ * Sizes: xs (24px) · sm (28px) · default (32px) · lg (36px) · icon (32px
19
+ * square) · touch (44px — prominent mobile CTAs)
20
+ *
21
+ * Accessibility:
22
+ * - Visible focus ring (2px theme ring color) via :focus-visible
23
+ * - On touch devices (pointer: coarse) every size grows to a 44px
24
+ * minimum hit target; visual density is preserved on desktop
25
+ * - Disabled state has aria-friendly opacity drop; not interactive
26
+ * - Icon-only buttons require aria-label
27
+ */
28
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 pointer-coarse:min-h-11", {
29
+ variants: {
30
+ variant: {
31
+ accent: "bg-brand-lime text-brand-lime-foreground hover:bg-brand-lime/90 active:bg-brand-lime/80",
32
+ primary: "bg-brand-forest text-brand-forest-foreground hover:bg-brand-forest/90 active:bg-brand-forest/80",
33
+ secondary: "border border-border-strong bg-background text-foreground hover:bg-bg-subtle active:bg-bg-muted",
34
+ ghost: "text-foreground hover:bg-bg-subtle active:bg-bg-muted",
35
+ destructive: "bg-danger text-danger-foreground hover:bg-danger/90 active:bg-danger/80",
36
+ link: "text-brand-forest underline-offset-4 hover:underline px-0",
37
+ },
38
+ size: {
39
+ xs: "h-6 px-2 text-xs rounded-sm",
40
+ sm: "h-7 px-2.5 text-xs rounded-sm",
41
+ default: "h-8 px-3 text-sm rounded-sm",
42
+ lg: "h-9 px-4 text-sm rounded-sm",
43
+ icon: "h-8 w-8 rounded-sm pointer-coarse:min-w-11",
44
+ touch: "h-11 px-4 text-md rounded-sm",
45
+ },
46
+ },
47
+ defaultVariants: {
48
+ variant: "primary",
49
+ size: "default",
50
+ },
51
+ });
52
+ export const Button = React.forwardRef(({ className, variant, size, asChild = false, type, ...props }, ref) => {
53
+ const Comp = asChild ? Slot : "button";
54
+ return (_jsx(Comp, { ref: ref, type: asChild ? undefined : (type ?? "button"), className: cn(buttonVariants({ variant, size, className })), ...props }));
55
+ });
56
+ Button.displayName = "Button";
57
+ export { buttonVariants };
58
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.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,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,cAAc,GAAG,GAAG,CACxB,uUAAuU,EACvU;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,MAAM,EACJ,yFAAyF;YAC3F,OAAO,EACL,iGAAiG;YACnG,SAAS,EACP,iGAAiG;YACnG,KAAK,EAAE,uDAAuD;YAC9D,WAAW,EACT,yEAAyE;YAC3E,IAAI,EAAE,2DAA2D;SAClE;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,6BAA6B;YACjC,EAAE,EAAE,+BAA+B;YACnC,OAAO,EAAE,6BAA6B;YACtC,EAAE,EAAE,6BAA6B;YACjC,IAAI,EAAE,4CAA4C;YAClD,KAAK,EAAE,8BAA8B;SACtC;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AASF,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CACpC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrE,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,EAC9C,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { DayPicker } from "react-day-picker";
3
+ /**
4
+ * Calendar — themed react-day-picker. Usually consumed via DatePicker;
5
+ * use directly for inline calendars (availability views, embedded
6
+ * scheduling).
7
+ *
8
+ * <Calendar mode="single" selected={date} onSelect={setDate} />
9
+ *
10
+ * Keyboard: arrows move by day/week, PageUp/Down by month, Home/End to
11
+ * week edges, Enter selects (provided by react-day-picker).
12
+ */
13
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
14
+ export declare function Calendar({ className, classNames, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAEnE,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAiE1E"}
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ChevronLeft, ChevronRight } from "lucide-react";
4
+ import { DayPicker } from "react-day-picker";
5
+ import { cn } from "../lib/utils.js";
6
+ export function Calendar({ className, classNames, ...props }) {
7
+ return (_jsx(DayPicker, { className: cn("p-3", className), classNames: {
8
+ root: "relative",
9
+ months: "flex flex-col gap-4",
10
+ month: "space-y-3",
11
+ month_caption: "flex items-center justify-center h-8",
12
+ caption_label: "text-sm font-semibold",
13
+ nav: "absolute inset-x-1 top-1 z-10 flex items-center justify-between",
14
+ button_previous: cn("inline-flex h-6 w-6 pointer-coarse:h-11 pointer-coarse:w-11 items-center justify-center rounded-sm text-text-muted", "hover:bg-bg-subtle hover:text-foreground transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:opacity-40 disabled:pointer-events-none"),
15
+ button_next: cn("inline-flex h-6 w-6 pointer-coarse:h-11 pointer-coarse:w-11 items-center justify-center rounded-sm text-text-muted", "hover:bg-bg-subtle hover:text-foreground transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:opacity-40 disabled:pointer-events-none"),
16
+ month_grid: "w-full border-collapse",
17
+ weekdays: "flex",
18
+ weekday: "w-8 text-[10px] font-semibold uppercase tracking-[0.06em] text-text-subtle",
19
+ weeks: "space-y-0.5",
20
+ week: "flex",
21
+ day: "p-0",
22
+ day_button: cn("h-8 w-8 pointer-coarse:h-11 pointer-coarse:w-11 rounded-sm text-sm tabular transition-colors", "hover:bg-bg-subtle", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:opacity-40 disabled:pointer-events-none"),
23
+ selected: "[&>button]:bg-brand-forest [&>button]:text-brand-forest-foreground [&>button]:hover:bg-brand-forest",
24
+ today: "[&>button]:font-bold [&>button]:text-brand-forest",
25
+ outside: "[&>button]:text-text-subtle",
26
+ disabled: "[&>button]:opacity-40 [&>button]:pointer-events-none",
27
+ hidden: "invisible",
28
+ ...classNames,
29
+ }, components: {
30
+ Chevron: ({ orientation, ...chevronProps }) => orientation === "left" ? (_jsx(ChevronLeft, { className: "h-4 w-4", strokeWidth: 1.75, "aria-hidden": "true", ...chevronProps })) : (_jsx(ChevronRight, { className: "h-4 w-4", strokeWidth: 1.75, "aria-hidden": "true", ...chevronProps })),
31
+ }, ...props }));
32
+ }
33
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAclC,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,EAAiB;IACzE,OAAO,CACL,KAAC,SAAS,IACR,SAAS,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,EAC/B,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,qBAAqB;YAC7B,KAAK,EAAE,WAAW;YAClB,aAAa,EAAE,sCAAsC;YACrD,aAAa,EAAE,uBAAuB;YACtC,GAAG,EAAE,iEAAiE;YACtE,eAAe,EAAE,EAAE,CACjB,oHAAoH,EACpH,4DAA4D,EAC5D,yEAAyE,EACzE,kDAAkD,CACnD;YACD,WAAW,EAAE,EAAE,CACb,oHAAoH,EACpH,4DAA4D,EAC5D,yEAAyE,EACzE,kDAAkD,CACnD;YACD,UAAU,EAAE,wBAAwB;YACpC,QAAQ,EAAE,MAAM;YAChB,OAAO,EACL,4EAA4E;YAC9E,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,KAAK;YACV,UAAU,EAAE,EAAE,CACZ,8FAA8F,EAC9F,oBAAoB,EACpB,yEAAyE,EACzE,kDAAkD,CACnD;YACD,QAAQ,EACN,qGAAqG;YACvG,KAAK,EAAE,mDAAmD;YAC1D,OAAO,EAAE,6BAA6B;YACtC,QAAQ,EAAE,sDAAsD;YAChE,MAAM,EAAE,WAAW;YACnB,GAAG,UAAU;SACd,EACD,UAAU,EAAE;YACV,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,YAAY,EAAE,EAAE,EAAE,CAC5C,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACvB,KAAC,WAAW,IACV,SAAS,EAAC,SAAS,EACnB,WAAW,EAAE,IAAI,iBACL,MAAM,KACd,YAAY,GAChB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IACX,SAAS,EAAC,SAAS,EACnB,WAAW,EAAE,IAAI,iBACL,MAAM,KACd,YAAY,GAChB,CACH;SACJ,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ /**
3
+ * CapacityBar — the spots-filled visualization used everywhere games
4
+ * appear (admin row, public card, game detail aside).
5
+ *
6
+ * <CapacityBar filled={8} capacity={10} minToRun={6} />
7
+ *
8
+ * Colors:
9
+ * - foreground when 100% full
10
+ * - warning when filled < minToRun (sub-minimum, needs action)
11
+ * - brand-forest otherwise
12
+ */
13
+ declare const HEIGHT_MAP: {
14
+ readonly sm: "h-1";
15
+ readonly default: "h-1.5";
16
+ readonly lg: "h-2";
17
+ };
18
+ export interface CapacityBarProps extends React.HTMLAttributes<HTMLDivElement> {
19
+ filled: number;
20
+ capacity: number;
21
+ /** Below this number, the bar tints warning */
22
+ minToRun?: number;
23
+ /** Show the "8/10" count text next to the bar */
24
+ showCount?: boolean;
25
+ /** Bar thickness */
26
+ size?: keyof typeof HEIGHT_MAP;
27
+ /** Override the accessible label (default: "8 of 10 spots filled") */
28
+ label?: string;
29
+ }
30
+ export declare function CapacityBar({ filled, capacity, minToRun, showCount, size, label, className, ...props }: CapacityBarProps): import("react/jsx-runtime").JSX.Element;
31
+ export {};
32
+ //# sourceMappingURL=capacity-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capacity-bar.d.ts","sourceRoot":"","sources":["../../src/components/capacity-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;GAUG;AACH,QAAA,MAAM,UAAU;;;;CAIN,CAAC;AAEX,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAgB,EAChB,IAAgB,EAChB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAqClB"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ /**
4
+ * CapacityBar — the spots-filled visualization used everywhere games
5
+ * appear (admin row, public card, game detail aside).
6
+ *
7
+ * <CapacityBar filled={8} capacity={10} minToRun={6} />
8
+ *
9
+ * Colors:
10
+ * - foreground when 100% full
11
+ * - warning when filled < minToRun (sub-minimum, needs action)
12
+ * - brand-forest otherwise
13
+ */
14
+ const HEIGHT_MAP = {
15
+ sm: "h-1",
16
+ default: "h-1.5",
17
+ lg: "h-2",
18
+ };
19
+ export function CapacityBar({ filled, capacity, minToRun, showCount = true, size = "default", label, className, ...props }) {
20
+ const pct = capacity > 0 ? Math.round((filled / capacity) * 100) : 0;
21
+ const isFull = filled >= capacity;
22
+ const belowMin = minToRun !== undefined && filled < minToRun;
23
+ return (_jsxs("div", { className: cn("flex items-center gap-2", className), ...props, children: [_jsx("div", { className: cn("flex-1 rounded-full bg-bg-muted overflow-hidden", HEIGHT_MAP[size]), role: "progressbar", "aria-valuenow": filled, "aria-valuemin": 0, "aria-valuemax": capacity, "aria-label": label ?? `${filled} of ${capacity} spots filled`, children: _jsx("div", { className: cn("h-full transition-all", isFull
24
+ ? "bg-foreground"
25
+ : belowMin
26
+ ? "bg-warning"
27
+ : "bg-brand-forest"), style: { width: `${pct}%` } }) }), showCount && (_jsxs("span", { className: "tabular text-xs text-text-muted shrink-0", children: [filled, "/", capacity] }))] }));
28
+ }
29
+ //# sourceMappingURL=capacity-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capacity-bar.js","sourceRoot":"","sources":["../../src/components/capacity-bar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE,KAAK;IACT,OAAO,EAAE,OAAO;IAChB,EAAE,EAAE,KAAK;CACD,CAAC;AAeX,MAAM,UAAU,WAAW,CAAC,EAC1B,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,GAAG,IAAI,EAChB,IAAI,GAAG,SAAS,EAChB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACS;IACjB,MAAM,GAAG,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,MAAM,IAAI,QAAQ,CAAC;IAClC,MAAM,QAAQ,GAAG,QAAQ,KAAK,SAAS,IAAI,MAAM,GAAG,QAAQ,CAAC;IAE7D,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,KAAM,KAAK,aACjE,cACE,SAAS,EAAE,EAAE,CACX,iDAAiD,EACjD,UAAU,CAAC,IAAI,CAAC,CACjB,EACD,IAAI,EAAC,aAAa,mBACH,MAAM,mBACN,CAAC,mBACD,QAAQ,gBACX,KAAK,IAAI,GAAG,MAAM,OAAO,QAAQ,eAAe,YAE5D,cACE,SAAS,EAAE,EAAE,CACX,uBAAuB,EACvB,MAAM;wBACJ,CAAC,CAAC,eAAe;wBACjB,CAAC,CAAC,QAAQ;4BACR,CAAC,CAAC,YAAY;4BACd,CAAC,CAAC,iBAAiB,CACxB,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,EAAE,GAC3B,GACE,EACL,SAAS,IAAI,CACZ,gBAAM,SAAS,EAAC,0CAA0C,aACvD,MAAM,OAAG,QAAQ,IACb,CACR,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Card primitives — per design.md §10
4
+ * Border 1px, radius 4px, padding 16–20px. NO shadow at rest.
5
+ *
6
+ * Composition:
7
+ * <Card>
8
+ * <CardHeader>
9
+ * <CardTitle>…</CardTitle>
10
+ * <CardDescription>…</CardDescription>
11
+ * </CardHeader>
12
+ * <CardContent>…</CardContent>
13
+ * <CardFooter>…</CardFooter>
14
+ * </Card>
15
+ */
16
+ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
17
+ /** Render as the child element (e.g. a Next.js Link) with card styling. */
18
+ asChild?: boolean;
19
+ }
20
+ export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
22
+ export declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
23
+ export declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
24
+ export declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
25
+ export declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
26
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,kFAchB,CAAC;AAGF,eAAO,MAAM,UAAU,6GAYrB,CAAC;AAGH,eAAO,MAAM,SAAS,qHAWpB,CAAC;AAGH,eAAO,MAAM,eAAe,yHAS1B,CAAC;AAGH,eAAO,MAAM,WAAW,6GAKtB,CAAC;AAGH,eAAO,MAAM,UAAU,6GAYrB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cn } from "../lib/utils.js";
5
+ export const Card = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
6
+ const Comp = asChild ? Slot : "div";
7
+ return (_jsx(Comp, { ref: ref, className: cn("rounded border border-border bg-background text-foreground", className), ...props }));
8
+ });
9
+ Card.displayName = "Card";
10
+ export const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-start justify-between gap-3 px-5 pt-4 pb-3 border-b border-border", className), ...props })));
11
+ CardHeader.displayName = "CardHeader";
12
+ export const CardTitle = React.forwardRef(({ className, children, ...props }, ref) => (_jsx("h3", { ref: ref, className: cn("text-md font-semibold tracking-[-0.01em]", className), ...props, children: children })));
13
+ CardTitle.displayName = "CardTitle";
14
+ export const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("p", { ref: ref, className: cn("text-xs text-text-muted mt-0.5", className), ...props })));
15
+ CardDescription.displayName = "CardDescription";
16
+ export const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("px-5 py-4", className), ...props })));
17
+ CardContent.displayName = "CardContent";
18
+ export const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center justify-end gap-2 px-5 py-3 border-t border-border bg-bg-subtle/50", className), ...props })));
19
+ CardFooter.displayName = "CardFooter";
20
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ /**
4
+ * Checkbox — square 16px control with brand-forest fill when checked.
5
+ *
6
+ * Supports `indeterminate` via Radix (pass `checked="indeterminate"`).
7
+ * Always pair with a Label (`htmlFor` matching the checkbox `id`) — the
8
+ * FormField component does this automatically.
9
+ */
10
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAI9D;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,iKA8BnB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
5
+ import { Check, Minus } from "lucide-react";
6
+ import { cn } from "../lib/utils.js";
7
+ /**
8
+ * Checkbox — square 16px control with brand-forest fill when checked.
9
+ *
10
+ * Supports `indeterminate` via Radix (pass `checked="indeterminate"`).
11
+ * Always pair with a Label (`htmlFor` matching the checkbox `id`) — the
12
+ * FormField component does this automatically.
13
+ */
14
+ export const Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn("peer h-4 w-4 shrink-0 rounded-sm border border-border-strong bg-background transition-colors",
15
+ // Invisible hit-area extension: 24px on desktop (WCAG 2.5.8),
16
+ // 44px on touch devices — the visual stays 16px.
17
+ "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]:bg-brand-forest data-[state=checked]:border-brand-forest data-[state=checked]:text-brand-forest-foreground", "data-[state=indeterminate]:bg-brand-forest data-[state=indeterminate]:border-brand-forest data-[state=indeterminate]:text-brand-forest-foreground", className), ...props, children: _jsxs(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [_jsx(Check, { className: "h-3 w-3 data-[state=indeterminate]:hidden", strokeWidth: 3 }), _jsx(Minus, { className: "hidden h-3 w-3 data-[state=indeterminate]:block", strokeWidth: 3 })] }) })));
18
+ Checkbox.displayName = "Checkbox";
19
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ /**
4
+ * Chip — small removable token. Use for active filter indicators,
5
+ * applied tags, selected options in a multi-select summary.
6
+ *
7
+ * <Chip onRemove={() => setVenue("all")}>Astoria Turf</Chip>
8
+ * <Chip variant="neutral">Soccer</Chip>
9
+ *
10
+ * Distinct from Badge: Chips are interactive (often have a close button)
11
+ * and represent transient selections, while Badges are static labels.
12
+ */
13
+ export declare const chipVariants: (props?: ({
14
+ variant?: "accent" | "neutral" | "outline" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ export interface ChipProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {
17
+ /** When provided, renders an × button. */
18
+ onRemove?: () => void;
19
+ /** Accessible label for the remove button (default: "Remove {children}") */
20
+ removeLabel?: string;
21
+ }
22
+ export declare function Chip({ className, variant, onRemove, removeLabel, children, ...props }: ChipProps): import("react/jsx-runtime").JSX.Element;
23
+ //# sourceMappingURL=chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/components/chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY;;8EAYxB,CAAC;AAEF,MAAM,WAAW,SACf,SACE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EACrC,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,IAAI,CAAC,EACnB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,SAAS,2CAyBX"}
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { X } from "lucide-react";
5
+ import { cn } from "../lib/utils.js";
6
+ /**
7
+ * Chip — small removable token. Use for active filter indicators,
8
+ * applied tags, selected options in a multi-select summary.
9
+ *
10
+ * <Chip onRemove={() => setVenue("all")}>Astoria Turf</Chip>
11
+ * <Chip variant="neutral">Soccer</Chip>
12
+ *
13
+ * Distinct from Badge: Chips are interactive (often have a close button)
14
+ * and represent transient selections, while Badges are static labels.
15
+ */
16
+ export const chipVariants = cva("inline-flex items-center gap-1 h-5 px-1.5 rounded-sm text-xs font-medium leading-none whitespace-nowrap", {
17
+ variants: {
18
+ variant: {
19
+ accent: "bg-brand-forest/10 text-brand-forest",
20
+ neutral: "bg-bg-muted text-foreground",
21
+ outline: "border border-border-strong bg-transparent text-foreground",
22
+ },
23
+ },
24
+ defaultVariants: { variant: "accent" },
25
+ });
26
+ export function Chip({ className, variant, onRemove, removeLabel, children, ...props }) {
27
+ return (_jsxs("span", { className: cn(chipVariants({ variant }), className), ...props, children: [_jsx("span", { children: children }), onRemove && (_jsx("button", { type: "button", onClick: onRemove, "aria-label": removeLabel ??
28
+ `Remove ${typeof children === "string" ? children : "filter"}`, className: cn("rounded-sm p-0.5 transition-colors", "hover:bg-current/10", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
29
+ // Invisible hit-area extension: 26px desktop / 46px touch.
30
+ "relative after:absolute after:-inset-1.5 pointer-coarse:after:-inset-4"), children: _jsx(X, { className: "h-2.5 w-2.5", strokeWidth: 2 }) }))] }));
31
+ }
32
+ //# sourceMappingURL=chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chip.js","sourceRoot":"","sources":["../../src/components/chip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAC7B,yGAAyG,EACzG;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,MAAM,EAAE,sCAAsC;YAC9C,OAAO,EAAE,6BAA6B;YACtC,OAAO,EAAE,4DAA4D;SACtE;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;CACvC,CACF,CAAC;AAYF,MAAM,UAAU,IAAI,CAAC,EACnB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACE;IACV,OAAO,CACL,gBAAM,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,aAClE,yBAAO,QAAQ,GAAQ,EACtB,QAAQ,IAAI,CACX,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,gBAEf,WAAW;oBACX,UAAU,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,EAEhE,SAAS,EAAE,EAAE,CACX,oCAAoC,EACpC,qBAAqB,EACrB,yEAAyE;gBACzE,2DAA2D;gBAC3D,wEAAwE,CACzE,YAED,KAAC,CAAC,IAAC,SAAS,EAAC,aAAa,EAAC,WAAW,EAAE,CAAC,GAAI,GACtC,CACV,IACI,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
3
+ /**
4
+ * Collapsible — a single expandable region. Accordion is for GROUPS of
5
+ * sections with one-open-at-a-time semantics; Collapsible is one
6
+ * independent disclosure ("Show advanced options", "View 12 more").
7
+ *
8
+ * <Collapsible>
9
+ * <CollapsibleTrigger>Advanced options</CollapsibleTrigger>
10
+ * <CollapsibleContent>…</CollapsibleContent>
11
+ * </Collapsible>
12
+ */
13
+ export declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const CollapsibleTrigger: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
15
+ export declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ //# sourceMappingURL=collapsible.d.ts.map
@@ -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 CollapsiblePrimitive from "@radix-ui/react-collapsible";
5
+ import { ChevronDown } from "lucide-react";
6
+ import { cn } from "../lib/utils.js";
7
+ /**
8
+ * Collapsible — a single expandable region. Accordion is for GROUPS of
9
+ * sections with one-open-at-a-time semantics; Collapsible is one
10
+ * independent disclosure ("Show advanced options", "View 12 more").
11
+ *
12
+ * <Collapsible>
13
+ * <CollapsibleTrigger>Advanced options</CollapsibleTrigger>
14
+ * <CollapsibleContent>…</CollapsibleContent>
15
+ * </Collapsible>
16
+ */
17
+ export const Collapsible = CollapsiblePrimitive.Root;
18
+ export const CollapsibleTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(CollapsiblePrimitive.Trigger, { ref: ref, className: cn("group flex items-center gap-1.5 text-sm font-medium text-foreground transition-colors hover:text-brand-forest", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm", "pointer-coarse:min-h-11", className), ...props, children: [children, _jsx(ChevronDown, { className: "h-3.5 w-3.5 text-text-muted transition-transform duration-150 group-data-[state=open]:rotate-180", strokeWidth: 1.75, "aria-hidden": "true" })] })));
19
+ CollapsibleTrigger.displayName = "CollapsibleTrigger";
20
+ export const CollapsibleContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(CollapsiblePrimitive.Content, { ref: ref, className: cn("pt-2 data-[state=open]:animate-fade-in", className), ...props })));
21
+ CollapsibleContent.displayName = "CollapsibleContent";
22
+ //# sourceMappingURL=collapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAGhD,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,MAAC,oBAAoB,CAAC,OAAO,IAC3B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,+GAA+G,EAC/G,oFAAoF,EACpF,yBAAyB,EACzB,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,WAAW,IACV,SAAS,EAAC,kGAAkG,EAC5G,WAAW,EAAE,IAAI,iBACL,MAAM,GAClB,IAC2B,CAChC,CAAC,CAAC;AACH,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAGhD,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,oBAAoB,CAAC,OAAO,IAC3B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,SAAS,CAAC,KAC9D,KAAK,GACT,CACH,CAAC,CAAC;AACH,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Combobox — searchable single-select. Use instead of Select when the
3
+ * option list is long enough that scanning beats scrolling (venues,
4
+ * players, cities — roughly 10+ options).
5
+ *
6
+ * <Combobox
7
+ * options={venues.map(v => ({ value: v.id, label: v.name }))}
8
+ * value={venueId}
9
+ * onValueChange={setVenueId}
10
+ * placeholder="Select venue…"
11
+ * aria-label="Venue"
12
+ * />
13
+ *
14
+ * Keyboard: type to filter, ↑/↓ to move, Enter to select, Esc closes.
15
+ * Uncontrolled open state; controlled value.
16
+ */
17
+ export interface ComboboxOption {
18
+ value: string;
19
+ label: string;
20
+ disabled?: boolean;
21
+ }
22
+ export interface ComboboxProps {
23
+ options: ComboboxOption[];
24
+ value: string | null;
25
+ onValueChange: (value: string | null) => void;
26
+ /** Trigger text when nothing is selected. */
27
+ placeholder?: string;
28
+ /** Search input placeholder. */
29
+ searchPlaceholder?: string;
30
+ /** Shown when the query matches nothing. */
31
+ emptyText?: string;
32
+ /** Accessible name for the trigger + listbox. */
33
+ "aria-label": string;
34
+ disabled?: boolean;
35
+ className?: string;
36
+ }
37
+ export declare function Combobox({ options, value, onValueChange, placeholder, searchPlaceholder, emptyText, "aria-label": ariaLabel, disabled, className, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
38
+ //# sourceMappingURL=combobox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,aAAa,EACb,WAAuB,EACvB,iBAA6B,EAC7B,SAAyB,EACzB,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,SAAS,GACV,EAAE,aAAa,2CAmFf"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Check, ChevronsUpDown } from "lucide-react";
5
+ import { Command as CommandPrimitive } from "cmdk";
6
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
7
+ import { cn } from "../lib/utils.js";
8
+ export function Combobox({ options, value, onValueChange, placeholder = "Select…", searchPlaceholder = "Search…", emptyText = "No results.", "aria-label": ariaLabel, disabled, className, }) {
9
+ const [open, setOpen] = React.useState(false);
10
+ const listId = React.useId();
11
+ const selected = options.find((o) => o.value === value);
12
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", role: "combobox", "aria-expanded": open, "aria-controls": listId, "aria-haspopup": "listbox", "aria-label": ariaLabel, disabled: disabled, 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", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:bg-bg-muted disabled:opacity-60", !selected && "text-text-subtle", className), children: [_jsx("span", { className: "truncate", children: selected?.label ?? placeholder }), _jsx(ChevronsUpDown, { className: "h-3.5 w-3.5 shrink-0 text-text-muted", strokeWidth: 1.75, "aria-hidden": "true" })] }) }), _jsx(PopoverContent, { "aria-label": ariaLabel, align: "start", className: "w-[--radix-popover-trigger-width] min-w-[12rem] p-0", children: _jsxs(CommandPrimitive, { label: ariaLabel, className: "outline-none", children: [_jsx(CommandPrimitive.Input, { placeholder: searchPlaceholder, className: cn("w-full border-b border-border bg-transparent px-3 h-8 pointer-coarse:h-11 text-sm text-foreground", "placeholder:text-text-subtle focus:outline-none") }), _jsxs(CommandPrimitive.List, { id: listId, className: "max-h-64 overflow-y-auto p-1 scrollbar-thin", children: [_jsx(CommandPrimitive.Empty, { className: "px-3 py-6 text-center text-sm text-text-muted", children: emptyText }), options.map((option) => (_jsxs(CommandPrimitive.Item, { value: option.label, disabled: option.disabled, onSelect: () => {
13
+ onValueChange(option.value === value ? null : option.value);
14
+ setOpen(false);
15
+ }, className: cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 pointer-coarse:min-h-11 text-sm outline-none", "data-[selected=true]:bg-bg-subtle data-[selected=true]:text-foreground", "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"), children: [_jsx(Check, { className: cn("h-3.5 w-3.5 shrink-0 text-brand-forest", option.value === value ? "opacity-100" : "opacity-0"), strokeWidth: 2, "aria-hidden": "true" }), option.label] }, option.value)))] })] }) })] }));
16
+ }
17
+ //# sourceMapping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M,CAAC,KAAK,KArBR,MAAM,CAAC,KAAK,CAsBK,CACzB,CAAC,IACoB,IACP,GACJ,IACT,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+ import { type ButtonProps } from "./button.js";
3
+ /**
4
+ * ConfirmAction — codifies design.md §3.11 Confirmation discipline.
5
+ *
6
+ * Use ONLY for destructive or financially irreversible actions. The body
7
+ * is required to be concrete ("8 players will be refunded $14 each"),
8
+ * never abstract ("Are you sure?").
9
+ *
10
+ * Wrap your trigger button (works with asChild).
11
+ *
12
+ * Example:
13
+ * <ConfirmAction
14
+ * title="Cancel this game?"
15
+ * description="This action is logged and cannot be undone."
16
+ * consequence="8 players will be refunded $14.00 each as credit and emailed."
17
+ * confirmLabel="Cancel + refund all"
18
+ * confirmVariant="destructive"
19
+ * onConfirm={async () => await cancelGame(id)}
20
+ * >
21
+ * <Button variant="destructive">Cancel game…</Button>
22
+ * </ConfirmAction>
23
+ */
24
+ export interface ConfirmActionProps {
25
+ title: string;
26
+ description?: string;
27
+ /** REQUIRED concrete consequence text — never abstract. */
28
+ consequence: React.ReactNode;
29
+ confirmLabel: string;
30
+ cancelLabel?: string;
31
+ confirmVariant?: ButtonProps["variant"];
32
+ onConfirm: () => void | Promise<void>;
33
+ children: React.ReactNode;
34
+ }
35
+ export declare function ConfirmAction({ title, description, consequence, confirmLabel, cancelLabel, confirmVariant, onConfirm, children, }: ConfirmActionProps): import("react/jsx-runtime").JSX.Element;
36
+ //# sourceMappingURL=confirm-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-action.d.ts","sourceRoot":"","sources":["../../src/components/confirm-action.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACxC,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAsB,EACtB,cAA8B,EAC9B,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,2CAqDpB"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./dialog.js";
5
+ import { Button } from "./button.js";
6
+ export function ConfirmAction({ title, description, consequence, confirmLabel, cancelLabel = "Cancel", confirmVariant = "destructive", onConfirm, children, }) {
7
+ const [open, setOpen] = React.useState(false);
8
+ const [busy, setBusy] = React.useState(false);
9
+ const handleConfirm = async () => {
10
+ setBusy(true);
11
+ try {
12
+ await onConfirm();
13
+ setOpen(false);
14
+ }
15
+ finally {
16
+ setBusy(false);
17
+ }
18
+ };
19
+ return (_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, children: children }), _jsxs(DialogContent, { ...(description ? {} : { "aria-describedby": undefined }), children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: title }), description && _jsx(DialogDescription, { children: description })] }), _jsx(DialogBody, { children: _jsx("p", { className: "text-sm text-foreground", children: consequence }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "ghost", onClick: () => setOpen(false), disabled: busy, children: cancelLabel }), _jsx(Button, { variant: confirmVariant, onClick: handleConfirm, disabled: busy, children: busy ? "Working…" : confirmLabel })] })] })] }));
20
+ }
21
+ //# sourceMappingURL=confirm-action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-action.js","sourceRoot":"","sources":["../../src/components/confirm-action.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AAmCpD,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,GAAG,QAAQ,EACtB,cAAc,GAAG,aAAa,EAC9B,SAAS,EACT,QAAQ,GACW;IACnB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;QAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;QACd,IAAI,CAAC;YACH,MAAM,SAAS,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;gBAAS,CAAC;YACT,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,aACvC,KAAC,aAAa,IAAC,OAAO,kBAAE,QAAQ,GAAiB,EAQjD,MAAC,aAAa,OACR,CAAC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IAAI,cAAc,EAC5B,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/components/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAChD,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC3C,mEAAmE;IACnE,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,aAAa,EACb,YAAY,EAAE,SAAS,EACvB,WAA4B,EAC5B,aAAoE,EACpE,aAAa,EACb,QAAQ,EACR,SAAS,GACV,EAAE,eAAe,2CAoDjB"}
@@ -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 { CalendarDays } from "lucide-react";
5
+ import { Calendar } from "./calendar.js";
6
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
7
+ import { cn } from "../lib/utils.js";
8
+ export function DatePicker({ value, onValueChange, "aria-label": ariaLabel, placeholder = "Pick a date…", formatOptions = { weekday: "short", month: "short", day: "numeric" }, disabledDates, disabled, className, }) {
9
+ const [open, setOpen] = React.useState(false);
10
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", "aria-label": ariaLabel, disabled: disabled, className: cn("flex h-8 pointer-coarse:h-11 w-full items-center gap-2 rounded-sm border border-border-strong bg-background px-2.5 text-sm", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:bg-bg-muted disabled:opacity-60", !value && "text-text-subtle", className), children: [_jsx(CalendarDays, { className: "h-3.5 w-3.5 shrink-0 text-text-muted", strokeWidth: 1.75, "aria-hidden": "true" }), _jsx("span", { className: "truncate tabular", children: value
11
+ ? new Intl.DateTimeFormat(undefined, formatOptions).format(value)
12
+ : placeholder })] }) }), _jsx(PopoverContent, { "aria-label": ariaLabel, align: "start", className: "w-auto p-0", children: _jsx(Calendar, { mode: "single", selected: value, onSelect: (d) => {
13
+ onValueChange(d);
14
+ setOpen(false);
15
+ }, disabled: disabledDates,
16
+ // react-day-picker's focus-management prop (not DOM autofocus):
17
+ // moving focus into the grid when the popover opens is the
18
+ // expected dialog pattern for keyboard users.
19
+ // eslint-disable-next-line jsx-a11y/no-autofocus
20
+ autoFocus: true }) })] }));
21
+ }
22
+ //# sourceMappingURL=date-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../src/components/date-picker.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CA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