@ecoma-io/loom 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 (259) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +180 -0
  3. package/dist/a11y.d.ts +2 -0
  4. package/dist/a11y.d.ts.map +1 -0
  5. package/dist/a11y.js +2 -0
  6. package/dist/blocks/AppHeader/AppHeader.js +7 -0
  7. package/dist/blocks/AppHeader/AppHeader.js.map +1 -0
  8. package/dist/blocks/AppHeader/AppHeader.vue.d.ts +83 -0
  9. package/dist/blocks/AppHeader/AppHeader.vue.d.ts.map +1 -0
  10. package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js +96 -0
  11. package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js.map +1 -0
  12. package/dist/blocks/DashboardGrid/DashboardGrid.js +7 -0
  13. package/dist/blocks/DashboardGrid/DashboardGrid.js.map +1 -0
  14. package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts +42 -0
  15. package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts.map +1 -0
  16. package/dist/blocks/DashboardGrid/DashboardGrid.vue_vue_type_script_setup_true_lang.js +45 -0
  17. package/dist/blocks/DashboardGrid/DashboardGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
  18. package/dist/blocks/EmptyState/EmptyState.js +7 -0
  19. package/dist/blocks/EmptyState/EmptyState.js.map +1 -0
  20. package/dist/blocks/EmptyState/EmptyState.vue.d.ts +50 -0
  21. package/dist/blocks/EmptyState/EmptyState.vue.d.ts.map +1 -0
  22. package/dist/blocks/EmptyState/EmptyState.vue_vue_type_script_setup_true_lang.js +71 -0
  23. package/dist/blocks/EmptyState/EmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  24. package/dist/blocks/PageHeader/PageHeader.js +7 -0
  25. package/dist/blocks/PageHeader/PageHeader.js.map +1 -0
  26. package/dist/blocks/PageHeader/PageHeader.vue.d.ts +54 -0
  27. package/dist/blocks/PageHeader/PageHeader.vue.d.ts.map +1 -0
  28. package/dist/blocks/PageHeader/PageHeader.vue_vue_type_script_setup_true_lang.js +68 -0
  29. package/dist/blocks/PageHeader/PageHeader.vue_vue_type_script_setup_true_lang.js.map +1 -0
  30. package/dist/blocks/RowActions/RowActions.js +7 -0
  31. package/dist/blocks/RowActions/RowActions.js.map +1 -0
  32. package/dist/blocks/RowActions/RowActions.vue.d.ts +14 -0
  33. package/dist/blocks/RowActions/RowActions.vue.d.ts.map +1 -0
  34. package/dist/blocks/RowActions/RowActions.vue_vue_type_script_setup_true_lang.js +47 -0
  35. package/dist/blocks/RowActions/RowActions.vue_vue_type_script_setup_true_lang.js.map +1 -0
  36. package/dist/blocks/SidebarNav/SidebarNav.js +7 -0
  37. package/dist/blocks/SidebarNav/SidebarNav.js.map +1 -0
  38. package/dist/blocks/SidebarNav/SidebarNav.vue.d.ts +40 -0
  39. package/dist/blocks/SidebarNav/SidebarNav.vue.d.ts.map +1 -0
  40. package/dist/blocks/SidebarNav/SidebarNav.vue_vue_type_script_setup_true_lang.js +125 -0
  41. package/dist/blocks/SidebarNav/SidebarNav.vue_vue_type_script_setup_true_lang.js.map +1 -0
  42. package/dist/blocks/TitleBar/TitleBar.js +7 -0
  43. package/dist/blocks/TitleBar/TitleBar.js.map +1 -0
  44. package/dist/blocks/TitleBar/TitleBar.vue.d.ts +49 -0
  45. package/dist/blocks/TitleBar/TitleBar.vue.d.ts.map +1 -0
  46. package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js +66 -0
  47. package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  48. package/dist/blocks/ToastStack/ToastStack.js +7 -0
  49. package/dist/blocks/ToastStack/ToastStack.js.map +1 -0
  50. package/dist/blocks/ToastStack/ToastStack.vue.d.ts +24 -0
  51. package/dist/blocks/ToastStack/ToastStack.vue.d.ts.map +1 -0
  52. package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js +38 -0
  53. package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js.map +1 -0
  54. package/dist/icons/BrandMark.d.ts +18 -0
  55. package/dist/icons/BrandMark.d.ts.map +1 -0
  56. package/dist/icons/BrandMark.js +47 -0
  57. package/dist/icons/BrandMark.js.map +1 -0
  58. package/dist/index.d.ts +75 -0
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/index.js +46 -0
  61. package/dist/lib/a11y-scope.d.ts +19 -0
  62. package/dist/lib/a11y-scope.d.ts.map +1 -0
  63. package/dist/lib/a11y-scope.js +28 -0
  64. package/dist/lib/a11y-scope.js.map +1 -0
  65. package/dist/lib/attrs.d.ts +18 -0
  66. package/dist/lib/attrs.d.ts.map +1 -0
  67. package/dist/lib/attrs.js +28 -0
  68. package/dist/lib/attrs.js.map +1 -0
  69. package/dist/lib/cn.d.ts +9 -0
  70. package/dist/lib/cn.d.ts.map +1 -0
  71. package/dist/lib/cn.js +16 -0
  72. package/dist/lib/cn.js.map +1 -0
  73. package/dist/lib/icon-defaults.d.ts +22 -0
  74. package/dist/lib/icon-defaults.d.ts.map +1 -0
  75. package/dist/lib/icon-defaults.js +32 -0
  76. package/dist/lib/icon-defaults.js.map +1 -0
  77. package/dist/lib/motion.d.ts +14 -0
  78. package/dist/lib/motion.d.ts.map +1 -0
  79. package/dist/lib/motion.js +20 -0
  80. package/dist/lib/motion.js.map +1 -0
  81. package/dist/lib/props.d.ts +31 -0
  82. package/dist/lib/props.d.ts.map +1 -0
  83. package/dist/lib/props.js +37 -0
  84. package/dist/lib/props.js.map +1 -0
  85. package/dist/primitives/Avatar/Avatar.js +7 -0
  86. package/dist/primitives/Avatar/Avatar.js.map +1 -0
  87. package/dist/primitives/Avatar/Avatar.vue.d.ts +27 -0
  88. package/dist/primitives/Avatar/Avatar.vue.d.ts.map +1 -0
  89. package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +33 -0
  90. package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  91. package/dist/primitives/Badge/Badge.js +7 -0
  92. package/dist/primitives/Badge/Badge.js.map +1 -0
  93. package/dist/primitives/Badge/Badge.vue.d.ts +27 -0
  94. package/dist/primitives/Badge/Badge.vue.d.ts.map +1 -0
  95. package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js +30 -0
  96. package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -0
  97. package/dist/primitives/Button/Button.js +7 -0
  98. package/dist/primitives/Button/Button.js.map +1 -0
  99. package/dist/primitives/Button/Button.vue.d.ts +70 -0
  100. package/dist/primitives/Button/Button.vue.d.ts.map +1 -0
  101. package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js +122 -0
  102. package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js.map +1 -0
  103. package/dist/primitives/Checkbox/Checkbox.js +7 -0
  104. package/dist/primitives/Checkbox/Checkbox.js.map +1 -0
  105. package/dist/primitives/Checkbox/Checkbox.vue.d.ts +34 -0
  106. package/dist/primitives/Checkbox/Checkbox.vue.d.ts.map +1 -0
  107. package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +94 -0
  108. package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
  109. package/dist/primitives/Dialog/Dialog.js +7 -0
  110. package/dist/primitives/Dialog/Dialog.js.map +1 -0
  111. package/dist/primitives/Dialog/Dialog.vue.d.ts +58 -0
  112. package/dist/primitives/Dialog/Dialog.vue.d.ts.map +1 -0
  113. package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js +88 -0
  114. package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -0
  115. package/dist/primitives/DropdownMenu/DropdownMenu.js +7 -0
  116. package/dist/primitives/DropdownMenu/DropdownMenu.js.map +1 -0
  117. package/dist/primitives/DropdownMenu/DropdownMenu.vue.d.ts +55 -0
  118. package/dist/primitives/DropdownMenu/DropdownMenu.vue.d.ts.map +1 -0
  119. package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js +82 -0
  120. package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  121. package/dist/primitives/Field/Field.js +7 -0
  122. package/dist/primitives/Field/Field.js.map +1 -0
  123. package/dist/primitives/Field/Field.vue.d.ts +53 -0
  124. package/dist/primitives/Field/Field.vue.d.ts.map +1 -0
  125. package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js +84 -0
  126. package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js.map +1 -0
  127. package/dist/primitives/InlineError/InlineError.js +7 -0
  128. package/dist/primitives/InlineError/InlineError.js.map +1 -0
  129. package/dist/primitives/InlineError/InlineError.vue.d.ts +32 -0
  130. package/dist/primitives/InlineError/InlineError.vue.d.ts.map +1 -0
  131. package/dist/primitives/InlineError/InlineError.vue_vue_type_script_setup_true_lang.js +44 -0
  132. package/dist/primitives/InlineError/InlineError.vue_vue_type_script_setup_true_lang.js.map +1 -0
  133. package/dist/primitives/Menubar/Menubar.js +7 -0
  134. package/dist/primitives/Menubar/Menubar.js.map +1 -0
  135. package/dist/primitives/Menubar/Menubar.vue.d.ts +41 -0
  136. package/dist/primitives/Menubar/Menubar.vue.d.ts.map +1 -0
  137. package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js +184 -0
  138. package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  139. package/dist/primitives/NumberField/NumberField.js +7 -0
  140. package/dist/primitives/NumberField/NumberField.js.map +1 -0
  141. package/dist/primitives/NumberField/NumberField.vue.d.ts +47 -0
  142. package/dist/primitives/NumberField/NumberField.vue.d.ts.map +1 -0
  143. package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +204 -0
  144. package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js.map +1 -0
  145. package/dist/primitives/Popover/Popover.js +7 -0
  146. package/dist/primitives/Popover/Popover.js.map +1 -0
  147. package/dist/primitives/Popover/Popover.vue.d.ts +61 -0
  148. package/dist/primitives/Popover/Popover.vue.d.ts.map +1 -0
  149. package/dist/primitives/Popover/Popover.vue_vue_type_script_setup_true_lang.js +59 -0
  150. package/dist/primitives/Popover/Popover.vue_vue_type_script_setup_true_lang.js.map +1 -0
  151. package/dist/primitives/Progress/Progress.js +7 -0
  152. package/dist/primitives/Progress/Progress.js.map +1 -0
  153. package/dist/primitives/Progress/Progress.vue.d.ts +30 -0
  154. package/dist/primitives/Progress/Progress.vue.d.ts.map +1 -0
  155. package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js +67 -0
  156. package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js.map +1 -0
  157. package/dist/primitives/RadioGroup/RadioGroup.js +7 -0
  158. package/dist/primitives/RadioGroup/RadioGroup.js.map +1 -0
  159. package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts +39 -0
  160. package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts.map +1 -0
  161. package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js +63 -0
  162. package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  163. package/dist/primitives/SegmentedControl/SegmentedControl.js +7 -0
  164. package/dist/primitives/SegmentedControl/SegmentedControl.js.map +1 -0
  165. package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts +40 -0
  166. package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -0
  167. package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js +89 -0
  168. package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -0
  169. package/dist/primitives/Select/Select.js +7 -0
  170. package/dist/primitives/Select/Select.js.map +1 -0
  171. package/dist/primitives/Select/Select.vue.d.ts +56 -0
  172. package/dist/primitives/Select/Select.vue.d.ts.map +1 -0
  173. package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js +122 -0
  174. package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js.map +1 -0
  175. package/dist/primitives/Separator/Separator.js +7 -0
  176. package/dist/primitives/Separator/Separator.js.map +1 -0
  177. package/dist/primitives/Separator/Separator.vue.d.ts +19 -0
  178. package/dist/primitives/Separator/Separator.vue.d.ts.map +1 -0
  179. package/dist/primitives/Separator/Separator.vue_vue_type_script_setup_true_lang.js +31 -0
  180. package/dist/primitives/Separator/Separator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  181. package/dist/primitives/Skeleton/Skeleton.js +7 -0
  182. package/dist/primitives/Skeleton/Skeleton.js.map +1 -0
  183. package/dist/primitives/Skeleton/Skeleton.vue.d.ts +16 -0
  184. package/dist/primitives/Skeleton/Skeleton.vue.d.ts.map +1 -0
  185. package/dist/primitives/Skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js +37 -0
  186. package/dist/primitives/Skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  187. package/dist/primitives/Slider/Slider.js +7 -0
  188. package/dist/primitives/Slider/Slider.js.map +1 -0
  189. package/dist/primitives/Slider/Slider.vue.d.ts +58 -0
  190. package/dist/primitives/Slider/Slider.vue.d.ts.map +1 -0
  191. package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js +137 -0
  192. package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -0
  193. package/dist/primitives/Spinner/Spinner.js +7 -0
  194. package/dist/primitives/Spinner/Spinner.js.map +1 -0
  195. package/dist/primitives/Spinner/Spinner.vue.d.ts +21 -0
  196. package/dist/primitives/Spinner/Spinner.vue.d.ts.map +1 -0
  197. package/dist/primitives/Spinner/Spinner.vue_vue_type_script_setup_true_lang.js +63 -0
  198. package/dist/primitives/Spinner/Spinner.vue_vue_type_script_setup_true_lang.js.map +1 -0
  199. package/dist/primitives/Surface/Surface.js +7 -0
  200. package/dist/primitives/Surface/Surface.js.map +1 -0
  201. package/dist/primitives/Surface/Surface.vue.d.ts +42 -0
  202. package/dist/primitives/Surface/Surface.vue.d.ts.map +1 -0
  203. package/dist/primitives/Surface/Surface.vue_vue_type_script_setup_true_lang.js +48 -0
  204. package/dist/primitives/Surface/Surface.vue_vue_type_script_setup_true_lang.js.map +1 -0
  205. package/dist/primitives/Switch/Switch.js +7 -0
  206. package/dist/primitives/Switch/Switch.js.map +1 -0
  207. package/dist/primitives/Switch/Switch.vue.d.ts +24 -0
  208. package/dist/primitives/Switch/Switch.vue.d.ts.map +1 -0
  209. package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js +44 -0
  210. package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -0
  211. package/dist/primitives/Tabs/Tabs.js +7 -0
  212. package/dist/primitives/Tabs/Tabs.js.map +1 -0
  213. package/dist/primitives/Tabs/Tabs.vue.d.ts +33 -0
  214. package/dist/primitives/Tabs/Tabs.vue.d.ts.map +1 -0
  215. package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +54 -0
  216. package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -0
  217. package/dist/primitives/TextField/TextField.js +7 -0
  218. package/dist/primitives/TextField/TextField.js.map +1 -0
  219. package/dist/primitives/TextField/TextField.vue.d.ts +58 -0
  220. package/dist/primitives/TextField/TextField.vue.d.ts.map +1 -0
  221. package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js +71 -0
  222. package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js.map +1 -0
  223. package/dist/primitives/Textarea/Textarea.js +7 -0
  224. package/dist/primitives/Textarea/Textarea.js.map +1 -0
  225. package/dist/primitives/Textarea/Textarea.vue.d.ts +48 -0
  226. package/dist/primitives/Textarea/Textarea.vue.d.ts.map +1 -0
  227. package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +54 -0
  228. package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js.map +1 -0
  229. package/dist/primitives/Toast/Toast.js +7 -0
  230. package/dist/primitives/Toast/Toast.js.map +1 -0
  231. package/dist/primitives/Toast/Toast.vue.d.ts +46 -0
  232. package/dist/primitives/Toast/Toast.vue.d.ts.map +1 -0
  233. package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js +52 -0
  234. package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -0
  235. package/dist/primitives/Toast/ToastItem.js +7 -0
  236. package/dist/primitives/Toast/ToastItem.js.map +1 -0
  237. package/dist/primitives/Toast/ToastItem.vue.d.ts +38 -0
  238. package/dist/primitives/Toast/ToastItem.vue.d.ts.map +1 -0
  239. package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js +114 -0
  240. package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  241. package/dist/primitives/Tooltip/Tooltip.js +7 -0
  242. package/dist/primitives/Tooltip/Tooltip.js.map +1 -0
  243. package/dist/primitives/Tooltip/Tooltip.vue.d.ts +52 -0
  244. package/dist/primitives/Tooltip/Tooltip.vue.d.ts.map +1 -0
  245. package/dist/primitives/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +56 -0
  246. package/dist/primitives/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  247. package/dist/primitives/WindowControls/WindowControls.js +7 -0
  248. package/dist/primitives/WindowControls/WindowControls.js.map +1 -0
  249. package/dist/primitives/WindowControls/WindowControls.vue.d.ts +41 -0
  250. package/dist/primitives/WindowControls/WindowControls.vue.d.ts.map +1 -0
  251. package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js +111 -0
  252. package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js.map +1 -0
  253. package/dist/styles/fonts/Geist-Variable.woff2 +0 -0
  254. package/dist/styles/fonts/GeistMono-Variable.woff2 +0 -0
  255. package/dist/styles/fonts/OFL.txt +92 -0
  256. package/dist/styles/fonts.css +30 -0
  257. package/dist/styles/global.css +181 -0
  258. package/dist/styles/theme.css +212 -0
  259. package/package.json +123 -0
@@ -0,0 +1,7 @@
1
+ import Spinner_vue_vue_type_script_setup_true_lang_default, { spinnerVariants } from "./Spinner.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/Spinner/Spinner.vue
3
+ var Spinner_default = Spinner_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { Spinner_default as default, spinnerVariants };
6
+
7
+ //# sourceMappingURL=Spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.js","names":[],"sources":["../../../src/primitives/Spinner/Spinner.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\nexport type SpinnerSize = \"sm\" | \"md\" | \"lg\";\n\nexport const spinnerVariants = cva(\"animate-spin text-current\", {\n variants: {\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-8 w-8\",\n } satisfies Record<SpinnerSize, string>,\n },\n defaultVariants: { size: \"md\" },\n});\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\n/**\n * Spinner — indeterminate loading indicator: the wait has no known length or\n * layout shape yet (e.g. waiting on a network request). Once the layout IS\n * known (a card, a list row), use Skeleton instead so the placeholder already\n * reads as the coming content.\n *\n * The root carries `role=\"status\"` + `aria-label` (from `label`) so screen\n * readers announce the wait; the decorative SVG arc is `aria-hidden` since\n * the label already carries the meaning. Color inherits from the caller via\n * `text-current`/`stroke-current`/`fill-current` — set text color on an\n * ancestor, never hardcode it here.\n *\n * Button deliberately does not reuse this component for its own loading\n * state: it inlines the same arc instead, because `role=\"status\"` inside a\n * button that is already `aria-busy` would announce the wait twice.\n */\nwithDefaults(\n defineProps<{\n /** Control diameter. */\n size?: SpinnerSize;\n /** What a screen reader announces for the wait — always describe the specific work in progress (e.g. \"Saving changes\") rather than leaving the generic default. */\n label?: string;\n }>(),\n { size: \"md\", label: \"Loading\" },\n);\n</script>\n\n<template>\n <span role=\"status\" :aria-label=\"label\" class=\"inline-flex\">\n <svg :class=\"cn(spinnerVariants({ size }))\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <circle class=\"stroke-current opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke-width=\"4\" />\n <path class=\"fill-current opacity-75\" d=\"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4z\" />\n </svg>\n </span>\n</template>\n"],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export type SpinnerSize = "sm" | "md" | "lg";
2
+ export declare const spinnerVariants: (props?: ({
3
+ size?: "sm" | "md" | "lg" | null | undefined;
4
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ declare const __VLS_export: import("vue").DefineComponent<{
8
+ /** Control diameter. */
9
+ size?: SpinnerSize;
10
+ /** What a screen reader announces for the wait — always describe the specific work in progress (e.g. "Saving changes") rather than leaving the generic default. */
11
+ label?: string;
12
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
13
+ /** Control diameter. */
14
+ size?: SpinnerSize;
15
+ /** What a screen reader announces for the wait — always describe the specific work in progress (e.g. "Saving changes") rather than leaving the generic default. */
16
+ label?: string;
17
+ }> & Readonly<{}>, {
18
+ size: SpinnerSize;
19
+ label: string;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ //# sourceMappingURL=Spinner.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Spinner/Spinner.vue"],"names":[],"mappings":"AA+DA,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,eAAO,MAAM,eAAe;;8EAS1B,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAkBd,wBAAwB;WACjB,WAAW;IAClB,mKAAmK;YAC3J,MAAM;;IAHd,wBAAwB;WACjB,WAAW;IAClB,mKAAmK;YAC3J,MAAM;;UAFP,WAAW;WAEV,MAAM;6EA6Dd,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, unref } from "vue";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/primitives/Spinner/Spinner.vue?vue&type=script&setup=true&lang.ts
5
+ /**
6
+ * Spinner — indeterminate loading indicator: the wait has no known length or
7
+ * layout shape yet (e.g. waiting on a network request). Once the layout IS
8
+ * known (a card, a list row), use Skeleton instead so the placeholder already
9
+ * reads as the coming content.
10
+ *
11
+ * The root carries `role="status"` + `aria-label` (from `label`) so screen
12
+ * readers announce the wait; the decorative SVG arc is `aria-hidden` since
13
+ * the label already carries the meaning. Color inherits from the caller via
14
+ * `text-current`/`stroke-current`/`fill-current` — set text color on an
15
+ * ancestor, never hardcode it here.
16
+ *
17
+ * Button deliberately does not reuse this component for its own loading
18
+ * state: it inlines the same arc instead, because `role="status"` inside a
19
+ * button that is already `aria-busy` would announce the wait twice.
20
+ */
21
+ var _hoisted_1 = ["aria-label"];
22
+ var spinnerVariants = cva("animate-spin text-current", {
23
+ variants: { size: {
24
+ sm: "h-4 w-4",
25
+ md: "h-5 w-5",
26
+ lg: "h-8 w-8"
27
+ } },
28
+ defaultVariants: { size: "md" }
29
+ });
30
+ var Spinner_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
31
+ __name: "Spinner",
32
+ props: {
33
+ size: { default: "md" },
34
+ label: { default: "Loading" }
35
+ },
36
+ setup(__props) {
37
+ return (_ctx, _cache) => {
38
+ return openBlock(), createElementBlock("span", {
39
+ role: "status",
40
+ "aria-label": __props.label,
41
+ class: "inline-flex"
42
+ }, [(openBlock(), createElementBlock("svg", {
43
+ class: normalizeClass(unref(cn)(unref(spinnerVariants)({ size: __props.size }))),
44
+ viewBox: "0 0 24 24",
45
+ fill: "none",
46
+ "aria-hidden": "true"
47
+ }, [..._cache[0] || (_cache[0] = [createElementVNode("circle", {
48
+ class: "stroke-current opacity-25",
49
+ cx: "12",
50
+ cy: "12",
51
+ r: "10",
52
+ "stroke-width": "4"
53
+ }, null, -1), createElementVNode("path", {
54
+ class: "fill-current opacity-75",
55
+ d: "M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4z"
56
+ }, null, -1)])], 2))], 8, _hoisted_1);
57
+ };
58
+ }
59
+ });
60
+ //#endregion
61
+ export { Spinner_vue_vue_type_script_setup_true_lang_default as default, spinnerVariants };
62
+
63
+ //# sourceMappingURL=Spinner.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/Spinner/Spinner.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\nexport type SpinnerSize = \"sm\" | \"md\" | \"lg\";\n\nexport const spinnerVariants = cva(\"animate-spin text-current\", {\n variants: {\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-8 w-8\",\n } satisfies Record<SpinnerSize, string>,\n },\n defaultVariants: { size: \"md\" },\n});\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\n/**\n * Spinner — indeterminate loading indicator: the wait has no known length or\n * layout shape yet (e.g. waiting on a network request). Once the layout IS\n * known (a card, a list row), use Skeleton instead so the placeholder already\n * reads as the coming content.\n *\n * The root carries `role=\"status\"` + `aria-label` (from `label`) so screen\n * readers announce the wait; the decorative SVG arc is `aria-hidden` since\n * the label already carries the meaning. Color inherits from the caller via\n * `text-current`/`stroke-current`/`fill-current` — set text color on an\n * ancestor, never hardcode it here.\n *\n * Button deliberately does not reuse this component for its own loading\n * state: it inlines the same arc instead, because `role=\"status\"` inside a\n * button that is already `aria-busy` would announce the wait twice.\n */\nwithDefaults(\n defineProps<{\n /** Control diameter. */\n size?: SpinnerSize;\n /** What a screen reader announces for the wait — always describe the specific work in progress (e.g. \"Saving changes\") rather than leaving the generic default. */\n label?: string;\n }>(),\n { size: \"md\", label: \"Loading\" },\n);\n</script>\n\n<template>\n <span role=\"status\" :aria-label=\"label\" class=\"inline-flex\">\n <svg :class=\"cn(spinnerVariants({ size }))\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <circle class=\"stroke-current opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke-width=\"4\" />\n <path class=\"fill-current opacity-75\" d=\"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4z\" />\n </svg>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKA,IAAa,kBAAkB,IAAI,6BAA6B;CAC9D,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,EACF;CACA,iBAAiB,EAAE,MAAM,KAAK;AAChC,CAAC;;;;;;;;;GAkCC,OAAA,UAAA,GAAA,mBAKO,QAAA;IALD,MAAK;IAAU,cAAY,QAAA;IAAO,OAAM;GAC5C,GAAA,EAAA,UAAA,GAAA,mBAGM,OAAA;IAHA,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAA,eAAA,CAAe,CAAA,EAAA,MAAG,QAAA,KAAI,CAAA,CAAA,CAAA;IAAM,SAAQ;IAAY,MAAK;IAAO,eAAY;GACtF,GAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,mBAAoF,UAAA;IAA5E,OAAM;IAA4B,IAAG;IAAK,IAAG;IAAK,GAAE;IAAK,gBAAa;GAC9E,GAAA,MAAA,EAAA,GAAA,mBAA0F,QAAA;IAApF,OAAM;IAA0B,GAAE"}
@@ -0,0 +1,7 @@
1
+ import Surface_vue_vue_type_script_setup_true_lang_default, { surfaceVariants } from "./Surface.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/Surface/Surface.vue
3
+ var Surface_default = Surface_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { Surface_default as default, surfaceVariants };
6
+
7
+ //# sourceMappingURL=Surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Surface.js","names":[],"sources":["../../../src/primitives/Surface/Surface.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * Surface — the panel/card primitive. Elevation is expressed by hairline\n * borders and background lightness, not heavy shadows (Loom principle:\n * \"hairline over shadow\"): on the paper-light ground a white `card` already\n * reads as raised, so only `overlay` carries a real shadow.\n */\nexport type SurfaceElevation = \"card\" | \"muted\" | \"overlay\";\n\nexport type SurfacePad = \"none\" | \"sm\" | \"md\" | \"lg\";\n\nexport const surfaceVariants = cva(\"rounded-lg transition-colors duration-fast\", {\n variants: {\n variant: {\n card: \"bg-card text-card-foreground border border-border\",\n muted: \"bg-muted text-foreground border border-transparent\",\n overlay: \"bg-popover text-popover-foreground border border-border shadow-md\",\n } satisfies Record<SurfaceElevation, string>,\n pad: {\n none: \"p-0\",\n sm: \"p-3\",\n md: \"p-4\",\n lg: \"p-6\",\n } satisfies Record<SurfacePad, string>,\n // The ONE hover/press language for clickable rows and cards (a list row,\n // a picker card): lift by fill, hairline asserts, cursor signals — so\n // views stop hand-rolling their own `hover:bg-subtle` treatments. The\n // Surface stays a div; the host owns the actual click/role/tabindex.\n interactive: {\n true: \"cursor-pointer hover:bg-subtle/60 hover:border-border-strong active:bg-subtle\",\n },\n },\n defaultVariants: { variant: \"card\", pad: \"md\" },\n});\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\nwithDefaults(\n defineProps<{\n /** How the panel reads on the paper-light ground: a raised card, a recessed panel, or a floating overlay. */\n variant?: SurfaceElevation;\n /** Built-in inner padding, so a caller need not remember the spacing token. */\n pad?: SurfacePad;\n /** Clickable-surface language: hover fill lift, strong hairline, cursor. The host owns the click handler. */\n interactive?: boolean;\n }>(),\n { variant: \"card\", pad: \"md\", interactive: false },\n);\n</script>\n\n<template>\n <div :class=\"cn(surfaceVariants({ variant, pad, interactive }))\"><slot /></div>\n</template>\n"],"mappings":""}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Surface — the panel/card primitive. Elevation is expressed by hairline
3
+ * borders and background lightness, not heavy shadows (Loom principle:
4
+ * "hairline over shadow"): on the paper-light ground a white `card` already
5
+ * reads as raised, so only `overlay` carries a real shadow.
6
+ */
7
+ export type SurfaceElevation = "card" | "muted" | "overlay";
8
+ export type SurfacePad = "none" | "sm" | "md" | "lg";
9
+ export declare const surfaceVariants: (props?: ({
10
+ variant?: "card" | "muted" | "overlay" | null | undefined;
11
+ pad?: "sm" | "md" | "lg" | "none" | null | undefined;
12
+ interactive?: boolean | null | undefined;
13
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
17
+ /** How the panel reads on the paper-light ground: a raised card, a recessed panel, or a floating overlay. */
18
+ variant?: SurfaceElevation;
19
+ /** Built-in inner padding, so a caller need not remember the spacing token. */
20
+ pad?: SurfacePad;
21
+ /** Clickable-surface language: hover fill lift, strong hairline, cursor. The host owns the click handler. */
22
+ interactive?: boolean;
23
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
24
+ /** How the panel reads on the paper-light ground: a raised card, a recessed panel, or a floating overlay. */
25
+ variant?: SurfaceElevation;
26
+ /** Built-in inner padding, so a caller need not remember the spacing token. */
27
+ pad?: SurfacePad;
28
+ /** Clickable-surface language: hover fill lift, strong hairline, cursor. The host owns the click handler. */
29
+ interactive?: boolean;
30
+ }> & Readonly<{}>, {
31
+ variant: SurfaceElevation;
32
+ pad: SurfacePad;
33
+ interactive: boolean;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
35
+ default?: (props: {}) => any;
36
+ }>;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
42
+ //# sourceMappingURL=Surface.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Surface.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Surface/Surface.vue"],"names":[],"mappings":"AAiEA;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAErD,eAAO,MAAM,eAAe;;;;8EAsB1B,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEd,6GAA6G;cACnG,gBAAgB;IAC1B,+EAA+E;UACzE,UAAU;IAChB,6GAA6G;kBAC/F,OAAO;;IALrB,6GAA6G;cACnG,gBAAgB;IAC1B,+EAA+E;UACzE,UAAU;IAChB,6GAA6G;kBAC/F,OAAO;;aAJX,gBAAgB;SAEpB,UAAU;iBAEF,OAAO;;cAkCX,CAAC,KAAK,IAAgB,KAAK,GAAG;EAUxC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref } from "vue";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/primitives/Surface/Surface.vue?vue&type=script&setup=true&lang.ts
5
+ var surfaceVariants = cva("rounded-lg transition-colors duration-fast", {
6
+ variants: {
7
+ variant: {
8
+ card: "bg-card text-card-foreground border border-border",
9
+ muted: "bg-muted text-foreground border border-transparent",
10
+ overlay: "bg-popover text-popover-foreground border border-border shadow-md"
11
+ },
12
+ pad: {
13
+ none: "p-0",
14
+ sm: "p-3",
15
+ md: "p-4",
16
+ lg: "p-6"
17
+ },
18
+ interactive: { true: "cursor-pointer hover:bg-subtle/60 hover:border-border-strong active:bg-subtle" }
19
+ },
20
+ defaultVariants: {
21
+ variant: "card",
22
+ pad: "md"
23
+ }
24
+ });
25
+ var Surface_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
26
+ __name: "Surface",
27
+ props: {
28
+ variant: { default: "card" },
29
+ pad: { default: "md" },
30
+ interactive: {
31
+ type: Boolean,
32
+ default: false
33
+ }
34
+ },
35
+ setup(__props) {
36
+ return (_ctx, _cache) => {
37
+ return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)(unref(surfaceVariants)({
38
+ variant: __props.variant,
39
+ pad: __props.pad,
40
+ interactive: __props.interactive
41
+ }))) }, [renderSlot(_ctx.$slots, "default")], 2);
42
+ };
43
+ }
44
+ });
45
+ //#endregion
46
+ export { Surface_vue_vue_type_script_setup_true_lang_default as default, surfaceVariants };
47
+
48
+ //# sourceMappingURL=Surface.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Surface.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/Surface/Surface.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * Surface — the panel/card primitive. Elevation is expressed by hairline\n * borders and background lightness, not heavy shadows (Loom principle:\n * \"hairline over shadow\"): on the paper-light ground a white `card` already\n * reads as raised, so only `overlay` carries a real shadow.\n */\nexport type SurfaceElevation = \"card\" | \"muted\" | \"overlay\";\n\nexport type SurfacePad = \"none\" | \"sm\" | \"md\" | \"lg\";\n\nexport const surfaceVariants = cva(\"rounded-lg transition-colors duration-fast\", {\n variants: {\n variant: {\n card: \"bg-card text-card-foreground border border-border\",\n muted: \"bg-muted text-foreground border border-transparent\",\n overlay: \"bg-popover text-popover-foreground border border-border shadow-md\",\n } satisfies Record<SurfaceElevation, string>,\n pad: {\n none: \"p-0\",\n sm: \"p-3\",\n md: \"p-4\",\n lg: \"p-6\",\n } satisfies Record<SurfacePad, string>,\n // The ONE hover/press language for clickable rows and cards (a list row,\n // a picker card): lift by fill, hairline asserts, cursor signals — so\n // views stop hand-rolling their own `hover:bg-subtle` treatments. The\n // Surface stays a div; the host owns the actual click/role/tabindex.\n interactive: {\n true: \"cursor-pointer hover:bg-subtle/60 hover:border-border-strong active:bg-subtle\",\n },\n },\n defaultVariants: { variant: \"card\", pad: \"md\" },\n});\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\nwithDefaults(\n defineProps<{\n /** How the panel reads on the paper-light ground: a raised card, a recessed panel, or a floating overlay. */\n variant?: SurfaceElevation;\n /** Built-in inner padding, so a caller need not remember the spacing token. */\n pad?: SurfacePad;\n /** Clickable-surface language: hover fill lift, strong hairline, cursor. The host owns the click handler. */\n interactive?: boolean;\n }>(),\n { variant: \"card\", pad: \"md\", interactive: false },\n);\n</script>\n\n<template>\n <div :class=\"cn(surfaceVariants({ variant, pad, interactive }))\"><slot /></div>\n</template>\n"],"mappings":";;;;AAaA,IAAa,kBAAkB,IAAI,8CAA8C;CAC/E,UAAU;EACR,SAAS;GACP,MAAM;GACN,OAAO;GACP,SAAS;EACX;EACA,KAAK;GACH,MAAM;GACN,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EAKA,aAAa,EACX,MAAM,gFACR;CACF;CACA,iBAAiB;EAAE,SAAS;EAAQ,KAAK;CAAK;AAChD,CAAC;;;;;;;;;;;;;GAoBC,OAAA,UAAA,GAAA,mBAA+E,OAAA,EAAzE,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAA,eAAA,CAAe,CAAA;IAAA,SAAG,QAAA;IAAO,KAAE,QAAA;IAAG,aAAE,QAAA;GAAW,CAAA,CAAA,CAAA,EAAA,GAAA,CAAM,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ import Switch_vue_vue_type_script_setup_true_lang_default from "./Switch.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/Switch/Switch.vue
3
+ var Switch_default = Switch_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { Switch_default as default };
6
+
7
+ //# sourceMappingURL=Switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.js","names":[],"sources":["../../../src/primitives/Switch/Switch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { SwitchRoot, SwitchThumb } from \"reka-ui\";\nimport { cn } from \"../../lib/cn\";\n\n/**\n * Switch — toggles a boolean setting that takes effect immediately, with no\n * \"Save\" step. Built on Reka UI's Switch for role=\"switch\" + aria-checked +\n * Space/Enter. Label and description live on the surrounding setting row —\n * wire them in with `aria-labelledby`, since Switch renders a button, not a\n * labelable input.\n */\nwithDefaults(\n defineProps<{\n /** Whether the setting is currently on. Omit to let the switch own its own state. */\n modelValue?: boolean | undefined;\n /** Blocks both click and keyboard input, and dims the control. */\n disabled?: boolean;\n }>(),\n {\n // Not `false` — see Checkbox: a concrete default claims host ownership and\n // leaves an unbound switch emitting updates while never moving.\n modelValue: undefined,\n disabled: false,\n },\n);\n\ndefineEmits<{ \"update:modelValue\": [value: boolean] }>();\n</script>\n\n<template>\n <SwitchRoot\n v-bind=\"{ modelValue }\"\n :disabled=\"disabled\"\n :class=\"\n cn(\n 'relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent',\n 'transition-[background-color,filter,box-shadow] duration-instant ease-out',\n 'hover:brightness-95',\n // Checked = a human decision (Loom law): the track fills flat warp.\n 'data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted-foreground/30',\n // Focus draws the weave tight: the brand ring blooms.\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n )\n \"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n >\n <SwitchThumb\n style=\"\n transition:\n left var(--duration-instant) var(--ease-out),\n transform var(--duration-fast) var(--ease-spring);\n \"\n :class=\"\n cn(\n 'absolute top-1/2 left-0.5 block h-4 w-4 -translate-y-1/2 rounded-full bg-background shadow-sm',\n 'active:scale-x-[1.15] active:scale-y-[0.85]',\n 'data-[state=checked]:left-[1.125rem]',\n )\n \"\n />\n </SwitchRoot>\n</template>\n"],"mappings":""}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Switch — toggles a boolean setting that takes effect immediately, with no
3
+ * "Save" step. Built on Reka UI's Switch for role="switch" + aria-checked +
4
+ * Space/Enter. Label and description live on the surrounding setting row —
5
+ * wire them in with `aria-labelledby`, since Switch renders a button, not a
6
+ * labelable input.
7
+ */
8
+ type __VLS_Props = {
9
+ /** Whether the setting is currently on. Omit to let the switch own its own state. */
10
+ modelValue?: boolean | undefined;
11
+ /** Blocks both click and keyboard input, and dims the control. */
12
+ disabled?: boolean;
13
+ };
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "update:modelValue": (value: boolean) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onUpdate:modelValue"?: (value: boolean) => any;
18
+ }>, {
19
+ disabled: boolean;
20
+ modelValue: boolean | undefined;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ //# sourceMappingURL=Switch.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Switch/Switch.vue"],"names":[],"mappings":"AAqEA;;;;;;GAMG;AACH,KAAK,WAAW,GAAG;IACf,qFAAqF;IACrF,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA0HJ,QAAA,MAAM,YAAY;;;;;cA3HH,OAAO;gBAFL,OAAO,GAAG,SAAS;6EAiIlC,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,44 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { createBlock, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, unref, withCtx } from "vue";
3
+ import { SwitchRoot, SwitchThumb } from "reka-ui";
4
+ //#region src/primitives/Switch/Switch.vue?vue&type=script&setup=true&lang.ts
5
+ /**
6
+ * Switch — toggles a boolean setting that takes effect immediately, with no
7
+ * "Save" step. Built on Reka UI's Switch for role="switch" + aria-checked +
8
+ * Space/Enter. Label and description live on the surrounding setting row —
9
+ * wire them in with `aria-labelledby`, since Switch renders a button, not a
10
+ * labelable input.
11
+ */
12
+ var Switch_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
13
+ __name: "Switch",
14
+ props: {
15
+ modelValue: {
16
+ type: Boolean,
17
+ default: void 0
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false
22
+ }
23
+ },
24
+ emits: ["update:modelValue"],
25
+ setup(__props) {
26
+ return (_ctx, _cache) => {
27
+ return openBlock(), createBlock(unref(SwitchRoot), mergeProps({ modelValue: __props.modelValue }, {
28
+ disabled: __props.disabled,
29
+ class: unref(cn)("relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent", "transition-[background-color,filter,box-shadow] duration-instant ease-out", "hover:brightness-95", "data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted-foreground/30", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo", "disabled:cursor-not-allowed disabled:opacity-50"),
30
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
31
+ }), {
32
+ default: withCtx(() => [createVNode(unref(SwitchThumb), {
33
+ style: { "transition": "left var(--duration-instant) var(--ease-out),\n transform var(--duration-fast) var(--ease-spring)" },
34
+ class: normalizeClass(unref(cn)("absolute top-1/2 left-0.5 block h-4 w-4 -translate-y-1/2 rounded-full bg-background shadow-sm", "active:scale-x-[1.15] active:scale-y-[0.85]", "data-[state=checked]:left-[1.125rem]"))
35
+ }, null, 8, ["class"])]),
36
+ _: 1
37
+ }, 16, ["disabled", "class"]);
38
+ };
39
+ }
40
+ });
41
+ //#endregion
42
+ export { Switch_vue_vue_type_script_setup_true_lang_default as default };
43
+
44
+ //# sourceMappingURL=Switch.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/primitives/Switch/Switch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { SwitchRoot, SwitchThumb } from \"reka-ui\";\nimport { cn } from \"../../lib/cn\";\n\n/**\n * Switch — toggles a boolean setting that takes effect immediately, with no\n * \"Save\" step. Built on Reka UI's Switch for role=\"switch\" + aria-checked +\n * Space/Enter. Label and description live on the surrounding setting row —\n * wire them in with `aria-labelledby`, since Switch renders a button, not a\n * labelable input.\n */\nwithDefaults(\n defineProps<{\n /** Whether the setting is currently on. Omit to let the switch own its own state. */\n modelValue?: boolean | undefined;\n /** Blocks both click and keyboard input, and dims the control. */\n disabled?: boolean;\n }>(),\n {\n // Not `false` — see Checkbox: a concrete default claims host ownership and\n // leaves an unbound switch emitting updates while never moving.\n modelValue: undefined,\n disabled: false,\n },\n);\n\ndefineEmits<{ \"update:modelValue\": [value: boolean] }>();\n</script>\n\n<template>\n <SwitchRoot\n v-bind=\"{ modelValue }\"\n :disabled=\"disabled\"\n :class=\"\n cn(\n 'relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent',\n 'transition-[background-color,filter,box-shadow] duration-instant ease-out',\n 'hover:brightness-95',\n // Checked = a human decision (Loom law): the track fills flat warp.\n 'data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted-foreground/30',\n // Focus draws the weave tight: the brand ring blooms.\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n )\n \"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n >\n <SwitchThumb\n style=\"\n transition:\n left var(--duration-instant) var(--ease-out),\n transform var(--duration-fast) var(--ease-spring);\n \"\n :class=\"\n cn(\n 'absolute top-1/2 left-0.5 block h-4 w-4 -translate-y-1/2 rounded-full bg-background shadow-sm',\n 'active:scale-x-[1.15] active:scale-y-[0.85]',\n 'data-[state=checked]:left-[1.125rem]',\n )\n \"\n />\n </SwitchRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;GA8BE,OAAA,UAAA,GAAA,YA+Ba,MAAA,UAAA,GA/Bb,WA+Ba,EAAA,YA9BD,QAAA,WAAU,GAAA;IACnB,UAAU,QAAA;IACV,OAAc,MAAA,EAAA,CAAE,CAAA,4GAAA,6EAAA,uBAAA,iFAAA,+GAAA,iDAAA;IAYhB,uBAAkB,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,qBAAsB,MAAM;;IAEtD,SAAA,cAaE,CAbF,YAaE,MAAA,WAAA,GAAA;KAZA,OAAA,EAAA,cAAA,6GAAA;KAKC,OAAK,eAAW,MAAA,EAAA,CAAE,CAAA,iGAAA,+CAAA,sCAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ import Tabs_vue_vue_type_script_setup_true_lang_default from "./Tabs.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/Tabs/Tabs.vue
3
+ var Tabs_default = Tabs_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { Tabs_default as default };
6
+
7
+ //# sourceMappingURL=Tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.js","names":[],"sources":["../../../src/primitives/Tabs/Tabs.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface TabItem {\n /** Selects this tab, and names the slot that carries its panel. */\n value: string;\n /** The trigger's visible text. */\n label: string;\n /** Skips this tab in pointer, click and roving-tabindex arrow navigation. */\n disabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from \"reka-ui\";\nimport { optional } from \"../../lib/props\";\n\n/**\n * Tabs — switch between panels/views, with the active panel's content shown\n * below. For picking one value of a setting with no panel underneath, reach\n * for SegmentedControl instead. Built on Reka UI's Tabs (roving tabindex,\n * arrow-key navigation, a11y sourced from the `tab`/`tabpanel` pattern).\n * Panels are supplied by the host via named slots keyed by each tab's\n * `value` — `<Tabs :tabs=\"tabs\"><template #overview>…</template></Tabs>`.\n */\ndefineProps<{\n /** The selected tab's value. Omit it and Tabs owns its own selection. */\n modelValue?: string;\n /** The ordered set of tabs; each entry needs a like-named slot for its panel. */\n tabs: TabItem[];\n}>();\n\ndefineEmits<{ \"update:modelValue\": [value: string] }>();\n</script>\n\n<template>\n <TabsRoot\n v-bind=\"optional({ modelValue })\"\n orientation=\"horizontal\"\n @update:model-value=\"$emit('update:modelValue', String($event))\"\n >\n <TabsList class=\"relative inline-flex items-center gap-1 border-b border-border\">\n <TabsTrigger\n v-for=\"tab in tabs\"\n :key=\"tab.value\"\n :value=\"tab.value\"\n v-bind=\"optional({ disabled: tab.disabled })\"\n class=\"relative px-3 py-2 text-sm text-muted-foreground transition-colors duration-fast ease-out data-[state=active]:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50\"\n >\n {{ tab.label }}\n </TabsTrigger>\n <TabsIndicator\n class=\"absolute bottom-0 left-0 h-0.5 bg-primary\"\n style=\"\n width: var(--reka-tabs-indicator-size);\n transform: translateX(var(--reka-tabs-indicator-position));\n transition:\n width var(--duration-fast) var(--ease-spring),\n transform var(--duration-fast) var(--ease-spring);\n \"\n />\n </TabsList>\n <TabsContent\n v-for=\"tab in tabs\"\n :key=\"tab.value\"\n :value=\"tab.value\"\n class=\"animate-fade-rise pt-4 focus-visible:outline-none\"\n >\n <slot :name=\"tab.value\" />\n </TabsContent>\n </TabsRoot>\n</template>\n"],"mappings":""}
@@ -0,0 +1,33 @@
1
+ export interface TabItem {
2
+ /** Selects this tab, and names the slot that carries its panel. */
3
+ value: string;
4
+ /** The trigger's visible text. */
5
+ label: string;
6
+ /** Skips this tab in pointer, click and roving-tabindex arrow navigation. */
7
+ disabled?: boolean;
8
+ }
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
12
+ /** The selected tab's value. Omit it and Tabs owns its own selection. */
13
+ modelValue?: string;
14
+ /** The ordered set of tabs; each entry needs a like-named slot for its panel. */
15
+ tabs: TabItem[];
16
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ "update:modelValue": (value: string) => any;
18
+ }, string, import("vue").PublicProps, Readonly<{
19
+ /** The selected tab's value. Omit it and Tabs owns its own selection. */
20
+ modelValue?: string;
21
+ /** The ordered set of tabs; each entry needs a like-named slot for its panel. */
22
+ tabs: TabItem[];
23
+ }> & Readonly<{
24
+ "onUpdate:modelValue"?: (value: string) => any;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
26
+ [x: string]: ((props: {}) => any) | undefined;
27
+ }>;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
33
+ //# sourceMappingURL=Tabs.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Tabs/Tabs.vue"],"names":[],"mappings":"AA6EA,MAAM,WAAW,OAAO;IACtB,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;wBACoB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAUhB,yEAAyE;iBAC5D,MAAM;IACnB,iFAAiF;UAC3E,OAAO,EAAE;;;;IAHf,yEAAyE;iBAC5D,MAAM;IACnB,iFAAiF;UAC3E,OAAO,EAAE;;;;iCAuKqD,GAAG;EAUrE,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { optional } from "../../lib/props.js";
2
+ import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
3
+ import { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from "reka-ui";
4
+ //#region src/primitives/Tabs/Tabs.vue?vue&type=script&setup=true&lang.ts
5
+ var Tabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
+ __name: "Tabs",
7
+ props: {
8
+ modelValue: {},
9
+ tabs: {}
10
+ },
11
+ emits: ["update:modelValue"],
12
+ setup(__props) {
13
+ return (_ctx, _cache) => {
14
+ return openBlock(), createBlock(unref(TabsRoot), mergeProps(unref(optional)({ modelValue: __props.modelValue }), {
15
+ orientation: "horizontal",
16
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", String($event)))
17
+ }), {
18
+ default: withCtx(() => [createVNode(unref(TabsList), { class: "relative inline-flex items-center gap-1 border-b border-border" }, {
19
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab) => {
20
+ return openBlock(), createBlock(unref(TabsTrigger), mergeProps({
21
+ key: tab.value,
22
+ value: tab.value
23
+ }, { ref_for: true }, unref(optional)({ disabled: tab.disabled }), { class: "relative px-3 py-2 text-sm text-muted-foreground transition-colors duration-fast ease-out data-[state=active]:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50" }), {
24
+ default: withCtx(() => [createTextVNode(toDisplayString(tab.label), 1)]),
25
+ _: 2
26
+ }, 1040, ["value"]);
27
+ }), 128)), createVNode(unref(TabsIndicator), {
28
+ class: "absolute bottom-0 left-0 h-0.5 bg-primary",
29
+ style: {
30
+ "width": "var(--reka-tabs-indicator-size)",
31
+ "transform": "translateX(var(--reka-tabs-indicator-position))",
32
+ "transition": "width var(--duration-fast) var(--ease-spring),\n transform var(--duration-fast) var(--ease-spring)"
33
+ }
34
+ })]),
35
+ _: 1
36
+ }), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab) => {
37
+ return openBlock(), createBlock(unref(TabsContent), {
38
+ key: tab.value,
39
+ value: tab.value,
40
+ class: "animate-fade-rise pt-4 focus-visible:outline-none"
41
+ }, {
42
+ default: withCtx(() => [renderSlot(_ctx.$slots, tab.value)]),
43
+ _: 2
44
+ }, 1032, ["value"]);
45
+ }), 128))]),
46
+ _: 3
47
+ }, 16);
48
+ };
49
+ }
50
+ });
51
+ //#endregion
52
+ export { Tabs_vue_vue_type_script_setup_true_lang_default as default };
53
+
54
+ //# sourceMappingURL=Tabs.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/primitives/Tabs/Tabs.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface TabItem {\n /** Selects this tab, and names the slot that carries its panel. */\n value: string;\n /** The trigger's visible text. */\n label: string;\n /** Skips this tab in pointer, click and roving-tabindex arrow navigation. */\n disabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from \"reka-ui\";\nimport { optional } from \"../../lib/props\";\n\n/**\n * Tabs — switch between panels/views, with the active panel's content shown\n * below. For picking one value of a setting with no panel underneath, reach\n * for SegmentedControl instead. Built on Reka UI's Tabs (roving tabindex,\n * arrow-key navigation, a11y sourced from the `tab`/`tabpanel` pattern).\n * Panels are supplied by the host via named slots keyed by each tab's\n * `value` — `<Tabs :tabs=\"tabs\"><template #overview>…</template></Tabs>`.\n */\ndefineProps<{\n /** The selected tab's value. Omit it and Tabs owns its own selection. */\n modelValue?: string;\n /** The ordered set of tabs; each entry needs a like-named slot for its panel. */\n tabs: TabItem[];\n}>();\n\ndefineEmits<{ \"update:modelValue\": [value: string] }>();\n</script>\n\n<template>\n <TabsRoot\n v-bind=\"optional({ modelValue })\"\n orientation=\"horizontal\"\n @update:model-value=\"$emit('update:modelValue', String($event))\"\n >\n <TabsList class=\"relative inline-flex items-center gap-1 border-b border-border\">\n <TabsTrigger\n v-for=\"tab in tabs\"\n :key=\"tab.value\"\n :value=\"tab.value\"\n v-bind=\"optional({ disabled: tab.disabled })\"\n class=\"relative px-3 py-2 text-sm text-muted-foreground transition-colors duration-fast ease-out data-[state=active]:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50\"\n >\n {{ tab.label }}\n </TabsTrigger>\n <TabsIndicator\n class=\"absolute bottom-0 left-0 h-0.5 bg-primary\"\n style=\"\n width: var(--reka-tabs-indicator-size);\n transform: translateX(var(--reka-tabs-indicator-position));\n transition:\n width var(--duration-fast) var(--ease-spring),\n transform var(--duration-fast) var(--ease-spring);\n \"\n />\n </TabsList>\n <TabsContent\n v-for=\"tab in tabs\"\n :key=\"tab.value\"\n :value=\"tab.value\"\n class=\"animate-fade-rise pt-4 focus-visible:outline-none\"\n >\n <slot :name=\"tab.value\" />\n </TabsContent>\n </TabsRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;GAkCE,OAAA,UAAA,GAAA,YAkCW,MAAA,QAAA,GAlCX,WACU,MAiCC,QAAA,CAjCO,CAAA,EAAA,YAAG,QAAA,WAAU,CAAA,GAAA;IAC7B,aAAY;IACX,uBAAkB,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,qBAAsB,OAAO,MAAM,CAAA;;IAE7D,SAAA,cAoBW,CApBX,YAoBW,MAAA,QAAA,GAAA,EApBD,OAAM,iEAAgE,GAAA;KAE5E,SAAA,cAAmB,EADrB,UAAA,IAAA,GAAA,mBAQc,UAAA,MAAA,WAPE,QAAA,OAAP,QAAG;MADZ,OAAA,UAAA,GAAA,YAQc,MAAA,WAAA,GARd,WAQc;OANX,KAAK,IAAI;OACT,OAAO,IAAI;MACJ,GAAA,EAAA,SAAA,KAAA,GAAA,MAAA,QAAA,CAAQ,CAAA,EAAA,UAAa,IAAI,SAAQ,CAAA,GAAA,EACzC,OAAM,mQAAkQ,CAAA,GAAA;OAExQ,SAAA,cAAe,CAAZ,gBAAA,gBAAA,IAAI,KAAK,GAAA,CAAA,CAAA,CAAA;;;KAEd,CAAA,GAAA,GAAA,IAAA,YASE,MAAA,aAAA,GAAA;MARA,OAAM;MACN,OAAA;OAAA,SAAA;OAAA,aAAA;OAAA,cAAA;MAAA;;;IASJ,CAAA,IAAA,UAAA,IAAA,GAAA,mBAOc,UAAA,MAAA,WANE,QAAA,OAAP,QAAG;KADZ,OAAA,UAAA,GAAA,YAOc,MAAA,WAAA,GAAA;MALX,KAAK,IAAI;MACT,OAAO,IAAI;MACZ,OAAM;;MAEN,SAAA,cAA0B,CAA1B,WAA0B,KAAA,QAAb,IAAI,KAAK,CAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ import TextField_vue_vue_type_script_setup_true_lang_default from "./TextField.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/TextField/TextField.vue
3
+ var TextField_default = TextField_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { TextField_default as default };
6
+
7
+ //# sourceMappingURL=TextField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.js","names":[],"sources":["../../../src/primitives/TextField/TextField.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type TextFieldType = \"text\" | \"email\" | \"password\" | \"search\" | \"url\" | \"tel\";\n\nexport type TextFieldSize = \"sm\" | \"md\" | \"lg\";\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\nimport { useSplitAttrs } from \"../../lib/attrs\";\n\n/**\n * TextField — single-line text entry (text · email · password · search · url ·\n * tel). The border, focus ring and invalid state live on the wrapper so\n * optional `#leading`/`#trailing` adornments (a search icon, a unit suffix)\n * sit *inside* the field and share its focus bloom, instead of every caller\n * re-inventing an icon-inside-input layout. For numeric entry reach for a\n * number field; for a bounded continuous value, a slider.\n *\n * Wrapping a rendered structure means the fallthrough `class` must land on\n * the wrapper (so a caller's `w-64`/`flex-1` sizes the whole field) while the\n * rest of the attrs (`id`, `name`, `data-testid`, `aria-describedby`,\n * `autocomplete`) belong on the real `<input>` — the split-attrs convention\n * shared with the other bare controls. The accessible name is a first-class\n * prop pair (`aria-label`/`aria-labelledby`, camelized by Vue) rather than a\n * loose fallthrough attr, so it is bound onto the input explicitly and shows\n * up in the props table — a bare input primitive can only be named by its\n * host.\n */\nwithDefaults(\n defineProps<{\n /** The current value. Pair with `@update:modelValue` for `v-model`. */\n modelValue?: string;\n /** The native input type — also the on-screen keyboard hint on mobile. */\n type?: TextFieldType;\n /** Text shown in the empty field. */\n placeholder?: string;\n /** Disables the field and blocks pointer and keyboard input. */\n disabled?: boolean;\n /** Error state: paints the destructive border/ring and sets aria-invalid. */\n invalid?: boolean;\n /** Control height. */\n size?: TextFieldSize;\n /** The accessible name, when no visible element already labels the field. */\n ariaLabel?: string;\n /** The id of the visible element that labels the field (e.g. a Field wrapper's label). */\n ariaLabelledby?: string;\n }>(),\n {\n type: \"text\",\n disabled: false,\n invalid: false,\n size: \"md\",\n },\n);\n\ndefineEmits<{ \"update:modelValue\": [value: string] }>();\n\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest: inputAttrs } = useSplitAttrs();\n</script>\n\n<template>\n <div\n :data-disabled=\"disabled || undefined\"\n :data-invalid=\"invalid || undefined\"\n :class=\"\n cn(\n 'group flex items-center gap-2 rounded-md border border-input bg-background text-foreground',\n 'transition-[color,background-color,border-color,box-shadow] duration-fast ease-out',\n // Rim-lit at rest, the weave blooms on focus (Signature law): the field\n // catches light instead of casting a shadow, and focus draws it tight.\n 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring',\n !invalid && 'focus-within:shadow-halo',\n size === 'sm' && 'h-8 px-2.5 text-xs',\n size === 'md' && 'h-9 px-3 text-sm',\n size === 'lg' && 'h-11 px-4 text-base',\n invalid && 'border-destructive focus-within:outline-destructive',\n disabled && 'cursor-not-allowed opacity-50',\n attrs.class as string,\n )\n \"\n >\n <span\n v-if=\"$slots.leading\"\n class=\"inline-flex shrink-0 text-muted-foreground transition-colors duration-fast ease-out group-focus-within:text-foreground\"\n >\n <slot name=\"leading\" />\n </span>\n <input\n v-bind=\"inputAttrs\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n :type=\"type\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :aria-invalid=\"invalid || undefined\"\n class=\"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed\"\n @input=\"$emit('update:modelValue', ($event.target as HTMLInputElement).value)\"\n />\n <span\n v-if=\"$slots.trailing\"\n class=\"inline-flex shrink-0 text-muted-foreground transition-colors duration-fast ease-out group-focus-within:text-foreground\"\n >\n <slot name=\"trailing\" />\n </span>\n </div>\n</template>\n"],"mappings":""}
@@ -0,0 +1,58 @@
1
+ export type TextFieldType = "text" | "email" | "password" | "search" | "url" | "tel";
2
+ export type TextFieldSize = "sm" | "md" | "lg";
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
5
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
6
+ /** The current value. Pair with `@update:modelValue` for `v-model`. */
7
+ modelValue?: string;
8
+ /** The native input type — also the on-screen keyboard hint on mobile. */
9
+ type?: TextFieldType;
10
+ /** Text shown in the empty field. */
11
+ placeholder?: string;
12
+ /** Disables the field and blocks pointer and keyboard input. */
13
+ disabled?: boolean;
14
+ /** Error state: paints the destructive border/ring and sets aria-invalid. */
15
+ invalid?: boolean;
16
+ /** Control height. */
17
+ size?: TextFieldSize;
18
+ /** The accessible name, when no visible element already labels the field. */
19
+ ariaLabel?: string;
20
+ /** The id of the visible element that labels the field (e.g. a Field wrapper's label). */
21
+ ariaLabelledby?: string;
22
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
+ "update:modelValue": (value: string) => any;
24
+ }, string, import("vue").PublicProps, Readonly<{
25
+ /** The current value. Pair with `@update:modelValue` for `v-model`. */
26
+ modelValue?: string;
27
+ /** The native input type — also the on-screen keyboard hint on mobile. */
28
+ type?: TextFieldType;
29
+ /** Text shown in the empty field. */
30
+ placeholder?: string;
31
+ /** Disables the field and blocks pointer and keyboard input. */
32
+ disabled?: boolean;
33
+ /** Error state: paints the destructive border/ring and sets aria-invalid. */
34
+ invalid?: boolean;
35
+ /** Control height. */
36
+ size?: TextFieldSize;
37
+ /** The accessible name, when no visible element already labels the field. */
38
+ ariaLabel?: string;
39
+ /** The id of the visible element that labels the field (e.g. a Field wrapper's label). */
40
+ ariaLabelledby?: string;
41
+ }> & Readonly<{
42
+ "onUpdate:modelValue"?: (value: string) => any;
43
+ }>, {
44
+ size: TextFieldSize;
45
+ type: TextFieldType;
46
+ disabled: boolean;
47
+ invalid: boolean;
48
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
49
+ leading?: (props: {}) => any;
50
+ } & {
51
+ trailing?: (props: {}) => any;
52
+ }>;
53
+ type __VLS_WithSlots<T, S> = T & {
54
+ new (): {
55
+ $slots: S;
56
+ };
57
+ };
58
+ //# sourceMappingURL=TextField.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/TextField/TextField.vue"],"names":[],"mappings":"AAmHA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;AAErF,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;wBAC1B,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAoBd,uEAAuE;iBAC1D,MAAM;IACnB,0EAA0E;WACnE,aAAa;IACpB,qCAAqC;kBACvB,MAAM;IACpB,gEAAgE;eACrD,OAAO;IAClB,6EAA6E;cACnE,OAAO;IACjB,sBAAsB;WACf,aAAa;IACpB,6EAA6E;gBACjE,MAAM;IAClB,0FAA0F;qBACzE,MAAM;;;;IAfvB,uEAAuE;iBAC1D,MAAM;IACnB,0EAA0E;WACnE,aAAa;IACpB,qCAAqC;kBACvB,MAAM;IACpB,gEAAgE;eACrD,OAAO;IAClB,6EAA6E;cACnE,OAAO;IACjB,sBAAsB;WACf,aAAa;IACpB,6EAA6E;gBACjE,MAAM;IAClB,0FAA0F;qBACzE,MAAM;;;;UAJhB,aAAa;UARb,aAAa;cAIT,OAAO;aAER,OAAO;;cA4HP,CAAC,KAAK,IAAgB,KAAK,GAAG;;eAC7B,CAAC,KAAK,IAAgB,KAAK,GAAG;EAWzC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { useSplitAttrs } from "../../lib/attrs.js";
3
+ import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, unref } from "vue";
4
+ //#region src/primitives/TextField/TextField.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = ["data-disabled", "data-invalid"];
6
+ var _hoisted_2 = {
7
+ key: 0,
8
+ class: "inline-flex shrink-0 text-muted-foreground transition-colors duration-fast ease-out group-focus-within:text-foreground"
9
+ };
10
+ var _hoisted_3 = [
11
+ "aria-label",
12
+ "aria-labelledby",
13
+ "type",
14
+ "value",
15
+ "placeholder",
16
+ "disabled",
17
+ "aria-invalid"
18
+ ];
19
+ var _hoisted_4 = {
20
+ key: 1,
21
+ class: "inline-flex shrink-0 text-muted-foreground transition-colors duration-fast ease-out group-focus-within:text-foreground"
22
+ };
23
+ var TextField_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
24
+ inheritAttrs: false,
25
+ __name: "TextField",
26
+ props: {
27
+ modelValue: {},
28
+ type: { default: "text" },
29
+ placeholder: {},
30
+ disabled: {
31
+ type: Boolean,
32
+ default: false
33
+ },
34
+ invalid: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ size: { default: "md" },
39
+ ariaLabel: {},
40
+ ariaLabelledby: {}
41
+ },
42
+ emits: ["update:modelValue"],
43
+ setup(__props) {
44
+ const { attrs, rest: inputAttrs } = useSplitAttrs();
45
+ return (_ctx, _cache) => {
46
+ return openBlock(), createElementBlock("div", {
47
+ "data-disabled": __props.disabled || void 0,
48
+ "data-invalid": __props.invalid || void 0,
49
+ class: normalizeClass(unref(cn)("group flex items-center gap-2 rounded-md border border-input bg-background text-foreground", "transition-[color,background-color,border-color,box-shadow] duration-fast ease-out", "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring", !__props.invalid && "focus-within:shadow-halo", __props.size === "sm" && "h-8 px-2.5 text-xs", __props.size === "md" && "h-9 px-3 text-sm", __props.size === "lg" && "h-11 px-4 text-base", __props.invalid && "border-destructive focus-within:outline-destructive", __props.disabled && "cursor-not-allowed opacity-50", unref(attrs).class))
50
+ }, [
51
+ _ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
52
+ createElementVNode("input", mergeProps(unref(inputAttrs), {
53
+ "aria-label": __props.ariaLabel,
54
+ "aria-labelledby": __props.ariaLabelledby,
55
+ type: __props.type,
56
+ value: __props.modelValue,
57
+ placeholder: __props.placeholder,
58
+ disabled: __props.disabled,
59
+ "aria-invalid": __props.invalid || void 0,
60
+ class: "min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",
61
+ onInput: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.value))
62
+ }), null, 16, _hoisted_3),
63
+ _ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4, [renderSlot(_ctx.$slots, "trailing")])) : createCommentVNode("", true)
64
+ ], 10, _hoisted_1);
65
+ };
66
+ }
67
+ });
68
+ //#endregion
69
+ export { TextField_vue_vue_type_script_setup_true_lang_default as default };
70
+
71
+ //# sourceMappingURL=TextField.vue_vue_type_script_setup_true_lang.js.map