@vaam-apps/ui 0.1.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 (285) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/LICENSE +21 -0
  3. package/README.md +286 -0
  4. package/dist/components/data/code.d.ts +37 -0
  5. package/dist/components/data/code.d.ts.map +1 -0
  6. package/dist/components/data/code.js +37 -0
  7. package/dist/components/data/code.js.map +1 -0
  8. package/dist/components/data/copy-button.d.ts +39 -0
  9. package/dist/components/data/copy-button.d.ts.map +1 -0
  10. package/dist/components/data/copy-button.js +50 -0
  11. package/dist/components/data/copy-button.js.map +1 -0
  12. package/dist/components/data/detail-row.d.ts +69 -0
  13. package/dist/components/data/detail-row.d.ts.map +1 -0
  14. package/dist/components/data/detail-row.js +27 -0
  15. package/dist/components/data/detail-row.js.map +1 -0
  16. package/dist/components/data/id-display.d.ts +33 -0
  17. package/dist/components/data/id-display.d.ts.map +1 -0
  18. package/dist/components/data/id-display.js +25 -0
  19. package/dist/components/data/id-display.js.map +1 -0
  20. package/dist/components/data/masked-value.d.ts +47 -0
  21. package/dist/components/data/masked-value.d.ts.map +1 -0
  22. package/dist/components/data/masked-value.js +46 -0
  23. package/dist/components/data/masked-value.js.map +1 -0
  24. package/dist/components/data/money.d.ts +28 -0
  25. package/dist/components/data/money.d.ts.map +1 -0
  26. package/dist/components/data/money.js +22 -0
  27. package/dist/components/data/money.js.map +1 -0
  28. package/dist/components/data/phone-display.d.ts +45 -0
  29. package/dist/components/data/phone-display.d.ts.map +1 -0
  30. package/dist/components/data/phone-display.js +23 -0
  31. package/dist/components/data/phone-display.js.map +1 -0
  32. package/dist/components/data/stat-tile.d.ts +33 -0
  33. package/dist/components/data/stat-tile.d.ts.map +1 -0
  34. package/dist/components/data/stat-tile.js +18 -0
  35. package/dist/components/data/stat-tile.js.map +1 -0
  36. package/dist/components/data/timestamp-display.d.ts +14 -0
  37. package/dist/components/data/timestamp-display.d.ts.map +1 -0
  38. package/dist/components/data/timestamp-display.js +77 -0
  39. package/dist/components/data/timestamp-display.js.map +1 -0
  40. package/dist/components/patterns/inline-banner.d.ts +22 -0
  41. package/dist/components/patterns/inline-banner.d.ts.map +1 -0
  42. package/dist/components/patterns/inline-banner.js +11 -0
  43. package/dist/components/patterns/inline-banner.js.map +1 -0
  44. package/dist/components/patterns/inline-empty-state.d.ts +20 -0
  45. package/dist/components/patterns/inline-empty-state.d.ts.map +1 -0
  46. package/dist/components/patterns/inline-empty-state.js +11 -0
  47. package/dist/components/patterns/inline-empty-state.js.map +1 -0
  48. package/dist/components/patterns/live-row.d.ts +23 -0
  49. package/dist/components/patterns/live-row.d.ts.map +1 -0
  50. package/dist/components/patterns/live-row.js +48 -0
  51. package/dist/components/patterns/live-row.js.map +1 -0
  52. package/dist/components/patterns/payload-inspector.d.ts +25 -0
  53. package/dist/components/patterns/payload-inspector.d.ts.map +1 -0
  54. package/dist/components/patterns/payload-inspector.js +33 -0
  55. package/dist/components/patterns/payload-inspector.js.map +1 -0
  56. package/dist/components/patterns/route-skeleton.d.ts +15 -0
  57. package/dist/components/patterns/route-skeleton.d.ts.map +1 -0
  58. package/dist/components/patterns/route-skeleton.js +7 -0
  59. package/dist/components/patterns/route-skeleton.js.map +1 -0
  60. package/dist/components/patterns/screen-layout.d.ts +14 -0
  61. package/dist/components/patterns/screen-layout.d.ts.map +1 -0
  62. package/dist/components/patterns/screen-layout.js +11 -0
  63. package/dist/components/patterns/screen-layout.js.map +1 -0
  64. package/dist/components/patterns/stale-write-banner.d.ts +26 -0
  65. package/dist/components/patterns/stale-write-banner.d.ts.map +1 -0
  66. package/dist/components/patterns/stale-write-banner.js +28 -0
  67. package/dist/components/patterns/stale-write-banner.js.map +1 -0
  68. package/dist/components/patterns/state-timeline.d.ts +58 -0
  69. package/dist/components/patterns/state-timeline.d.ts.map +1 -0
  70. package/dist/components/patterns/state-timeline.js +103 -0
  71. package/dist/components/patterns/state-timeline.js.map +1 -0
  72. package/dist/components/primitives/badge.d.ts +27 -0
  73. package/dist/components/primitives/badge.d.ts.map +1 -0
  74. package/dist/components/primitives/badge.js +33 -0
  75. package/dist/components/primitives/badge.js.map +1 -0
  76. package/dist/components/primitives/button.d.ts +12 -0
  77. package/dist/components/primitives/button.d.ts.map +1 -0
  78. package/dist/components/primitives/button.js +42 -0
  79. package/dist/components/primitives/button.js.map +1 -0
  80. package/dist/components/primitives/calendar.d.ts +39 -0
  81. package/dist/components/primitives/calendar.d.ts.map +1 -0
  82. package/dist/components/primitives/calendar.js +102 -0
  83. package/dist/components/primitives/calendar.js.map +1 -0
  84. package/dist/components/primitives/card.d.ts +24 -0
  85. package/dist/components/primitives/card.d.ts.map +1 -0
  86. package/dist/components/primitives/card.js +28 -0
  87. package/dist/components/primitives/card.js.map +1 -0
  88. package/dist/components/primitives/checkbox.d.ts +42 -0
  89. package/dist/components/primitives/checkbox.d.ts.map +1 -0
  90. package/dist/components/primitives/checkbox.js +31 -0
  91. package/dist/components/primitives/checkbox.js.map +1 -0
  92. package/dist/components/primitives/chip-select.d.ts +38 -0
  93. package/dist/components/primitives/chip-select.d.ts.map +1 -0
  94. package/dist/components/primitives/chip-select.js +25 -0
  95. package/dist/components/primitives/chip-select.js.map +1 -0
  96. package/dist/components/primitives/command-menu.d.ts +54 -0
  97. package/dist/components/primitives/command-menu.d.ts.map +1 -0
  98. package/dist/components/primitives/command-menu.js +24 -0
  99. package/dist/components/primitives/command-menu.js.map +1 -0
  100. package/dist/components/primitives/confirm-dialog.d.ts +52 -0
  101. package/dist/components/primitives/confirm-dialog.d.ts.map +1 -0
  102. package/dist/components/primitives/confirm-dialog.js +30 -0
  103. package/dist/components/primitives/confirm-dialog.js.map +1 -0
  104. package/dist/components/primitives/date-picker.d.ts +68 -0
  105. package/dist/components/primitives/date-picker.d.ts.map +1 -0
  106. package/dist/components/primitives/date-picker.js +107 -0
  107. package/dist/components/primitives/date-picker.js.map +1 -0
  108. package/dist/components/primitives/dialog.d.ts +50 -0
  109. package/dist/components/primitives/dialog.d.ts.map +1 -0
  110. package/dist/components/primitives/dialog.js +90 -0
  111. package/dist/components/primitives/dialog.js.map +1 -0
  112. package/dist/components/primitives/drawer.d.ts +71 -0
  113. package/dist/components/primitives/drawer.d.ts.map +1 -0
  114. package/dist/components/primitives/drawer.js +93 -0
  115. package/dist/components/primitives/drawer.js.map +1 -0
  116. package/dist/components/primitives/dropdown-menu.d.ts +40 -0
  117. package/dist/components/primitives/dropdown-menu.d.ts.map +1 -0
  118. package/dist/components/primitives/dropdown-menu.js +53 -0
  119. package/dist/components/primitives/dropdown-menu.js.map +1 -0
  120. package/dist/components/primitives/form-field.d.ts +94 -0
  121. package/dist/components/primitives/form-field.d.ts.map +1 -0
  122. package/dist/components/primitives/form-field.js +27 -0
  123. package/dist/components/primitives/form-field.js.map +1 -0
  124. package/dist/components/primitives/inline-confirm.d.ts +62 -0
  125. package/dist/components/primitives/inline-confirm.d.ts.map +1 -0
  126. package/dist/components/primitives/inline-confirm.js +11 -0
  127. package/dist/components/primitives/inline-confirm.js.map +1 -0
  128. package/dist/components/primitives/input.d.ts +4 -0
  129. package/dist/components/primitives/input.d.ts.map +1 -0
  130. package/dist/components/primitives/input.js +13 -0
  131. package/dist/components/primitives/input.js.map +1 -0
  132. package/dist/components/primitives/label.d.ts +26 -0
  133. package/dist/components/primitives/label.d.ts.map +1 -0
  134. package/dist/components/primitives/label.js +33 -0
  135. package/dist/components/primitives/label.js.map +1 -0
  136. package/dist/components/primitives/pagination.d.ts +54 -0
  137. package/dist/components/primitives/pagination.d.ts.map +1 -0
  138. package/dist/components/primitives/pagination.js +31 -0
  139. package/dist/components/primitives/pagination.js.map +1 -0
  140. package/dist/components/primitives/popover.d.ts +12 -0
  141. package/dist/components/primitives/popover.d.ts.map +1 -0
  142. package/dist/components/primitives/popover.js +22 -0
  143. package/dist/components/primitives/popover.js.map +1 -0
  144. package/dist/components/primitives/progress.d.ts +25 -0
  145. package/dist/components/primitives/progress.d.ts.map +1 -0
  146. package/dist/components/primitives/progress.js +25 -0
  147. package/dist/components/primitives/progress.js.map +1 -0
  148. package/dist/components/primitives/radio-group.d.ts +47 -0
  149. package/dist/components/primitives/radio-group.d.ts.map +1 -0
  150. package/dist/components/primitives/radio-group.js +11 -0
  151. package/dist/components/primitives/radio-group.js.map +1 -0
  152. package/dist/components/primitives/select.d.ts +39 -0
  153. package/dist/components/primitives/select.d.ts.map +1 -0
  154. package/dist/components/primitives/select.js +142 -0
  155. package/dist/components/primitives/select.js.map +1 -0
  156. package/dist/components/primitives/separator.d.ts +9 -0
  157. package/dist/components/primitives/separator.d.ts.map +1 -0
  158. package/dist/components/primitives/separator.js +16 -0
  159. package/dist/components/primitives/separator.js.map +1 -0
  160. package/dist/components/primitives/side-nav.d.ts +65 -0
  161. package/dist/components/primitives/side-nav.d.ts.map +1 -0
  162. package/dist/components/primitives/side-nav.js +100 -0
  163. package/dist/components/primitives/side-nav.js.map +1 -0
  164. package/dist/components/primitives/skeleton.d.ts +22 -0
  165. package/dist/components/primitives/skeleton.d.ts.map +1 -0
  166. package/dist/components/primitives/skeleton.js +25 -0
  167. package/dist/components/primitives/skeleton.js.map +1 -0
  168. package/dist/components/primitives/spinner.d.ts +20 -0
  169. package/dist/components/primitives/spinner.d.ts.map +1 -0
  170. package/dist/components/primitives/spinner.js +21 -0
  171. package/dist/components/primitives/spinner.js.map +1 -0
  172. package/dist/components/primitives/switch.d.ts +29 -0
  173. package/dist/components/primitives/switch.d.ts.map +1 -0
  174. package/dist/components/primitives/switch.js +24 -0
  175. package/dist/components/primitives/switch.js.map +1 -0
  176. package/dist/components/primitives/table.d.ts +23 -0
  177. package/dist/components/primitives/table.d.ts.map +1 -0
  178. package/dist/components/primitives/table.js +81 -0
  179. package/dist/components/primitives/table.js.map +1 -0
  180. package/dist/components/primitives/tabs.d.ts +38 -0
  181. package/dist/components/primitives/tabs.d.ts.map +1 -0
  182. package/dist/components/primitives/tabs.js +84 -0
  183. package/dist/components/primitives/tabs.js.map +1 -0
  184. package/dist/components/primitives/textarea.d.ts +4 -0
  185. package/dist/components/primitives/textarea.d.ts.map +1 -0
  186. package/dist/components/primitives/textarea.js +11 -0
  187. package/dist/components/primitives/textarea.js.map +1 -0
  188. package/dist/components/primitives/toast.d.ts +24 -0
  189. package/dist/components/primitives/toast.d.ts.map +1 -0
  190. package/dist/components/primitives/toast.js +58 -0
  191. package/dist/components/primitives/toast.js.map +1 -0
  192. package/dist/components/primitives/tooltip.d.ts +30 -0
  193. package/dist/components/primitives/tooltip.d.ts.map +1 -0
  194. package/dist/components/primitives/tooltip.js +6 -0
  195. package/dist/components/primitives/tooltip.js.map +1 -0
  196. package/dist/components/status/state-chip.d.ts +53 -0
  197. package/dist/components/status/state-chip.d.ts.map +1 -0
  198. package/dist/components/status/state-chip.js +8 -0
  199. package/dist/components/status/state-chip.js.map +1 -0
  200. package/dist/components/status/state-mark.d.ts +21 -0
  201. package/dist/components/status/state-mark.d.ts.map +1 -0
  202. package/dist/components/status/state-mark.js +90 -0
  203. package/dist/components/status/state-mark.js.map +1 -0
  204. package/dist/components/status/status-pill.d.ts +62 -0
  205. package/dist/components/status/status-pill.d.ts.map +1 -0
  206. package/dist/components/status/status-pill.js +65 -0
  207. package/dist/components/status/status-pill.js.map +1 -0
  208. package/dist/components/status/status-tokens.d.ts +110 -0
  209. package/dist/components/status/status-tokens.d.ts.map +1 -0
  210. package/dist/components/status/status-tokens.js +102 -0
  211. package/dist/components/status/status-tokens.js.map +1 -0
  212. package/dist/index.d.ts +76 -0
  213. package/dist/index.d.ts.map +1 -0
  214. package/dist/index.js +95 -0
  215. package/dist/index.js.map +1 -0
  216. package/dist/lib/cn.d.ts +11 -0
  217. package/dist/lib/cn.d.ts.map +1 -0
  218. package/dist/lib/cn.js +78 -0
  219. package/dist/lib/cn.js.map +1 -0
  220. package/dist/lib/money.d.ts +73 -0
  221. package/dist/lib/money.d.ts.map +1 -0
  222. package/dist/lib/money.js +123 -0
  223. package/dist/lib/money.js.map +1 -0
  224. package/dist/lib/omit-undefined.d.ts +17 -0
  225. package/dist/lib/omit-undefined.d.ts.map +1 -0
  226. package/dist/lib/omit-undefined.js +24 -0
  227. package/dist/lib/omit-undefined.js.map +1 -0
  228. package/package.json +100 -0
  229. package/src/components/data/code.tsx +43 -0
  230. package/src/components/data/copy-button.tsx +97 -0
  231. package/src/components/data/detail-row.tsx +113 -0
  232. package/src/components/data/id-display.tsx +49 -0
  233. package/src/components/data/masked-value.tsx +96 -0
  234. package/src/components/data/money.tsx +46 -0
  235. package/src/components/data/phone-display.tsx +60 -0
  236. package/src/components/data/stat-tile.tsx +68 -0
  237. package/src/components/data/timestamp-display.tsx +106 -0
  238. package/src/components/patterns/inline-banner.tsx +60 -0
  239. package/src/components/patterns/inline-empty-state.tsx +45 -0
  240. package/src/components/patterns/live-row.tsx +75 -0
  241. package/src/components/patterns/payload-inspector.tsx +157 -0
  242. package/src/components/patterns/route-skeleton.tsx +77 -0
  243. package/src/components/patterns/screen-layout.tsx +44 -0
  244. package/src/components/patterns/stale-write-banner.tsx +44 -0
  245. package/src/components/patterns/state-timeline.tsx +229 -0
  246. package/src/components/primitives/badge.tsx +40 -0
  247. package/src/components/primitives/button.tsx +54 -0
  248. package/src/components/primitives/calendar.tsx +136 -0
  249. package/src/components/primitives/card.tsx +70 -0
  250. package/src/components/primitives/checkbox.tsx +101 -0
  251. package/src/components/primitives/chip-select.tsx +105 -0
  252. package/src/components/primitives/command-menu.tsx +92 -0
  253. package/src/components/primitives/confirm-dialog.tsx +109 -0
  254. package/src/components/primitives/date-picker.tsx +271 -0
  255. package/src/components/primitives/dialog.tsx +195 -0
  256. package/src/components/primitives/drawer.tsx +326 -0
  257. package/src/components/primitives/dropdown-menu.tsx +128 -0
  258. package/src/components/primitives/form-field.tsx +136 -0
  259. package/src/components/primitives/inline-confirm.tsx +118 -0
  260. package/src/components/primitives/input.tsx +21 -0
  261. package/src/components/primitives/label.tsx +43 -0
  262. package/src/components/primitives/pagination.tsx +110 -0
  263. package/src/components/primitives/popover.tsx +41 -0
  264. package/src/components/primitives/progress.tsx +66 -0
  265. package/src/components/primitives/radio-group.tsx +90 -0
  266. package/src/components/primitives/select.tsx +254 -0
  267. package/src/components/primitives/separator.tsx +49 -0
  268. package/src/components/primitives/side-nav.tsx +253 -0
  269. package/src/components/primitives/skeleton.tsx +25 -0
  270. package/src/components/primitives/spinner.tsx +39 -0
  271. package/src/components/primitives/switch.tsx +74 -0
  272. package/src/components/primitives/table.tsx +157 -0
  273. package/src/components/primitives/tabs.tsx +163 -0
  274. package/src/components/primitives/textarea.tsx +21 -0
  275. package/src/components/primitives/toast.tsx +117 -0
  276. package/src/components/primitives/tooltip.tsx +38 -0
  277. package/src/components/status/state-chip.tsx +70 -0
  278. package/src/components/status/state-mark.tsx +154 -0
  279. package/src/components/status/status-pill.tsx +153 -0
  280. package/src/components/status/status-tokens.ts +173 -0
  281. package/src/index.ts +96 -0
  282. package/src/lib/cn.ts +168 -0
  283. package/src/lib/money.ts +164 -0
  284. package/src/lib/omit-undefined.ts +25 -0
  285. package/src/styles/theme.css +381 -0
@@ -0,0 +1,29 @@
1
+ import type { ReactNode } from "react";
2
+ export interface SwitchProps {
3
+ checked: boolean;
4
+ onCheckedChange: (checked: boolean) => void;
5
+ disabled?: boolean | undefined;
6
+ "aria-label"?: string | undefined;
7
+ "aria-labelledby"?: string | undefined;
8
+ className?: string | undefined;
9
+ }
10
+ /**
11
+ * An on/off toggle that takes effect immediately.
12
+ *
13
+ * **Use a `Checkbox`, not this, inside a form with a Save button.** The
14
+ * distinction is not cosmetic: a switch promises the change has already
15
+ * happened, so pairing one with a Save button tells the operator two
16
+ * contradictory things and leaves them unsure whether the toggle landed.
17
+ * A switch belongs where the write fires on change and the UI can report
18
+ * the result.
19
+ */
20
+ export declare function Switch({ checked, onCheckedChange, disabled, className, ...aria }: SwitchProps): import("react").JSX.Element;
21
+ export interface SwitchFieldProps extends Omit<SwitchProps, "aria-label" | "aria-labelledby"> {
22
+ label: ReactNode;
23
+ description?: ReactNode;
24
+ }
25
+ /** A switch with its label to the left, filling the available width — the
26
+ * settings-row layout, where the labels form a readable column and the
27
+ * controls line up on the right. */
28
+ export declare function SwitchField({ label, description, className, ...props }: SwitchFieldProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/switch.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,+BAwB7F;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,iBAAiB,CAAC;IAC3F,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;oCAEoC;AACpC,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAcxF"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Field, Label as HeadlessLabel, Switch as HeadlessSwitch } from "@headlessui/react";
4
+ import { cn } from "../../lib/cn.js";
5
+ /**
6
+ * An on/off toggle that takes effect immediately.
7
+ *
8
+ * **Use a `Checkbox`, not this, inside a form with a Save button.** The
9
+ * distinction is not cosmetic: a switch promises the change has already
10
+ * happened, so pairing one with a Save button tells the operator two
11
+ * contradictory things and leaves them unsure whether the toggle landed.
12
+ * A switch belongs where the write fires on change and the UI can report
13
+ * the result.
14
+ */
15
+ export function Switch({ checked, onCheckedChange, disabled, className, ...aria }) {
16
+ return (_jsx(HeadlessSwitch, { checked: checked, onChange: onCheckedChange, disabled: disabled ?? false, className: cn("group relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-edge-strong bg-surface-3 transition-colors", "data-checked:border-primary data-checked:bg-primary", "data-focus:outline-none data-focus:ring-1 data-focus:ring-ring", "data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...aria, children: _jsx("span", { "aria-hidden": "true", className: cn("pointer-events-none ml-0.5 inline-block size-3.5 rounded-full bg-foreground transition-transform", "group-data-checked:translate-x-4 group-data-checked:bg-primary-content") }) }));
17
+ }
18
+ /** A switch with its label to the left, filling the available width — the
19
+ * settings-row layout, where the labels form a readable column and the
20
+ * controls line up on the right. */
21
+ export function SwitchField({ label, description, className, ...props }) {
22
+ return (_jsxs(Field, { className: cn("flex items-center justify-between gap-4", className), children: [_jsxs("span", { className: "flex flex-col gap-0.5", children: [_jsx(HeadlessLabel, { className: "cursor-pointer text-body text-foreground data-disabled:cursor-not-allowed data-disabled:opacity-50", children: label }), description !== undefined && (_jsx("span", { className: "text-caption text-muted-foreground", children: description }))] }), _jsx(Switch, { ...props })] }));
23
+ }
24
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/primitives/switch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE5F,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAWlC;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAe;IAC5F,OAAO,CACL,KAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,QAAQ,IAAI,KAAK,EAC3B,SAAS,EAAE,EAAE,CACX,+IAA+I,EAC/I,qDAAqD,EACrD,gEAAgE,EAChE,2DAA2D,EAC3D,SAAS,CACV,KACG,IAAI,YAER,8BACc,MAAM,EAClB,SAAS,EAAE,EAAE,CACX,kGAAkG,EAClG,wEAAwE,CACzE,GACD,GACa,CAClB,CAAC;AACJ,CAAC;AAOD;;oCAEoC;AACpC,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB;IACvF,OAAO,CACL,MAAC,KAAK,IAAC,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,aACxE,gBAAM,SAAS,EAAC,uBAAuB,aACrC,KAAC,aAAa,IAAC,SAAS,EAAC,oGAAoG,YAC1H,KAAK,GACQ,EACf,WAAW,KAAK,SAAS,IAAI,CAC5B,eAAM,SAAS,EAAC,oCAAoC,YAAE,WAAW,GAAQ,CAC1E,IACI,EACP,KAAC,MAAM,OAAK,KAAK,GAAI,IACf,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from "react";
2
+ export declare function Table({ className, ...props }: HTMLAttributes<HTMLTableElement>): import("react").JSX.Element;
3
+ export declare function TableHeader({ className, ...props }: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
4
+ export declare function TableBody({ className, ...props }: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
5
+ export interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
6
+ selected?: boolean;
7
+ }
8
+ export declare function TableRow({ className, selected, ...props }: TableRowProps): import("react").JSX.Element;
9
+ export type Breakpoint = "sm" | "md" | "lg" | "xl";
10
+ export interface TableHeadProps extends Omit<ThHTMLAttributes<HTMLTableCellElement>, "align"> {
11
+ align?: "start" | "end";
12
+ /** Hide this column below the given breakpoint. See `HIDE_BELOW`. */
13
+ hideBelow?: Breakpoint | undefined;
14
+ }
15
+ export declare function TableHead({ className, align, hideBelow, ...props }: TableHeadProps): import("react").JSX.Element;
16
+ export interface TableCellProps extends Omit<TdHTMLAttributes<HTMLTableCellElement>, "align"> {
17
+ align?: "start" | "end";
18
+ mono?: boolean;
19
+ /** Hide this column below the given breakpoint. See `HIDE_BELOW`. */
20
+ hideBelow?: Breakpoint | undefined;
21
+ }
22
+ export declare function TableCell({ className, align, mono, hideBelow, ...props }: TableCellProps): import("react").JSX.Element;
23
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAiChF,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,gBAAgB,CAAC,+BAS9E;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,uBAAuB,CAAC,+BAU3F;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,uBAAuB,CAAC,+BAEzF;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,mBAAmB,CAAC;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAWhF;AAiCD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC3F,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,qEAAqE;IACrE,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,KAAe,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAY5F;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC3F,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,KAAe,EACf,IAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,+BAahB"}
@@ -0,0 +1,81 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ // Table conventions per design doc §6.4: sticky header on surface-1, 1px
4
+ // `border-edge-subtle` row dividers, no zebra striping (the status tints
5
+ // are the signal — zebra plus tints is noise), hover on surface-3.
6
+ //
7
+ // D16: daisyUI's real `table`/`table-pin-rows` classes sit underneath this
8
+ // file's own bespoke row/cell behaviour (constraint 7 — "DaisyUI does the
9
+ // work") rather than replacing it. Every own-authored utility class below
10
+ // is unchanged from before this PR; `table`/`table-pin-rows` are added on
11
+ // top and reconciled against three things confirmed by reading
12
+ // `daisyui/components/table.css` directly, not assumed:
13
+ //
14
+ // 1. `table-pin-rows` alone does nothing — every one of its selectors is
15
+ // `.table :where(.table-pin-rows thead)`, i.e. it only matches when
16
+ // `table-pin-rows` sits on the same element as `table`. Both classes go
17
+ // on `<table>` together, never one without the other.
18
+ // 2. `.table` switches `border-collapse` to `separate`. Under the separate
19
+ // border model a border set on `<tr>` — this file's whole row-divider
20
+ // mechanism, `TableRow`'s `border-edge-subtle border-b` — does not
21
+ // render at all; the CSS spec confines borders in that model to cells,
22
+ // never rows or sections. `border-collapse!` (Tailwind v4's trailing-`!`
23
+ // important syntax) stays on `<table>` specifically so adding
24
+ // `.table` doesn't silently delete every row divider in this app —
25
+ // verified live against a real render (`just demo`, `/messages`) with
26
+ // and without the override before trusting it.
27
+ // 3. `.table` also applies its own `padding-block`/`padding-inline` to
28
+ // every `th`/`td` via a zero-specificity-inside `:where()` selector,
29
+ // and its own `font-size`. `TableHead`/`TableCell` keep their existing
30
+ // `px-3`/`py-2`/`h-8` utilities unchanged, at equal selector
31
+ // specificity to daisyUI's rule — confirmed live that the existing
32
+ // cell padding and type scale still win, not daisyUI's defaults.
33
+ export function Table({ className, ...props }) {
34
+ return (_jsx("div", { className: "w-full overflow-x-auto", children: _jsx("table", { className: cn("table table-pin-rows w-full border-collapse! text-body", className), ...props }) }));
35
+ }
36
+ export function TableHeader({ className, ...props }) {
37
+ return (_jsx("thead", { className: cn("sticky top-0 z-10 bg-surface-1 [&_tr]:border-b [&_tr]:border-edge [&_tr]:bg-surface-1", className), ...props }));
38
+ }
39
+ export function TableBody({ className, ...props }) {
40
+ return _jsx("tbody", { className: cn("[&_tr:last-child]:border-b-0", className), ...props });
41
+ }
42
+ export function TableRow({ className, selected = false, ...props }) {
43
+ return (_jsx("tr", { className: cn("border-edge-subtle border-b transition-colors duration-[var(--dur-instant)] hover:bg-surface-3", selected && "bg-surface-3 shadow-[inset_2px_0_0_var(--color-ring)]", className), ...props }));
44
+ }
45
+ /**
46
+ * Responsive column visibility. `hideBelow="md"` hides the cell on
47
+ * viewports narrower than `md` and shows it from `md` up.
48
+ *
49
+ * This exists because the class it replaces was the single
50
+ * most-duplicated string in the console: `"hidden sm:table-cell"`,
51
+ * `"hidden md:table-cell"` and `"hidden lg:table-cell"` appeared **90
52
+ * times** as inline literals across the route-local table components.
53
+ *
54
+ * Worth recording how they got there, because it is a lesson about the
55
+ * rule and not just about tables. R6's own text names
56
+ * `const COL_ID = "hidden lg:table-cell"` in `jobs-screen.tsx` — four
57
+ * hoisted consts — as the motivating example of a class const that must
58
+ * not live in a view. The R6 sweep removed those four consts and, in
59
+ * moving the markup into dumb components, re-expressed the same decision
60
+ * as 90 inline literals. The letter of the rule was satisfied (no classes
61
+ * in a *view* file); the thing the rule exists to prevent — one decision
62
+ * written in many places — got 22× worse.
63
+ *
64
+ * A mapping table rather than an interpolated `` `hidden ${bp}:table-cell` ``
65
+ * because Tailwind scans source text statically: a template literal
66
+ * produces no class at all in the built CSS. The full strings must appear
67
+ * verbatim somewhere Tailwind can see them, and this is that place.
68
+ */
69
+ const HIDE_BELOW = {
70
+ sm: "hidden sm:table-cell",
71
+ md: "hidden md:table-cell",
72
+ lg: "hidden lg:table-cell",
73
+ xl: "hidden xl:table-cell",
74
+ };
75
+ export function TableHead({ className, align = "start", hideBelow, ...props }) {
76
+ return (_jsx("th", { className: cn("h-8 whitespace-nowrap px-3 font-medium text-micro text-muted-foreground tracking-[0.03em]", align === "end" ? "text-right" : "text-left", hideBelow && HIDE_BELOW[hideBelow], className), ...props }));
77
+ }
78
+ export function TableCell({ className, align = "start", mono = false, hideBelow, ...props }) {
79
+ return (_jsx("td", { className: cn("px-3 py-2 text-body", align === "end" ? "text-right" : "text-left", mono && "font-mono tabular-nums", hideBelow && HIDE_BELOW[hideBelow], className), ...props }));
80
+ }
81
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/components/primitives/table.tsx"],"names":[],"mappings":";AACA,O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AS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,GAA+B;IAC7C,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,sBAAsB;CAC3B,CAAC;AAUF,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAkB;IAC3F,OAAO,CACL,aACE,SAAS,EAAE,EAAE,CACX,2FAA2F,EAC3F,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,EAC5C,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,EAClC,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,SAAS,CAAC,EACxB,SAAS,EACT,KAAK,GAAG,OAAO,EACf,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,GAAG,KAAK,EACO;IACf,OAAO,CACL,aACE,SAAS,EAAE,EAAE,CACX,qBAAqB,EACrB,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,EAC5C,IAAI,IAAI,wBAAwB,EAChC,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,EAClC,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * Note the `| undefined` on the optional props below. This package
4
+ * compiles under `exactOptionalPropertyTypes`, where a bare `value?:
5
+ * string` means "you may omit this key" and NOT "you may pass
6
+ * `undefined`" — so the ordinary controlled pattern,
7
+ * `const [v, setV] = useState<string>()` followed by `value={v}`, is a
8
+ * type error. Found writing this component's own story, which is the
9
+ * first code outside the original application to use it.
10
+ */
11
+ export interface ValueTabsProps {
12
+ value?: string | undefined;
13
+ defaultValue?: string | undefined;
14
+ onValueChange?: ((value: string) => void) | undefined;
15
+ className?: string | undefined;
16
+ children: ReactNode;
17
+ }
18
+ export declare function ValueTabs({ value, defaultValue, onValueChange, className, children, }: ValueTabsProps): import("react").JSX.Element;
19
+ export declare function ValueTabsList({ className, children, }: {
20
+ className?: string;
21
+ children: ReactNode;
22
+ }): import("react").JSX.Element;
23
+ export declare function ValueTabsTrigger({ value, className, children, }: {
24
+ /** Consumed by `collectTriggerValues` above via prop introspection on the
25
+ * element tree, not read inside this component itself. */
26
+ value: string;
27
+ className?: string;
28
+ children: ReactNode;
29
+ }): import("react").JSX.Element;
30
+ export declare function ValueTabsContent({ className, children, }: {
31
+ /** Kept for API parity with the old value-based `TabsContent` — the real
32
+ * Tab↔Panel association is positional (Headless UI's own `TabGroup`
33
+ * matches `Tab`/`TabPanel` by declaration order), not looked up by value. */
34
+ value: string;
35
+ className?: string;
36
+ children: ReactNode;
37
+ }): import("react").JSX.Element;
38
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/tabs.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAkDf;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,QAAQ,GACT,EAAE,cAAc,+BAqBhB;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAMA;AAKD,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE;IACD;8DAC0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAcA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,QAAQ,GACT,EAAE;IACD;;iFAE6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAEA"}
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Tab, TabGroup, TabList, TabPanel, TabPanels } from "@headlessui/react";
4
+ import { Children, Fragment, isValidElement, useMemo, useState, } from "react";
5
+ import { cn } from "../../lib/cn.js";
6
+ /**
7
+ * D18/D3: Radix `Tabs` → Headless UI `TabGroup`, behind a value-based
8
+ * `ValueTabs` adapter. Radix's `Tabs` was value-based and controlled
9
+ * (`value`/`onValueChange`/`defaultValue`); Headless UI's own `TabGroup` is
10
+ * index-based (`selectedIndex`/`onChange(index)`). Four call sites
11
+ * (`payload-inspector.tsx`, `users-screen.tsx`, and the gallery) already
12
+ * depend on the value-based shape, and a value-based API is more resistant
13
+ * to bugs when tab order changes — so this adapter translates once, here,
14
+ * rather than rewriting every call site to track an index.
15
+ *
16
+ * Every consumer's own JSX is untouched: only the import line changes, via
17
+ * aliasing (`import { ValueTabs as Tabs, ... } from "@vaam-apps/ui"`) — the one
18
+ * genuinely necessary API break this bucket owns (see each updated file's
19
+ * own import for the one-line diff).
20
+ */
21
+ function collectTriggerValues(node, out = []) {
22
+ Children.forEach(node, (child) => {
23
+ if (!isValidElement(child))
24
+ return;
25
+ const el = child;
26
+ if (el.type === ValueTabsTrigger) {
27
+ if (typeof el.props.value === "string")
28
+ out.push(el.props.value);
29
+ return;
30
+ }
31
+ if (el.props?.children != null)
32
+ collectTriggerValues(el.props.children, out);
33
+ });
34
+ return out;
35
+ }
36
+ /** Separates the one `ValueTabsList` child from everything else, so
37
+ * `ValueTabs` can group "everything else" (the `ValueTabsContent` panels,
38
+ * declared as direct siblings of `ValueTabsList` — the exact Radix `Tabs`
39
+ * shape) under one implicit `TabPanels`, which Headless UI's `TabGroup`
40
+ * requires but the old Radix-shaped call sites never had to write. */
41
+ function splitOutList(children) {
42
+ let list = null;
43
+ const rest = [];
44
+ Children.forEach(children, (child) => {
45
+ if (isValidElement(child) && child.type === ValueTabsList) {
46
+ list = child;
47
+ }
48
+ else {
49
+ rest.push(child);
50
+ }
51
+ });
52
+ return { list, rest };
53
+ }
54
+ export function ValueTabs({ value, defaultValue, onValueChange, className, children, }) {
55
+ const values = useMemo(() => collectTriggerValues(children), [children]);
56
+ const { list, rest } = useMemo(() => splitOutList(children), [children]);
57
+ const [internalValue, setInternalValue] = useState(defaultValue ?? values[0]);
58
+ const isControlled = value !== undefined;
59
+ const currentValue = isControlled ? value : internalValue;
60
+ const selectedIndex = Math.max(0, values.indexOf(currentValue ?? values[0] ?? ""));
61
+ function handleChange(index) {
62
+ const next = values[index];
63
+ if (next === undefined)
64
+ return;
65
+ if (!isControlled)
66
+ setInternalValue(next);
67
+ onValueChange?.(next);
68
+ }
69
+ return (_jsxs(TabGroup, { className: className, selectedIndex: selectedIndex, onChange: handleChange, children: [list, _jsx(TabPanels, { as: Fragment, children: rest })] }));
70
+ }
71
+ export function ValueTabsList({ className, children, }) {
72
+ return (_jsx(TabList, { className: cn("flex items-center gap-4 border-edge border-b", className), children: children }));
73
+ }
74
+ // Underline variant only (design doc §5.2: "no pill/segmented variant — pill
75
+ // tabs are consumer furniture"). 2px bottom rule in --foreground on the
76
+ // active tab.
77
+ export function ValueTabsTrigger({ value, className, children, }) {
78
+ void value;
79
+ return (_jsx(Tab, { type: "button", className: cn("-mb-px border-b-2 border-transparent px-1 py-2 font-medium text-body text-muted-foreground outline-none", "data-selected:border-foreground data-selected:text-foreground", className), children: children }));
80
+ }
81
+ export function ValueTabsContent({ className, children, }) {
82
+ return _jsx(TabPanel, { className: cn("pt-4", className), children: children });
83
+ }
84
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/primitives/tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,cAAc,EAGd,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;GAcG;AAEH,SAAS,oBAAoB,CAAC,IAAe,EAAE,GAAG,GAAa,EAAE;IAC/D,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;QAC/B,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;YAAE,OAAO;QACnC,MAAM,EAAE,GAAG,KAA+D,CAAC;QAC3E,IAAI,EAAE,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;YACjC,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACjE,OAAO;QACT,CAAC;QACD,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,IAAI,IAAI;YAAE,oBAAoB,CAAC,EAAE,CAAC,KAAK,CAAC,QAA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Attributes } from "react";
2
+ export type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
3
+ export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
4
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAIpD,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAOxE,eAAO,MAAM,QAAQ,+GAQpB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cn } from "../../lib/cn.js";
4
+ // D8: same reasoning as `input.tsx` — daisyUI's own `.textarea` rule sets
5
+ // `border-radius: var(--radius-field)` directly (confirmed by reading
6
+ // `daisyui/components/textarea.css`), so no `rounded-*` class is added
7
+ // here. The class string is unchanged; the token rewrite in Phase 0 is
8
+ // what moved the rendered radius.
9
+ export const Textarea = forwardRef(({ className, ...props }, ref) => (_jsx("textarea", { ref: ref, className: cn("textarea textarea-bordered w-full font-sans text-prose", className), ...props })));
10
+ Textarea.displayName = "Textarea";
11
+ //# sourceMappingURL=textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/primitives/textarea.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAIlC,0EAA0E;AAC1E,sEAAsE;AACtE,uEAAuE;AACvE,uEAAuE;AACvE,kCAAkC;AAClC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,mBACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,wDAAwD,EAAE,SAAS,CAAC,KAC9E,KAAK,GACT,CACH,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Toasts, no Radix — `dialog`/`dropdown-menu`/`select`/`tooltip`/`popover`
3
+ * are the five primitives that need Radix's behaviour (design doc T6
4
+ * brief); a toast is a transient, non-modal, non-focus-trapping
5
+ * notification, so a small hand-rolled store is enough.
6
+ *
7
+ * For transient confirmations only ("copied", "saved", "replay queued") —
8
+ * design doc §5.1: anything an operator must act on is inline, never a
9
+ * toast, because a toast that expires while they're reading a payload is a
10
+ * lost message.
11
+ */
12
+ export type ToastVariant = "default" | "success" | "danger";
13
+ export interface ToastItem {
14
+ id: string;
15
+ title: string;
16
+ description?: string;
17
+ variant?: ToastVariant;
18
+ durationMs?: number;
19
+ }
20
+ export declare function dismissToast(id: string): void;
21
+ export declare function toast(item: Omit<ToastItem, "id">): string;
22
+ /** Mount once, near the app root. Renders the live toast stack. */
23
+ export declare function Toaster(): import("react").JSX.Element;
24
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/toast.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoBD,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,QAGtC;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,MAAM,CASzD;AA0BD,mEAAmE;AACnE,wBAAgB,OAAO,gCA6BtB"}
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { useSyncExternalStore } from "react";
5
+ import { cn } from "../../lib/cn.js";
6
+ let toasts = [];
7
+ const listeners = new Set();
8
+ function emit() {
9
+ for (const listener of listeners)
10
+ listener();
11
+ }
12
+ function subscribe(listener) {
13
+ listeners.add(listener);
14
+ return () => listeners.delete(listener);
15
+ }
16
+ function getSnapshot() {
17
+ return toasts;
18
+ }
19
+ export function dismissToast(id) {
20
+ toasts = toasts.filter((t) => t.id !== id);
21
+ emit();
22
+ }
23
+ export function toast(item) {
24
+ const id = crypto.randomUUID();
25
+ const durationMs = item.durationMs ?? 4000;
26
+ toasts = [...toasts, { ...item, id }];
27
+ emit();
28
+ if (durationMs > 0) {
29
+ setTimeout(() => dismissToast(id), durationMs);
30
+ }
31
+ return id;
32
+ }
33
+ // D11: `cva()` replaces the previous `Record<ToastVariant, string>` lookup,
34
+ // same three class strings per variant, keyed identically. One deliberate
35
+ // D8 diff lives in the base string below, not here: the shared "toast card"
36
+ // classes move off `rounded-sm` (`--radius-field`, 12px) onto `rounded-box`
37
+ // (`--radius-box`, 20px) — a toast shares `--shadow-popover` with
38
+ // dialog/popover/dropdown/drawer (see `theme.css`'s own "only floating
39
+ // layers... get one [shadow]" comment), i.e. it's the same family of
40
+ // floating panel those get, not a field-scale control, and D14's own
41
+ // drawer sketch (§6.4) already uses `rounded-t-box` for exactly that
42
+ // family. `variant` classes themselves are untouched.
43
+ const toastVariants = cva("pointer-events-auto rounded-box border p-3 text-body shadow-[var(--shadow-popover)]", {
44
+ variants: {
45
+ variant: {
46
+ default: "border-edge bg-surface-2 text-foreground",
47
+ success: "border-state-success-fg/30 bg-surface-2 text-foreground",
48
+ danger: "border-state-danger-border bg-state-danger-bg text-state-danger-fg",
49
+ },
50
+ },
51
+ defaultVariants: { variant: "default" },
52
+ });
53
+ /** Mount once, near the app root. Renders the live toast stack. */
54
+ export function Toaster() {
55
+ const items = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
56
+ return (_jsx("div", { role: "status", "aria-live": "polite", className: "pointer-events-none fixed right-4 bottom-4 z-50 flex w-80 flex-col gap-2", children: items.map((item) => (_jsxs("div", { className: cn(toastVariants({ variant: item.variant ?? "default" })), children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("p", { className: "font-medium", children: item.title }), _jsx("button", { type: "button", onClick: () => dismissToast(item.id), "aria-label": "Dismiss", className: "text-subtle-foreground hover:text-foreground", children: "\u00D7" })] }), item.description != null && (_jsx("p", { className: "mt-1 text-caption text-muted-foreground", children: item.description }))] }, item.id))) }));
57
+ }
58
+ //# sourceMappingURL=toast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/components/primitives/toast.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AA0BlC,IAAI,MAAM,GAAgB,EAAE,CAAC;AAC7B,MAAM,SAAS,GAAG,IAAI,GAAG,EAAY,CAAC;AAEtC,SAAS,IAAI;IACX,KAAK,MAAM,QAAQ,IAAI,SAAS;QAAE,QAAQ,EAAE,CAAC;AAC/C,CAAC;AAED,SAAS,SAAS,CAAC,QAAkB;IACnC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,WAAW;IAClB,OAAO,MAAM,CAAC;AA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K,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,eAAmB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC,CAAC,aACrF,eAAK,SAAS,EAAC,wCAAwC,aACrD,YAAG,SAAS,EAAC,aAAa,YAAE,IAAI,CAAC,KAAK,GAAK,EAC3C,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,gBACzB,SAAS,EACpB,SAAS,EAAC,8CAA8C,uBAGjD,IACL,EACL,IAAI,CAAC,WAAW,IAAI,IAAI,IAAI,CAC3B,YAAG,SAAS,EAAC,yCAAyC,YAAE,IAAI,CAAC,WAAW,GAAK,CAC9E,KAdO,IAAI,CAAC,EAAE,CAeX,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * D5: `@radix-ui/react-tooltip` is deleted outright, replaced by DaisyUI's
4
+ * native `.tooltip`/`data-tip` CSS component — no JS, no portal, hover/focus
5
+ * driven by `:hover`/`:focus` in CSS alone. Headless UI ships no Tooltip
6
+ * equivalent, and introducing a second behaviour library (e.g.
7
+ * `@floating-ui/react`) just to replace one Radix package with another
8
+ * contradicts constraints 6–7.
9
+ *
10
+ * **Accepted limitation (named explicitly in the design doc, D5):** `data-tip`
11
+ * is a plain HTML attribute rendered via CSS `content: attr(data-tip)`, so
12
+ * the label must be a string — no rich/interactive tooltip content anywhere
13
+ * in this console. Nothing today needs one (`side-nav.tsx`'s own icon-rail
14
+ * tooltips already use the identical `tooltip`/`data-tip` convention
15
+ * directly, predating this file).
16
+ *
17
+ * The API collapses Radix's four-part compound
18
+ * (`TooltipProvider`/`Tooltip`/`TooltipTrigger`/`TooltipContent`) into one
19
+ * wrapper, since DaisyUI's mechanism needs no provider and no separate
20
+ * trigger/content split — the trigger is just `children`.
21
+ */
22
+ export interface TooltipProps {
23
+ /** Plain text only — see the module doc above. */
24
+ label: string;
25
+ position?: "top" | "bottom" | "left" | "right";
26
+ className?: string;
27
+ children: ReactNode;
28
+ }
29
+ export declare function Tooltip({ label, position, className, children }: TooltipProps): import("react").JSX.Element;
30
+ //# sourceMappingURL=tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,YAAY;IAC3B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,YAAY,+BAMrF"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ export function Tooltip({ label, position = "top", className, children }) {
4
+ return (_jsx("div", { className: cn("tooltip", `tooltip-${position}`, className), "data-tip": label, children: children }));
5
+ }
6
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/primitives/tooltip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AA8BlC,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAgB;IACpF,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,WAAW,QAAQ,EAAE,EAAE,SAAS,CAAC,cAAY,KAAK,YAC7E,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { HTMLAttributes } from "react";
2
+ import { type StatusHue } from "./status-tokens.js";
3
+ /**
4
+ * A compact, state-toned chip for a single word or short phrase rendered
5
+ * *inline* — beside a table cell's value, after a label, inside a card.
6
+ *
7
+ * # Not `InlineBanner`, and not `Badge`
8
+ *
9
+ * `InlineBanner` is the full-width `px-3 py-2` notice that owns its own
10
+ * line. Four route groups correctly refused to route these through it
11
+ * during the R6 factorization: forcing a chip into a banner would mean
12
+ * overriding padding and swapping `<span>` for `<div>`, which is fighting
13
+ * the primitive rather than using it. That refusal was right, and this is
14
+ * the component they were missing.
15
+ *
16
+ * `Badge` is the other near-miss: it exists, but it is built on daisyUI's
17
+ * `badge-neutral`/`badge-outline` classes, a different visual system from
18
+ * the `state-*` token family every status surface in this console uses.
19
+ * A chip that must read as *success* or *danger* cannot express that
20
+ * through `Badge` without bypassing its variants entirely.
21
+ *
22
+ * # Why it is shared
23
+ *
24
+ * Five sites across three route groups (`workers`, `routes`, `simulator`)
25
+ * had byte-identical `rounded-sm border border-state-<tone>-border
26
+ * bg-state-<tone>-bg px-1.5 py-0.5 text-caption text-state-<tone>-fg`
27
+ * strings, differing only in tone. A sixth (`dashboard`) used the same
28
+ * shape at `px-2`. They are unified here at `px-1.5`, the majority
29
+ * spelling — a one-step spacing change on that single site, and the same
30
+ * normalisation `DetailRow` made for the same reason: the console should
31
+ * not render one concept two ways because two people typed a different
32
+ * padding.
33
+ *
34
+ * `StatusPill` is **not** replaced by this. It maps a whole state
35
+ * machine's variants onto a fixed vocabulary and carries a glyph; this is
36
+ * the generic chip for everything that is state-toned but is not a state
37
+ * machine — a capability flag, a derived verdict, a one-word qualifier.
38
+ *
39
+ * # Tone
40
+ *
41
+ * Tone comes from the shared [`StatusHue`] vocabulary rather than a second
42
+ * private list. Before this, `StateChip` carried its own four-tone table
43
+ * whose class strings were transcribed by hand from the same tokens
44
+ * `HUE_CLASSES` already held — two copies of one mapping, and the chip's
45
+ * copy was missing three of the hues, so a caller wanting `expired` or
46
+ * `parked` had no way to ask for it and reached for `className` instead.
47
+ */
48
+ export type StateChipTone = StatusHue;
49
+ export interface StateChipProps extends HTMLAttributes<HTMLSpanElement> {
50
+ tone?: StateChipTone | undefined;
51
+ }
52
+ export declare function StateChip({ className, tone, ...props }: StateChipProps): import("react").JSX.Element;
53
+ //# sourceMappingURL=state-chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-chip.d.ts","sourceRoot":"","sources":["../../../src/components/status/state-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,eAAe,CAAC;IACrE,IAAI,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CAClC;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,IAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAcpF"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ import { HUE_CLASSES } from "./status-tokens.js";
4
+ export function StateChip({ className, tone = "uncertain", ...props }) {
5
+ const hue = HUE_CLASSES[tone];
6
+ return (_jsx("span", { className: cn("rounded-sm border px-1.5 py-0.5 text-caption", hue.border, hue.bg, hue.fg, className), ...props }));
7
+ }
8
+ //# sourceMappingURL=state-chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-chip.js","sourceRoot":"","sources":["../../../src/components/status/state-chip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAqD9D,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,WAAW,EAAE,GAAG,KAAK,EAAkB;IACnF,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,8CAA8C,EAC9C,GAAG,CAAC,MAAM,EACV,GAAG,CAAC,EAAE,EACN,GAAG,CAAC,EAAE,EACN,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { SVGProps } from "react";
2
+ import type { StatusMeta } from "./status-tokens.js";
3
+ export interface StateMarkProps extends Omit<SVGProps<SVGSVGElement>, "className"> {
4
+ /** One state's presentation, e.g. `MY_STATUS_SYSTEM[state]`. */
5
+ meta: StatusMeta;
6
+ /** Rendered size in px. Below 12 the glyph loses its interior mark and
7
+ * should not be used — at that size the silhouette alone is doing all
8
+ * the work and a plain dot would be more honest. */
9
+ size?: 12 | 14 | 16;
10
+ className?: string | undefined;
11
+ }
12
+ /**
13
+ * The status-glyph SVG primitive: silhouette × interior mark × fill.
14
+ *
15
+ * Parameterised on a raw [`StatusMeta`] rather than on any particular
16
+ * state enum, so every state machine's pill renders through this one
17
+ * geometry instead of forking it. Pure, and `aria-hidden` — the
18
+ * accessible name belongs on the wrapping pill, which has the label.
19
+ */
20
+ export declare function StateMark({ meta, size, className, ...props }: StateMarkProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=state-mark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-mark.d.ts","sourceRoot":"","sources":["../../../src/components/status/state-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,WAAW,CAAC;IAChF,gEAAgE;IAChE,IAAI,EAAE,UAAU,CAAC;IACjB;;wDAEoD;IACpD,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAuHD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAcjF"}