@ecoma-io/loom 0.4.0 → 0.5.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 (251) hide show
  1. package/README.md +11 -9
  2. package/dist/a11y.js +2 -2
  3. package/dist/index.js +36 -1
  4. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/CalendarDate.js +1 -1
  5. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -1
  6. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +1 -1
  7. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -1
  8. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/conversion.js +1 -1
  9. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -1
  10. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/manipulation.js +1 -1
  11. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -1
  12. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/queries.js +1 -1
  13. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/queries.js.map +1 -1
  14. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/string.js +1 -1
  15. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/string.js.map +1 -1
  16. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/utils.js +1 -1
  17. package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/utils.js.map +1 -1
  18. package/dist/packages/blocks/empty-state/src/EmptyState.js.map +1 -1
  19. package/dist/packages/blocks/empty-state/src/EmptyState.vue.d.ts.map +1 -1
  20. package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js +5 -6
  21. package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/dist/packages/blocks/error-summary/src/ErrorSummary.js +7 -0
  23. package/dist/packages/blocks/error-summary/src/ErrorSummary.js.map +1 -0
  24. package/dist/packages/blocks/error-summary/src/ErrorSummary.vue.d.ts +31 -0
  25. package/dist/packages/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js +90 -0
  26. package/dist/packages/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js.map +1 -0
  27. package/dist/packages/blocks/error-summary/src/index.d.ts +4 -0
  28. package/dist/packages/blocks/error-summary/src/index.js +3 -0
  29. package/dist/packages/composition/scroll-reel/src/ScrollReel.js.map +1 -1
  30. package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js +1 -0
  31. package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/packages/composition/sidebar/src/Sidebar.js.map +1 -1
  33. package/dist/packages/composition/sidebar/src/Sidebar.vue.d.ts +4 -0
  34. package/dist/packages/composition/sidebar/src/Sidebar.vue.d.ts.map +1 -1
  35. package/dist/packages/composition/sidebar/src/Sidebar.vue_vue_type_script_setup_true_lang.js +13 -4
  36. package/dist/packages/composition/sidebar/src/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  37. package/dist/packages/composition/split/src/Split.js.map +1 -1
  38. package/dist/packages/composition/split/src/Split.vue.d.ts +11 -12
  39. package/dist/packages/composition/split/src/Split.vue.d.ts.map +1 -1
  40. package/dist/packages/composition/split/src/Split.vue_vue_type_script_setup_true_lang.js +15 -5
  41. package/dist/packages/composition/split/src/Split.vue_vue_type_script_setup_true_lang.js.map +1 -1
  42. package/dist/packages/core/src/a11y-scope.d.ts +71 -5
  43. package/dist/packages/core/src/a11y-scope.d.ts.map +1 -1
  44. package/dist/packages/core/src/a11y-scope.js +126 -6
  45. package/dist/packages/core/src/a11y-scope.js.map +1 -1
  46. package/dist/packages/core/src/index.d.ts +1 -1
  47. package/dist/packages/core/src/index.d.ts.map +1 -1
  48. package/dist/packages/core/src/index.js +2 -2
  49. package/dist/packages/labels/src/component-shapes.d.ts +163 -1
  50. package/dist/packages/labels/src/component-shapes.d.ts.map +1 -1
  51. package/dist/packages/labels/src/date-labels.d.ts +82 -5
  52. package/dist/packages/labels/src/date-labels.d.ts.map +1 -1
  53. package/dist/packages/labels/src/date-labels.js +54 -7
  54. package/dist/packages/labels/src/date-labels.js.map +1 -1
  55. package/dist/packages/labels/src/field-context.d.ts +2 -2
  56. package/dist/packages/labels/src/field-context.js.map +1 -1
  57. package/dist/packages/labels/src/index.d.ts +3 -3
  58. package/dist/packages/labels/src/index.d.ts.map +1 -1
  59. package/dist/packages/labels/src/index.js +2 -2
  60. package/dist/packages/labels/src/label-registry.d.ts +9 -1
  61. package/dist/packages/labels/src/label-registry.d.ts.map +1 -1
  62. package/dist/packages/layouts/dashboard/src/Dashboard.js.map +1 -1
  63. package/dist/packages/layouts/dashboard/src/Dashboard.vue.d.ts +4 -4
  64. package/dist/packages/layouts/dashboard/src/Dashboard.vue.d.ts.map +1 -1
  65. package/dist/packages/layouts/dashboard/src/Dashboard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  66. package/dist/packages/layouts/settings/src/Settings.js.map +1 -1
  67. package/dist/packages/layouts/settings/src/Settings.vue.d.ts +3 -3
  68. package/dist/packages/layouts/settings/src/Settings.vue.d.ts.map +1 -1
  69. package/dist/packages/layouts/settings/src/Settings.vue_vue_type_script_setup_true_lang.js.map +1 -1
  70. package/dist/packages/layouts/split-layout/src/SplitLayout.js.map +1 -1
  71. package/dist/packages/layouts/split-layout/src/SplitLayout.vue.d.ts +4 -6
  72. package/dist/packages/layouts/split-layout/src/SplitLayout.vue.d.ts.map +1 -1
  73. package/dist/packages/layouts/split-layout/src/SplitLayout.vue_vue_type_script_setup_true_lang.js +20 -5
  74. package/dist/packages/layouts/split-layout/src/SplitLayout.vue_vue_type_script_setup_true_lang.js.map +1 -1
  75. package/dist/packages/layouts/split-layout/src/index.d.ts +1 -1
  76. package/dist/packages/layouts/split-layout/src/index.d.ts.map +1 -1
  77. package/dist/packages/loom/src/a11y.d.ts +1 -1
  78. package/dist/packages/loom/src/index.d.ts +27 -1
  79. package/dist/packages/primitives/alert/src/Alert.js.map +1 -1
  80. package/dist/packages/primitives/alert/src/Alert.vue.d.ts +18 -0
  81. package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js +10 -7
  82. package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  83. package/dist/packages/primitives/avatar/src/Avatar.js.map +1 -1
  84. package/dist/packages/primitives/avatar/src/Avatar.vue.d.ts +2 -2
  85. package/dist/packages/primitives/avatar/src/Avatar.vue.d.ts.map +1 -1
  86. package/dist/packages/primitives/avatar/src/Avatar.vue_vue_type_script_setup_true_lang.js +1 -1
  87. package/dist/packages/primitives/avatar/src/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  88. package/dist/packages/primitives/calendar/src/Calendar.js +7 -0
  89. package/dist/packages/primitives/calendar/src/Calendar.js.map +1 -0
  90. package/dist/packages/primitives/calendar/src/Calendar.vue.d.ts +95 -0
  91. package/dist/packages/primitives/calendar/src/Calendar.vue_vue_type_script_setup_true_lang.js +204 -0
  92. package/dist/packages/primitives/calendar/src/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  93. package/dist/packages/primitives/calendar/src/index.d.ts +3 -0
  94. package/dist/packages/primitives/calendar/src/index.js +3 -0
  95. package/dist/packages/primitives/combobox/src/Combobox.vue.d.ts +1 -1
  96. package/dist/packages/primitives/command/src/Command.js +7 -0
  97. package/dist/packages/primitives/command/src/Command.js.map +1 -0
  98. package/dist/packages/primitives/command/src/Command.vue.d.ts +77 -0
  99. package/dist/packages/primitives/command/src/Command.vue_vue_type_script_setup_true_lang.js +333 -0
  100. package/dist/packages/primitives/command/src/Command.vue_vue_type_script_setup_true_lang.js.map +1 -0
  101. package/dist/packages/primitives/command/src/index.d.ts +4 -0
  102. package/dist/packages/primitives/command/src/index.js +3 -0
  103. package/dist/packages/primitives/copy-button/src/CopyButton.js +7 -0
  104. package/dist/packages/primitives/copy-button/src/CopyButton.js.map +1 -0
  105. package/dist/packages/primitives/copy-button/src/CopyButton.vue.d.ts +64 -0
  106. package/dist/packages/primitives/copy-button/src/CopyButton.vue_vue_type_script_setup_true_lang.js +113 -0
  107. package/dist/packages/primitives/copy-button/src/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  108. package/dist/packages/primitives/copy-button/src/index.d.ts +4 -0
  109. package/dist/packages/primitives/copy-button/src/index.js +3 -0
  110. package/dist/packages/primitives/data-grid/src/DataGrid.js +7 -0
  111. package/dist/packages/primitives/data-grid/src/DataGrid.js.map +1 -0
  112. package/dist/packages/primitives/data-grid/src/DataGrid.vue.d.ts +128 -0
  113. package/dist/packages/primitives/data-grid/src/DataGrid.vue_vue_type_script_setup_true_lang.js +347 -0
  114. package/dist/packages/primitives/data-grid/src/DataGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
  115. package/dist/packages/primitives/data-grid/src/index.d.ts +4 -0
  116. package/dist/packages/primitives/data-grid/src/index.js +3 -0
  117. package/dist/packages/primitives/date-picker/src/DatePicker.js.map +1 -1
  118. package/dist/packages/primitives/date-picker/src/DatePicker.vue_vue_type_script_setup_true_lang.js +13 -13
  119. package/dist/packages/primitives/date-picker/src/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  120. package/dist/packages/primitives/date-range-picker/src/DateRangePicker.js.map +1 -1
  121. package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue_vue_type_script_setup_true_lang.js +21 -18
  122. package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  123. package/dist/packages/primitives/date-time-picker/src/DateTimePicker.js.map +1 -1
  124. package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue_vue_type_script_setup_true_lang.js +17 -16
  125. package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  126. package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.js.map +1 -1
  127. package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +17 -16
  128. package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  129. package/dist/packages/primitives/dialog/src/Dialog.js.map +1 -1
  130. package/dist/packages/primitives/dialog/src/Dialog.vue.d.ts +15 -7
  131. package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js +5 -3
  132. package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  133. package/dist/packages/primitives/drawer/src/Drawer.js.map +1 -1
  134. package/dist/packages/primitives/drawer/src/Drawer.vue.d.ts +10 -2
  135. package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js +11 -3
  136. package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  137. package/dist/packages/primitives/hover-card/src/index.d.ts.map +1 -1
  138. package/dist/packages/primitives/live-region/src/LiveRegion.js +7 -0
  139. package/dist/packages/primitives/live-region/src/LiveRegion.js.map +1 -0
  140. package/dist/packages/primitives/live-region/src/LiveRegion.vue.d.ts +36 -0
  141. package/dist/packages/primitives/live-region/src/LiveRegion.vue.d.ts.map +1 -0
  142. package/dist/packages/primitives/live-region/src/LiveRegion.vue_vue_type_script_setup_true_lang.js +59 -0
  143. package/dist/packages/primitives/live-region/src/LiveRegion.vue_vue_type_script_setup_true_lang.js.map +1 -0
  144. package/dist/packages/primitives/live-region/src/context.d.ts +40 -0
  145. package/dist/packages/primitives/live-region/src/context.d.ts.map +1 -0
  146. package/dist/packages/primitives/live-region/src/context.js +85 -0
  147. package/dist/packages/primitives/live-region/src/context.js.map +1 -0
  148. package/dist/packages/primitives/live-region/src/index.d.ts +4 -0
  149. package/dist/packages/primitives/live-region/src/index.d.ts.map +1 -0
  150. package/dist/packages/primitives/live-region/src/index.js +3 -0
  151. package/dist/packages/primitives/live-region/src/useAnnounce.d.ts +17 -0
  152. package/dist/packages/primitives/live-region/src/useAnnounce.d.ts.map +1 -0
  153. package/dist/packages/primitives/live-region/src/useAnnounce.js +25 -0
  154. package/dist/packages/primitives/live-region/src/useAnnounce.js.map +1 -0
  155. package/dist/packages/primitives/menubar/src/Menubar.js.map +1 -1
  156. package/dist/packages/primitives/menubar/src/Menubar.vue.d.ts.map +1 -1
  157. package/dist/packages/primitives/menubar/src/Menubar.vue_vue_type_script_setup_true_lang.js +33 -0
  158. package/dist/packages/primitives/menubar/src/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  159. package/dist/packages/primitives/meter/src/Meter.js +7 -0
  160. package/dist/packages/primitives/meter/src/Meter.js.map +1 -0
  161. package/dist/packages/primitives/meter/src/Meter.vue.d.ts +87 -0
  162. package/dist/packages/primitives/meter/src/Meter.vue_vue_type_script_setup_true_lang.js +236 -0
  163. package/dist/packages/primitives/meter/src/Meter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  164. package/dist/packages/primitives/meter/src/index.d.ts +4 -0
  165. package/dist/packages/primitives/meter/src/index.js +3 -0
  166. package/dist/packages/primitives/navigation-menu/src/NavigationMenu.js +7 -0
  167. package/dist/packages/primitives/navigation-menu/src/NavigationMenu.js.map +1 -0
  168. package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue.d.ts +69 -0
  169. package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue.d.ts.map +1 -0
  170. package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue_vue_type_script_setup_true_lang.js +118 -0
  171. package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  172. package/dist/packages/primitives/navigation-menu/src/index.d.ts +3 -0
  173. package/dist/packages/primitives/navigation-menu/src/index.d.ts.map +1 -0
  174. package/dist/packages/primitives/navigation-menu/src/index.js +2 -0
  175. package/dist/packages/primitives/segmented-control/src/SegmentedControl.js.map +1 -1
  176. package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue.d.ts.map +1 -1
  177. package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue_vue_type_script_setup_true_lang.js +1 -1
  178. package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
  179. package/dist/packages/primitives/skip-link/src/SkipLink.js +7 -0
  180. package/dist/packages/primitives/skip-link/src/SkipLink.js.map +1 -0
  181. package/dist/packages/primitives/skip-link/src/SkipLink.vue.d.ts +62 -0
  182. package/dist/packages/primitives/skip-link/src/SkipLink.vue_vue_type_script_setup_true_lang.js +64 -0
  183. package/dist/packages/primitives/skip-link/src/SkipLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
  184. package/dist/packages/primitives/skip-link/src/index.d.ts +3 -0
  185. package/dist/packages/primitives/skip-link/src/index.js +3 -0
  186. package/dist/packages/primitives/stepper/src/Stepper.js.map +1 -1
  187. package/dist/packages/primitives/stepper/src/Stepper.vue_vue_type_script_setup_true_lang.js +7 -5
  188. package/dist/packages/primitives/stepper/src/Stepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  189. package/dist/packages/primitives/switch/src/Switch.js.map +1 -1
  190. package/dist/packages/primitives/switch/src/Switch.vue.d.ts.map +1 -1
  191. package/dist/packages/primitives/switch/src/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
  192. package/dist/packages/primitives/switch/src/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  193. package/dist/packages/primitives/table/src/index.d.ts +1 -1
  194. package/dist/packages/primitives/table/src/index.js +2 -2
  195. package/dist/packages/primitives/time-picker/src/TimePicker.js.map +1 -1
  196. package/dist/packages/primitives/time-picker/src/TimePicker.vue_vue_type_script_setup_true_lang.js +10 -8
  197. package/dist/packages/primitives/time-picker/src/TimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  198. package/dist/packages/primitives/toast/src/ToastItem.js.map +1 -1
  199. package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js +3 -1
  200. package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  201. package/dist/packages/primitives/toggle-group/src/ToggleGroup.js +7 -0
  202. package/dist/packages/primitives/toggle-group/src/ToggleGroup.js.map +1 -0
  203. package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue.d.ts +53 -0
  204. package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue.d.ts.map +1 -0
  205. package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue_vue_type_script_setup_true_lang.js +111 -0
  206. package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  207. package/dist/packages/primitives/toggle-group/src/index.d.ts +3 -0
  208. package/dist/packages/primitives/toggle-group/src/index.d.ts.map +1 -0
  209. package/dist/packages/primitives/toggle-group/src/index.js +2 -0
  210. package/dist/packages/primitives/toolbar/src/Toolbar.js +7 -0
  211. package/dist/packages/primitives/toolbar/src/Toolbar.js.map +1 -0
  212. package/dist/packages/primitives/toolbar/src/Toolbar.vue.d.ts +31 -0
  213. package/dist/packages/primitives/toolbar/src/Toolbar.vue.d.ts.map +1 -0
  214. package/dist/packages/primitives/toolbar/src/Toolbar.vue_vue_type_script_setup_true_lang.js +149 -0
  215. package/dist/packages/primitives/toolbar/src/Toolbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  216. package/dist/packages/primitives/toolbar/src/ToolbarSeparator.js +7 -0
  217. package/dist/packages/primitives/toolbar/src/ToolbarSeparator.js.map +1 -0
  218. package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue.d.ts +24 -0
  219. package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue.d.ts.map +1 -0
  220. package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue_vue_type_script_setup_true_lang.js +40 -0
  221. package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  222. package/dist/packages/primitives/toolbar/src/index.d.ts +4 -0
  223. package/dist/packages/primitives/toolbar/src/index.d.ts.map +1 -0
  224. package/dist/packages/primitives/toolbar/src/index.js +3 -0
  225. package/dist/packages/primitives/tree-view/src/TreeView.js +7 -0
  226. package/dist/packages/primitives/tree-view/src/TreeView.js.map +1 -0
  227. package/dist/packages/primitives/tree-view/src/TreeView.vue.d.ts +99 -0
  228. package/dist/packages/primitives/tree-view/src/TreeView.vue_vue_type_script_setup_true_lang.js +310 -0
  229. package/dist/packages/primitives/tree-view/src/TreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
  230. package/dist/packages/primitives/tree-view/src/TreeViewNode.js +7 -0
  231. package/dist/packages/primitives/tree-view/src/TreeViewNode.js.map +1 -0
  232. package/dist/packages/primitives/tree-view/src/TreeViewNode.vue.d.ts +15 -0
  233. package/dist/packages/primitives/tree-view/src/TreeViewNode.vue.d.ts.map +1 -0
  234. package/dist/packages/primitives/tree-view/src/TreeViewNode.vue_vue_type_script_setup_true_lang.js +103 -0
  235. package/dist/packages/primitives/tree-view/src/TreeViewNode.vue_vue_type_script_setup_true_lang.js.map +1 -0
  236. package/dist/packages/primitives/tree-view/src/context.d.ts +39 -0
  237. package/dist/packages/primitives/tree-view/src/context.d.ts.map +1 -0
  238. package/dist/packages/primitives/tree-view/src/context.js +6 -0
  239. package/dist/packages/primitives/tree-view/src/context.js.map +1 -0
  240. package/dist/packages/primitives/tree-view/src/index.d.ts +4 -0
  241. package/dist/packages/primitives/tree-view/src/index.js +3 -0
  242. package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.js +7 -0
  243. package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.js.map +1 -0
  244. package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue.d.ts +21 -0
  245. package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue.d.ts.map +1 -0
  246. package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue_vue_type_script_setup_true_lang.js +27 -0
  247. package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue_vue_type_script_setup_true_lang.js.map +1 -0
  248. package/dist/packages/primitives/visually-hidden/src/index.d.ts +3 -0
  249. package/dist/packages/primitives/visually-hidden/src/index.d.ts.map +1 -0
  250. package/dist/packages/primitives/visually-hidden/src/index.js +2 -0
  251. package/package.json +29 -28
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.js","names":[],"sources":["../../../../../packages/primitives/data-grid/src/DataGrid.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { DataGridLabels } from \"@ecoma-io/loom-labels\";\nimport type { TableAlign, TableDensity } from \"@ecoma-io/loom-table\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it.\n */\nexport const DATA_GRID_LABELS: DataGridLabels = {\n region: \"Data grid\",\n selectAll: \"Select all rows\",\n selectRow: \"Select row\",\n sortedAscending: \"Sorted ascending\",\n sortedDescending: \"Sorted descending\",\n sort: \"Sort\",\n};\n\n/** One column: what it reads, whether it sorts, how it aligns. */\nexport interface DataGridColumn {\n /** The row field this column renders; also the sort key. */\n key: string;\n /** The column header's text. */\n header: string;\n /** Renders the header as the tri-state sort control. */\n sortable?: boolean;\n /** Text alignment; numeric columns want `\"right\"`. */\n align?: TableAlign;\n /** Any CSS width, e.g. `\"6rem\"` — pins the column in the scrolling grid. */\n width?: string;\n}\n\n/** Sort direction, compact union — `aria-sort` takes the full ARIA tokens. */\nexport type DataGridSort = \"asc\" | \"desc\";\n\n/** Which column is sorted, and which way. Absent: nothing is. */\nexport type DataGridSortState = { key: string; direction: DataGridSort } | undefined;\n\n/**\n * DataGrid — the WAI-ARIA grids pattern: `Table`'s visual language with the\n * interactive half added. Table reads, DataGrid acts — rows are selectable\n * (`v-model:selectedRowKeys`, select-all with a real `aria-checked=\"mixed\"`),\n * sortable headers carry `aria-sort`, and a row answers Enter/double-click\n * through `@row-activate`.\n *\n * The keyboard model is the APG one, and it is the reason this is not a\n * Table variant: the cell matrix holds exactly one Tab stop (roving\n * tabindex), so Tab enters and leaves the grid once while the arrow keys,\n * Home/End and their Ctrl variants move focus cell to cell. Focus — not\n * the pointer — is what a grid sells.\n *\n * There is no `aria-rowcount` on purpose: every row is in the DOM, so the\n * count is the DOM's to state. The attribute earns its place the day the\n * grid virtualizes, not before — an asserted virtual size over a real\n * partial DOM is the lie `aria-rowcount` exists to correct.\n */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport { ChevronDown, ChevronsUpDown, ChevronUp } from \"@lucide/vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport Checkbox from \"@ecoma-io/loom-checkbox\";\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\nimport { headAlignClass, nextSort, tableRowVariants } from \"@ecoma-io/loom-table\";\n\nconst props = withDefaults(\n defineProps<{\n /** The columns, left to right. */\n columns: DataGridColumn[];\n /** The row objects; a column renders `row[column.key]`. */\n rows: Array<Record<string, unknown>>;\n /** The row field whose value keys selection. Defaults to `\"id\"`. */\n rowKey?: string;\n /** Adds the selection column: per-row checkboxes plus select-all with its mixed state. */\n selectable?: boolean;\n /**\n * The selected row keys when the host owns the selection through\n * `v-model:selectedRowKeys`; omit the binding and the grid owns the\n * state itself while still reporting every change.\n */\n selectedRowKeys?: Array<string | number>;\n /**\n * The active sort when the host owns it through `v-model:sort`; omit it\n * and the headers cycle on their own while still reporting each change.\n */\n sort?: DataGridSortState;\n /** Row padding. Compact suits dense application chrome. */\n density?: TableDensity;\n /** The grid's accessible name, read before a screen reader enters it. */\n caption?: string;\n /** Names what the grid says on its own account, as any subset of `DataGridLabels`. */\n labels?: LabelOverrides<DataGridLabels>;\n }>(),\n { rowKey: \"id\", selectable: false, density: \"comfortable\" },\n);\n\nconst emit = defineEmits<{\n \"update:selectedRowKeys\": [value: Array<string | number>];\n \"update:sort\": [value: DataGridSortState];\n \"sort-change\": [value: DataGridSortState];\n rowActivate: [row: Record<string, unknown>];\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources\n// this resolves (own prop, then the host vocabulary from\n// `provideLoomLabels`, then these English defaults), and a template reading\n// the raw prop would be reading the overrides rather than the answer.\nconst text = useLabels(\"dataGrid\", DATA_GRID_LABELS, () => props.labels);\n\n// ---------- selection ----------\n\nconst innerSelected = ref<Array<string | number>>([]);\nconst selected = computed(() => props.selectedRowKeys ?? innerSelected.value);\n\nconst keyOf = (row: Record<string, unknown>): string | number =>\n row[props.rowKey] as string | number;\nconst isSelected = (row: Record<string, unknown>): boolean => selected.value.includes(keyOf(row));\n\nfunction setSelection(next: Array<string | number>): void {\n innerSelected.value = next;\n emit(\"update:selectedRowKeys\", next);\n}\n\nconst allSelected = computed(\n () => props.rows.length > 0 && props.rows.every((row) => isSelected(row)),\n);\nconst someSelected = computed(\n () => !allSelected.value && props.rows.some((row) => isSelected(row)),\n);\n\n// Checkbox's own third state: reka renders it as `aria-checked=\"mixed\"`,\n// which is the select-all announcement the grid owes — a dash glyph alone is\n// shape-only semantics.\nconst selectAllState = computed<\"indeterminate\" | boolean>(() =>\n allSelected.value ? true : someSelected.value ? \"indeterminate\" : false,\n);\n\nfunction toggleAll(): void {\n setSelection(allSelected.value ? [] : props.rows.map((row) => keyOf(row)));\n}\n\nfunction toggleRow(row: Record<string, unknown>): void {\n setSelection(\n isSelected(row)\n ? selected.value.filter((key) => key !== keyOf(row))\n : [...selected.value, keyOf(row)],\n );\n}\n\nconst innerSort = ref<DataGridSortState>(undefined);\nconst currentSort = computed<DataGridSortState>(() => props.sort ?? innerSort.value);\n\nconst sortDirectionOf = (col: DataGridColumn): DataGridSort | undefined =>\n currentSort.value?.key === col.key ? currentSort.value.direction : undefined;\n\nconst ARIA_SORT = { asc: \"ascending\", desc: \"descending\" } as const;\nconst SORT_ICON = { asc: ChevronUp, desc: ChevronDown } as const;\nconst ariaSortOf = (col: DataGridColumn): (typeof ARIA_SORT)[DataGridSort] | undefined => {\n const direction = sortDirectionOf(col);\n return direction ? ARIA_SORT[direction] : undefined;\n};\nconst sortIconOf = (col: DataGridColumn) => {\n const direction = sortDirectionOf(col);\n return direction ? SORT_ICON[direction] : ChevronsUpDown;\n};\nconst sortWordsOf = (col: DataGridColumn): string => {\n const direction = sortDirectionOf(col);\n return direction === \"asc\"\n ? text.value.sortedAscending\n : direction === \"desc\"\n ? text.value.sortedDescending\n : text.value.sort;\n};\n\nfunction toggleSort(col: DataGridColumn): void {\n const direction = nextSort(sortDirectionOf(col));\n const next: DataGridSortState = direction ? { key: col.key, direction } : undefined;\n innerSort.value = next;\n // `sort-change` for hosts following the sketch's `@sort-change`,\n // `update:sort` so `v-model:sort` works the way every other control's does.\n emit(\"update:sort\", next);\n emit(\"sort-change\", next);\n}\n\nconst colCount = computed(() => props.columns.length + (props.selectable ? 1 : 0));\n\n// Rows: -1 is the header row, 0.. are body rows. Columns count the selection\n// column first when `selectable`. Exactly one cell carries tabindex 0 — the\n// active cell — so Tab enters and leaves the grid once; everything else is\n// -1 and reachable only through the matrix moves.\nconst activeCell = ref({ row: props.rows.length > 0 ? 0 : -1, col: 0 });\nconst bodyColumnIndex = (i: number): number => (props.selectable ? i + 1 : i);\nconst isCellActive = (row: number, col: number): boolean =>\n activeCell.value.row === row && activeCell.value.col === col;\n\n// Rows arriving or leaving can strand the active cell outside the matrix. The\n// floor is -1, not 0: the header row is a valid roving stop too, and a floor\n// of 0 would push the header onto a body row that does not exist once every\n// row is gone, leaving the grid with no Tab stop at all.\nwatch(\n () => [props.rows.length, props.selectable, props.columns.length] as const,\n () => {\n const previous = activeCell.value;\n const next = {\n row: Math.min(Math.max(previous.row, -1), Math.max(props.rows.length - 1, -1)),\n col: Math.min(previous.col, colCount.value - 1),\n };\n activeCell.value = next;\n // A shrink that moves the active cell strands real focus too: the focused\n // cell unmounts, focus falls to <body>, and onFocusin — which only hears\n // focus arriving inside the grid — never learns. The clamped cell is\n // within the surviving matrix, so it exists to take focus back.\n if (\n (previous.row !== next.row || previous.col !== next.col) &&\n table.value?.contains(document.activeElement)\n ) {\n focusCell(next.row, next.col);\n }\n },\n);\n\nconst table = ref<HTMLElement | null>(null);\nconst region = ref<HTMLElement | null>(null);\n\nfunction focusCell(row: number, col: number): void {\n activeCell.value = { row, col };\n table.value?.querySelector<HTMLElement>(`[data-r='${row}'][data-c='${col}']`)?.focus();\n}\n\nfunction moveTo(row: number, col: number): void {\n focusCell(\n // The floor is -1, not 0, for the same reason the watcher below uses it:\n // with no body row, 0 would clamp onto a row that does not exist and\n // strand the grid with no Tab stop (the header is `data-r=\"-1\"`).\n Math.min(Math.max(row, -1), Math.max(props.rows.length - 1, -1)),\n Math.min(Math.max(col, 0), colCount.value - 1),\n );\n}\n\n// Focus can also arrive outside the keymap — a pointer tap lands directly on\n// a cell — and the roving Tab stop has to follow whoever actually holds it.\nfunction onFocusin(event: FocusEvent): void {\n const cell = (event.target as Element).closest(\"[data-r]\");\n if (cell) {\n activeCell.value = {\n row: Number(cell.getAttribute(\"data-r\")),\n col: Number(cell.getAttribute(\"data-c\")),\n };\n }\n}\n\nfunction activateCell(row: number, col: number): void {\n if (row < 0) {\n const col_ = props.columns[col - (props.selectable ? 1 : 0)];\n if (col_?.sortable) toggleSort(col_);\n return;\n }\n const target = props.rows[row];\n if (target) emit(\"rowActivate\", target);\n}\n\nfunction spaceCell(row: number, col: number): void {\n if (!props.selectable) return;\n if (row < 0) {\n if (col === 0) toggleAll();\n return;\n }\n const target = props.rows[row];\n if (target) toggleRow(target);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n const cell = (event.target as Element).closest(\"[data-r]\");\n if (!cell) return;\n const row = Number(cell.getAttribute(\"data-r\"));\n const col = Number(cell.getAttribute(\"data-c\"));\n const lastRow = Math.max(props.rows.length - 1, 0);\n const lastCol = colCount.value - 1;\n\n switch (event.key) {\n case \"ArrowRight\":\n moveTo(row, col + 1);\n break;\n case \"ArrowLeft\":\n moveTo(row, col - 1);\n break;\n case \"ArrowDown\":\n moveTo(row + 1, col);\n break;\n case \"ArrowUp\":\n moveTo(row - 1, col);\n break;\n case \"Home\":\n event.ctrlKey || event.metaKey ? moveTo(0, 0) : moveTo(row, 0);\n break;\n case \"End\":\n event.ctrlKey || event.metaKey ? moveTo(lastRow, lastCol) : moveTo(row, lastCol);\n break;\n case \"Enter\":\n activateCell(row, col);\n break;\n case \" \":\n spaceCell(row, col);\n break;\n default:\n return;\n }\n event.preventDefault();\n}\n\n// ---------- scroll region (Table's mechanism, verbatim in spirit) ----------\n\n// The region is focusable only while it can actually scroll: a Tab stop that\n// never moves is a dead one. Overflow is measured, not assumed.\nconst scrollable = ref(false);\n\nfunction measure(): void {\n const el = region.value;\n if (el) scrollable.value = el.scrollWidth > el.clientWidth;\n}\n\nlet observer: ResizeObserver | undefined;\nonMounted(() => {\n measure();\n observer = new ResizeObserver(measure);\n if (table.value) observer.observe(table.value);\n window.addEventListener(\"resize\", measure, { passive: true });\n});\nonBeforeUnmount(() => {\n observer?.disconnect();\n window.removeEventListener(\"resize\", measure);\n});\n</script>\n\n<template>\n <!-- A scroll container, not the table itself, for the reason Table's\n wrapper documents: a wide grid overflows its region instead of\n stretching the page. -->\n <div\n ref=\"region\"\n role=\"region\"\n :aria-label=\"caption ?? text.region\"\n :tabindex=\"scrollable ? 0 : undefined\"\n class=\"w-full overflow-x-auto rounded-lg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo\"\n >\n <!-- Roving focus ring, not focus-visible: the moves that matter here are\n programmatic (arrow keys), and a ring that only answers\n focus-visible hides the one thing a grid must never hide — which\n cell holds focus. -->\n <!-- tabindex=\"-1\" marks the interactive grid focusable without adding a\n Tab stop: the cells own the single roving stop, the container is\n only a target for programmatic/assistive-tech focus. -->\n <table\n ref=\"table\"\n role=\"grid\"\n tabindex=\"-1\"\n :data-density=\"density\"\n class=\"w-full border-collapse text-left text-sm focus:outline-none [&_th]:border-b [&_th]:border-border-strong [&_th]:px-3 [&_th]:py-2.5 [&_th]:text-xs [&_th]:font-semibold [&_th]:text-muted-foreground [&_th]:whitespace-nowrap [&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:align-top [&_td]:text-foreground [&[data-density='comfortable']_td]:py-3 [&[data-density='compact']_td]:py-1.5 [&[data-density='compact']_th]:py-1.5 [&_tbody_tr:last-child_td]:border-b-0\"\n @keydown=\"onKeydown\"\n @focusin=\"onFocusin\"\n >\n <thead>\n <!-- Inside role=\"grid\" the native tr→row mapping does not apply; the\n plugin cannot see the ancestor role, so the explicit role is load-bearing. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <tr role=\"row\">\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <th\n v-if=\"selectable\"\n scope=\"col\"\n role=\"columnheader\"\n data-r=\"-1\"\n :data-c=\"0\"\n :tabindex=\"isCellActive(-1, 0) ? 0 : -1\"\n class=\"focus:outline-2 focus:-outline-offset-2 focus:outline-ring\"\n >\n <Checkbox\n :model-value=\"selectAllState\"\n :aria-label=\"text.selectAll\"\n tabindex=\"-1\"\n @update:model-value=\"toggleAll()\"\n />\n </th>\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <th\n v-for=\"(col, i) in columns\"\n :key=\"col.key\"\n scope=\"col\"\n role=\"columnheader\"\n :aria-sort=\"ariaSortOf(col)\"\n :data-r=\"-1\"\n :data-c=\"bodyColumnIndex(i)\"\n :tabindex=\"isCellActive(-1, bodyColumnIndex(i)) ? 0 : -1\"\n :style=\"col.width ? { width: col.width } : undefined\"\n :class=\"\n cn(\n headAlignClass(col.align),\n 'focus:outline-2 focus:-outline-offset-2 focus:outline-ring',\n )\n \"\n >\n <!-- The sort button is reachable only through its header cell:\n a second Tab stop inside the matrix would break the\n enter-once contract. Enter on the cell sorts instead. -->\n <button\n v-if=\"col.sortable\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"inline-flex min-h-6 items-center gap-1 rounded-sm px-1 transition-colors duration-fast ease-out hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo\"\n @click=\"toggleSort(col)\"\n >\n <span class=\"inline-flex items-center gap-1 font-semibold\">{{ col.header }}</span>\n <component\n :is=\"sortIconOf(col)\"\n class=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <span class=\"sr-only\">{{ sortWordsOf(col) }}</span>\n </button>\n <template v-else>{{ col.header }}</template>\n </th>\n </tr>\n </thead>\n <tbody>\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <tr\n v-for=\"(row, r) in rows\"\n :key=\"String(keyOf(row))\"\n role=\"row\"\n :aria-selected=\"selectable ? isSelected(row) : undefined\"\n :class=\"\n cn(\n tableRowVariants({\n state: selectable ? (isSelected(row) ? 'selected' : 'interactive') : 'none',\n }),\n )\n \"\n @dblclick=\"emit('rowActivate', row)\"\n >\n <td\n v-if=\"selectable\"\n role=\"gridcell\"\n :data-r=\"r\"\n :data-c=\"0\"\n :tabindex=\"isCellActive(r, 0) ? 0 : -1\"\n class=\"focus:outline-2 focus:-outline-offset-2 focus:outline-ring\"\n >\n <Checkbox\n :model-value=\"isSelected(row)\"\n :aria-label=\"text.selectRow\"\n tabindex=\"-1\"\n @update:model-value=\"toggleRow(row)\"\n />\n </td>\n <td\n v-for=\"(col, i) in columns\"\n :key=\"col.key\"\n role=\"gridcell\"\n :data-r=\"r\"\n :data-c=\"bodyColumnIndex(i)\"\n :tabindex=\"isCellActive(r, bodyColumnIndex(i)) ? 0 : -1\"\n :class=\"\n cn(\n headAlignClass(col.align),\n 'focus:outline-2 focus:-outline-offset-2 focus:outline-ring',\n )\n \"\n >\n <!-- @slot One cell's content — a Badge, a RowActions cluster —\n with `row`, `column` and `value` scoped in. -->\n <slot name=\"cell\" :row=\"row\" :column=\"col\" :value=\"row[col.key]\">\n {{ row[col.key] ?? \"\" }}\n </slot>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n"],"mappings":""}
@@ -0,0 +1,128 @@
1
+ import { type LabelOverrides } from "../../../labels/src/index";
2
+ import type { DataGridLabels } from "../../../labels/src/index";
3
+ import type { TableAlign, TableDensity } from "../../table/src/index";
4
+ /**
5
+ * Loom's English, co-located with the component so it tree-shakes with it,
6
+ * and exported so a host can build a partial vocabulary against the real
7
+ * thing rather than a transcription of it.
8
+ */
9
+ export declare const DATA_GRID_LABELS: DataGridLabels;
10
+ /** One column: what it reads, whether it sorts, how it aligns. */
11
+ export interface DataGridColumn {
12
+ /** The row field this column renders; also the sort key. */
13
+ key: string;
14
+ /** The column header's text. */
15
+ header: string;
16
+ /** Renders the header as the tri-state sort control. */
17
+ sortable?: boolean;
18
+ /** Text alignment; numeric columns want `"right"`. */
19
+ align?: TableAlign;
20
+ /** Any CSS width, e.g. `"6rem"` — pins the column in the scrolling grid. */
21
+ width?: string;
22
+ }
23
+ /** Sort direction, compact union — `aria-sort` takes the full ARIA tokens. */
24
+ export type DataGridSort = "asc" | "desc";
25
+ /** Which column is sorted, and which way. Absent: nothing is. */
26
+ export type DataGridSortState = {
27
+ key: string;
28
+ direction: DataGridSort;
29
+ } | undefined;
30
+ /**
31
+ * DataGrid — the WAI-ARIA grids pattern: `Table`'s visual language with the
32
+ * interactive half added. Table reads, DataGrid acts — rows are selectable
33
+ * (`v-model:selectedRowKeys`, select-all with a real `aria-checked="mixed"`),
34
+ * sortable headers carry `aria-sort`, and a row answers Enter/double-click
35
+ * through `@row-activate`.
36
+ *
37
+ * The keyboard model is the APG one, and it is the reason this is not a
38
+ * Table variant: the cell matrix holds exactly one Tab stop (roving
39
+ * tabindex), so Tab enters and leaves the grid once while the arrow keys,
40
+ * Home/End and their Ctrl variants move focus cell to cell. Focus — not
41
+ * the pointer — is what a grid sells.
42
+ *
43
+ * There is no `aria-rowcount` on purpose: every row is in the DOM, so the
44
+ * count is the DOM's to state. The attribute earns its place the day the
45
+ * grid virtualizes, not before — an asserted virtual size over a real
46
+ * partial DOM is the lie `aria-rowcount` exists to correct.
47
+ */
48
+ declare const _default: typeof __VLS_export;
49
+ export default _default;
50
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
51
+ /** The columns, left to right. */
52
+ columns: DataGridColumn[];
53
+ /** The row objects; a column renders `row[column.key]`. */
54
+ rows: Array<Record<string, unknown>>;
55
+ /** The row field whose value keys selection. Defaults to `"id"`. */
56
+ rowKey?: string;
57
+ /** Adds the selection column: per-row checkboxes plus select-all with its mixed state. */
58
+ selectable?: boolean;
59
+ /**
60
+ * The selected row keys when the host owns the selection through
61
+ * `v-model:selectedRowKeys`; omit the binding and the grid owns the
62
+ * state itself while still reporting every change.
63
+ */
64
+ selectedRowKeys?: Array<string | number>;
65
+ /**
66
+ * The active sort when the host owns it through `v-model:sort`; omit it
67
+ * and the headers cycle on their own while still reporting each change.
68
+ */
69
+ sort?: DataGridSortState;
70
+ /** Row padding. Compact suits dense application chrome. */
71
+ density?: TableDensity;
72
+ /** The grid's accessible name, read before a screen reader enters it. */
73
+ caption?: string;
74
+ /** Names what the grid says on its own account, as any subset of `DataGridLabels`. */
75
+ labels?: LabelOverrides<DataGridLabels>;
76
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
77
+ "update:sort": (value: DataGridSortState) => any;
78
+ "update:selectedRowKeys": (value: (string | number)[]) => any;
79
+ "sort-change": (value: DataGridSortState) => any;
80
+ rowActivate: (row: Record<string, unknown>) => any;
81
+ }, string, import("vue").PublicProps, Readonly<{
82
+ /** The columns, left to right. */
83
+ columns: DataGridColumn[];
84
+ /** The row objects; a column renders `row[column.key]`. */
85
+ rows: Array<Record<string, unknown>>;
86
+ /** The row field whose value keys selection. Defaults to `"id"`. */
87
+ rowKey?: string;
88
+ /** Adds the selection column: per-row checkboxes plus select-all with its mixed state. */
89
+ selectable?: boolean;
90
+ /**
91
+ * The selected row keys when the host owns the selection through
92
+ * `v-model:selectedRowKeys`; omit the binding and the grid owns the
93
+ * state itself while still reporting every change.
94
+ */
95
+ selectedRowKeys?: Array<string | number>;
96
+ /**
97
+ * The active sort when the host owns it through `v-model:sort`; omit it
98
+ * and the headers cycle on their own while still reporting each change.
99
+ */
100
+ sort?: DataGridSortState;
101
+ /** Row padding. Compact suits dense application chrome. */
102
+ density?: TableDensity;
103
+ /** The grid's accessible name, read before a screen reader enters it. */
104
+ caption?: string;
105
+ /** Names what the grid says on its own account, as any subset of `DataGridLabels`. */
106
+ labels?: LabelOverrides<DataGridLabels>;
107
+ }> & Readonly<{
108
+ "onUpdate:sort"?: (value: DataGridSortState) => any;
109
+ "onUpdate:selectedRowKeys"?: (value: (string | number)[]) => any;
110
+ "onSort-change"?: (value: DataGridSortState) => any;
111
+ onRowActivate?: (row: Record<string, unknown>) => any;
112
+ }>, {
113
+ density: TableDensity;
114
+ rowKey: string;
115
+ selectable: boolean;
116
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
117
+ cell?: (props: {
118
+ row: Record<string, unknown>;
119
+ column: DataGridColumn;
120
+ value: unknown;
121
+ }) => any;
122
+ }>;
123
+ type __VLS_WithSlots<T, S> = T & {
124
+ new (): {
125
+ $slots: S;
126
+ };
127
+ };
128
+ //# sourceMappingURL=DataGrid.vue.d.ts.map
@@ -0,0 +1,347 @@
1
+ import { cn } from "../../../core/src/cn.js";
2
+ import "../../../core/src/index.js";
3
+ import { useLabels } from "../../../labels/src/labels.js";
4
+ import "../../../labels/src/index.js";
5
+ import { tableRowVariants } from "../../table/src/TableRow.vue_vue_type_script_setup_true_lang.js";
6
+ import { headAlignClass, nextSort } from "../../table/src/TableHead.vue_vue_type_script_setup_true_lang.js";
7
+ import "../../table/src/index.js";
8
+ import Checkbox_default from "../../checkbox/src/Checkbox.js";
9
+ import "../../checkbox/src/index.js";
10
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, watch } from "vue";
11
+ import { ChevronDown, ChevronUp, ChevronsUpDown } from "@lucide/vue";
12
+ //#region packages/primitives/data-grid/src/DataGrid.vue?vue&type=script&setup=true&lang.ts
13
+ var _hoisted_1 = ["aria-label", "tabindex"];
14
+ var _hoisted_2 = ["data-density"];
15
+ var _hoisted_3 = { role: "row" };
16
+ var _hoisted_4 = ["tabindex"];
17
+ var _hoisted_5 = [
18
+ "aria-sort",
19
+ "data-c",
20
+ "tabindex"
21
+ ];
22
+ var _hoisted_6 = ["onClick"];
23
+ var _hoisted_7 = { class: "inline-flex items-center gap-1 font-semibold" };
24
+ var _hoisted_8 = { class: "sr-only" };
25
+ var _hoisted_9 = ["aria-selected", "onDblclick"];
26
+ var _hoisted_10 = ["data-r", "tabindex"];
27
+ var _hoisted_11 = [
28
+ "data-r",
29
+ "data-c",
30
+ "tabindex"
31
+ ];
32
+ /**
33
+ * Loom's English, co-located with the component so it tree-shakes with it,
34
+ * and exported so a host can build a partial vocabulary against the real
35
+ * thing rather than a transcription of it.
36
+ */
37
+ var DATA_GRID_LABELS = {
38
+ region: "Data grid",
39
+ selectAll: "Select all rows",
40
+ selectRow: "Select row",
41
+ sortedAscending: "Sorted ascending",
42
+ sortedDescending: "Sorted descending",
43
+ sort: "Sort"
44
+ };
45
+ /**
46
+ * DataGrid — the WAI-ARIA grids pattern: `Table`'s visual language with the
47
+ * interactive half added. Table reads, DataGrid acts — rows are selectable
48
+ * (`v-model:selectedRowKeys`, select-all with a real `aria-checked="mixed"`),
49
+ * sortable headers carry `aria-sort`, and a row answers Enter/double-click
50
+ * through `@row-activate`.
51
+ *
52
+ * The keyboard model is the APG one, and it is the reason this is not a
53
+ * Table variant: the cell matrix holds exactly one Tab stop (roving
54
+ * tabindex), so Tab enters and leaves the grid once while the arrow keys,
55
+ * Home/End and their Ctrl variants move focus cell to cell. Focus — not
56
+ * the pointer — is what a grid sells.
57
+ *
58
+ * There is no `aria-rowcount` on purpose: every row is in the DOM, so the
59
+ * count is the DOM's to state. The attribute earns its place the day the
60
+ * grid virtualizes, not before — an asserted virtual size over a real
61
+ * partial DOM is the lie `aria-rowcount` exists to correct.
62
+ */
63
+ var DataGrid_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
64
+ __name: "DataGrid",
65
+ props: {
66
+ columns: {},
67
+ rows: {},
68
+ rowKey: { default: "id" },
69
+ selectable: {
70
+ type: Boolean,
71
+ default: false
72
+ },
73
+ selectedRowKeys: {},
74
+ sort: {},
75
+ density: { default: "comfortable" },
76
+ caption: {},
77
+ labels: {}
78
+ },
79
+ emits: [
80
+ "update:selectedRowKeys",
81
+ "update:sort",
82
+ "sort-change",
83
+ "rowActivate"
84
+ ],
85
+ setup(__props, { emit: __emit }) {
86
+ const props = __props;
87
+ const emit = __emit;
88
+ const text = useLabels("dataGrid", DATA_GRID_LABELS, () => props.labels);
89
+ const innerSelected = ref([]);
90
+ const selected = computed(() => props.selectedRowKeys ?? innerSelected.value);
91
+ const keyOf = (row) => row[props.rowKey];
92
+ const isSelected = (row) => selected.value.includes(keyOf(row));
93
+ function setSelection(next) {
94
+ innerSelected.value = next;
95
+ emit("update:selectedRowKeys", next);
96
+ }
97
+ const allSelected = computed(() => props.rows.length > 0 && props.rows.every((row) => isSelected(row)));
98
+ const someSelected = computed(() => !allSelected.value && props.rows.some((row) => isSelected(row)));
99
+ const selectAllState = computed(() => allSelected.value ? true : someSelected.value ? "indeterminate" : false);
100
+ function toggleAll() {
101
+ setSelection(allSelected.value ? [] : props.rows.map((row) => keyOf(row)));
102
+ }
103
+ function toggleRow(row) {
104
+ setSelection(isSelected(row) ? selected.value.filter((key) => key !== keyOf(row)) : [...selected.value, keyOf(row)]);
105
+ }
106
+ const innerSort = ref(void 0);
107
+ const currentSort = computed(() => props.sort ?? innerSort.value);
108
+ const sortDirectionOf = (col) => currentSort.value?.key === col.key ? currentSort.value.direction : void 0;
109
+ const ARIA_SORT = {
110
+ asc: "ascending",
111
+ desc: "descending"
112
+ };
113
+ const SORT_ICON = {
114
+ asc: ChevronUp,
115
+ desc: ChevronDown
116
+ };
117
+ const ariaSortOf = (col) => {
118
+ const direction = sortDirectionOf(col);
119
+ return direction ? ARIA_SORT[direction] : void 0;
120
+ };
121
+ const sortIconOf = (col) => {
122
+ const direction = sortDirectionOf(col);
123
+ return direction ? SORT_ICON[direction] : ChevronsUpDown;
124
+ };
125
+ const sortWordsOf = (col) => {
126
+ const direction = sortDirectionOf(col);
127
+ return direction === "asc" ? text.value.sortedAscending : direction === "desc" ? text.value.sortedDescending : text.value.sort;
128
+ };
129
+ function toggleSort(col) {
130
+ const direction = nextSort(sortDirectionOf(col));
131
+ const next = direction ? {
132
+ key: col.key,
133
+ direction
134
+ } : void 0;
135
+ innerSort.value = next;
136
+ emit("update:sort", next);
137
+ emit("sort-change", next);
138
+ }
139
+ const colCount = computed(() => props.columns.length + (props.selectable ? 1 : 0));
140
+ const activeCell = ref({
141
+ row: props.rows.length > 0 ? 0 : -1,
142
+ col: 0
143
+ });
144
+ const bodyColumnIndex = (i) => props.selectable ? i + 1 : i;
145
+ const isCellActive = (row, col) => activeCell.value.row === row && activeCell.value.col === col;
146
+ watch(() => [
147
+ props.rows.length,
148
+ props.selectable,
149
+ props.columns.length
150
+ ], () => {
151
+ const previous = activeCell.value;
152
+ const next = {
153
+ row: Math.min(Math.max(previous.row, -1), Math.max(props.rows.length - 1, -1)),
154
+ col: Math.min(previous.col, colCount.value - 1)
155
+ };
156
+ activeCell.value = next;
157
+ if ((previous.row !== next.row || previous.col !== next.col) && table.value?.contains(document.activeElement)) focusCell(next.row, next.col);
158
+ });
159
+ const table = ref(null);
160
+ const region = ref(null);
161
+ function focusCell(row, col) {
162
+ activeCell.value = {
163
+ row,
164
+ col
165
+ };
166
+ table.value?.querySelector(`[data-r='${row}'][data-c='${col}']`)?.focus();
167
+ }
168
+ function moveTo(row, col) {
169
+ focusCell(Math.min(Math.max(row, -1), Math.max(props.rows.length - 1, -1)), Math.min(Math.max(col, 0), colCount.value - 1));
170
+ }
171
+ function onFocusin(event) {
172
+ const cell = event.target.closest("[data-r]");
173
+ if (cell) activeCell.value = {
174
+ row: Number(cell.getAttribute("data-r")),
175
+ col: Number(cell.getAttribute("data-c"))
176
+ };
177
+ }
178
+ function activateCell(row, col) {
179
+ if (row < 0) {
180
+ const col_ = props.columns[col - (props.selectable ? 1 : 0)];
181
+ if (col_?.sortable) toggleSort(col_);
182
+ return;
183
+ }
184
+ const target = props.rows[row];
185
+ if (target) emit("rowActivate", target);
186
+ }
187
+ function spaceCell(row, col) {
188
+ if (!props.selectable) return;
189
+ if (row < 0) {
190
+ if (col === 0) toggleAll();
191
+ return;
192
+ }
193
+ const target = props.rows[row];
194
+ if (target) toggleRow(target);
195
+ }
196
+ function onKeydown(event) {
197
+ const cell = event.target.closest("[data-r]");
198
+ if (!cell) return;
199
+ const row = Number(cell.getAttribute("data-r"));
200
+ const col = Number(cell.getAttribute("data-c"));
201
+ const lastRow = Math.max(props.rows.length - 1, 0);
202
+ const lastCol = colCount.value - 1;
203
+ switch (event.key) {
204
+ case "ArrowRight":
205
+ moveTo(row, col + 1);
206
+ break;
207
+ case "ArrowLeft":
208
+ moveTo(row, col - 1);
209
+ break;
210
+ case "ArrowDown":
211
+ moveTo(row + 1, col);
212
+ break;
213
+ case "ArrowUp":
214
+ moveTo(row - 1, col);
215
+ break;
216
+ case "Home":
217
+ event.ctrlKey || event.metaKey ? moveTo(0, 0) : moveTo(row, 0);
218
+ break;
219
+ case "End":
220
+ event.ctrlKey || event.metaKey ? moveTo(lastRow, lastCol) : moveTo(row, lastCol);
221
+ break;
222
+ case "Enter":
223
+ activateCell(row, col);
224
+ break;
225
+ case " ":
226
+ spaceCell(row, col);
227
+ break;
228
+ default: return;
229
+ }
230
+ event.preventDefault();
231
+ }
232
+ const scrollable = ref(false);
233
+ function measure() {
234
+ const el = region.value;
235
+ if (el) scrollable.value = el.scrollWidth > el.clientWidth;
236
+ }
237
+ let observer;
238
+ onMounted(() => {
239
+ measure();
240
+ observer = new ResizeObserver(measure);
241
+ if (table.value) observer.observe(table.value);
242
+ window.addEventListener("resize", measure, { passive: true });
243
+ });
244
+ onBeforeUnmount(() => {
245
+ observer?.disconnect();
246
+ window.removeEventListener("resize", measure);
247
+ });
248
+ return (_ctx, _cache) => {
249
+ return openBlock(), createElementBlock("div", {
250
+ ref_key: "region",
251
+ ref: region,
252
+ role: "region",
253
+ "aria-label": __props.caption ?? unref(text).region,
254
+ tabindex: scrollable.value ? 0 : void 0,
255
+ class: "w-full overflow-x-auto rounded-lg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo"
256
+ }, [createElementVNode("table", {
257
+ ref_key: "table",
258
+ ref: table,
259
+ role: "grid",
260
+ tabindex: "-1",
261
+ "data-density": __props.density,
262
+ class: "w-full border-collapse text-left text-sm focus:outline-none [&_th]:border-b [&_th]:border-border-strong [&_th]:px-3 [&_th]:py-2.5 [&_th]:text-xs [&_th]:font-semibold [&_th]:text-muted-foreground [&_th]:whitespace-nowrap [&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:align-top [&_td]:text-foreground [&[data-density='comfortable']_td]:py-3 [&[data-density='compact']_td]:py-1.5 [&[data-density='compact']_th]:py-1.5 [&_tbody_tr:last-child_td]:border-b-0",
263
+ onKeydown,
264
+ onFocusin
265
+ }, [createElementVNode("thead", null, [createElementVNode("tr", _hoisted_3, [__props.selectable ? (openBlock(), createElementBlock("th", {
266
+ key: 0,
267
+ scope: "col",
268
+ role: "columnheader",
269
+ "data-r": "-1",
270
+ "data-c": 0,
271
+ tabindex: isCellActive(-1, 0) ? 0 : -1,
272
+ class: "focus:outline-2 focus:-outline-offset-2 focus:outline-ring"
273
+ }, [createVNode(unref(Checkbox_default), {
274
+ "model-value": selectAllState.value,
275
+ "aria-label": unref(text).selectAll,
276
+ tabindex: "-1",
277
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => toggleAll())
278
+ }, null, 8, ["model-value", "aria-label"])], 8, _hoisted_4)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col, i) => {
279
+ return openBlock(), createElementBlock("th", {
280
+ key: col.key,
281
+ scope: "col",
282
+ role: "columnheader",
283
+ "aria-sort": ariaSortOf(col),
284
+ "data-r": -1,
285
+ "data-c": bodyColumnIndex(i),
286
+ tabindex: isCellActive(-1, bodyColumnIndex(i)) ? 0 : -1,
287
+ style: normalizeStyle(col.width ? { width: col.width } : void 0),
288
+ class: normalizeClass(unref(cn)(unref(headAlignClass)(col.align), "focus:outline-2 focus:-outline-offset-2 focus:outline-ring"))
289
+ }, [col.sortable ? (openBlock(), createElementBlock("button", {
290
+ key: 0,
291
+ type: "button",
292
+ tabindex: "-1",
293
+ class: "inline-flex min-h-6 items-center gap-1 rounded-sm px-1 transition-colors duration-fast ease-out hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo",
294
+ onClick: ($event) => toggleSort(col)
295
+ }, [
296
+ createElementVNode("span", _hoisted_7, toDisplayString(col.header), 1),
297
+ (openBlock(), createBlock(resolveDynamicComponent(sortIconOf(col)), {
298
+ class: "h-3.5 w-3.5 shrink-0 text-muted-foreground",
299
+ "aria-hidden": "true"
300
+ })),
301
+ createElementVNode("span", _hoisted_8, toDisplayString(sortWordsOf(col)), 1)
302
+ ], 8, _hoisted_6)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(col.header), 1)], 64))], 14, _hoisted_5);
303
+ }), 128))])]), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, r) => {
304
+ return openBlock(), createElementBlock("tr", {
305
+ key: String(keyOf(row)),
306
+ role: "row",
307
+ "aria-selected": __props.selectable ? isSelected(row) : void 0,
308
+ class: normalizeClass(unref(cn)(unref(tableRowVariants)({ state: __props.selectable ? isSelected(row) ? "selected" : "interactive" : "none" }))),
309
+ onDblclick: ($event) => emit("rowActivate", row)
310
+ }, [__props.selectable ? (openBlock(), createElementBlock("td", {
311
+ key: 0,
312
+ role: "gridcell",
313
+ "data-r": r,
314
+ "data-c": 0,
315
+ tabindex: isCellActive(r, 0) ? 0 : -1,
316
+ class: "focus:outline-2 focus:-outline-offset-2 focus:outline-ring"
317
+ }, [createVNode(unref(Checkbox_default), {
318
+ "model-value": isSelected(row),
319
+ "aria-label": unref(text).selectRow,
320
+ tabindex: "-1",
321
+ "onUpdate:modelValue": ($event) => toggleRow(row)
322
+ }, null, 8, [
323
+ "model-value",
324
+ "aria-label",
325
+ "onUpdate:modelValue"
326
+ ])], 8, _hoisted_10)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col, i) => {
327
+ return openBlock(), createElementBlock("td", {
328
+ key: col.key,
329
+ role: "gridcell",
330
+ "data-r": r,
331
+ "data-c": bodyColumnIndex(i),
332
+ tabindex: isCellActive(r, bodyColumnIndex(i)) ? 0 : -1,
333
+ class: normalizeClass(unref(cn)(unref(headAlignClass)(col.align), "focus:outline-2 focus:-outline-offset-2 focus:outline-ring"))
334
+ }, [renderSlot(_ctx.$slots, "cell", {
335
+ row,
336
+ column: col,
337
+ value: row[col.key]
338
+ }, () => [createTextVNode(toDisplayString(row[col.key] ?? ""), 1)])], 10, _hoisted_11);
339
+ }), 128))], 42, _hoisted_9);
340
+ }), 128))])], 40, _hoisted_2)], 8, _hoisted_1);
341
+ };
342
+ }
343
+ });
344
+ //#endregion
345
+ export { DATA_GRID_LABELS, DataGrid_vue_vue_type_script_setup_true_lang_default as default };
346
+
347
+ //# sourceMappingURL=DataGrid.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/primitives/data-grid/src/DataGrid.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { DataGridLabels } from \"@ecoma-io/loom-labels\";\nimport type { TableAlign, TableDensity } from \"@ecoma-io/loom-table\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it.\n */\nexport const DATA_GRID_LABELS: DataGridLabels = {\n region: \"Data grid\",\n selectAll: \"Select all rows\",\n selectRow: \"Select row\",\n sortedAscending: \"Sorted ascending\",\n sortedDescending: \"Sorted descending\",\n sort: \"Sort\",\n};\n\n/** One column: what it reads, whether it sorts, how it aligns. */\nexport interface DataGridColumn {\n /** The row field this column renders; also the sort key. */\n key: string;\n /** The column header's text. */\n header: string;\n /** Renders the header as the tri-state sort control. */\n sortable?: boolean;\n /** Text alignment; numeric columns want `\"right\"`. */\n align?: TableAlign;\n /** Any CSS width, e.g. `\"6rem\"` — pins the column in the scrolling grid. */\n width?: string;\n}\n\n/** Sort direction, compact union — `aria-sort` takes the full ARIA tokens. */\nexport type DataGridSort = \"asc\" | \"desc\";\n\n/** Which column is sorted, and which way. Absent: nothing is. */\nexport type DataGridSortState = { key: string; direction: DataGridSort } | undefined;\n\n/**\n * DataGrid — the WAI-ARIA grids pattern: `Table`'s visual language with the\n * interactive half added. Table reads, DataGrid acts — rows are selectable\n * (`v-model:selectedRowKeys`, select-all with a real `aria-checked=\"mixed\"`),\n * sortable headers carry `aria-sort`, and a row answers Enter/double-click\n * through `@row-activate`.\n *\n * The keyboard model is the APG one, and it is the reason this is not a\n * Table variant: the cell matrix holds exactly one Tab stop (roving\n * tabindex), so Tab enters and leaves the grid once while the arrow keys,\n * Home/End and their Ctrl variants move focus cell to cell. Focus — not\n * the pointer — is what a grid sells.\n *\n * There is no `aria-rowcount` on purpose: every row is in the DOM, so the\n * count is the DOM's to state. The attribute earns its place the day the\n * grid virtualizes, not before — an asserted virtual size over a real\n * partial DOM is the lie `aria-rowcount` exists to correct.\n */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport { ChevronDown, ChevronsUpDown, ChevronUp } from \"@lucide/vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport Checkbox from \"@ecoma-io/loom-checkbox\";\nimport { useLabels, type LabelOverrides } from \"@ecoma-io/loom-labels\";\nimport { headAlignClass, nextSort, tableRowVariants } from \"@ecoma-io/loom-table\";\n\nconst props = withDefaults(\n defineProps<{\n /** The columns, left to right. */\n columns: DataGridColumn[];\n /** The row objects; a column renders `row[column.key]`. */\n rows: Array<Record<string, unknown>>;\n /** The row field whose value keys selection. Defaults to `\"id\"`. */\n rowKey?: string;\n /** Adds the selection column: per-row checkboxes plus select-all with its mixed state. */\n selectable?: boolean;\n /**\n * The selected row keys when the host owns the selection through\n * `v-model:selectedRowKeys`; omit the binding and the grid owns the\n * state itself while still reporting every change.\n */\n selectedRowKeys?: Array<string | number>;\n /**\n * The active sort when the host owns it through `v-model:sort`; omit it\n * and the headers cycle on their own while still reporting each change.\n */\n sort?: DataGridSortState;\n /** Row padding. Compact suits dense application chrome. */\n density?: TableDensity;\n /** The grid's accessible name, read before a screen reader enters it. */\n caption?: string;\n /** Names what the grid says on its own account, as any subset of `DataGridLabels`. */\n labels?: LabelOverrides<DataGridLabels>;\n }>(),\n { rowKey: \"id\", selectable: false, density: \"comfortable\" },\n);\n\nconst emit = defineEmits<{\n \"update:selectedRowKeys\": [value: Array<string | number>];\n \"update:sort\": [value: DataGridSortState];\n \"sort-change\": [value: DataGridSortState];\n rowActivate: [row: Record<string, unknown>];\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources\n// this resolves (own prop, then the host vocabulary from\n// `provideLoomLabels`, then these English defaults), and a template reading\n// the raw prop would be reading the overrides rather than the answer.\nconst text = useLabels(\"dataGrid\", DATA_GRID_LABELS, () => props.labels);\n\n// ---------- selection ----------\n\nconst innerSelected = ref<Array<string | number>>([]);\nconst selected = computed(() => props.selectedRowKeys ?? innerSelected.value);\n\nconst keyOf = (row: Record<string, unknown>): string | number =>\n row[props.rowKey] as string | number;\nconst isSelected = (row: Record<string, unknown>): boolean => selected.value.includes(keyOf(row));\n\nfunction setSelection(next: Array<string | number>): void {\n innerSelected.value = next;\n emit(\"update:selectedRowKeys\", next);\n}\n\nconst allSelected = computed(\n () => props.rows.length > 0 && props.rows.every((row) => isSelected(row)),\n);\nconst someSelected = computed(\n () => !allSelected.value && props.rows.some((row) => isSelected(row)),\n);\n\n// Checkbox's own third state: reka renders it as `aria-checked=\"mixed\"`,\n// which is the select-all announcement the grid owes — a dash glyph alone is\n// shape-only semantics.\nconst selectAllState = computed<\"indeterminate\" | boolean>(() =>\n allSelected.value ? true : someSelected.value ? \"indeterminate\" : false,\n);\n\nfunction toggleAll(): void {\n setSelection(allSelected.value ? [] : props.rows.map((row) => keyOf(row)));\n}\n\nfunction toggleRow(row: Record<string, unknown>): void {\n setSelection(\n isSelected(row)\n ? selected.value.filter((key) => key !== keyOf(row))\n : [...selected.value, keyOf(row)],\n );\n}\n\nconst innerSort = ref<DataGridSortState>(undefined);\nconst currentSort = computed<DataGridSortState>(() => props.sort ?? innerSort.value);\n\nconst sortDirectionOf = (col: DataGridColumn): DataGridSort | undefined =>\n currentSort.value?.key === col.key ? currentSort.value.direction : undefined;\n\nconst ARIA_SORT = { asc: \"ascending\", desc: \"descending\" } as const;\nconst SORT_ICON = { asc: ChevronUp, desc: ChevronDown } as const;\nconst ariaSortOf = (col: DataGridColumn): (typeof ARIA_SORT)[DataGridSort] | undefined => {\n const direction = sortDirectionOf(col);\n return direction ? ARIA_SORT[direction] : undefined;\n};\nconst sortIconOf = (col: DataGridColumn) => {\n const direction = sortDirectionOf(col);\n return direction ? SORT_ICON[direction] : ChevronsUpDown;\n};\nconst sortWordsOf = (col: DataGridColumn): string => {\n const direction = sortDirectionOf(col);\n return direction === \"asc\"\n ? text.value.sortedAscending\n : direction === \"desc\"\n ? text.value.sortedDescending\n : text.value.sort;\n};\n\nfunction toggleSort(col: DataGridColumn): void {\n const direction = nextSort(sortDirectionOf(col));\n const next: DataGridSortState = direction ? { key: col.key, direction } : undefined;\n innerSort.value = next;\n // `sort-change` for hosts following the sketch's `@sort-change`,\n // `update:sort` so `v-model:sort` works the way every other control's does.\n emit(\"update:sort\", next);\n emit(\"sort-change\", next);\n}\n\nconst colCount = computed(() => props.columns.length + (props.selectable ? 1 : 0));\n\n// Rows: -1 is the header row, 0.. are body rows. Columns count the selection\n// column first when `selectable`. Exactly one cell carries tabindex 0 — the\n// active cell — so Tab enters and leaves the grid once; everything else is\n// -1 and reachable only through the matrix moves.\nconst activeCell = ref({ row: props.rows.length > 0 ? 0 : -1, col: 0 });\nconst bodyColumnIndex = (i: number): number => (props.selectable ? i + 1 : i);\nconst isCellActive = (row: number, col: number): boolean =>\n activeCell.value.row === row && activeCell.value.col === col;\n\n// Rows arriving or leaving can strand the active cell outside the matrix. The\n// floor is -1, not 0: the header row is a valid roving stop too, and a floor\n// of 0 would push the header onto a body row that does not exist once every\n// row is gone, leaving the grid with no Tab stop at all.\nwatch(\n () => [props.rows.length, props.selectable, props.columns.length] as const,\n () => {\n const previous = activeCell.value;\n const next = {\n row: Math.min(Math.max(previous.row, -1), Math.max(props.rows.length - 1, -1)),\n col: Math.min(previous.col, colCount.value - 1),\n };\n activeCell.value = next;\n // A shrink that moves the active cell strands real focus too: the focused\n // cell unmounts, focus falls to <body>, and onFocusin — which only hears\n // focus arriving inside the grid — never learns. The clamped cell is\n // within the surviving matrix, so it exists to take focus back.\n if (\n (previous.row !== next.row || previous.col !== next.col) &&\n table.value?.contains(document.activeElement)\n ) {\n focusCell(next.row, next.col);\n }\n },\n);\n\nconst table = ref<HTMLElement | null>(null);\nconst region = ref<HTMLElement | null>(null);\n\nfunction focusCell(row: number, col: number): void {\n activeCell.value = { row, col };\n table.value?.querySelector<HTMLElement>(`[data-r='${row}'][data-c='${col}']`)?.focus();\n}\n\nfunction moveTo(row: number, col: number): void {\n focusCell(\n // The floor is -1, not 0, for the same reason the watcher below uses it:\n // with no body row, 0 would clamp onto a row that does not exist and\n // strand the grid with no Tab stop (the header is `data-r=\"-1\"`).\n Math.min(Math.max(row, -1), Math.max(props.rows.length - 1, -1)),\n Math.min(Math.max(col, 0), colCount.value - 1),\n );\n}\n\n// Focus can also arrive outside the keymap — a pointer tap lands directly on\n// a cell — and the roving Tab stop has to follow whoever actually holds it.\nfunction onFocusin(event: FocusEvent): void {\n const cell = (event.target as Element).closest(\"[data-r]\");\n if (cell) {\n activeCell.value = {\n row: Number(cell.getAttribute(\"data-r\")),\n col: Number(cell.getAttribute(\"data-c\")),\n };\n }\n}\n\nfunction activateCell(row: number, col: number): void {\n if (row < 0) {\n const col_ = props.columns[col - (props.selectable ? 1 : 0)];\n if (col_?.sortable) toggleSort(col_);\n return;\n }\n const target = props.rows[row];\n if (target) emit(\"rowActivate\", target);\n}\n\nfunction spaceCell(row: number, col: number): void {\n if (!props.selectable) return;\n if (row < 0) {\n if (col === 0) toggleAll();\n return;\n }\n const target = props.rows[row];\n if (target) toggleRow(target);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n const cell = (event.target as Element).closest(\"[data-r]\");\n if (!cell) return;\n const row = Number(cell.getAttribute(\"data-r\"));\n const col = Number(cell.getAttribute(\"data-c\"));\n const lastRow = Math.max(props.rows.length - 1, 0);\n const lastCol = colCount.value - 1;\n\n switch (event.key) {\n case \"ArrowRight\":\n moveTo(row, col + 1);\n break;\n case \"ArrowLeft\":\n moveTo(row, col - 1);\n break;\n case \"ArrowDown\":\n moveTo(row + 1, col);\n break;\n case \"ArrowUp\":\n moveTo(row - 1, col);\n break;\n case \"Home\":\n event.ctrlKey || event.metaKey ? moveTo(0, 0) : moveTo(row, 0);\n break;\n case \"End\":\n event.ctrlKey || event.metaKey ? moveTo(lastRow, lastCol) : moveTo(row, lastCol);\n break;\n case \"Enter\":\n activateCell(row, col);\n break;\n case \" \":\n spaceCell(row, col);\n break;\n default:\n return;\n }\n event.preventDefault();\n}\n\n// ---------- scroll region (Table's mechanism, verbatim in spirit) ----------\n\n// The region is focusable only while it can actually scroll: a Tab stop that\n// never moves is a dead one. Overflow is measured, not assumed.\nconst scrollable = ref(false);\n\nfunction measure(): void {\n const el = region.value;\n if (el) scrollable.value = el.scrollWidth > el.clientWidth;\n}\n\nlet observer: ResizeObserver | undefined;\nonMounted(() => {\n measure();\n observer = new ResizeObserver(measure);\n if (table.value) observer.observe(table.value);\n window.addEventListener(\"resize\", measure, { passive: true });\n});\nonBeforeUnmount(() => {\n observer?.disconnect();\n window.removeEventListener(\"resize\", measure);\n});\n</script>\n\n<template>\n <!-- A scroll container, not the table itself, for the reason Table's\n wrapper documents: a wide grid overflows its region instead of\n stretching the page. -->\n <div\n ref=\"region\"\n role=\"region\"\n :aria-label=\"caption ?? text.region\"\n :tabindex=\"scrollable ? 0 : undefined\"\n class=\"w-full overflow-x-auto rounded-lg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo\"\n >\n <!-- Roving focus ring, not focus-visible: the moves that matter here are\n programmatic (arrow keys), and a ring that only answers\n focus-visible hides the one thing a grid must never hide — which\n cell holds focus. -->\n <!-- tabindex=\"-1\" marks the interactive grid focusable without adding a\n Tab stop: the cells own the single roving stop, the container is\n only a target for programmatic/assistive-tech focus. -->\n <table\n ref=\"table\"\n role=\"grid\"\n tabindex=\"-1\"\n :data-density=\"density\"\n class=\"w-full border-collapse text-left text-sm focus:outline-none [&_th]:border-b [&_th]:border-border-strong [&_th]:px-3 [&_th]:py-2.5 [&_th]:text-xs [&_th]:font-semibold [&_th]:text-muted-foreground [&_th]:whitespace-nowrap [&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:align-top [&_td]:text-foreground [&[data-density='comfortable']_td]:py-3 [&[data-density='compact']_td]:py-1.5 [&[data-density='compact']_th]:py-1.5 [&_tbody_tr:last-child_td]:border-b-0\"\n @keydown=\"onKeydown\"\n @focusin=\"onFocusin\"\n >\n <thead>\n <!-- Inside role=\"grid\" the native tr→row mapping does not apply; the\n plugin cannot see the ancestor role, so the explicit role is load-bearing. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <tr role=\"row\">\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <th\n v-if=\"selectable\"\n scope=\"col\"\n role=\"columnheader\"\n data-r=\"-1\"\n :data-c=\"0\"\n :tabindex=\"isCellActive(-1, 0) ? 0 : -1\"\n class=\"focus:outline-2 focus:-outline-offset-2 focus:outline-ring\"\n >\n <Checkbox\n :model-value=\"selectAllState\"\n :aria-label=\"text.selectAll\"\n tabindex=\"-1\"\n @update:model-value=\"toggleAll()\"\n />\n </th>\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <th\n v-for=\"(col, i) in columns\"\n :key=\"col.key\"\n scope=\"col\"\n role=\"columnheader\"\n :aria-sort=\"ariaSortOf(col)\"\n :data-r=\"-1\"\n :data-c=\"bodyColumnIndex(i)\"\n :tabindex=\"isCellActive(-1, bodyColumnIndex(i)) ? 0 : -1\"\n :style=\"col.width ? { width: col.width } : undefined\"\n :class=\"\n cn(\n headAlignClass(col.align),\n 'focus:outline-2 focus:-outline-offset-2 focus:outline-ring',\n )\n \"\n >\n <!-- The sort button is reachable only through its header cell:\n a second Tab stop inside the matrix would break the\n enter-once contract. Enter on the cell sorts instead. -->\n <button\n v-if=\"col.sortable\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"inline-flex min-h-6 items-center gap-1 rounded-sm px-1 transition-colors duration-fast ease-out hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:shadow-halo\"\n @click=\"toggleSort(col)\"\n >\n <span class=\"inline-flex items-center gap-1 font-semibold\">{{ col.header }}</span>\n <component\n :is=\"sortIconOf(col)\"\n class=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <span class=\"sr-only\">{{ sortWordsOf(col) }}</span>\n </button>\n <template v-else>{{ col.header }}</template>\n </th>\n </tr>\n </thead>\n <tbody>\n <!-- eslint-disable-next-line vuejs-accessibility/no-redundant-roles -->\n <tr\n v-for=\"(row, r) in rows\"\n :key=\"String(keyOf(row))\"\n role=\"row\"\n :aria-selected=\"selectable ? isSelected(row) : undefined\"\n :class=\"\n cn(\n tableRowVariants({\n state: selectable ? (isSelected(row) ? 'selected' : 'interactive') : 'none',\n }),\n )\n \"\n @dblclick=\"emit('rowActivate', row)\"\n >\n <td\n v-if=\"selectable\"\n role=\"gridcell\"\n :data-r=\"r\"\n :data-c=\"0\"\n :tabindex=\"isCellActive(r, 0) ? 0 : -1\"\n class=\"focus:outline-2 focus:-outline-offset-2 focus:outline-ring\"\n >\n <Checkbox\n :model-value=\"isSelected(row)\"\n :aria-label=\"text.selectRow\"\n tabindex=\"-1\"\n @update:model-value=\"toggleRow(row)\"\n />\n </td>\n <td\n v-for=\"(col, i) in columns\"\n :key=\"col.key\"\n role=\"gridcell\"\n :data-r=\"r\"\n :data-c=\"bodyColumnIndex(i)\"\n :tabindex=\"isCellActive(r, bodyColumnIndex(i)) ? 0 : -1\"\n :class=\"\n cn(\n headAlignClass(col.align),\n 'focus:outline-2 focus:-outline-offset-2 focus:outline-ring',\n )\n \"\n >\n <!-- @slot One cell's content — a Badge, a RowActions cluster —\n with `row`, `column` and `value` scoped in. -->\n <slot name=\"cell\" :row=\"row\" :column=\"col\" :value=\"row[col.key]\">\n {{ row[col.key] ?? \"\" }}\n </slot>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAa,mBAAmC;CAC9C,QAAQ;CACR,WAAW;CACX,WAAW;CACX,iBAAiB;CACjB,kBAAkB;CAClB,MAAM;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDA,MAAM,QAAQ;EA+Bd,MAAM,OAAO;EAWb,MAAM,OAAO,UAAU,YAAY,wBAAwB,MAAM,MAAM;EAIvE,MAAM,gBAAgB,IAA4B,CAAC,CAAC;EACpD,MAAM,WAAW,eAAe,MAAM,mBAAmB,cAAc,KAAK;EAE5E,MAAM,SAAS,QACb,IAAI,MAAM;EACZ,MAAM,cAAc,QAA0C,SAAS,MAAM,SAAS,MAAM,GAAG,CAAC;EAEhG,SAAS,aAAa,MAAoC;GACxD,cAAc,QAAQ;GACtB,KAAK,0BAA0B,IAAI;EACrC;EAEA,MAAM,cAAc,eACZ,MAAM,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,QAAQ,WAAW,GAAG,CAAC,CAC1E;EACA,MAAM,eAAe,eACb,CAAC,YAAY,SAAS,MAAM,KAAK,MAAM,QAAQ,WAAW,GAAG,CAAC,CACtE;EAKA,MAAM,iBAAiB,eACrB,YAAY,QAAQ,OAAO,aAAa,QAAQ,kBAAkB,KACpE;EAEA,SAAS,YAAkB;GACzB,aAAa,YAAY,QAAQ,CAAC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AAA,gBAAA,OAAA,CAAA,CAAA,CAAA;KAO5G,aAAQ,WAAE,KAAI,eAAgB,GAAG;IAG1B,GAAA,CAAA,QAAA,cADR,UAAA,GAAA,mBAcK,MAAA;;KAZH,MAAK;KACJ,UAAQ;KACR,UAAQ;KACR,UAAU,aAAa,GAAC,CAAA,IAAA,IAAA;KACzB,OAAM;IAEN,GAAA,CAAA,YAKE,MAAA,gBAAA,GAAA;KAJC,eAAa,WAAW,GAAG;KAC3B,cAAY,MAAA,IAAA,CAAI,CAAC;KAClB,UAAS;KACR,wBAAkB,WAAE,UAAU,GAAG;;;;;IAGtC,CAAA,CAAA,GAAA,GAAA,WAAA,KAAA,mBAAA,IAAA,IAAA,IAAA,UAAA,IAAA,GAAA,mBAmBK,UAAA,MAAA,WAlBgB,QAAA,UAAX,KAAK,MAAC;KADhB,OAAA,UAAA,GAAA,mBAmBK,MAAA;MAjBF,KAAK,IAAI;MACV,MAAK;MACJ,UAAQ;MACR,UAAQ,gBAAgB,CAAC;MACzB,UAAU,aAAa,GAAG,gBAAgB,CAAC,CAAA,IAAA,IAAA;MAC3C,OAAK,eAAiB,MAAA,EAAA,CAAE,CAAkB,MAAA,cAAA,CAAc,CAAC,IAAI,KAAK,GAAA,4DAAA,CAAA;KASnE,GAAA,CAAA,WAEO,KAAA,QAAA,QAAA;MAFiB;MAAM,QAAQ;MAAM,OAAO,IAAI,IAAI;KAA3D,SAEO,CADF,gBAAA,gBAAA,IAAI,IAAI,QAAG,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,IAAA,WAAA"}
@@ -0,0 +1,4 @@
1
+ export { DATA_GRID_LABELS, default } from "./DataGrid.vue";
2
+ export type { DataGridColumn, DataGridSort, DataGridSortState } from "./DataGrid.vue";
3
+ export type { DataGridLabels } from "../../../labels/src/index";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { DATA_GRID_LABELS } from "./DataGrid.vue_vue_type_script_setup_true_lang.js";
2
+ import DataGrid_default from "./DataGrid.js";
3
+ export { DATA_GRID_LABELS, DataGrid_default as default };