@nxgt/material-vue 0.28.0 → 0.29.1

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 (32) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{Button-D1uzdbOJ.js → Button-CNbJT5qV.js} +5 -5
  3. package/dist/{HoverCardTrigger-DaM5d4hE.js → HoverCardTrigger-Ci1iT9-I.js} +1 -1
  4. package/dist/{camera-CxXijySa.js → camera-BFnqY3CN.js} +3 -3
  5. package/dist/components/theme-tokens.css +2 -2
  6. package/dist/{components-Db9OdMfQ.js → components-kGJbzQYZ.js} +10249 -10213
  7. package/dist/components.js +5 -5
  8. package/dist/dnd.js +1 -1
  9. package/dist/{form-scope-BILi3ke-.js → form-scope-DHnmoR2r.js} +1 -1
  10. package/dist/{icon-button-D60G5B_Z.js → icon-button-DXXjxBgr.js} +6 -6
  11. package/dist/lib/components/ui/feedback/toast/index.d.ts +2 -1
  12. package/dist/lib/components/ui/feedback/toast/toast-data.d.ts +23 -0
  13. package/dist/lib/components/ui/feedback/toast/toast.vue.d.ts +11 -4
  14. package/dist/lib/components/ui/feedback/toast/toasts.d.ts +26 -6
  15. package/dist/main.js +5 -5
  16. package/dist/map.js +3 -3
  17. package/dist/material-vue.css +1 -1
  18. package/dist/{pdf-outline-sidebar-BXGTDISI.js → pdf-outline-sidebar-Bll123U-.js} +1 -1
  19. package/dist/{pdf-page-BR4G03kN.js → pdf-page-DEi2b6dz.js} +1 -1
  20. package/dist/{pdf-page-list-bjQm6_kf.js → pdf-page-list-eQ0uLV6i.js} +2 -2
  21. package/dist/{pdf-reader-DGVEFNc0.js → pdf-reader-CWQbdM31.js} +7 -7
  22. package/dist/{pdf-sidebar-CiM6dwAm.js → pdf-sidebar-Dv2PY_bB.js} +2 -2
  23. package/dist/{pdf-thumbnail-sidebar-fM3DGJzD.js → pdf-thumbnail-sidebar-3RBdIUuk.js} +2 -2
  24. package/dist/{pdf-toolbar-mWlGTWU1.js → pdf-toolbar-Z5YML7a-.js} +3 -3
  25. package/dist/pdf.js +1 -1
  26. package/dist/{sortable-provider-Dml11nQY.js → sortable-provider-Cb3tm9Cy.js} +1 -1
  27. package/dist/{stx-player-BS7-CXFx.js → stx-player-DVTFb2Oe.js} +1 -1
  28. package/docs/components/feedback-and-status.md +35 -6
  29. package/docs/roadmap.md +5 -0
  30. package/docs/troubleshooting.md +50 -2
  31. package/lib/components/theme-tokens.css +2 -2
  32. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @nxgt/material-vue
2
2
 
3
+ ## 0.29.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#484](https://github.com/softistx/nxgt-material/pull/484) [`a97ec69`](https://github.com/softistx/nxgt-material/commit/a97ec695491dc0660ef62d88f326f4c36de234b3) Thanks [@SteveGT96](https://github.com/SteveGT96)! - A filled `Button` and `IconButton` keep an opaque fill in every state, focus included (softistx/nxgt-material#483). The `default` colour faded to 80 % of the foreground on focus (and 90 % on hover, 70 % on press), and the `secondary`, `success`, `info` and `warning` colours were translucent in the dark theme; the label's contrast then depended on what sat behind the button and could fall under 4.5:1 (WCAG 1.4.3). Those states are now opaque mixes toward the page background, and focus is shown by the ring. Apps can remove an axe exclusion for `[data-slot="button"][data-variant="filled"]:focus`.
8
+
9
+ ## 0.29.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#475](https://github.com/softistx/nxgt-material/pull/475) [`2fcfa35`](https://github.com/softistx/nxgt-material/commit/2fcfa35d5bff9d46392247440a82f0bc3638f104) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Toasts: every preset takes sonner's own call, and an action that opens a dialog keeps the focus in it ([#472](https://github.com/softistx/nxgt-material/issues/472), [#473](https://github.com/softistx/nxgt-material/issues/473)).
14
+
15
+ - **`toasts.*(message, data)`.** `toasts.custom`, `success`, `info`, `warning`, `error` and `loading` also take sonner's (vue-sonner's) `(message, data)`: the message is the title, `data.description` and `data.action` are shown, and the rest of `data` (`id`, `duration`, `onDismiss`…) is passed as the options. Before, `toasts.success('Staff member restored', { action })` showed the preset's "Success" title and "Close" button, and dropped the message, the description and the action. `data` is typed `ToastData` (exported with `ToastArgs`): sonner's `ExternalToast` without `icon` (a preset draws its own) and `cancel` (the X button stands for it). The props object (`toasts.success({ title, action })`) works as before.
16
+ - **An action that opens a dialog keeps the focus there.** A click on a toast's action first gives the focus back to the control that had it before the toast, then runs `onClick`, then closes the toast; a function action's `dismiss` does the same. In `@nxgt/material`, sonner used to focus that control again as soon as the focus left the `Toaster`, which pulled it out of the dialog the action had just opened (WCAG 2.4.3); in both packages, the dialog gave the focus back, once closed, to the toast's button, gone with its toast, so to `document.body`. Now the dialog keeps the control it focused, and returns the focus to the control that had it before the toast. `ToastAction`'s `onClick` now receives the click event, optional so code that calls it directly still compiles (`() => void` handlers still fit). A toast reached by Tab from another toast hands the focus back to the same control. In `@nxgt/material-vue`, the message of `(message, data)` and a `ToastAction`'s `label` may also be a component, as in vue-sonner.
17
+ - **Migration.** `Parameters<typeof toasts.success>[0]` (and `warning`, `info`, `error`) is now the union of both call forms: use the exported `PresetProps` (or `CustomToastProps` for `custom`) for the props. Search for a blur of `document.activeElement` followed by `requestAnimationFrame` (or a `setTimeout`) around a toast action that opens a dialog, and for `toasts.custom` calls standing in for `toasts.success` only to keep an `action`: both can go. A button rendered by a function action that opens a dialog should call the `dismiss` it is given first.
18
+
19
+ ### Patch Changes
20
+
21
+ - [#476](https://github.com/softistx/nxgt-material/pull/476) [`464883e`](https://github.com/softistx/nxgt-material/commit/464883e825e4601f17395c9586d0ac01dd392162) Thanks [@SteveGT96](https://github.com/SteveGT96)! - The roadmap names the release that ships the toast action and focus fixes.
22
+ - Updated dependencies [[`2fcfa35`](https://github.com/softistx/nxgt-material/commit/2fcfa35d5bff9d46392247440a82f0bc3638f104), [`464883e`](https://github.com/softistx/nxgt-material/commit/464883e825e4601f17395c9586d0ac01dd392162)]:
23
+ - @nxgt/material-core@0.7.0
24
+
3
25
  ## 0.28.0
4
26
 
5
27
  ### Minor Changes
@@ -419,22 +419,22 @@ var H = F(() => {
419
419
  {
420
420
  variant: "filled",
421
421
  color: "secondary",
422
- class: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--color-secondary)_90%,black)] [&_svg]:data-[slot=icon]:text-secondary-foreground active:bg-[color-mix(in_oklab,var(--color-secondary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-secondary)_85%,black)] dark:bg-secondary/70 dark:hover:bg-secondary/60 dark:active:bg-secondary/50 dark:focus:bg-secondary/60"
422
+ class: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--color-secondary)_90%,black)] [&_svg]:data-[slot=icon]:text-secondary-foreground active:bg-[color-mix(in_oklab,var(--color-secondary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-secondary)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-secondary)_70%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-secondary)_50%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))]"
423
423
  },
424
424
  {
425
425
  variant: "filled",
426
426
  color: "success",
427
- class: "bg-success text-success-foreground hover:bg-[color-mix(in_oklab,var(--color-success)_90%,black)] [&_svg]:data-[slot=icon]:text-success-foreground active:bg-[color-mix(in_oklab,var(--color-success)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-success)_85%,black)] dark:bg-success/60 dark:hover:bg-success/50 dark:active:bg-success/40 dark:focus:bg-success/50"
427
+ class: "bg-success text-success-foreground hover:bg-[color-mix(in_oklab,var(--color-success)_90%,black)] [&_svg]:data-[slot=icon]:text-success-foreground active:bg-[color-mix(in_oklab,var(--color-success)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-success)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-success)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-success)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))]"
428
428
  },
429
429
  {
430
430
  variant: "filled",
431
431
  color: "info",
432
- class: "bg-info text-info-foreground hover:bg-[color-mix(in_oklab,var(--color-info)_90%,black)] [&_svg]:data-[slot=icon]:text-info-foreground active:bg-[color-mix(in_oklab,var(--color-info)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-info)_85%,black)] dark:bg-info/60 dark:hover:bg-info/50 dark:active:bg-info/40 dark:focus:bg-info/50"
432
+ class: "bg-info text-info-foreground hover:bg-[color-mix(in_oklab,var(--color-info)_90%,black)] [&_svg]:data-[slot=icon]:text-info-foreground active:bg-[color-mix(in_oklab,var(--color-info)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-info)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-info)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-info)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))]"
433
433
  },
434
434
  {
435
435
  variant: "filled",
436
436
  color: "warning",
437
- class: "bg-warning text-warning-foreground hover:bg-[color-mix(in_oklab,var(--color-warning)_90%,black)] [&_svg]:data-[slot=icon]:text-warning-foreground active:bg-[color-mix(in_oklab,var(--color-warning)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-warning)_85%,black)] dark:bg-warning/60 dark:hover:bg-warning/50 dark:active:bg-warning/40 dark:focus:bg-warning/50"
437
+ class: "bg-warning text-warning-foreground hover:bg-[color-mix(in_oklab,var(--color-warning)_90%,black)] [&_svg]:data-[slot=icon]:text-warning-foreground active:bg-[color-mix(in_oklab,var(--color-warning)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-warning)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-warning)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-warning)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))]"
438
438
  },
439
439
  {
440
440
  variant: "filled",
@@ -444,7 +444,7 @@ var H = F(() => {
444
444
  {
445
445
  variant: "filled",
446
446
  color: "default",
447
- class: "bg-foreground text-background hover:bg-foreground/90 [&_svg]:data-[slot=icon]:text-foreground active:bg-foreground/70 focus:bg-foreground/80"
447
+ class: "bg-foreground text-background hover:bg-[color-mix(in_oklab,var(--color-foreground)_90%,var(--color-background))] [&_svg]:data-[slot=icon]:text-foreground active:bg-[color-mix(in_oklab,var(--color-foreground)_70%,var(--color-background))] focus:bg-[color-mix(in_oklab,var(--color-foreground)_80%,var(--color-background))]"
448
448
  },
449
449
  {
450
450
  variant: "tonal",
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
2
  import { t } from "./use-material-translation-Do6ztdtV.js";
3
- import { t as n } from "./Button-D1uzdbOJ.js";
3
+ import { t as n } from "./Button-CNbJT5qV.js";
4
4
  import { t as r } from "./use-inert-others-CtGqZKR8.js";
5
5
  import { t as i } from "./field-name-attribute-Bl7LSVK0.js";
6
6
  import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, getCurrentInstance as p, guardReactiveProps as m, isRef as h, mergeProps as g, normalizeClass as _, normalizeProps as v, onMounted as ee, onUpdated as y, openBlock as b, renderSlot as x, toDisplayString as S, unref as C, useAttrs as w, useId as T, useTemplateRef as E, vModelText as D, withCtx as O, withDirectives as k } from "vue";
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { gr as t, mr as n, pr as r } from "./components-Db9OdMfQ.js";
2
+ import { gr as t, mr as n, pr as r } from "./components-kGJbzQYZ.js";
3
3
  import { t as i } from "./use-material-translation-Do6ztdtV.js";
4
- import { t as a } from "./Button-D1uzdbOJ.js";
5
- import { t as o } from "./icon-button-D60G5B_Z.js";
4
+ import { t as a } from "./Button-CNbJT5qV.js";
5
+ import { t as o } from "./icon-button-DXXjxBgr.js";
6
6
  import { createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, ref as g, renderSlot as _, shallowRef as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
7
7
  import { Pause as S, Play as C } from "@lucide/vue";
8
8
  //#region lib/components/ui/media/camera/camera-content.vue?vue&type=script&setup=true&lang.ts
@@ -70,8 +70,8 @@
70
70
  --primary: oklch(46% 0.1135 276.35);
71
71
  --primary-foreground: oklch(0.984 0.003 247.858);
72
72
  /* Brighter than the light one: it is read as text on the dark surfaces (6.5:1
73
- on --background, 5.8:1 on --card); a filled secondary surface tints it
74
- (dark:bg-secondary/70) to keep 5.2:1 under its near-white text. */
73
+ on --background, 5.8:1 on --card); a filled secondary surface mixes it toward --background
74
+ (the opaque 70 % mix) to keep 5.2:1 under its near-white text. */
75
75
  --secondary: oklch(0.66 0.1135 245.65);
76
76
  --secondary-foreground: oklch(0.984 0.003 247.858);
77
77
  --muted: oklch(0.279 0.041 260.031);