@ecoma-io/loom 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (495) hide show
  1. package/README.md +54 -57
  2. package/dist/blocks/AppHeader/AppHeader.js.map +1 -1
  3. package/dist/blocks/AppHeader/AppHeader.vue.d.ts +5 -6
  4. package/dist/blocks/AppHeader/AppHeader.vue.d.ts.map +1 -1
  5. package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js +6 -7
  6. package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts +1 -1
  8. package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts.map +1 -1
  9. package/dist/blocks/DesktopAppShell/DesktopAppShell.js +7 -0
  10. package/dist/blocks/DesktopAppShell/DesktopAppShell.js.map +1 -0
  11. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue.d.ts +102 -0
  12. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue.d.ts.map +1 -0
  13. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue_vue_type_script_setup_true_lang.js +74 -0
  14. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/blocks/ErrorState/ErrorState.js +7 -0
  16. package/dist/blocks/ErrorState/ErrorState.js.map +1 -0
  17. package/dist/blocks/ErrorState/ErrorState.vue.d.ts +44 -0
  18. package/dist/blocks/ErrorState/ErrorState.vue.d.ts.map +1 -0
  19. package/dist/blocks/ErrorState/ErrorState.vue_vue_type_script_setup_true_lang.js +60 -0
  20. package/dist/blocks/ErrorState/ErrorState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  21. package/dist/blocks/FormActions/FormActions.js +7 -0
  22. package/dist/blocks/FormActions/FormActions.js.map +1 -0
  23. package/dist/blocks/FormActions/FormActions.vue.d.ts +51 -0
  24. package/dist/blocks/FormActions/FormActions.vue.d.ts.map +1 -0
  25. package/dist/blocks/FormActions/FormActions.vue_vue_type_script_setup_true_lang.js +21 -0
  26. package/dist/blocks/FormActions/FormActions.vue_vue_type_script_setup_true_lang.js.map +1 -0
  27. package/dist/blocks/FormSection/FormSection.js +7 -0
  28. package/dist/blocks/FormSection/FormSection.js.map +1 -0
  29. package/dist/blocks/FormSection/FormSection.vue.d.ts +85 -0
  30. package/dist/blocks/FormSection/FormSection.vue.d.ts.map +1 -0
  31. package/dist/blocks/FormSection/FormSection.vue_vue_type_script_setup_true_lang.js +62 -0
  32. package/dist/blocks/FormSection/FormSection.vue_vue_type_script_setup_true_lang.js.map +1 -0
  33. package/dist/blocks/LoadingState/LoadingState.js +7 -0
  34. package/dist/blocks/LoadingState/LoadingState.js.map +1 -0
  35. package/dist/blocks/LoadingState/LoadingState.vue.d.ts +22 -0
  36. package/dist/blocks/LoadingState/LoadingState.vue.d.ts.map +1 -0
  37. package/dist/blocks/LoadingState/LoadingState.vue_vue_type_script_setup_true_lang.js +57 -0
  38. package/dist/blocks/LoadingState/LoadingState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  39. package/dist/blocks/MetricCard/MetricCard.js +7 -0
  40. package/dist/blocks/MetricCard/MetricCard.js.map +1 -0
  41. package/dist/blocks/MetricCard/MetricCard.vue.d.ts +59 -0
  42. package/dist/blocks/MetricCard/MetricCard.vue.d.ts.map +1 -0
  43. package/dist/blocks/MetricCard/MetricCard.vue_vue_type_script_setup_true_lang.js +63 -0
  44. package/dist/blocks/MetricCard/MetricCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  45. package/dist/blocks/SidebarNav/SidebarNav.js.map +1 -1
  46. package/dist/blocks/SidebarNav/SidebarNav.vue_vue_type_script_setup_true_lang.js.map +1 -1
  47. package/dist/blocks/TitleBar/TitleBar.js.map +1 -1
  48. package/dist/blocks/TitleBar/TitleBar.vue.d.ts +37 -3
  49. package/dist/blocks/TitleBar/TitleBar.vue.d.ts.map +1 -1
  50. package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js +14 -14
  51. package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  52. package/dist/blocks/ToastStack/ToastStack.js.map +1 -1
  53. package/dist/blocks/ToastStack/ToastStack.vue.d.ts +20 -0
  54. package/dist/blocks/ToastStack/ToastStack.vue.d.ts.map +1 -1
  55. package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js +16 -5
  56. package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/composition/Center/Center.js +7 -0
  58. package/dist/composition/Center/Center.js.map +1 -0
  59. package/dist/composition/Center/Center.vue.d.ts +40 -0
  60. package/dist/composition/Center/Center.vue.d.ts.map +1 -0
  61. package/dist/composition/Center/Center.vue_vue_type_script_setup_true_lang.js +29 -0
  62. package/dist/composition/Center/Center.vue_vue_type_script_setup_true_lang.js.map +1 -0
  63. package/dist/composition/Frame/Frame.js +7 -0
  64. package/dist/composition/Frame/Frame.js.map +1 -0
  65. package/dist/composition/Frame/Frame.vue.d.ts +35 -0
  66. package/dist/composition/Frame/Frame.vue.d.ts.map +1 -0
  67. package/dist/composition/Frame/Frame.vue_vue_type_script_setup_true_lang.js +29 -0
  68. package/dist/composition/Frame/Frame.vue_vue_type_script_setup_true_lang.js.map +1 -0
  69. package/dist/composition/Grid/Grid.js +7 -0
  70. package/dist/composition/Grid/Grid.js.map +1 -0
  71. package/dist/composition/Grid/Grid.vue.d.ts +41 -0
  72. package/dist/composition/Grid/Grid.vue.d.ts.map +1 -0
  73. package/dist/composition/Grid/Grid.vue_vue_type_script_setup_true_lang.js +27 -0
  74. package/dist/composition/Grid/Grid.vue_vue_type_script_setup_true_lang.js.map +1 -0
  75. package/dist/composition/Inline/Inline.js +7 -0
  76. package/dist/composition/Inline/Inline.js.map +1 -0
  77. package/dist/composition/Inline/Inline.vue.d.ts +46 -0
  78. package/dist/composition/Inline/Inline.vue.d.ts.map +1 -0
  79. package/dist/composition/Inline/Inline.vue_vue_type_script_setup_true_lang.js +35 -0
  80. package/dist/composition/Inline/Inline.vue_vue_type_script_setup_true_lang.js.map +1 -0
  81. package/dist/composition/ScrollReel/ScrollReel.js +7 -0
  82. package/dist/composition/ScrollReel/ScrollReel.js.map +1 -0
  83. package/dist/composition/ScrollReel/ScrollReel.vue.d.ts +42 -0
  84. package/dist/composition/ScrollReel/ScrollReel.vue.d.ts.map +1 -0
  85. package/dist/composition/ScrollReel/ScrollReel.vue_vue_type_script_setup_true_lang.js +79 -0
  86. package/dist/composition/ScrollReel/ScrollReel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  87. package/dist/composition/Sidebar/Sidebar.js +7 -0
  88. package/dist/composition/Sidebar/Sidebar.js.map +1 -0
  89. package/dist/composition/Sidebar/Sidebar.vue.d.ts +52 -0
  90. package/dist/composition/Sidebar/Sidebar.vue.d.ts.map +1 -0
  91. package/dist/composition/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +36 -0
  92. package/dist/composition/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  93. package/dist/composition/Split/Split.js +7 -0
  94. package/dist/composition/Split/Split.js.map +1 -0
  95. package/dist/composition/Split/Split.vue.d.ts +58 -0
  96. package/dist/composition/Split/Split.vue.d.ts.map +1 -0
  97. package/dist/composition/Split/Split.vue_vue_type_script_setup_true_lang.js +40 -0
  98. package/dist/composition/Split/Split.vue_vue_type_script_setup_true_lang.js.map +1 -0
  99. package/dist/composition/Stack/Stack.js +7 -0
  100. package/dist/composition/Stack/Stack.js.map +1 -0
  101. package/dist/composition/Stack/Stack.vue.d.ts +43 -0
  102. package/dist/composition/Stack/Stack.vue.d.ts.map +1 -0
  103. package/dist/composition/Stack/Stack.vue_vue_type_script_setup_true_lang.js +30 -0
  104. package/dist/composition/Stack/Stack.vue_vue_type_script_setup_true_lang.js.map +1 -0
  105. package/dist/index.d.ts +119 -11
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +83 -5
  108. package/dist/layouts/AppShell/AppShell.js +7 -0
  109. package/dist/layouts/AppShell/AppShell.js.map +1 -0
  110. package/dist/layouts/AppShell/AppShell.vue.d.ts +51 -0
  111. package/dist/layouts/AppShell/AppShell.vue.d.ts.map +1 -0
  112. package/dist/layouts/AppShell/AppShell.vue_vue_type_script_setup_true_lang.js +47 -0
  113. package/dist/layouts/AppShell/AppShell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  114. package/dist/layouts/Centered/Centered.js +7 -0
  115. package/dist/layouts/Centered/Centered.js.map +1 -0
  116. package/dist/layouts/Centered/Centered.vue.d.ts +48 -0
  117. package/dist/layouts/Centered/Centered.vue.d.ts.map +1 -0
  118. package/dist/layouts/Centered/Centered.vue_vue_type_script_setup_true_lang.js +35 -0
  119. package/dist/layouts/Centered/Centered.vue_vue_type_script_setup_true_lang.js.map +1 -0
  120. package/dist/layouts/Dashboard/Dashboard.js +7 -0
  121. package/dist/layouts/Dashboard/Dashboard.js.map +1 -0
  122. package/dist/layouts/Dashboard/Dashboard.vue.d.ts +60 -0
  123. package/dist/layouts/Dashboard/Dashboard.vue.d.ts.map +1 -0
  124. package/dist/layouts/Dashboard/Dashboard.vue_vue_type_script_setup_true_lang.js +64 -0
  125. package/dist/layouts/Dashboard/Dashboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  126. package/dist/layouts/FormLayout/FormLayout.js +7 -0
  127. package/dist/layouts/FormLayout/FormLayout.js.map +1 -0
  128. package/dist/layouts/FormLayout/FormLayout.vue.d.ts +46 -0
  129. package/dist/layouts/FormLayout/FormLayout.vue.d.ts.map +1 -0
  130. package/dist/layouts/FormLayout/FormLayout.vue_vue_type_script_setup_true_lang.js +28 -0
  131. package/dist/layouts/FormLayout/FormLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
  132. package/dist/layouts/MasterDetail/MasterDetail.js +7 -0
  133. package/dist/layouts/MasterDetail/MasterDetail.js.map +1 -0
  134. package/dist/layouts/MasterDetail/MasterDetail.vue.d.ts +49 -0
  135. package/dist/layouts/MasterDetail/MasterDetail.vue.d.ts.map +1 -0
  136. package/dist/layouts/MasterDetail/MasterDetail.vue_vue_type_script_setup_true_lang.js +42 -0
  137. package/dist/layouts/MasterDetail/MasterDetail.vue_vue_type_script_setup_true_lang.js.map +1 -0
  138. package/dist/layouts/Reading/Reading.js +7 -0
  139. package/dist/layouts/Reading/Reading.js.map +1 -0
  140. package/dist/layouts/Reading/Reading.vue.d.ts +24 -0
  141. package/dist/layouts/Reading/Reading.vue.d.ts.map +1 -0
  142. package/dist/layouts/Reading/Reading.vue_vue_type_script_setup_true_lang.js +29 -0
  143. package/dist/layouts/Reading/Reading.vue_vue_type_script_setup_true_lang.js.map +1 -0
  144. package/dist/layouts/Settings/Settings.js +7 -0
  145. package/dist/layouts/Settings/Settings.js.map +1 -0
  146. package/dist/layouts/Settings/Settings.vue.d.ts +39 -0
  147. package/dist/layouts/Settings/Settings.vue.d.ts.map +1 -0
  148. package/dist/layouts/Settings/Settings.vue_vue_type_script_setup_true_lang.js +35 -0
  149. package/dist/layouts/Settings/Settings.vue_vue_type_script_setup_true_lang.js.map +1 -0
  150. package/dist/layouts/SplitLayout/SplitLayout.js +7 -0
  151. package/dist/layouts/SplitLayout/SplitLayout.js.map +1 -0
  152. package/dist/layouts/SplitLayout/SplitLayout.vue.d.ts +63 -0
  153. package/dist/layouts/SplitLayout/SplitLayout.vue.d.ts.map +1 -0
  154. package/dist/layouts/SplitLayout/SplitLayout.vue_vue_type_script_setup_true_lang.js +46 -0
  155. package/dist/layouts/SplitLayout/SplitLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
  156. package/dist/lib/ancestor-disabled.d.ts +35 -0
  157. package/dist/lib/ancestor-disabled.d.ts.map +1 -0
  158. package/dist/lib/ancestor-disabled.js +86 -0
  159. package/dist/lib/ancestor-disabled.js.map +1 -0
  160. package/dist/lib/cn.d.ts.map +1 -1
  161. package/dist/lib/cn.js +46 -1
  162. package/dist/lib/cn.js.map +1 -1
  163. package/dist/lib/count-labels.d.ts +78 -0
  164. package/dist/lib/count-labels.d.ts.map +1 -0
  165. package/dist/lib/count-labels.js +29 -0
  166. package/dist/lib/count-labels.js.map +1 -0
  167. package/dist/lib/date-labels.d.ts +278 -0
  168. package/dist/lib/date-labels.d.ts.map +1 -0
  169. package/dist/lib/date-labels.js +157 -0
  170. package/dist/lib/date-labels.js.map +1 -0
  171. package/dist/lib/field-context.d.ts +178 -0
  172. package/dist/lib/field-context.d.ts.map +1 -0
  173. package/dist/lib/field-context.js +106 -0
  174. package/dist/lib/field-context.js.map +1 -0
  175. package/dist/lib/label-registry.d.ts +75 -0
  176. package/dist/lib/label-registry.d.ts.map +1 -0
  177. package/dist/lib/labels.d.ts +116 -0
  178. package/dist/lib/labels.d.ts.map +1 -0
  179. package/dist/lib/labels.js +84 -0
  180. package/dist/lib/labels.js.map +1 -0
  181. package/dist/lib/theme.d.ts +68 -0
  182. package/dist/lib/theme.d.ts.map +1 -0
  183. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +236 -0
  184. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -0
  185. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +117 -0
  186. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -0
  187. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +142 -0
  188. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -0
  189. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +280 -0
  190. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -0
  191. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +40 -0
  192. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js.map +1 -0
  193. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +69 -0
  194. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js.map +1 -0
  195. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +8 -0
  196. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js.map +1 -0
  197. package/dist/primitives/Accordion/Accordion.js +7 -0
  198. package/dist/primitives/Accordion/Accordion.js.map +1 -0
  199. package/dist/primitives/Accordion/Accordion.vue.d.ts +68 -0
  200. package/dist/primitives/Accordion/Accordion.vue.d.ts.map +1 -0
  201. package/dist/primitives/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js +67 -0
  202. package/dist/primitives/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -0
  203. package/dist/primitives/AlertDialog/AlertDialog.js +7 -0
  204. package/dist/primitives/AlertDialog/AlertDialog.js.map +1 -0
  205. package/dist/primitives/AlertDialog/AlertDialog.vue.d.ts +94 -0
  206. package/dist/primitives/AlertDialog/AlertDialog.vue.d.ts.map +1 -0
  207. package/dist/primitives/AlertDialog/AlertDialog.vue_vue_type_script_setup_true_lang.js +99 -0
  208. package/dist/primitives/AlertDialog/AlertDialog.vue_vue_type_script_setup_true_lang.js.map +1 -0
  209. package/dist/primitives/Avatar/Avatar.js +2 -2
  210. package/dist/primitives/Avatar/Avatar.js.map +1 -1
  211. package/dist/primitives/Avatar/Avatar.vue.d.ts +30 -3
  212. package/dist/primitives/Avatar/Avatar.vue.d.ts.map +1 -1
  213. package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +95 -14
  214. package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  215. package/dist/primitives/AvatarGroup/AvatarGroup.js +7 -0
  216. package/dist/primitives/AvatarGroup/AvatarGroup.js.map +1 -0
  217. package/dist/primitives/AvatarGroup/AvatarGroup.vue.d.ts +104 -0
  218. package/dist/primitives/AvatarGroup/AvatarGroup.vue.d.ts.map +1 -0
  219. package/dist/primitives/AvatarGroup/AvatarGroup.vue_vue_type_script_setup_true_lang.js +139 -0
  220. package/dist/primitives/AvatarGroup/AvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  221. package/dist/primitives/Badge/Badge.js.map +1 -1
  222. package/dist/primitives/Badge/Badge.vue.d.ts +6 -6
  223. package/dist/primitives/Badge/Badge.vue.d.ts.map +1 -1
  224. package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js +1 -1
  225. package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  226. package/dist/primitives/Breadcrumb/Breadcrumb.js +7 -0
  227. package/dist/primitives/Breadcrumb/Breadcrumb.js.map +1 -0
  228. package/dist/primitives/Breadcrumb/Breadcrumb.vue.d.ts +25 -0
  229. package/dist/primitives/Breadcrumb/Breadcrumb.vue.d.ts.map +1 -0
  230. package/dist/primitives/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js +48 -0
  231. package/dist/primitives/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -0
  232. package/dist/primitives/Button/Button.js +2 -2
  233. package/dist/primitives/Button/Button.js.map +1 -1
  234. package/dist/primitives/Button/Button.vue.d.ts +31 -8
  235. package/dist/primitives/Button/Button.vue.d.ts.map +1 -1
  236. package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js +32 -16
  237. package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
  238. package/dist/primitives/Checkbox/Checkbox.js.map +1 -1
  239. package/dist/primitives/Checkbox/Checkbox.vue.d.ts +18 -3
  240. package/dist/primitives/Checkbox/Checkbox.vue.d.ts.map +1 -1
  241. package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +46 -7
  242. package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  243. package/dist/primitives/Chip/Chip.js +7 -0
  244. package/dist/primitives/Chip/Chip.js.map +1 -0
  245. package/dist/primitives/Chip/Chip.vue.d.ts +79 -0
  246. package/dist/primitives/Chip/Chip.vue.d.ts.map +1 -0
  247. package/dist/primitives/Chip/Chip.vue_vue_type_script_setup_true_lang.js +139 -0
  248. package/dist/primitives/Chip/Chip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  249. package/dist/primitives/ColorPicker/ColorPicker.js +7 -0
  250. package/dist/primitives/ColorPicker/ColorPicker.js.map +1 -0
  251. package/dist/primitives/ColorPicker/ColorPicker.vue.d.ts +125 -0
  252. package/dist/primitives/ColorPicker/ColorPicker.vue.d.ts.map +1 -0
  253. package/dist/primitives/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +301 -0
  254. package/dist/primitives/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  255. package/dist/primitives/Combobox/Combobox.js +7 -0
  256. package/dist/primitives/Combobox/Combobox.js.map +1 -0
  257. package/dist/primitives/Combobox/Combobox.vue.d.ts +205 -0
  258. package/dist/primitives/Combobox/Combobox.vue.d.ts.map +1 -0
  259. package/dist/primitives/Combobox/Combobox.vue_vue_type_script_setup_true_lang.js +345 -0
  260. package/dist/primitives/Combobox/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -0
  261. package/dist/primitives/ContextMenu/ContextMenu.js +7 -0
  262. package/dist/primitives/ContextMenu/ContextMenu.js.map +1 -0
  263. package/dist/primitives/ContextMenu/ContextMenu.vue.d.ts +55 -0
  264. package/dist/primitives/ContextMenu/ContextMenu.vue.d.ts.map +1 -0
  265. package/dist/primitives/ContextMenu/ContextMenu.vue_vue_type_script_setup_true_lang.js +82 -0
  266. package/dist/primitives/ContextMenu/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  267. package/dist/primitives/DatePicker/DatePicker.js +7 -0
  268. package/dist/primitives/DatePicker/DatePicker.js.map +1 -0
  269. package/dist/primitives/DatePicker/DatePicker.vue.d.ts +102 -0
  270. package/dist/primitives/DatePicker/DatePicker.vue.d.ts.map +1 -0
  271. package/dist/primitives/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +292 -0
  272. package/dist/primitives/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  273. package/dist/primitives/DateRangePicker/DateRangePicker.js +7 -0
  274. package/dist/primitives/DateRangePicker/DateRangePicker.js.map +1 -0
  275. package/dist/primitives/DateRangePicker/DateRangePicker.vue.d.ts +173 -0
  276. package/dist/primitives/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -0
  277. package/dist/primitives/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +412 -0
  278. package/dist/primitives/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  279. package/dist/primitives/DateTimePicker/DateTimePicker.js +7 -0
  280. package/dist/primitives/DateTimePicker/DateTimePicker.js.map +1 -0
  281. package/dist/primitives/DateTimePicker/DateTimePicker.vue.d.ts +113 -0
  282. package/dist/primitives/DateTimePicker/DateTimePicker.vue.d.ts.map +1 -0
  283. package/dist/primitives/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +358 -0
  284. package/dist/primitives/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  285. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.js +7 -0
  286. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -0
  287. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts +181 -0
  288. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts.map +1 -0
  289. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +562 -0
  290. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  291. package/dist/primitives/Dialog/Dialog.js +2 -2
  292. package/dist/primitives/Dialog/Dialog.js.map +1 -1
  293. package/dist/primitives/Dialog/Dialog.vue.d.ts +39 -0
  294. package/dist/primitives/Dialog/Dialog.vue.d.ts.map +1 -1
  295. package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js +14 -5
  296. package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  297. package/dist/primitives/Drawer/Drawer.js +7 -0
  298. package/dist/primitives/Drawer/Drawer.js.map +1 -0
  299. package/dist/primitives/Drawer/Drawer.vue.d.ts +110 -0
  300. package/dist/primitives/Drawer/Drawer.vue.d.ts.map +1 -0
  301. package/dist/primitives/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +223 -0
  302. package/dist/primitives/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  303. package/dist/primitives/DropdownMenu/DropdownMenu.js.map +1 -1
  304. package/dist/primitives/DropdownMenu/DropdownMenu.vue.d.ts.map +1 -1
  305. package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js +2 -2
  306. package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  307. package/dist/primitives/Editable/Editable.js +7 -0
  308. package/dist/primitives/Editable/Editable.js.map +1 -0
  309. package/dist/primitives/Editable/Editable.vue.d.ts +200 -0
  310. package/dist/primitives/Editable/Editable.vue.d.ts.map +1 -0
  311. package/dist/primitives/Editable/Editable.vue_vue_type_script_setup_true_lang.js +275 -0
  312. package/dist/primitives/Editable/Editable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  313. package/dist/primitives/Field/Field.js.map +1 -1
  314. package/dist/primitives/Field/Field.vue.d.ts +32 -17
  315. package/dist/primitives/Field/Field.vue.d.ts.map +1 -1
  316. package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js +51 -18
  317. package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js.map +1 -1
  318. package/dist/primitives/Fieldset/Fieldset.js +7 -0
  319. package/dist/primitives/Fieldset/Fieldset.js.map +1 -0
  320. package/dist/primitives/Fieldset/Fieldset.vue.d.ts +91 -0
  321. package/dist/primitives/Fieldset/Fieldset.vue.d.ts.map +1 -0
  322. package/dist/primitives/Fieldset/Fieldset.vue_vue_type_script_setup_true_lang.js +138 -0
  323. package/dist/primitives/Fieldset/Fieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
  324. package/dist/primitives/FileUpload/FileUpload.js +7 -0
  325. package/dist/primitives/FileUpload/FileUpload.js.map +1 -0
  326. package/dist/primitives/FileUpload/FileUpload.vue.d.ts +132 -0
  327. package/dist/primitives/FileUpload/FileUpload.vue.d.ts.map +1 -0
  328. package/dist/primitives/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +359 -0
  329. package/dist/primitives/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -0
  330. package/dist/primitives/HoverCard/HoverCard.js +7 -0
  331. package/dist/primitives/HoverCard/HoverCard.js.map +1 -0
  332. package/dist/primitives/HoverCard/HoverCard.vue.d.ts +68 -0
  333. package/dist/primitives/HoverCard/HoverCard.vue.d.ts.map +1 -0
  334. package/dist/primitives/HoverCard/HoverCard.vue_vue_type_script_setup_true_lang.js +62 -0
  335. package/dist/primitives/HoverCard/HoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  336. package/dist/primitives/IconButton/IconButton.js +7 -0
  337. package/dist/primitives/IconButton/IconButton.js.map +1 -0
  338. package/dist/primitives/IconButton/IconButton.vue.d.ts +45 -0
  339. package/dist/primitives/IconButton/IconButton.vue.d.ts.map +1 -0
  340. package/dist/primitives/IconButton/IconButton.vue_vue_type_script_setup_true_lang.js +58 -0
  341. package/dist/primitives/IconButton/IconButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  342. package/dist/primitives/Indicator/Indicator.js +7 -0
  343. package/dist/primitives/Indicator/Indicator.js.map +1 -0
  344. package/dist/primitives/Indicator/Indicator.vue.d.ts +144 -0
  345. package/dist/primitives/Indicator/Indicator.vue.d.ts.map +1 -0
  346. package/dist/primitives/Indicator/Indicator.vue_vue_type_script_setup_true_lang.js +198 -0
  347. package/dist/primitives/Indicator/Indicator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  348. package/dist/primitives/Link/Link.js +7 -0
  349. package/dist/primitives/Link/Link.js.map +1 -0
  350. package/dist/primitives/Link/Link.vue.d.ts +46 -0
  351. package/dist/primitives/Link/Link.vue.d.ts.map +1 -0
  352. package/dist/primitives/Link/Link.vue_vue_type_script_setup_true_lang.js +85 -0
  353. package/dist/primitives/Link/Link.vue_vue_type_script_setup_true_lang.js.map +1 -0
  354. package/dist/primitives/Menubar/Menubar.js.map +1 -1
  355. package/dist/primitives/Menubar/Menubar.vue.d.ts.map +1 -1
  356. package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js +1 -1
  357. package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  358. package/dist/primitives/NumberField/NumberField.js +2 -2
  359. package/dist/primitives/NumberField/NumberField.js.map +1 -1
  360. package/dist/primitives/NumberField/NumberField.vue.d.ts +86 -25
  361. package/dist/primitives/NumberField/NumberField.vue.d.ts.map +1 -1
  362. package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +83 -39
  363. package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  364. package/dist/primitives/OtpInput/OtpInput.js +7 -0
  365. package/dist/primitives/OtpInput/OtpInput.js.map +1 -0
  366. package/dist/primitives/OtpInput/OtpInput.vue.d.ts +110 -0
  367. package/dist/primitives/OtpInput/OtpInput.vue.d.ts.map +1 -0
  368. package/dist/primitives/OtpInput/OtpInput.vue_vue_type_script_setup_true_lang.js +130 -0
  369. package/dist/primitives/OtpInput/OtpInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  370. package/dist/primitives/Pagination/Pagination.js +7 -0
  371. package/dist/primitives/Pagination/Pagination.js.map +1 -0
  372. package/dist/primitives/Pagination/Pagination.vue.d.ts +143 -0
  373. package/dist/primitives/Pagination/Pagination.vue.d.ts.map +1 -0
  374. package/dist/primitives/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +231 -0
  375. package/dist/primitives/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -0
  376. package/dist/primitives/Progress/Progress.js +2 -2
  377. package/dist/primitives/Progress/Progress.js.map +1 -1
  378. package/dist/primitives/Progress/Progress.vue.d.ts +81 -15
  379. package/dist/primitives/Progress/Progress.vue.d.ts.map +1 -1
  380. package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js +88 -22
  381. package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js.map +1 -1
  382. package/dist/primitives/RadialProgress/RadialProgress.js +7 -0
  383. package/dist/primitives/RadialProgress/RadialProgress.js.map +1 -0
  384. package/dist/primitives/RadialProgress/RadialProgress.vue.d.ts +96 -0
  385. package/dist/primitives/RadialProgress/RadialProgress.vue.d.ts.map +1 -0
  386. package/dist/primitives/RadialProgress/RadialProgress.vue_vue_type_script_setup_true_lang.js +189 -0
  387. package/dist/primitives/RadialProgress/RadialProgress.vue_vue_type_script_setup_true_lang.js.map +1 -0
  388. package/dist/primitives/RadioGroup/RadioGroup.js.map +1 -1
  389. package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts +7 -7
  390. package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  391. package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js +26 -9
  392. package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  393. package/dist/primitives/Rating/Rating.js +7 -0
  394. package/dist/primitives/Rating/Rating.js.map +1 -0
  395. package/dist/primitives/Rating/Rating.vue.d.ts +113 -0
  396. package/dist/primitives/Rating/Rating.vue.d.ts.map +1 -0
  397. package/dist/primitives/Rating/Rating.vue_vue_type_script_setup_true_lang.js +282 -0
  398. package/dist/primitives/Rating/Rating.vue_vue_type_script_setup_true_lang.js.map +1 -0
  399. package/dist/primitives/ScrollArea/ScrollArea.js +7 -0
  400. package/dist/primitives/ScrollArea/ScrollArea.js.map +1 -0
  401. package/dist/primitives/ScrollArea/ScrollArea.vue.d.ts +25 -0
  402. package/dist/primitives/ScrollArea/ScrollArea.vue.d.ts.map +1 -0
  403. package/dist/primitives/ScrollArea/ScrollArea.vue_vue_type_script_setup_true_lang.js +45 -0
  404. package/dist/primitives/ScrollArea/ScrollArea.vue_vue_type_script_setup_true_lang.js.map +1 -0
  405. package/dist/primitives/SegmentedControl/SegmentedControl.js.map +1 -1
  406. package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts +5 -5
  407. package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  408. package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js +51 -8
  409. package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
  410. package/dist/primitives/Select/Select.js.map +1 -1
  411. package/dist/primitives/Select/Select.vue.d.ts +10 -10
  412. package/dist/primitives/Select/Select.vue.d.ts.map +1 -1
  413. package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js +105 -52
  414. package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
  415. package/dist/primitives/Skeleton/Skeleton.vue.d.ts +1 -1
  416. package/dist/primitives/Slider/Slider.js.map +1 -1
  417. package/dist/primitives/Slider/Slider.vue.d.ts +24 -4
  418. package/dist/primitives/Slider/Slider.vue.d.ts.map +1 -1
  419. package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js +79 -9
  420. package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  421. package/dist/primitives/SpeedDial/SpeedDial.js +7 -0
  422. package/dist/primitives/SpeedDial/SpeedDial.js.map +1 -0
  423. package/dist/primitives/SpeedDial/SpeedDial.vue.d.ts +58 -0
  424. package/dist/primitives/SpeedDial/SpeedDial.vue.d.ts.map +1 -0
  425. package/dist/primitives/SpeedDial/SpeedDial.vue_vue_type_script_setup_true_lang.js +175 -0
  426. package/dist/primitives/SpeedDial/SpeedDial.vue_vue_type_script_setup_true_lang.js.map +1 -0
  427. package/dist/primitives/Stepper/Stepper.js +7 -0
  428. package/dist/primitives/Stepper/Stepper.js.map +1 -0
  429. package/dist/primitives/Stepper/Stepper.vue.d.ts +119 -0
  430. package/dist/primitives/Stepper/Stepper.vue.d.ts.map +1 -0
  431. package/dist/primitives/Stepper/Stepper.vue_vue_type_script_setup_true_lang.js +202 -0
  432. package/dist/primitives/Stepper/Stepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
  433. package/dist/primitives/Switch/Switch.js.map +1 -1
  434. package/dist/primitives/Switch/Switch.vue.d.ts +13 -3
  435. package/dist/primitives/Switch/Switch.vue.d.ts.map +1 -1
  436. package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js +34 -5
  437. package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  438. package/dist/primitives/Tabs/Tabs.js.map +1 -1
  439. package/dist/primitives/Tabs/Tabs.vue.d.ts.map +1 -1
  440. package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
  441. package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  442. package/dist/primitives/TagsInput/TagsInput.js +7 -0
  443. package/dist/primitives/TagsInput/TagsInput.js.map +1 -0
  444. package/dist/primitives/TagsInput/TagsInput.vue.d.ts +156 -0
  445. package/dist/primitives/TagsInput/TagsInput.vue.d.ts.map +1 -0
  446. package/dist/primitives/TagsInput/TagsInput.vue_vue_type_script_setup_true_lang.js +387 -0
  447. package/dist/primitives/TagsInput/TagsInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  448. package/dist/primitives/TextField/TextField.js +2 -2
  449. package/dist/primitives/TextField/TextField.js.map +1 -1
  450. package/dist/primitives/TextField/TextField.vue.d.ts +119 -10
  451. package/dist/primitives/TextField/TextField.vue.d.ts.map +1 -1
  452. package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js +270 -21
  453. package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  454. package/dist/primitives/Textarea/Textarea.js +2 -2
  455. package/dist/primitives/Textarea/Textarea.js.map +1 -1
  456. package/dist/primitives/Textarea/Textarea.vue.d.ts +114 -14
  457. package/dist/primitives/Textarea/Textarea.vue.d.ts.map +1 -1
  458. package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +216 -20
  459. package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  460. package/dist/primitives/TimePicker/TimePicker.js +7 -0
  461. package/dist/primitives/TimePicker/TimePicker.js.map +1 -0
  462. package/dist/primitives/TimePicker/TimePicker.vue.d.ts +111 -0
  463. package/dist/primitives/TimePicker/TimePicker.vue.d.ts.map +1 -0
  464. package/dist/primitives/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +185 -0
  465. package/dist/primitives/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  466. package/dist/primitives/Toast/Toast.js +2 -1
  467. package/dist/primitives/Toast/Toast.js.map +1 -1
  468. package/dist/primitives/Toast/Toast.vue.d.ts +29 -3
  469. package/dist/primitives/Toast/Toast.vue.d.ts.map +1 -1
  470. package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js +17 -7
  471. package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  472. package/dist/primitives/Toast/ToastItem.js +2 -2
  473. package/dist/primitives/Toast/ToastItem.js.map +1 -1
  474. package/dist/primitives/Toast/ToastItem.vue.d.ts +69 -12
  475. package/dist/primitives/Toast/ToastItem.vue.d.ts.map +1 -1
  476. package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js +23 -23
  477. package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  478. package/dist/primitives/Tooltip/Tooltip.vue.d.ts +1 -1
  479. package/dist/primitives/Tooltip/Tooltip.vue.d.ts.map +1 -1
  480. package/dist/primitives/WindowControls/WindowControls.js +2 -2
  481. package/dist/primitives/WindowControls/WindowControls.js.map +1 -1
  482. package/dist/primitives/WindowControls/WindowControls.vue.d.ts +66 -10
  483. package/dist/primitives/WindowControls/WindowControls.vue.d.ts.map +1 -1
  484. package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js +23 -13
  485. package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js.map +1 -1
  486. package/dist/styles/global.css +116 -17
  487. package/dist/styles/theme.contrast.test.ts +460 -0
  488. package/dist/styles/theme.css +239 -41
  489. package/dist/theme.js +171 -0
  490. package/dist/theme.js.map +1 -0
  491. package/package.json +14 -4
  492. package/dist/icons/BrandMark.d.ts +0 -18
  493. package/dist/icons/BrandMark.d.ts.map +0 -1
  494. package/dist/icons/BrandMark.js +0 -47
  495. package/dist/icons/BrandMark.js.map +0 -1
@@ -0,0 +1,68 @@
1
+ /**
2
+ * One collapsible section of the accordion. The list is data rather than markup
3
+ * because the primitive stays free of structure logic — toggling a section emits
4
+ * its `value` and the host decides what that open state means.
5
+ */
6
+ export interface AccordionItem {
7
+ /** Unique key for the item. */
8
+ value: string;
9
+ /** The heading text shown on the trigger. */
10
+ label: string;
11
+ /** Inert: announced as disabled, and toggling it does nothing. */
12
+ disabled?: boolean;
13
+ }
14
+ /**
15
+ * Whether the accordion allows one open item or many. The members mirror Reka's
16
+ * own `AccordionType`, and the template binding is what enforces that.
17
+ */
18
+ export type AccordionType = "single" | "multiple";
19
+ /**
20
+ * Vertical gap between items, tightening below the `sm` breakpoint where the
21
+ * accordion is more likely inside a narrow panel.
22
+ */
23
+ export type AccordionGap = "sm" | "md" | "lg";
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
27
+ /** The sections, in order. Each needs a unique `value`. */
28
+ items: AccordionItem[];
29
+ /** Whether one or many items can be open at once. */
30
+ type?: AccordionType;
31
+ /** In single mode, whether the open item can be closed. Ignored in multiple mode. */
32
+ collapsible?: boolean;
33
+ /** Drive the open state from the host with `v-model`; omit it and the accordion owns its own state. */
34
+ modelValue?: string | string[] | undefined;
35
+ /** Vertical gap between items. */
36
+ gap?: AccordionGap;
37
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
+ "update:modelValue": (value: string | string[]) => any;
39
+ }, string, import("vue").PublicProps, Readonly<{
40
+ /** The sections, in order. Each needs a unique `value`. */
41
+ items: AccordionItem[];
42
+ /** Whether one or many items can be open at once. */
43
+ type?: AccordionType;
44
+ /** In single mode, whether the open item can be closed. Ignored in multiple mode. */
45
+ collapsible?: boolean;
46
+ /** Drive the open state from the host with `v-model`; omit it and the accordion owns its own state. */
47
+ modelValue?: string | string[] | undefined;
48
+ /** Vertical gap between items. */
49
+ gap?: AccordionGap;
50
+ }> & Readonly<{
51
+ "onUpdate:modelValue"?: (value: string | string[]) => any;
52
+ }>, {
53
+ gap: AccordionGap;
54
+ modelValue: string | string[] | undefined;
55
+ type: AccordionType;
56
+ collapsible: boolean;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
58
+ default?: (props: {
59
+ item: AccordionItem;
60
+ index: number;
61
+ }) => any;
62
+ }>;
63
+ type __VLS_WithSlots<T, S> = T & {
64
+ new (): {
65
+ $slots: S;
66
+ };
67
+ };
68
+ //# sourceMappingURL=Accordion.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Accordion/Accordion.vue"],"names":[],"mappings":"AAiKA;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;wBACzB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAmBd,2DAA2D;WACpD,aAAa,EAAE;IACtB,qDAAqD;WAC9C,aAAa;IACpB,qFAAqF;kBACvE,OAAO;IACrB,uGAAuG;iBAC1F,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAC1C,kCAAkC;UAC5B,YAAY;;;;IATlB,2DAA2D;WACpD,aAAa,EAAE;IACtB,qDAAqD;WAC9C,aAAa;IACpB,qFAAqF;kBACvE,OAAO;IACrB,uGAAuG;iBAC1F,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAC1C,kCAAkC;UAC5B,YAAY;;;;SAAZ,YAAY;gBAFL,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;UAJnC,aAAa;iBAEN,OAAO;;cAwMX,CAAC,KAAK;;;KAAiB,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,67 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { optional } from "../../lib/props.js";
3
+ import { ChevronDown } from "@lucide/vue";
4
+ import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
5
+ import { AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger } from "reka-ui";
6
+ //#region src/primitives/Accordion/Accordion.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = { class: "px-4 pb-3 text-sm text-muted-foreground" };
8
+ var Accordion_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
9
+ __name: "Accordion",
10
+ props: {
11
+ items: {},
12
+ type: { default: "single" },
13
+ collapsible: {
14
+ type: Boolean,
15
+ default: true
16
+ },
17
+ modelValue: { default: void 0 },
18
+ gap: { default: "md" }
19
+ },
20
+ emits: ["update:modelValue"],
21
+ setup(__props) {
22
+ const GAP_CLASSES = {
23
+ sm: "gap-1 sm:gap-2",
24
+ md: "gap-2 sm:gap-3",
25
+ lg: "gap-3 sm:gap-4"
26
+ };
27
+ return (_ctx, _cache) => {
28
+ return openBlock(), createBlock(unref(AccordionRoot), mergeProps({
29
+ type: __props.type,
30
+ collapsible: __props.collapsible
31
+ }, unref(optional)({ modelValue: __props.modelValue }), {
32
+ class: unref(cn)("flex flex-col", GAP_CLASSES[__props.gap]),
33
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
34
+ }), {
35
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
36
+ return openBlock(), createBlock(unref(AccordionItem), {
37
+ key: item.value,
38
+ value: item.value,
39
+ disabled: item.disabled ?? false,
40
+ class: "border-b border-border last:border-b-0"
41
+ }, {
42
+ default: withCtx(() => [createVNode(unref(AccordionTrigger), { class: normalizeClass(unref(cn)("flex items-center justify-between w-full px-4 py-3 text-sm font-medium text-foreground transition-colors duration-fast ease-out hover:bg-subtle rounded-md", "data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground")) }, {
43
+ default: withCtx(() => [createTextVNode(toDisplayString(item.label) + " ", 1), createVNode(unref(ChevronDown), { class: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-fast ease-out data-[state=open]:rotate-180" })]),
44
+ _: 2
45
+ }, 1032, ["class"]), createVNode(unref(AccordionContent), { class: "overflow-hidden data-[state=closed]:animate-fade-fall data-[state=open]:animate-fade-rise" }, {
46
+ default: withCtx(() => [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "default", {
47
+ item,
48
+ index: __props.items.indexOf(item)
49
+ })])]),
50
+ _: 2
51
+ }, 1024)]),
52
+ _: 2
53
+ }, 1032, ["value", "disabled"]);
54
+ }), 128))]),
55
+ _: 3
56
+ }, 16, [
57
+ "type",
58
+ "collapsible",
59
+ "class"
60
+ ]);
61
+ };
62
+ }
63
+ });
64
+ //#endregion
65
+ export { Accordion_vue_vue_type_script_setup_true_lang_default as default };
66
+
67
+ //# sourceMappingURL=Accordion.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/primitives/Accordion/Accordion.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * One collapsible section of the accordion. The list is data rather than markup\n * because the primitive stays free of structure logic — toggling a section emits\n * its `value` and the host decides what that open state means.\n */\nexport interface AccordionItem {\n /** Unique key for the item. */\n value: string;\n /** The heading text shown on the trigger. */\n label: string;\n /** Inert: announced as disabled, and toggling it does nothing. */\n disabled?: boolean;\n}\n\n/**\n * Whether the accordion allows one open item or many. The members mirror Reka's\n * own `AccordionType`, and the template binding is what enforces that.\n */\nexport type AccordionType = \"single\" | \"multiple\";\n\n/**\n * Vertical gap between items, tightening below the `sm` breakpoint where the\n * accordion is more likely inside a narrow panel.\n */\nexport type AccordionGap = \"sm\" | \"md\" | \"lg\";\n</script>\n\n<script setup lang=\"ts\">\nimport {\n AccordionRoot,\n AccordionItem as RekaAccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from \"reka-ui\";\nimport { ChevronDown } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\n\n/**\n * Accordion — vertically stacked, expandable sections: each trigger reveals\n * its panel and collapses the rest (single mode) or lets several panels stay\n * open at once (multiple mode). Built on Reka UI's Accordion, which supplies\n * the `accordion`/`accordion-item`/`button`/`region` semantics and the\n * arrow-key navigation between triggers.\n *\n * Items are data rather than markup. A scoped default slot receives each item\n * so the host can render arbitrary content inside a panel — the primitive\n * owns the open/close mechanics and the trigger chrome, not what is inside the\n * panel.\n *\n * `collapsible` only matters in single mode: it governs whether the one open\n * item can be closed again. A non-collapsible single accordion always has\n * exactly one panel open. In multiple mode the prop is ignored — every item\n * can close independently.\n */\nwithDefaults(\n defineProps<{\n /** The sections, in order. Each needs a unique `value`. */\n items: AccordionItem[];\n /** Whether one or many items can be open at once. */\n type?: AccordionType;\n /** In single mode, whether the open item can be closed. Ignored in multiple mode. */\n collapsible?: boolean;\n /** Drive the open state from the host with `v-model`; omit it and the accordion owns its own state. */\n modelValue?: string | string[] | undefined;\n /** Vertical gap between items. */\n gap?: AccordionGap;\n }>(),\n {\n type: \"single\",\n collapsible: true,\n modelValue: undefined,\n gap: \"md\",\n },\n);\n\n// `modelValue: undefined` is load-bearing, not a redundant default — it is\n// what keeps the uncontrolled third state reachable past Vue's absent-Boolean\n// casting. `optional()` in the template is the other half; its docblock\n// carries the reasoning for both.\n\ndefineEmits<{ \"update:modelValue\": [value: string | string[]] }>();\n\nconst GAP_CLASSES: Record<AccordionGap, string> = {\n sm: \"gap-1 sm:gap-2\",\n md: \"gap-2 sm:gap-3\",\n lg: \"gap-3 sm:gap-4\",\n};\n</script>\n\n<template>\n <AccordionRoot\n :type=\"type\"\n :collapsible=\"collapsible\"\n v-bind=\"optional({ modelValue })\"\n :class=\"cn('flex flex-col', GAP_CLASSES[gap])\"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n >\n <RekaAccordionItem\n v-for=\"item in items\"\n :key=\"item.value\"\n :value=\"item.value\"\n :disabled=\"item.disabled ?? false\"\n class=\"border-b border-border last:border-b-0\"\n >\n <AccordionTrigger\n :class=\"\n cn(\n 'flex items-center justify-between w-full px-4 py-3 text-sm font-medium text-foreground transition-colors duration-fast ease-out hover:bg-subtle rounded-md',\n // A disabled trigger must still be reachable by arrow key, so the\n // pointer is silenced but the element stays in the tab order.\n 'data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground',\n )\n \"\n >\n {{ item.label }}\n <!-- The chevron rotates 180deg when the item opens, matching the\n `data-[state=open]` attribute Reka sets on the trigger. A\n transition rather than an animation, because the rotation has no\n entrance/exit split — it just flips. -->\n <ChevronDown\n class=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-fast ease-out data-[state=open]:rotate-180\"\n />\n </AccordionTrigger>\n <!-- Scoped to the open/closed state, never unconditional. Reka's\n Presence keeps closed content mounted until an animationend arrives,\n and a mount-only animation never fires a second one — so an\n unconditional animation class strands invisible content over the\n page. Scoped, the closed element computes `animation-name: none` and\n Presence unmounts it at once.\n\n The rise/fall pair is the existing vocabulary — a height animation\n keyed to Reka's `--reka-accordion-content-height` would need its own\n keyframe and utility registration, which belongs in `global.css` and\n `theme.css` rather than in a single component. -->\n <AccordionContent\n class=\"overflow-hidden data-[state=closed]:animate-fade-fall data-[state=open]:animate-fade-rise\"\n >\n <div class=\"px-4 pb-3 text-sm text-muted-foreground\">\n <!-- @slot The content of each panel. Receives the item as a slot prop. -->\n <slot :item=\"item\" :index=\"items.indexOf(item)\" />\n </div>\n </AccordionContent>\n </RekaAccordionItem>\n </AccordionRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAoFA,MAAM,cAA4C;GAChD,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;;GAIE,OAAA,UAAA,GAAA,YAqDgB,MAAA,aAAA,GArDhB,WAqDgB;IApDb,MAAM,QAAA;IACN,aAAa,QAAA;GACN,GAAA,MAAA,QAAA,CAAQ,CAAA,EAAA,YAAG,QAAA,WAAU,CAAA,GAAA;IAC5B,OAAO,MAAA,EAAA,CAAE,CAAA,iBAAkB,YAAY,QAAA,IAAG;IAC1C,uBAAkB,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,qBAAsB,MAAM;;IAGpD,SAAA,cAAqB,EADvB,UAAA,IAAA,GAAA,mBA6CoB,UAAA,MAAA,WA5CH,QAAA,QAAR,SAAI;KADb,OAAA,UAAA,GAAA,YA6CoB,MAAA,aAAA,GAAA;MA3CjB,KAAK,KAAK;MACV,OAAO,KAAK;MACZ,UAAU,KAAK,YAAQ;MACxB,OAAM;;MAEN,SAAA,cAkBmB,CAlBnB,YAkBmB,MAAA,gBAAA,GAAA,EAjBhB,OAAK,eAAa,MAAA,EAAA,CAAE,CAAA,8JAAA,2EAAA,CAAA,EAAA,GAAA;OASrB,SAAA,cAAgB,CAAb,gBAAA,gBAAA,KAAK,KAAK,IAAG,KAKhB,CAAA,GAAA,YAEE,MAAA,WAAA,GAAA,EADA,OAAM,kHAAiH,CAAA,CAAA,CAAA;;MAc3H,GAAA,MAAA,CAAA,OAAA,CAAA,GAAA,YAOmB,MAAA,gBAAA,GAAA,EANjB,OAAM,4FAA2F,GAAA;OAEjG,SAAA,cAGM,CAHN,mBAGM,OAHN,YAGM,CADJ,WAAkD,KAAA,QAAA,WAAA;QAArC;QAAO,OAAO,QAAA,MAAM,QAAQ,IAAI"}
@@ -0,0 +1,7 @@
1
+ import AlertDialog_vue_vue_type_script_setup_true_lang_default, { ALERT_DIALOG_LABELS } from "./AlertDialog.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/AlertDialog/AlertDialog.vue
3
+ var AlertDialog_default = AlertDialog_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { ALERT_DIALOG_LABELS, AlertDialog_default as default };
6
+
7
+ //# sourceMappingURL=AlertDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.js","names":[],"sources":["../../../src/primitives/AlertDialog/AlertDialog.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * The two buttons, which are the whole of what this component says on its own\n * account: the title and the consequence line are the host's, and there is no\n * body slot for anything else to arrive through.\n *\n * These were `confirmLabel` and `cancelLabel` props, and folding them in here\n * is not a rename. A prop default is per-instance by construction, so\n * \"Confirm\" and \"Cancel\" were the two strings in this library that a host\n * could correct at every call site and nowhere else — an application in\n * Vietnamese had to restate `cancelLabel` on every alert it rendered, and\n * forgetting one left an English button in the middle of a Vietnamese\n * decision. As a slot, `cancel` is set once for the application and `confirm`\n * is corrected per instance, which is the split these two actually want.\n */\nexport interface AlertDialogLabels {\n /**\n * The action button. **Replace it with the verb it performs** — \"Delete\",\n * \"Discard\", \"Leave without saving\". The default is a placeholder: \"Confirm\"\n * tells a reader they are confirming and not what.\n */\n readonly confirm: string;\n /**\n * The way out, and the control that opens with focus. Unlike `confirm` this\n * one usually is the same word everywhere in an application, which is what\n * makes a vocabulary rather than a prop the right home for it.\n */\n readonly cancel: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const ALERT_DIALOG_LABELS: AlertDialogLabels = {\n confirm: \"Confirm\",\n cancel: \"Cancel\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport {\n AlertDialogRoot,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n} from \"reka-ui\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport { useSplitAttrs } from \"../../lib/attrs\";\nimport { buttonVariants } from \"../Button/Button.vue\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\n/**\n * AlertDialog — the modal that demands a decision before anything else\n * happens: \"Delete this permanently?\", \"Discard unsaved changes?\".\n *\n * It is `Dialog` with the exits removed, and that is the whole of the\n * difference. A `Dialog` is dismissible: Esc, a click on the overlay and the\n * close glyph all mean \"not now\", which is right for a task surface. An\n * AlertDialog has no such exit — a click outside does nothing, there is no\n * close glyph, and the only ways out are the two buttons. It carries\n * `role=\"alertdialog\"`, so its description is announced with its name rather\n * than waiting to be navigated to.\n *\n * Reach for it only when dismissing by accident would lose work or destroy\n * something. Reach for `Dialog` for everything else — an AlertDialog used for\n * an ordinary form is a control that traps a reader for no reason.\n *\n * There is deliberately no body slot. A question that needs body content is a\n * task, and a task is a `Dialog`; keeping the surface to a title, a\n * consequence line and two buttons is what stops this component from becoming\n * an undismissible form.\n *\n * Initial focus lands on **Cancel**, never on the action. A destructive\n * confirm that focuses \"Delete\" turns a reflexive Enter — from a reader who\n * has not finished the sentence — into a deletion. Reka does this in\n * `AlertDialogContent`; the test pins it, because it is the single behaviour\n * this component exists to guarantee.\n */\nconst props = withDefaults(\n defineProps<{\n /** Drive the alert from the host with `v-model:open`; omit it and the alert owns its own state. */\n open?: boolean | undefined;\n /** The accessible name, and the decision being asked for. State the consequence (\"Delete scene?\"), not \"Are you sure?\". */\n title: string;\n /** The consequence line, announced with the title rather than found later. Omit it only when the title already says everything. */\n description?: string;\n /** Paints the action in the destructive language. The verb in `labels.confirm` is what carries the meaning; this only adds emphasis to it. */\n destructive?: boolean;\n /**\n * The two button names, as any subset of `AlertDialogLabels` — what it\n * leaves out stays as the host's `provideLoomLabels` vocabulary left it,\n * and then as Loom's English.\n *\n * **`confirm` is meant to be set here on all but the rarest alert**, since\n * the verb is what tells a reader what the button does; `cancel` belongs in\n * the application's vocabulary, where it is written once.\n */\n labels?: LabelOverrides<AlertDialogLabels>;\n }>(),\n // `open: undefined` is load-bearing, not a redundant default — it is what\n // keeps the uncontrolled third state reachable past Vue's absent-Boolean\n // casting, and `optional()` in the template is the other half. Its docblock\n // carries the reasoning for both.\n {\n open: undefined,\n destructive: false,\n },\n);\n\ndefineEmits<{\n /** The reader chose the action. The alert does not close itself — the host decides, so a failed save can keep it open. */\n confirm: [];\n /** The reader backed out, by the cancel button or by Esc. */\n cancel: [];\n /** A close was requested. Fires alongside `confirm` and `cancel`, so a host driving `v-model:open` needs only this one. */\n \"update:open\": [value: boolean];\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"alertDialog\", ALERT_DIALOG_LABELS, () => props.labels);\n\n// The root renders no DOM node at all, so fallthrough attributes would be\n// dropped on the floor rather than landing anywhere. They go to the panel,\n// which is the only element this component reliably renders — there may be no\n// trigger at all when the host drives `open` itself.\n//\n// `class` is pulled out of that spread and merged through `cn()` instead:\n// spreading it alongside the panel's own `:class` only concatenates the two\n// lists, so a caller's width silently wins or loses depending on which utility\n// Tailwind happened to emit last.\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest: panelAttrs } = useSplitAttrs();\n\n// Reka wires `aria-describedby` to its own description id unconditionally, so\n// a panel rendered without a description ships a reference to an element that\n// does not exist. That is not cosmetic here: `role=\"alertdialog\"` earns its\n// keep by having the description announced with the name, and a dangling IDREF\n// announces nothing. Clearing the attribute is what removes it — fallthrough\n// attributes are merged after Reka's own, and Vue drops an attribute bound to\n// `undefined`. A caller's own `aria-describedby` still wins, because\n// `panelAttrs` is spread last.\nconst panelBindings = computed(() => ({\n ...(props.description ? {} : { \"aria-describedby\": undefined }),\n ...panelAttrs.value,\n}));\n</script>\n\n<template>\n <AlertDialogRoot v-bind=\"optional({ open })\" @update:open=\"$emit('update:open', $event)\">\n <!-- @slot The control that opens the alert. Optional — omit it and drive\n the alert entirely from the host with `v-model:open`. -->\n <AlertDialogTrigger v-if=\"$slots.trigger\" as-child>\n <slot name=\"trigger\" />\n </AlertDialogTrigger>\n\n <AlertDialogPortal>\n <!-- Same scrim as Dialog, and it is inert here: Reka's AlertDialogContent\n prevents both `pointerDownOutside` and `interactOutside`, so a click\n lands on nothing. That is the point — an accidental click at the edge\n of the screen must not be able to answer the question. -->\n <AlertDialogOverlay\n class=\"fixed inset-0 z-50 bg-foreground/70 data-[state=open]:animate-fade\"\n />\n <AlertDialogContent\n v-bind=\"panelBindings\"\n :data-destructive=\"destructive || undefined\"\n :class=\"\n cn(\n 'fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n // One width, and no `size` prop to vary it. A decision has one\n // shape; the wider panels exist on Dialog because an authoring\n // surface needs them, and there is no authoring surface here.\n 'w-[min(92vw,32rem)]',\n 'rounded-lg border border-border bg-popover p-6 text-popover-foreground shadow-lg outline-none',\n // Scoped to the open state, never unconditional. Reka's Presence\n // keeps closed content mounted until an animationend arrives, and a\n // mount-only animation never fires a second one — which here would\n // strand a full-screen, input-blocking overlay over a page with no\n // alert on it. Scoped, the closed element computes\n // `animation-name: none` and Presence unmounts it at once.\n 'data-[state=open]:animate-scale-in',\n attrs.class as string,\n )\n \"\n @escape-key-down=\"$emit('cancel')\"\n >\n <AlertDialogTitle class=\"text-base font-semibold\">{{ title }}</AlertDialogTitle>\n <AlertDialogDescription v-if=\"description\" class=\"mt-1 text-sm text-muted-foreground\">\n {{ description }}\n </AlertDialogDescription>\n\n <div class=\"mt-6 flex items-center justify-end gap-2\">\n <!-- Cancel is first in the DOM as well as first visually, so the\n order a screen reader reads matches the order the eye does. It is\n also the element Reka focuses on open. -->\n <AlertDialogCancel\n :class=\"buttonVariants({ variant: 'subtle' })\"\n @click=\"$emit('cancel')\"\n >\n {{ text.cancel }}\n </AlertDialogCancel>\n <!-- The destructive paint is emphasis, not the signal. What tells a\n reader this button destroys something is the verb in its label,\n which is why `labels.confirm` is meant to be replaced rather than\n left as \"Confirm\". -->\n <AlertDialogAction\n :class=\"buttonVariants({ variant: destructive ? 'destructive' : 'primary' })\"\n @click=\"$emit('confirm')\"\n >\n {{ text.confirm }}\n </AlertDialogAction>\n </div>\n </AlertDialogContent>\n </AlertDialogPortal>\n </AlertDialogRoot>\n</template>\n"],"mappings":""}
@@ -0,0 +1,94 @@
1
+ import { type LabelOverrides } from "../../lib/labels";
2
+ /**
3
+ * The two buttons, which are the whole of what this component says on its own
4
+ * account: the title and the consequence line are the host's, and there is no
5
+ * body slot for anything else to arrive through.
6
+ *
7
+ * These were `confirmLabel` and `cancelLabel` props, and folding them in here
8
+ * is not a rename. A prop default is per-instance by construction, so
9
+ * "Confirm" and "Cancel" were the two strings in this library that a host
10
+ * could correct at every call site and nowhere else — an application in
11
+ * Vietnamese had to restate `cancelLabel` on every alert it rendered, and
12
+ * forgetting one left an English button in the middle of a Vietnamese
13
+ * decision. As a slot, `cancel` is set once for the application and `confirm`
14
+ * is corrected per instance, which is the split these two actually want.
15
+ */
16
+ export interface AlertDialogLabels {
17
+ /**
18
+ * The action button. **Replace it with the verb it performs** — "Delete",
19
+ * "Discard", "Leave without saving". The default is a placeholder: "Confirm"
20
+ * tells a reader they are confirming and not what.
21
+ */
22
+ readonly confirm: string;
23
+ /**
24
+ * The way out, and the control that opens with focus. Unlike `confirm` this
25
+ * one usually is the same word everywhere in an application, which is what
26
+ * makes a vocabulary rather than a prop the right home for it.
27
+ */
28
+ readonly cancel: string;
29
+ }
30
+ /**
31
+ * Loom's English, co-located with the component so it tree-shakes with it, and
32
+ * exported so a host can build a partial vocabulary against the real thing.
33
+ */
34
+ export declare const ALERT_DIALOG_LABELS: AlertDialogLabels;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
37
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
38
+ /** Drive the alert from the host with `v-model:open`; omit it and the alert owns its own state. */
39
+ open?: boolean | undefined;
40
+ /** The accessible name, and the decision being asked for. State the consequence ("Delete scene?"), not "Are you sure?". */
41
+ title: string;
42
+ /** The consequence line, announced with the title rather than found later. Omit it only when the title already says everything. */
43
+ description?: string;
44
+ /** Paints the action in the destructive language. The verb in `labels.confirm` is what carries the meaning; this only adds emphasis to it. */
45
+ destructive?: boolean;
46
+ /**
47
+ * The two button names, as any subset of `AlertDialogLabels` — what it
48
+ * leaves out stays as the host's `provideLoomLabels` vocabulary left it,
49
+ * and then as Loom's English.
50
+ *
51
+ * **`confirm` is meant to be set here on all but the rarest alert**, since
52
+ * the verb is what tells a reader what the button does; `cancel` belongs in
53
+ * the application's vocabulary, where it is written once.
54
+ */
55
+ labels?: LabelOverrides<AlertDialogLabels>;
56
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
57
+ "update:open": (value: boolean) => any;
58
+ cancel: () => any;
59
+ confirm: () => any;
60
+ }, string, import("vue").PublicProps, Readonly<{
61
+ /** Drive the alert from the host with `v-model:open`; omit it and the alert owns its own state. */
62
+ open?: boolean | undefined;
63
+ /** The accessible name, and the decision being asked for. State the consequence ("Delete scene?"), not "Are you sure?". */
64
+ title: string;
65
+ /** The consequence line, announced with the title rather than found later. Omit it only when the title already says everything. */
66
+ description?: string;
67
+ /** Paints the action in the destructive language. The verb in `labels.confirm` is what carries the meaning; this only adds emphasis to it. */
68
+ destructive?: boolean;
69
+ /**
70
+ * The two button names, as any subset of `AlertDialogLabels` — what it
71
+ * leaves out stays as the host's `provideLoomLabels` vocabulary left it,
72
+ * and then as Loom's English.
73
+ *
74
+ * **`confirm` is meant to be set here on all but the rarest alert**, since
75
+ * the verb is what tells a reader what the button does; `cancel` belongs in
76
+ * the application's vocabulary, where it is written once.
77
+ */
78
+ labels?: LabelOverrides<AlertDialogLabels>;
79
+ }> & Readonly<{
80
+ "onUpdate:open"?: (value: boolean) => any;
81
+ onCancel?: () => any;
82
+ onConfirm?: () => any;
83
+ }>, {
84
+ open: boolean | undefined;
85
+ destructive: boolean;
86
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
87
+ trigger?: (props: {}) => any;
88
+ }>;
89
+ type __VLS_WithSlots<T, S> = T & {
90
+ new (): {
91
+ $slots: S;
92
+ };
93
+ };
94
+ //# sourceMappingURL=AlertDialog.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/AlertDialog/AlertDialog.vue"],"names":[],"mappings":"AAqPA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAGjC,CAAC;wBACmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IA6Bd,mGAAmG;WAC5F,OAAO,GAAG,SAAS;IAC1B,2HAA2H;WACpH,MAAM;IACb,mIAAmI;kBACrH,MAAM;IACpB,8IAA8I;kBAChI,OAAO;IACrB;;;;;;;;OAQG;aACM,cAAc,CAAC,iBAAiB,CAAC;;;;;;IAjB1C,mGAAmG;WAC5F,OAAO,GAAG,SAAS;IAC1B,2HAA2H;WACpH,MAAM;IACb,mIAAmI;kBACrH,MAAM;IACpB,8IAA8I;kBAChI,OAAO;IACrB;;;;;;;;OAQG;aACM,cAAc,CAAC,iBAAiB,CAAC;;;;;;UAhBnC,OAAO,GAAG,SAAS;iBAMZ,OAAO;;cAmVX,CAAC,KAAK,IAAiB,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,99 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { optional } from "../../lib/props.js";
3
+ import { useLabels } from "../../lib/labels.js";
4
+ import { useSplitAttrs } from "../../lib/attrs.js";
5
+ import { buttonVariants } from "../Button/Button.vue_vue_type_script_setup_true_lang.js";
6
+ import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
7
+ import { AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger } from "reka-ui";
8
+ //#region src/primitives/AlertDialog/AlertDialog.vue?vue&type=script&setup=true&lang.ts
9
+ var _hoisted_1 = { class: "mt-6 flex items-center justify-end gap-2" };
10
+ /**
11
+ * Loom's English, co-located with the component so it tree-shakes with it, and
12
+ * exported so a host can build a partial vocabulary against the real thing.
13
+ */
14
+ var ALERT_DIALOG_LABELS = {
15
+ confirm: "Confirm",
16
+ cancel: "Cancel"
17
+ };
18
+ var AlertDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
19
+ inheritAttrs: false,
20
+ __name: "AlertDialog",
21
+ props: {
22
+ open: {
23
+ type: Boolean,
24
+ default: void 0
25
+ },
26
+ title: {},
27
+ description: {},
28
+ destructive: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ labels: {}
33
+ },
34
+ emits: [
35
+ "confirm",
36
+ "cancel",
37
+ "update:open"
38
+ ],
39
+ setup(__props) {
40
+ const props = __props;
41
+ const text = useLabels("alertDialog", ALERT_DIALOG_LABELS, () => props.labels);
42
+ const { attrs, rest: panelAttrs } = useSplitAttrs();
43
+ const panelBindings = computed(() => ({
44
+ ...props.description ? {} : { "aria-describedby": void 0 },
45
+ ...panelAttrs.value
46
+ }));
47
+ return (_ctx, _cache) => {
48
+ return openBlock(), createBlock(unref(AlertDialogRoot), mergeProps(unref(optional)({ open: __props.open }), { "onUpdate:open": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("update:open", $event)) }), {
49
+ default: withCtx(() => [_ctx.$slots.trigger ? (openBlock(), createBlock(unref(AlertDialogTrigger), {
50
+ key: 0,
51
+ "as-child": ""
52
+ }, {
53
+ default: withCtx(() => [renderSlot(_ctx.$slots, "trigger")]),
54
+ _: 3
55
+ })) : createCommentVNode("", true), createVNode(unref(AlertDialogPortal), null, {
56
+ default: withCtx(() => [createVNode(unref(AlertDialogOverlay), { class: "fixed inset-0 z-50 bg-foreground/70 data-[state=open]:animate-fade" }), createVNode(unref(AlertDialogContent), mergeProps(panelBindings.value, {
57
+ "data-destructive": __props.destructive || void 0,
58
+ class: unref(cn)("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2", "w-[min(92vw,32rem)]", "rounded-lg border border-border bg-popover p-6 text-popover-foreground shadow-lg outline-none", "data-[state=open]:animate-scale-in", unref(attrs).class),
59
+ onEscapeKeyDown: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("cancel"))
60
+ }), {
61
+ default: withCtx(() => [
62
+ createVNode(unref(AlertDialogTitle), { class: "text-base font-semibold" }, {
63
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.title), 1)]),
64
+ _: 1
65
+ }),
66
+ __props.description ? (openBlock(), createBlock(unref(AlertDialogDescription), {
67
+ key: 0,
68
+ class: "mt-1 text-sm text-muted-foreground"
69
+ }, {
70
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.description), 1)]),
71
+ _: 1
72
+ })) : createCommentVNode("", true),
73
+ createElementVNode("div", _hoisted_1, [createVNode(unref(AlertDialogCancel), {
74
+ class: normalizeClass(unref(buttonVariants)({ variant: "subtle" })),
75
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("cancel"))
76
+ }, {
77
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(text).cancel), 1)]),
78
+ _: 1
79
+ }, 8, ["class"]), createVNode(unref(AlertDialogAction), {
80
+ class: normalizeClass(unref(buttonVariants)({ variant: __props.destructive ? "destructive" : "primary" })),
81
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("confirm"))
82
+ }, {
83
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(text).confirm), 1)]),
84
+ _: 1
85
+ }, 8, ["class"])])
86
+ ]),
87
+ _: 1
88
+ }, 16, ["data-destructive", "class"])]),
89
+ _: 1
90
+ })]),
91
+ _: 3
92
+ }, 16);
93
+ };
94
+ }
95
+ });
96
+ //#endregion
97
+ export { ALERT_DIALOG_LABELS, AlertDialog_vue_vue_type_script_setup_true_lang_default as default };
98
+
99
+ //# sourceMappingURL=AlertDialog.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.vue_vue_type_script_setup_true_lang.js","names":["$emit","$slots"],"sources":["../../../src/primitives/AlertDialog/AlertDialog.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * The two buttons, which are the whole of what this component says on its own\n * account: the title and the consequence line are the host's, and there is no\n * body slot for anything else to arrive through.\n *\n * These were `confirmLabel` and `cancelLabel` props, and folding them in here\n * is not a rename. A prop default is per-instance by construction, so\n * \"Confirm\" and \"Cancel\" were the two strings in this library that a host\n * could correct at every call site and nowhere else — an application in\n * Vietnamese had to restate `cancelLabel` on every alert it rendered, and\n * forgetting one left an English button in the middle of a Vietnamese\n * decision. As a slot, `cancel` is set once for the application and `confirm`\n * is corrected per instance, which is the split these two actually want.\n */\nexport interface AlertDialogLabels {\n /**\n * The action button. **Replace it with the verb it performs** — \"Delete\",\n * \"Discard\", \"Leave without saving\". The default is a placeholder: \"Confirm\"\n * tells a reader they are confirming and not what.\n */\n readonly confirm: string;\n /**\n * The way out, and the control that opens with focus. Unlike `confirm` this\n * one usually is the same word everywhere in an application, which is what\n * makes a vocabulary rather than a prop the right home for it.\n */\n readonly cancel: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const ALERT_DIALOG_LABELS: AlertDialogLabels = {\n confirm: \"Confirm\",\n cancel: \"Cancel\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport {\n AlertDialogRoot,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n} from \"reka-ui\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport { useSplitAttrs } from \"../../lib/attrs\";\nimport { buttonVariants } from \"../Button/Button.vue\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\n/**\n * AlertDialog — the modal that demands a decision before anything else\n * happens: \"Delete this permanently?\", \"Discard unsaved changes?\".\n *\n * It is `Dialog` with the exits removed, and that is the whole of the\n * difference. A `Dialog` is dismissible: Esc, a click on the overlay and the\n * close glyph all mean \"not now\", which is right for a task surface. An\n * AlertDialog has no such exit — a click outside does nothing, there is no\n * close glyph, and the only ways out are the two buttons. It carries\n * `role=\"alertdialog\"`, so its description is announced with its name rather\n * than waiting to be navigated to.\n *\n * Reach for it only when dismissing by accident would lose work or destroy\n * something. Reach for `Dialog` for everything else — an AlertDialog used for\n * an ordinary form is a control that traps a reader for no reason.\n *\n * There is deliberately no body slot. A question that needs body content is a\n * task, and a task is a `Dialog`; keeping the surface to a title, a\n * consequence line and two buttons is what stops this component from becoming\n * an undismissible form.\n *\n * Initial focus lands on **Cancel**, never on the action. A destructive\n * confirm that focuses \"Delete\" turns a reflexive Enter — from a reader who\n * has not finished the sentence — into a deletion. Reka does this in\n * `AlertDialogContent`; the test pins it, because it is the single behaviour\n * this component exists to guarantee.\n */\nconst props = withDefaults(\n defineProps<{\n /** Drive the alert from the host with `v-model:open`; omit it and the alert owns its own state. */\n open?: boolean | undefined;\n /** The accessible name, and the decision being asked for. State the consequence (\"Delete scene?\"), not \"Are you sure?\". */\n title: string;\n /** The consequence line, announced with the title rather than found later. Omit it only when the title already says everything. */\n description?: string;\n /** Paints the action in the destructive language. The verb in `labels.confirm` is what carries the meaning; this only adds emphasis to it. */\n destructive?: boolean;\n /**\n * The two button names, as any subset of `AlertDialogLabels` — what it\n * leaves out stays as the host's `provideLoomLabels` vocabulary left it,\n * and then as Loom's English.\n *\n * **`confirm` is meant to be set here on all but the rarest alert**, since\n * the verb is what tells a reader what the button does; `cancel` belongs in\n * the application's vocabulary, where it is written once.\n */\n labels?: LabelOverrides<AlertDialogLabels>;\n }>(),\n // `open: undefined` is load-bearing, not a redundant default — it is what\n // keeps the uncontrolled third state reachable past Vue's absent-Boolean\n // casting, and `optional()` in the template is the other half. Its docblock\n // carries the reasoning for both.\n {\n open: undefined,\n destructive: false,\n },\n);\n\ndefineEmits<{\n /** The reader chose the action. The alert does not close itself — the host decides, so a failed save can keep it open. */\n confirm: [];\n /** The reader backed out, by the cancel button or by Esc. */\n cancel: [];\n /** A close was requested. Fires alongside `confirm` and `cancel`, so a host driving `v-model:open` needs only this one. */\n \"update:open\": [value: boolean];\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"alertDialog\", ALERT_DIALOG_LABELS, () => props.labels);\n\n// The root renders no DOM node at all, so fallthrough attributes would be\n// dropped on the floor rather than landing anywhere. They go to the panel,\n// which is the only element this component reliably renders — there may be no\n// trigger at all when the host drives `open` itself.\n//\n// `class` is pulled out of that spread and merged through `cn()` instead:\n// spreading it alongside the panel's own `:class` only concatenates the two\n// lists, so a caller's width silently wins or loses depending on which utility\n// Tailwind happened to emit last.\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest: panelAttrs } = useSplitAttrs();\n\n// Reka wires `aria-describedby` to its own description id unconditionally, so\n// a panel rendered without a description ships a reference to an element that\n// does not exist. That is not cosmetic here: `role=\"alertdialog\"` earns its\n// keep by having the description announced with the name, and a dangling IDREF\n// announces nothing. Clearing the attribute is what removes it — fallthrough\n// attributes are merged after Reka's own, and Vue drops an attribute bound to\n// `undefined`. A caller's own `aria-describedby` still wins, because\n// `panelAttrs` is spread last.\nconst panelBindings = computed(() => ({\n ...(props.description ? {} : { \"aria-describedby\": undefined }),\n ...panelAttrs.value,\n}));\n</script>\n\n<template>\n <AlertDialogRoot v-bind=\"optional({ open })\" @update:open=\"$emit('update:open', $event)\">\n <!-- @slot The control that opens the alert. Optional — omit it and drive\n the alert entirely from the host with `v-model:open`. -->\n <AlertDialogTrigger v-if=\"$slots.trigger\" as-child>\n <slot name=\"trigger\" />\n </AlertDialogTrigger>\n\n <AlertDialogPortal>\n <!-- Same scrim as Dialog, and it is inert here: Reka's AlertDialogContent\n prevents both `pointerDownOutside` and `interactOutside`, so a click\n lands on nothing. That is the point — an accidental click at the edge\n of the screen must not be able to answer the question. -->\n <AlertDialogOverlay\n class=\"fixed inset-0 z-50 bg-foreground/70 data-[state=open]:animate-fade\"\n />\n <AlertDialogContent\n v-bind=\"panelBindings\"\n :data-destructive=\"destructive || undefined\"\n :class=\"\n cn(\n 'fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n // One width, and no `size` prop to vary it. A decision has one\n // shape; the wider panels exist on Dialog because an authoring\n // surface needs them, and there is no authoring surface here.\n 'w-[min(92vw,32rem)]',\n 'rounded-lg border border-border bg-popover p-6 text-popover-foreground shadow-lg outline-none',\n // Scoped to the open state, never unconditional. Reka's Presence\n // keeps closed content mounted until an animationend arrives, and a\n // mount-only animation never fires a second one — which here would\n // strand a full-screen, input-blocking overlay over a page with no\n // alert on it. Scoped, the closed element computes\n // `animation-name: none` and Presence unmounts it at once.\n 'data-[state=open]:animate-scale-in',\n attrs.class as string,\n )\n \"\n @escape-key-down=\"$emit('cancel')\"\n >\n <AlertDialogTitle class=\"text-base font-semibold\">{{ title }}</AlertDialogTitle>\n <AlertDialogDescription v-if=\"description\" class=\"mt-1 text-sm text-muted-foreground\">\n {{ description }}\n </AlertDialogDescription>\n\n <div class=\"mt-6 flex items-center justify-end gap-2\">\n <!-- Cancel is first in the DOM as well as first visually, so the\n order a screen reader reads matches the order the eye does. It is\n also the element Reka focuses on open. -->\n <AlertDialogCancel\n :class=\"buttonVariants({ variant: 'subtle' })\"\n @click=\"$emit('cancel')\"\n >\n {{ text.cancel }}\n </AlertDialogCancel>\n <!-- The destructive paint is emphasis, not the signal. What tells a\n reader this button destroys something is the verb in its label,\n which is why `labels.confirm` is meant to be replaced rather than\n left as \"Confirm\". -->\n <AlertDialogAction\n :class=\"buttonVariants({ variant: destructive ? 'destructive' : 'primary' })\"\n @click=\"$emit('confirm')\"\n >\n {{ text.confirm }}\n </AlertDialogAction>\n </div>\n </AlertDialogContent>\n </AlertDialogPortal>\n </AlertDialogRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;AAkCA,IAAa,sBAAyC;CACpD,SAAS;CACT,QAAQ;AACV;;;;;;;;;;;;;;;;;;;;;;;EAiDA,MAAM,QAAQ;EA2Cd,MAAM,OAAO,UAAU,eAAe,2BAA2B,MAAM,MAAM;EAY7E,MAAM,EAAE,OAAO,MAAM,eAAe,cAAc;EAUlD,MAAM,gBAAgB,gBAAgB;GACpC,GAAI,MAAM,cAAc,CAAC,IAAI,EAAE,oBAAoB,KAAA,EAAU;GAC7D,GAAG,WAAW;EAChB,EAAE;;GAIA,OAAA,UAAA,GAAA,YAkEkB,MAAA,eAAA,GAlElB,WAAyB,MAkEP,QAAA,CAlEe,CAAA,EAAA,MAAG,QAAA,KAAI,CAAA,GAAA,EAAM,iBAAW,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,eAAgB,MAAM,GAAA,CAAA,GAAA;IAGpF,SAAA,cAEqB,CAFKC,KAAAA,OAAO,WAAjC,UAAA,GAAA,YAEqB,MAAA,kBAAA,GAAA;;KAFqB,YAAA;;KACxC,SAAA,cAAuB,CAAvB,WAAuB,KAAA,QAAA,SAAA,CAAA,CAAA;;IAGzB,CAAA,KAAA,mBAAA,IAAA,IAAA,GAAA,YA0DoB,MAAA,iBAAA,GAAA,MAAA;KArDlB,SAAA,cAEE,CAFF,YAEE,MAAA,kBAAA,GAAA,EADA,OAAM,qEAAoE,CAAA,GAE5E,YAiDqB,MAAA,kBAAA,GAjDrB,WACU,cAgDW,OAhDE;MACpB,oBAAkB,QAAA,eAAe,KAAA;MACjC,OAAkB,MAAA,EAAA,CAAE,CAAA,iEAAA,uBAAA,iGAAA,sCAAu8B,MAAA,KAAA,CAAK,CAAC,KAAA;MAkBj+B,iBAAe,OAAA,OAAA,OAAA,MAAA,WAAED,KAAAA,MAAK,QAAA;;MAEvB,SAAA,cAAgF;OAAhF,YAAgF,MAAA,gBAAA,GAAA,EAA9D,OAAM,0BAAyB,GAAA;QAAC,SAAA,cAAW,CAAR,gBAAA,gBAAA,QAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;;OAC5B,QAAA,eAA9B,UAAA,GAAA,YAEyB,MAAA,sBAAA,GAAA;;QAFkB,OAAM;;QAC/C,SAAA,cAAiB,CAAd,gBAAA,gBAAA,QAAA,WAAW,GAAA,CAAA,CAAA,CAAA;;;OAGhB,mBAoBM,OApBN,YAoBM,CAhBJ,YAKoB,MAAA,iBAAA,GAAA;QAJjB,OAAK,eAAE,MAAA,cAAA,CAAc,CAAA,EAAA,SAAA,SAAA,CAAA,CAAA;QACrB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,QAAA;;QAEb,SAAA,cAAiB,CAAd,gBAAA,gBAAA,MAAA,IAAA,CAAI,CAAC,MAAM,GAAA,CAAA,CAAA,CAAA;;OAMhB,GAAA,GAAA,CAAA,OAAA,CAAA,GAAA,YAKoB,MAAA,iBAAA,GAAA;QAJjB,OAAK,eAAE,MAAA,cAAA,CAAc,CAAA,EAAA,SAAY,QAAA,cAAW,gBAAA,UAAA,CAAA,CAAA;QAC5C,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,SAAA;;QAEb,SAAA,cAAkB,CAAf,gBAAA,gBAAA,MAAA,IAAA,CAAI,CAAC,OAAO,GAAA,CAAA,CAAA,CAAA"}
@@ -1,7 +1,7 @@
1
- import Avatar_vue_vue_type_script_setup_true_lang_default from "./Avatar.vue_vue_type_script_setup_true_lang.js";
1
+ import Avatar_vue_vue_type_script_setup_true_lang_default, { avatarVariants } from "./Avatar.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/primitives/Avatar/Avatar.vue
3
3
  var Avatar_default = Avatar_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion
5
- export { Avatar_default as default };
5
+ export { avatarVariants, Avatar_default as default };
6
6
 
7
7
  //# sourceMappingURL=Avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/primitives/Avatar/Avatar.vue"],"sourcesContent":["<script lang=\"ts\">\n/** Control height, and text size for the initials fallback. */\nexport type AvatarSize = \"sm\" | \"md\" | \"lg\";\n</script>\n\n<script setup lang=\"ts\">\nimport { AvatarRoot, AvatarImage, AvatarFallback } from \"reka-ui\";\nimport { cn } from \"../../lib/cn\";\n\n/**\n * Avatar — a user or agent's picture, with a graceful initials fallback for\n * no `src`, a broken URL, or a still-loading image. Built on Reka UI's\n * Avatar: the image only paints once it has actually finished loading, so\n * the fallback stays visible the whole time until then — first paint is\n * either the real photo or the initials, never a broken-image icon.\n */\nwithDefaults(\n defineProps<{\n /** Image URL. Omit it to render the fallback outright. */\n src?: string;\n /** Accessible name for the photo — required on `AvatarImage` so a screen reader announces who it is, not just that an image loaded. */\n alt?: string;\n /** Initials to show while there is no image, or once one has failed — computed by the caller, never derived from `alt` here. */\n fallback?: string;\n /** Control height. */\n size?: AvatarSize;\n }>(),\n {\n alt: \"\",\n size: \"md\",\n },\n);\n</script>\n\n<template>\n <AvatarRoot\n :class=\"\n cn(\n 'relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted text-muted-foreground select-none',\n size === 'sm' && 'h-8 w-8 text-xs',\n size === 'md' && 'h-10 w-10 text-sm',\n size === 'lg' && 'h-12 w-12 text-base',\n )\n \"\n >\n <!-- Reka paints AvatarImage only once the photo has loaded, so scale-in\n plays exactly on that swap-in — a gentle settle over the fallback. -->\n <AvatarImage\n v-if=\"src\"\n :src=\"src\"\n :alt=\"alt\"\n class=\"h-full w-full animate-scale-in object-cover\"\n />\n <AvatarFallback class=\"font-medium\">{{ fallback }}</AvatarFallback>\n </AvatarRoot>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/primitives/Avatar/Avatar.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/** Control height, and the text size the initials fallback prints at. */\nexport type AvatarSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n/** A circle, or a rounded square tile. */\nexport type AvatarShape = \"circle\" | \"square\";\n\n/**\n * Which visual treatment the avatar receives. `accent` applies the accent\n * colour as a rim, signalling a second semantic category distinct from the\n * default — a different role, origin, or mode.\n */\nexport type AvatarVariant = \"default\" | \"accent\";\n\nexport const avatarVariants = cva(\n \"relative inline-flex shrink-0 items-center justify-center overflow-hidden select-none\",\n {\n // `satisfies` keeps the two halves honest: the unions above are the names a\n // consumer imports and the documentation prints, the maps below are the\n // classes. Adding a member to one and not the other stops compiling — which\n // is what the three inline `size === '…' &&` conditionals this replaced\n // could not do, and the reason five sizes could not stay written that way.\n variants: {\n size: {\n // `text-xs` twice, deliberately. It is the smallest step Tailwind's own\n // scale has, and the step below it — Loom's `text-micro` — is a name\n // tailwind-merge classifies as a text *colour* rather than a size, so\n // `cn()` drops it the moment the force map adds `text-muted-foreground`\n // after it. Two initials at 12px still fit inside 24px.\n xs: \"h-6 w-6 text-xs\",\n sm: \"h-8 w-8 text-xs\",\n md: \"h-10 w-10 text-sm\",\n lg: \"h-12 w-12 text-base\",\n xl: \"h-16 w-16 text-lg\",\n } satisfies Record<AvatarSize, string>,\n force: {\n default: \"bg-muted text-muted-foreground\",\n // The accent rim. Two signals, not one: the rim's *presence* is what a\n // reader who cannot resolve the hue still sees — a default avatar has no\n // edge at all — and the hidden `accentLabel` is what a reader who sees\n // no avatar hears. The corner is left alone on purpose, because the\n // corner is Indicator's: a presence dot pinned there would land on top\n // of anything this component drew.\n accent: \"border-2 border-accent bg-accent-muted text-accent\",\n } satisfies Record<AvatarVariant, string>,\n },\n defaultVariants: { size: \"md\", force: \"default\" },\n },\n);\n\n/**\n * A square avatar's corner radius, one value per size rather than the control\n * radius throughout. `rounded-md` is calibrated against a ~36px control; on a\n * 24px tile it is a third of the side, where a milled fillet stops reading as\n * a corner and starts reading as a blob, and on a 64px one it has almost\n * disappeared. Stepping it holds the corner between a sixth and a quarter of\n * the side at every size — the band the control radius already sits in — which\n * is the nesting law applied to a tile whose \"padding\" is its own edge.\n */\nconst SQUARE_RADIUS = {\n xs: \"rounded-sm\",\n sm: \"rounded-md\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n} satisfies Record<AvatarSize, string>;\n\n/**\n * The rounding for one size and shape. A circle is one value at every size; a\n * square is not, which is why the radius cannot live in the `cva` map beside\n * the heights. Kept off the public surface deliberately: a consumer wanting an\n * avatar-shaped tile should render an `Avatar`, not reassemble one.\n */\nfunction avatarRadius(size: AvatarSize, shape: AvatarShape): string {\n return shape === \"circle\" ? \"rounded-full\" : SQUARE_RADIUS[size];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { AvatarRoot, AvatarImage, AvatarFallback } from \"reka-ui\";\nimport { cn } from \"../../lib/cn\";\nimport { useSplitAttrs } from \"../../lib/attrs\";\n\n/**\n * Avatar — a user's picture, with a graceful initials fallback for\n * no `src`, a broken URL, or a still-loading image. Built on Reka UI's\n * Avatar: the image only paints once it has actually finished loading, so\n * the fallback stays visible the whole time until then — first paint is\n * either the real photo or the initials, never a broken-image icon.\n *\n * Two neighbours are worth naming. Several faces standing for one thing — the\n * people on a task, the agents on a run — are an `AvatarGroup`, which owns the\n * overlap, the stacking order and the \"+3\" so a row of them is one object to a\n * screen reader rather than N unrelated images. Anything pinned onto the\n * avatar's corner — a presence dot, an unread count — is an `Indicator`\n * wrapped around it; this component deliberately draws nothing there.\n */\nconst props = withDefaults(\n defineProps<{\n /** Image URL. Omit it to render the fallback outright. */\n src?: string;\n /** Accessible name for the photo — required on `AvatarImage` so a screen reader announces who it is, not just that an image loaded. */\n alt?: string;\n /** Initials to show while there is no image, or once one has failed — computed by the caller, never derived from `alt` here. */\n fallback?: string;\n /** Control height. */\n size?: AvatarSize;\n /** A circle, or a rounded square tile. Square suits a subject a circle would misdescribe — an organisation, a project, a repository — and takes a radius that steps with the size rather than one fixed value. */\n shape?: AvatarShape;\n /** Which visual treatment the avatar receives. `accent` applies the accent rim and `accentLabel` for a screen reader, so the distinction never rests on the hue alone. */\n variant?: AvatarVariant;\n /** What a screen reader announces after the name of an `accent` avatar. Localise it. Set it empty when something outside already says so — `AvatarGroup` does, because each row item composes its own name — and nothing is added for a `default` avatar either way. */\n accentLabel?: string;\n }>(),\n {\n alt: \"\",\n size: \"md\",\n shape: \"circle\",\n variant: \"default\",\n accentLabel: \"\",\n },\n);\n\n// One rendered node, and it is the right home for every fallthrough attribute\n// — but `class` still goes the long way round, through `cn()`. Vue's own merge\n// only concatenates, so the `bg-subtle` an AvatarGroup paints its overflow tile\n// with would win or lose against this root's `bg-muted` depending on the order\n// Tailwind happened to emit the two rules in, rather than on intent.\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest } = useSplitAttrs();\n\nconst radius = computed(() => avatarRadius(props.size, props.shape));\n</script>\n\n<template>\n <AvatarRoot\n v-bind=\"rest\"\n :data-variant=\"variant\"\n :class=\"cn(avatarVariants({ size, force: variant }), radius, attrs.class as string)\"\n >\n <!-- Reka paints AvatarImage only once the photo has loaded, so scale-in\n plays exactly on that swap-in — a gentle settle over the fallback. -->\n <AvatarImage\n v-if=\"src\"\n :src=\"src\"\n :alt=\"alt\"\n class=\"h-full w-full animate-scale-in object-cover\"\n />\n <AvatarFallback class=\"font-medium\">{{ fallback }}</AvatarFallback>\n <!-- The half of the accent signal a rim cannot carry. It sits after the\n image so it is announced as a qualifier on the name rather than in\n place of it, and it is dropped entirely for an empty `accentLabel`: a\n wrapper that has already worked the qualifier into its own name would\n otherwise leave a second copy of it in the tree. -->\n <span v-if=\"variant === 'accent' && accentLabel\" class=\"sr-only\">{{ accentLabel }}</span>\n </AvatarRoot>\n</template>\n"],"mappings":""}
@@ -1,5 +1,17 @@
1
- /** Control height, and text size for the initials fallback. */
2
- export type AvatarSize = "sm" | "md" | "lg";
1
+ /** Control height, and the text size the initials fallback prints at. */
2
+ export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
3
+ /** A circle, or a rounded square tile. */
4
+ export type AvatarShape = "circle" | "square";
5
+ /**
6
+ * Which visual treatment the avatar receives. `accent` applies the accent
7
+ * colour as a rim, signalling a second semantic category distinct from the
8
+ * default — a different role, origin, or mode.
9
+ */
10
+ export type AvatarVariant = "default" | "accent";
11
+ export declare const avatarVariants: (props?: ({
12
+ size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
13
+ force?: "accent" | "default" | null | undefined;
14
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
3
15
  declare const _default: typeof __VLS_export;
4
16
  export default _default;
5
17
  declare const __VLS_export: import("vue").DefineComponent<{
@@ -11,6 +23,12 @@ declare const __VLS_export: import("vue").DefineComponent<{
11
23
  fallback?: string;
12
24
  /** Control height. */
13
25
  size?: AvatarSize;
26
+ /** A circle, or a rounded square tile. Square suits a subject a circle would misdescribe — an organisation, a project, a repository — and takes a radius that steps with the size rather than one fixed value. */
27
+ shape?: AvatarShape;
28
+ /** Which visual treatment the avatar receives. `accent` applies the accent rim and `accentLabel` for a screen reader, so the distinction never rests on the hue alone. */
29
+ variant?: AvatarVariant;
30
+ /** What a screen reader announces after the name of an `accent` avatar. Localise it. Set it empty when something outside already says so — `AvatarGroup` does, because each row item composes its own name — and nothing is added for a `default` avatar either way. */
31
+ accentLabel?: string;
14
32
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
15
33
  /** Image URL. Omit it to render the fallback outright. */
16
34
  src?: string;
@@ -20,8 +38,17 @@ declare const __VLS_export: import("vue").DefineComponent<{
20
38
  fallback?: string;
21
39
  /** Control height. */
22
40
  size?: AvatarSize;
41
+ /** A circle, or a rounded square tile. Square suits a subject a circle would misdescribe — an organisation, a project, a repository — and takes a radius that steps with the size rather than one fixed value. */
42
+ shape?: AvatarShape;
43
+ /** Which visual treatment the avatar receives. `accent` applies the accent rim and `accentLabel` for a screen reader, so the distinction never rests on the hue alone. */
44
+ variant?: AvatarVariant;
45
+ /** What a screen reader announces after the name of an `accent` avatar. Localise it. Set it empty when something outside already says so — `AvatarGroup` does, because each row item composes its own name — and nothing is added for a `default` avatar either way. */
46
+ accentLabel?: string;
23
47
  }> & Readonly<{}>, {
24
- alt: string;
25
48
  size: AvatarSize;
49
+ shape: AvatarShape;
50
+ variant: AvatarVariant;
51
+ alt: string;
52
+ accentLabel: string;
26
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
54
  //# sourceMappingURL=Avatar.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Avatar/Avatar.vue"],"names":[],"mappings":"AA+DA,+DAA+D;AAC/D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;wBACvB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IASd,0DAA0D;UACpD,MAAM;IACZ,uIAAuI;UACjI,MAAM;IACZ,gIAAgI;eACrH,MAAM;IACjB,sBAAsB;WACf,UAAU;;IAPjB,0DAA0D;UACpD,MAAM;IACZ,uIAAuI;UACjI,MAAM;IACZ,gIAAgI;eACrH,MAAM;IACjB,sBAAsB;WACf,UAAU;;SAJX,MAAM;UAIL,UAAU;6EA2GjB,CAAC"}
1
+ {"version":3,"file":"Avatar.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Avatar/Avatar.vue"],"names":[],"mappings":"AA2KA,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1D,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9C;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD,eAAO,MAAM,cAAc;;;8EAkC1B,CAAC;wBA4BmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAgBd,0DAA0D;UACpD,MAAM;IACZ,uIAAuI;UACjI,MAAM;IACZ,gIAAgI;eACrH,MAAM;IACjB,sBAAsB;WACf,UAAU;IACjB,kNAAkN;YAC1M,WAAW;IACnB,0KAA0K;cAChK,aAAa;IACvB,wQAAwQ;kBAC1P,MAAM;;IAbpB,0DAA0D;UACpD,MAAM;IACZ,uIAAuI;UACjI,MAAM;IACZ,gIAAgI;eACrH,MAAM;IACjB,sBAAsB;WACf,UAAU;IACjB,kNAAkN;YAC1M,WAAW;IACnB,0KAA0K;cAChK,aAAa;IACvB,wQAAwQ;kBAC1P,MAAM;;UANb,UAAU;WAET,WAAW;aAET,aAAa;SARjB,MAAM;iBAUE,MAAM;6EA4HpB,CAAC"}