@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
@@ -1,33 +1,114 @@
1
1
  import { cn } from "../../lib/cn.js";
2
- import { createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
2
+ import { useSplitAttrs } from "../../lib/attrs.js";
3
+ import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, toDisplayString, unref, withCtx } from "vue";
3
4
  import { AvatarFallback, AvatarImage, AvatarRoot } from "reka-ui";
5
+ import { cva } from "class-variance-authority";
4
6
  //#region src/primitives/Avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
7
+ /**
8
+ * Avatar — a user's picture, with a graceful initials fallback for
9
+ * no `src`, a broken URL, or a still-loading image. Built on Reka UI's
10
+ * Avatar: the image only paints once it has actually finished loading, so
11
+ * the fallback stays visible the whole time until then — first paint is
12
+ * either the real photo or the initials, never a broken-image icon.
13
+ *
14
+ * Two neighbours are worth naming. Several faces standing for one thing — the
15
+ * people on a task, the agents on a run — are an `AvatarGroup`, which owns the
16
+ * overlap, the stacking order and the "+3" so a row of them is one object to a
17
+ * screen reader rather than N unrelated images. Anything pinned onto the
18
+ * avatar's corner — a presence dot, an unread count — is an `Indicator`
19
+ * wrapped around it; this component deliberately draws nothing there.
20
+ */
21
+ var _hoisted_1 = {
22
+ key: 1,
23
+ class: "sr-only"
24
+ };
25
+ var avatarVariants = cva("relative inline-flex shrink-0 items-center justify-center overflow-hidden select-none", {
26
+ variants: {
27
+ size: {
28
+ xs: "h-6 w-6 text-xs",
29
+ sm: "h-8 w-8 text-xs",
30
+ md: "h-10 w-10 text-sm",
31
+ lg: "h-12 w-12 text-base",
32
+ xl: "h-16 w-16 text-lg"
33
+ },
34
+ force: {
35
+ default: "bg-muted text-muted-foreground",
36
+ accent: "border-2 border-accent bg-accent-muted text-accent"
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ size: "md",
41
+ force: "default"
42
+ }
43
+ });
44
+ /**
45
+ * A square avatar's corner radius, one value per size rather than the control
46
+ * radius throughout. `rounded-md` is calibrated against a ~36px control; on a
47
+ * 24px tile it is a third of the side, where a milled fillet stops reading as
48
+ * a corner and starts reading as a blob, and on a 64px one it has almost
49
+ * disappeared. Stepping it holds the corner between a sixth and a quarter of
50
+ * the side at every size — the band the control radius already sits in — which
51
+ * is the nesting law applied to a tile whose "padding" is its own edge.
52
+ */
53
+ var SQUARE_RADIUS = {
54
+ xs: "rounded-sm",
55
+ sm: "rounded-md",
56
+ md: "rounded-md",
57
+ lg: "rounded-lg",
58
+ xl: "rounded-xl"
59
+ };
60
+ /**
61
+ * The rounding for one size and shape. A circle is one value at every size; a
62
+ * square is not, which is why the radius cannot live in the `cva` map beside
63
+ * the heights. Kept off the public surface deliberately: a consumer wanting an
64
+ * avatar-shaped tile should render an `Avatar`, not reassemble one.
65
+ */
66
+ function avatarRadius(size, shape) {
67
+ return shape === "circle" ? "rounded-full" : SQUARE_RADIUS[size];
68
+ }
5
69
  var Avatar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
70
+ inheritAttrs: false,
6
71
  __name: "Avatar",
7
72
  props: {
8
73
  src: {},
9
74
  alt: { default: "" },
10
75
  fallback: {},
11
- size: { default: "md" }
76
+ size: { default: "md" },
77
+ shape: { default: "circle" },
78
+ variant: { default: "default" },
79
+ accentLabel: { default: "" }
12
80
  },
13
81
  setup(__props) {
82
+ const props = __props;
83
+ const { attrs, rest } = useSplitAttrs();
84
+ const radius = computed(() => avatarRadius(props.size, props.shape));
14
85
  return (_ctx, _cache) => {
15
- return openBlock(), createBlock(unref(AvatarRoot), { class: normalizeClass(unref(cn)("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted text-muted-foreground select-none", __props.size === "sm" && "h-8 w-8 text-xs", __props.size === "md" && "h-10 w-10 text-sm", __props.size === "lg" && "h-12 w-12 text-base")) }, {
16
- default: withCtx(() => [__props.src ? (openBlock(), createBlock(unref(AvatarImage), {
17
- key: 0,
18
- src: __props.src,
19
- alt: __props.alt,
20
- class: "h-full w-full animate-scale-in object-cover"
21
- }, null, 8, ["src", "alt"])) : createCommentVNode("", true), createVNode(unref(AvatarFallback), { class: "font-medium" }, {
22
- default: withCtx(() => [createTextVNode(toDisplayString(__props.fallback), 1)]),
23
- _: 1
24
- })]),
86
+ return openBlock(), createBlock(unref(AvatarRoot), mergeProps(unref(rest), {
87
+ "data-variant": __props.variant,
88
+ class: unref(cn)(unref(avatarVariants)({
89
+ size: __props.size,
90
+ force: __props.variant
91
+ }), radius.value, unref(attrs).class)
92
+ }), {
93
+ default: withCtx(() => [
94
+ __props.src ? (openBlock(), createBlock(unref(AvatarImage), {
95
+ key: 0,
96
+ src: __props.src,
97
+ alt: __props.alt,
98
+ class: "h-full w-full animate-scale-in object-cover"
99
+ }, null, 8, ["src", "alt"])) : createCommentVNode("", true),
100
+ createVNode(unref(AvatarFallback), { class: "font-medium" }, {
101
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.fallback), 1)]),
102
+ _: 1
103
+ }),
104
+ __props.variant === "accent" && __props.accentLabel ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(__props.accentLabel), 1)) : createCommentVNode("", true)
105
+ ]),
25
106
  _: 1
26
- }, 8, ["class"]);
107
+ }, 16, ["data-variant", "class"]);
27
108
  };
28
109
  }
29
110
  });
30
111
  //#endregion
31
- export { Avatar_vue_vue_type_script_setup_true_lang_default as default };
112
+ export { avatarVariants, Avatar_vue_vue_type_script_setup_true_lang_default as default };
32
113
 
33
114
  //# sourceMappingURL=Avatar.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.vue_vue_type_script_setup_true_lang.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":";;;;;;;;;;;;;;GAmCE,OAAA,UAAA,GAAA,YAmBa,MAAA,UAAA,GAAA,EAlBV,OAAK,eAAS,MAAA,EAAA,CAAE,CAAA,qIAAuJ,QAAA,SAAI,QAAA,mBAAwC,QAAA,SAAI,QAAA,qBAA0C,QAAA,SAAI,QAAA,qBAAA,CAAA,EAAA,GAAA;IAWtQ,SAAA,cAKE,CAJM,QAAA,OADR,UAAA,GAAA,YAKE,MAAA,WAAA,GAAA;;KAHC,KAAK,QAAA;KACL,KAAK,QAAA;KACN,OAAM;IAER,GAAA,MAAA,GAAA,CAAA,OAAA,KAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAAA,YAAmE,MAAA,cAAA,GAAA,EAAnD,OAAM,cAAa,GAAA;KAAC,SAAA,cAAc,CAAX,gBAAA,gBAAA,QAAA,QAAQ,GAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Avatar.vue_vue_type_script_setup_true_lang.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":";;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAa,iBAAiB,IAC5B,yFACA;CAME,UAAU;EACR,MAAM;GAMJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,OAAO;GACL,SAAS;GAOT,QAAQ;EACV;CACF;CACA,iBAAiB;EAAE,MAAM;EAAM,OAAO;CAAU;AAClD,CACF;;;;;;;;;;AAWA,IAAM,gBAAgB;CACpB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;;;;;;AAQA,SAAS,aAAa,MAAkB,OAA4B;CAClE,OAAO,UAAU,WAAW,iBAAiB,cAAc;AAC7D;;;;;;;;;;;;;;EAuBA,MAAM,QAAQ;EAgCd,MAAM,EAAE,OAAO,SAAS,cAAc;EAEtC,MAAM,SAAS,eAAe,aAAa,MAAM,MAAM,MAAM,KAAK,CAAC;;GAIjE,OAAA,UAAA,GAAA,YAoBa,MAAA,UAAA,GApBb,WACU,MAmBG,IAAA,GAnBC;IACX,gBAAc,QAAA;IACd,OAAO,MAAA,EAAA,CAAE,CAAC,MAAA,cAAA,CAAc,CAAA;KAAA,MAAG,QAAA;KAAI,OAAS,QAAA;IAAO,CAAA,GAAK,OAAA,OAAQ,MAAA,KAAA,CAAK,CAAC,KAAK;;IAIxE,SAAA,cAKE;KAJM,QAAA,OADR,UAAA,GAAA,YAKE,MAAA,WAAA,GAAA;;MAHC,KAAK,QAAA;MACL,KAAK,QAAA;MACN,OAAM;;KAER,YAAmE,MAAA,cAAA,GAAA,EAAnD,OAAM,cAAa,GAAA;MAAC,SAAA,cAAc,CAAX,gBAAA,gBAAA,QAAA,QAAQ,GAAA,CAAA,CAAA,CAAA;;;KAMnC,QAAA,YAAO,YAAiB,QAAA,eAApC,UAAA,GAAA,mBAAyF,QAAzF,YAAyF,gBAArB,QAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA"}
@@ -0,0 +1,7 @@
1
+ import AvatarGroup_vue_vue_type_script_setup_true_lang_default, { AVATAR_GROUP_LABELS } from "./AvatarGroup.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/AvatarGroup/AvatarGroup.vue
3
+ var AvatarGroup_default = AvatarGroup_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { AVATAR_GROUP_LABELS, AvatarGroup_default as default };
6
+
7
+ //# sourceMappingURL=AvatarGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarGroup.js","names":[],"sources":["../../../src/primitives/AvatarGroup/AvatarGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { AvatarShape, AvatarSize, AvatarVariant } from \"../Avatar/Avatar.vue\";\nimport type { LabelOf } from \"../../lib/labels\";\n\n/** One face in the row. */\nexport interface AvatarGroupItem {\n /** Image URL. Omit it and this face renders `fallback` instead. */\n src?: string;\n /** Who this face is. It is what a screen reader reads for this member, whether or not the image ever loads — so it is the field to fill in even when there is no photo. */\n alt?: string;\n /** Initials shown while there is no image, or once one has failed. */\n fallback?: string;\n /** Which variant this member uses. Defaults to the group's own `variant`, so a row that mixes members states it per member and a row of one kind states it once. */\n variant?: AvatarVariant;\n}\n\n/** The surface the row sits on, which the separating ring matches. */\nexport type AvatarGroupSurface = \"background\" | \"card\" | \"sunken\" | \"popover\";\n\n/**\n * The two sentences the row says that are not a member's own name.\n *\n * **`accent` is one key and not a name, a comma and a qualifier.** Where the\n * qualifier sits relative to the name, and whether a comma is what separates\n * them at all, is a property of the language — Loom joining `${who}, ${what}`\n * has already answered both, in English, for every host that translates the\n * two halves. The name arrives raw because it is the caller's own data rather\n * than anything Loom formatted, and the empty case arrives too: a face with no\n * `alt` and no `fallback` still carries the accent variant, and the accent\n * label alone is the honest reading of it.\n *\n * `overflow` takes the count for the reason every counted message here does —\n * \"3 more\" is a plural category English collapses and Russian does not.\n */\nexport interface AvatarGroupLabels {\n /** The counter tile at the end of the row, named for how many faces it stands in for. */\n readonly overflow: LabelOf<{ count: number }>;\n /** One member's whole name, with the accent qualifier already worked into it. `name` is empty when the member gave neither an `alt` nor a `fallback`. */\n readonly accent: LabelOf<{ name: 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 AVATAR_GROUP_LABELS: AvatarGroupLabels = {\n overflow: ({ count }) => `${String(count)} more`,\n accent: ({ name }) => (name ? `${name}, Accent` : \"Accent\"),\n};\n\n/**\n * How far each face tucks under the one before it — a quarter of its own width\n * at every size, so a row of `xs` avatars reads at the same density as a row of\n * `xl` ones. A fixed offset would look like a badly spaced flex row at the top\n * of the scale and swallow the initials at the bottom of it.\n */\nconst OVERLAP = {\n xs: \"-ml-1.5\",\n sm: \"-ml-2\",\n md: \"-ml-2.5\",\n lg: \"-ml-3\",\n xl: \"-ml-4\",\n} satisfies Record<AvatarSize, string>;\n\n/**\n * The ring that cuts each face out of the one it overlaps. Without it two\n * portraits of similar tone merge into one shape, so it is structural rather\n * than decorative — which is also why it has to be the colour of whatever\n * surrounds the row, something only the caller knows. The names are\n * Indicator's, for the same reason and with the same meaning.\n */\nconst SURFACE_RING = {\n background: \"ring-background\",\n card: \"ring-card\",\n sunken: \"ring-sunken\",\n popover: \"ring-popover\",\n} satisfies Record<AvatarGroupSurface, string>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Avatar from \"../Avatar/Avatar.vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport { useSplitAttrs } from \"../../lib/attrs\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\n/**\n * AvatarGroup — the faces on one thing, overlapped into a single row: the\n * people assigned to a task, the agents on a run, the members of a workspace.\n * Past `max` of them the rest collapse into a counter, so the row's width is\n * bounded by the layout rather than by how many people happen to be involved.\n *\n * Reach for a plain `Avatar` when there is one subject, and for a real list of\n * rows when the reader needs to *act* on the members — a stack of overlapping\n * portraits is an at-a-glance summary, not a control. Nothing here is\n * focusable or clickable on purpose: the moment a face has to be pressable it\n * wants a row, a menu or a set of chips, each of which can carry a name and a\n * keyboard path that a 40px circle cannot.\n *\n * To a screen reader the row is one object — a labelled list of members ending\n * in \"3 more\" — rather than N unrelated images. Each face is announced by its\n * `alt` and nothing else: the portrait itself is hidden from assistive\n * technology and the name supplied beside it, which is what keeps the reading\n * identical whether the photo loaded, failed, or was never given.\n */\nconst props = withDefaults(\n defineProps<{\n /** The members, in the order they are shown. The first is the one painted on top. */\n avatars: AvatarGroupItem[];\n /** How many faces render before the rest collapse into the counter. Values below 1 are treated as 1 — a row of nothing but \"+5\" identifies nobody. */\n max?: number;\n /** Height of every face in the row, and of the counter — one of `Avatar`'s five sizes, `xs` through `xl`. */\n size?: AvatarSize;\n /** `circle` or `square`, forwarded to every face so the row reads as one shape. */\n shape?: AvatarShape;\n /** `default` or `accent`, for members that do not name their own — set it to `accent` for a row where every member uses the accent variant. */\n variant?: AvatarVariant;\n /** The group's accessible name: \"Assignees\", \"Reviewers\", \"Members\". */\n label?: string;\n /** The surface the row sits on, so the ring separating the faces matches what surrounds them. */\n surface?: AvatarGroupSurface;\n /**\n * Names for the counter and for an accent member, as any subset of\n * `AvatarGroupLabels` — the rest stay as the host's `provideLoomLabels`\n * vocabulary left them, and then as Loom's English.\n *\n * The per-instance case is a row where \"more\" is the wrong word for what\n * was left out: three reviewers, three members, three files.\n */\n labels?: LabelOverrides<AvatarGroupLabels>;\n }>(),\n {\n max: 4,\n size: \"md\",\n shape: \"circle\",\n variant: \"default\",\n surface: \"background\",\n },\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(\"avatarGroup\", AVATAR_GROUP_LABELS, () => props.labels);\n\n// One rendered node, and it takes every fallthrough attribute — but `class`\n// goes through `cn()`, so a caller's `gap-1` can beat the row's own layout\n// utilities instead of tying with them on stylesheet order.\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest } = useSplitAttrs();\n\n/**\n * At least one face always renders. `max = 0` is the boundary that decides\n * this: a group collapsed to nothing but \"+5\" has spent an avatar row saying\n * only that some people exist, which is strictly less than one face and a\n * count would have said.\n */\nconst shown = computed(() => props.avatars.slice(0, Math.max(1, Math.trunc(props.max))));\n\n/** How many members the row did not have room for. Zero renders no counter at all. */\nconst hidden = computed(() => props.avatars.length - shown.value.length);\n\n/** What the counter prints. `+3` is the layout; the sentence below is the information. */\nconst printed = computed(() => `+${String(hidden.value)}`);\n\nconst overlap = computed(() => OVERLAP[props.size]);\n\n/** `ring-2` in the surface colour, on every face including the counter. */\nconst ring = computed(() => cn(\"ring-2\", SURFACE_RING[props.surface]));\n\n/**\n * What a screen reader reads for one member. The accent qualifier is composed\n * here rather than left to `Avatar`'s own hidden label, because the portrait\n * inside each item is `aria-hidden` — the item says the name once, in one\n * voice, whichever state the image is in.\n */\nfunction memberName(item: AvatarGroupItem): string {\n const who = (item.alt ?? item.fallback ?? \"\").trim();\n if ((item.variant ?? props.variant) !== \"accent\") return who;\n return text.value.accent({ name: who });\n}\n</script>\n\n<template>\n <!-- `role=\"list\"` on a div rather than a real `<ul>`, and the reason is the\n page this is documented on. VitePress styles `.vp-doc li + li` with a top\n margin and `.vp-doc ul` with a disc marker and a left indent, unlayered —\n and unlayered CSS beats every Tailwind utility, which all live in\n `@layer utilities`. A genuine list element here arrives bulleted, indented\n and stepping 8px downhill per face. The roles are the semantics; the\n elements were only ever carrying them.\n\n The explicit attributes sit before `v-bind`, so a caller who names the\n group with `aria-labelledby` instead of `label` keeps their own value\n rather than having an unset prop overwrite it. -->\n <div\n v-if=\"avatars.length > 0\"\n role=\"list\"\n :aria-label=\"label\"\n v-bind=\"rest\"\n :class=\"cn('flex items-center', attrs.class as string)\"\n >\n <!-- The first face on top, each later one tucked under it. `z-index` is not\n automatic on a flex row — painting order alone puts the *last* sibling\n over its neighbours, which reads as a stack dealt backwards — and it\n needs the positioned parent this span provides. -->\n <span\n v-for=\"(item, index) in shown\"\n :key=\"`${String(index)}-${item.src ?? item.fallback ?? ''}`\"\n role=\"listitem\"\n :style=\"{ zIndex: shown.length - index }\"\n :class=\"cn('relative', index > 0 && overlap)\"\n >\n <!-- `accent-label` is cleared because the item beside it has already\n worked the qualifier into one name; left at its default the row would\n carry two copies of the accent label per accent member. -->\n <Avatar\n aria-hidden=\"true\"\n accent-label=\"\"\n v-bind=\"optional({ src: item.src, alt: item.alt, fallback: item.fallback })\"\n :size=\"size\"\n :shape=\"shape\"\n :variant=\"item.variant ?? variant\"\n :class=\"ring\"\n />\n <span class=\"sr-only\">{{ memberName(item) }}</span>\n </span>\n\n <!-- The counter is a face-shaped tile rather than a shape of its own, so\n the row keeps one rhythm: same size, same corner, same ring, and the\n neutral well instead of a portrait's fill so it never reads as a\n person. It sits under everything, at the back of the stack. -->\n <span v-if=\"hidden > 0\" role=\"listitem\" :style=\"{ zIndex: 0 }\" :class=\"cn('relative', overlap)\">\n <Avatar\n aria-hidden=\"true\"\n :fallback=\"printed\"\n :size=\"size\"\n :shape=\"shape\"\n :class=\"cn(ring, 'bg-subtle text-subtle-foreground tabular')\"\n />\n <span class=\"sr-only\">{{ text.overflow({ count: hidden }) }}</span>\n </span>\n </div>\n</template>\n"],"mappings":""}
@@ -0,0 +1,104 @@
1
+ import { type LabelOverrides } from "../../lib/labels";
2
+ import type { AvatarShape, AvatarSize, AvatarVariant } from "../Avatar/Avatar.vue";
3
+ import type { LabelOf } from "../../lib/labels";
4
+ /** One face in the row. */
5
+ export interface AvatarGroupItem {
6
+ /** Image URL. Omit it and this face renders `fallback` instead. */
7
+ src?: string;
8
+ /** Who this face is. It is what a screen reader reads for this member, whether or not the image ever loads — so it is the field to fill in even when there is no photo. */
9
+ alt?: string;
10
+ /** Initials shown while there is no image, or once one has failed. */
11
+ fallback?: string;
12
+ /** Which variant this member uses. Defaults to the group's own `variant`, so a row that mixes members states it per member and a row of one kind states it once. */
13
+ variant?: AvatarVariant;
14
+ }
15
+ /** The surface the row sits on, which the separating ring matches. */
16
+ export type AvatarGroupSurface = "background" | "card" | "sunken" | "popover";
17
+ /**
18
+ * The two sentences the row says that are not a member's own name.
19
+ *
20
+ * **`accent` is one key and not a name, a comma and a qualifier.** Where the
21
+ * qualifier sits relative to the name, and whether a comma is what separates
22
+ * them at all, is a property of the language — Loom joining `${who}, ${what}`
23
+ * has already answered both, in English, for every host that translates the
24
+ * two halves. The name arrives raw because it is the caller's own data rather
25
+ * than anything Loom formatted, and the empty case arrives too: a face with no
26
+ * `alt` and no `fallback` still carries the accent variant, and the accent
27
+ * label alone is the honest reading of it.
28
+ *
29
+ * `overflow` takes the count for the reason every counted message here does —
30
+ * "3 more" is a plural category English collapses and Russian does not.
31
+ */
32
+ export interface AvatarGroupLabels {
33
+ /** The counter tile at the end of the row, named for how many faces it stands in for. */
34
+ readonly overflow: LabelOf<{
35
+ count: number;
36
+ }>;
37
+ /** One member's whole name, with the accent qualifier already worked into it. `name` is empty when the member gave neither an `alt` nor a `fallback`. */
38
+ readonly accent: LabelOf<{
39
+ name: string;
40
+ }>;
41
+ }
42
+ /**
43
+ * Loom's English, co-located with the component so it tree-shakes with it, and
44
+ * exported so a host can build a partial vocabulary against the real thing.
45
+ */
46
+ export declare const AVATAR_GROUP_LABELS: AvatarGroupLabels;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ declare const __VLS_export: import("vue").DefineComponent<{
50
+ /** The members, in the order they are shown. The first is the one painted on top. */
51
+ avatars: AvatarGroupItem[];
52
+ /** How many faces render before the rest collapse into the counter. Values below 1 are treated as 1 — a row of nothing but "+5" identifies nobody. */
53
+ max?: number;
54
+ /** Height of every face in the row, and of the counter — one of `Avatar`'s five sizes, `xs` through `xl`. */
55
+ size?: AvatarSize;
56
+ /** `circle` or `square`, forwarded to every face so the row reads as one shape. */
57
+ shape?: AvatarShape;
58
+ /** `default` or `accent`, for members that do not name their own — set it to `accent` for a row where every member uses the accent variant. */
59
+ variant?: AvatarVariant;
60
+ /** The group's accessible name: "Assignees", "Reviewers", "Members". */
61
+ label?: string;
62
+ /** The surface the row sits on, so the ring separating the faces matches what surrounds them. */
63
+ surface?: AvatarGroupSurface;
64
+ /**
65
+ * Names for the counter and for an accent member, as any subset of
66
+ * `AvatarGroupLabels` — the rest stay as the host's `provideLoomLabels`
67
+ * vocabulary left them, and then as Loom's English.
68
+ *
69
+ * The per-instance case is a row where "more" is the wrong word for what
70
+ * was left out: three reviewers, three members, three files.
71
+ */
72
+ labels?: LabelOverrides<AvatarGroupLabels>;
73
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
74
+ /** The members, in the order they are shown. The first is the one painted on top. */
75
+ avatars: AvatarGroupItem[];
76
+ /** How many faces render before the rest collapse into the counter. Values below 1 are treated as 1 — a row of nothing but "+5" identifies nobody. */
77
+ max?: number;
78
+ /** Height of every face in the row, and of the counter — one of `Avatar`'s five sizes, `xs` through `xl`. */
79
+ size?: AvatarSize;
80
+ /** `circle` or `square`, forwarded to every face so the row reads as one shape. */
81
+ shape?: AvatarShape;
82
+ /** `default` or `accent`, for members that do not name their own — set it to `accent` for a row where every member uses the accent variant. */
83
+ variant?: AvatarVariant;
84
+ /** The group's accessible name: "Assignees", "Reviewers", "Members". */
85
+ label?: string;
86
+ /** The surface the row sits on, so the ring separating the faces matches what surrounds them. */
87
+ surface?: AvatarGroupSurface;
88
+ /**
89
+ * Names for the counter and for an accent member, as any subset of
90
+ * `AvatarGroupLabels` — the rest stay as the host's `provideLoomLabels`
91
+ * vocabulary left them, and then as Loom's English.
92
+ *
93
+ * The per-instance case is a row where "more" is the wrong word for what
94
+ * was left out: three reviewers, three members, three files.
95
+ */
96
+ labels?: LabelOverrides<AvatarGroupLabels>;
97
+ }> & Readonly<{}>, {
98
+ size: AvatarSize;
99
+ max: number;
100
+ shape: AvatarShape;
101
+ variant: AvatarVariant;
102
+ surface: AvatarGroupSurface;
103
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
104
+ //# sourceMappingURL=AvatarGroup.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/AvatarGroup/AvatarGroup.vue"],"names":[],"mappings":"AA6PA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,2BAA2B;AAC3B,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2KAA2K;IAC3K,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oKAAoK;IACpK,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9E;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,iBAAiB;IAChC,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9C,yJAAyJ;IACzJ,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5C;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAGjC,CAAC;wBA6BmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAqBd,qFAAqF;aAC5E,eAAe,EAAE;IAC1B,sJAAsJ;UAChJ,MAAM;IACZ,6GAA6G;WACtG,UAAU;IACjB,mFAAmF;YAC3E,WAAW;IACnB,+IAA+I;cACrI,aAAa;IACvB,wEAAwE;YAChE,MAAM;IACd,iGAAiG;cACvF,kBAAkB;IAC5B;;;;;;;OAOG;aACM,cAAc,CAAC,iBAAiB,CAAC;;IAtB1C,qFAAqF;aAC5E,eAAe,EAAE;IAC1B,sJAAsJ;UAChJ,MAAM;IACZ,6GAA6G;WACtG,UAAU;IACjB,mFAAmF;YAC3E,WAAW;IACnB,+IAA+I;cACrI,aAAa;IACvB,wEAAwE;YAChE,MAAM;IACd,iGAAiG;cACvF,kBAAkB;IAC5B;;;;;;;OAOG;aACM,cAAc,CAAC,iBAAiB,CAAC;;UAjBnC,UAAU;SAFX,MAAM;WAIJ,WAAW;aAET,aAAa;aAIb,kBAAkB;6EAiL5B,CAAC"}
@@ -0,0 +1,139 @@
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 Avatar_default from "../Avatar/Avatar.js";
6
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, toDisplayString, unref } from "vue";
7
+ //#region src/primitives/AvatarGroup/AvatarGroup.vue?vue&type=script&setup=true&lang.ts
8
+ var _hoisted_1 = ["aria-label"];
9
+ var _hoisted_2 = { class: "sr-only" };
10
+ var _hoisted_3 = { class: "sr-only" };
11
+ /**
12
+ * Loom's English, co-located with the component so it tree-shakes with it, and
13
+ * exported so a host can build a partial vocabulary against the real thing.
14
+ */
15
+ var AVATAR_GROUP_LABELS = {
16
+ overflow: ({ count }) => `${String(count)} more`,
17
+ accent: ({ name }) => name ? `${name}, Accent` : "Accent"
18
+ };
19
+ /**
20
+ * How far each face tucks under the one before it — a quarter of its own width
21
+ * at every size, so a row of `xs` avatars reads at the same density as a row of
22
+ * `xl` ones. A fixed offset would look like a badly spaced flex row at the top
23
+ * of the scale and swallow the initials at the bottom of it.
24
+ */
25
+ var OVERLAP = {
26
+ xs: "-ml-1.5",
27
+ sm: "-ml-2",
28
+ md: "-ml-2.5",
29
+ lg: "-ml-3",
30
+ xl: "-ml-4"
31
+ };
32
+ /**
33
+ * The ring that cuts each face out of the one it overlaps. Without it two
34
+ * portraits of similar tone merge into one shape, so it is structural rather
35
+ * than decorative — which is also why it has to be the colour of whatever
36
+ * surrounds the row, something only the caller knows. The names are
37
+ * Indicator's, for the same reason and with the same meaning.
38
+ */
39
+ var SURFACE_RING = {
40
+ background: "ring-background",
41
+ card: "ring-card",
42
+ sunken: "ring-sunken",
43
+ popover: "ring-popover"
44
+ };
45
+ var AvatarGroup_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
46
+ inheritAttrs: false,
47
+ __name: "AvatarGroup",
48
+ props: {
49
+ avatars: {},
50
+ max: { default: 4 },
51
+ size: { default: "md" },
52
+ shape: { default: "circle" },
53
+ variant: { default: "default" },
54
+ label: {},
55
+ surface: { default: "background" },
56
+ labels: {}
57
+ },
58
+ setup(__props) {
59
+ const props = __props;
60
+ const text = useLabels("avatarGroup", AVATAR_GROUP_LABELS, () => props.labels);
61
+ const { attrs, rest } = useSplitAttrs();
62
+ /**
63
+ * At least one face always renders. `max = 0` is the boundary that decides
64
+ * this: a group collapsed to nothing but "+5" has spent an avatar row saying
65
+ * only that some people exist, which is strictly less than one face and a
66
+ * count would have said.
67
+ */
68
+ const shown = computed(() => props.avatars.slice(0, Math.max(1, Math.trunc(props.max))));
69
+ /** How many members the row did not have room for. Zero renders no counter at all. */
70
+ const hidden = computed(() => props.avatars.length - shown.value.length);
71
+ /** What the counter prints. `+3` is the layout; the sentence below is the information. */
72
+ const printed = computed(() => `+${String(hidden.value)}`);
73
+ const overlap = computed(() => OVERLAP[props.size]);
74
+ /** `ring-2` in the surface colour, on every face including the counter. */
75
+ const ring = computed(() => cn("ring-2", SURFACE_RING[props.surface]));
76
+ /**
77
+ * What a screen reader reads for one member. The accent qualifier is composed
78
+ * here rather than left to `Avatar`'s own hidden label, because the portrait
79
+ * inside each item is `aria-hidden` — the item says the name once, in one
80
+ * voice, whichever state the image is in.
81
+ */
82
+ function memberName(item) {
83
+ const who = (item.alt ?? item.fallback ?? "").trim();
84
+ if ((item.variant ?? props.variant) !== "accent") return who;
85
+ return text.value.accent({ name: who });
86
+ }
87
+ return (_ctx, _cache) => {
88
+ return __props.avatars.length > 0 ? (openBlock(), createElementBlock("div", mergeProps({
89
+ key: 0,
90
+ role: "list",
91
+ "aria-label": __props.label
92
+ }, unref(rest), { class: unref(cn)("flex items-center", unref(attrs).class) }), [(openBlock(true), createElementBlock(Fragment, null, renderList(shown.value, (item, index) => {
93
+ return openBlock(), createElementBlock("span", {
94
+ key: `${String(index)}-${item.src ?? item.fallback ?? ""}`,
95
+ role: "listitem",
96
+ style: normalizeStyle({ zIndex: shown.value.length - index }),
97
+ class: normalizeClass(unref(cn)("relative", index > 0 && overlap.value))
98
+ }, [createVNode(Avatar_default, mergeProps({
99
+ "aria-hidden": "true",
100
+ "accent-label": ""
101
+ }, { ref_for: true }, unref(optional)({
102
+ src: item.src,
103
+ alt: item.alt,
104
+ fallback: item.fallback
105
+ }), {
106
+ size: __props.size,
107
+ shape: __props.shape,
108
+ variant: item.variant ?? __props.variant,
109
+ class: ring.value
110
+ }), null, 16, [
111
+ "size",
112
+ "shape",
113
+ "variant",
114
+ "class"
115
+ ]), createElementVNode("span", _hoisted_2, toDisplayString(memberName(item)), 1)], 6);
116
+ }), 128)), hidden.value > 0 ? (openBlock(), createElementBlock("span", {
117
+ key: 0,
118
+ role: "listitem",
119
+ style: { zIndex: 0 },
120
+ class: normalizeClass(unref(cn)("relative", overlap.value))
121
+ }, [createVNode(Avatar_default, {
122
+ "aria-hidden": "true",
123
+ fallback: printed.value,
124
+ size: __props.size,
125
+ shape: __props.shape,
126
+ class: normalizeClass(unref(cn)(ring.value, "bg-subtle text-subtle-foreground tabular"))
127
+ }, null, 8, [
128
+ "fallback",
129
+ "size",
130
+ "shape",
131
+ "class"
132
+ ]), createElementVNode("span", _hoisted_3, toDisplayString(unref(text).overflow({ count: hidden.value })), 1)], 2)) : createCommentVNode("", true)], 16, _hoisted_1)) : createCommentVNode("", true);
133
+ };
134
+ }
135
+ });
136
+ //#endregion
137
+ export { AVATAR_GROUP_LABELS, AvatarGroup_vue_vue_type_script_setup_true_lang_default as default };
138
+
139
+ //# sourceMappingURL=AvatarGroup.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarGroup.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/AvatarGroup/AvatarGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { AvatarShape, AvatarSize, AvatarVariant } from \"../Avatar/Avatar.vue\";\nimport type { LabelOf } from \"../../lib/labels\";\n\n/** One face in the row. */\nexport interface AvatarGroupItem {\n /** Image URL. Omit it and this face renders `fallback` instead. */\n src?: string;\n /** Who this face is. It is what a screen reader reads for this member, whether or not the image ever loads — so it is the field to fill in even when there is no photo. */\n alt?: string;\n /** Initials shown while there is no image, or once one has failed. */\n fallback?: string;\n /** Which variant this member uses. Defaults to the group's own `variant`, so a row that mixes members states it per member and a row of one kind states it once. */\n variant?: AvatarVariant;\n}\n\n/** The surface the row sits on, which the separating ring matches. */\nexport type AvatarGroupSurface = \"background\" | \"card\" | \"sunken\" | \"popover\";\n\n/**\n * The two sentences the row says that are not a member's own name.\n *\n * **`accent` is one key and not a name, a comma and a qualifier.** Where the\n * qualifier sits relative to the name, and whether a comma is what separates\n * them at all, is a property of the language — Loom joining `${who}, ${what}`\n * has already answered both, in English, for every host that translates the\n * two halves. The name arrives raw because it is the caller's own data rather\n * than anything Loom formatted, and the empty case arrives too: a face with no\n * `alt` and no `fallback` still carries the accent variant, and the accent\n * label alone is the honest reading of it.\n *\n * `overflow` takes the count for the reason every counted message here does —\n * \"3 more\" is a plural category English collapses and Russian does not.\n */\nexport interface AvatarGroupLabels {\n /** The counter tile at the end of the row, named for how many faces it stands in for. */\n readonly overflow: LabelOf<{ count: number }>;\n /** One member's whole name, with the accent qualifier already worked into it. `name` is empty when the member gave neither an `alt` nor a `fallback`. */\n readonly accent: LabelOf<{ name: 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 AVATAR_GROUP_LABELS: AvatarGroupLabels = {\n overflow: ({ count }) => `${String(count)} more`,\n accent: ({ name }) => (name ? `${name}, Accent` : \"Accent\"),\n};\n\n/**\n * How far each face tucks under the one before it — a quarter of its own width\n * at every size, so a row of `xs` avatars reads at the same density as a row of\n * `xl` ones. A fixed offset would look like a badly spaced flex row at the top\n * of the scale and swallow the initials at the bottom of it.\n */\nconst OVERLAP = {\n xs: \"-ml-1.5\",\n sm: \"-ml-2\",\n md: \"-ml-2.5\",\n lg: \"-ml-3\",\n xl: \"-ml-4\",\n} satisfies Record<AvatarSize, string>;\n\n/**\n * The ring that cuts each face out of the one it overlaps. Without it two\n * portraits of similar tone merge into one shape, so it is structural rather\n * than decorative — which is also why it has to be the colour of whatever\n * surrounds the row, something only the caller knows. The names are\n * Indicator's, for the same reason and with the same meaning.\n */\nconst SURFACE_RING = {\n background: \"ring-background\",\n card: \"ring-card\",\n sunken: \"ring-sunken\",\n popover: \"ring-popover\",\n} satisfies Record<AvatarGroupSurface, string>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Avatar from \"../Avatar/Avatar.vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport { useSplitAttrs } from \"../../lib/attrs\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\n/**\n * AvatarGroup — the faces on one thing, overlapped into a single row: the\n * people assigned to a task, the agents on a run, the members of a workspace.\n * Past `max` of them the rest collapse into a counter, so the row's width is\n * bounded by the layout rather than by how many people happen to be involved.\n *\n * Reach for a plain `Avatar` when there is one subject, and for a real list of\n * rows when the reader needs to *act* on the members — a stack of overlapping\n * portraits is an at-a-glance summary, not a control. Nothing here is\n * focusable or clickable on purpose: the moment a face has to be pressable it\n * wants a row, a menu or a set of chips, each of which can carry a name and a\n * keyboard path that a 40px circle cannot.\n *\n * To a screen reader the row is one object — a labelled list of members ending\n * in \"3 more\" — rather than N unrelated images. Each face is announced by its\n * `alt` and nothing else: the portrait itself is hidden from assistive\n * technology and the name supplied beside it, which is what keeps the reading\n * identical whether the photo loaded, failed, or was never given.\n */\nconst props = withDefaults(\n defineProps<{\n /** The members, in the order they are shown. The first is the one painted on top. */\n avatars: AvatarGroupItem[];\n /** How many faces render before the rest collapse into the counter. Values below 1 are treated as 1 — a row of nothing but \"+5\" identifies nobody. */\n max?: number;\n /** Height of every face in the row, and of the counter — one of `Avatar`'s five sizes, `xs` through `xl`. */\n size?: AvatarSize;\n /** `circle` or `square`, forwarded to every face so the row reads as one shape. */\n shape?: AvatarShape;\n /** `default` or `accent`, for members that do not name their own — set it to `accent` for a row where every member uses the accent variant. */\n variant?: AvatarVariant;\n /** The group's accessible name: \"Assignees\", \"Reviewers\", \"Members\". */\n label?: string;\n /** The surface the row sits on, so the ring separating the faces matches what surrounds them. */\n surface?: AvatarGroupSurface;\n /**\n * Names for the counter and for an accent member, as any subset of\n * `AvatarGroupLabels` — the rest stay as the host's `provideLoomLabels`\n * vocabulary left them, and then as Loom's English.\n *\n * The per-instance case is a row where \"more\" is the wrong word for what\n * was left out: three reviewers, three members, three files.\n */\n labels?: LabelOverrides<AvatarGroupLabels>;\n }>(),\n {\n max: 4,\n size: \"md\",\n shape: \"circle\",\n variant: \"default\",\n surface: \"background\",\n },\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(\"avatarGroup\", AVATAR_GROUP_LABELS, () => props.labels);\n\n// One rendered node, and it takes every fallthrough attribute — but `class`\n// goes through `cn()`, so a caller's `gap-1` can beat the row's own layout\n// utilities instead of tying with them on stylesheet order.\ndefineOptions({ inheritAttrs: false });\nconst { attrs, rest } = useSplitAttrs();\n\n/**\n * At least one face always renders. `max = 0` is the boundary that decides\n * this: a group collapsed to nothing but \"+5\" has spent an avatar row saying\n * only that some people exist, which is strictly less than one face and a\n * count would have said.\n */\nconst shown = computed(() => props.avatars.slice(0, Math.max(1, Math.trunc(props.max))));\n\n/** How many members the row did not have room for. Zero renders no counter at all. */\nconst hidden = computed(() => props.avatars.length - shown.value.length);\n\n/** What the counter prints. `+3` is the layout; the sentence below is the information. */\nconst printed = computed(() => `+${String(hidden.value)}`);\n\nconst overlap = computed(() => OVERLAP[props.size]);\n\n/** `ring-2` in the surface colour, on every face including the counter. */\nconst ring = computed(() => cn(\"ring-2\", SURFACE_RING[props.surface]));\n\n/**\n * What a screen reader reads for one member. The accent qualifier is composed\n * here rather than left to `Avatar`'s own hidden label, because the portrait\n * inside each item is `aria-hidden` — the item says the name once, in one\n * voice, whichever state the image is in.\n */\nfunction memberName(item: AvatarGroupItem): string {\n const who = (item.alt ?? item.fallback ?? \"\").trim();\n if ((item.variant ?? props.variant) !== \"accent\") return who;\n return text.value.accent({ name: who });\n}\n</script>\n\n<template>\n <!-- `role=\"list\"` on a div rather than a real `<ul>`, and the reason is the\n page this is documented on. VitePress styles `.vp-doc li + li` with a top\n margin and `.vp-doc ul` with a disc marker and a left indent, unlayered —\n and unlayered CSS beats every Tailwind utility, which all live in\n `@layer utilities`. A genuine list element here arrives bulleted, indented\n and stepping 8px downhill per face. The roles are the semantics; the\n elements were only ever carrying them.\n\n The explicit attributes sit before `v-bind`, so a caller who names the\n group with `aria-labelledby` instead of `label` keeps their own value\n rather than having an unset prop overwrite it. -->\n <div\n v-if=\"avatars.length > 0\"\n role=\"list\"\n :aria-label=\"label\"\n v-bind=\"rest\"\n :class=\"cn('flex items-center', attrs.class as string)\"\n >\n <!-- The first face on top, each later one tucked under it. `z-index` is not\n automatic on a flex row — painting order alone puts the *last* sibling\n over its neighbours, which reads as a stack dealt backwards — and it\n needs the positioned parent this span provides. -->\n <span\n v-for=\"(item, index) in shown\"\n :key=\"`${String(index)}-${item.src ?? item.fallback ?? ''}`\"\n role=\"listitem\"\n :style=\"{ zIndex: shown.length - index }\"\n :class=\"cn('relative', index > 0 && overlap)\"\n >\n <!-- `accent-label` is cleared because the item beside it has already\n worked the qualifier into one name; left at its default the row would\n carry two copies of the accent label per accent member. -->\n <Avatar\n aria-hidden=\"true\"\n accent-label=\"\"\n v-bind=\"optional({ src: item.src, alt: item.alt, fallback: item.fallback })\"\n :size=\"size\"\n :shape=\"shape\"\n :variant=\"item.variant ?? variant\"\n :class=\"ring\"\n />\n <span class=\"sr-only\">{{ memberName(item) }}</span>\n </span>\n\n <!-- The counter is a face-shaped tile rather than a shape of its own, so\n the row keeps one rhythm: same size, same corner, same ring, and the\n neutral well instead of a portrait's fill so it never reads as a\n person. It sits under everything, at the back of the stack. -->\n <span v-if=\"hidden > 0\" role=\"listitem\" :style=\"{ zIndex: 0 }\" :class=\"cn('relative', overlap)\">\n <Avatar\n aria-hidden=\"true\"\n :fallback=\"printed\"\n :size=\"size\"\n :shape=\"shape\"\n :class=\"cn(ring, 'bg-subtle text-subtle-foreground tabular')\"\n />\n <span class=\"sr-only\">{{ text.overflow({ count: hidden }) }}</span>\n </span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;AA6CA,IAAa,sBAAyC;CACpD,WAAW,EAAE,YAAY,GAAG,OAAO,KAAK,EAAE;CAC1C,SAAS,EAAE,WAAY,OAAO,GAAG,KAAK,YAAY;AACpD;;;;;;;AAQA,IAAM,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;;;;;;;AASA,IAAM,eAAe;CACnB,YAAY;CACZ,MAAM;CACN,QAAQ;CACR,SAAS;AACX;;;;;;;;;;;;;;;EA8BA,MAAM,QAAQ;EAsCd,MAAM,OAAO,UAAU,eAAe,2BAA2B,MAAM,MAAM;EAM7E,MAAM,EAAE,OAAO,SAAS,cAAc;;;;;;;EAQtC,MAAM,QAAQ,eAAe,MAAM,QAAQ,MAAM,GAAG,KAAK,IAAI,GAAG,KAAK,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC;;EAGvF,MAAM,SAAS,eAAe,MAAM,QAAQ,SAAS,MAAM,MAAM,MAAM;;EAGvE,MAAM,UAAU,eAAe,IAAI,OAAO,OAAO,KAAK,GAAG;EAEzD,MAAM,UAAU,eAAe,QAAQ,MAAM,KAAK;;EAGlD,MAAM,OAAO,eAAe,GAAG,UAAU,aAAa,MAAM,QAAQ,CAAC;;;;;;;EAQrE,SAAS,WAAW,MAA+B;GACjD,MAAM,OAAO,KAAK,OAAO,KAAK,YAAY,GAAA,CAAI,KAAK;GACnD,KAAK,KAAK,WAAW,MAAM,aAAa,UAAU,OAAO;GACzD,OAAO,KAAK,MAAM,OAAO,EAAE,MAAM,IAAI,CAAC;EACxC;;GAgBU,OAAA,QAAA,QAAQ,SAAM,KADtB,UAAA,GAAA,mBA+CM,OA/CN,WA+CM;;IA7CJ,MAAK;IACJ,cAAY,QAAA;GACL,GAAA,MAAA,IAAA,GAAI,EACX,OAAO,MAAA,EAAA,CAAE,CAAA,qBAAsB,MAAA,KAAA,CAAK,CAAC,KAAK,EAAA,CAAA,GAAA,EAM3C,UAAA,IAAA,GAAA,mBAoBO,UAAA,MAAA,WAnBmB,MAAA,QAAhB,MAAM,UAAK;IADrB,OAAA,UAAA,GAAA,mBAoBO,QAAA;KAlBJ,KAAG,GAAK,OAAO,KAAK,EAAA,GAAK,KAAK,OAAO,KAAK,YAAQ;KACnD,MAAK;KACJ,OAAK,eAAA,EAAA,QAAY,MAAA,MAAM,SAAS,MAAK,CAAA;KACrC,OAAK,eAAE,MAAA,EAAA,CAAE,CAAA,YAAa,QAAK,KAAQ,QAAA,KAAO,CAAA;IAK3C,GAAA,CAAA,YAQE,gBARF,WAQE;KAPA,eAAY;KACZ,gBAAa;IACL,GAAA,EAAA,SAAA,KAAA,GAAA,MAAA,QAAA,CAAQ,CAAA;KAAA,KAAQ,KAAK;KAAG,KAAO,KAAK;KAAG,UAAY,KAAK;IAAQ,CAAA,GAAA;KACvE,MAAM,QAAA;KACN,OAAO,QAAA;KACP,SAAS,KAAK,WAAW,QAAA;KACzB,OAAO,KAAA;;;;;;IAEV,CAAA,GAAA,mBAAmD,QAAnD,YAAmD,gBAA1B,WAAW,IAAI,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA;GAO9B,CAAA,GAAA,GAAA,IAAA,OAAA,QAAM,KAAlB,UAAA,GAAA,mBASO,QAAA;;IATiB,MAAK;IAAY,OAAO,EAAA,QAAA,EAAA;IAAgB,OAAK,eAAE,MAAA,EAAA,CAAE,CAAA,YAAa,QAAA,KAAO,CAAA;GAC3F,GAAA,CAAA,YAME,gBAAA;IALA,eAAY;IACX,UAAU,QAAA;IACV,MAAM,QAAA;IACN,OAAO,QAAA;IACP,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,KAAA,OAAI,0CAAA,CAAA;;;;;;GAEjB,CAAA,GAAA,mBAAmE,QAAnE,YAAmE,gBAA1C,MAAA,IAAA,CAAI,CAAC,SAAQ,EAAA,OAAU,OAAA,MAAM,CAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,UAAA,KAAA,mBAAA,IAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":[],"sources":["../../../src/primitives/Badge/Badge.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * Badge — small status / meta chip. The `ai` variant wears the agent weft\n * used to signal AI presence across the product.\n */\nexport type BadgeVariant =\n \"neutral\" | \"outline\" | \"primary\" | \"success\" | \"warning\" | \"info\" | \"destructive\" | \"ai\";\n\nexport const badgeVariants = cva(\n \"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium transition-colors duration-fast\",\n {\n variants: {\n variant: {\n neutral: \"border-transparent bg-subtle text-subtle-foreground\",\n outline: \"border-border bg-transparent text-muted-foreground\",\n primary: \"border-transparent bg-primary/12 text-primary\",\n success: \"border-transparent bg-success/12 text-success\",\n warning: \"border-transparent bg-warning/12 text-warning\",\n info: \"border-transparent bg-info/12 text-info\",\n destructive: \"border-transparent bg-destructive/12 text-destructive\",\n ai: \"border-agent/40 bg-agent-muted text-agent\",\n } satisfies Record<BadgeVariant, string>,\n },\n defaultVariants: { variant: \"neutral\" },\n },\n);\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\nwithDefaults(\n defineProps<{\n /** Which status or meta this chip carries. `ai` is reserved for signalling agent-produced or agent-running work. */\n variant?: BadgeVariant;\n }>(),\n { variant: \"neutral\" },\n);\n</script>\n\n<template>\n <span :class=\"cn(badgeVariants({ variant }))\"><slot /></span>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Badge.js","names":[],"sources":["../../../src/primitives/Badge/Badge.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * Badge — small status / meta chip. The `accent` variant wears the accent\n * colour used to signal a second semantic category distinct from primary.\n */\nexport type BadgeVariant =\n \"neutral\" | \"outline\" | \"primary\" | \"success\" | \"warning\" | \"info\" | \"destructive\" | \"accent\";\n\nexport const badgeVariants = cva(\n \"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium transition-colors duration-fast\",\n {\n variants: {\n variant: {\n neutral: \"border-transparent bg-subtle text-subtle-foreground\",\n outline: \"border-border bg-transparent text-muted-foreground\",\n primary: \"border-transparent bg-primary/12 text-primary\",\n success: \"border-transparent bg-success/12 text-success\",\n warning: \"border-transparent bg-warning/12 text-warning\",\n info: \"border-transparent bg-info/12 text-info\",\n destructive: \"border-transparent bg-destructive/12 text-destructive\",\n accent: \"border-accent/40 bg-accent-muted text-accent\",\n } satisfies Record<BadgeVariant, string>,\n },\n defaultVariants: { variant: \"neutral\" },\n },\n);\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\nwithDefaults(\n defineProps<{\n /** Which status or meta this chip carries. `accent` is for signalling a second semantic category distinct from primary. */\n variant?: BadgeVariant;\n }>(),\n { variant: \"neutral\" },\n);\n</script>\n\n<template>\n <span :class=\"cn(badgeVariants({ variant }))\"><slot /></span>\n</template>\n"],"mappings":""}
@@ -1,18 +1,18 @@
1
1
  /**
2
- * Badge — small status / meta chip. The `ai` variant wears the agent weft
3
- * used to signal AI presence across the product.
2
+ * Badge — small status / meta chip. The `accent` variant wears the accent
3
+ * colour used to signal a second semantic category distinct from primary.
4
4
  */
5
- export type BadgeVariant = "neutral" | "outline" | "primary" | "success" | "warning" | "info" | "destructive" | "ai";
5
+ export type BadgeVariant = "neutral" | "outline" | "primary" | "success" | "warning" | "info" | "destructive" | "accent";
6
6
  export declare const badgeVariants: (props?: ({
7
- variant?: "neutral" | "outline" | "primary" | "success" | "warning" | "info" | "destructive" | "ai" | null | undefined;
7
+ variant?: "accent" | "neutral" | "outline" | "primary" | "success" | "warning" | "info" | "destructive" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  declare const _default: typeof __VLS_export;
10
10
  export default _default;
11
11
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
12
- /** Which status or meta this chip carries. `ai` is reserved for signalling agent-produced or agent-running work. */
12
+ /** Which status or meta this chip carries. `accent` is for signalling a second semantic category distinct from primary. */
13
13
  variant?: BadgeVariant;
14
14
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
15
- /** Which status or meta this chip carries. `ai` is reserved for signalling agent-produced or agent-running work. */
15
+ /** Which status or meta this chip carries. `accent` is for signalling a second semantic category distinct from primary. */
16
16
  variant?: BadgeVariant;
17
17
  }> & Readonly<{}>, {
18
18
  variant: BadgeVariant;
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Badge/Badge.vue"],"names":[],"mappings":"AAqDA;;;GAGG;AACH,MAAM,MAAM,YAAY,GACtB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,IAAI,CAAC;AAE5F,eAAO,MAAM,aAAa;;8EAiBzB,CAAC;wBACmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEd,oHAAoH;cAC1G,YAAY;;IADtB,oHAAoH;cAC1G,YAAY;;aAAZ,YAAY;;cAkCZ,CAAC,KAAK,IAAgB,KAAK,GAAG;EAUxC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Badge/Badge.vue"],"names":[],"mappings":"AAqDA;;;GAGG;AACH,MAAM,MAAM,YAAY,GACtB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,CAAC;AAEhG,eAAO,MAAM,aAAa;;8EAiBzB,CAAC;wBACmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEd,2HAA2H;cACjH,YAAY;;IADtB,2HAA2H;cACjH,YAAY;;aAAZ,YAAY;;cAkCZ,CAAC,KAAK,IAAgB,KAAK,GAAG;EAUxC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -11,7 +11,7 @@ var badgeVariants = cva("inline-flex items-center gap-1 rounded-full border px-2
11
11
  warning: "border-transparent bg-warning/12 text-warning",
12
12
  info: "border-transparent bg-info/12 text-info",
13
13
  destructive: "border-transparent bg-destructive/12 text-destructive",
14
- ai: "border-agent/40 bg-agent-muted text-agent"
14
+ accent: "border-accent/40 bg-accent-muted text-accent"
15
15
  } },
16
16
  defaultVariants: { variant: "neutral" }
17
17
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/Badge/Badge.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * Badge — small status / meta chip. The `ai` variant wears the agent weft\n * used to signal AI presence across the product.\n */\nexport type BadgeVariant =\n \"neutral\" | \"outline\" | \"primary\" | \"success\" | \"warning\" | \"info\" | \"destructive\" | \"ai\";\n\nexport const badgeVariants = cva(\n \"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium transition-colors duration-fast\",\n {\n variants: {\n variant: {\n neutral: \"border-transparent bg-subtle text-subtle-foreground\",\n outline: \"border-border bg-transparent text-muted-foreground\",\n primary: \"border-transparent bg-primary/12 text-primary\",\n success: \"border-transparent bg-success/12 text-success\",\n warning: \"border-transparent bg-warning/12 text-warning\",\n info: \"border-transparent bg-info/12 text-info\",\n destructive: \"border-transparent bg-destructive/12 text-destructive\",\n ai: \"border-agent/40 bg-agent-muted text-agent\",\n } satisfies Record<BadgeVariant, string>,\n },\n defaultVariants: { variant: \"neutral\" },\n },\n);\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\nwithDefaults(\n defineProps<{\n /** Which status or meta this chip carries. `ai` is reserved for signalling agent-produced or agent-running work. */\n variant?: BadgeVariant;\n }>(),\n { variant: \"neutral\" },\n);\n</script>\n\n<template>\n <span :class=\"cn(badgeVariants({ variant }))\"><slot /></span>\n</template>\n"],"mappings":";;;;AAUA,IAAa,gBAAgB,IAC3B,sHACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,MAAM;EACN,aAAa;EACb,IAAI;CACN,EACF;CACA,iBAAiB,EAAE,SAAS,UAAU;AACxC,CACF;;;;;;GAgBE,OAAA,UAAA,GAAA,mBAA6D,QAAA,EAAtD,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAA,aAAA,CAAa,CAAA,EAAA,SAAG,QAAA,QAAO,CAAA,CAAA,CAAA,EAAA,GAAA,CAAM,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"Badge.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/Badge/Badge.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cva } from \"class-variance-authority\";\n\n/**\n * Badge — small status / meta chip. The `accent` variant wears the accent\n * colour used to signal a second semantic category distinct from primary.\n */\nexport type BadgeVariant =\n \"neutral\" | \"outline\" | \"primary\" | \"success\" | \"warning\" | \"info\" | \"destructive\" | \"accent\";\n\nexport const badgeVariants = cva(\n \"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium transition-colors duration-fast\",\n {\n variants: {\n variant: {\n neutral: \"border-transparent bg-subtle text-subtle-foreground\",\n outline: \"border-border bg-transparent text-muted-foreground\",\n primary: \"border-transparent bg-primary/12 text-primary\",\n success: \"border-transparent bg-success/12 text-success\",\n warning: \"border-transparent bg-warning/12 text-warning\",\n info: \"border-transparent bg-info/12 text-info\",\n destructive: \"border-transparent bg-destructive/12 text-destructive\",\n accent: \"border-accent/40 bg-accent-muted text-accent\",\n } satisfies Record<BadgeVariant, string>,\n },\n defaultVariants: { variant: \"neutral\" },\n },\n);\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\nwithDefaults(\n defineProps<{\n /** Which status or meta this chip carries. `accent` is for signalling a second semantic category distinct from primary. */\n variant?: BadgeVariant;\n }>(),\n { variant: \"neutral\" },\n);\n</script>\n\n<template>\n <span :class=\"cn(badgeVariants({ variant }))\"><slot /></span>\n</template>\n"],"mappings":";;;;AAUA,IAAa,gBAAgB,IAC3B,sHACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,MAAM;EACN,aAAa;EACb,QAAQ;CACV,EACF;CACA,iBAAiB,EAAE,SAAS,UAAU;AACxC,CACF;;;;;;GAgBE,OAAA,UAAA,GAAA,mBAA6D,QAAA,EAAtD,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAA,aAAA,CAAa,CAAA,EAAA,SAAG,QAAA,QAAO,CAAA,CAAA,CAAA,EAAA,GAAA,CAAM,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,7 @@
1
+ import Breadcrumb_vue_vue_type_script_setup_true_lang_default from "./Breadcrumb.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/primitives/Breadcrumb/Breadcrumb.vue
3
+ var Breadcrumb_default = Breadcrumb_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { Breadcrumb_default as default };
6
+
7
+ //# sourceMappingURL=Breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.js","names":[],"sources":["../../../src/primitives/Breadcrumb/Breadcrumb.vue"],"sourcesContent":["<script lang=\"ts\">\n/** The visible label text and optional link target for one step in the trail. */\nexport interface BreadcrumbItem {\n /** The visible label text. */\n label: string;\n /** The link target. Omit for the current (last) item. */\n href?: string;\n}\n\n/** Visual separators between breadcrumb steps. `chevron` renders an inline SVG. */\nexport type BreadcrumbSeparator = \"/\" | \"\\\\\" | \">\" | \"→\" | \"chevron\";\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"../../lib/cn\";\n\n/**\n * Breadcrumb — a navigation trail showing the page's position in the site\n * hierarchy. The last item is always the current page (no href,\n * `aria-current=\"page\"`); items with an href render as links. Built without\n * Reka UI, which has no Breadcrumb primitive.\n */\nwithDefaults(\n defineProps<{\n /** The breadcrumb trail, last item is the current page. */\n items: BreadcrumbItem[];\n /** Visual separator between items. `chevron` renders an inline SVG arrow. */\n separator?: BreadcrumbSeparator;\n }>(),\n { separator: \"/\" },\n);\n</script>\n\n<template>\n <nav aria-label=\"Breadcrumb\">\n <ol class=\"flex items-center gap-1.5 text-sm\">\n <template v-for=\"(item, index) in items\" :key=\"index\">\n <li v-if=\"index > 0\" aria-hidden=\"true\" :class=\"cn('text-muted-foreground/50')\">\n <svg\n v-if=\"separator === 'chevron'\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n <template v-else>{{ separator }}</template>\n </li>\n\n <!-- The last item is always the current page, regardless of href -->\n <li v-if=\"index === items.length - 1\">\n <span aria-current=\"page\" :class=\"cn('text-foreground font-medium')\">\n {{ item.label }}\n </span>\n </li>\n <li v-else>\n <a\n :href=\"item.href\"\n :class=\"\n cn('text-muted-foreground hover:text-foreground transition-colors duration-fast')\n \"\n >\n {{ item.label }}\n </a>\n </li>\n </template>\n </ol>\n </nav>\n</template>\n"],"mappings":""}
@@ -0,0 +1,25 @@
1
+ /** The visible label text and optional link target for one step in the trail. */
2
+ export interface BreadcrumbItem {
3
+ /** The visible label text. */
4
+ label: string;
5
+ /** The link target. Omit for the current (last) item. */
6
+ href?: string;
7
+ }
8
+ /** Visual separators between breadcrumb steps. `chevron` renders an inline SVG. */
9
+ export type BreadcrumbSeparator = "/" | "\\" | ">" | "→" | "chevron";
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ declare const __VLS_export: import("vue").DefineComponent<{
13
+ /** The breadcrumb trail, last item is the current page. */
14
+ items: BreadcrumbItem[];
15
+ /** Visual separator between items. `chevron` renders an inline SVG arrow. */
16
+ separator?: BreadcrumbSeparator;
17
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
18
+ /** The breadcrumb trail, last item is the current page. */
19
+ items: BreadcrumbItem[];
20
+ /** Visual separator between items. `chevron` renders an inline SVG arrow. */
21
+ separator?: BreadcrumbSeparator;
22
+ }> & Readonly<{}>, {
23
+ separator: BreadcrumbSeparator;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ //# sourceMappingURL=Breadcrumb.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Breadcrumb/Breadcrumb.vue"],"names":[],"mappings":"AAiFA,iFAAiF;AACjF,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,mFAAmF;AACnF,MAAM,MAAM,mBAAmB,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;wBAChD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAQd,2DAA2D;WACpD,cAAc,EAAE;IACvB,6EAA6E;gBACjE,mBAAmB;;IAH/B,2DAA2D;WACpD,cAAc,EAAE;IACvB,6EAA6E;gBACjE,mBAAmB;;eAAnB,mBAAmB;6EA+F/B,CAAC"}