@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
@@ -54,6 +54,8 @@ words in your error.
54
54
  - [A toast covers the form's button on a phone](#a-toast-covers-the-forms-button-on-a-phone)
55
55
  - [A toast never goes away after a tap](#a-toast-never-goes-away-after-a-tap)
56
56
  - [A toast's action cannot be clicked while a dialog is open](#a-toasts-action-cannot-be-clicked-while-a-dialog-is-open)
57
+ - [`toasts.success(message, { action })` shows no action button](#toastssuccessmessage--action--shows-no-action-button)
58
+ - [The focus leaves a dialog that a toast's action opened](#the-focus-leaves-a-dialog-that-a-toasts-action-opened)
57
59
  - [A `ConfirmationDialog` reopened at once stays closed](#a-confirmationdialog-reopened-at-once-stays-closed)
58
60
  - [The first Escape after closing a nested dialog does nothing](#the-first-escape-after-closing-a-nested-dialog-does-nothing)
59
61
 
@@ -61,6 +63,8 @@ words in your error.
61
63
 
62
64
  - [A `ListTile` link reloads the whole page](#a-listtile-link-reloads-the-whole-page)
63
65
  - [The phone menu needs two Escapes to close, or a tooltip shows over it](#the-phone-menu-needs-two-escapes-to-close-or-a-tooltip-shows-over-it)
66
+ - [`Tabs` look different after upgrading](#tabs-look-different-after-upgrading)
67
+ - [A screen reader announces an icon-only tab as "tab", with no name](#a-screen-reader-announces-an-icon-only-tab-as-tab-with-no-name)
64
68
 
65
69
  **SSR & build**
66
70
 
@@ -1137,6 +1141,52 @@ counted a pointer down on a toast as outside the dialog.
1137
1141
  inside the `Toaster` as inside, so the action runs and the dialog stays open.
1138
1142
  Sonner's own `Toaster` keeps the old behaviour.
1139
1143
 
1144
+ ### `toasts.success(message, { action })` shows no action button
1145
+
1146
+ **When:** a preset is called the way vue-sonner's own `toast.success` is, with a
1147
+ message and a `data` object: `toasts.success('Staff member restored', {
1148
+ action: { label: 'Send an invitation', onClick } })`. The toast shows the
1149
+ preset's default title ("Success") and its "Close" button, not your message,
1150
+ description or action.
1151
+ **Why:** the presets took one props object only (`{ title, description,
1152
+ action, options }`): a string first argument was read as that object, and
1153
+ the second argument was ignored.
1154
+ **Fix:** update `@nxgt/material-vue`: every preset (`custom`, `success`, `info`,
1155
+ `warning`, `error`, `loading`) now takes `(message, data)` too, the message as
1156
+ the title and `data.description` and `data.action` shown, the rest of `data`
1157
+ as vue-sonner's options. The props object works as before:
1158
+
1159
+ ```ts
1160
+ toasts.success('Staff member restored', { action: { label: 'Send an invitation', onClick } });
1161
+ toasts.success({ title: 'Staff member restored', action: { label: 'Send an invitation', onClick } });
1162
+ ```
1163
+
1164
+ `data` takes no `icon` (a preset draws its own) and no `cancel` (the X button
1165
+ beside the action stands for it).
1166
+
1167
+ ### The focus leaves a dialog that a toast's action opened
1168
+
1169
+ **When:** a toast's action opens a `Dialog` (or an `AlertDialog`, a `Sheet`,
1170
+ a `Drawer`). Closing the dialog leaves the focus on `document.body`, not on
1171
+ the control that had it before the toast, and a keyboard user starts again
1172
+ from the top of the page.
1173
+ **Why:** the toast's button had the focus when the action ran, so the
1174
+ dialog took it as the control to give the focus back to; that button left
1175
+ the page with its toast, and the focus fell to `document.body`. A keyboard
1176
+ user reaches a toast through the list item around it, and vue-sonner
1177
+ restores nothing when the focus leaves the list (its `blur` does not bubble
1178
+ from the toast's buttons), so nothing else gave the focus back. With several
1179
+ toasts, a toast reached from another one never had the focus from the page:
1180
+ the `Toaster` remembers where the focus entered it for that case.
1181
+ **Fix:** update `@nxgt/material-vue` and give the toast an `action` (a `{ label,
1182
+ onClick }`, or a function that calls the `dismiss` it is given): the action
1183
+ gives the focus back to where it was before the toast first, then runs. The
1184
+ dialog keeps its control, and gives the focus back to that earlier control
1185
+ when it closes. A workaround that blurs the button and opens the dialog on
1186
+ the next frame can go. A button you render in a function action and that
1187
+ opens a dialog without calling `dismiss` is not covered: call `dismiss()`
1188
+ before opening the dialog.
1189
+
1140
1190
  ### A `ConfirmationDialog` reopened at once stays closed
1141
1191
 
1142
1192
  **When:** a `ConfirmationDialog` with `v-model:open` (or `:open` and
@@ -1242,6 +1292,39 @@ the tooltip's own layer takes the first Escape.
1242
1292
  tooltip, since it shows its label; a collapsed one keeps it, and an explicit
1243
1293
  `tooltip` is always shown. A `SidebarMenuItem` of your own needs no change.
1244
1294
 
1295
+ ### `Tabs` look different after upgrading
1296
+
1297
+ **When:** a `Tabs` with no `variant`, or with `variant="bar"`, renders a row of
1298
+ tabs over a border with a bar under the active one, where it rendered
1299
+ one muted pill with the active trigger raised;
1300
+ one with `variant="line"` renders a rounded pill.
1301
+ **Why:** `underline` is now the default look. `bar` and `line` are deprecated
1302
+ aliases: `bar` renders as `underline`, `line` as `segmented`.
1303
+ **Fix:** write the look you want. `underline` needs no `variant`; for a pill,
1304
+ set `segmented`:
1305
+
1306
+ ```vue
1307
+ <Tabs default-value="week" variant="segmented">
1308
+ ```
1309
+
1310
+ A test that queried the old classes should query the state instead:
1311
+ `getByRole('tab', { selected: true })`, and `data-variant` on
1312
+ `[data-slot="tabs"]` for the look.
1313
+
1314
+ ### A screen reader announces an icon-only tab as "tab", with no name
1315
+
1316
+ **When:** a `TabsTrigger` holds only an icon; an accessibility audit reports a
1317
+ tab with no accessible name.
1318
+ **Why:** a tab is named by its text, and an icon has none.
1319
+ **Fix:** give the trigger `aria-label`, and `title` for a hover hint:
1320
+
1321
+ ```vue
1322
+ <TabsTrigger value="recent" :icon="Clock" aria-label="Recent" title="Recent" />
1323
+ ```
1324
+
1325
+ `EmojiList` and `EmojiPicker` name their group tabs themselves; update
1326
+ `@nxgt/material-vue` if yours read "tab" only.
1327
+
1245
1328
  ## SSR & build
1246
1329
 
1247
1330
  ### `ReferenceError: window is not defined`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material-vue",
3
- "version": "0.27.0",
3
+ "version": "0.29.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -119,7 +119,7 @@
119
119
  "docs:previews": "vitest run --project previews"
120
120
  },
121
121
  "dependencies": {
122
- "@nxgt/material-core": "^0.5.0",
122
+ "@nxgt/material-core": "^0.7.0",
123
123
  "@floating-ui/dom": "^1.8.0",
124
124
  "@fortawesome/fontawesome-common-types": "7.3.1",
125
125
  "@lucide/vue": "^1.45.0",
@@ -1,6 +0,0 @@
1
- import { EmojiItem } from './types';
2
- export declare function groupKey(group?: string | null): string;
3
- export declare function groupEmojis(emojis: EmojiItem[], recent: string[]): {
4
- [k: string]: EmojiItem[];
5
- };
6
- export declare function searchEmojis(emojis: EmojiItem[], query: string): EmojiItem[] | null;