@nxgt/material-vue 0.40.1 → 0.42.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.
- package/CHANGELOG.md +60 -0
- package/README.md +3 -2
- package/dist/{Button-teS2p_af.js → Button-CWmzvv9p.js} +132 -94
- package/dist/{HoverCardTrigger-BEzEsgBo.js → HoverCardTrigger-C5AbAyHE.js} +2 -2
- package/dist/{camera-1QRTmpnM.js → camera-C-9slBUV.js} +4 -4
- package/dist/components/base-content.css +14 -4
- package/dist/{components-XJ95qxB1.js → components-DX4EycMi.js} +10131 -9800
- package/dist/components.js +8 -8
- package/dist/composables.js +2 -2
- package/dist/dnd.js +1 -1
- package/dist/{form-scope-BtEP6yC2.js → form-scope-CN68PTXc.js} +1 -1
- package/dist/{i18n-provider-BpNC9SxV.js → i18n-provider-DmZSTBnp.js} +1 -1
- package/dist/i18n.js +4 -4
- package/dist/{icon-button-Vz4NECf1.js → icon-button-DErh1aJS.js} +43 -5
- package/dist/lib/components/ui/actions/button/Button.vue.d.ts +1 -1
- package/dist/lib/components/ui/actions/button/button.compound-variants.d.ts +28 -0
- package/dist/lib/components/ui/actions/button/button.variants.d.ts +8 -2
- package/dist/lib/components/ui/actions/copy-button/copy-button.vue.d.ts +1 -1
- package/dist/lib/components/ui/actions/copy-button/use-copy-status.d.ts +3 -1
- package/dist/lib/components/ui/actions/icon-button/icon-button.compound-variants.d.ts +28 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +8 -2
- package/dist/lib/components/ui/actions/icon-button/icon-button.vue.d.ts +1 -1
- package/dist/lib/components/ui/actions/link/icon-link-button.vue.d.ts +1 -1
- package/dist/lib/components/ui/actions/link/link-button.vue.d.ts +1 -1
- package/dist/lib/components/ui/actions/link/responsive-link-button.vue.d.ts +1 -1
- package/dist/lib/components/ui/actions/load-more-button/load-more-button.vue.d.ts +1 -1
- package/dist/lib/components/ui/actions/scroll-to-top/scroll-to-top.vue.d.ts +1 -1
- package/dist/lib/components/ui/display/cards/cards.gallery.d.ts +3 -3
- package/dist/lib/components/ui/display/chip/chip.utils.d.ts +1 -1
- package/dist/lib/components/ui/display/enrolment-secret/enrolment-secret.vue.d.ts +17 -1
- package/dist/lib/components/ui/display/qrcode/qrcode.vue.d.ts +6 -0
- package/dist/lib/components/ui/display/recovery-codes/index.d.ts +1 -1
- package/dist/lib/components/ui/display/recovery-codes/partials/recovery-codes-actions.vue.d.ts +20 -2
- package/dist/lib/components/ui/display/recovery-codes/recovery-codes.vue.d.ts +9 -1
- package/dist/lib/components/ui/display/recovery-codes/types.d.ts +4 -0
- package/dist/lib/components/ui/display/recovery-codes/use-recovery-codes-labels.d.ts +1 -0
- package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
- package/dist/lib/components/ui/fields/otp-field/otp-field.vue.d.ts +2 -0
- package/dist/lib/components/ui/layout/account-menu/account-menu-avatar.vue.d.ts +9 -0
- package/dist/lib/components/ui/layout/account-menu/account-menu.vue.d.ts +38 -0
- package/dist/lib/components/ui/layout/account-menu/index.d.ts +3 -0
- package/dist/lib/components/ui/layout/account-menu/types.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/activity-layout.vue.d.ts +21 -5
- package/dist/lib/components/ui/layout/app-shell/app-brand-logo.vue.d.ts +20 -0
- package/dist/lib/components/ui/layout/app-shell/app-brand.vue.d.ts +30 -0
- package/dist/lib/components/ui/layout/app-shell/app-header.vue.d.ts +13 -5
- package/dist/lib/components/ui/layout/app-shell/app-sidebar.vue.d.ts +12 -2
- package/dist/lib/components/ui/layout/app-shell/index.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/types.d.ts +10 -0
- package/dist/lib/components/ui/layout/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/stepper/stepper.vue.d.ts +7 -2
- package/dist/lib/components/ui/media/carousel/carousel-next.vue.d.ts +1 -1
- package/dist/lib/components/ui/media/carousel/carousel-previous.vue.d.ts +1 -1
- package/dist/lib/components/ui/primitives/input-group/input-group-button.vue.d.ts +1 -1
- package/dist/lib/i18n/resources/en/en.d.ts +5 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +5 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +5 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -2
- package/dist/lib/i18n/resources/resources.d.ts +10 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/nuxt/component-names.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +17 -17
- package/dist/map.js +4 -4
- package/dist/material-vue.css +1 -1
- package/dist/{pdf-outline-sidebar-DINCjWKk.js → pdf-outline-sidebar-BU4o_hBI.js} +2 -2
- package/dist/{pdf-page-BLJ0xkS3.js → pdf-page-anNe78Lc.js} +1 -1
- package/dist/{pdf-page-list-BNUPVA9x.js → pdf-page-list-CSY76HH6.js} +2 -2
- package/dist/{pdf-reader-BcB_Kd_F.js → pdf-reader-BhZNrW7R.js} +8 -8
- package/dist/{pdf-sidebar-B7WgcY77.js → pdf-sidebar-DcIpG7eh.js} +3 -3
- package/dist/{pdf-thumbnail-sidebar-BRtyyBPt.js → pdf-thumbnail-sidebar-CUC0V4if.js} +3 -3
- package/dist/{pdf-toolbar-_CBHSMnH.js → pdf-toolbar-C373S-ul.js} +4 -4
- package/dist/pdf.js +2 -2
- package/dist/{print-format.utils-k5W0GBRF.js → print-format.utils-C81c0weJ.js} +2 -2
- package/dist/{sortable-provider-Dw9TBAlq.js → sortable-provider-CL2UGGn8.js} +2 -2
- package/dist/{stored-language-DEyPmUzl.js → stored-language-Wtcj2HsU.js} +12 -2
- package/dist/{stx-player-CgwzX7_k.js → stx-player-CMmM3F5Z.js} +12 -12
- package/dist/{translator-B62GlCBp.js → translator-D5Dp-dob.js} +1 -1
- package/dist/{use-heading-spy-T94lNeNA.js → use-heading-spy-BIBHtUXN.js} +1 -1
- package/dist/{use-material-translation-DxU51--g.js → use-material-translation-COoBTGpB.js} +3 -3
- package/docs/components/README.md +2 -1
- package/docs/components/buttons-and-actions.md +2 -2
- package/docs/components/data-display.md +14 -7
- package/docs/components/data-table-filter-and-lists.md +3 -1
- package/docs/components/feedback-and-status.md +7 -2
- package/docs/components/form-fields.md +2 -1
- package/docs/components/navigation-and-layout.md +62 -2
- package/docs/guides/app-shell.md +99 -19
- package/docs/guides/forms.md +10 -4
- package/docs/guides/i18n.md +1 -1
- package/docs/previews/navigation-layout-accountmenu.webp +0 -0
- package/docs/roadmap.md +9 -0
- package/docs/troubleshooting.md +31 -0
- package/lib/components/base-content.css +14 -4
- package/lib/nuxt/component-names.ts +1 -0
- package/package.json +2 -2
|
@@ -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 {
|
|
4
|
-
import { t as r } from "./use-material-translation-
|
|
3
|
+
import { Rf as n } from "./components-DX4EycMi.js";
|
|
4
|
+
import { t as r } from "./use-material-translation-COoBTGpB.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 {
|
|
2
|
+
import { qp as t } from "./components-DX4EycMi.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 {
|
|
3
|
-
import { t as n } from "./pdf-page-
|
|
2
|
+
import { Rf as t } from "./components-DX4EycMi.js";
|
|
3
|
+
import { t as n } from "./pdf-page-anNe78Lc.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-
|
|
3
|
-
import { t as n } from "./use-material-translation-
|
|
4
|
-
import { t as r } from "./Button-
|
|
5
|
-
import { o as i } from "./HoverCardTrigger-
|
|
6
|
-
import { n as a } from "./pdf-page-
|
|
7
|
-
import { t as o } from "./pdf-page-list-
|
|
8
|
-
import { t as s } from "./pdf-sidebar-
|
|
9
|
-
import { t as c } from "./pdf-toolbar-
|
|
2
|
+
import { kn as t } from "./components-DX4EycMi.js";
|
|
3
|
+
import { t as n } from "./use-material-translation-COoBTGpB.js";
|
|
4
|
+
import { t as r } from "./Button-CWmzvv9p.js";
|
|
5
|
+
import { o as i } from "./HoverCardTrigger-C5AbAyHE.js";
|
|
6
|
+
import { n as a } from "./pdf-page-anNe78Lc.js";
|
|
7
|
+
import { t as o } from "./pdf-page-list-CSY76HH6.js";
|
|
8
|
+
import { t as s } from "./pdf-sidebar-DcIpG7eh.js";
|
|
9
|
+
import { t as c } from "./pdf-toolbar-C373S-ul.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-
|
|
4
|
-
import { t as r } from "./pdf-outline-sidebar-
|
|
5
|
-
import { t as i } from "./pdf-thumbnail-sidebar-
|
|
3
|
+
import { t as n } from "./use-material-translation-COoBTGpB.js";
|
|
4
|
+
import { t as r } from "./pdf-outline-sidebar-BU4o_hBI.js";
|
|
5
|
+
import { t as i } from "./pdf-thumbnail-sidebar-CUC0V4if.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 {
|
|
4
|
-
import { t as r } from "./use-material-translation-
|
|
5
|
-
import { t as i } from "./pdf-page-
|
|
3
|
+
import { Rf as n } from "./components-DX4EycMi.js";
|
|
4
|
+
import { t as r } from "./use-material-translation-COoBTGpB.js";
|
|
5
|
+
import { t as i } from "./pdf-page-anNe78Lc.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-
|
|
4
|
-
import { f as r } from "./Button-
|
|
5
|
-
import { t as i } from "./icon-button-
|
|
3
|
+
import { t as n } from "./use-material-translation-COoBTGpB.js";
|
|
4
|
+
import { f as r } from "./Button-CWmzvv9p.js";
|
|
5
|
+
import { t as i } from "./icon-button-DErh1aJS.js";
|
|
6
6
|
import { a, i as o, n as s, o as c, r as l, t as u } from "./DropdownMenuTrigger-C7uYPf_9.js";
|
|
7
|
-
import { o as d } from "./HoverCardTrigger-
|
|
7
|
+
import { o as d } from "./HoverCardTrigger-C5AbAyHE.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-
|
|
2
|
-
import { t as n } from "./Button-
|
|
1
|
+
import { n as e, t } from "./use-material-translation-COoBTGpB.js";
|
|
2
|
+
import { t as n } from "./Button-CWmzvv9p.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
|
-
import { i as e, r as t, t as n } from "./stored-language-
|
|
2
|
-
import { r } from "./translator-
|
|
1
|
+
import { i as e, r as t, t as n } from "./stored-language-Wtcj2HsU.js";
|
|
2
|
+
import { r } from "./translator-D5Dp-dob.js";
|
|
3
3
|
import { t as i } from "./_baseIsEqual-BUD8VQJE.js";
|
|
4
4
|
import { E as a } from "./number.utils-C1eB3GDr.js";
|
|
5
5
|
import { defineComponent as o, getCurrentInstance as s, h as c, inject as l, provide as u, useId as d } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./utils-CykWQ0iJ.js";
|
|
2
|
-
import { t } from "./use-material-translation-
|
|
3
|
-
import { t as n } from "./icon-button-
|
|
2
|
+
import { t } from "./use-material-translation-COoBTGpB.js";
|
|
3
|
+
import { t as n } from "./icon-button-DErh1aJS.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";
|
|
@@ -789,6 +789,10 @@ var e = {
|
|
|
789
789
|
"open-menu": "Open menu",
|
|
790
790
|
navigation: "Navigation"
|
|
791
791
|
},
|
|
792
|
+
"account-menu": {
|
|
793
|
+
trigger: "Account menu, {name}",
|
|
794
|
+
"sign-out": "Sign out"
|
|
795
|
+
},
|
|
792
796
|
filter: {
|
|
793
797
|
title: "Filters",
|
|
794
798
|
trigger: "Filters",
|
|
@@ -1226,6 +1230,7 @@ var e = {
|
|
|
1226
1230
|
copy: "Copy codes",
|
|
1227
1231
|
copied: "Codes copied",
|
|
1228
1232
|
"copy-failed": "Copy failed",
|
|
1233
|
+
"copy-failed-hint": "Download or print the codes instead.",
|
|
1229
1234
|
download: "Download",
|
|
1230
1235
|
print: "Print",
|
|
1231
1236
|
saved: "I have saved these codes",
|
|
@@ -1578,8 +1583,8 @@ var e = {
|
|
|
1578
1583
|
table: {
|
|
1579
1584
|
loading: "Chargement des données…",
|
|
1580
1585
|
labels: {
|
|
1581
|
-
asc: "
|
|
1582
|
-
desc: "
|
|
1586
|
+
asc: "Croissant",
|
|
1587
|
+
desc: "Décroissant",
|
|
1583
1588
|
hide: "Cacher",
|
|
1584
1589
|
view: "Voir",
|
|
1585
1590
|
actions: "Actions",
|
|
@@ -2032,6 +2037,10 @@ var e = {
|
|
|
2032
2037
|
"open-menu": "Ouvrir le menu",
|
|
2033
2038
|
navigation: "Navigation"
|
|
2034
2039
|
},
|
|
2040
|
+
"account-menu": {
|
|
2041
|
+
trigger: "Menu du compte, {name}",
|
|
2042
|
+
"sign-out": "Se déconnecter"
|
|
2043
|
+
},
|
|
2035
2044
|
filter: {
|
|
2036
2045
|
title: "Filtres",
|
|
2037
2046
|
trigger: "Filtres",
|
|
@@ -2469,6 +2478,7 @@ var e = {
|
|
|
2469
2478
|
copy: "Copier les codes",
|
|
2470
2479
|
copied: "Codes copiés",
|
|
2471
2480
|
"copy-failed": "Échec de la copie",
|
|
2481
|
+
"copy-failed-hint": "Téléchargez ou imprimez plutôt les codes.",
|
|
2472
2482
|
download: "Télécharger",
|
|
2473
2483
|
print: "Imprimer",
|
|
2474
2484
|
saved: "J'ai enregistré ces codes",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./utils-CykWQ0iJ.js";
|
|
2
|
-
import { $t as t, Jt as n, Qt as r,
|
|
3
|
-
import { t as l } from "./use-material-translation-
|
|
2
|
+
import { $t as t, Jt as n, Qt as r, Xp as i, Xt as a, Yt as o, en as s, tn as c } from "./components-DX4EycMi.js";
|
|
3
|
+
import { t as l } from "./use-material-translation-COoBTGpB.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 = {
|
|
@@ -19,7 +19,7 @@ var S = ["data-layout", "aria-label"], C = {
|
|
|
19
19
|
Array
|
|
20
20
|
] }
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
22
|
+
setup(a) {
|
|
23
23
|
let { containerRef: g, state: w } = c();
|
|
24
24
|
function T(e) {
|
|
25
25
|
g.value = e instanceof HTMLElement ? e : null;
|
|
@@ -28,17 +28,17 @@ var S = ["data-layout", "aria-label"], C = {
|
|
|
28
28
|
return (c, l) => (v(), f("section", {
|
|
29
29
|
ref: T,
|
|
30
30
|
"data-slot": "stx-player",
|
|
31
|
-
"data-layout":
|
|
31
|
+
"data-layout": a.layout,
|
|
32
32
|
"aria-label": b(w).current?.title ?? b(E)("material.stx-player.label", "Media player"),
|
|
33
33
|
class: _(b(e)("@container rounded outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50", c.$props.class))
|
|
34
|
-
}, [
|
|
34
|
+
}, [a.layout === "mini" ? (v(), u(r, { key: 0 })) : (v(), f("div", {
|
|
35
35
|
key: 1,
|
|
36
|
-
class: _(b(e)("grid gap-3",
|
|
36
|
+
class: _(b(e)("grid gap-3", a.showQueue && "@min-[768px]:grid-cols-[minmax(0,1fr)_18rem] @min-[768px]:items-stretch"))
|
|
37
37
|
}, [p("div", { class: _(b(e)("bg-card overflow-hidden rounded border", b(w).current?.kind === "audio" && "flex flex-col gap-4 p-6")) }, [
|
|
38
|
-
b(w).current?.kind === "audio" ? (v(), f("div", C, [h(
|
|
38
|
+
b(w).current?.kind === "audio" ? (v(), f("div", C, [h(i, { variant: "title-medium" }, {
|
|
39
39
|
default: x(() => [m(y(b(w).current.title), 1)]),
|
|
40
40
|
_: 1
|
|
41
|
-
}), b(w).current.artist ? (v(), u(
|
|
41
|
+
}), b(w).current.artist ? (v(), u(i, {
|
|
42
42
|
key: 0,
|
|
43
43
|
class: "text-muted-foreground"
|
|
44
44
|
}, {
|
|
@@ -62,7 +62,7 @@ var S = ["data-layout", "aria-label"], C = {
|
|
|
62
62
|
trailing: x(() => [h(t, { tone: "surface" })]),
|
|
63
63
|
_: 1
|
|
64
64
|
})) : d("", !0)
|
|
65
|
-
], 2),
|
|
65
|
+
], 2), a.showQueue ? (v(), u(o, {
|
|
66
66
|
key: 0,
|
|
67
67
|
class: "min-h-72"
|
|
68
68
|
})) : d("", !0)], 2))], 10, S));
|
|
@@ -99,16 +99,16 @@ var S = ["data-layout", "aria-label"], C = {
|
|
|
99
99
|
emits: ["trackChange"],
|
|
100
100
|
setup(e, { emit: t }) {
|
|
101
101
|
let n = e, r = t;
|
|
102
|
-
function
|
|
102
|
+
function i(e, t) {
|
|
103
103
|
n.onTrackChange?.(e, t), r("trackChange", e, t);
|
|
104
104
|
}
|
|
105
|
-
return (t, r) => (v(), u(
|
|
105
|
+
return (t, r) => (v(), u(a, {
|
|
106
106
|
tracks: e.tracks,
|
|
107
107
|
"current-index": e.currentIndex,
|
|
108
108
|
"default-index": e.defaultIndex,
|
|
109
109
|
"auto-play": e.autoPlay,
|
|
110
110
|
loop: e.loop,
|
|
111
|
-
"on-track-change":
|
|
111
|
+
"on-track-change": i
|
|
112
112
|
}, {
|
|
113
113
|
default: x(() => [h(w, {
|
|
114
114
|
layout: e.layout,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, r as n, t as r } from "./stored-language-
|
|
1
|
+
import { a as e, i as t, r as n, t as r } from "./stored-language-Wtcj2HsU.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,4 +1,4 @@
|
|
|
1
|
-
import { a as e } from "./i18n-provider-
|
|
1
|
+
import { a as e } from "./i18n-provider-DmZSTBnp.js";
|
|
2
2
|
import { c as t, d as n, l as r, n as i, s as a, u as o } from "./number.utils-C1eB3GDr.js";
|
|
3
3
|
import { computed as s, getCurrentInstance as c, inject as l, onMounted as u, ref as d, shallowRef as f, toValue as p, watch as m } from "vue";
|
|
4
4
|
import { injectConfigProviderContext as h } from "reka-ui";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./stored-language-
|
|
2
|
-
import { a as e } from "./i18n-provider-
|
|
3
|
-
import { i as t, r as n } from "./translator-
|
|
1
|
+
import "./stored-language-Wtcj2HsU.js";
|
|
2
|
+
import { a as e } from "./i18n-provider-DmZSTBnp.js";
|
|
3
|
+
import { i as t, r as n } from "./translator-D5Dp-dob.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]])) {
|
|
@@ -71,9 +71,10 @@ Collections you query: data table, filter, pagination, tree, drag and drop. 6 en
|
|
|
71
71
|
|
|
72
72
|
## [Navigation & layout](navigation-and-layout.md)
|
|
73
73
|
|
|
74
|
-
Where a page sits and how you move: app shell, sidebar, app bars, breadcrumb, page layouts, grid, resizable, skip link, pager, TOC, steppers, hero, doc site shell, signed-out page frame.
|
|
74
|
+
Where a page sits and how you move: app shell, account menu, sidebar, app bars, breadcrumb, page layouts, grid, resizable, skip link, pager, TOC, steppers, hero, doc site shell, signed-out page frame. 19 entries.
|
|
75
75
|
|
|
76
76
|
[<img src="../previews/navigation-layout-appshell.webp" height="72" alt="ActivityLayout">](navigation-and-layout.md#activitylayout)
|
|
77
|
+
[<img src="../previews/navigation-layout-accountmenu.webp" height="72" alt="AccountMenu">](navigation-and-layout.md#accountmenu)
|
|
77
78
|
[<img src="../previews/navigation-layout-sidebar.webp" height="72" alt="Sidebar">](navigation-and-layout.md#sidebar)
|
|
78
79
|
[<img src="../previews/navigation-layout-breadcrumb.webp" height="72" alt="Breadcrumb">](navigation-and-layout.md#breadcrumb)
|
|
79
80
|
[<img src="../previews/navigation-layout-stepper.webp" height="72" alt="Stepper">](navigation-and-layout.md#stepper)
|
|
@@ -52,7 +52,7 @@ function save() {
|
|
|
52
52
|
| Prop | Type | Default | Effect |
|
|
53
53
|
| --- | --- | --- | --- |
|
|
54
54
|
| `variant` | `'filled' \| 'tonal' \| 'outlined' \| 'ghost' \| 'link'` | `'filled'` | the style |
|
|
55
|
-
| `color` | `'primary' \| 'secondary' \| 'success' \| 'info' \| 'warning' \| 'error' \| 'default'` | `'primary'` | the colour; `default` is the foreground colour |
|
|
55
|
+
| `color` | `'primary' \| 'secondary' \| 'success' \| 'info' \| 'warning' \| 'error' \| 'default'` | `'primary'` | the colour; `default` is the foreground colour. A `ghost` button in `secondary`, `success`, `info`, `warning` or `error` takes that colour's text and a tint of it on hover, at 4.5:1 on the page and on a card in both themes; in `primary` or `default` it keeps the foreground text |
|
|
56
56
|
| `size` | `'default' \| 'xs' \| 'sm' \| 'lg' \| 'icon' \| 'icon-xs' \| 'icon-sm' \| 'icon-lg'` | — (36 px) | height; the `icon*` sizes are square |
|
|
57
57
|
| `loading` | `boolean` | — | busy: a spinner, `aria-busy="true"` and `aria-disabled="true"`, and every click cancelled before your `@click` — a submit button submits neither on a click nor on Enter in a field. It stays focusable (no native `disabled`), so focus is not lost |
|
|
58
58
|
| `lock-on-click` | `boolean` | — | a click makes the button busy at once, until `loading` has turned true and back (or for one second when it never does): for a `loading` that turns true only after an `await` |
|
|
@@ -148,7 +148,7 @@ import { Pencil, Trash2 } from '@lucide/vue';
|
|
|
148
148
|
| Prop | Type | Default | Effect |
|
|
149
149
|
| --- | --- | --- | --- |
|
|
150
150
|
| `variant` | `'filled' \| 'tonal' \| 'outlined' \| 'ghost' \| 'link'` | `'filled'` | the style; a round 36 px button |
|
|
151
|
-
| `color` | as `Button` | `'primary'` | the colour |
|
|
151
|
+
| `color` | as `Button` | `'primary'` | the colour; a `ghost` one in a colour other than `primary` or `default` draws its icon in it, as `Button` does |
|
|
152
152
|
| `tooltip` | `string` | — | wraps it in a `Tooltip`; names the button when there is no `aria-label` |
|
|
153
153
|
| `aria-label` | `string` | the tooltip | the button's accessible name, set on the `<button>`; wins over the tooltip |
|
|
154
154
|
| `name` | `IconName` | — | renders that [`Icon`](primitives.md#icon) before the slot |
|
|
@@ -203,7 +203,7 @@ function remove(id: string) {
|
|
|
203
203
|
| `active` | `boolean` | — | filled appearance |
|
|
204
204
|
| `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` |
|
|
205
205
|
| `size` | `'default' \| 'sm'` | `'default'` | `sm` is a compact chip; the ✕ and every target stay at least 24px |
|
|
206
|
-
| `color` | Button `color` | — | tone |
|
|
206
|
+
| `color` | Button `color` | — | tone; a `ghost` chip shows it too, as a ghost `Button` does |
|
|
207
207
|
| `disabled` | `boolean` | — | disables the chip and its ✕ |
|
|
208
208
|
| `@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 |
|
|
209
209
|
| `dismissLabel` | `string \| ((label: string) => string)` | — | names the ✕ instead of "Remove {label}": a string as is, or a function of the text the chip shows |
|
|
@@ -898,6 +898,7 @@ import { QRCode } from '@nxgt/material-vue/components';
|
|
|
898
898
|
| `size` | `number` | `128` | pixels (React defaults to `256`) |
|
|
899
899
|
| `level` | `'L' \| 'M' \| 'Q' \| 'H'` | `'L'` | error correction; use `H` with a logo |
|
|
900
900
|
| `fgColor`, `bgColor` | `string` | `'#000000'`, `'#FFFFFF'` | colours |
|
|
901
|
+
| `quietZone` | `number` | — (a fixed `p-4` tile) | the blank margin around the code, in modules (the QR spec asks for 4): drawn inside the svg (its viewBox widens by `quietZone` modules per side, the tile's `p-4` goes), so it follows the size and the density, and there is no inline `style`; `size` stays the code's own width, the tile grows by the margin |
|
|
901
902
|
| `title` | `string` | — | accessible label of the SVG |
|
|
902
903
|
| `aria-label` | `string` | — | the SVG's name too, and wins over `title` |
|
|
903
904
|
| `#logo` | slot | — | the logo, centred over the code on a white pad (React's `logo`); the default slot still works |
|
|
@@ -965,7 +966,9 @@ import { EnrolmentSecret } from '@nxgt/material-vue/components';
|
|
|
965
966
|
| `secret` | `string` | — | shown as `JBSW Y3DP EHPK 3PXP`; the copy button copies it without spaces |
|
|
966
967
|
| `showQrCode` | `boolean` | `true` | `false`: the link and the key alone |
|
|
967
968
|
| `qrSize` | `number` | `192` | the QR code's size in pixels (it shrinks to fit a narrower box) |
|
|
969
|
+
| `qrQuietZone` | `number` | `4` | the blank margin around the QR code, in modules; the spec asks scanners for 4, which a fixed `p-4` fell short of at larger sizes. The tile's size can differ from before (a 4-module margin instead of 16px) |
|
|
968
970
|
| `qrLabel`, `openAppLabel`, `manualLabel`, `secretLabel`, `copyLabel`, `copiedLabel` | `string` | translated | the QR code's name, the link, the line before the key, the key's group name, the copy button's name, what it announces |
|
|
971
|
+
| `#copy-icon` | slot | Lucide's copy | replaces the copy button's icon with your app's own, so one icon set shows; a check or a cross still follows a copy |
|
|
969
972
|
|
|
970
973
|
The QR code sits beside the rest once the component is 28rem wide (a
|
|
971
974
|
container query), above it on a phone. The key is a `<code>` in a
|
|
@@ -975,7 +978,7 @@ region; it wraps at the group boundaries, never past the card's edge.
|
|
|
975
978
|
`groupSecret(secret, size?)` (from `@nxgt/material-core/two-factor`) is
|
|
976
979
|
re-exported for a layout of your own.
|
|
977
980
|
|
|
978
|
-
**Storybook:** `Data display/EnrolmentSecret` · **React:** `EnrolmentSecret`
|
|
981
|
+
**Storybook:** `Data display/EnrolmentSecret` · **React:** `EnrolmentSecret` (`copyIcon`)
|
|
979
982
|
|
|
980
983
|
---
|
|
981
984
|
|
|
@@ -1016,12 +1019,16 @@ const saved = ref(false);
|
|
|
1016
1019
|
| `focusTitle` | `boolean` | `true` | the heading takes the focus once shown: the codes replaced what the user acted on |
|
|
1017
1020
|
| `fileName`, `fileHeading`, `fileNote` | `string` | `"recovery-codes.txt"`, the title, the warning | the downloaded file and its first two lines |
|
|
1018
1021
|
| `onDone` (`@done`) | `() => void` | — | shows "Done", which calls it once the confirmation is ticked |
|
|
1022
|
+
| `@copy` | `(result: 'copied' \| 'failed') => void` | — | fires once "Copy codes" has an outcome, so the app can toast it |
|
|
1023
|
+
| `#copy-icon`, `#download-icon`, `#print-icon` | slots | Lucide's | replace the buttons' icons with your app's own (a Font Awesome `Icon`, say); the copy one still turns into a check or a cross after a copy |
|
|
1019
1024
|
| `v-model:saved` | `boolean` | uncontrolled | the confirmation |
|
|
1020
|
-
| `labels` | `Partial<RecoveryCodesLabels>` | translated | `list`, `copy`, `copied`, `copyFailed`, `download`, `print`, `saved`, `savedRequired`, `done` |
|
|
1025
|
+
| `labels` | `Partial<RecoveryCodesLabels>` | translated | `list`, `copy`, `copied`, `copyFailed`, `copyFailedHint`, `download`, `print`, `saved`, `savedRequired`, `done` |
|
|
1021
1026
|
|
|
1022
|
-
- **Copy** puts the codes on the clipboard one per line
|
|
1023
|
-
|
|
1024
|
-
|
|
1027
|
+
- **Copy** puts the codes on the clipboard one per line. The outcome is
|
|
1028
|
+
written beside the buttons ("Codes copied", or "Copy failed. Download or
|
|
1029
|
+
print the codes instead.") and the button's icon turns into a check or a
|
|
1030
|
+
cross for a moment (a refusal stays, with its way out, until the next copy, download or print); the same text is the component's polite status region,
|
|
1031
|
+
so it needs no `Toaster`. `@copy` hears `'copied'` or `'failed'` too, to toast it.
|
|
1025
1032
|
- **Download** saves `recoveryCodesText(codes, { heading, note })` with
|
|
1026
1033
|
`downloadText` (both re-exported from `@nxgt/material-core/two-factor`).
|
|
1027
1034
|
- **Print** prints the card and nothing else, with no inline style and no new
|
|
@@ -1046,4 +1053,4 @@ useEventListener(window, 'beforeunload', (event) => {
|
|
|
1046
1053
|
});
|
|
1047
1054
|
```
|
|
1048
1055
|
|
|
1049
|
-
**Storybook:** `Data display/RecoveryCodes` · **React:** `RecoveryCodes` (`saved` / `onSavedChange`, `onDone`; props for the slots)
|
|
1056
|
+
**Storybook:** `Data display/RecoveryCodes` · **React:** `RecoveryCodes` (`saved` / `onSavedChange`, `onDone`, `onCopy`, `icons`; props for the slots)
|
|
@@ -59,7 +59,9 @@ const columns = columnHelper.columns([
|
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Parts: `DataTable`; `DataTableColumnHeader` (a sortable header with a hide
|
|
62
|
-
action
|
|
62
|
+
action; the sorted column's header cell carries `aria-sort`, and the
|
|
63
|
+
button keeps the column's title as its name); `DataTablePagination`,
|
|
64
|
+
`DataTableServerFooter` and
|
|
63
65
|
`DataTableViewOptions` (used by the table, exported for a table or a footer
|
|
64
66
|
of your own; both footers take `disabled`);
|
|
65
67
|
`useColumnHelpers<T>()` returns a
|
|
@@ -92,7 +92,7 @@ const open = ref(true);
|
|
|
92
92
|
| --- | --- | --- | --- |
|
|
93
93
|
| `tone` | `'info' \| 'success' \| 'warning' \| 'error'` | `'info'` | colours and the default icon |
|
|
94
94
|
| `#icon` slot | — | the tone's icon | replaces the default icon |
|
|
95
|
-
| `#action` slot | — | — | rendered at the end of the banner; under `sm` it drops below the text, in line with it |
|
|
95
|
+
| `#action` slot | — | — | rendered at the end of the banner; under `sm` it drops below the text, in line with it; there a `ghost` or `link` button (a `LinkButton` too, any size) that is the action itself, not wrapped in another element, is pulled back by its own padding, so its label (or leading icon) starts at the text's edge |
|
|
96
96
|
| `dismissible` | `boolean` | `false` | shows a close button that emits `dismiss`; the banner does not hide itself |
|
|
97
97
|
|
|
98
98
|
Where React shows the close button when `onDismiss` is passed, Vue asks for
|
|
@@ -223,7 +223,8 @@ async function remove() {
|
|
|
223
223
|
|
|
224
224
|
`on-confirm` is a function prop, so `@confirm="fn"` binds it as before and its
|
|
225
225
|
promise is awaited; a plain `@confirm="open = false"` keeps working. The error
|
|
226
|
-
clears when the dialog opens again.
|
|
226
|
+
clears when the dialog opens again. On closing, the focus goes back to what
|
|
227
|
+
opened it — to the menu's trigger when that was a `DropdownMenuItem`.
|
|
227
228
|
|
|
228
229
|

|
|
229
230
|
|
|
@@ -590,6 +591,10 @@ async function upload() {
|
|
|
590
591
|
| `role` | `'status' \| 'alert'` | none (`toasts.error`: `'alert'`) | live-region role. Toasts are already announced politely by the `Toaster`'s region; `alert` interrupts, and may be read twice by some screen readers |
|
|
591
592
|
| `options` | vue-sonner `ExternalToast` | `duration: 5000` for presets, `Infinity` for `loading` and for any toast with your own `action` (a preset's fallback "Close" still times out at 5000) unless a `duration` is passed | passed to Sonner (`id`, `duration`, `position`…) |
|
|
592
593
|
|
|
594
|
+
A toast's text wraps between words, beside an action and its X too; a word
|
|
595
|
+
longer than the toast (a URL) breaks at its edge instead of pushing the
|
|
596
|
+
action out.
|
|
597
|
+
|
|
593
598
|
The toast id defaults to the title, so two toasts with the same title
|
|
594
599
|
replace each other; pass `options: { id }` to show both. `Toaster` wraps
|
|
595
600
|
vue-sonner's and takes its props (`position`, `expand`, `rich-colors`…), all
|
|
@@ -716,13 +716,14 @@ const code = ref('');
|
|
|
716
716
|
</script>
|
|
717
717
|
|
|
718
718
|
<template>
|
|
719
|
-
<OtpField v-model="code" label="Enter OTP" :length="6" @complete="(value) => console.log(value)" />
|
|
719
|
+
<OtpField v-model="code" label="Enter OTP" :length="6" placeholder="123456" @complete="(value) => console.log(value)" />
|
|
720
720
|
</template>
|
|
721
721
|
```
|
|
722
722
|
|
|
723
723
|
| Prop / event | Type | Default | Effect |
|
|
724
724
|
| --- | --- | --- | --- |
|
|
725
725
|
| `length` | `number` | `6` | number of slots, split in two groups |
|
|
726
|
+
| `placeholder` | `string` | — | a format hint, one character per slot (`"123456"`), drawn muted in the empty slots until the first character is typed; also on `InputOTP`, shown by `InputOTPSlot` |
|
|
726
727
|
| `v-model` | `string` | — | the digits typed so far |
|
|
727
728
|
| `@complete` | `(value: string) => void` | — | once every slot is filled (from `vue-input-otp`) |
|
|
728
729
|
| `error` | `boolean` | — | error colour on the slots (`data-invalid` on each); `aria-invalid` goes on the input only, the one element a screen reader reads |
|
|
@@ -8,6 +8,7 @@ documentation-site shell. Everything is imported from
|
|
|
8
8
|
| | Component | What it does |
|
|
9
9
|
| --- | --- | --- |
|
|
10
10
|
| <img src="../previews/navigation-layout-appshell.webp" width="96" alt=""> | [ActivityLayout](#activitylayout) | App shell: sidebar, header, breadcrumbs, titled page |
|
|
11
|
+
| <img src="../previews/navigation-layout-accountmenu.webp" width="96" alt=""> | [AccountMenu](#accountmenu) | The app bar's avatar menu: the account, the app's links, Sign out |
|
|
11
12
|
| <img src="../previews/navigation-layout-authcard.webp" width="96" alt=""> | [AuthCard](#authcard) | Signed-out page frame: one `main`, a centred card, its title the `h1` |
|
|
12
13
|
| <img src="../previews/navigation-layout-sidebar.webp" width="96" alt=""> | [Sidebar](#sidebar) | Collapsible navigation sidebar |
|
|
13
14
|
| <img src="../previews/navigation-layout-topappbar.webp" width="96" alt=""> | [TopAppBar, BottomAppBar](#topappbar) | Top and bottom bars |
|
|
@@ -75,7 +76,9 @@ which work alone; `findActiveMenuItem`, `isMenuItemActive` and
|
|
|
75
76
|
| `items` | `MenuItem[]` | — | `label` (already translated), `url`, `icon` (a Font Awesome name), `footer` |
|
|
76
77
|
| `linkComponent` | `Component` | `RouterLink` | The link each menu entry renders, given `href`; pass it as `link-component` (see the [app shell guide](../guides/app-shell.md)) |
|
|
77
78
|
| `avatarSrc` | `string` | — | avatar image in the header |
|
|
78
|
-
| `#
|
|
79
|
+
| `logo` (or `#logo`), `name` | `AppLogo` (`string \| AppLogoImage`, `AppLogoImage` = `{ src, alt? }`), `string` | — | the app's logo alone in the collapsed rail, named by `name` (also its tooltip); logo and name side by side in the phone's menu sheet; `#logo` wins over `logo` |
|
|
80
|
+
| `#brand` | slot | — | replaces the sidebar header, in the rail and the menu sheet; wins over `logo` and `name` |
|
|
81
|
+
| `#header-title` | slot | — | the header's leading title (the context: an organisation's name), after the phone's menu button, truncated when long |
|
|
79
82
|
| `#header-actions`, `#avatar` | slots | — | header, before the avatar; `#avatar` replaces it |
|
|
80
83
|
| `title`, `subtitle`, `#actions` | `string`, `string`, slot | — | `ActivityContent`'s header card |
|
|
81
84
|
| `#header` / `hideHeader` | slot / `boolean` | — / `false` | `ActivityContent`: replace or drop the header card |
|
|
@@ -100,6 +103,58 @@ entry, and an icon-only one (no label) falls back to its `aria-label`.
|
|
|
100
103
|
|
|
101
104
|
---
|
|
102
105
|
|
|
106
|
+
## AccountMenu
|
|
107
|
+
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+
The account menu of an app bar, for `ActivityLayout`'s `#avatar`: an avatar
|
|
111
|
+
button named "Account menu, Ada Lovelace" (the picture, else the initials on
|
|
112
|
+
`bg-primary`) that opens a menu aligned to its end, headed by the avatar, the
|
|
113
|
+
name and a second line, then the app's links and a destructive Sign out.
|
|
114
|
+
|
|
115
|
+
```vue
|
|
116
|
+
<script setup lang="ts">
|
|
117
|
+
import { AccountMenu, ActivityLayout } from '@nxgt/material-vue/components';
|
|
118
|
+
</script>
|
|
119
|
+
|
|
120
|
+
<template>
|
|
121
|
+
<ActivityLayout :items="items">
|
|
122
|
+
<template #header-title>{{ school.name }}</template>
|
|
123
|
+
<template #avatar>
|
|
124
|
+
<AccountMenu
|
|
125
|
+
:name="user.name"
|
|
126
|
+
:secondary="user.email"
|
|
127
|
+
:src="user.picture"
|
|
128
|
+
:items="[{ label: t('menu.profile'), url: '/profile', icon: 'user' }]"
|
|
129
|
+
:signing-out="pending"
|
|
130
|
+
@sign-out="signOut"
|
|
131
|
+
/>
|
|
132
|
+
</template>
|
|
133
|
+
<RouterView />
|
|
134
|
+
</ActivityLayout>
|
|
135
|
+
</template>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
| Prop / event | Type | Default | Effect |
|
|
139
|
+
| --- | --- | --- | --- |
|
|
140
|
+
| `name` | `string` | — | the trigger's name ("Account menu, {name}", `material.account-menu.trigger`), the menu's header, the initials |
|
|
141
|
+
| `secondary` | `string` | — | a second line under the name, the e-mail say |
|
|
142
|
+
| `src` | `string` | — | the avatar's picture; the initials until it loads, or without one |
|
|
143
|
+
| `items` | `AccountMenuItem[]` | `[]` | `{ label: string; url: string; icon?: IconName }`: links between the header and Sign out; `label` already translated, `icon` a [Font Awesome](https://fontawesome.com/icons) symbol id of the duotone sprite (see [Icon](primitives.md#icon)) |
|
|
144
|
+
| `linkComponent` | `Component` | `RouterLink` | the link each item renders, as in the app shell |
|
|
145
|
+
| `@sign-out` | event | — | Sign out was chosen; the menu stays open, so `signing-out` shows |
|
|
146
|
+
| `signOutLabel` | `string` | "Sign out" | `material.account-menu.sign-out` |
|
|
147
|
+
| `signingOut` | `boolean` | `false` | Sign out is busy (`aria-busy`, a spinner) and ignores a second selection |
|
|
148
|
+
|
|
149
|
+
Enter, Space or ArrowDown on the avatar opens the menu on its first item; the
|
|
150
|
+
arrows move, Escape closes it and gives the focus back to the avatar. The
|
|
151
|
+
items are real links (`<a href>`), named by their label. Its links need
|
|
152
|
+
`vue-router`, as the shell's do.
|
|
153
|
+
|
|
154
|
+
**Storybook:** `Navigation & layout/AccountMenu` · **React:** `AccountMenu` (prop `onSignOut`)
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
103
158
|
## AuthCard
|
|
104
159
|
|
|
105
160
|

|
|
@@ -603,13 +658,18 @@ step has no `icon`, and there is no separate `StepperIndicator`.
|
|
|
603
658
|
| `steps` | `{ title; description?; status? }[]` | — | `status`: `'completed' \| 'error' \| 'upcoming'`, else derived from `active` |
|
|
604
659
|
| `active` | `number` | `0` | current step; its `description` is shown as helper text below, and in a hover tooltip on a decorative info icon |
|
|
605
660
|
| `@change` | `(index: number) => void` | — | a step was clicked |
|
|
606
|
-
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | vertical from `md
|
|
661
|
+
| `orientation` | `'horizontal' \| 'vertical' \| 'responsive'` | `'horizontal'` | `'vertical'`: a column from `md`, phones get the compact bar. `'responsive'`: every step in a column below `sm` (640px), a row from `sm` |
|
|
607
662
|
| `name` | `string` | — | the stepper's `data-pw` (`stepper` without it), and the prefix of each step's: `<name>-step-N` instead of `step-N` |
|
|
608
663
|
|
|
609
664
|
Each step is an `<li>` with `data-pw="step-N"` (`<name>-step-N` with `name`),
|
|
610
665
|
N counted from 0, for tests to select; the current step's button carries
|
|
611
666
|
`aria-current="step"`, and a completed or failed step is announced as such.
|
|
612
667
|
|
|
668
|
+
A server renders the desktop layout (every step, at `provideSSRWidth()` or
|
|
669
|
+
1024px), as does a hydrating client; a phone switches to the compact bar
|
|
670
|
+
right after hydrating (with `orientation="responsive"`, to the column of every
|
|
671
|
+
step).
|
|
672
|
+
|
|
613
673
|
**Storybook:** `Navigation & layout/Stepper` · **React:** `Stepper`
|
|
614
674
|
|
|
615
675
|
---
|