nuxt-ui-tools 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/module.d.mts +3 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +37 -0
  4. package/dist/runtime/dashboard/components/block/dashboard-block-state.d.vue.ts +12 -0
  5. package/dist/runtime/dashboard/components/block/dashboard-block-state.vue +59 -0
  6. package/dist/runtime/dashboard/components/block/dashboard-block-state.vue.d.ts +12 -0
  7. package/dist/runtime/dashboard/components/block/dashboard-data-table.d.vue.ts +9 -0
  8. package/dist/runtime/dashboard/components/block/dashboard-data-table.vue +47 -0
  9. package/dist/runtime/dashboard/components/block/dashboard-data-table.vue.d.ts +9 -0
  10. package/dist/runtime/dashboard/components/block/dashboard-ring.d.vue.ts +34 -0
  11. package/dist/runtime/dashboard/components/block/dashboard-ring.vue +91 -0
  12. package/dist/runtime/dashboard/components/block/dashboard-ring.vue.d.ts +34 -0
  13. package/dist/runtime/dashboard/components/block/dashboard-row-actions.d.vue.ts +13 -0
  14. package/dist/runtime/dashboard/components/block/dashboard-row-actions.vue +49 -0
  15. package/dist/runtime/dashboard/components/block/dashboard-row-actions.vue.d.ts +13 -0
  16. package/dist/runtime/dashboard/components/block/dashboard-skeleton.d.vue.ts +34 -0
  17. package/dist/runtime/dashboard/components/block/dashboard-skeleton.vue +312 -0
  18. package/dist/runtime/dashboard/components/block/dashboard-skeleton.vue.d.ts +34 -0
  19. package/dist/runtime/dashboard/components/charts/renderer.d.ts +43 -0
  20. package/dist/runtime/dashboard/components/charts/renderer.js +34 -0
  21. package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.d.vue.ts +18 -0
  22. package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.vue +45 -0
  23. package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.vue.d.ts +18 -0
  24. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.d.vue.ts +14 -0
  25. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.vue +190 -0
  26. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.vue.d.ts +14 -0
  27. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.d.vue.ts +13 -0
  28. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.vue +72 -0
  29. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.vue.d.ts +13 -0
  30. package/dist/runtime/dashboard/components/charts/unovis/xy-layers.d.ts +43 -0
  31. package/dist/runtime/dashboard/components/charts/unovis/xy-layers.js +60 -0
  32. package/dist/runtime/dashboard/components/dashboard-alerts.d.vue.ts +49 -0
  33. package/dist/runtime/dashboard/components/dashboard-alerts.vue +226 -0
  34. package/dist/runtime/dashboard/components/dashboard-alerts.vue.d.ts +49 -0
  35. package/dist/runtime/dashboard/components/dashboard-bar-chart.d.vue.ts +53 -0
  36. package/dist/runtime/dashboard/components/dashboard-bar-chart.vue +131 -0
  37. package/dist/runtime/dashboard/components/dashboard-bar-chart.vue.d.ts +53 -0
  38. package/dist/runtime/dashboard/components/dashboard-bars.d.vue.ts +49 -0
  39. package/dist/runtime/dashboard/components/dashboard-bars.vue +187 -0
  40. package/dist/runtime/dashboard/components/dashboard-bars.vue.d.ts +49 -0
  41. package/dist/runtime/dashboard/components/dashboard-card.d.vue.ts +47 -0
  42. package/dist/runtime/dashboard/components/dashboard-card.vue +316 -0
  43. package/dist/runtime/dashboard/components/dashboard-card.vue.d.ts +47 -0
  44. package/dist/runtime/dashboard/components/dashboard-combo-chart.d.vue.ts +52 -0
  45. package/dist/runtime/dashboard/components/dashboard-combo-chart.vue +128 -0
  46. package/dist/runtime/dashboard/components/dashboard-combo-chart.vue.d.ts +52 -0
  47. package/dist/runtime/dashboard/components/dashboard-donut-chart.d.vue.ts +48 -0
  48. package/dist/runtime/dashboard/components/dashboard-donut-chart.vue +216 -0
  49. package/dist/runtime/dashboard/components/dashboard-donut-chart.vue.d.ts +48 -0
  50. package/dist/runtime/dashboard/components/dashboard-feed.d.vue.ts +49 -0
  51. package/dist/runtime/dashboard/components/dashboard-feed.vue +238 -0
  52. package/dist/runtime/dashboard/components/dashboard-feed.vue.d.ts +49 -0
  53. package/dist/runtime/dashboard/components/dashboard-funnel.d.vue.ts +34 -0
  54. package/dist/runtime/dashboard/components/dashboard-funnel.vue +157 -0
  55. package/dist/runtime/dashboard/components/dashboard-funnel.vue.d.ts +34 -0
  56. package/dist/runtime/dashboard/components/dashboard-gauge.d.vue.ts +55 -0
  57. package/dist/runtime/dashboard/components/dashboard-gauge.vue +177 -0
  58. package/dist/runtime/dashboard/components/dashboard-gauge.vue.d.ts +55 -0
  59. package/dist/runtime/dashboard/components/dashboard-grid.d.vue.ts +38 -0
  60. package/dist/runtime/dashboard/components/dashboard-grid.vue +49 -0
  61. package/dist/runtime/dashboard/components/dashboard-grid.vue.d.ts +38 -0
  62. package/dist/runtime/dashboard/components/dashboard-legend.d.vue.ts +8 -0
  63. package/dist/runtime/dashboard/components/dashboard-legend.vue +37 -0
  64. package/dist/runtime/dashboard/components/dashboard-legend.vue.d.ts +8 -0
  65. package/dist/runtime/dashboard/components/dashboard-line-chart.d.vue.ts +46 -0
  66. package/dist/runtime/dashboard/components/dashboard-line-chart.vue +129 -0
  67. package/dist/runtime/dashboard/components/dashboard-line-chart.vue.d.ts +46 -0
  68. package/dist/runtime/dashboard/components/dashboard-list.d.vue.ts +63 -0
  69. package/dist/runtime/dashboard/components/dashboard-list.vue +239 -0
  70. package/dist/runtime/dashboard/components/dashboard-list.vue.d.ts +63 -0
  71. package/dist/runtime/dashboard/components/dashboard-paired-bars.d.vue.ts +43 -0
  72. package/dist/runtime/dashboard/components/dashboard-paired-bars.vue +194 -0
  73. package/dist/runtime/dashboard/components/dashboard-paired-bars.vue.d.ts +43 -0
  74. package/dist/runtime/dashboard/components/dashboard-refresh.d.vue.ts +29 -0
  75. package/dist/runtime/dashboard/components/dashboard-refresh.vue +86 -0
  76. package/dist/runtime/dashboard/components/dashboard-refresh.vue.d.ts +29 -0
  77. package/dist/runtime/dashboard/components/dashboard-relative-time.d.vue.ts +12 -0
  78. package/dist/runtime/dashboard/components/dashboard-relative-time.vue +23 -0
  79. package/dist/runtime/dashboard/components/dashboard-relative-time.vue.d.ts +12 -0
  80. package/dist/runtime/dashboard/components/dashboard-stack-bar.d.vue.ts +36 -0
  81. package/dist/runtime/dashboard/components/dashboard-stack-bar.vue +162 -0
  82. package/dist/runtime/dashboard/components/dashboard-stack-bar.vue.d.ts +36 -0
  83. package/dist/runtime/dashboard/components/dashboard-stat.d.vue.ts +69 -0
  84. package/dist/runtime/dashboard/components/dashboard-stat.vue +279 -0
  85. package/dist/runtime/dashboard/components/dashboard-stat.vue.d.ts +69 -0
  86. package/dist/runtime/dashboard/components/dashboard-stats.d.vue.ts +38 -0
  87. package/dist/runtime/dashboard/components/dashboard-stats.vue +202 -0
  88. package/dist/runtime/dashboard/components/dashboard-stats.vue.d.ts +38 -0
  89. package/dist/runtime/dashboard/components/dashboard-table.d.vue.ts +52 -0
  90. package/dist/runtime/dashboard/components/dashboard-table.vue +305 -0
  91. package/dist/runtime/dashboard/components/dashboard-table.vue.d.ts +52 -0
  92. package/dist/runtime/dashboard/components/dashboard-tabs.d.vue.ts +35 -0
  93. package/dist/runtime/dashboard/components/dashboard-tabs.vue +55 -0
  94. package/dist/runtime/dashboard/components/dashboard-tabs.vue.d.ts +35 -0
  95. package/dist/runtime/dashboard/components/dashboard-total.d.vue.ts +10 -0
  96. package/dist/runtime/dashboard/components/dashboard-total.vue +32 -0
  97. package/dist/runtime/dashboard/components/dashboard-total.vue.d.ts +10 -0
  98. package/dist/runtime/dashboard/components/dashboard-widget.d.vue.ts +46 -0
  99. package/dist/runtime/dashboard/components/dashboard-widget.vue +84 -0
  100. package/dist/runtime/dashboard/components/dashboard-widget.vue.d.ts +46 -0
  101. package/dist/runtime/dashboard/composables/use-dashboard-api.d.ts +15 -0
  102. package/dist/runtime/dashboard/composables/use-dashboard-api.js +91 -0
  103. package/dist/runtime/dashboard/composables/use-dashboard-block.d.ts +22 -0
  104. package/dist/runtime/dashboard/composables/use-dashboard-block.js +35 -0
  105. package/dist/runtime/dashboard/composables/use-dashboard-chart.d.ts +36 -0
  106. package/dist/runtime/dashboard/composables/use-dashboard-chart.js +118 -0
  107. package/dist/runtime/dashboard/composables/use-dashboard-derived.d.ts +12 -0
  108. package/dist/runtime/dashboard/composables/use-dashboard-derived.js +47 -0
  109. package/dist/runtime/dashboard/composables/use-dashboard-format.d.ts +6 -0
  110. package/dist/runtime/dashboard/composables/use-dashboard-format.js +12 -0
  111. package/dist/runtime/dashboard/composables/use-dashboard-options.d.ts +8 -0
  112. package/dist/runtime/dashboard/composables/use-dashboard-options.js +63 -0
  113. package/dist/runtime/dashboard/composables/use-dashboard-param-scope.d.ts +30 -0
  114. package/dist/runtime/dashboard/composables/use-dashboard-param-scope.js +71 -0
  115. package/dist/runtime/dashboard/composables/use-dashboard-remote-options.d.ts +12 -0
  116. package/dist/runtime/dashboard/composables/use-dashboard-remote-options.js +117 -0
  117. package/dist/runtime/dashboard/composables/use-dashboard-resource.d.ts +35 -0
  118. package/dist/runtime/dashboard/composables/use-dashboard-resource.js +80 -0
  119. package/dist/runtime/dashboard/composables/use-dashboard-scope.d.ts +46 -0
  120. package/dist/runtime/dashboard/composables/use-dashboard-scope.js +127 -0
  121. package/dist/runtime/dashboard/composables/use-dashboard-time.d.ts +13 -0
  122. package/dist/runtime/dashboard/composables/use-dashboard-time.js +40 -0
  123. package/dist/runtime/dashboard/composables/use-dashboard-ui.d.ts +22 -0
  124. package/dist/runtime/dashboard/composables/use-dashboard-ui.js +19 -0
  125. package/dist/runtime/dashboard/composables/use-dashboard-views.d.ts +46 -0
  126. package/dist/runtime/dashboard/composables/use-dashboard-views.js +49 -0
  127. package/dist/runtime/dashboard/composables/use-dashboard.d.ts +24 -0
  128. package/dist/runtime/dashboard/composables/use-dashboard.js +42 -0
  129. package/dist/runtime/dashboard/constants/query.d.ts +16 -0
  130. package/dist/runtime/dashboard/constants/query.js +15 -0
  131. package/dist/runtime/dashboard/index.d.ts +4 -0
  132. package/dist/runtime/dashboard/index.js +3 -0
  133. package/dist/runtime/dashboard/schema/index.d.ts +57 -0
  134. package/dist/runtime/dashboard/schema/index.js +3 -0
  135. package/dist/runtime/dashboard/types/blocks.d.ts +251 -0
  136. package/dist/runtime/dashboard/types/blocks.js +0 -0
  137. package/dist/runtime/dashboard/types/charts.d.ts +60 -0
  138. package/dist/runtime/dashboard/types/charts.js +0 -0
  139. package/dist/runtime/dashboard/types/index.d.ts +7 -0
  140. package/dist/runtime/dashboard/types/index.js +0 -0
  141. package/dist/runtime/dashboard/types/options.d.ts +46 -0
  142. package/dist/runtime/dashboard/types/options.js +0 -0
  143. package/dist/runtime/dashboard/types/params.d.ts +115 -0
  144. package/dist/runtime/dashboard/types/params.js +0 -0
  145. package/dist/runtime/dashboard/types/resource.d.ts +106 -0
  146. package/dist/runtime/dashboard/types/resource.js +0 -0
  147. package/dist/runtime/dashboard/types/runtime.d.ts +44 -0
  148. package/dist/runtime/dashboard/types/runtime.js +0 -0
  149. package/dist/runtime/dashboard/types/schema.d.ts +171 -0
  150. package/dist/runtime/dashboard/types/schema.js +0 -0
  151. package/dist/runtime/dashboard/types/ui.d.ts +201 -0
  152. package/dist/runtime/dashboard/types/ui.js +0 -0
  153. package/dist/runtime/dashboard/utils/builders/dashboard-params.d.ts +85 -0
  154. package/dist/runtime/dashboard/utils/builders/dashboard-params.js +87 -0
  155. package/dist/runtime/dashboard/utils/chart-frame.d.ts +5 -0
  156. package/dist/runtime/dashboard/utils/chart-frame.js +27 -0
  157. package/dist/runtime/dashboard/utils/charts.d.ts +61 -0
  158. package/dist/runtime/dashboard/utils/charts.js +142 -0
  159. package/dist/runtime/dashboard/utils/comparison.d.ts +15 -0
  160. package/dist/runtime/dashboard/utils/comparison.js +19 -0
  161. package/dist/runtime/dashboard/utils/export.d.ts +13 -0
  162. package/dist/runtime/dashboard/utils/export.js +45 -0
  163. package/dist/runtime/dashboard/utils/options.d.ts +12 -0
  164. package/dist/runtime/dashboard/utils/options.js +23 -0
  165. package/dist/runtime/dashboard/utils/params/codecs.d.ts +14 -0
  166. package/dist/runtime/dashboard/utils/params/codecs.js +69 -0
  167. package/dist/runtime/dashboard/utils/resource.d.ts +16 -0
  168. package/dist/runtime/dashboard/utils/resource.js +39 -0
  169. package/dist/runtime/dashboard/utils/schema.d.ts +9 -0
  170. package/dist/runtime/dashboard/utils/schema.js +31 -0
  171. package/dist/runtime/dashboard/utils/sparkline.d.ts +21 -0
  172. package/dist/runtime/dashboard/utils/sparkline.js +53 -0
  173. package/dist/runtime/dashboard/utils/state.d.ts +28 -0
  174. package/dist/runtime/dashboard/utils/state.js +32 -0
  175. package/dist/runtime/dashboard/utils/time.d.ts +17 -0
  176. package/dist/runtime/dashboard/utils/time.js +60 -0
  177. package/dist/runtime/dashboard/utils/tracker.d.ts +12 -0
  178. package/dist/runtime/dashboard/utils/tracker.js +31 -0
  179. package/dist/runtime/dashboard/utils/ui.d.ts +38 -0
  180. package/dist/runtime/dashboard/utils/ui.js +24 -0
  181. package/dist/runtime/dashboard/utils/visibility.d.ts +2 -0
  182. package/dist/runtime/dashboard/utils/visibility.js +25 -0
  183. package/dist/runtime/form/components/root/form.vue +1 -1
  184. package/dist/runtime/form/composables/use-form-validation.d.ts +2 -3
  185. package/dist/runtime/form/composables/use-form-validation.js +24 -112
  186. package/dist/runtime/form/composables/use-form.js +1 -1
  187. package/dist/runtime/form/fields/password/component.vue +132 -28
  188. package/dist/runtime/form/fields/password/types.d.ts +6 -0
  189. package/dist/runtime/form/fields/text/component.vue +7 -2
  190. package/dist/runtime/form/types/field.d.ts +1 -1
  191. package/dist/runtime/form/types/options.d.ts +15 -36
  192. package/dist/runtime/form/types/validation.d.ts +3 -20
  193. package/dist/runtime/form/utils/state.d.ts +1 -14
  194. package/dist/runtime/form/utils/state.js +0 -199
  195. package/dist/runtime/i18n/locales/en.js +63 -0
  196. package/dist/runtime/i18n/locales/fr.js +63 -0
  197. package/dist/runtime/i18n/types.d.ts +68 -0
  198. package/dist/runtime/shared/index.d.ts +2 -0
  199. package/dist/runtime/shared/styles/tokens.css +1 -1
  200. package/dist/runtime/shared/types/query.d.ts +10 -0
  201. package/dist/runtime/shared/types/query.js +0 -0
  202. package/dist/runtime/shared/types/remote-options.d.ts +37 -0
  203. package/dist/runtime/shared/types/remote-options.js +0 -0
  204. package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.d.vue.ts +2 -2
  205. package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.vue.d.ts +2 -2
  206. package/dist/runtime/spreadsheet/composables/use-spreadsheet-internals.d.ts +15 -15
  207. package/dist/runtime/spreadsheet/composables/use-spreadsheet-resolutions.d.ts +2 -2
  208. package/dist/runtime/spreadsheet/schema/normalize.d.ts +1 -1
  209. package/dist/runtime/spreadsheet/utils/references/sources.d.ts +1 -1
  210. package/dist/runtime/table/components/data-list/data-list-content.d.vue.ts +20 -18
  211. package/dist/runtime/table/components/data-list/data-list-content.vue +14 -87
  212. package/dist/runtime/table/components/data-list/data-list-content.vue.d.ts +20 -18
  213. package/dist/runtime/table/components/data-list/data-list-default.d.vue.ts +1 -4
  214. package/dist/runtime/table/components/data-list/data-list-default.vue.d.ts +1 -4
  215. package/dist/runtime/table/components/data-list/data-list-error-state.d.vue.ts +13 -0
  216. package/dist/runtime/table/components/data-list/data-list-error-state.vue +91 -0
  217. package/dist/runtime/table/components/data-list/data-list-error-state.vue.d.ts +13 -0
  218. package/dist/runtime/table/components/data-list/data-list-infinite-loader.d.vue.ts +1 -1
  219. package/dist/runtime/table/components/data-list/data-list-infinite-loader.vue.d.ts +1 -1
  220. package/dist/runtime/table/components/data-list/data-list-layout-switch.d.vue.ts +1 -1
  221. package/dist/runtime/table/components/data-list/data-list-layout-switch.vue +1 -1
  222. package/dist/runtime/table/components/data-list/data-list-layout-switch.vue.d.ts +1 -1
  223. package/dist/runtime/table/components/data-list/data-list-pagination.d.vue.ts +1 -1
  224. package/dist/runtime/table/components/data-list/data-list-pagination.vue.d.ts +1 -1
  225. package/dist/runtime/table/components/data-list/data-list-refresh.vue +42 -4
  226. package/dist/runtime/table/components/data-list/data-list-root.d.vue.ts +1 -9
  227. package/dist/runtime/table/components/data-list/data-list-root.vue.d.ts +1 -9
  228. package/dist/runtime/table/components/data-list/data-list-sort-menu.d.vue.ts +1 -1
  229. package/dist/runtime/table/components/data-list/data-list-sort-menu.vue +11 -5
  230. package/dist/runtime/table/components/data-list/data-list-sort-menu.vue.d.ts +1 -1
  231. package/dist/runtime/table/components/data-list/sort-menu-panel.d.vue.ts +2 -2
  232. package/dist/runtime/table/components/data-list/sort-menu-panel.vue.d.ts +2 -2
  233. package/dist/runtime/table/components/data-list.d.vue.ts +2 -13
  234. package/dist/runtime/table/components/data-list.vue.d.ts +2 -13
  235. package/dist/runtime/table/components/drawers/column-panel.vue +7 -2
  236. package/dist/runtime/table/components/filters/panel/filter-panel-chips.vue +2 -5
  237. package/dist/runtime/table/components/filters/panel/option-filter-panel-field.vue +1 -1
  238. package/dist/runtime/table/components/filters/shared/dynamic-filter-picker.d.vue.ts +2 -2
  239. package/dist/runtime/table/components/filters/shared/dynamic-filter-picker.vue +103 -101
  240. package/dist/runtime/table/components/filters/shared/dynamic-filter-picker.vue.d.ts +2 -2
  241. package/dist/runtime/table/components/filters/shared/filter-match-mode-button.d.vue.ts +1 -1
  242. package/dist/runtime/table/components/filters/shared/filter-match-mode-button.vue.d.ts +1 -1
  243. package/dist/runtime/table/components/filters/shared/filter-option-multiple-list.vue +2 -2
  244. package/dist/runtime/table/components/filters/shared/filter-option-picker-content.vue +3 -3
  245. package/dist/runtime/table/components/filters/shared/filter-option-single-list.vue +1 -1
  246. package/dist/runtime/table/components/filters/shared/filter-popover-shell.d.vue.ts +3 -3
  247. package/dist/runtime/table/components/filters/shared/filter-popover-shell.vue +17 -15
  248. package/dist/runtime/table/components/filters/shared/filter-popover-shell.vue.d.ts +3 -3
  249. package/dist/runtime/table/components/filters/shared/filter-searchable-panel.vue +10 -2
  250. package/dist/runtime/table/components/filters/sheet/filter-sheet.vue +4 -3
  251. package/dist/runtime/table/components/filters/tags/filter-tags-bar.vue +1 -1
  252. package/dist/runtime/table/components/grid/grid-renderer.vue +2 -4
  253. package/dist/runtime/table/components/layout/table-footer.d.vue.ts +1 -1
  254. package/dist/runtime/table/components/layout/table-footer.vue.d.ts +1 -1
  255. package/dist/runtime/table/components/table/table-cell-ellipsis.d.ts +1 -1
  256. package/dist/runtime/table/components/table/table-renderer.d.vue.ts +8 -2
  257. package/dist/runtime/table/components/table/table-renderer.vue +24 -6
  258. package/dist/runtime/table/components/table/table-renderer.vue.d.ts +8 -2
  259. package/dist/runtime/table/composables/use-option-filter-editor-state.d.ts +1 -0
  260. package/dist/runtime/table/composables/use-option-filter-editor-state.js +2 -2
  261. package/dist/runtime/table/composables/use-query-state.d.ts +3 -3
  262. package/dist/runtime/table/composables/use-table-actions.js +10 -5
  263. package/dist/runtime/table/composables/use-table-api.js +4 -1
  264. package/dist/runtime/table/composables/use-table-columns.d.ts +9 -5
  265. package/dist/runtime/table/composables/use-table-data.d.ts +2 -1
  266. package/dist/runtime/table/composables/use-table-data.js +19 -2
  267. package/dist/runtime/table/composables/use-table-filter-options.d.ts +1 -0
  268. package/dist/runtime/table/composables/use-table-filter-options.js +2 -1
  269. package/dist/runtime/table/composables/use-table-internals.d.ts +45 -33
  270. package/dist/runtime/table/composables/use-table-pagination.d.ts +2 -2
  271. package/dist/runtime/table/composables/use-table-selection.d.ts +1 -1
  272. package/dist/runtime/table/composables/use-table-state.d.ts +3 -3
  273. package/dist/runtime/table/types/actions.d.ts +3 -2
  274. package/dist/runtime/table/types/data-list.d.ts +8 -0
  275. package/dist/runtime/table/types/source.d.ts +14 -6
  276. package/dist/runtime/table/utils/builders/table-source.d.ts +14 -15
  277. package/dist/runtime/table/utils/client-query.d.ts +1 -1
  278. package/dist/runtime/table/utils/columns/menu.d.ts +1 -1
  279. package/dist/runtime/table/utils/columns/render.d.ts +13 -5
  280. package/dist/runtime/table/utils/columns/render.js +3 -2
  281. package/dist/runtime/table/utils/columns/state.d.ts +1 -1
  282. package/dist/runtime/table/utils/data-list-ui.d.ts +1 -1
  283. package/dist/runtime/table/utils/filters/editor-size.js +9 -9
  284. package/dist/runtime/table/utils/filters/options.js +6 -1
  285. package/dist/runtime/table/utils/index.d.ts +1 -0
  286. package/dist/runtime/table/utils/index.js +1 -0
  287. package/dist/runtime/table/utils/prefetch.js +5 -1
  288. package/dist/runtime/table/utils/source-request.d.ts +2 -0
  289. package/dist/runtime/table/utils/source-request.js +9 -0
  290. package/package.json +28 -1
@@ -1,17 +1,11 @@
1
1
  <script setup>
2
- import UButton from "@nuxt/ui/components/Button.vue";
3
- import UIcon from "@nuxt/ui/components/Icon.vue";
4
2
  import { computed, nextTick, ref, watch } from "vue";
5
- import { useUiToolsLocale } from "#ui-tools/i18n";
6
3
  import { isNumber } from "../../../shared/utils/predicate";
7
4
  import { useDataListUi } from "../../composables/use-data-list-ui";
8
5
  import { provideDataListViewport } from "../../composables/use-data-list-viewport";
9
6
  import { useTableInternals } from "../../composables/use-table-internals";
10
- import {
11
- mergeDataListUiClass,
12
- resolveDataListContentShellClass,
13
- resolveDataListControlGeometry
14
- } from "../../utils";
7
+ import { mergeDataListUiClass, resolveDataListContentShellClass } from "../../utils";
8
+ import DataListErrorState from "./data-list-error-state.vue";
15
9
  import DataListGrid from "./data-list-grid.vue";
16
10
  import DataListTable from "./data-list-table.vue";
17
11
  const props = defineProps({
@@ -24,14 +18,13 @@ const props = defineProps({
24
18
  });
25
19
  const internals = useTableInternals();
26
20
  const dataListUi = useDataListUi();
27
- const { t } = useUiToolsLocale();
28
21
  const viewport = ref(null);
29
22
  provideDataListViewport(viewport);
30
23
  const rows = computed(() => internals.queryContent.data.value.rows);
31
24
  const loading = computed(
32
- () => internals.queryContent.status.value.isBooting || internals.queryContent.status.value.isPending && rows.value.length === 0
25
+ () => internals.queryContent.status.value.isBooting || (internals.queryContent.status.value.isPending || internals.queryContent.status.value.isFetching) && rows.value.length === 0
33
26
  );
34
- const error = computed(() => rows.value.length ? null : internals.queryContent.error.value);
27
+ const error = computed(() => internals.queryContent.error.value);
35
28
  const empty = computed(() => !loading.value && !error.value && rows.value.length === 0);
36
29
  const hasActiveQuery = computed(
37
30
  () => internals.filters.hasActiveSearch.value || internals.filters.hasActiveUiFilters.value
@@ -55,7 +48,6 @@ const rootUi = computed(() => dataListUi.ui.value.content?.ui);
55
48
  const resolvedSize = computed(
56
49
  () => props.size ?? dataListUi.ui.value.content?.size ?? dataListUi.controlSize.value
57
50
  );
58
- const geometry = computed(() => resolveDataListControlGeometry(resolvedSize.value));
59
51
  const shellClass = computed(
60
52
  () => resolveDataListContentShellClass({
61
53
  layout: internals.controls.tableLayout.value,
@@ -106,81 +98,13 @@ watch(
106
98
  :name="$slots['initial-loading'] ? 'initial-loading' : 'loading'"
107
99
  :layout="internals.controls.tableLayout.value"
108
100
  />
109
- <slot v-else-if="error" name="error" :error="error" :retry="refresh">
110
- <div
111
- :class="
112
- mergeDataListUiClass(
113
- 'grid min-h-64 place-items-center px-4 py-10 text-center',
114
- rootUi?.error,
115
- ui?.error
116
- )
117
- "
118
- >
119
- <div
120
- :class="
121
- mergeDataListUiClass(
122
- `flex max-w-md items-start text-left ${geometry.toolbarGap}`,
123
- rootUi?.errorBody,
124
- ui?.errorBody
125
- )
126
- "
127
- >
128
- <span
129
- :class="
130
- mergeDataListUiClass(
131
- 'grid size-9 shrink-0 place-items-center rounded-md bg-error/10 text-error',
132
- rootUi?.errorIcon,
133
- ui?.errorIcon
134
- )
135
- "
136
- >
137
- <UIcon name="i-lucide-cloud-alert" class="size-4" />
138
- </span>
139
- <div
140
- :class="
141
- mergeDataListUiClass(
142
- `min-w-0 flex-1 ${geometry.text}`,
143
- rootUi?.errorCopy,
144
- ui?.errorCopy
145
- )
146
- "
147
- >
148
- <div
149
- :class="
150
- mergeDataListUiClass(
151
- 'font-medium text-highlighted',
152
- rootUi?.errorTitle,
153
- ui?.errorTitle
154
- )
155
- "
156
- >
157
- {{ t("table.states.gridError.title") }}
158
- </div>
159
- <p
160
- :class="
161
- mergeDataListUiClass(
162
- 'mt-0.5 leading-5 text-muted',
163
- rootUi?.errorDescription,
164
- ui?.errorDescription
165
- )
166
- "
167
- >
168
- {{ t("table.states.gridError.description") }}
169
- </p>
170
- <UButton
171
- color="neutral"
172
- variant="soft"
173
- :size="resolvedSize"
174
- icon="i-lucide-refresh-cw"
175
- class="mt-3"
176
- :ui="{ base: mergeDataListUiClass(rootUi?.retry, ui?.retry) }"
177
- @click="refresh"
178
- >
179
- {{ t("table.states.gridError.action") }}
180
- </UButton>
181
- </div>
182
- </div>
183
- </div>
101
+ <slot
102
+ v-else-if="error && internals.controls.tableLayout.value === 'grid'"
103
+ name="error"
104
+ :error="error"
105
+ :retry="refresh"
106
+ >
107
+ <DataListErrorState min-height="16rem" :size="resolvedSize" :ui="ui" @retry="refresh" />
184
108
  </slot>
185
109
  <slot
186
110
  v-else-if="empty && $slots.empty"
@@ -207,6 +131,9 @@ watch(
207
131
  >
208
132
  <slot v-if="internals.controls.tableLayout.value === 'table'" name="table" :rows="rows">
209
133
  <DataListTable :size="resolvedSize" :fill="fit !== 'content'" class="min-h-0 flex-1">
134
+ <template v-if="$slots.error" #error="scope">
135
+ <slot name="error" v-bind="scope" />
136
+ </template>
210
137
  <template #empty>
211
138
  <slot name="empty-table">
212
139
  <slot
@@ -14,32 +14,32 @@ declare var __VLS_1: {}, __VLS_4: "loading" | "initial-loading", __VLS_5: {
14
14
  }, __VLS_7: {
15
15
  error: {};
16
16
  retry: typeof refresh;
17
- }, __VLS_22: {
17
+ }, __VLS_16: {
18
18
  layout: import("../../types/index.js").TableLayout;
19
19
  refresh: typeof refresh;
20
20
  hasActiveQuery: boolean;
21
21
  clearQuery: typeof clearQuery;
22
- }, __VLS_24: {
22
+ }, __VLS_18: {
23
23
  layout: import("../../types/index.js").TableLayout;
24
24
  rows: object[];
25
25
  loading: boolean;
26
26
  empty: boolean;
27
27
  error: unknown;
28
- }, __VLS_32: {
28
+ }, __VLS_26: {
29
29
  rows: object[];
30
- }, __VLS_41: {}, __VLS_43: {
30
+ }, __VLS_35: any, __VLS_38: {}, __VLS_40: {
31
31
  layout: string;
32
32
  refresh: typeof refresh;
33
33
  hasActiveQuery: boolean;
34
34
  clearQuery: typeof clearQuery;
35
- }, __VLS_45: {
35
+ }, __VLS_42: {
36
36
  rows: object[];
37
- }, __VLS_54: {}, __VLS_56: {
37
+ }, __VLS_51: {}, __VLS_53: {
38
38
  layout: string;
39
39
  refresh: typeof refresh;
40
40
  hasActiveQuery: boolean;
41
41
  clearQuery: typeof clearQuery;
42
- }, __VLS_58: {}, __VLS_60: {};
42
+ }, __VLS_55: {}, __VLS_57: {};
43
43
  type __VLS_Slots = {} & {
44
44
  [K in NonNullable<typeof __VLS_4>]?: (props: typeof __VLS_5) => any;
45
45
  } & {
@@ -47,30 +47,32 @@ type __VLS_Slots = {} & {
47
47
  } & {
48
48
  error?: (props: typeof __VLS_7) => any;
49
49
  } & {
50
- empty?: (props: typeof __VLS_22) => any;
50
+ empty?: (props: typeof __VLS_16) => any;
51
51
  } & {
52
- content?: (props: typeof __VLS_24) => any;
52
+ content?: (props: typeof __VLS_18) => any;
53
53
  } & {
54
- table?: (props: typeof __VLS_32) => any;
54
+ table?: (props: typeof __VLS_26) => any;
55
55
  } & {
56
- 'empty-table'?: (props: typeof __VLS_41) => any;
56
+ error?: (props: typeof __VLS_35) => any;
57
57
  } & {
58
- empty?: (props: typeof __VLS_43) => any;
58
+ 'empty-table'?: (props: typeof __VLS_38) => any;
59
59
  } & {
60
- grid?: (props: typeof __VLS_45) => any;
60
+ empty?: (props: typeof __VLS_40) => any;
61
61
  } & {
62
- 'empty-grid'?: (props: typeof __VLS_54) => any;
62
+ grid?: (props: typeof __VLS_42) => any;
63
63
  } & {
64
- empty?: (props: typeof __VLS_56) => any;
64
+ 'empty-grid'?: (props: typeof __VLS_51) => any;
65
65
  } & {
66
- refreshing?: (props: typeof __VLS_58) => any;
66
+ empty?: (props: typeof __VLS_53) => any;
67
67
  } & {
68
- after?: (props: typeof __VLS_60) => any;
68
+ refreshing?: (props: typeof __VLS_55) => any;
69
+ } & {
70
+ after?: (props: typeof __VLS_57) => any;
69
71
  };
70
72
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
71
73
  transition: boolean;
72
- fit: DataListContentFit;
73
74
  surface: DataListContentSurface;
75
+ fit: DataListContentFit;
74
76
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
75
77
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
76
78
  declare const _default: typeof __VLS_export;
@@ -9,10 +9,7 @@ declare var __VLS_1: {}, __VLS_18: {}, __VLS_52: {
9
9
  layout: import("../../types/index.js").TableLayout;
10
10
  }, __VLS_55: {
11
11
  layout: import("../../types/index.js").TableLayout;
12
- }, __VLS_58: {
13
- error: {};
14
- retry: () => void;
15
- }, __VLS_61: {
12
+ }, __VLS_58: any, __VLS_61: {
16
13
  layout: string;
17
14
  refresh: () => void;
18
15
  hasActiveQuery: boolean;
@@ -9,10 +9,7 @@ declare var __VLS_1: {}, __VLS_18: {}, __VLS_52: {
9
9
  layout: import("../../types/index.js").TableLayout;
10
10
  }, __VLS_55: {
11
11
  layout: import("../../types/index.js").TableLayout;
12
- }, __VLS_58: {
13
- error: {};
14
- retry: () => void;
15
- }, __VLS_61: {
12
+ }, __VLS_58: any, __VLS_61: {
16
13
  layout: string;
17
14
  refresh: () => void;
18
15
  hasActiveQuery: boolean;
@@ -0,0 +1,13 @@
1
+ import type { DataListContentUi, DataListControlSize } from '../../types/index.js';
2
+ type __VLS_Props = {
3
+ minHeight?: string;
4
+ size?: DataListControlSize;
5
+ ui?: DataListContentUi;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ retry: () => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onRetry?: (() => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,91 @@
1
+ <script setup>
2
+ import UButton from "@nuxt/ui/components/Button.vue";
3
+ import UIcon from "@nuxt/ui/components/Icon.vue";
4
+ import { computed } from "vue";
5
+ import { useUiToolsLocale } from "#ui-tools/i18n";
6
+ import { useDataListUi } from "../../composables/use-data-list-ui";
7
+ import { mergeDataListUiClass, resolveDataListControlGeometry } from "../../utils";
8
+ const props = defineProps({
9
+ minHeight: { type: String, required: false },
10
+ size: { type: String, required: false },
11
+ ui: { type: Object, required: false }
12
+ });
13
+ const emit = defineEmits(["retry"]);
14
+ const dataListUi = useDataListUi();
15
+ const { t } = useUiToolsLocale();
16
+ const rootUi = computed(() => dataListUi.ui.value.content?.ui);
17
+ const resolvedSize = computed(
18
+ () => props.size ?? dataListUi.ui.value.content?.size ?? dataListUi.controlSize.value
19
+ );
20
+ const geometry = computed(() => resolveDataListControlGeometry(resolvedSize.value));
21
+ </script>
22
+
23
+ <template>
24
+ <div
25
+ :class="
26
+ mergeDataListUiClass(
27
+ 'grid place-items-center px-4 py-10 text-center',
28
+ rootUi?.error,
29
+ ui?.error
30
+ )
31
+ "
32
+ :style="{ minHeight }"
33
+ >
34
+ <div
35
+ :class="
36
+ mergeDataListUiClass(
37
+ `flex max-w-md items-start text-left ${geometry.toolbarGap}`,
38
+ rootUi?.errorBody,
39
+ ui?.errorBody
40
+ )
41
+ "
42
+ >
43
+ <span
44
+ :class="
45
+ mergeDataListUiClass(
46
+ 'grid size-9 shrink-0 place-items-center rounded-md bg-error/10 text-error',
47
+ rootUi?.errorIcon,
48
+ ui?.errorIcon
49
+ )
50
+ "
51
+ >
52
+ <UIcon name="i-lucide-cloud-alert" class="size-4" />
53
+ </span>
54
+ <div
55
+ :class="
56
+ mergeDataListUiClass(`min-w-0 flex-1 ${geometry.text}`, rootUi?.errorCopy, ui?.errorCopy)
57
+ "
58
+ >
59
+ <div
60
+ :class="
61
+ mergeDataListUiClass('font-medium text-highlighted', rootUi?.errorTitle, ui?.errorTitle)
62
+ "
63
+ >
64
+ {{ t("table.states.gridError.title") }}
65
+ </div>
66
+ <p
67
+ :class="
68
+ mergeDataListUiClass(
69
+ 'mt-0.5 leading-5 text-muted',
70
+ rootUi?.errorDescription,
71
+ ui?.errorDescription
72
+ )
73
+ "
74
+ >
75
+ {{ t("table.states.gridError.description") }}
76
+ </p>
77
+ <UButton
78
+ color="neutral"
79
+ variant="soft"
80
+ :size="resolvedSize"
81
+ icon="i-lucide-refresh-cw"
82
+ class="mt-3"
83
+ :ui="{ base: mergeDataListUiClass(rootUi?.retry, ui?.retry) }"
84
+ @click="emit('retry')"
85
+ >
86
+ {{ t("table.states.gridError.action") }}
87
+ </UButton>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { DataListContentUi, DataListControlSize } from '../../types/index.js';
2
+ type __VLS_Props = {
3
+ minHeight?: string;
4
+ size?: DataListControlSize;
5
+ ui?: DataListContentUi;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ retry: () => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onRetry?: (() => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -22,7 +22,7 @@ declare var __VLS_1: {
22
22
  isLoadingMore: boolean;
23
23
  loadMoreError: unknown;
24
24
  loadedCount: number;
25
- mode: "none" | "offset" | "cursor";
25
+ mode: "cursor" | "none" | "offset";
26
26
  pageCount: number;
27
27
  pageIndex: number;
28
28
  pageSize: number;
@@ -22,7 +22,7 @@ declare var __VLS_1: {
22
22
  isLoadingMore: boolean;
23
23
  loadMoreError: unknown;
24
24
  loadedCount: number;
25
- mode: "none" | "offset" | "cursor";
25
+ mode: "cursor" | "none" | "offset";
26
26
  pageCount: number;
27
27
  pageIndex: number;
28
28
  pageSize: number;
@@ -17,8 +17,8 @@ type __VLS_Slots = {} & {
17
17
  default?: (props: typeof __VLS_1) => any;
18
18
  };
19
19
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
- mobile: boolean;
21
20
  order: TableLayout[];
21
+ mobile: boolean;
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
24
  declare const _default: typeof __VLS_export;
@@ -42,7 +42,7 @@ function buttonProps(active) {
42
42
  ) : base;
43
43
  }
44
44
  function setLayout(layout) {
45
- internals.controls.setTableLayout(layout);
45
+ internals.tableApi.layout.set(layout);
46
46
  }
47
47
  </script>
48
48
 
@@ -17,8 +17,8 @@ type __VLS_Slots = {} & {
17
17
  default?: (props: typeof __VLS_1) => any;
18
18
  };
19
19
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
- mobile: boolean;
21
20
  order: TableLayout[];
21
+ mobile: boolean;
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
24
  declare const _default: typeof __VLS_export;
@@ -11,7 +11,7 @@ declare var __VLS_1: {
11
11
  isLoadingMore: boolean;
12
12
  loadMoreError: unknown;
13
13
  loadedCount: number;
14
- mode: "none" | "offset" | "cursor";
14
+ mode: "cursor" | "none" | "offset";
15
15
  pageCount: number;
16
16
  pageIndex: number;
17
17
  pageSize: number;
@@ -11,7 +11,7 @@ declare var __VLS_1: {
11
11
  isLoadingMore: boolean;
12
12
  loadMoreError: unknown;
13
13
  loadedCount: number;
14
- mode: "none" | "offset" | "cursor";
14
+ mode: "cursor" | "none" | "offset";
15
15
  pageCount: number;
16
16
  pageIndex: number;
17
17
  pageSize: number;
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
2
  import UButton from "@nuxt/ui/components/Button.vue";
3
- import { computed } from "vue";
3
+ import { usePreferredReducedMotion } from "@vueuse/core";
4
+ import { computed, onBeforeUnmount, ref, watch } from "vue";
4
5
  import { useUiToolsLocale } from "#ui-tools/i18n";
5
6
  import { useDataListUi } from "../../composables/use-data-list-ui";
6
7
  import { useTableInternals } from "../../composables/use-table-internals";
@@ -14,9 +15,13 @@ const props = defineProps({
14
15
  const internals = useTableInternals();
15
16
  const dataListUi = useDataListUi();
16
17
  const { t } = useUiToolsLocale();
18
+ const preferredMotion = usePreferredReducedMotion();
17
19
  const loading = computed(
18
20
  () => internals.queryContent.status.value.isFetching || internals.queryContent.status.value.isRefreshing || internals.queryContent.status.value.isRevalidating
19
21
  );
22
+ const completingSpin = ref(false);
23
+ const spinning = computed(() => loading.value || completingSpin.value);
24
+ let completionFallback;
20
25
  const resolvedSize = computed(
21
26
  () => props.size ?? dataListUi.ui.value.refresh?.size ?? dataListUi.controlSize.value
22
27
  );
@@ -34,6 +39,37 @@ const buttonProps = computed(
34
39
  function refresh() {
35
40
  void internals.queryContent.refreshData()();
36
41
  }
42
+ function finishSpin() {
43
+ completingSpin.value = false;
44
+ clearTimeout(completionFallback);
45
+ completionFallback = void 0;
46
+ }
47
+ function onSpinIteration(event) {
48
+ if (event.animationName === "nut-dl-refresh-spin" && !loading.value) {
49
+ finishSpin();
50
+ }
51
+ }
52
+ watch(
53
+ loading,
54
+ (next, previous) => {
55
+ if (next) {
56
+ finishSpin();
57
+ return;
58
+ }
59
+ if (!previous || preferredMotion.value === "reduce") {
60
+ return;
61
+ }
62
+ completingSpin.value = true;
63
+ completionFallback = setTimeout(finishSpin, 750);
64
+ },
65
+ { flush: "sync" }
66
+ );
67
+ watch(preferredMotion, (motion) => {
68
+ if (motion === "reduce") {
69
+ finishSpin();
70
+ }
71
+ });
72
+ onBeforeUnmount(() => clearTimeout(completionFallback));
37
73
  </script>
38
74
 
39
75
  <template>
@@ -48,21 +84,23 @@ function refresh() {
48
84
  :square="!label"
49
85
  :aria-label="t('table.header.refreshData')"
50
86
  :title="t('table.header.refreshData')"
51
- :data-refreshing="loading"
87
+ :aria-busy="loading"
88
+ :data-refreshing="spinning"
52
89
  :ui="{
53
90
  ...resolvedUi,
54
91
  base: mergeDataListUiClass('nut-dl-refresh', void 0, resolvedUi.base),
55
92
  leadingIcon: mergeDataListUiClass(
56
- loading ? 'nut-dl-refresh__icon--spinning' : 'nut-dl-refresh__icon',
93
+ spinning ? 'nut-dl-refresh__icon--spinning' : 'nut-dl-refresh__icon',
57
94
  void 0,
58
95
  resolvedUi.leadingIcon
59
96
  )
60
97
  }"
98
+ @animationiteration="onSpinIteration"
61
99
  @click="refresh"
62
100
  />
63
101
  </slot>
64
102
  </template>
65
103
 
66
104
  <style>
67
- .nut-dl-refresh__icon--spinning{animation:nut-dl-refresh-spin .7s linear infinite}@keyframes nut-dl-refresh-spin{to{transform:rotate(1turn)}}
105
+ .nut-dl-refresh__icon--spinning{animation:nut-dl-refresh-spin .7s linear infinite}@keyframes nut-dl-refresh-spin{to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){.nut-dl-refresh__icon--spinning{animation:none}}
68
106
  </style>
@@ -1,13 +1,5 @@
1
- import type { ComputedRef } from 'vue';
2
1
  import type { UiToolsLocale, UiToolsMessages } from '#ui-tools/i18n';
3
- import type { TableInternals } from '../../composables/use-table-internals.js';
4
- import type { DataListControlSize, DataListDensity, DataListUiConfig } from '../../types/index.js';
5
- interface DataListTable {
6
- schema: ComputedRef<{
7
- tableKey: string;
8
- }>;
9
- __internals: TableInternals;
10
- }
2
+ import type { DataListControlSize, DataListDensity, DataListTable, DataListUiConfig } from '../../types/index.js';
11
3
  type __VLS_Props = {
12
4
  table: DataListTable;
13
5
  locale?: UiToolsLocale<UiToolsMessages>;
@@ -1,13 +1,5 @@
1
- import type { ComputedRef } from 'vue';
2
1
  import type { UiToolsLocale, UiToolsMessages } from '#ui-tools/i18n';
3
- import type { TableInternals } from '../../composables/use-table-internals.js';
4
- import type { DataListControlSize, DataListDensity, DataListUiConfig } from '../../types/index.js';
5
- interface DataListTable {
6
- schema: ComputedRef<{
7
- tableKey: string;
8
- }>;
9
- __internals: TableInternals;
10
- }
2
+ import type { DataListControlSize, DataListDensity, DataListTable, DataListUiConfig } from '../../types/index.js';
11
3
  type __VLS_Props = {
12
4
  table: DataListTable;
13
5
  locale?: UiToolsLocale<UiToolsMessages>;
@@ -10,7 +10,7 @@ declare var __VLS_29: {
10
10
  label: string | null;
11
11
  sorting: {
12
12
  active: boolean;
13
- dir: "desc" | "asc" | undefined;
13
+ dir: "asc" | "desc" | undefined;
14
14
  key: string | undefined;
15
15
  };
16
16
  setSorting: (sorting: {
@@ -154,15 +154,21 @@ function humanize(value) {
154
154
  v-bind="triggerControlProps"
155
155
  icon="i-lucide-arrow-down-up"
156
156
  :ui="{
157
- base: mergeDataListUiClass('nut-dl-sortbtn', void 0, resolvedUi.trigger),
158
- label: resolvedUi.triggerLabel,
157
+ base: mergeDataListUiClass(
158
+ 'nut-dl-sortbtn min-w-0 max-w-full',
159
+ void 0,
160
+ resolvedUi.trigger
161
+ ),
162
+ label: mergeDataListUiClass('min-w-0', void 0, resolvedUi.triggerLabel),
159
163
  leadingIcon: resolvedUi.triggerLeadingIcon,
160
164
  trailingIcon: resolvedUi.triggerTrailingIcon
161
165
  }"
162
166
  >
163
- <span class="nut-dl-sortbtn__label flex items-center gap-1.5">
164
- <span>{{ label ?? t("table.controls.sort") }}</span>
165
- <span v-if="activeLabel" class="font-semibold text-highlighted">{{ activeLabel }}</span>
167
+ <span class="nut-dl-sortbtn__label flex min-w-0 items-center gap-1.5">
168
+ <span class="shrink-0">{{ label ?? t("table.controls.sort") }}</span>
169
+ <span v-if="activeLabel" class="min-w-0 truncate font-semibold text-highlighted">{{
170
+ activeLabel
171
+ }}</span>
166
172
  <UIcon
167
173
  v-if="activeLabel"
168
174
  :name="activeDirection === 'asc' ? 'i-lucide-arrow-up' : 'i-lucide-arrow-down'"
@@ -10,7 +10,7 @@ declare var __VLS_29: {
10
10
  label: string | null;
11
11
  sorting: {
12
12
  active: boolean;
13
- dir: "desc" | "asc" | undefined;
13
+ dir: "asc" | "desc" | undefined;
14
14
  key: string | undefined;
15
15
  };
16
16
  setSorting: (sorting: {
@@ -7,10 +7,10 @@ type __VLS_Props = {
7
7
  };
8
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
9
  selectKey: (key: string) => any;
10
- selectDirection: (direction: "desc" | "asc") => any;
10
+ selectDirection: (direction: "asc" | "desc") => any;
11
11
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
12
  onSelectKey?: ((key: string) => any) | undefined;
13
- onSelectDirection?: ((direction: "desc" | "asc") => any) | undefined;
13
+ onSelectDirection?: ((direction: "asc" | "desc") => any) | undefined;
14
14
  }>, {
15
15
  compact: boolean;
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -7,10 +7,10 @@ type __VLS_Props = {
7
7
  };
8
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
9
  selectKey: (key: string) => any;
10
- selectDirection: (direction: "desc" | "asc") => any;
10
+ selectDirection: (direction: "asc" | "desc") => any;
11
11
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
12
  onSelectKey?: ((key: string) => any) | undefined;
13
- onSelectDirection?: ((direction: "desc" | "asc") => any) | undefined;
13
+ onSelectDirection?: ((direction: "asc" | "desc") => any) | undefined;
14
14
  }>, {
15
15
  compact: boolean;
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;