@nxgt/material-vue 0.27.0 → 0.29.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 (62) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +2 -2
  3. package/dist/{Button-DEUkxkrJ.js → Button-D1uzdbOJ.js} +1 -1
  4. package/dist/{HoverCardTrigger-TDll55LP.js → HoverCardTrigger-DaM5d4hE.js} +2 -2
  5. package/dist/{camera-UJXnnFeb.js → camera-DZ5nYW-v.js} +4 -4
  6. package/dist/{components-BZ1XAK37.js → components-Cteo76NG.js} +9603 -9508
  7. package/dist/components.js +5 -5
  8. package/dist/composables.js +2 -2
  9. package/dist/dnd.js +1 -1
  10. package/dist/{form-scope-BFGca0h6.js → form-scope-BvdPqk6T.js} +1 -1
  11. package/dist/{i18n-provider-DBusa725.js → i18n-provider-BPK68eqM.js} +1 -1
  12. package/dist/i18n.js +4 -4
  13. package/dist/{icon-button-jHB4MhQ5.js → icon-button-D60G5B_Z.js} +1 -1
  14. package/dist/lib/components/ui/feedback/toast/index.d.ts +2 -1
  15. package/dist/lib/components/ui/feedback/toast/toast-data.d.ts +23 -0
  16. package/dist/lib/components/ui/feedback/toast/toast.vue.d.ts +11 -4
  17. package/dist/lib/components/ui/feedback/toast/toasts.d.ts +26 -6
  18. package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
  19. package/dist/lib/components/ui/primitives/tabs/Tabs.vue.d.ts +6 -2
  20. package/dist/lib/components/ui/primitives/tabs/TabsList.vue.d.ts +2 -2
  21. package/dist/lib/components/ui/primitives/tabs/TabsTrigger.vue.d.ts +6 -4
  22. package/dist/lib/components/ui/primitives/tabs/tabs-classes.d.ts +27 -0
  23. package/dist/lib/components/ui/primitives/tabs/tabs-indicator.vue.d.ts +25 -0
  24. package/dist/lib/components/ui/primitives/tabs/tabs-variant.d.ts +5 -8
  25. package/dist/lib/components/ui/widgets/emoji/types.d.ts +1 -6
  26. package/dist/lib/i18n/resources/en/en.d.ts +14 -0
  27. package/dist/lib/i18n/resources/en/material.json.d.ts +15 -1
  28. package/dist/lib/i18n/resources/fr/fr.d.ts +14 -0
  29. package/dist/lib/i18n/resources/fr/material.json.d.ts +15 -1
  30. package/dist/lib/i18n/resources/resources.d.ts +28 -0
  31. package/dist/lib/i18n/translator.d.ts +1 -1
  32. package/dist/lib.js +2 -2
  33. package/dist/main.js +10 -10
  34. package/dist/map.js +4 -4
  35. package/dist/material-vue.css +1 -1
  36. package/dist/{pdf-outline-sidebar-ChjAXoUX.js → pdf-outline-sidebar-Bln9F9gF.js} +2 -2
  37. package/dist/{pdf-page-D4OTPcpF.js → pdf-page-BVtXjnHS.js} +1 -1
  38. package/dist/{pdf-page-list-CFgKYLur.js → pdf-page-list-D3eng5h4.js} +2 -2
  39. package/dist/{pdf-reader-B1hw81cG.js → pdf-reader-CPms5uyj.js} +8 -8
  40. package/dist/{pdf-sidebar-Do5HzrDq.js → pdf-sidebar-lzBEntPH.js} +3 -3
  41. package/dist/{pdf-thumbnail-sidebar-CMge0C9-.js → pdf-thumbnail-sidebar-DB3PmiGW.js} +3 -3
  42. package/dist/{pdf-toolbar-BBio9baU.js → pdf-toolbar-mWlGTWU1.js} +4 -4
  43. package/dist/pdf.js +2 -2
  44. package/dist/{sortable-provider-DMVbbmUU.js → sortable-provider-Dml11nQY.js} +2 -2
  45. package/dist/{stored-language-AJpwOMsA.js → stored-language-UnInBB6T.js} +30 -2
  46. package/dist/{stx-player-gtyStl7e.js → stx-player-BpQHnHaa.js} +2 -2
  47. package/dist/{translator-D2_swsMz.js → translator-J3_vaV_A.js} +1 -1
  48. package/dist/{use-heading-spy-BbEbAfPK.js → use-heading-spy-_dk8kGwL.js} +1 -1
  49. package/dist/{use-material-translation-BHtgyMz3.js → use-material-translation-Do6ztdtV.js} +3 -3
  50. package/docs/components/data-display.md +1 -1
  51. package/docs/components/feedback-and-status.md +35 -6
  52. package/docs/components/primitives.md +81 -18
  53. package/docs/components/rich-widgets.md +10 -0
  54. package/docs/guides/i18n.md +19 -2
  55. package/docs/guides/theming.md +17 -3
  56. package/docs/previews/data-display-codegroup.webp +0 -0
  57. package/docs/previews/primitives-tabs.webp +0 -0
  58. package/docs/previews/rich-widgets-emojipicker.webp +0 -0
  59. package/docs/roadmap.md +14 -1
  60. package/docs/troubleshooting.md +83 -0
  61. package/package.json +2 -2
  62. package/dist/lib/components/ui/widgets/emoji/emoji.groups.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @nxgt/material-vue
2
2
 
3
+ ## 0.29.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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)).
8
+
9
+ - **`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.
10
+ - **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.
11
+ - **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.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#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.
16
+ - Updated dependencies [[`2fcfa35`](https://github.com/softistx/nxgt-material/commit/2fcfa35d5bff9d46392247440a82f0bc3638f104), [`464883e`](https://github.com/softistx/nxgt-material/commit/464883e825e4601f17395c9586d0ac01dd392162)]:
17
+ - @nxgt/material-core@0.7.0
18
+
19
+ ## 0.28.0
20
+
21
+ ### Minor Changes
22
+
23
+ - [#468](https://github.com/softistx/nxgt-material/pull/468) [`5d57954`](https://github.com/softistx/nxgt-material/commit/5d57954d477f81d02872382b8ba54a97168dd191) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `Tabs` has two looks, the same as `@nxgt/material`'s, class for class: `underline`, the new default (tabs over a border, the active one in the primary colour with a bar under it that slides to the tab clicked or reached with the arrow keys), and `segmented` (a neutral pill track whose raised surface slides to the active tab, whose label also turns foreground and semibold). `TabsVariant` is `'underline' | 'segmented' | 'bar' | 'line'`; `bar` is a deprecated alias of `underline` and `line` of `segmented`, so no call site or type breaks. The sliding indicator is reka's `TabsIndicator`; the list scrolls sideways when the tabs overflow (its scrollbar hidden), `orientation="vertical"` puts the indicator on the side, and the focus ring is a primary outline inside the tab. Server HTML and pages without JavaScript show a static indicator under the active tab; once mounted, the list carries `data-indicator="ready"` and the sliding one takes over, with no hydration mismatch. `TabsTrigger` gains `@nxgt/material`'s icon: an `icon` prop (a component) or an `#icon` slot, before the label, which now renders in a `<span>`. `Tabs` always sets `data-variant` (`underline` when none is given). `TabsContent` is `w-full`, as in React. `CodeGroup` and the emoji lists use `underline` (the emoji list was `bar`, React's `line`: both libraries now match).
24
+
25
+ The indicator jumps instead of sliding under `prefers-reduced-motion: reduce`, and `dir="rtl"` runs the tabs and the indicator from the right. The `segmented` track scrolls sideways on a phone too, rather than widening the page. The emoji list's icon-only group tabs are named (`aria-label` and `title`, from the new `material.emoji.groups.*` keys, in English and French); an icon-only `TabsTrigger` of your own needs an `aria-label` the same way.
26
+
27
+ `TabsList` accepts `asChild` (it threw in React with two children; the sliding indicator now sits inside the child, and in Vue a list with `asChild` keeps the static indicator), and the indicator follows a tab inserted or removed before the active one.
28
+
29
+ **Deprecated:** `variant="bar"` and `variant="line"`. They still type-check and render, as `underline` and `segmented`; write those instead.
30
+
31
+ **Visible change:** a `Tabs` with no `variant`, or with `variant="bar"`, no longer renders one muted pill with the active trigger raised; it renders `underline`. `variant="line"` renders `segmented` (a rounded pill, not the muted strip).
32
+
33
+ ### Migration
34
+
35
+ - Search for `variant="bar"` and replace it with `variant="underline"` (or remove it: `underline` is the default). Search for `variant="line"` and replace it with `variant="segmented"`. Search for `variant: 'bar'` / `variant: 'line'` in objects and typed props the same way.
36
+ - The old `bar` look (a muted pill, the active trigger raised) is gone. The closest is `segmented`, a neutral pill whose active tab sits on a raised surface; set `variant="segmented"` explicitly to keep a pill.
37
+ - Tests that queried the old classes must change: `bg-muted`, `h-9`, `rounded-lg` on the list, `bg-background`, `shadow-sm` on the active trigger, `w-full` or `bg-muted/60` on the `line` list. Query the state instead: `getByRole('tab', { selected: true })`, or `toHaveAttribute('data-state', 'active')`, and `data-variant` on `[data-slot="tabs"]` for the look (now always set; it holds the variant as written).
38
+ - A trigger's icon can move from the default slot to `:icon="User"` or `<template #icon>`; one left in the default slot still renders, beside the label.
39
+
40
+ ### Patch Changes
41
+
42
+ - [#470](https://github.com/softistx/nxgt-material/pull/470) [`853d093`](https://github.com/softistx/nxgt-material/commit/853d093f0620dc6940ea1ce69e025b61e3b0094d) Thanks [@SteveGT96](https://github.com/SteveGT96)! - The roadmap names the release that ships the two Tabs looks and the emoji groups.
43
+ - Updated dependencies [[`5f984fa`](https://github.com/softistx/nxgt-material/commit/5f984fa95a2944e6c71acd81d0272730d87c2c0a), [`853d093`](https://github.com/softistx/nxgt-material/commit/853d093f0620dc6940ea1ce69e025b61e3b0094d)]:
44
+ - @nxgt/material-core@0.6.0
45
+
3
46
  ## 0.27.0
4
47
 
5
48
  ### Minor Changes
package/README.md CHANGED
@@ -361,7 +361,7 @@ React-only for now: `StepperIndicator` ([roadmap](https://cdn.jsdelivr.net/npm/@
361
361
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-kbd.webp" width="120" alt="Kbd"> | [`Kbd`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#kbd), `KbdShortcut` | One keyboard key, or a key combination with platform glyphs. | `Kbd`, `KbdShortcut` |
362
362
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-separator.webp" width="120" alt="Separator"> | [`Separator`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#separator) | Horizontal or vertical divider. | `Separator` |
363
363
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-table.webp" width="120" alt="Table"> | [`Table`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#table), `TableHeader`, `TableBody`, `TableRow`, `TableHead`, `TableCell`, `TableEmpty` + parts | Styled semantic table inside a scrollable wrapper. | `Table` (same parts) |
364
- | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-tabs.webp" width="120" alt="Tabs"> | [`Tabs`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#tabs), `TabsList`, `TabsTrigger`, `TabsContent`, `Tabs` | Tabs whose triggers can take an icon. `variant="line"` is the quieter pill style. | `Tabs` (same parts) |
364
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-tabs.webp" width="120" alt="Tabs"> | [`Tabs`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#tabs), `TabsList`, `TabsTrigger`, `TabsContent` | Tabs whose triggers can take an icon, in two looks: `underline` (the default) and the `segmented` pill. | `Tabs` (same parts) |
365
365
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-toggle.webp" width="120" alt="Toggle"> | [`Toggle`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#toggle), `ToggleGroup`, `ToggleGroupItem` | Pressable on / off button: default or outline, three sizes. | `Toggle` |
366
366
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-togglegroup.webp" width="120" alt="ToggleGroup"> | [`Toggle`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#togglegroup), `ToggleGroup`, `ToggleGroupItem` | Single or multiple toggle group sharing variant and size. | `ToggleGroup`, `ToggleGroupItem`, `ToggleGroupSeparator` |
367
367
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/primitives-activity.webp" width="120" alt="Activity"> | [`Activity`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/primitives.md#activity) | Keeps its content mounted and hides it with a boolean `visible`. | `Activity` |
@@ -465,7 +465,7 @@ React-only for now: `StepperIndicator` ([roadmap](https://cdn.jsdelivr.net/npm/@
465
465
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-accordioncard.webp" width="120" alt="AccordionCard"> | [`AccordionCard`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#accordioncard) | Renders `items` (title, content) as a styled accordion, with `#header`, `#title` and `#content` slots. | `AccordionCard` |
466
466
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-timeline.webp" width="120" alt="Timeline"> | [`Timeline`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#timeline), `TimelineItem`, `RelativeTime` | Vertical event timeline with toned markers and relative times. | `Timeline`, `TimelineItem`, `RelativeTime` |
467
467
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-eventchip.webp" width="120" alt="EventChip"> | [`EventChip`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#eventchip) | Calendar event pill with time, all-day and continuation edges. | `EventChip` |
468
- | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-codeblock.webp" width="120" alt="CodeBlock"> | [`CodeBlock`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#codeblock), `CodeDiff`, `JsonViewer`, `CodeGroup` | Highlighted code with line numbers and copy, a Monaco diff, a collapsible JSON tree, and tabbed samples (`Tabs variant="line"`). | `CodeBlock`, `CodeDiff`, `JsonViewer`, `CodeGroup` |
468
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-codeblock.webp" width="120" alt="CodeBlock"> | [`CodeBlock`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#codeblock), `CodeDiff`, `JsonViewer`, `CodeGroup` | Highlighted code with line numbers and copy, a Monaco diff, a collapsible JSON tree, and tabbed samples (`Tabs`, underlined). | `CodeBlock`, `CodeDiff`, `JsonViewer`, `CodeGroup` |
469
469
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-markdown.webp" width="120" alt="Markdown"> | [`Markdown`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#markdown), `MermaidDiagram` | Markdown with KaTeX math and mermaid diagrams (client-only). Fences reuse `CodeBlock`. `ChatMarkdown` renders through it. | `Markdown`, `MermaidDiagram` |
470
470
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-terminal.webp" width="120" alt="Terminal"> | [`Terminal`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#terminal) | Display-only log with prompt, copy, and error/input tones. Container queries. | `Terminal` |
471
471
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/previews/data-display-figure.webp" width="120" alt="Figure"> | [`Figure`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/components/data-display.md#figure) | Framed media with an optional caption. | `Figure` |
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { t } from "./use-material-translation-BHtgyMz3.js";
2
+ import { t } from "./use-material-translation-Do6ztdtV.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,6 +1,6 @@
1
1
  import { t as e } from "./utils-CykWQ0iJ.js";
2
- import { t } from "./use-material-translation-BHtgyMz3.js";
3
- import { t as n } from "./Button-DEUkxkrJ.js";
2
+ import { t } from "./use-material-translation-Do6ztdtV.js";
3
+ import { t as n } from "./Button-D1uzdbOJ.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-BZ1XAK37.js";
3
- import { t as i } from "./use-material-translation-BHtgyMz3.js";
4
- import { t as a } from "./Button-DEUkxkrJ.js";
5
- import { t as o } from "./icon-button-jHB4MhQ5.js";
2
+ import { gr as t, mr as n, pr as r } from "./components-Cteo76NG.js";
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";
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