@nxgt/material-vue 0.38.0 → 0.39.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 (54) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/{Button-5UyKA-x_.js → Button-DVeAQorb.js} +1 -1
  3. package/dist/{DropdownMenuTrigger-BsuyNVzV.js → DropdownMenuTrigger-C7uYPf_9.js} +36 -36
  4. package/dist/{HoverCardTrigger-CmCDiTn8.js → HoverCardTrigger-VvXPswRz.js} +122 -120
  5. package/dist/{camera-BWzF8sOW.js → camera-CG6WfZNc.js} +4 -4
  6. package/dist/components/base-content.css +64 -4
  7. package/dist/{components-B_s5oxUp.js → components-B2kSyBK0.js} +9462 -9450
  8. package/dist/components.js +7 -7
  9. package/dist/composables.js +2 -2
  10. package/dist/dnd.js +1 -1
  11. package/dist/{form-scope-UzoU38db.js → form-scope-XhlaF5na.js} +1 -1
  12. package/dist/{i18n-provider-BEvjls8b.js → i18n-provider-BBnUUGqM.js} +1 -1
  13. package/dist/i18n.js +4 -4
  14. package/dist/{icon-button-DhqJE6Ej.js → icon-button-CSPfP615.js} +1 -1
  15. package/dist/in-dialog-Blhwwbyb.js +31 -0
  16. package/dist/lib/components/ui/collections/data-table/data-table-density.d.ts +15 -0
  17. package/dist/lib/components/ui/collections/data-table/data-table.stories.columns.d.ts +47 -0
  18. package/dist/lib/components/ui/collections/data-table/data-table.stories.template.d.ts +1 -0
  19. package/dist/lib/components/ui/collections/data-table/index.d.ts +1 -1
  20. package/dist/lib/components/ui/collections/data-table/types.d.ts +7 -0
  21. package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
  22. package/dist/lib/components/ui/overlays/dialog/in-dialog.d.ts +12 -0
  23. package/dist/lib/i18n/resources/en/en.d.ts +1 -0
  24. package/dist/lib/i18n/resources/en/material.json.d.ts +1 -0
  25. package/dist/lib/i18n/resources/fr/fr.d.ts +1 -0
  26. package/dist/lib/i18n/resources/fr/material.json.d.ts +1 -0
  27. package/dist/lib/i18n/resources/resources.d.ts +2 -0
  28. package/dist/lib/i18n/translator.d.ts +1 -1
  29. package/dist/lib.js +1 -1
  30. package/dist/main.js +12 -12
  31. package/dist/map.js +4 -4
  32. package/dist/material-vue.css +1 -1
  33. package/dist/{pdf-outline-sidebar-BsePJlTi.js → pdf-outline-sidebar-aQ5Lhbss.js} +2 -2
  34. package/dist/{pdf-page-Ct313mNF.js → pdf-page-NCmScgMW.js} +1 -1
  35. package/dist/{pdf-page-list-JrRo2BeU.js → pdf-page-list-BnvE130d.js} +2 -2
  36. package/dist/{pdf-reader-tABBZMbZ.js → pdf-reader-CMt9dKZ-.js} +8 -8
  37. package/dist/{pdf-sidebar-Caw9rzU-.js → pdf-sidebar-BWzX3e0f.js} +3 -3
  38. package/dist/{pdf-thumbnail-sidebar-ZybLeUG7.js → pdf-thumbnail-sidebar-8nbYsI3d.js} +3 -3
  39. package/dist/{pdf-toolbar-BM8Sz_JN.js → pdf-toolbar-DpQMG5rv.js} +5 -5
  40. package/dist/pdf.js +2 -2
  41. package/dist/{print-format.utils-CQFIVeUA.js → print-format.utils-oj5kle2P.js} +2 -2
  42. package/dist/{sortable-provider-CKkWYijj.js → sortable-provider-2czx1jSW.js} +2 -2
  43. package/dist/{stored-language-CvOHC8AD.js → stored-language-CKZMMJcz.js} +2 -0
  44. package/dist/{stx-player-CsVKbwFk.js → stx-player-CS1FYHVS.js} +2 -2
  45. package/dist/{translator-k1rKIgC7.js → translator-uh5FWiMq.js} +1 -1
  46. package/dist/{use-heading-spy-D-ipoQwl.js → use-heading-spy-CcJfoBA1.js} +1 -1
  47. package/dist/{use-material-translation-1FdRx9I7.js → use-material-translation-C6xccbic.js} +3 -3
  48. package/docs/components/data-table-filter-and-lists.md +3 -1
  49. package/docs/guides/forms.md +55 -4
  50. package/docs/guides/i18n.md +2 -1
  51. package/docs/troubleshooting.md +27 -0
  52. package/lib/components/base-content.css +64 -4
  53. package/package.json +1 -1
  54. package/dist/use-inert-others-CtGqZKR8.js +0 -22
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @nxgt/material-vue
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#588](https://github.com/softistx/nxgt-material/pull/588) [`f8ef212`](https://github.com/softistx/nxgt-material/commit/f8ef2120be53d5a60a976ff47355d1eb487672b1) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `DataTable` takes a `density` prop, `'comfortable'` (default, the look it always had) or `'compact'`, which tightens the cell padding above and below, the row and header heights, the sort and expand buttons (the expand button keeps 28px, above the 24px target minimum) and the gap between rows, the selection column included. The table carries it as `data-density`, styled with classes, so a strict CSP is unaffected; a `DataTable` nested in an expanded row keeps its own density. The toolbar band, the empty state and the print variant keep their size. The `DataTableDensity` type is exported.
8
+
9
+ Also in this release:
10
+
11
+ - `@nxgt/material`: `TableHead` now sets `text-foreground`, as `@nxgt/material-vue`'s does. It affects every React `Table` header: the header text is the foreground colour, no longer the muted inherited one (3.97:1 contrast on the header band, now above 4.5:1).
12
+ - Both: the `expand` column's header is no longer empty. It holds a visually hidden "Expand" (`material.table.labels.expand`, "Déplier" in French), which fixes axe's `empty-table-header`. An app that overrides the `material.table.labels` bundle can add the key.
13
+
14
+ Nothing to change in an existing app.
15
+
16
+ ### Patch Changes
17
+
18
+ - [#579](https://github.com/softistx/nxgt-material/pull/579) [`69562df`](https://github.com/softistx/nxgt-material/commit/69562dff2d874d60f066d45dd6dc7df418112041) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Autocomplete in a dialog: the open list no longer covers the dialog's own controls ([#577](https://github.com/softistx/nxgt-material/issues/577)). Inside a `DialogContent`, `DialogScrollContent`, `AlertDialogContent` or `SheetContent`, the list opens under the field's helper text, in the layer's flow, and pushes what follows (the footer, the Save button) down instead of floating over it. It never flips up over the title, and its options scroll past 15rem. The layer grows while the list is open (a dialog stays capped at the viewport and scrolls) and shrinks back at once on a pick, so the next field does not move under a click aimed at it. A closed field is as tall in a dialog as outside one. A `PopoverContent`, `HoverCardContent` or menu content opened from a dialog keeps a floating list, as on the page. A `DrawerContent` on the page is not covered yet: its list still floats ([#582](https://github.com/softistx/nxgt-material/issues/582)). Outside these layers nothing changes. No API change.
19
+
20
+ - [#586](https://github.com/softistx/nxgt-material/pull/586) [`a3d9c79`](https://github.com/softistx/nxgt-material/commit/a3d9c79310c09e14d25b67db5c5c73afa4f875b4) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `.form-grid-layout` no longer caps its height (`max-h-[calc(100lvh-…)]`) nor scrolls `[data-slot="form-fields"]` in a box of its own: a long form grows with the page, and the page (or the `DialogContent` / `SheetContent` around it) is the one scroll. `[data-slot="form-actions"]` is sticky at the bottom of that scroll on a blurred `bg-background/90`, so Cancel and Save stay in reach. In a `DialogContent` or an `AlertDialogContent` the stuck actions fill the dialog's padding below them, and `ConfirmationDialog`'s footer sticks the same way when it holds a form (any dialog holding a `.form-grid-layout` without `form-actions` does). A form that is a direct child of `DrawerContent` scrolls itself, since a drawer does not. The fields' controls and links carry `scroll-margin-bottom` (6rem plus a dialog's bottom padding, 7.5rem above `ConfirmationDialog`'s footer), so a field tabbed to is scrolled clear of the actions in any scroll box (WCAG 2.4.11); `--form-actions-clearance` raises it for taller actions, and `--form-actions-fill` names a dialog's bottom padding when it is not the default.
21
+
22
+ Migration: search for `form-grid-layout` in a box with a fixed height that relied on the fields scrolling inside it; give that form (or box) the height and the scroll yourself (`max-h-[60vh] overflow-y-auto`), and the actions stick to its bottom. To keep the actions in place, add `static` to `[data-slot="form-actions"]`. An app's own fixed bottom bar or floating button now sits under the sticky actions (`z-index: 10`): give it a z-index above 10. Storybook: `Guides/Forms/Form grid layout`, `Guides/Forms/Form grid layout, overlays` and `Guides/Forms/Form grid layout, dialogs`.
23
+
3
24
  ## 0.38.0
4
25
 
5
26
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { t } from "./use-material-translation-1FdRx9I7.js";
2
+ import { t } from "./use-material-translation-C6xccbic.js";
3
3
  import { Comment as n, Fragment as r, Text as i, computed as a, createBlock as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, inject as ee, isVNode as m, mergeProps as h, normalizeClass as g, normalizeProps as _, onBeforeUnmount as v, openBlock as y, provide as b, ref as x, renderSlot as S, shallowRef as C, unref as w, useAttrs as te, useSlots as ne, watch as T, withCtx as E } from "vue";
4
4
  import { Primitive as D, TooltipArrow as O, TooltipContent as k, TooltipPortal as A, TooltipProvider as re, TooltipRoot as j, TooltipTrigger as M, useForwardPropsEmits as N } from "reka-ui";
5
5
  import { cva as P } from "class-variance-authority";
@@ -1,12 +1,12 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { t } from "./use-inert-others-CtGqZKR8.js";
3
- import { createBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, guardReactiveProps as o, mergeProps as s, normalizeProps as c, openBlock as l, renderSlot as u, unref as d, withCtx as f } from "vue";
4
- import { Circle as p } from "@lucide/vue";
5
- import { DropdownMenuContent as m, DropdownMenuItemIndicator as h, DropdownMenuPortal as g, DropdownMenuRadioGroup as _, DropdownMenuRadioItem as v, DropdownMenuRoot as y, DropdownMenuSeparator as b, DropdownMenuTrigger as x, injectDropdownMenuRootContext as S, useForwardProps as C, useForwardPropsEmits as w } from "reka-ui";
6
- import { reactiveOmit as T } from "@vueuse/core";
2
+ import { r as t, t as n } from "./in-dialog-Blhwwbyb.js";
3
+ import { createBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, guardReactiveProps as s, mergeProps as c, normalizeProps as l, openBlock as u, renderSlot as d, unref as f, withCtx as p } from "vue";
4
+ import { Circle as m } from "@lucide/vue";
5
+ import { DropdownMenuContent as h, DropdownMenuItemIndicator as g, DropdownMenuPortal as _, DropdownMenuRadioGroup as v, DropdownMenuRadioItem as y, DropdownMenuRoot as b, DropdownMenuSeparator as x, DropdownMenuTrigger as S, injectDropdownMenuRootContext as C, useForwardProps as w, useForwardPropsEmits as T } from "reka-ui";
6
+ import { reactiveOmit as E } from "@vueuse/core";
7
7
  //#endregion
8
8
  //#region lib/components/ui/overlays/dropdown-menu/DropdownMenu.vue
9
- var E = /* @__PURE__ */ a({
9
+ var D = /* @__PURE__ */ o({
10
10
  __name: "DropdownMenu",
11
11
  props: {
12
12
  defaultOpen: { type: Boolean },
@@ -19,13 +19,13 @@ var E = /* @__PURE__ */ a({
19
19
  },
20
20
  emits: ["update:open"],
21
21
  setup(e, { emit: t }) {
22
- let r = e, i = w(r, t);
23
- return (e, t) => (l(), n(d(y), s({ "data-slot": "dropdown-menu" }, d(i), { modal: r.modal }), {
24
- default: f((t) => [u(e.$slots, "default", c(o(t)))]),
22
+ let n = e, i = T(n, t);
23
+ return (e, t) => (u(), r(f(b), c({ "data-slot": "dropdown-menu" }, f(i), { modal: n.modal }), {
24
+ default: p((t) => [d(e.$slots, "default", l(s(t)))]),
25
25
  _: 3
26
26
  }, 16, ["modal"]));
27
27
  }
28
- }), D = /* @__PURE__ */ a({
28
+ }), O = /* @__PURE__ */ o({
29
29
  inheritAttrs: !1,
30
30
  __name: "DropdownMenuContent",
31
31
  props: {
@@ -68,23 +68,23 @@ var E = /* @__PURE__ */ a({
68
68
  "interactOutside",
69
69
  "closeAutoFocus"
70
70
  ],
71
- setup(r, { emit: a }) {
72
- let o = r, c = a, p = w(T(o, "class", "to"), c), h = S();
73
- return t("content", () => h.modal.value && h.open.value), (t, a) => (l(), n(d(g), { to: r.to }, {
74
- default: f(() => [i(d(m), s({
71
+ setup(i, { emit: o }) {
72
+ let s = i, l = o, m = T(E(s, "class", "to"), l), g = C();
73
+ return t("content", () => g.modal.value && g.open.value), n(!1), (t, n) => (u(), r(f(_), { to: i.to }, {
74
+ default: p(() => [a(f(h), c({
75
75
  ref: "content",
76
76
  "data-slot": "dropdown-menu-content"
77
77
  }, {
78
78
  ...t.$attrs,
79
- ...d(p)
80
- }, { class: d(e)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", o.class) }), {
81
- default: f(() => [u(t.$slots, "default")]),
79
+ ...f(m)
80
+ }, { class: f(e)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", s.class) }), {
81
+ default: p(() => [d(t.$slots, "default")]),
82
82
  _: 3
83
83
  }, 16, ["class"])]),
84
84
  _: 3
85
85
  }, 8, ["to"]));
86
86
  }
87
- }), O = /* @__PURE__ */ a({
87
+ }), k = /* @__PURE__ */ o({
88
88
  __name: "DropdownMenuRadioGroup",
89
89
  props: {
90
90
  modelValue: {},
@@ -93,13 +93,13 @@ var E = /* @__PURE__ */ a({
93
93
  },
94
94
  emits: ["update:modelValue"],
95
95
  setup(e, { emit: t }) {
96
- let r = w(e, t);
97
- return (e, t) => (l(), n(d(_), s({ "data-slot": "dropdown-menu-radio-group" }, d(r)), {
98
- default: f(() => [u(e.$slots, "default")]),
96
+ let n = T(e, t);
97
+ return (e, t) => (u(), r(f(v), c({ "data-slot": "dropdown-menu-radio-group" }, f(n)), {
98
+ default: p(() => [d(e.$slots, "default")]),
99
99
  _: 3
100
100
  }, 16));
101
101
  }
102
- }), k = { class: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, A = /* @__PURE__ */ a({
102
+ }), A = { class: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, j = /* @__PURE__ */ o({
103
103
  __name: "DropdownMenuRadioItem",
104
104
  props: {
105
105
  value: {},
@@ -116,17 +116,17 @@ var E = /* @__PURE__ */ a({
116
116
  ] }
117
117
  },
118
118
  emits: ["select"],
119
- setup(t, { emit: a }) {
120
- let o = t, c = a, m = w(T(o, "class"), c);
121
- return (t, a) => (l(), n(d(v), s({ "data-slot": "dropdown-menu-radio-item" }, d(m), { class: d(e)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", o.class) }), {
122
- default: f(() => [r("span", k, [i(d(h), null, {
123
- default: f(() => [u(t.$slots, "indicator-icon", {}, () => [i(d(p), { class: "size-2 fill-current" })])]),
119
+ setup(t, { emit: n }) {
120
+ let o = t, s = n, l = T(E(o, "class"), s);
121
+ return (t, n) => (u(), r(f(y), c({ "data-slot": "dropdown-menu-radio-item" }, f(l), { class: f(e)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", o.class) }), {
122
+ default: p(() => [i("span", A, [a(f(g), null, {
123
+ default: p(() => [d(t.$slots, "indicator-icon", {}, () => [a(f(m), { class: "size-2 fill-current" })])]),
124
124
  _: 3
125
- })]), u(t.$slots, "default")]),
125
+ })]), d(t.$slots, "default")]),
126
126
  _: 3
127
127
  }, 16, ["class"]));
128
128
  }
129
- }), j = /* @__PURE__ */ a({
129
+ }), M = /* @__PURE__ */ o({
130
130
  __name: "DropdownMenuSeparator",
131
131
  props: {
132
132
  asChild: { type: Boolean },
@@ -140,10 +140,10 @@ var E = /* @__PURE__ */ a({
140
140
  ] }
141
141
  },
142
142
  setup(t) {
143
- let r = t, i = T(r, "class");
144
- return (t, a) => (l(), n(d(b), s({ "data-slot": "dropdown-menu-separator" }, d(i), { class: d(e)("bg-border -mx-1 my-1 h-px", r.class) }), null, 16, ["class"]));
143
+ let n = t, i = E(n, "class");
144
+ return (t, a) => (u(), r(f(x), c({ "data-slot": "dropdown-menu-separator" }, f(i), { class: f(e)("bg-border -mx-1 my-1 h-px", n.class) }), null, 16, ["class"]));
145
145
  }
146
- }), M = /* @__PURE__ */ a({
146
+ }), N = /* @__PURE__ */ o({
147
147
  __name: "DropdownMenuTrigger",
148
148
  props: {
149
149
  disabled: { type: Boolean },
@@ -151,12 +151,12 @@ var E = /* @__PURE__ */ a({
151
151
  as: {}
152
152
  },
153
153
  setup(e) {
154
- let t = C(e);
155
- return (e, r) => (l(), n(d(x), s({ "data-slot": "dropdown-menu-trigger" }, d(t)), {
156
- default: f(() => [u(e.$slots, "default")]),
154
+ let t = w(e);
155
+ return (e, n) => (u(), r(f(S), c({ "data-slot": "dropdown-menu-trigger" }, f(t)), {
156
+ default: p(() => [d(e.$slots, "default")]),
157
157
  _: 3
158
158
  }, 16));
159
159
  }
160
160
  });
161
161
  //#endregion
162
- export { D as a, O as i, j as n, E as o, A as r, M as t };
162
+ export { O as a, k as i, M as n, D as o, j as r, N as t };