@nxgt/material-vue 0.33.0 → 0.35.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 (49) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/{Button-DEA5W6O3.js → Button-C6GBoxwB.js} +1 -1
  3. package/dist/{HoverCardTrigger-CjSteFgk.js → HoverCardTrigger-BRajrP9V.js} +2 -2
  4. package/dist/{camera-B063QUeM.js → camera-BIK3JMQq.js} +4 -4
  5. package/dist/{components-CmIOfRO4.js → components-B3e9Djen.js} +9046 -8992
  6. package/dist/components.js +6 -6
  7. package/dist/composables.js +3 -3
  8. package/dist/dnd.js +1 -1
  9. package/dist/{form-scope-DuDx5Jyx.js → form-scope-DH96Nu9y.js} +1 -1
  10. package/dist/{i18n-provider-CiVi05fs.js → i18n-provider-D0wc5ysD.js} +1 -1
  11. package/dist/i18n.js +4 -4
  12. package/dist/{icon-button-CWcOcNHr.js → icon-button-Cep-hCMB.js} +1 -1
  13. package/dist/lib/components/ui/display/chip/chip.utils.d.ts +9 -0
  14. package/dist/lib/components/ui/display/chip/chip.vue.d.ts +29 -16
  15. package/dist/lib/components/ui/display/chip/index.d.ts +1 -0
  16. package/dist/lib/components/ui/primitives/typography/typography.vue.d.ts +7 -4
  17. package/dist/lib/components/ui/selection/select-field/select-field.vue.d.ts +2 -0
  18. package/dist/lib/i18n/resources/en/material.json.d.ts +1 -1
  19. package/dist/lib/i18n/resources/fr/material.json.d.ts +1 -1
  20. package/dist/lib.js +5 -5
  21. package/dist/main.js +13 -13
  22. package/dist/map.js +4 -4
  23. package/dist/material-vue.css +1 -1
  24. package/dist/{number.utils-Cy1z6qI7.js → number.utils-Bpo9tUaJ.js} +20 -20
  25. package/dist/{pdf-outline-sidebar-CzY59j_Y.js → pdf-outline-sidebar-Bjz8jMaZ.js} +2 -2
  26. package/dist/{pdf-page-nM_fvTHh.js → pdf-page-BRtEfDpx.js} +1 -1
  27. package/dist/{pdf-page-list-BMxNOnPk.js → pdf-page-list-DUSFOt6b.js} +2 -2
  28. package/dist/{pdf-reader-Dpv3oWe1.js → pdf-reader-Dhuuu3ud.js} +8 -8
  29. package/dist/{pdf-sidebar-DkefUgWg.js → pdf-sidebar-BOsuIcvK.js} +3 -3
  30. package/dist/{pdf-thumbnail-sidebar-I6i1lv5J.js → pdf-thumbnail-sidebar-CEinOvk3.js} +3 -3
  31. package/dist/{pdf-toolbar-Da6UMt1O.js → pdf-toolbar-ZYITLhtl.js} +4 -4
  32. package/dist/pdf.js +2 -2
  33. package/dist/{print-format.utils-DwJfU1tK.js → print-format.utils-DpBtUJvL.js} +1 -1
  34. package/dist/{sortable-provider-Cvpqk8tp.js → sortable-provider-BCawiL69.js} +2 -2
  35. package/dist/{stored-language-GDRdeYD8.js → stored-language-CGMzf-kR.js} +2 -2
  36. package/dist/{stx-player-CN7Ic8tP.js → stx-player-DAhHmRHW.js} +2 -2
  37. package/dist/{translator-BDFEmlcL.js → translator-DhrnT0YX.js} +1 -1
  38. package/dist/{use-heading-spy-DimKb49j.js → use-heading-spy-BF4hsZLZ.js} +2 -2
  39. package/dist/{use-material-translation-CaHS6oZz.js → use-material-translation-D30V5LyT.js} +3 -3
  40. package/docs/components/data-display.md +14 -2
  41. package/docs/components/data-table-filter-and-lists.md +2 -1
  42. package/docs/components/date-and-time.md +6 -0
  43. package/docs/components/feedback-and-status.md +3 -1
  44. package/docs/components/primitives.md +10 -2
  45. package/docs/components/selection-and-choice.md +2 -1
  46. package/docs/guides/i18n.md +2 -0
  47. package/docs/roadmap.md +33 -15
  48. package/docs/troubleshooting.md +48 -0
  49. package/package.json +2 -2
@@ -2626,44 +2626,44 @@ function Jt(e, t) {
2626
2626
  return t >= 0 && t <= 59;
2627
2627
  }
2628
2628
  //#endregion
2629
- //#region lib/composables/use-is-client.ts
2630
- function Yt() {
2631
- let n = t(!1);
2632
- return e(() => {
2633
- n.value = !0;
2634
- }), n;
2635
- }
2636
- //#endregion
2637
2629
  //#region lib/lib/date.utils.ts
2638
- function Xt(e) {
2630
+ function Yt(e) {
2639
2631
  return !!e && typeof e == "object" && ("from" in e || "to" in e);
2640
2632
  }
2641
- function Zt(e, t = "PP", n) {
2633
+ function Xt(e, t = "PP", n) {
2642
2634
  return e ? z(X(e), t, { locale: n }) : "-";
2643
2635
  }
2644
- function Qt(e) {
2636
+ function Zt(e) {
2645
2637
  return jt(e, "HH:mm", /* @__PURE__ */ new Date());
2646
2638
  }
2647
- function $t(e) {
2639
+ function Qt(e) {
2648
2640
  return e ? X(e) : null;
2649
2641
  }
2650
- function en(e) {
2651
- if (Xt(e)) return e.from || e.to ? {
2642
+ function $t(e) {
2643
+ if (Yt(e)) return e.from || e.to ? {
2652
2644
  from: e.from ? S(e.from).toISOString() : void 0,
2653
2645
  to: e.to ? re(e.to).toISOString() : void 0
2654
2646
  } : void 0;
2655
2647
  }
2656
- var tn = {
2657
- format: Zt,
2658
- parseFromTimestring: Qt,
2659
- parseFromISOString: $t,
2660
- formatDateRangeFilter: en
2648
+ var en = {
2649
+ format: Xt,
2650
+ parseFromTimestring: Zt,
2651
+ parseFromISOString: Qt,
2652
+ formatDateRangeFilter: $t
2661
2653
  };
2662
2654
  //#endregion
2655
+ //#region lib/composables/use-is-client.ts
2656
+ function tn() {
2657
+ let n = t(!1);
2658
+ return e(() => {
2659
+ n.value = !0;
2660
+ }), n;
2661
+ }
2662
+ //#endregion
2663
2663
  //#region lib/lib/number.utils.ts
2664
2664
  function nn(e, t = {}) {
2665
2665
  let { language: n = "en-US", ...r } = t, i = new Intl.NumberFormat(n, r).format(e);
2666
2666
  return i === "NaN" ? "" : i;
2667
2667
  }
2668
2668
  //#endregion
2669
- export { f as C, c as E, p as S, l as T, x as _, X as a, g as b, O as c, T as d, w as f, S as g, C as h, Yt as i, D as l, ne as m, tn as n, jt as o, re as p, en as r, z as s, nn as t, E as u, b as v, a as w, m as x, _ as y };
2669
+ export { f as C, c as E, p as S, l as T, x as _, X as a, g as b, O as c, T as d, w as f, S as g, C as h, $t as i, D as l, ne as m, tn as n, jt as o, re as p, en as r, z as s, nn as t, E as u, b as v, a as w, m as x, _ as y };
@@ -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 { kf as n } from "./components-CmIOfRO4.js";
4
- import { t as r } from "./use-material-translation-CaHS6oZz.js";
3
+ import { kf as n } from "./components-B3e9Djen.js";
4
+ import { t as r } from "./use-material-translation-D30V5LyT.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 { Mp as t } from "./components-CmIOfRO4.js";
2
+ import { Mp as t } from "./components-B3e9Djen.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 { kf as t } from "./components-CmIOfRO4.js";
3
- import { t as n } from "./pdf-page-nM_fvTHh.js";
2
+ import { kf as t } from "./components-B3e9Djen.js";
3
+ import { t as n } from "./pdf-page-BRtEfDpx.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-CmIOfRO4.js";
3
- import { t as n } from "./use-material-translation-CaHS6oZz.js";
4
- import { t as r } from "./Button-DEA5W6O3.js";
5
- import { o as i } from "./HoverCardTrigger-CjSteFgk.js";
6
- import { n as a } from "./pdf-page-nM_fvTHh.js";
7
- import { t as o } from "./pdf-page-list-BMxNOnPk.js";
8
- import { t as s } from "./pdf-sidebar-DkefUgWg.js";
9
- import { t as c } from "./pdf-toolbar-Da6UMt1O.js";
2
+ import { kn as t } from "./components-B3e9Djen.js";
3
+ import { t as n } from "./use-material-translation-D30V5LyT.js";
4
+ import { t as r } from "./Button-C6GBoxwB.js";
5
+ import { o as i } from "./HoverCardTrigger-BRajrP9V.js";
6
+ import { n as a } from "./pdf-page-BRtEfDpx.js";
7
+ import { t as o } from "./pdf-page-list-DUSFOt6b.js";
8
+ import { t as s } from "./pdf-sidebar-BOsuIcvK.js";
9
+ import { t as c } from "./pdf-toolbar-ZYITLhtl.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";
@@ -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-CaHS6oZz.js";
4
- import { t as r } from "./pdf-outline-sidebar-CzY59j_Y.js";
5
- import { t as i } from "./pdf-thumbnail-sidebar-I6i1lv5J.js";
3
+ import { t as n } from "./use-material-translation-D30V5LyT.js";
4
+ import { t as r } from "./pdf-outline-sidebar-Bjz8jMaZ.js";
5
+ import { t as i } from "./pdf-thumbnail-sidebar-CEinOvk3.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 { kf as n } from "./components-CmIOfRO4.js";
4
- import { t as r } from "./use-material-translation-CaHS6oZz.js";
5
- import { t as i } from "./pdf-page-nM_fvTHh.js";
3
+ import { kf as n } from "./components-B3e9Djen.js";
4
+ import { t as r } from "./use-material-translation-D30V5LyT.js";
5
+ import { t as i } from "./pdf-page-BRtEfDpx.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 = {
@@ -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-CaHS6oZz.js";
4
- import { d as r } from "./Button-DEA5W6O3.js";
5
- import { t as i } from "./icon-button-CWcOcNHr.js";
3
+ import { t as n } from "./use-material-translation-D30V5LyT.js";
4
+ import { d as r } from "./Button-C6GBoxwB.js";
5
+ import { t as i } from "./icon-button-Cep-hCMB.js";
6
6
  import { a, i as o, n as s, o as c, r as l, t as u } from "./DropdownMenuTrigger-BsuyNVzV.js";
7
- import { o as d } from "./HoverCardTrigger-CjSteFgk.js";
7
+ import { o as d } from "./HoverCardTrigger-BRajrP9V.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-CaHS6oZz.js";
2
- import { t as n } from "./Button-DEA5W6O3.js";
1
+ import { n as e, t } from "./use-material-translation-D30V5LyT.js";
2
+ import { t as n } from "./Button-C6GBoxwB.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
1
  import { t as e } from "./_baseIsEqual-BUD8VQJE.js";
2
- import { i as t } from "./number.utils-Cy1z6qI7.js";
2
+ import { n as t } from "./number.utils-Bpo9tUaJ.js";
3
3
  import { defineComponent as n, getCurrentInstance as r, h as i, inject as a, provide as o, useId as s } from "vue";
4
4
  import { defineStore as c } from "pinia";
5
5
  import { createFormatters as l, formatAmount as u, formatDate as d } from "@nxgt/material-core/print-format";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { t } from "./use-material-translation-CaHS6oZz.js";
3
- import { t as n } from "./icon-button-CWcOcNHr.js";
2
+ import { t } from "./use-material-translation-D30V5LyT.js";
3
+ import { t as n } from "./icon-button-Cep-hCMB.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";
@@ -355,7 +355,7 @@ var e = {
355
355
  "go-to-first-page": "Go to first page",
356
356
  "go-to-last-page": "Go to last page",
357
357
  "rows-per-page": "Rows per page",
358
- "rows-selected": "{count} of {total} {count, plural, =0 {row selected} one {row selected} other {rows selected} }",
358
+ "rows-selected": "{count, plural, =0 {No rows selected} one {# row selected} other {# rows selected}} of {total}",
359
359
  "page-of": "Page {page} of {total}",
360
360
  label: "Pagination",
361
361
  range: "{from}–{to} of {total}",
@@ -1558,7 +1558,7 @@ var e = {
1558
1558
  "go-to-first-page": "Aller à la première page",
1559
1559
  "go-to-last-page": "Aller à la dernière page",
1560
1560
  "rows-per-page": "Lignes par page",
1561
- "rows-selected": "{count} sur {total} {count, plural, =0 {ligne sélectionnée} one {ligne sélectionnée} other {lignes sélectionnées} }",
1561
+ "rows-selected": "{count, plural, =0 {Aucune ligne sélectionnée} one {# ligne sélectionnée} other {# lignes sélectionnées}} sur {total}",
1562
1562
  "page-of": "Page {page} sur {total}",
1563
1563
  label: "Pagination",
1564
1564
  range: "{from}–{to} sur {total}",
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { $t as t, Fp as n, Jt as r, Qt as i, Xt as a, Yt as o, en as s, tn as c } from "./components-CmIOfRO4.js";
3
- import { t as l } from "./use-material-translation-CaHS6oZz.js";
2
+ import { $t as t, Fp as n, Jt as r, Qt as i, Xt as a, Yt as o, en as s, tn as c } from "./components-B3e9Djen.js";
3
+ import { t as l } from "./use-material-translation-D30V5LyT.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 = {
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, r as n, t as r } from "./stored-language-GDRdeYD8.js";
1
+ import { a as e, i as t, r as n, t as r } from "./stored-language-CGMzf-kR.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) {
@@ -1,5 +1,5 @@
1
- import { a as e } from "./i18n-provider-CiVi05fs.js";
2
- import { c as t, d as n, f as r, l as i, n as a, u as o } from "./number.utils-Cy1z6qI7.js";
1
+ import { a as e } from "./i18n-provider-D0wc5ysD.js";
2
+ import { c as t, d as n, f as r, l as i, r as a, u as o } from "./number.utils-Bpo9tUaJ.js";
3
3
  import { computed as s, getCurrentInstance as c, inject as l, onMounted as u, ref as d, toValue as f } from "vue";
4
4
  import { injectConfigProviderContext as p } from "reka-ui";
5
5
  import { useIntersectionObserver as m, useMediaQuery as h, useSSRWidth as g, useStorage as _ } from "@vueuse/core";
@@ -1,6 +1,6 @@
1
- import "./stored-language-GDRdeYD8.js";
2
- import { a as e } from "./i18n-provider-CiVi05fs.js";
3
- import { i as t, r as n } from "./translator-BDFEmlcL.js";
1
+ import "./stored-language-CGMzf-kR.js";
2
+ import { a as e } from "./i18n-provider-D0wc5ysD.js";
3
+ import { i as t, r as n } from "./translator-DhrnT0YX.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]])) {
@@ -171,8 +171,12 @@ Pill with leading, avatar and trailing slots, an active state and a dismiss butt
171
171
 
172
172
  ```vue
173
173
  <script setup lang="ts">
174
+ import { ref } from 'vue';
174
175
  import { Avatar, AvatarFallback, Chip } from '@nxgt/material-vue/components';
175
176
 
177
+ const chip = ref<InstanceType<typeof Chip>>();
178
+ // chip.value?.focus()
179
+
176
180
  function remove(id: string) {
177
181
  console.log('remove', id);
178
182
  }
@@ -185,6 +189,9 @@ function remove(id: string) {
185
189
  </template>
186
190
  </Chip>
187
191
  <Chip label="Shipped" color="success" active />
192
+ <Chip label="Frontend" :dismiss-label="(label) => `Clear ${label} filter`" @dismiss="remove('fe')" />
193
+ <Chip label="+ Field" variant="dashed" :active="added" @click="add" />
194
+ <Chip ref="chip" label="Compact" size="sm" />
188
195
  </template>
189
196
  ```
190
197
 
@@ -192,12 +199,17 @@ function remove(id: string) {
192
199
  | --- | --- | --- | --- |
193
200
  | `label` | `string` | — | the text; the default slot replaces it |
194
201
  | `active` | `boolean` | — | filled appearance |
195
- | `variant` | Button `variant` | `'outlined'` | appearance when not active |
202
+ | `variant` | Button `variant`, or `'dashed'` | `'outlined'` | appearance when not active; `dashed` is a muted dashed pill (a "+ Field" pill) that turns solid and normal once `active` |
203
+ | `size` | `'default' \| 'sm'` | `'default'` | `sm` is a compact chip; the ✕ and every target stay at least 24px |
196
204
  | `color` | Button `color` | — | tone |
197
205
  | `disabled` | `boolean` | — | disables the chip and its ✕ |
198
- | `@dismiss` | `() => void` | — | a listener adds the ✕ button, named "Remove {label}" (`material.chip.dismiss-label`), `{label}` being the text the chip shows: the default slot's when given, else `label`; "Remove" when it shows none |
206
+ | `@dismiss` | `() => void` | — | a listener adds the ✕ button, named "Remove {label}" (`material.chip.dismiss-label`), `{label}` being the text the chip shows: the default slot's when given, else `label`; "Remove" when it shows none; the ✕ is a 24px target |
207
+ | `dismissLabel` | `string \| ((label: string) => string)` | — | names the ✕ instead of "Remove {label}": a string as is, or a function of the text the chip shows |
199
208
  | `@click` | `(event: MouseEvent) => void` | — | a listener makes the chip (or its body, when dismissible) a button |
200
209
  | `#leading`, `#avatar`, `#trailing` | slots | — | `#avatar` is shrunk to fit and replaces `#leading` |
210
+ | exposed `el`, `focus(options?)` | `HTMLElement \| null`, `(options?: FocusOptions) => void` | — | the chip's body (the Button, the inner button, or the label span with `tabindex="-1"`) and a method focusing it: `chip.value?.focus()` |
211
+
212
+ The dashed look's muted text meets 4.5:1 on the `background` and `card` surfaces, but not on `accent`.
201
213
 
202
214
  **Storybook:** `Data display/Chip` · **React:** `Chip`
203
215
 
@@ -356,7 +356,8 @@ async function archive() {
356
356
  in the URL; `manual` turns client filtering off.
357
357
  - **Selection** is `v-model:row-selection`, keyed by `getRowId`, so it
358
358
  survives a page change: ids of other pages stay in it, and the footer
359
- counts them all ("3 rows selected", `material.table.pagination.selected`).
359
+ counts them all ("3 rows selected of 128", `material.table.pagination.rows-selected`; "Page n of m"
360
+ is hidden when the table has no rows).
360
361
  `#actions="{ table }"` reads it too (`table.store.state.rowSelection`). To
361
362
  keep it across a reload, put it in the URL or `sessionStorage`. Unbound,
362
363
  both models are held inside, as before. Bind both halves (`v-model`, or
@@ -101,6 +101,8 @@ No form wrapper — use `DateFormField`.
101
101
 
102
102
  Labelled trigger that opens a calendar popover, with an optional time picker and `disabled-days`.
103
103
 
104
+ The trigger writes the date in the `I18nProvider` language, else English.
105
+
104
106
  ```vue
105
107
  <script setup lang="ts">
106
108
  import { ref } from 'vue';
@@ -159,6 +161,8 @@ before your `aria-describedby` ids.
159
161
 
160
162
  From / to range picked in a popover calendar, with `disabled-days`, presets and times.
161
163
 
164
+ The trigger writes each date in the `I18nProvider` language, else English.
165
+
162
166
  ```vue
163
167
  <script setup lang="ts">
164
168
  import { ref } from 'vue';
@@ -304,6 +308,8 @@ where `to` stays `undefined` until the second day is picked.
304
308
 
305
309
  Opens a `TimePicker` in a popover, or in a dialog on mobile.
306
310
 
311
+ The trigger writes the time in the `I18nProvider` language, else English.
312
+
307
313
  ```vue
308
314
  <script setup lang="ts">
309
315
  import { ref } from 'vue';
@@ -432,9 +432,11 @@ function clearFilters() {}
432
432
  | --- | --- | --- | --- |
433
433
  | `variant` | `'not-found' \| 'unauthorized' \| 'generic' \| 'empty' \| 'offline' \| 'search' \| 'maintenance'` | `'generic'` | preset icon, well colour, title and description |
434
434
  | `#icon` slot | — | the preset's | replaces the icon |
435
- | `title` / `description` | `string` (or `#title` / `#description`) | the preset's (translated) | replace the preset text |
435
+ | `title` / `description` | `string` (or `#title` / `#description`) | the preset's (translated) | replace the preset text; see below |
436
436
  | `#action` slot | — | — | shown under the text |
437
437
 
438
+ The preset's description is the companion of its title: with your own `title` and no `description`, no description is rendered. Pass `description` to keep a line under your own title. A `#title` slot counts as your own title; a `#description` slot always renders.
439
+
438
440
  **Storybook:** `Feedback & status/EmptyState` · **React:** `EmptyState`
439
441
 
440
442
  ---
@@ -193,9 +193,17 @@ import { Typography } from '@nxgt/material-vue/components';
193
193
  | Prop | Type | Default | Effect |
194
194
  | --- | --- | --- | --- |
195
195
  | `variant` | `'huge-larger' \| 'huge-large' \| 'huge-medium' \| 'huge-small' \| 'headline-larger' \| 'headline-large' \| 'headline-medium' \| 'headline-small' \| 'title-large' \| 'title-medium' \| 'title-small' \| 'body-medium' \| 'body-small' \| 'caption' \| 'normal'` | `'normal'` | size and weight; `caption` is also muted |
196
+ | `as` | a tag name or a component | `'div'` | the element to render, keeping the variant, e.g. `as="h2"` or `as="span"` |
197
+ | `asChild` | `boolean` | `false` | merge the classes onto the single child instead of rendering an element |
196
198
 
197
- It renders a `<div>`; the variants are also exported as `typographyVariants`
198
- for use on your own elements. Vue has one more step than React, `huge-larger`.
199
+ It renders a `<div>` unless `as` or `asChild` says otherwise:
200
+
201
+ ```vue
202
+ <Typography as="span" variant="title-small">Inline</Typography>
203
+ <Typography as-child variant="body-medium"><a href="/docs">Docs</a></Typography>
204
+ ```
205
+
206
+ The variants are also exported as `typographyVariants` for use on your own elements. Vue has one more step than React, `huge-larger`.
199
207
 
200
208
  **Storybook:** `Primitives/Typography` · **React:** `Typography`
201
209
 
@@ -144,6 +144,7 @@ const framework = ref('nuxt');
144
144
  | `placeholder` | `string` | `label` | the trigger's text while nothing is selected |
145
145
  | `required` | `boolean` | — | an asterisk after the label, and the select's `required`; the trigger is named by the label |
146
146
  | `label`, `helper-text`, `error`, `disabled` | | — | the field's text and state |
147
+ | `ariaLabelledby` (`aria-labelledby` in a template) | `string` | — | the id of an element that names the trigger when `label` is absent; `label` wins when both are given |
147
148
 
148
149
  `#option` renders each option's content in the list (React's
149
150
  `renderOption`); it receives `{ option, index, selected }`. The trigger shows
@@ -166,7 +167,7 @@ the picked option's text.
166
167
  **Accessibility:** the trigger is named by `label`, described by the help or
167
168
  error text (`aria-describedby`) and marked `aria-invalid` on error, so
168
169
  `getByRole('combobox', { name: 'Framework' })` finds it and
169
- `toHaveAccessibleDescription(…)` / `toBeInvalid()` match.
170
+ `toHaveAccessibleDescription(…)` / `toBeInvalid()` match. Without a `label`, `aria-labelledby` (`ariaLabelledby` in the script; the id of another element) names the trigger; when both are given, `label` wins.
170
171
  **Emits:** `update:modelValue` with `string`.
171
172
  **Form wrapper:** `SelectFormField` — `name` inside a vee-validate form, see
172
173
  [forms](../guides/forms.md#the-pair) and [what each field emits](../guides/forms.md#what-each-field-emits).
@@ -549,6 +549,8 @@ For money and dates shown to a user, `useFormatters()` (`formatAmount`,
549
549
  `useNumberFormatter()` is for the other `Intl.NumberFormat` styles
550
550
  (percentages, units). See [helpers](helpers.md#nxgtmaterial-vuecomposables).
551
551
 
552
+ The trigger of a `DateField`, `DateRangeField` or `TimeField` follows the same language: `01/09/2028` on a French page, `09/01/2028` in English.
553
+
552
554
  ## Reference
553
555
 
554
556
  Everything `@nxgt/material-vue/i18n` exports is listed in
package/docs/roadmap.md CHANGED
@@ -6,21 +6,6 @@ version they shipped in, and planned entries may name the major they target.
6
6
 
7
7
  ## Now
8
8
 
9
- - **A strict Content Security Policy** — a page that sends `script-src` with
10
- a nonce and no `'unsafe-eval'`, and `style-src-elem` with a nonce and no
11
- `'unsafe-inline'`, runs every component with no violation report: a
12
- `NonceProvider` forwards the nonce to each component, the CSS the
13
- dependencies inject moves into the stylesheet, zod becomes external with
14
- schemas built lazily, and the KaTeX fonts ship as files. Done so far:
15
- KaTeX's fonts are files beside the compiled stylesheet instead of 1.4 MB of
16
- `data:` URIs inside it, so `font-src 'self'` needs no `data:`;
17
- `NonceProvider` takes the nonce to reka's `Select`, `Combobox`,
18
- `ScrollArea` and `Splitter`, `InputOTP` and `RichTextEditor`;
19
- `ImageCropper` is measured and injects no `<style>`, and `InputOTP`'s rules
20
- are in the stylesheet too; zod is no longer bundled and no schema is built
21
- at import, so the app's `z.config({ jitless: true })` keeps zod from
22
- probing `new Function`. Today the
23
- [Content Security Policy guide](guides/csp.md) lists what is left to relax.
24
9
  - **Empty and error states that look designed** — `EmptyState` and a new
25
10
  `ErrorState` in three sizes (`default`, `compact`, `inline`), with in-house
26
11
  inline SVG illustrations or a slot for your own. `ErrorState` is a
@@ -32,6 +17,30 @@ version they shipped in, and planned entries may name the major they target.
32
17
 
33
18
  ## Next
34
19
 
20
+ - **One Vite plugin for the whole setup** — `nxgtMaterial()` from
21
+ `@nxgt/material-vue/vite` is the one call that wires the library
22
+ into a Vite app; it is implemented once in `@nxgt/material-core/vite`, and
23
+ `@nxgt/material/vite` is the same plugin.
24
+ Every option is on by default and each can be turned off or refined; the
25
+ helpers that exist today stay exported.
26
+ - `csp`: a nonce placeholder through `html.cspNonce` and
27
+ `applyCspNonce(html, nonce)` to fill it; zod's jitless mode set by an
28
+ inline nonced script in `index.html` (`ZOD_JITLESS_SCRIPT` for a server
29
+ that renders the page itself); and the recommended policy sent by the dev
30
+ server as Report-Only.
31
+ - `fonts`: the KaTeX fonts emitted as files, and `sans: 'inter'` for a
32
+ self-hosted Inter.
33
+ - `styles`: a build that fails with the exact fix when the stylesheet import
34
+ or the `@source` line is missing.
35
+ - `pdf`: pdfkit's standard fonts handled automatically when
36
+ `@react-pdf/renderer` is installed, and `bundle: true` (the Nuxt module's
37
+ `pdf.bundleStandardFonts` today) for a server that has no
38
+ `node_modules`.
39
+ - Nuxt: the Nuxt module takes the same options.
40
+ - On the server, `@nxgt/material-core` gains `createCspNonce()` (Web Crypto)
41
+ and `cspPolicy({ ... })`, which returns `{ directives, header }` as the
42
+ [Content Security Policy guide](guides/csp.md) describes; `NonceProvider`'s
43
+ `nonce` becomes optional on the client. Ships as minors.
35
44
  - **One media player, video and audio** — `MediaPlayer`, `MediaPlayerMini`,
36
45
  `useMediaPlayer` and `AudioPlayer`, built on the native `<video>` / `<audio>`.
37
46
  `StxPlayer` and `VideoPlayer` are removed in `@nxgt/material-vue` 1.0, with a
@@ -113,6 +122,8 @@ version they shipped in, and planned entries may name the major they target.
113
122
 
114
123
  ## Not planned
115
124
 
125
+ - **A Next.js plugin** — the plugin targets Vite only. No supported consumer
126
+ builds with Next.js, and `withNxgtPrint` stays the config helper for it.
116
127
  - **The `Combobox` primitive family** — `ComboboxFormField` covers forms; the
117
128
  low-level `Combobox` parts stay in `@nxgt/material` only.
118
129
  - **The React library's state and form stacks** — widgets keep their state in
@@ -151,6 +162,13 @@ version they shipped in, and planned entries may name the major they target.
151
162
 
152
163
  ## Shipped
153
164
 
165
+ - **A strict Content Security Policy** — a page that sends `script-src` with a
166
+ nonce and no `'unsafe-eval'`, and `style-src-elem` with a nonce and no
167
+ `'unsafe-inline'`, runs every component with no violation report:
168
+ `NonceProvider` forwards the nonce to each component, the CSS the
169
+ dependencies inject is in the stylesheet, zod is external and its schemas are
170
+ built on first use, and the KaTeX fonts are files. The
171
+ [Content Security Policy guide](guides/csp.md) has the policy. 0.33.0.
154
172
  - **An `Autocomplete` that searches a server** — `on-search`, `debounce-ms`, `min-query-length`, `filter`, `loading`, `search-error`: a
155
173
  debounced search with an `AbortSignal` whose stale responses are dropped,
156
174
  a polite "Loading…" / "N results" announcement, and local matching that
@@ -154,10 +154,12 @@ words in your error.
154
154
  - [An `Icon` is named "Icon {name}" although you passed `aria-label`](#an-icon-is-named-icon-name-although-you-passed-aria-label)
155
155
  - [An end-to-end test no longer finds the `Close` or `Zoom in` button](#an-end-to-end-test-no-longer-finds-the-close-or-zoom-in-button)
156
156
  - [A test no longer finds a pagination, breadcrumb or other built-in label by its English name](#a-test-no-longer-finds-a-pagination-breadcrumb-or-other-built-in-label-by-its-english-name)
157
+ - [The selection count reads in the wrong order after overriding `material.table.pagination.rows-selected`](#the-selection-count-reads-in-the-wrong-order-after-overriding-materialtablepaginationrows-selected)
157
158
  - [A test no longer finds a chip's remove button by the exact name `Remove`, or a `LocationPreview` by its place name](#a-test-no-longer-finds-a-chips-remove-button-by-the-exact-name-remove-or-a-locationpreview-by-its-place-name)
158
159
  - [A test no longer finds an icon badge by role `button`, or an `Icon` named "Icon {name}" inside a button](#a-test-no-longer-finds-an-icon-badge-by-role-button-or-an-icon-named-icon-name-inside-a-button)
159
160
  - [A button named "Icon plus Add" is now named "Add"](#a-button-named-icon-plus-add-is-now-named-add)
160
161
  - [`An invalid form control with name='…' is not focusable` (an `UploadField`)](#an-invalid-form-control-with-name-is-not-focusable)
162
+ - [The date field shows MM/DD/YYYY on a French page](#the-date-field-shows-mmddyyyy-on-a-french-page)
161
163
  - [An `id`, `aria-describedby` or `data-testid` on a `DateField`, `DateRangeField` or `TimeField` is nowhere in the page](#an-id-aria-describedby-or-data-testid-on-a-datefield-daterangefield-or-timefield-is-nowhere-in-the-page)
162
164
  - [A test no longer finds the label or helper text inside a date or time picker's trigger](#a-test-no-longer-finds-the-label-or-helper-text-inside-a-date-or-time-pickers-trigger)
163
165
  - [A test no longer finds a `DurationField` input by the field's label, or a `Slider`'s `aria-label` on its root](#a-test-no-longer-finds-a-durationfield-input-by-the-fields-label-or-a-sliders-aria-label-on-its-root)
@@ -2826,6 +2828,31 @@ await page.getByRole('button', { name: /^(Next|Suivant)$/ }).click();
2826
2828
  <PaginationNext aria-label="Next results" />
2827
2829
  ```
2828
2830
 
2831
+ ### The selection count reads in the wrong order after overriding `material.table.pagination.rows-selected`
2832
+
2833
+ **When:** after upgrading, the data table's footer reads "of 128 3 rows
2834
+ selected" (or the French "sur 128 3 lignes sélectionnées") because your
2835
+ `I18nProvider` overrides `material.table.pagination.rows-selected` with the old
2836
+ text.
2837
+ **Why:** the message now leads with the count and ends with the total, so
2838
+ "3 rows selected of 128" and "No rows selected of 128" read as a sentence, and
2839
+ the plural covers zero. The old form, `{count} of {total} {count, plural, …}`,
2840
+ put the count and the total first. An override keeps its own text, so it keeps
2841
+ the old order. The same release hides "Page n of m" when the table has no rows.
2842
+ **Fix:** adopt the new ICU form in your override, or delete the override:
2843
+
2844
+ ```json
2845
+ {
2846
+ "material": {
2847
+ "table": {
2848
+ "pagination": {
2849
+ "rows-selected": "{count, plural, =0 {No rows selected} one {# row selected} other {# rows selected}} of {total}"
2850
+ }
2851
+ }
2852
+ }
2853
+ }
2854
+ ```
2855
+
2829
2856
  ### A test no longer finds a chip's remove button by the exact name `Remove`, or a `LocationPreview` by its place name
2830
2857
 
2831
2858
  **When:** after an update (0.22.0 and later),
@@ -2929,6 +2956,27 @@ stops on it with the browser's own "select a file" message. If vee-validate
2929
2956
  validates the form (`UploadFormField`) and you do not want the browser's check,
2930
2957
  put `novalidate` on the `<form>`.
2931
2958
 
2959
+ ### The date field shows MM/DD/YYYY on a French page
2960
+
2961
+ **When:** a `DateField`, `DateFormField`, `DateRangeField` or `DateRangeFormField` (and a `TimeField`, which shows `2:30 PM` instead of `14:30`) under a French
2962
+ `I18nProvider` shows 1 September 2028 as `09/01/2028` in its trigger, while the
2963
+ calendar inside it is in French. No error is printed.
2964
+ **Why:** the trigger formatted the date without a locale, so it was always
2965
+ English (`MM/DD/YYYY`), whatever the language of the page.
2966
+ **Fix:** upgrade: the trigger now writes the date (and the time, for a
2967
+ `TimeField` or a `DateRangeField` with `withTime`) in the language of the
2968
+ page: the `I18nProvider` language, else English. Mount the provider above the
2969
+ field:
2970
+
2971
+ ```vue
2972
+ <I18nProvider initial-language="fr">
2973
+ <DateField v-model="value" label="Livraison" />
2974
+ </I18nProvider>
2975
+ ```
2976
+
2977
+ With no provider, or in English, the output is unchanged (`09/01/2028`). The
2978
+ document's `<html lang>` and the browser's language are not read.
2979
+
2932
2980
  ### An `id`, `aria-describedby` or `data-testid` on a `DateField`, `DateRangeField` or `TimeField` is nowhere in the page
2933
2981
 
2934
2982
  **When:** with 0.21.0 or earlier: `getByTestId` finds nothing, a hint is not read as
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material-vue",
3
- "version": "0.33.0",
3
+ "version": "0.35.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -124,7 +124,7 @@
124
124
  "docs:previews": "vitest run --project previews"
125
125
  },
126
126
  "dependencies": {
127
- "@nxgt/material-core": "^0.9.0",
127
+ "@nxgt/material-core": "^0.9.1",
128
128
  "@floating-ui/dom": "^1.8.0",
129
129
  "@fortawesome/fontawesome-common-types": "7.3.1",
130
130
  "@lucide/vue": "^1.45.0",