@nxgt/material-vue 0.41.0 → 0.43.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 (161) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/README.md +20 -6
  3. package/dist/{Button-BG3oDkrl.js → Button-C3K6dhqd.js} +4 -4
  4. package/dist/{HoverCardTrigger-Dh1ar_W4.js → HoverCardTrigger-Bga4YjEr.js} +69 -62
  5. package/dist/backgrounds/backgrounds.css +8 -0
  6. package/dist/backgrounds/css/base.css +169 -0
  7. package/dist/backgrounds/css/gradient.css +53 -0
  8. package/dist/backgrounds/css/grain.css +19 -0
  9. package/dist/backgrounds/css/motion.css +30 -0
  10. package/dist/backgrounds.js +111 -0
  11. package/dist/{camera-DV9jcl_3.js → camera-BbF9_-ys.js} +4 -4
  12. package/dist/components/base.css +5 -2
  13. package/dist/components/components.css +5 -0
  14. package/dist/components/theme-tokens.css +21 -0
  15. package/dist/{components-C1JYYoQ4.js → components-yCdbry6Q.js} +13880 -13101
  16. package/dist/components.js +8 -8
  17. package/dist/composables.js +3 -3
  18. package/dist/dnd.js +1 -1
  19. package/dist/{form-scope-CeD0v_mw.js → form-scope-CkWJrBCu.js} +1 -1
  20. package/dist/{i18n-provider-D5XyLQ3P.js → i18n-provider-tL27-a8y.js} +1 -1
  21. package/dist/i18n.js +4 -4
  22. package/dist/{icon-button-DXrmfs6e.js → icon-button-MyFFJpXA.js} +4 -4
  23. package/dist/lib/backgrounds/background/background.vue.d.ts +22 -0
  24. package/dist/lib/backgrounds/background/index.d.ts +2 -0
  25. package/dist/lib/backgrounds/background/partials/background-layers.vue.d.ts +9 -0
  26. package/dist/lib/backgrounds/background/partials/scene-svg.d.ts +10 -0
  27. package/dist/lib/backgrounds/background/types.d.ts +24 -0
  28. package/dist/lib/backgrounds/index.d.ts +13 -0
  29. package/dist/lib/components/ui/actions/button/button-tones.d.ts +3 -3
  30. package/dist/lib/components/ui/actions/responsive-button/responsive-button.vue.d.ts +3 -3
  31. package/dist/lib/components/ui/collections/data-table/data-table-context.d.ts +4 -0
  32. package/dist/lib/components/ui/collections/data-table/data-table.vue.d.ts +8 -0
  33. package/dist/lib/components/ui/collections/data-table/partials/data-table-body.vue.d.ts +8 -0
  34. package/dist/lib/components/ui/collections/data-table/partials/data-table-empty.vue.d.ts +5 -1
  35. package/dist/lib/components/ui/collections/data-table/partials/data-table-toolbar.d.ts +16 -3
  36. package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +36 -0
  37. package/dist/lib/components/ui/collections/data-table/types.d.ts +15 -0
  38. package/dist/lib/components/ui/collections/data-table/use-data-table.d.ts +2 -0
  39. package/dist/lib/components/ui/feedback/circular-progress/circular-progress.vue.d.ts +1 -1
  40. package/dist/lib/components/ui/feedback/empty-state/empty-state.vue.d.ts +21 -8
  41. package/dist/lib/components/ui/feedback/empty-state/index.d.ts +1 -1
  42. package/dist/lib/components/ui/feedback/error-state/error-state.vue.d.ts +54 -0
  43. package/dist/lib/components/ui/feedback/error-state/index.d.ts +3 -0
  44. package/dist/lib/components/ui/feedback/error-state/partials/error-state-details.vue.d.ts +7 -0
  45. package/dist/lib/components/ui/feedback/index.d.ts +1 -0
  46. package/dist/lib/components/ui/feedback/state-frame/state-frame.vue.d.ts +36 -0
  47. package/dist/lib/components/ui/feedback/state-frame/state-icon.vue.d.ts +7 -0
  48. package/dist/lib/components/ui/feedback/state-frame/state-illustration.vue.d.ts +8 -0
  49. package/dist/lib/components/ui/feedback/state-frame/state-tones.d.ts +11 -0
  50. package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
  51. package/dist/lib/components/ui/layout/account-menu/account-menu-avatar.vue.d.ts +9 -0
  52. package/dist/lib/components/ui/layout/account-menu/account-menu.vue.d.ts +38 -0
  53. package/dist/lib/components/ui/layout/account-menu/index.d.ts +3 -0
  54. package/dist/lib/components/ui/layout/account-menu/types.d.ts +10 -0
  55. package/dist/lib/components/ui/layout/app-shell/activity-layout.vue.d.ts +21 -5
  56. package/dist/lib/components/ui/layout/app-shell/app-brand-logo.vue.d.ts +20 -0
  57. package/dist/lib/components/ui/layout/app-shell/app-brand.vue.d.ts +30 -0
  58. package/dist/lib/components/ui/layout/app-shell/app-header.vue.d.ts +13 -5
  59. package/dist/lib/components/ui/layout/app-shell/app-sidebar.vue.d.ts +12 -2
  60. package/dist/lib/components/ui/layout/app-shell/index.d.ts +1 -1
  61. package/dist/lib/components/ui/layout/app-shell/types.d.ts +10 -0
  62. package/dist/lib/components/ui/layout/app-shell/use-truncated-title.d.ts +10 -0
  63. package/dist/lib/components/ui/layout/background/background.vue.d.ts +18 -3
  64. package/dist/lib/components/ui/layout/doc/partials/doc-empty.vue.d.ts +7 -4
  65. package/dist/lib/components/ui/layout/index.d.ts +1 -0
  66. package/dist/lib/components/ui/media/stx-player/stx-player-viewport.vue.d.ts +2 -2
  67. package/dist/lib/components/ui/overlays/command/CommandSeparator.vue.d.ts +3 -1
  68. package/dist/lib/components/ui/overlays/dialog/in-dialog.d.ts +1 -1
  69. package/dist/lib/components/ui/overlays/dialog/use-escape-forward.d.ts +13 -0
  70. package/dist/lib/components/ui/overlays/dialog/use-modal-content.d.ts +2 -0
  71. package/dist/lib/components/ui/primitives/nonce-provider/nonce-provider.vue.d.ts +4 -1
  72. package/dist/lib/components/ui/selection/autocomplete/autocomplete-keyboard.d.ts +22 -4
  73. package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-box.vue.d.ts +6 -2
  74. package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-list.vue.d.ts +7 -0
  75. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-active.d.ts +17 -0
  76. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-keydown.d.ts +21 -0
  77. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-open.d.ts +3 -3
  78. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +2 -1
  79. package/dist/lib/components/ui/selection/autocomplete/use-drawer-room.d.ts +11 -0
  80. package/dist/lib/components/ui/selection/autocomplete/use-query-change.d.ts +8 -0
  81. package/dist/lib/components/ui/widgets/charts/chart-container.vue.d.ts +2 -2
  82. package/dist/lib/components/ui/widgets/kanban/partials/kanban-empty.vue.d.ts +1 -0
  83. package/dist/lib/composables/use-background-activity.d.ts +8 -0
  84. package/dist/lib/i18n/resources/en/en.d.ts +28 -0
  85. package/dist/lib/i18n/resources/en/material.json.d.ts +29 -1
  86. package/dist/lib/i18n/resources/fr/fr.d.ts +28 -0
  87. package/dist/lib/i18n/resources/fr/material.json.d.ts +29 -1
  88. package/dist/lib/i18n/resources/resources.d.ts +56 -0
  89. package/dist/lib/i18n/translator.d.ts +1 -1
  90. package/dist/lib/lib/index.d.ts +1 -0
  91. package/dist/lib/nuxt/component-names.d.ts +1 -1
  92. package/dist/lib/nuxt/module.d.ts +2 -11
  93. package/dist/lib/nuxt/pdf-fonts.d.ts +1 -1
  94. package/dist/lib/nuxt/plugin-options.d.ts +58 -0
  95. package/dist/lib/vite/index.d.ts +4 -8
  96. package/dist/lib.js +52 -51
  97. package/dist/main.js +17 -17
  98. package/dist/map.js +4 -4
  99. package/dist/material-vue.css +1 -1
  100. package/dist/{pdf-outline-sidebar-CgmJjhUz.js → pdf-outline-sidebar-Kqsfd_cO.js} +2 -2
  101. package/dist/{pdf-page-BjQNWV72.js → pdf-page-Dx3jwxu6.js} +1 -1
  102. package/dist/{pdf-page-list-nG0l4SjH.js → pdf-page-list-BsQmEHaY.js} +2 -2
  103. package/dist/{pdf-reader-Dekd4Ymw.js → pdf-reader-CJo8SQVl.js} +15 -15
  104. package/dist/{pdf-sidebar-gDj63dRH.js → pdf-sidebar-CcCUATl-.js} +3 -3
  105. package/dist/{pdf-thumbnail-sidebar-C5ikii1Z.js → pdf-thumbnail-sidebar-BRxNRGfG.js} +4 -4
  106. package/dist/{pdf-toolbar-DmmrSlCq.js → pdf-toolbar-B0ckYBJ2.js} +4 -4
  107. package/dist/pdf.js +2 -2
  108. package/dist/{print-format.utils-CiUiQE-i.js → print-format.utils-51joHpFb.js} +2 -2
  109. package/dist/{sortable-provider-lK0srHJF.js → sortable-provider-BEx1B0Ky.js} +2 -2
  110. package/dist/{stored-language-dM2e5qaS.js → stored-language-DVP9KzRu.js} +58 -2
  111. package/dist/{stx-player-C2VQCXFc.js → stx-player-KPp9c7vS.js} +5 -5
  112. package/dist/styles.css +4 -0
  113. package/dist/{translator-DXL5RDRg.js → translator-Bm7i7dv-.js} +1 -1
  114. package/dist/use-background-activity-DdTBbNpX.js +17 -0
  115. package/dist/{use-heading-spy-Btwc0yad.js → use-heading-spy-jn8f2ioE.js} +13 -13
  116. package/dist/{use-material-translation-Du3Wvsk1.js → use-material-translation-CfFZPSe0.js} +3 -3
  117. package/dist/vite.js +7 -2
  118. package/docs/README.md +3 -0
  119. package/docs/components/README.md +2 -1
  120. package/docs/components/buttons-and-actions.md +2 -0
  121. package/docs/components/data-table-filter-and-lists.md +59 -8
  122. package/docs/components/feedback-and-status.md +79 -8
  123. package/docs/components/media-and-files.md +2 -0
  124. package/docs/components/navigation-and-layout.md +68 -5
  125. package/docs/components/overlays-and-menus.md +20 -3
  126. package/docs/components/primitives.md +5 -3
  127. package/docs/components/rich-widgets.md +1 -1
  128. package/docs/components/selection-and-choice.md +14 -4
  129. package/docs/getting-started.md +22 -3
  130. package/docs/guides/app-shell.md +99 -19
  131. package/docs/guides/backgrounds.md +143 -0
  132. package/docs/guides/csp.md +48 -6
  133. package/docs/guides/helpers.md +1 -0
  134. package/docs/guides/i18n.md +52 -2
  135. package/docs/guides/migrate-to-vite-plugin.md +259 -0
  136. package/docs/guides/pdf.md +11 -4
  137. package/docs/guides/ssr.md +1 -1
  138. package/docs/guides/theming.md +52 -4
  139. package/docs/guides/vite-plugin.md +194 -0
  140. package/docs/previews/backgrounds-matrix.webp +0 -0
  141. package/docs/previews/feedback-status-emptystate.webp +0 -0
  142. package/docs/previews/feedback-status-errorstate.webp +0 -0
  143. package/docs/previews/navigation-layout-accountmenu.webp +0 -0
  144. package/docs/roadmap.md +69 -32
  145. package/docs/troubleshooting.md +251 -7
  146. package/lib/backgrounds/backgrounds.css +8 -0
  147. package/lib/backgrounds/css/base.css +169 -0
  148. package/lib/backgrounds/css/gradient.css +53 -0
  149. package/lib/backgrounds/css/grain.css +19 -0
  150. package/lib/backgrounds/css/motion.css +30 -0
  151. package/lib/components/base.css +5 -2
  152. package/lib/components/components.css +5 -0
  153. package/lib/components/theme-tokens.css +21 -0
  154. package/lib/nuxt/component-names.ts +2 -0
  155. package/lib/nuxt/module.ts +29 -15
  156. package/lib/nuxt/pdf-fonts.ts +1 -1
  157. package/lib/nuxt/plugin-options.ts +92 -0
  158. package/lib/nuxt/runtime/inter.css +6 -0
  159. package/lib/styles.css +4 -0
  160. package/lib/vite/index.ts +19 -2
  161. package/package.json +24 -2
@@ -1,7 +1,7 @@
1
1
  import { n as e } from "./rolldown-runtime-CWhphoD1.js";
2
2
  import { t } from "./utils-CykWQ0iJ.js";
3
- import { Lf as n } from "./components-C1JYYoQ4.js";
4
- import { t as r } from "./use-material-translation-Du3Wvsk1.js";
3
+ import { Rf as n } from "./components-yCdbry6Q.js";
4
+ import { t as r } from "./use-material-translation-CfFZPSe0.js";
5
5
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, openBlock as p, ref as m, renderList as h, toDisplayString as g, unref as _, withCtx as v } from "vue";
6
6
  //#region lib/components/ui/media/pdf-viewer/partials/pdf-outline-row.vue?vue&type=script&setup=true&lang.ts
7
7
  var y = {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { Kp as t } from "./components-C1JYYoQ4.js";
2
+ import { qp as t } from "./components-yCdbry6Q.js";
3
3
  import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, nextTick as c, normalizeClass as l, normalizeStyle as u, onBeforeUnmount as d, openBlock as f, ref as p, shallowRef as m, unref as h, watch as g } from "vue";
4
4
  import { DEFAULT_PAGE_SIZE as _, escapeHtml as v, findTextMatches as y, highlightItemHtml as b, placeholderSize as x, rotatedSize as S } from "@nxgt/material-core/pdf-viewer";
5
5
  //#region lib/components/ui/media/pdf-viewer/pdf-note-icons.ts
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./rolldown-runtime-CWhphoD1.js";
2
- import { Lf as t } from "./components-C1JYYoQ4.js";
3
- import { t as n } from "./pdf-page-BjQNWV72.js";
2
+ import { Rf as t } from "./components-yCdbry6Q.js";
3
+ import { t as n } from "./pdf-page-Dx3jwxu6.js";
4
4
  import { Fragment as r, createBlock as i, createElementBlock as a, createElementVNode as o, defineComponent as s, openBlock as c, renderList as l, withCtx as u } from "vue";
5
5
  //#region lib/components/ui/media/pdf-viewer/partials/pdf-page-list.vue?vue&type=script&setup=true&lang.ts
6
6
  var d = { class: "flex flex-col items-center gap-4 px-4 py-4" }, f = /*@__PURE__*/ s({
@@ -1,12 +1,12 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { kn as t } from "./components-C1JYYoQ4.js";
3
- import { t as n } from "./use-material-translation-Du3Wvsk1.js";
4
- import { t as r } from "./Button-BG3oDkrl.js";
5
- import { o as i } from "./HoverCardTrigger-Dh1ar_W4.js";
6
- import { n as a } from "./pdf-page-BjQNWV72.js";
7
- import { t as o } from "./pdf-page-list-nG0l4SjH.js";
8
- import { t as s } from "./pdf-sidebar-gDj63dRH.js";
9
- import { t as c } from "./pdf-toolbar-DmmrSlCq.js";
2
+ import { kn as t } from "./components-yCdbry6Q.js";
3
+ import { t as n } from "./use-material-translation-CfFZPSe0.js";
4
+ import { t as r } from "./Button-C3K6dhqd.js";
5
+ import { o as i } from "./HoverCardTrigger-Bga4YjEr.js";
6
+ import { n as a } from "./pdf-page-Dx3jwxu6.js";
7
+ import { t as o } from "./pdf-page-list-BsQmEHaY.js";
8
+ import { t as s } from "./pdf-sidebar-CcCUATl-.js";
9
+ import { t as c } from "./pdf-toolbar-B0ckYBJ2.js";
10
10
  import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, nextTick as _, normalizeClass as v, onBeforeUnmount as y, onMounted as b, openBlock as x, reactive as S, ref as C, shallowRef as w, toDisplayString as T, toRef as E, unref as D, useId as O, watch as k, withCtx as A } from "vue";
11
11
  import { AlertCircle as j, FileX2 as M, KeyRound as N, Loader2 as P } from "@lucide/vue";
12
12
  import { pdfSourceKey as F, toPdfjsParams as I } from "@nxgt/material-core/pdf-source";
@@ -150,7 +150,7 @@ var ae = { class: "absolute inset-0 flex flex-col items-center justify-center ga
150
150
  __name: "pdf-loading-overlay",
151
151
  setup(e) {
152
152
  let { t } = n();
153
- return (e, n) => (x(), f("div", le, [h(D(P), { class: "size-8 animate-spin text-primary" }), p("p", ue, T(D(t)("material.pdf-reader.loading", "Loading document…")), 1)]));
153
+ return (e, n) => (x(), f("div", le, [h(D(P), { class: "size-8 animate-spin text-primary-text" }), p("p", ue, T(D(t)("material.pdf-reader.loading", "Loading document…")), 1)]));
154
154
  }
155
155
  }), fe = { class: "absolute inset-0 flex flex-col items-center justify-center gap-4" }, pe = { class: "text-sm font-semibold" }, me = ["id"], he = /* @__PURE__ */ g({
156
156
  __name: "pdf-password-form",
@@ -168,7 +168,7 @@ var ae = { class: "absolute inset-0 flex flex-col items-center justify-center ga
168
168
  e.key === "Enter" && o("submit");
169
169
  }
170
170
  return (t, n) => (x(), f("div", fe, [
171
- h(D(N), { class: "size-10 text-primary opacity-70" }),
171
+ h(D(N), { class: "size-10 text-primary-text opacity-70" }),
172
172
  p("p", pe, T(D(s)("material.pdf-reader.password", "Password protected")), 1),
173
173
  p("div", {
174
174
  ref_key: "fields",
@@ -362,11 +362,11 @@ function Q(e) {
362
362
  u(() => clearTimeout(f));
363
363
  }, { flush: "post" }), k(t, (t, o, s) => {
364
364
  if (!t) return;
365
- let c = L(() => e.containerRef.value, () => e.pageRefs, (t) => {
366
- a && te(e.pageRefs.get(a)) || (i(), n = t, e.goToPage(t));
367
- });
368
- r = c, n > 1 && c.hold(), s(() => {
369
- c.stop(), r = null;
365
+ let c = () => te(e.pageRefs.get(a)), l = L(() => e.containerRef.value, () => e.pageRefs, (t) => {
366
+ a && c() || (i(), n = t, e.goToPage(t));
367
+ }, { readerPosition: () => !a || c() });
368
+ r = l, n > 1 && l.hold(), s(() => {
369
+ l.stop(), r = null;
370
370
  });
371
371
  }), k(e.currentPage, (a) => {
372
372
  if (!t.value || e.numPages() === 0 || a === n) return;
@@ -1,8 +1,8 @@
1
1
  import { n as e } from "./rolldown-runtime-CWhphoD1.js";
2
2
  import { t } from "./utils-CykWQ0iJ.js";
3
- import { t as n } from "./use-material-translation-Du3Wvsk1.js";
4
- import { t as r } from "./pdf-outline-sidebar-CgmJjhUz.js";
5
- import { t as i } from "./pdf-thumbnail-sidebar-C5ikii1Z.js";
3
+ import { t as n } from "./use-material-translation-CfFZPSe0.js";
4
+ import { t as r } from "./pdf-outline-sidebar-Kqsfd_cO.js";
5
+ import { t as i } from "./pdf-thumbnail-sidebar-BRxNRGfG.js";
6
6
  import { createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, toDisplayString as d, unref as f, useId as p, useTemplateRef as m } from "vue";
7
7
  //#region lib/components/ui/media/pdf-viewer/partials/pdf-sidebar.vue?vue&type=script&setup=true&lang.ts
8
8
  var h = ["aria-label"], g = ["aria-label"], _ = [
@@ -1,8 +1,8 @@
1
1
  import { n as e } from "./rolldown-runtime-CWhphoD1.js";
2
2
  import { t } from "./utils-CykWQ0iJ.js";
3
- import { Lf as n } from "./components-C1JYYoQ4.js";
4
- import { t as r } from "./use-material-translation-Du3Wvsk1.js";
5
- import { t as i } from "./pdf-page-BjQNWV72.js";
3
+ import { Rf as n } from "./components-yCdbry6Q.js";
4
+ import { t as r } from "./use-material-translation-CfFZPSe0.js";
5
+ import { t as i } from "./pdf-page-Dx3jwxu6.js";
6
6
  import { Fragment as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderList as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
7
7
  //#region lib/components/ui/media/pdf-viewer/partials/pdf-thumbnail-sidebar.vue?vue&type=script&setup=true&lang.ts
8
8
  var _ = ["aria-label"], v = {
@@ -56,7 +56,7 @@ var _ = ["aria-label"], v = {
56
56
  "rotation",
57
57
  "page-size",
58
58
  "eager"
59
- ])]), c("span", { class: d(h(t)("text-xs font-medium transition-colors", e.currentPage === n ? "text-primary" : "text-muted-foreground")) }, m(n), 3)], 10, b))), 128))])]),
59
+ ])]), c("span", { class: d(h(t)("text-xs font-medium transition-colors", e.currentPage === n ? "text-primary-text" : "text-muted-foreground")) }, m(n), 3)], 10, b))), 128))])]),
60
60
  _: 1
61
61
  })], 10, _));
62
62
  }
@@ -1,10 +1,10 @@
1
1
  import { n as e } from "./rolldown-runtime-CWhphoD1.js";
2
2
  import { t } from "./utils-CykWQ0iJ.js";
3
- import { t as n } from "./use-material-translation-Du3Wvsk1.js";
4
- import { f as r } from "./Button-BG3oDkrl.js";
5
- import { t as i } from "./icon-button-DXrmfs6e.js";
3
+ import { t as n } from "./use-material-translation-CfFZPSe0.js";
4
+ import { f as r } from "./Button-C3K6dhqd.js";
5
+ import { t as i } from "./icon-button-MyFFJpXA.js";
6
6
  import { a, i as o, n as s, o as c, r as l, t as u } from "./DropdownMenuTrigger-C7uYPf_9.js";
7
- import { o as d } from "./HoverCardTrigger-Dh1ar_W4.js";
7
+ import { o as d } from "./HoverCardTrigger-Bga4YjEr.js";
8
8
  import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, nextTick as x, normalizeClass as S, openBlock as C, ref as w, renderList as T, toDisplayString as E, unref as D, useTemplateRef as O, watch as k, withCtx as A } from "vue";
9
9
  import { ChevronDown as j, ChevronLeft as M, ChevronRight as N, ChevronUp as P, Download as F, Maximize2 as I, Minimize2 as L, Moon as R, Printer as z, RotateCw as B, Search as V, Sidebar as H, ZoomIn as U, ZoomOut as W } from "@lucide/vue";
10
10
  //#region lib/components/ui/media/pdf-viewer/partials/pdf-toolbar-search.vue?vue&type=script&setup=true&lang.ts
package/dist/pdf.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as e, t } from "./use-material-translation-Du3Wvsk1.js";
2
- import { t as n } from "./Button-BG3oDkrl.js";
1
+ import { n as e, t } from "./use-material-translation-CfFZPSe0.js";
2
+ import { t as n } from "./Button-C3K6dhqd.js";
3
3
  import { computed as r, createBlock as i, createTextVNode as a, defineComponent as o, getCurrentInstance as s, nextTick as c, onMounted as l, onScopeDispose as u, openBlock as d, ref as f, renderSlot as p, shallowRef as m, toDisplayString as ee, toValue as h, unref as g, watch as te, withCtx as ne } from "vue";
4
4
  import { contentDisposition as re, pdfBytesResponse as ie, toWebStream as ae } from "@nxgt/material-core/pdf/http";
5
5
  import { badge as oe, dataTable as se, defaultPdfTheme as ce, definePdfDocument as _, divider as v, header as y, heading as b, image as x, keyValue as S, keyValueOf as C, link as w, metric as T, page as E, pageBreak as D, pageNumber as O, pdfDocument as k, resolvePdfColor as A, resolvePdfTheme as j, row as M, section as N, spacer as P, stack as F, table as I, text as L, totals as R } from "@nxgt/material-core/pdf/model";
@@ -1,5 +1,5 @@
1
- import { i as e, r as t, t as n } from "./stored-language-dM2e5qaS.js";
2
- import { r } from "./translator-DXL5RDRg.js";
1
+ import { i as e, r as t, t as n } from "./stored-language-DVP9KzRu.js";
2
+ import { r } from "./translator-Bm7i7dv-.js";
3
3
  import { t as i } from "./_baseIsEqual-BUD8VQJE.js";
4
4
  import { E as a } from "./number.utils-C1eB3GDr.js";
5
5
  import { defineComponent as o, getCurrentInstance as s, h as c, inject as l, provide as u, useId as d } from "vue";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { t } from "./use-material-translation-Du3Wvsk1.js";
3
- import { t as n } from "./icon-button-DXrmfs6e.js";
2
+ import { t } from "./use-material-translation-CfFZPSe0.js";
3
+ import { t as n } from "./icon-button-MyFFJpXA.js";
4
4
  import { Teleport as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createVNode as c, defineComponent as l, inject as u, mergeProps as d, normalizeStyle as f, onUnmounted as p, openBlock as m, provide as h, reactive as g, ref as _, renderSlot as v, toValue as y, unref as b, useAttrs as x, watch as S, watchEffect as C, withCtx as w, withModifiers as T } from "vue";
5
5
  import { GripVertical as E } from "@lucide/vue";
6
6
  import { Primitive as D } from "reka-ui";
@@ -32,9 +32,30 @@ var e = {
32
32
  description: "The service is down for a short update."
33
33
  }
34
34
  },
35
+ "error-state": {
36
+ generic: {
37
+ title: "Something Went Wrong",
38
+ description: "An unexpected error occurred. Please try again later."
39
+ },
40
+ offline: {
41
+ title: "You are offline",
42
+ description: "Check your connection and try again."
43
+ },
44
+ maintenance: {
45
+ title: "We'll be right back",
46
+ description: "The service is down for a short update."
47
+ },
48
+ retry: "Retry",
49
+ details: "Technical details",
50
+ "details-name": "Name",
51
+ "details-message": "Message",
52
+ "details-cause": "Cause"
53
+ },
35
54
  command: {
36
55
  title: "Command Palette",
37
- description: "Search for a command to run..."
56
+ description: "Search for a command to run...",
57
+ empty: "No results",
58
+ list: "Suggestions"
38
59
  },
39
60
  "confirm-dialog": {
40
61
  confirm: "Confirm",
@@ -343,6 +364,8 @@ var e = {
343
364
  "delete-selected-rows": "Delete {count} rows",
344
365
  "toggle-columns": "Toggle columns",
345
366
  "no-data": "No data available",
367
+ "no-results": "No results",
368
+ "no-results-description": "Try a different search or clear the filters.",
346
369
  "select-all": "Select all",
347
370
  "select-row": "Select row",
348
371
  "toggle-row": "Toggle row details",
@@ -594,6 +617,7 @@ var e = {
594
617
  empty: "No document selected",
595
618
  loading: "Loading document…",
596
619
  error: "Failed to load document",
620
+ retry: "Retry",
597
621
  password: "Password protected",
598
622
  "password-placeholder": "Enter password",
599
623
  "password-label": "Password",
@@ -789,6 +813,10 @@ var e = {
789
813
  "open-menu": "Open menu",
790
814
  navigation: "Navigation"
791
815
  },
816
+ "account-menu": {
817
+ trigger: "Account menu, {name}",
818
+ "sign-out": "Sign out"
819
+ },
792
820
  filter: {
793
821
  title: "Filters",
794
822
  trigger: "Filters",
@@ -1276,9 +1304,30 @@ var e = {
1276
1304
  description: "Le service est en courte mise à jour."
1277
1305
  }
1278
1306
  },
1307
+ "error-state": {
1308
+ generic: {
1309
+ title: "Une erreur est survenue",
1310
+ description: "Une erreur inattendue s'est produite. Veuillez réessayer plus tard."
1311
+ },
1312
+ offline: {
1313
+ title: "Vous êtes hors ligne",
1314
+ description: "Vérifiez votre connexion et réessayez."
1315
+ },
1316
+ maintenance: {
1317
+ title: "On revient tout de suite",
1318
+ description: "Le service est en courte mise à jour."
1319
+ },
1320
+ retry: "Réessayer",
1321
+ details: "Détails techniques",
1322
+ "details-name": "Nom",
1323
+ "details-message": "Message",
1324
+ "details-cause": "Cause"
1325
+ },
1279
1326
  command: {
1280
1327
  title: "Palette de commandes",
1281
- description: "Recherchez une commande à exécuter..."
1328
+ description: "Recherchez une commande à exécuter...",
1329
+ empty: "Aucun résultat",
1330
+ list: "Commandes suggérées"
1282
1331
  },
1283
1332
  "confirm-dialog": {
1284
1333
  confirm: "Confirmer",
@@ -1587,6 +1636,8 @@ var e = {
1587
1636
  "delete-selected-rows": "Supprimer {count} lignes",
1588
1637
  "toggle-columns": "Basculer les colonnes",
1589
1638
  "no-data": "Données non disponibles",
1639
+ "no-results": "Aucun résultat",
1640
+ "no-results-description": "Essayez une autre recherche ou retirez les filtres.",
1590
1641
  "select-all": "Tout sélectionner",
1591
1642
  "select-row": "Sélectionner la ligne",
1592
1643
  "toggle-row": "Afficher ou masquer les détails de la ligne",
@@ -1838,6 +1889,7 @@ var e = {
1838
1889
  empty: "Aucun document sélectionné",
1839
1890
  loading: "Chargement du document…",
1840
1891
  error: "Impossible de charger le document",
1892
+ retry: "Réessayer",
1841
1893
  password: "Protégé par mot de passe",
1842
1894
  "password-placeholder": "Saisir le mot de passe",
1843
1895
  "password-label": "Mot de passe",
@@ -2033,6 +2085,10 @@ var e = {
2033
2085
  "open-menu": "Ouvrir le menu",
2034
2086
  navigation: "Navigation"
2035
2087
  },
2088
+ "account-menu": {
2089
+ trigger: "Menu du compte, {name}",
2090
+ "sign-out": "Se déconnecter"
2091
+ },
2036
2092
  filter: {
2037
2093
  title: "Filtres",
2038
2094
  trigger: "Filtres",
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { $t as t, Jt as n, Qt as r, Xt as i, Yp as a, Yt as o, en as s, tn as c } from "./components-C1JYYoQ4.js";
3
- import { t as l } from "./use-material-translation-Du3Wvsk1.js";
2
+ import { $t as t, Jt as n, Qt as r, Xt as i, Yt as a, Zp as o, en as s, tn as c } from "./components-yCdbry6Q.js";
3
+ import { t as l } from "./use-material-translation-CfFZPSe0.js";
4
4
  import { createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, normalizeClass as _, openBlock as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
5
5
  //#region lib/components/ui/media/stx-player/partials/stx-player-frame.vue?vue&type=script&setup=true&lang.ts
6
6
  var S = ["data-layout", "aria-label"], C = {
@@ -35,10 +35,10 @@ var S = ["data-layout", "aria-label"], C = {
35
35
  key: 1,
36
36
  class: _(b(e)("grid gap-3", i.showQueue && "@min-[768px]:grid-cols-[minmax(0,1fr)_18rem] @min-[768px]:items-stretch"))
37
37
  }, [p("div", { class: _(b(e)("bg-card overflow-hidden rounded border", b(w).current?.kind === "audio" && "flex flex-col gap-4 p-6")) }, [
38
- b(w).current?.kind === "audio" ? (v(), f("div", C, [h(a, { variant: "title-medium" }, {
38
+ b(w).current?.kind === "audio" ? (v(), f("div", C, [h(o, { variant: "title-medium" }, {
39
39
  default: x(() => [m(y(b(w).current.title), 1)]),
40
40
  _: 1
41
- }), b(w).current.artist ? (v(), u(a, {
41
+ }), b(w).current.artist ? (v(), u(o, {
42
42
  key: 0,
43
43
  class: "text-muted-foreground"
44
44
  }, {
@@ -62,7 +62,7 @@ var S = ["data-layout", "aria-label"], C = {
62
62
  trailing: x(() => [h(t, { tone: "surface" })]),
63
63
  _: 1
64
64
  })) : d("", !0)
65
- ], 2), i.showQueue ? (v(), u(o, {
65
+ ], 2), i.showQueue ? (v(), u(a, {
66
66
  key: 0,
67
67
  class: "min-h-72"
68
68
  })) : d("", !0)], 2))], 10, S));
package/dist/styles.css CHANGED
@@ -34,10 +34,14 @@
34
34
  --color-popover-foreground: var(--popover-foreground);
35
35
  --color-primary: var(--primary);
36
36
  --color-primary-foreground: var(--primary-foreground);
37
+ --color-primary-text: var(--primary-text);
37
38
  --color-primary-container: --alpha(var(--primary-foreground) / 20%);
38
39
  --color-secondary: var(--secondary);
39
40
  --color-secondary-foreground: var(--secondary-foreground);
40
41
  --color-secondary-container: --alpha(var(--secondary-foreground) / 20%);
42
+ --color-tertiary: var(--tertiary);
43
+ --color-tertiary-foreground: var(--tertiary-foreground);
44
+ --color-tertiary-container: --alpha(var(--tertiary) / 20%);
41
45
  --color-muted: var(--muted);
42
46
  --color-muted-foreground: var(--muted-foreground);
43
47
  --color-track: var(--track);
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, r as n, t as r } from "./stored-language-dM2e5qaS.js";
1
+ import { a as e, i as t, r as n, t as r } from "./stored-language-DVP9KzRu.js";
2
2
  import { t as i } from "./get-CTzJAwfc.js";
3
3
  //#region ../../node_modules/@formatjs/fast-memoize/index.js
4
4
  function a(e, t) {
@@ -0,0 +1,17 @@
1
+ import { onBeforeUnmount as e, onMounted as t, ref as n, watch as r } from "vue";
2
+ import { observeBackgroundActivity as i } from "@nxgt/material-core/backgrounds";
3
+ //#region lib/composables/use-background-activity.ts
4
+ function a(a, o) {
5
+ let s = n(!1), c, l = () => {
6
+ c?.(), c = void 0, s.value = !1;
7
+ }, u = () => {
8
+ l(), o() && a.value && (c = i(a.value, (e) => {
9
+ s.value = e;
10
+ }));
11
+ };
12
+ return t(() => {
13
+ u(), r(o, u);
14
+ }), e(l), s;
15
+ }
16
+ //#endregion
17
+ export { a as t };
@@ -1,29 +1,29 @@
1
- import { a as e } from "./i18n-provider-D5XyLQ3P.js";
1
+ import { a as e } from "./i18n-provider-tL27-a8y.js";
2
2
  import { c as t, d as n, l as r, n as i, s as a, u as o } from "./number.utils-C1eB3GDr.js";
3
3
  import { computed as s, getCurrentInstance as c, inject as l, onMounted as u, ref as d, shallowRef as f, toValue as p, watch as m } from "vue";
4
4
  import { injectConfigProviderContext as h } from "reka-ui";
5
5
  import { useIntersectionObserver as g, useMediaQuery as _, useSSRWidth as v, useStorage as y } from "@vueuse/core";
6
+ //#region lib/composables/use-ssr-media-query.ts
7
+ var b = 1024;
8
+ function x(e) {
9
+ return c() ? _(e, { ssrWidth: v() ?? b }) : _(e);
10
+ }
11
+ //#endregion
6
12
  //#region lib/composables/resolve-theme.ts
7
- function b(e, t) {
13
+ function S(e, t) {
8
14
  let n = e === "light" || e === "dark" ? e : "system";
9
15
  return {
10
16
  theme: n === "system" ? t ? "dark" : "light" : n,
11
17
  preference: n
12
18
  };
13
19
  }
14
- function x(e) {
15
- typeof document > "u" || (document.documentElement.classList.toggle("dark", e === "dark"), document.documentElement.style.colorScheme = e);
16
- }
17
- //#endregion
18
- //#region lib/composables/use-ssr-media-query.ts
19
- var S = 1024;
20
20
  function C(e) {
21
- return c() ? _(e, { ssrWidth: v() ?? S }) : _(e);
21
+ typeof document > "u" || (document.documentElement.classList.toggle("dark", e === "dark"), document.documentElement.style.colorScheme = e);
22
22
  }
23
23
  //#endregion
24
24
  //#region lib/composables/use-theme.ts
25
25
  function w() {
26
- let e = C("(prefers-color-scheme: dark)"), t = y("theme", null, void 0, { initOnMounted: !0 }), n = s(() => b(t.value, !!e.value));
26
+ let e = x("(prefers-color-scheme: dark)"), t = y("theme", null, void 0, { initOnMounted: !0 }), n = s(() => S(t.value, !!e.value));
27
27
  return {
28
28
  get theme() {
29
29
  return n.value.theme;
@@ -32,7 +32,7 @@ function w() {
32
32
  return n.value.preference;
33
33
  },
34
34
  updateTheme: (n) => {
35
- n === "system" ? t.value = null : t.value = n, x(b(n === "system" ? void 0 : n, !!e.value).theme);
35
+ n === "system" ? t.value = null : t.value = n, C(S(n === "system" ? void 0 : n, !!e.value).theme);
36
36
  }
37
37
  };
38
38
  }
@@ -40,7 +40,7 @@ function w() {
40
40
  //#region lib/composables/use-mobile.ts
41
41
  var T = 768;
42
42
  function E() {
43
- return C(`(max-width: ${T - 1}px)`);
43
+ return x(`(max-width: ${T - 1}px)`);
44
44
  }
45
45
  //#endregion
46
46
  //#region ../../node_modules/date-fns/locale/fr/_lib/formatDistance.js
@@ -495,4 +495,4 @@ function q(e, t, n) {
495
495
  });
496
496
  }
497
497
  //#endregion
498
- export { V as a, w as c, b as d, W as i, C as l, U as n, B as o, H as r, E as s, q as t, x as u };
498
+ export { V as a, w as c, x as d, W as i, C as l, U as n, B as o, H as r, E as s, q as t, S as u };
@@ -1,6 +1,6 @@
1
- import "./stored-language-dM2e5qaS.js";
2
- import { a as e } from "./i18n-provider-D5XyLQ3P.js";
3
- import { i as t, r as n } from "./translator-DXL5RDRg.js";
1
+ import "./stored-language-DVP9KzRu.js";
2
+ import { a as e } from "./i18n-provider-tL27-a8y.js";
3
+ import { i as t, r as n } from "./translator-Bm7i7dv-.js";
4
4
  //#region lib/i18n/translate-material.ts
5
5
  function r(e, r, i, a) {
6
6
  if (e) for (let t of /* @__PURE__ */ new Set([e, e.split("-")[0]])) {
package/dist/vite.js CHANGED
@@ -1,2 +1,7 @@
1
- import { cspAssetsInlineLimit as e, pdfkitStandardFonts as t } from "@nxgt/material-core/vite";
2
- export { e as cspAssetsInlineLimit, t as pdfkitStandardFonts };
1
+ import { CSP_NONCE_PLACEHOLDER as e, ZOD_JITLESS_SCRIPT as t, cspAssetsInlineLimit as n, nxgtMaterial as r, pdfkitStandardFonts as i } from "@nxgt/material-core/vite";
2
+ //#region lib/vite/index.ts
3
+ function a(e) {
4
+ return r(e, "@nxgt/material-vue");
5
+ }
6
+ //#endregion
7
+ export { e as CSP_NONCE_PLACEHOLDER, t as ZOD_JITLESS_SCRIPT, n as cspAssetsInlineLimit, a as nxgtMaterial, i as pdfkitStandardFonts };
package/docs/README.md CHANGED
@@ -14,8 +14,11 @@ detail: every option, the second example, and the traps.
14
14
  | [Printing](guides/printing.md) | You lay out a printable document (invoice, report) with the `Print*` components |
15
15
  | [PDF documents](guides/pdf.md) | You produce a PDF file from data with `@nxgt/material-vue/pdf`: in the browser (`usePdf`, `PdfDownloadButton`) or from a Nuxt server route (`pdfResponse`), fonts on an inlined server |
16
16
  | [Maps](guides/maps.md) | You render Leaflet maps or a location field with `@nxgt/material-vue/map` |
17
+ | [Backgrounds](guides/backgrounds.md) | You want a gradient or patterned backdrop: tones, intensity, the opt-in `backgrounds.css`, custom colours, motion and CSP |
17
18
  | [SSR](guides/ssr.md) | Your app renders on a server — Nuxt or a Vite SSR server — and bundles this package |
18
19
  | [Content Security Policy](guides/csp.md) | Your app sends a strict CSP: the directives to use, the components that still inject a `<style>`, the zod and KaTeX settings, self-hosting a font, the per-request nonce |
20
+ | [The Vite plugin](guides/vite-plugin.md) | You are adding `nxgtMaterial()` to `vite.config.ts`: the CSP by hash or nonce, fonts, the styles check, PDFs on a bundled server and the Nuxt module, and each option's opt-out |
21
+ | [Migrating to the Vite plugin](guides/migrate-to-vite-plugin.md) | Your app has its own CSP header, nonce, `zod-config`, Inter import or PDF bundling, and you move it to `nxgtMaterial()`: search → replace pairs, each with how to verify |
19
22
  | [Helpers](guides/helpers.md) | You need a utility, composable, Pinia store factory or type from `/lib`, `/composables`, `/i18n`, `/models`, `/types` or `/dnd` |
20
23
  | [Troubleshooting](troubleshooting.md) | Something failed and you have an error message or a symptom |
21
24
  | [Roadmap](roadmap.md) | You want to know what is planned, what shipped, and what will not be done |
@@ -71,9 +71,10 @@ Collections you query: data table, filter, pagination, tree, drag and drop. 6 en
71
71
 
72
72
  ## [Navigation & layout](navigation-and-layout.md)
73
73
 
74
- Where a page sits and how you move: app shell, sidebar, app bars, breadcrumb, page layouts, grid, resizable, skip link, pager, TOC, steppers, hero, doc site shell, signed-out page frame. 18 entries.
74
+ Where a page sits and how you move: app shell, account menu, sidebar, app bars, breadcrumb, page layouts, grid, resizable, skip link, pager, TOC, steppers, hero, doc site shell, signed-out page frame. 19 entries.
75
75
 
76
76
  [<img src="../previews/navigation-layout-appshell.webp" height="72" alt="ActivityLayout">](navigation-and-layout.md#activitylayout)
77
+ [<img src="../previews/navigation-layout-accountmenu.webp" height="72" alt="AccountMenu">](navigation-and-layout.md#accountmenu)
77
78
  [<img src="../previews/navigation-layout-sidebar.webp" height="72" alt="Sidebar">](navigation-and-layout.md#sidebar)
78
79
  [<img src="../previews/navigation-layout-breadcrumb.webp" height="72" alt="Breadcrumb">](navigation-and-layout.md#breadcrumb)
79
80
  [<img src="../previews/navigation-layout-stepper.webp" height="72" alt="Stepper">](navigation-and-layout.md#stepper)
@@ -298,6 +298,8 @@ replace that name, so pass one only when it should differ from the label.
298
298
  own, so it is not announced as "collapsed". Used as a popover, drawer or menu
299
299
  trigger (`as-child`), it carries that trigger's `aria-expanded`.
300
300
 
301
+ A `tooltip` always opens below 768 px or with `expanded={false}`. On a desktop width, or with `expanded`, one that repeats the visible label is not opened, and one that adds to it ("Create order (Ctrl+N)") still opens.
302
+
301
303
  **Storybook:** `Buttons & actions/ResponsiveButton` · **React:** `ResponsiveButton`
302
304
 
303
305
  ---
@@ -80,7 +80,8 @@ table enables, for typing your own column defs.
80
80
  | `data` | `T[]` | — | rows; sorting, filtering and pagination run client-side |
81
81
  | `#expanded="{ row }"` / `renderExpandedRow` | slot / `(row) => VNode` | — | makes rows expandable; pair with the `expand` column |
82
82
  | `showViewOptions` | `boolean` | — | column visibility menu above the table |
83
- | `#actions="{ table }"` / `actions` | slot / `(table) => VNode` | — | toolbar content with access to the table (selected rows…) |
83
+ | `#actions="{ table }"` / `actions` | slot / `(table) => VNode` | — | toolbar content with access to the table (selected rows…); disabled while `loading` |
84
+ | `#filters="{ table }"` / `filters` | slot / `(table) => VNode` | — | a search or filter controls, on the toolbar's start side; unlike `actions` they stay enabled while `loading`, so a search typed during a reload keeps its focus and text |
84
85
  | `onLoadMore` / `isLoadingMore` | `() => void` / `boolean` | — | adds a "load more" button under the rows |
85
86
  | `options` | `{ showPage?: boolean; showSelected?: boolean }` | both shown | parts of the footer |
86
87
  | `showHeader` | `boolean` | shown | header row (column names, sorting, "Select all") at every width; `false` hides it |
@@ -89,10 +90,13 @@ table enables, for typing your own column defs.
89
90
  | `loading` | `boolean` | `false` | skeleton rows, or the current rows dimmed; `aria-busy`; controls disabled |
90
91
  | `loadingRows` | `number` | the page size | how many skeleton rows |
91
92
  | `density` | `'comfortable' \| 'compact'` | `'comfortable'` | `compact` tightens the cell padding, the row and header heights and the gap between rows, the selection column included; it is the table's `data-density` attribute, styled with classes (no inline style). The toolbar band and the empty state keep their size; the print variant is unchanged |
92
- | `#empty="{ filtered }"` | slot | icon and "No data available" | content of the empty row, spanning every visible column |
93
+ | `#empty="{ filtered }"` | slot | a compact `EmptyState`: "No data available", or "No results" when filtered | content of the empty row, spanning every visible column |
94
+ | `#empty-filtered` | slot | none (falls back to `#empty`, then the default) | content of the empty row when rows exist but the filters hide every one; wins over `#empty` then |
93
95
  | `manual` | `boolean` | `false` | `data` is one server page: no client filtering, sorting or paging; the footer is the server footer ([server-side data](#server-side-data)) |
94
96
  | `v-model:sorting` | `SortingState` | held inside | controlled sorting; `update:sorting` gets the new state |
95
97
  | `getRowId` | `(row, index) => string` | the index | the row's id, the key of the row selection |
98
+ | `enableRowSelection` | `boolean \| (row) => boolean` | `true` | which rows can be selected (`row` is the data). A row that cannot has a disabled checkbox; "Select all" skips it and its checked and indeterminate states count only selectable rows. A locked row already in the selection can be cleared by its own box (and only cleared) |
99
+ | `rowSelectionDisabledReason` | `(row) => string \| undefined` | — | why a row cannot be selected: its checkbox is `aria-disabled` but stays focusable, shows the reason in a tooltip on hover and focus, and has it as its `aria-describedby`; without a reason it is a plain `disabled` box |
96
100
  | `v-model:row-selection` | `RowSelectionState` | held inside | controlled selection, by id; may hold rows of other pages |
97
101
  | `pagination` | `{ totalCount?, offset?, previous?, next? }` | — | the server footer's range ("41–60 of 133") and Previous / Next: an href (a link) or a callback (a button) |
98
102
  | `#footer="{ table }"` / `footer` | slot / `false \| (table) => VNode` | the pagination | replaces the footer; `false` removes it |
@@ -141,13 +145,60 @@ arrives. Sorting (`DataTableColumnHeader`), the `select` column's "Select
141
145
  all", the toolbar's native controls (it
142
146
  is a disabled `<fieldset>`, so every input or button you render there, a
143
147
  filter or an export, is disabled
144
- too) and pagination are disabled meanwhile.
145
-
146
- When no row is left after filtering, the empty state is one `TableEmpty`
147
- cell spanning every visible column: today's icon and "No data available" by
148
- default, or the `#empty` slot, told whether rows exist but none matches the
149
- filters (`filtered`); content that renders nothing gets the default.
148
+ too) and pagination are disabled meanwhile. The toolbar's `actions` are in that fieldset; a search or filter you want to keep typing in while the list reloads goes in `#filters` (or `filters`) instead, which sits beside it and stays enabled (its focus and text survive a reload).
149
+
150
+ When no row is left, the empty state is one `TableEmpty` cell spanning every
151
+ visible column. What it holds, first match wins:
152
+
153
+ 1. the `#empty-filtered` slot, when rows exist but the filters hide every one
154
+ (`filtered`);
155
+ 2. the `#empty` slot, told `{ filtered }`;
156
+ 3. the default, a compact `EmptyState`: "No data available"
157
+ (`material.table.labels.no-data`) for a table with no data, or, when
158
+ filtered, "No results" and "Try a different search or clear the filters."
159
+ (`material.table.labels.no-results`, `no-results-description`) announced by the table's
160
+ status.
161
+
162
+ A slot that renders nothing falls through to the next step; there is no blank
163
+ option, the default shows. When the filters hide every row, the table's hidden
164
+ status announces "No results. Try a different search or clear the filters."
165
+ whatever the visible content is. `#empty-filtered`
166
+ is not used for a table with no data at all, nor with `manual` (server-side
167
+ data): the table cannot tell a filtered page from an empty one there, so it
168
+ reads `filtered` as `false`; branch on your own filter state in `#empty`.
150
169
  `DataTableEmptyState` types the slot props.
170
+ `filtered` is computed from the core row model (`getCoreRowModel().rows.length > 0`), as in React.
171
+
172
+ ```vue
173
+ <DataTable :data="people" :columns="columns">
174
+ <template #empty>No people yet.</template>
175
+ <template #empty-filtered>No person matches these filters.</template>
176
+ </DataTable>
177
+ ```
178
+
179
+ ### Locked rows and a search that stays usable
180
+
181
+ `enableRowSelection` leaves rows out of the selection, `rowSelectionDisabledReason` says why, and `#filters` keeps a search enabled while the list reloads (`#actions` is disabled meanwhile):
182
+
183
+ ```vue
184
+ <DataTable
185
+ v-model:row-selection="selection"
186
+ :columns="columns"
187
+ :data="proposals"
188
+ :loading="isFetching"
189
+ :enable-row-selection="(proposal) => proposal.status !== 'applied'"
190
+ :row-selection-disabled-reason="() => 'Already applied'"
191
+ >
192
+ <template #filters>
193
+ <SearchField v-model="q" label="Search" />
194
+ </template>
195
+ <template #actions="{ table }">
196
+ <Button>Apply to {{ table.getSelectedRowModel().rows.length }}</Button>
197
+ </template>
198
+ </DataTable>
199
+ ```
200
+
201
+ A locked row's checkbox is `aria-disabled` but focusable, so Tab reaches it and the tooltip says why; "Select all" skips it.
151
202
 
152
203
  ### Phones and narrow screens
153
204