@wssto2/vue-core 0.1.0 → 0.2.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/README.md +20 -9
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CKghARkW.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CeKK8_g5.js} +2 -2
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-BZb4qKXo.js → AlertDialog.vue_vue_type_script_setup_true_lang-e4hzkzg3.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-B82bl36A.js → AsyncSection.vue_vue_type_script_setup_true_lang-CWLB3xsR.js} +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js +51 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-B1eZgLae.js +182 -0
- package/dist/CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js +299 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Bx5O1RZJ.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-DyhYHRyz.js} +1 -1
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DH6EB8br.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CvwoT1JF.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-D44EHXQZ.js → Menu.vue_vue_type_script_setup_true_lang-CrMj6KPD.js} +1 -1
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-DYQgaUtj.js → Modal.vue_vue_type_script_setup_true_lang-BQZM49gC.js} +138 -128
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DDVQXJRB.js → PhotoViewer.vue_vue_type_script_setup_true_lang-ElDizaW2.js} +1 -1
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-DGcKX_OJ.js → SectionList.vue_vue_type_script_setup_true_lang-L9ita_Kx.js} +2 -2
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-DZTrU8NJ.js +661 -0
- package/dist/{Sheet.vue_vue_type_script_setup_true_lang-BLBD5ps8.js → Sheet.vue_vue_type_script_setup_true_lang-CtkJ-4e3.js} +1 -1
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-BJWPVyfT.js → Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js} +1 -1
- package/dist/app/application.d.ts +5 -0
- package/dist/app/environment.d.ts +2 -0
- package/dist/app/index.js +75 -72
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +5 -3
- package/dist/button/shortcut.d.ts +28 -2
- package/dist/collection/CollectionPage.vue.d.ts +1 -0
- package/dist/collection/CollectionRows.vue.d.ts +59 -0
- package/dist/collection/CollectionTable.vue.d.ts +1 -1
- package/dist/collection/DataTable.vue.d.ts +47 -0
- package/dist/collection/RowActions.vue.d.ts +19 -0
- package/dist/collection/columns.d.ts +2 -0
- package/dist/collection/index.d.ts +4 -2
- package/dist/collection/index.js +1752 -1610
- package/dist/collection/rowLayout.d.ts +10 -0
- package/dist/collection/slots.d.ts +6 -3
- package/dist/describeError-l5T9b8Uv.js +41 -0
- package/dist/dialogStack-DZZg55w0.js +31 -0
- package/dist/form/CommandDialog.vue.d.ts +12 -1
- package/dist/form/FormGroup.vue.d.ts +1 -1
- package/dist/form/MultiSelectField.vue.d.ts +4 -1
- package/dist/form/NumberField.vue.d.ts +6 -0
- package/dist/form/OptionList.vue.d.ts +6 -2
- package/dist/form/SelectField.vue.d.ts +4 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +1940 -2008
- package/dist/form/suggestions.d.ts +11 -0
- package/dist/form/useOptions.d.ts +60 -0
- package/dist/i18n/describeError.d.ts +31 -0
- package/dist/i18n/index.d.ts +26 -0
- package/dist/i18n/index.js +22 -20
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/CountryFlag.vue.d.ts +10 -0
- package/dist/modal/Modal.vue.d.ts +4 -0
- package/dist/modal/ShortcutHelp.vue.d.ts +2 -0
- package/dist/modal/index.d.ts +2 -0
- package/dist/modal/index.js +64 -6
- package/dist/modal/placement.d.ts +22 -0
- package/dist/{options-CjSz2dQK.js → options-DAkBtYkI.js} +3 -3
- package/dist/overlay/Popover.vue.d.ts +3 -0
- package/dist/overlay/dialogStack.d.ts +9 -0
- package/dist/overlay/index.d.ts +1 -1
- package/dist/overlay/index.js +18 -17
- package/dist/page/index.js +4 -4
- package/dist/phone/index.js +247 -540
- package/dist/platform/AccessGate.vue.d.ts +50 -0
- package/dist/platform/index.d.ts +2 -0
- package/dist/platform/index.js +86 -66
- package/dist/resource/index.js +42 -42
- package/dist/shell/AccountMenuItem.vue.d.ts +3 -0
- package/dist/shell/NavigationList.vue.d.ts +1 -1
- package/dist/shell/index.js +406 -394
- package/dist/state/Badge.vue.d.ts +17 -10
- package/dist/state/hue.d.ts +8 -0
- package/dist/state/index.d.ts +2 -0
- package/dist/state/index.js +92 -56
- package/dist/state/useLoad.d.ts +41 -0
- package/dist/styles.css +1 -1
- package/dist/testing/app.d.ts +61 -0
- package/dist/testing/async.d.ts +12 -0
- package/dist/testing/collection.d.ts +18 -0
- package/dist/testing/format.d.ts +9 -0
- package/dist/testing/i18n.d.ts +16 -0
- package/dist/testing/index.d.ts +14 -0
- package/dist/testing/index.js +178 -0
- package/dist/testing/media.d.ts +23 -0
- package/dist/testing/platform.d.ts +40 -0
- package/dist/testing/transport.d.ts +40 -0
- package/dist/{toast-BTeX0r66.js → toast-DvrHQ6Ag.js} +45 -43
- package/dist/{useDialog-wmyNx2j_.js → useDialog-CXR3hN0G.js} +1 -1
- package/package.json +5 -1
- package/src/styles/theme.css +60 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DKc6ugmr.js +0 -31
- package/dist/Button.vue_vue_type_script_setup_true_lang-3f0emVNU.js +0 -141
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-SyFWE33A.js +0 -422
- package/dist/dialogStack-DiTG1rZc.js +0 -26
- package/dist/phone/CountryFlag.vue.d.ts +0 -10
- /package/dist/{phone → internal}/flagLoaders.d.ts +0 -0
package/dist/shell/index.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as M, computed as
|
|
1
|
+
import { defineComponent as M, computed as C, openBlock as r, createElementBlock as p, normalizeClass as y, createBlock as T, resolveDynamicComponent as he, unref as n, mergeProps as K, withCtx as I, createCommentVNode as L, createElementVNode as d, toDisplayString as O, provide as ne, ref as V, useId as ie, createVNode as h, withDirectives as Oe, Fragment as F, renderList as ee, vShow as Re, useTemplateRef as te, renderSlot as D, createSlots as W, normalizeProps as X, guardReactiveProps as Y, watch as q, onScopeDispose as le, inject as be, onBeforeUnmount as Be, normalizeStyle as ge, nextTick as ye, Teleport as Ne, shallowRef as Pe, h as J } from "vue";
|
|
2
2
|
import { useI18n as N } from "vue-i18n";
|
|
3
3
|
import { _ as xe } from "../Avatar.vue_vue_type_script_setup_true_lang-CFIheaSr.js";
|
|
4
|
-
import { _ as R, u as
|
|
5
|
-
import { t as we, _ as Ve } from "../toast-
|
|
6
|
-
import { u as
|
|
7
|
-
import { b as
|
|
4
|
+
import { _ as R, u as je, c as Fe } from "../Icon.vue_vue_type_script_lang-DtC4_mkz.js";
|
|
5
|
+
import { t as we, _ as Ve } from "../toast-DvrHQ6Ag.js";
|
|
6
|
+
import { u as We, S as ae, d as ke } from "../feature-DyDtyMLU.js";
|
|
7
|
+
import { b as Ke } from "../environment-D3nozt9a.js";
|
|
8
|
+
import { _ as _e } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
|
|
8
9
|
import { u as G } from "../platform-jqlKVJ2e.js";
|
|
9
|
-
import { RouterLink as oe, useRoute as
|
|
10
|
-
import { d as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { e as
|
|
16
|
-
import { A as
|
|
17
|
-
import { u as
|
|
10
|
+
import { RouterLink as oe, useRoute as Ue, useRouter as re } from "vue-router";
|
|
11
|
+
import { d as $e } from "../context-Ch1r4fdN.js";
|
|
12
|
+
import { _ as Xe } from "../Sheet.vue_vue_type_script_setup_true_lang-CtkJ-4e3.js";
|
|
13
|
+
import { _ as Ye } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CvwoT1JF.js";
|
|
14
|
+
import { _ as qe } from "../Toaster.vue_vue_type_script_setup_true_lang-55boRLAj.js";
|
|
15
|
+
import { _ as He } from "../BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js";
|
|
16
|
+
import { e as Se } from "../chrome-D9pwD6iS.js";
|
|
17
|
+
import { A as Ge } from "../access-DdRFrVV1.js";
|
|
18
|
+
import { u as Qe } from "../navigation-B33ikiCS.js";
|
|
18
19
|
import { a as H } from "../mediaQuery-CygcXmFW.js";
|
|
19
|
-
import { u as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { W as
|
|
22
|
-
import { S as
|
|
23
|
-
const [
|
|
20
|
+
import { u as Je } from "../useDialog-CXR3hN0G.js";
|
|
21
|
+
import { _ as Ze } from "../Menu.vue_vue_type_script_setup_true_lang-CrMj6KPD.js";
|
|
22
|
+
import { W as et } from "../useWaitStatus-fsacMl4W.js";
|
|
23
|
+
import { S as tt } from "../dialogStack-DZZg55w0.js";
|
|
24
|
+
const [nt, at] = $e("vue-core.accountMenu"), [ce] = $e("vue-core.headerSurface"), fe = "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus", ot = "relative not-first:before:absolute not-first:before:top-0 not-first:before:right-0 not-first:before:left-[calc(var(--app-row-inset)+2.25rem)] not-first:before:border-t not-first:before:border-border-separator", me = /* @__PURE__ */ M({
|
|
24
25
|
__name: "AccountMenuItem",
|
|
25
26
|
props: {
|
|
26
27
|
label: {},
|
|
@@ -28,19 +29,20 @@ const [tt, nt] = _e("vue-core.accountMenu"), [ce] = _e("vue-core.headerSurface")
|
|
|
28
29
|
to: { default: void 0 },
|
|
29
30
|
checked: { type: Boolean, default: void 0 },
|
|
30
31
|
selected: { type: Boolean, default: void 0 },
|
|
31
|
-
tone: { default: void 0 }
|
|
32
|
+
tone: { default: void 0 },
|
|
33
|
+
flag: { default: void 0 }
|
|
32
34
|
},
|
|
33
35
|
emits: ["click"],
|
|
34
36
|
setup(e, { emit: a }) {
|
|
35
|
-
const t = e, o = a, i =
|
|
37
|
+
const t = e, o = a, i = at(), s = C(() => i.appearance === "sheet"), u = C(() => t.checked !== void 0 || t.selected !== void 0), f = C(() => t.tone === "critical"), c = `flex w-full cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-left text-sm hover:bg-fill ${fe}`, v = `flex min-h-row w-full cursor-pointer items-center gap-3 px-row-inset py-2 text-left text-body transition-colors duration-motion-fast active:bg-fill ${fe}`;
|
|
36
38
|
function b() {
|
|
37
39
|
u.value || i.close(), o("click");
|
|
38
40
|
}
|
|
39
|
-
return (
|
|
40
|
-
class: y(s.value ?
|
|
41
|
+
return (w, _) => (r(), p("div", {
|
|
42
|
+
class: y(s.value ? ot : "")
|
|
41
43
|
}, [
|
|
42
|
-
(
|
|
43
|
-
class: [s.value ? v :
|
|
44
|
+
(r(), T(he(e.to ? n(oe) : "button"), K(e.to ? { to: e.to } : { type: "button" }, {
|
|
45
|
+
class: [s.value ? v : c, f.value ? "text-content-destructive" : "text-content-strong", s.value && f.value ? "justify-center" : ""],
|
|
44
46
|
role: e.checked !== void 0 ? "switch" : void 0,
|
|
45
47
|
"aria-checked": e.checked,
|
|
46
48
|
"aria-current": e.selected ? "true" : void 0,
|
|
@@ -48,30 +50,33 @@ const [tt, nt] = _e("vue-core.accountMenu"), [ce] = _e("vue-core.headerSurface")
|
|
|
48
50
|
onClick: b
|
|
49
51
|
}), {
|
|
50
52
|
default: I(() => [
|
|
51
|
-
e.
|
|
53
|
+
e.flag ? (r(), T(_e, {
|
|
52
54
|
key: 0,
|
|
55
|
+
country: e.flag
|
|
56
|
+
}, null, 8, ["country"])) : e.icon && !(s.value && f.value) ? (r(), T(n(R), {
|
|
57
|
+
key: 1,
|
|
53
58
|
name: e.icon,
|
|
54
59
|
size: s.value ? 22 : 16,
|
|
55
|
-
class: y(["shrink-0",
|
|
60
|
+
class: y(["shrink-0", f.value ? "" : "text-content-muted"])
|
|
56
61
|
}, null, 8, ["name", "size", "class"])) : L("", !0),
|
|
57
|
-
|
|
58
|
-
class: y(["min-w-0 truncate", s.value &&
|
|
62
|
+
d("span", {
|
|
63
|
+
class: y(["min-w-0 truncate", s.value && f.value ? "" : "flex-1"])
|
|
59
64
|
}, O(e.label), 3),
|
|
60
|
-
e.checked !== void 0 ? (
|
|
61
|
-
key:
|
|
65
|
+
e.checked !== void 0 ? (r(), p("span", {
|
|
66
|
+
key: 2,
|
|
62
67
|
"aria-hidden": "true",
|
|
63
68
|
class: y(["relative inline-flex shrink-0 rounded-full transition-colors duration-motion-fast", [e.checked ? "bg-control-on" : "bg-fill-strong", s.value ? "h-switch-height w-switch-width" : "h-5 w-9"]])
|
|
64
69
|
}, [
|
|
65
|
-
|
|
70
|
+
d("span", {
|
|
66
71
|
class: y(["absolute top-0.5 left-0.5 aspect-square h-[calc(100%-0.25rem)] rounded-full bg-white shadow-knob transition-transform duration-motion-fast", e.checked ? s.value ? "translate-x-[calc(var(--app-switch-width)-var(--app-switch-height))]" : "translate-x-4" : "translate-x-0"])
|
|
67
72
|
}, null, 2)
|
|
68
|
-
], 2)) : e.selected ? (
|
|
69
|
-
key:
|
|
73
|
+
], 2)) : e.selected ? (r(), T(n(R), {
|
|
74
|
+
key: 3,
|
|
70
75
|
name: "checkCustom",
|
|
71
76
|
size: 16,
|
|
72
77
|
class: "shrink-0 text-content-link"
|
|
73
|
-
})) : e.to && s.value ? (
|
|
74
|
-
key:
|
|
78
|
+
})) : e.to && s.value ? (r(), T(n(R), {
|
|
79
|
+
key: 4,
|
|
75
80
|
name: "arrowRightSLine",
|
|
76
81
|
size: 18,
|
|
77
82
|
class: "shrink-0 text-content-disabled"
|
|
@@ -81,109 +86,116 @@ const [tt, nt] = _e("vue-core.accountMenu"), [ce] = _e("vue-core.headerSurface")
|
|
|
81
86
|
}, 16, ["class", "role", "aria-checked", "aria-current"]))
|
|
82
87
|
], 2));
|
|
83
88
|
}
|
|
84
|
-
}),
|
|
89
|
+
}), st = ["aria-expanded", "aria-controls"], it = { class: "flex-1 whitespace-nowrap" }, lt = { class: "truncate" }, rt = ["id"], Ce = /* @__PURE__ */ M({
|
|
85
90
|
__name: "AccountMenuContent",
|
|
86
91
|
props: {
|
|
87
92
|
appearance: {}
|
|
88
93
|
},
|
|
89
94
|
emits: ["close"],
|
|
90
95
|
setup(e, { emit: a }) {
|
|
91
|
-
const t = e, o = a, { t: i } = N(), { session: s } = G(), u =
|
|
92
|
-
ne(
|
|
93
|
-
const
|
|
96
|
+
const t = e, o = a, { t: i } = N(), { session: s } = G(), u = Ke(), f = We();
|
|
97
|
+
ne(nt, { appearance: t.appearance, close: () => o("close") });
|
|
98
|
+
const c = t.appearance === "sheet", v = C(() => f.get("accountMenu").length > 0), b = u.locales.length > 1, w = V(!1), _ = ie(), S = (l) => {
|
|
94
99
|
try {
|
|
95
|
-
const
|
|
96
|
-
return
|
|
100
|
+
const E = new Intl.DisplayNames([l], { type: "language" }).of(l);
|
|
101
|
+
return E ? E.charAt(0).toLocaleUpperCase(l) + E.slice(1) : l;
|
|
97
102
|
} catch {
|
|
98
|
-
return
|
|
103
|
+
return l;
|
|
99
104
|
}
|
|
100
|
-
},
|
|
101
|
-
async function
|
|
105
|
+
}, $ = C(() => S(u.locale.value)), A = (l) => u.localeFlags[l];
|
|
106
|
+
async function m() {
|
|
102
107
|
try {
|
|
103
108
|
await s.signOut();
|
|
104
109
|
} catch {
|
|
105
110
|
we.error(i("core.shell.account.sign_out_failed"));
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
|
-
const
|
|
109
|
-
return (
|
|
110
|
-
class: y(
|
|
113
|
+
const z = c ? "overflow-hidden rounded-group bg-surface-cell shadow-group" : "";
|
|
114
|
+
return (l, E) => (r(), p("div", {
|
|
115
|
+
class: y(c ? "flex flex-col gap-group-gap text-content-strong" : "-m-1.5 space-y-1 *:not-first:border-t *:not-first:border-border-separator *:not-first:pt-1"),
|
|
111
116
|
"data-shell-account-menu": ""
|
|
112
117
|
}, [
|
|
113
|
-
v.value ? (
|
|
118
|
+
v.value ? (r(), p("div", {
|
|
114
119
|
key: 0,
|
|
115
|
-
class: y(n(
|
|
120
|
+
class: y(n(z))
|
|
116
121
|
}, [
|
|
117
122
|
h(n(ae), { name: "accountMenu" })
|
|
118
123
|
], 2)) : L("", !0),
|
|
119
|
-
b ? (
|
|
124
|
+
b ? (r(), p("div", {
|
|
120
125
|
key: 1,
|
|
121
|
-
class: y(n(
|
|
126
|
+
class: y(n(z))
|
|
122
127
|
}, [
|
|
123
|
-
|
|
124
|
-
class: y(
|
|
128
|
+
d("div", {
|
|
129
|
+
class: y(c ? "relative" : "")
|
|
125
130
|
}, [
|
|
126
|
-
|
|
131
|
+
d("button", {
|
|
127
132
|
type: "button",
|
|
128
|
-
"aria-expanded":
|
|
129
|
-
"aria-controls": n(
|
|
133
|
+
"aria-expanded": w.value,
|
|
134
|
+
"aria-controls": n(_),
|
|
130
135
|
"data-account-language": "",
|
|
131
|
-
class: y(["flex w-full cursor-pointer items-center gap-3 text-left transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
|
|
132
|
-
onClick:
|
|
136
|
+
class: y(["flex w-full cursor-pointer items-center gap-3 text-left transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus", c ? "min-h-row px-row-inset py-2 text-body active:bg-fill" : "rounded-md px-2 py-1.5 text-sm hover:bg-fill"]),
|
|
137
|
+
onClick: E[0] || (E[0] = (x) => w.value = !w.value)
|
|
133
138
|
}, [
|
|
134
139
|
h(n(R), {
|
|
135
140
|
name: "translate",
|
|
136
|
-
size:
|
|
141
|
+
size: c ? 22 : 16,
|
|
137
142
|
class: "shrink-0 text-content-muted"
|
|
138
143
|
}, null, 8, ["size"]),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
class: y(["
|
|
142
|
-
},
|
|
144
|
+
d("span", it, O(n(i)("core.shell.account.language")), 1),
|
|
145
|
+
d("span", {
|
|
146
|
+
class: y(["flex min-w-0 items-center gap-1.5 text-content-muted", c ? "" : "text-xs"])
|
|
147
|
+
}, [
|
|
148
|
+
A(n(u).locale.value) ? (r(), T(_e, {
|
|
149
|
+
key: 0,
|
|
150
|
+
country: A(n(u).locale.value)
|
|
151
|
+
}, null, 8, ["country"])) : L("", !0),
|
|
152
|
+
d("span", lt, O($.value), 1)
|
|
153
|
+
], 2),
|
|
143
154
|
h(n(R), {
|
|
144
155
|
name: "arrowDownSLine",
|
|
145
|
-
size:
|
|
146
|
-
class: y(["shrink-0 text-content-disabled transition-transform duration-motion-fast",
|
|
156
|
+
size: c ? 18 : 16,
|
|
157
|
+
class: y(["shrink-0 text-content-disabled transition-transform duration-motion-fast", w.value ? "rotate-180" : ""])
|
|
147
158
|
}, null, 8, ["size", "class"])
|
|
148
|
-
], 10,
|
|
159
|
+
], 10, st)
|
|
149
160
|
], 2),
|
|
150
|
-
|
|
151
|
-
id: n(
|
|
152
|
-
class: y(
|
|
161
|
+
Oe(d("div", {
|
|
162
|
+
id: n(_),
|
|
163
|
+
class: y(c ? "" : "space-y-0.5 pl-4")
|
|
153
164
|
}, [
|
|
154
|
-
(
|
|
155
|
-
key:
|
|
156
|
-
label:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
165
|
+
(r(!0), p(F, null, ee(n(u).locales, (x) => (r(), T(me, {
|
|
166
|
+
key: x,
|
|
167
|
+
label: S(x),
|
|
168
|
+
flag: A(x),
|
|
169
|
+
selected: x === n(u).locale.value,
|
|
170
|
+
onClick: (k) => n(u).setLocale(x)
|
|
171
|
+
}, null, 8, ["label", "flag", "selected", "onClick"]))), 128))
|
|
172
|
+
], 10, rt), [
|
|
173
|
+
[Re, w.value]
|
|
162
174
|
])
|
|
163
175
|
], 2)) : L("", !0),
|
|
164
|
-
|
|
165
|
-
class: y(n(
|
|
176
|
+
d("div", {
|
|
177
|
+
class: y(n(z))
|
|
166
178
|
}, [
|
|
167
179
|
h(me, {
|
|
168
180
|
label: n(i)("core.shell.account.sign_out"),
|
|
169
181
|
icon: "logoutBoxRLine",
|
|
170
182
|
tone: "critical",
|
|
171
|
-
onClick:
|
|
183
|
+
onClick: m
|
|
172
184
|
}, null, 8, ["label"])
|
|
173
185
|
], 2)
|
|
174
186
|
], 2));
|
|
175
187
|
}
|
|
176
|
-
}),
|
|
188
|
+
}), ct = ["onClick"], ut = { class: "min-w-0 flex-1" }, dt = { class: "block truncate text-sm font-semibold text-white" }, ft = {
|
|
177
189
|
key: 0,
|
|
178
190
|
class: "block truncate text-xs text-gray-300"
|
|
179
|
-
},
|
|
191
|
+
}, mt = /* @__PURE__ */ M({
|
|
180
192
|
__name: "AccountMenu",
|
|
181
193
|
props: {
|
|
182
194
|
identity: {}
|
|
183
195
|
},
|
|
184
196
|
setup(e) {
|
|
185
197
|
const { t: a } = N();
|
|
186
|
-
return (t, o) => (
|
|
198
|
+
return (t, o) => (r(), T(n(Ve), {
|
|
187
199
|
placement: "top-start",
|
|
188
200
|
width: "sm",
|
|
189
201
|
block: "",
|
|
@@ -191,7 +203,7 @@ const [tt, nt] = _e("vue-core.accountMenu"), [ce] = _e("vue-core.headerSurface")
|
|
|
191
203
|
label: n(a)("core.shell.account.open")
|
|
192
204
|
}, {
|
|
193
205
|
trigger: I(({ toggle: i, attrs: s, presented: u }) => [
|
|
194
|
-
|
|
206
|
+
d("button", K({ type: "button" }, s, {
|
|
195
207
|
"data-shell-account": "",
|
|
196
208
|
class: ["flex w-full cursor-pointer items-center gap-3 rounded-md px-2 py-2 text-left transition-colors hover:bg-white/5 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus", { "bg-white/10": u }],
|
|
197
209
|
onClick: i
|
|
@@ -200,19 +212,19 @@ const [tt, nt] = _e("vue-core.accountMenu"), [ce] = _e("vue-core.headerSurface")
|
|
|
200
212
|
name: e.identity.name,
|
|
201
213
|
size: "md"
|
|
202
214
|
}, null, 8, ["name"]),
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
e.identity.detail ? (
|
|
215
|
+
d("span", ut, [
|
|
216
|
+
d("span", dt, O(e.identity.name), 1),
|
|
217
|
+
e.identity.detail ? (r(), p("span", ft, O(e.identity.detail), 1)) : L("", !0)
|
|
206
218
|
]),
|
|
207
219
|
h(n(R), {
|
|
208
220
|
name: "expandUpDownLine",
|
|
209
221
|
size: 16,
|
|
210
222
|
class: "shrink-0 text-gray-400"
|
|
211
223
|
})
|
|
212
|
-
], 16,
|
|
224
|
+
], 16, ct)
|
|
213
225
|
]),
|
|
214
226
|
default: I(({ dismiss: i }) => [
|
|
215
|
-
h(
|
|
227
|
+
h(Ce, {
|
|
216
228
|
appearance: "popover",
|
|
217
229
|
onClose: i
|
|
218
230
|
}, null, 8, ["onClose"])
|
|
@@ -220,21 +232,21 @@ const [tt, nt] = _e("vue-core.accountMenu"), [ce] = _e("vue-core.headerSurface")
|
|
|
220
232
|
_: 1
|
|
221
233
|
}, 8, ["label"]));
|
|
222
234
|
}
|
|
223
|
-
}),
|
|
235
|
+
}), vt = /* @__PURE__ */ M({
|
|
224
236
|
__name: "AccountSheet",
|
|
225
237
|
props: {
|
|
226
238
|
identity: {}
|
|
227
239
|
},
|
|
228
240
|
setup(e, { expose: a }) {
|
|
229
241
|
const t = te("sheet");
|
|
230
|
-
return a({ present: () => t.value?.present(), dismiss: () => t.value?.dismiss() }), (o, i) => (
|
|
242
|
+
return a({ present: () => t.value?.present(), dismiss: () => t.value?.dismiss() }), (o, i) => (r(), T(n(Xe), {
|
|
231
243
|
ref_key: "sheet",
|
|
232
244
|
ref: t,
|
|
233
245
|
title: e.identity.name,
|
|
234
246
|
grouped: ""
|
|
235
247
|
}, {
|
|
236
248
|
default: I(() => [
|
|
237
|
-
h(
|
|
249
|
+
h(Ce, {
|
|
238
250
|
appearance: "sheet",
|
|
239
251
|
onClose: i[0] || (i[0] = (s) => t.value?.dismiss())
|
|
240
252
|
})
|
|
@@ -243,18 +255,18 @@ const [tt, nt] = _e("vue-core.accountMenu"), [ce] = _e("vue-core.headerSurface")
|
|
|
243
255
|
}, 8, ["title"]));
|
|
244
256
|
}
|
|
245
257
|
});
|
|
246
|
-
function
|
|
247
|
-
const e =
|
|
248
|
-
return (t) => t && (e[t] !== void 0 || a(
|
|
258
|
+
function pt() {
|
|
259
|
+
const e = je(), a = (t, o) => Object.prototype.hasOwnProperty.call(t, o);
|
|
260
|
+
return (t) => t && (e[t] !== void 0 || a(Fe, t)) ? t : null;
|
|
249
261
|
}
|
|
250
|
-
function
|
|
262
|
+
function Le(e) {
|
|
251
263
|
return e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey && !e.defaultPrevented;
|
|
252
264
|
}
|
|
253
|
-
const
|
|
254
|
-
function
|
|
265
|
+
const Ae = (e) => e.to ? [e] : e.children.flatMap(Ae);
|
|
266
|
+
function ht(e) {
|
|
255
267
|
const a = [];
|
|
256
268
|
for (const t of e) {
|
|
257
|
-
const o =
|
|
269
|
+
const o = Ae(t);
|
|
258
270
|
if (o.length === 0) continue;
|
|
259
271
|
const i = !t.to && o.length > 1 ? t.label : null;
|
|
260
272
|
a.push({
|
|
@@ -266,7 +278,7 @@ function vt(e) {
|
|
|
266
278
|
}
|
|
267
279
|
return a;
|
|
268
280
|
}
|
|
269
|
-
const
|
|
281
|
+
const bt = ["aria-label", "data-appearance"], gt = ["data-separated"], yt = ["id"], xt = ["aria-labelledby"], wt = ["href", "aria-current", "onClick"], kt = { class: "min-w-0 flex-1 truncate" }, ve = "flex w-full items-center transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus", Ee = /* @__PURE__ */ M({
|
|
270
282
|
__name: "NavigationList",
|
|
271
283
|
props: {
|
|
272
284
|
items: { default: void 0 },
|
|
@@ -275,13 +287,13 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
275
287
|
},
|
|
276
288
|
emits: ["select"],
|
|
277
289
|
setup(e, { emit: a }) {
|
|
278
|
-
const t = e, o = a, { t: i } = N(), s = ie(), u = t.items === void 0 ?
|
|
279
|
-
function v(
|
|
280
|
-
if (t.appearance === "drawer" &&
|
|
281
|
-
|
|
290
|
+
const t = e, o = a, { t: i } = N(), s = ie(), u = t.items === void 0 ? Qe() : null, f = pt(), c = C(() => ht(t.items ?? u?.value ?? []));
|
|
291
|
+
function v($, A, m) {
|
|
292
|
+
if (t.appearance === "drawer" && Le($)) {
|
|
293
|
+
$.preventDefault(), o("select", m);
|
|
282
294
|
return;
|
|
283
295
|
}
|
|
284
|
-
A(
|
|
296
|
+
A($);
|
|
285
297
|
}
|
|
286
298
|
const b = {
|
|
287
299
|
item: `${ve} group gap-2.5 rounded-md px-2.5 py-1.5 text-sm`,
|
|
@@ -292,7 +304,7 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
292
304
|
heading: "px-2 pb-1 text-2xs font-semibold uppercase tracking-[0.08em] text-gray-400",
|
|
293
305
|
// A hairline above the group, inset like the rows.
|
|
294
306
|
separator: "before:mx-2 before:my-2.5 before:block before:border-t before:border-white/10"
|
|
295
|
-
},
|
|
307
|
+
}, w = {
|
|
296
308
|
item: `${ve} min-h-[2.875rem] cursor-pointer gap-3.5 rounded-group px-3 text-left text-body duration-motion-fast`,
|
|
297
309
|
active: "bg-tint-soft font-semibold text-content-link",
|
|
298
310
|
inactive: "active:bg-fill",
|
|
@@ -300,60 +312,60 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
300
312
|
iconInactive: "",
|
|
301
313
|
heading: "px-3 pt-4.5 pb-1.5 text-subheadline text-content-muted",
|
|
302
314
|
separator: "before:mx-3 before:my-3 before:block before:border-t before:border-border-separator"
|
|
303
|
-
},
|
|
304
|
-
return (
|
|
315
|
+
}, _ = C(() => t.appearance === "rail" ? b : w), S = C(() => t.appearance === "rail" ? 16 : 22);
|
|
316
|
+
return ($, A) => (r(), p("nav", {
|
|
305
317
|
"aria-label": e.label ?? n(i)("core.shell.menu"),
|
|
306
318
|
"data-shell-navigation": "",
|
|
307
319
|
"data-appearance": e.appearance
|
|
308
320
|
}, [
|
|
309
|
-
|
|
310
|
-
(
|
|
321
|
+
d("ul", null, [
|
|
322
|
+
(r(!0), p(F, null, ee(c.value, (m, z) => (r(), p("li", {
|
|
311
323
|
key: m.key,
|
|
312
324
|
"data-separated": m.separated || void 0,
|
|
313
|
-
class: y(m.separated ?
|
|
325
|
+
class: y(m.separated ? _.value.separator : "")
|
|
314
326
|
}, [
|
|
315
|
-
m.heading ? (
|
|
327
|
+
m.heading ? (r(), p("p", {
|
|
316
328
|
key: 0,
|
|
317
|
-
id: `${n(s)}-${
|
|
318
|
-
class: y([
|
|
319
|
-
}, O(m.heading), 11,
|
|
320
|
-
|
|
321
|
-
"aria-labelledby": m.heading ? `${n(s)}-${
|
|
329
|
+
id: `${n(s)}-${z}`,
|
|
330
|
+
class: y([_.value.heading, e.appearance === "rail" ? z > 0 ? "pt-4" : "pt-1" : ""])
|
|
331
|
+
}, O(m.heading), 11, yt)) : L("", !0),
|
|
332
|
+
d("ul", {
|
|
333
|
+
"aria-labelledby": m.heading ? `${n(s)}-${z}` : void 0,
|
|
322
334
|
class: y(e.appearance === "rail" ? "space-y-0.5" : "")
|
|
323
335
|
}, [
|
|
324
|
-
(
|
|
336
|
+
(r(!0), p(F, null, ee(m.items, (l) => (r(), p("li", {
|
|
325
337
|
key: l.key
|
|
326
338
|
}, [
|
|
327
339
|
h(n(oe), {
|
|
328
340
|
custom: "",
|
|
329
341
|
to: l.to
|
|
330
342
|
}, {
|
|
331
|
-
default: I(({ href:
|
|
332
|
-
|
|
333
|
-
href:
|
|
343
|
+
default: I(({ href: E, navigate: x }) => [
|
|
344
|
+
d("a", {
|
|
345
|
+
href: E,
|
|
334
346
|
"aria-current": l.active ? "page" : void 0,
|
|
335
347
|
"data-shell-destination": "",
|
|
336
|
-
class: y([
|
|
337
|
-
onClick: (
|
|
348
|
+
class: y([_.value.item, l.active ? _.value.active : _.value.inactive]),
|
|
349
|
+
onClick: (k) => v(k, x, l.to)
|
|
338
350
|
}, [
|
|
339
|
-
n(
|
|
351
|
+
n(f)(l.icon) ? (r(), T(n(R), {
|
|
340
352
|
key: 0,
|
|
341
|
-
name: n(
|
|
342
|
-
size:
|
|
343
|
-
class: y(l.active ?
|
|
353
|
+
name: n(f)(l.icon),
|
|
354
|
+
size: S.value,
|
|
355
|
+
class: y(l.active ? _.value.iconActive : _.value.iconInactive)
|
|
344
356
|
}, null, 8, ["name", "size", "class"])) : L("", !0),
|
|
345
|
-
|
|
346
|
-
], 10,
|
|
357
|
+
d("span", kt, O(l.label), 1)
|
|
358
|
+
], 10, wt)
|
|
347
359
|
]),
|
|
348
360
|
_: 2
|
|
349
361
|
}, 1032, ["to"])
|
|
350
362
|
]))), 128))
|
|
351
|
-
], 10,
|
|
352
|
-
], 10,
|
|
363
|
+
], 10, xt)
|
|
364
|
+
], 10, gt))), 128))
|
|
353
365
|
])
|
|
354
|
-
], 8,
|
|
366
|
+
], 8, bt));
|
|
355
367
|
}
|
|
356
|
-
}),
|
|
368
|
+
}), _t = ["href", "aria-label", "onClick"], ue = /* @__PURE__ */ M({
|
|
357
369
|
inheritAttrs: !1,
|
|
358
370
|
__name: "ShellBrand",
|
|
359
371
|
props: {
|
|
@@ -364,42 +376,42 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
364
376
|
emits: ["select"],
|
|
365
377
|
setup(e, { emit: a }) {
|
|
366
378
|
const t = e, o = a, { t: i } = N(), { config: s } = G();
|
|
367
|
-
function u(
|
|
368
|
-
if (t.intercept &&
|
|
369
|
-
|
|
379
|
+
function u(f, c) {
|
|
380
|
+
if (t.intercept && Le(f)) {
|
|
381
|
+
f.preventDefault(), o("select", t.to);
|
|
370
382
|
return;
|
|
371
383
|
}
|
|
372
|
-
|
|
384
|
+
c(f);
|
|
373
385
|
}
|
|
374
|
-
return (
|
|
386
|
+
return (f, c) => (r(), T(n(oe), {
|
|
375
387
|
custom: "",
|
|
376
388
|
to: e.to
|
|
377
389
|
}, {
|
|
378
390
|
default: I(({ href: v, navigate: b }) => [
|
|
379
|
-
|
|
391
|
+
d("a", K(f.$attrs, {
|
|
380
392
|
href: v,
|
|
381
393
|
"aria-label": n(i)("core.shell.home"),
|
|
382
394
|
"data-shell-brand": "",
|
|
383
395
|
class: "inline-block rounded-control focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
384
|
-
onClick: (
|
|
396
|
+
onClick: (w) => u(w, b)
|
|
385
397
|
}), [
|
|
386
|
-
D(
|
|
387
|
-
|
|
398
|
+
D(f.$slots, "default", { tone: e.tone }, () => [
|
|
399
|
+
d("span", {
|
|
388
400
|
class: y(["block truncate text-headline font-semibold", e.tone === "light" ? "text-white" : "text-content-strong"])
|
|
389
401
|
}, O(n(s).appName), 3)
|
|
390
402
|
])
|
|
391
|
-
], 16,
|
|
403
|
+
], 16, _t)
|
|
392
404
|
]),
|
|
393
405
|
_: 3
|
|
394
406
|
}, 8, ["to"]));
|
|
395
407
|
}
|
|
396
|
-
}),
|
|
408
|
+
}), $t = {
|
|
397
409
|
class: "flex h-full flex-col bg-surface-page text-content-strong",
|
|
398
410
|
"data-shell-drawer-content": ""
|
|
399
|
-
},
|
|
411
|
+
}, St = { class: "shrink-0 pt-[calc(max(0.75rem,env(safe-area-inset-top))+0.75rem)] pr-4 pb-4 pl-[max(1.375rem,env(safe-area-inset-left))]" }, Ct = { class: "min-w-0 flex-1" }, Lt = { class: "block truncate text-headline font-semibold" }, At = {
|
|
400
412
|
key: 0,
|
|
401
413
|
class: "block truncate text-footnote text-content-muted"
|
|
402
|
-
},
|
|
414
|
+
}, Et = /* @__PURE__ */ M({
|
|
403
415
|
__name: "NavigationDrawer",
|
|
404
416
|
props: {
|
|
405
417
|
identity: {},
|
|
@@ -408,8 +420,8 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
408
420
|
emits: ["select", "account"],
|
|
409
421
|
setup(e, { emit: a }) {
|
|
410
422
|
const t = a, { t: o } = N();
|
|
411
|
-
return (i, s) => (
|
|
412
|
-
|
|
423
|
+
return (i, s) => (r(), p("div", $t, [
|
|
424
|
+
d("div", St, [
|
|
413
425
|
h(ue, {
|
|
414
426
|
to: e.home,
|
|
415
427
|
tone: "brand",
|
|
@@ -426,18 +438,18 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
426
438
|
} : void 0
|
|
427
439
|
]), 1032, ["to"])
|
|
428
440
|
]),
|
|
429
|
-
s[3] || (s[3] =
|
|
441
|
+
s[3] || (s[3] = d("div", {
|
|
430
442
|
class: "mx-5.5 shrink-0 border-t border-border-separator",
|
|
431
443
|
role: "presentation"
|
|
432
444
|
}, null, -1)),
|
|
433
|
-
h(
|
|
445
|
+
h(Ee, {
|
|
434
446
|
appearance: "drawer",
|
|
435
447
|
label: n(o)("core.shell.menu"),
|
|
436
448
|
class: "min-h-0 flex-1 overflow-y-auto overscroll-contain pt-2 pr-2.5 pb-3 pl-[max(0.625rem,env(safe-area-inset-left))] [mask-image:linear-gradient(to_bottom,black_calc(100%-1.5rem),transparent)]",
|
|
437
449
|
onSelect: s[1] || (s[1] = (u) => t("select", u))
|
|
438
450
|
}, null, 8, ["label"]),
|
|
439
451
|
D(i.$slots, "footer"),
|
|
440
|
-
|
|
452
|
+
d("button", {
|
|
441
453
|
type: "button",
|
|
442
454
|
"data-shell-drawer-account": "",
|
|
443
455
|
"aria-haspopup": "dialog",
|
|
@@ -448,9 +460,9 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
448
460
|
name: e.identity.name,
|
|
449
461
|
size: "lg"
|
|
450
462
|
}, null, 8, ["name"]),
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
e.identity.detail ? (
|
|
463
|
+
d("span", Ct, [
|
|
464
|
+
d("span", Lt, O(e.identity.name), 1),
|
|
465
|
+
e.identity.detail ? (r(), p("span", At, O(e.identity.detail), 1)) : L("", !0)
|
|
454
466
|
]),
|
|
455
467
|
h(n(R), {
|
|
456
468
|
name: "arrowRightSLine",
|
|
@@ -460,11 +472,11 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
460
472
|
])
|
|
461
473
|
]));
|
|
462
474
|
}
|
|
463
|
-
}),
|
|
475
|
+
}), It = {
|
|
464
476
|
key: 0,
|
|
465
477
|
"data-shell-sidebar": "",
|
|
466
478
|
class: "flex w-64 shrink-0 flex-col bg-anchor-900 dark:border-r dark:border-white/5 dark:bg-anchor-950"
|
|
467
|
-
},
|
|
479
|
+
}, Tt = { class: "sticky top-0 flex h-screen flex-col" }, zt = { class: "flex items-center justify-between gap-2 pt-5 pr-2 pb-3 pl-4" }, Mt = { class: "flex shrink-0 items-center gap-1" }, Dt = { class: "border-t border-white/10 p-2" }, Ot = /* @__PURE__ */ M({
|
|
468
480
|
__name: "ShellSidebar",
|
|
469
481
|
props: {
|
|
470
482
|
identity: {},
|
|
@@ -473,9 +485,9 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
473
485
|
setup(e) {
|
|
474
486
|
ne(ce, "rail");
|
|
475
487
|
const a = H("(min-width: 48rem)");
|
|
476
|
-
return (t, o) => n(a) ? (
|
|
477
|
-
|
|
478
|
-
|
|
488
|
+
return (t, o) => n(a) ? (r(), p("aside", It, [
|
|
489
|
+
d("div", Tt, [
|
|
490
|
+
d("div", zt, [
|
|
479
491
|
h(ue, {
|
|
480
492
|
to: e.home,
|
|
481
493
|
tone: "light",
|
|
@@ -489,212 +501,212 @@ const pt = ["aria-label", "data-appearance"], ht = ["data-separated"], bt = ["id
|
|
|
489
501
|
key: "0"
|
|
490
502
|
} : void 0
|
|
491
503
|
]), 1032, ["to"]),
|
|
492
|
-
|
|
504
|
+
d("div", Mt, [
|
|
493
505
|
h(n(ae), { name: "headerActions" })
|
|
494
506
|
])
|
|
495
507
|
]),
|
|
496
|
-
h(
|
|
508
|
+
h(Ee, {
|
|
497
509
|
appearance: "rail",
|
|
498
510
|
class: "scrollbar-subtle min-h-0 flex-1 overflow-y-auto px-2 pt-3 pb-3 [mask-image:linear-gradient(to_bottom,transparent,black_12px,black_calc(100%-12px),transparent)]"
|
|
499
511
|
}),
|
|
500
512
|
D(t.$slots, "footer"),
|
|
501
|
-
|
|
502
|
-
h(
|
|
513
|
+
d("div", Dt, [
|
|
514
|
+
h(mt, { identity: e.identity }, null, 8, ["identity"])
|
|
503
515
|
])
|
|
504
516
|
])
|
|
505
517
|
])) : L("", !0);
|
|
506
518
|
}
|
|
507
|
-
}),
|
|
508
|
-
function
|
|
509
|
-
if (Math.abs(e - a) >
|
|
519
|
+
}), Rt = 20, Bt = 8, pe = 0.5, Nt = 40;
|
|
520
|
+
function Pt({ offset: e, startOffset: a, width: t, velocity: o }) {
|
|
521
|
+
if (Math.abs(e - a) > Nt) {
|
|
510
522
|
if (o > pe) return !0;
|
|
511
523
|
if (o < -pe) return !1;
|
|
512
524
|
}
|
|
513
525
|
return e > t / 2;
|
|
514
526
|
}
|
|
515
|
-
function
|
|
516
|
-
const a =
|
|
517
|
-
let o = !1, i = null, s = 0, u = 0,
|
|
518
|
-
function x
|
|
519
|
-
o = !0, i = null, s =
|
|
527
|
+
function jt(e) {
|
|
528
|
+
const a = V(0), t = V(!1);
|
|
529
|
+
let o = !1, i = null, s = 0, u = 0, f = 0, c = 0, v = 0, b = 0;
|
|
530
|
+
function w(x, k) {
|
|
531
|
+
o = !0, i = null, s = c = x.clientX, u = x.clientY, f = k, v = performance.now(), b = 0;
|
|
520
532
|
}
|
|
521
|
-
function
|
|
522
|
-
const
|
|
523
|
-
if (!o || !
|
|
524
|
-
const B =
|
|
533
|
+
function _(x) {
|
|
534
|
+
const k = x.touches[0];
|
|
535
|
+
if (!o || !k) return;
|
|
536
|
+
const B = k.clientX - s, Q = k.clientY - u;
|
|
525
537
|
if (!i) {
|
|
526
|
-
if (Math.max(Math.abs(B), Math.abs(Q)) <
|
|
527
|
-
if (i = Math.abs(B) > Math.abs(Q) ? "x" : "y", i === "y" ||
|
|
538
|
+
if (Math.max(Math.abs(B), Math.abs(Q)) < Bt) return;
|
|
539
|
+
if (i = Math.abs(B) > Math.abs(Q) ? "x" : "y", i === "y" || f === 0 && B < 0) {
|
|
528
540
|
o = !1;
|
|
529
541
|
return;
|
|
530
542
|
}
|
|
531
|
-
t.value = !0, a.value =
|
|
543
|
+
t.value = !0, a.value = f, e.onStart();
|
|
532
544
|
}
|
|
533
545
|
const U = performance.now();
|
|
534
|
-
b = (
|
|
546
|
+
b = (k.clientX - c) / Math.max(U - v, 1), c = k.clientX, v = U, a.value = Math.min(e.width(), Math.max(0, f + B)), x.cancelable && x.preventDefault();
|
|
535
547
|
}
|
|
536
|
-
function
|
|
537
|
-
o && (o = !1, t.value && (t.value = !1, e.onSettle(
|
|
548
|
+
function S() {
|
|
549
|
+
o && (o = !1, t.value && (t.value = !1, e.onSettle(Pt({ offset: a.value, startOffset: f, width: e.width(), velocity: b }))));
|
|
538
550
|
}
|
|
539
|
-
function
|
|
551
|
+
function $() {
|
|
540
552
|
o = !1, t.value = !1;
|
|
541
553
|
}
|
|
542
|
-
function A(
|
|
543
|
-
const
|
|
544
|
-
!
|
|
554
|
+
function A(x) {
|
|
555
|
+
const k = x.touches[0];
|
|
556
|
+
!k || x.touches.length !== 1 || e.isOpen() || !e.canOpenFromEdge() || k.clientX > Rt || w(k, 0);
|
|
545
557
|
}
|
|
546
558
|
let m = !1;
|
|
547
|
-
function
|
|
548
|
-
m || (m = !0, window.addEventListener("touchstart", A, { passive: !0 }), window.addEventListener("touchmove",
|
|
559
|
+
function z() {
|
|
560
|
+
m || (m = !0, window.addEventListener("touchstart", A, { passive: !0 }), window.addEventListener("touchmove", _, { passive: !1 }), window.addEventListener("touchend", S), window.addEventListener("touchcancel", S));
|
|
549
561
|
}
|
|
550
562
|
function l() {
|
|
551
|
-
m && (m = !1, window.removeEventListener("touchstart", A), window.removeEventListener("touchmove",
|
|
563
|
+
m && (m = !1, window.removeEventListener("touchstart", A), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", S), window.removeEventListener("touchcancel", S), $());
|
|
552
564
|
}
|
|
553
|
-
return q(e.enabled, (
|
|
554
|
-
onTouchstartPassive(
|
|
555
|
-
const
|
|
556
|
-
|
|
565
|
+
return q(e.enabled, (x) => x ? z() : l(), { immediate: !0 }), le(l), { offset: a, dragging: t, closeEvents: {
|
|
566
|
+
onTouchstartPassive(x) {
|
|
567
|
+
const k = x.touches[0];
|
|
568
|
+
k && x.touches.length === 1 && e.isOpen() && w(k, e.width());
|
|
557
569
|
}
|
|
558
|
-
}, cancel:
|
|
570
|
+
}, cancel: $ };
|
|
559
571
|
}
|
|
560
|
-
const
|
|
561
|
-
function
|
|
562
|
-
return be(
|
|
572
|
+
const Ie = Symbol("vue-core.navigationDrawer");
|
|
573
|
+
function Ft() {
|
|
574
|
+
return be(Ie, null);
|
|
563
575
|
}
|
|
564
|
-
const
|
|
576
|
+
const Vt = ["id", "aria-label"], Wt = ["data-drawer", "inert"], Kt = /* @__PURE__ */ M({
|
|
565
577
|
__name: "ShellStage",
|
|
566
578
|
props: {
|
|
567
579
|
enabled: { type: Boolean }
|
|
568
580
|
},
|
|
569
581
|
setup(e) {
|
|
570
|
-
const a = e, { t } = N(), o =
|
|
571
|
-
let m = 0,
|
|
572
|
-
const
|
|
573
|
-
enabled: () =>
|
|
574
|
-
width:
|
|
582
|
+
const a = e, { t } = N(), o = Ue(), i = re(), s = H("(max-width: 47.999rem)"), u = H("(display-mode: standalone)"), f = H("(prefers-reduced-motion: reduce)"), c = C(() => a.enabled && s.value), v = te("stage"), b = te("scroller"), w = V(null), _ = ie(), S = V(!1), $ = V(!1), A = V(!1);
|
|
583
|
+
let m = 0, z = !1, l, E = null;
|
|
584
|
+
const x = () => w.value?.offsetWidth ?? 0, k = jt({
|
|
585
|
+
enabled: () => c.value,
|
|
586
|
+
width: x,
|
|
575
587
|
isOpen: () => A.value,
|
|
576
588
|
canOpenFromEdge: () => u.value || navigator.standalone === !0,
|
|
577
589
|
onStart: () => {
|
|
578
590
|
clearTimeout(l), de();
|
|
579
591
|
},
|
|
580
|
-
onSettle: (g) => g ?
|
|
581
|
-
}), B =
|
|
592
|
+
onSettle: (g) => g ? S.value = !0 : j()
|
|
593
|
+
}), B = C(() => k.dragging.value ? k.offset.value : A.value ? x() : 0), Q = C(() => x() ? B.value / x() : 0), U = Je(w, {
|
|
582
594
|
initialFocus: "panel",
|
|
583
595
|
onEscape: () => j()
|
|
584
596
|
});
|
|
585
|
-
function
|
|
597
|
+
function Te() {
|
|
586
598
|
const g = getComputedStyle(document.documentElement).getPropertyValue("--app-motion-drawer").trim();
|
|
587
599
|
return g.endsWith("ms") ? parseFloat(g) : parseFloat(g) * 1e3 || 0;
|
|
588
600
|
}
|
|
589
601
|
function de() {
|
|
590
602
|
const g = v.value, P = b.value;
|
|
591
|
-
|
|
603
|
+
$.value || !g || !P || (m = window.scrollY, z = !1, Object.assign(g.style, { position: "fixed", inset: "0", overflow: "hidden", zIndex: "10" }), Object.assign(P.style, { position: "absolute", inset: "0", overflow: "hidden" }), P.scrollTop = m, $.value = !0);
|
|
592
604
|
}
|
|
593
605
|
function se() {
|
|
594
606
|
const g = v.value, P = b.value;
|
|
595
|
-
|
|
607
|
+
!$.value || !g || !P || (Object.assign(g.style, { position: "", inset: "", overflow: "", zIndex: "", transform: "", transition: "", borderRadius: "" }), Object.assign(P.style, { position: "", inset: "", overflow: "" }), $.value = !1, window.scrollTo({ top: z ? 0 : m, behavior: "instant" }));
|
|
596
608
|
}
|
|
597
|
-
q([B, () =>
|
|
609
|
+
q([B, () => k.dragging.value, $], () => {
|
|
598
610
|
const g = v.value;
|
|
599
|
-
!g ||
|
|
611
|
+
!g || !$.value || (g.style.transform = `translate3d(${B.value}px, 0, 0)`, g.style.borderRadius = B.value > 0 ? "2.5rem" : "", g.style.transition = k.dragging.value || f.value ? "none" : "transform var(--app-motion-drawer) var(--app-motion-sheet-easing), border-radius var(--app-motion-drawer) var(--app-motion-sheet-easing)");
|
|
600
612
|
}, { flush: "sync" });
|
|
601
|
-
function
|
|
602
|
-
if (!
|
|
603
|
-
|
|
613
|
+
function ze() {
|
|
614
|
+
if (!c.value) {
|
|
615
|
+
S.value = !1;
|
|
604
616
|
return;
|
|
605
617
|
}
|
|
606
|
-
clearTimeout(l),
|
|
607
|
-
|
|
618
|
+
clearTimeout(l), E = null, de(), v.value?.offsetWidth, A.value = !0, U.present(), ye(() => {
|
|
619
|
+
w.value?.querySelector('[aria-current="page"]')?.focus({ preventScroll: !0 });
|
|
608
620
|
});
|
|
609
621
|
}
|
|
610
622
|
function j(g) {
|
|
611
|
-
if (g && (
|
|
612
|
-
|
|
623
|
+
if (g && (E = g), S.value) {
|
|
624
|
+
S.value = !1;
|
|
613
625
|
return;
|
|
614
626
|
}
|
|
615
|
-
A.value = !1, U.dismissWithoutAsking(), clearTimeout(l), l = setTimeout(
|
|
627
|
+
A.value = !1, U.dismissWithoutAsking(), clearTimeout(l), l = setTimeout(Me, Te() + 30);
|
|
616
628
|
}
|
|
617
|
-
function
|
|
629
|
+
function Me() {
|
|
618
630
|
se();
|
|
619
|
-
const g =
|
|
620
|
-
|
|
631
|
+
const g = E;
|
|
632
|
+
E = null, g?.();
|
|
621
633
|
}
|
|
622
|
-
q(
|
|
623
|
-
g || (
|
|
634
|
+
q(S, (g) => g ? ze() : j()), q(c, (g) => {
|
|
635
|
+
g || (k.cancel(), clearTimeout(l), E = null, S.value = !1, A.value = !1, U.dismissWithoutAsking(), se());
|
|
624
636
|
}), q(() => o.fullPath, () => {
|
|
625
|
-
|
|
637
|
+
$.value && (z = !0), A.value && j();
|
|
626
638
|
});
|
|
627
|
-
function
|
|
639
|
+
function De(g) {
|
|
628
640
|
i.push(g).catch(() => {
|
|
629
641
|
}).finally(() => j());
|
|
630
642
|
}
|
|
631
|
-
return ne(
|
|
632
|
-
available:
|
|
633
|
-
open:
|
|
634
|
-
panelId:
|
|
643
|
+
return ne(Ie, {
|
|
644
|
+
available: c,
|
|
645
|
+
open: S,
|
|
646
|
+
panelId: _,
|
|
635
647
|
present: () => {
|
|
636
|
-
|
|
648
|
+
c.value && (S.value = !0);
|
|
637
649
|
},
|
|
638
650
|
dismiss: j
|
|
639
|
-
}),
|
|
651
|
+
}), Be(() => {
|
|
640
652
|
clearTimeout(l), se();
|
|
641
|
-
}), (g, P) => (
|
|
642
|
-
|
|
653
|
+
}), (g, P) => (r(), p(F, null, [
|
|
654
|
+
c.value ? (r(), p("div", K({
|
|
643
655
|
key: 0,
|
|
644
|
-
id: n(
|
|
656
|
+
id: n(_),
|
|
645
657
|
ref_key: "panel",
|
|
646
|
-
ref:
|
|
658
|
+
ref: w,
|
|
647
659
|
role: "dialog",
|
|
648
660
|
"aria-modal": "true",
|
|
649
661
|
"aria-label": n(t)("core.shell.menu"),
|
|
650
662
|
tabindex: "-1",
|
|
651
663
|
"data-shell-drawer": "",
|
|
652
|
-
class: ["fixed inset-y-0 left-0 z-0 w-[min(82vw,20rem)] outline-none",
|
|
653
|
-
style: n(
|
|
654
|
-
}, n(
|
|
664
|
+
class: ["fixed inset-y-0 left-0 z-0 w-[min(82vw,20rem)] outline-none", $.value ? "visible" : "invisible"],
|
|
665
|
+
style: n(f) ? { opacity: A.value || n(k).dragging.value ? 1 : 0, transition: "opacity var(--app-motion-drawer) linear" } : void 0
|
|
666
|
+
}, n(k).closeEvents), [
|
|
655
667
|
D(g.$slots, "drawer", {
|
|
656
|
-
select:
|
|
668
|
+
select: De,
|
|
657
669
|
dismiss: j
|
|
658
670
|
})
|
|
659
|
-
], 16,
|
|
660
|
-
|
|
671
|
+
], 16, Vt)) : L("", !0),
|
|
672
|
+
d("div", {
|
|
661
673
|
ref_key: "stage",
|
|
662
674
|
ref: v,
|
|
663
675
|
"data-shell-stage": "",
|
|
664
676
|
"data-drawer": A.value ? "open" : void 0,
|
|
665
|
-
class: y(["flex flex-1 flex-col",
|
|
666
|
-
inert: A.value || n(
|
|
677
|
+
class: y(["flex flex-1 flex-col", $.value ? "overscroll-none bg-surface-page shadow-dialog" : ""]),
|
|
678
|
+
inert: A.value || n(k).dragging.value || void 0
|
|
667
679
|
}, [
|
|
668
|
-
|
|
680
|
+
d("div", {
|
|
669
681
|
ref_key: "scroller",
|
|
670
682
|
ref: b,
|
|
671
683
|
class: "flex flex-1 flex-col"
|
|
672
684
|
}, [
|
|
673
685
|
D(g.$slots, "default")
|
|
674
686
|
], 512),
|
|
675
|
-
|
|
687
|
+
$.value ? (r(), p("div", {
|
|
676
688
|
key: 0,
|
|
677
689
|
"aria-hidden": "true",
|
|
678
690
|
class: "pointer-events-none fixed inset-0 z-50 bg-scrim",
|
|
679
691
|
style: ge({ opacity: Q.value * 0.55 })
|
|
680
692
|
}, null, 4)) : L("", !0)
|
|
681
|
-
], 10,
|
|
682
|
-
|
|
693
|
+
], 10, Wt),
|
|
694
|
+
$.value && B.value > 0 ? (r(), p("div", K({
|
|
683
695
|
key: 1,
|
|
684
696
|
"aria-hidden": "true",
|
|
685
697
|
"data-shell-stage-cover": "",
|
|
686
698
|
class: "fixed inset-y-0 right-0 z-20",
|
|
687
699
|
style: { left: `${B.value}px` }
|
|
688
|
-
}, n(
|
|
689
|
-
onClick: P[0] || (P[0] = (
|
|
700
|
+
}, n(k).closeEvents, {
|
|
701
|
+
onClick: P[0] || (P[0] = (_n) => j())
|
|
690
702
|
}), null, 16)) : L("", !0)
|
|
691
703
|
], 64));
|
|
692
704
|
}
|
|
693
|
-
}),
|
|
705
|
+
}), Ut = ["aria-label", "aria-expanded", "aria-controls"], Xt = /* @__PURE__ */ M({
|
|
694
706
|
__name: "NavigationMenuButton",
|
|
695
707
|
setup(e) {
|
|
696
|
-
const a =
|
|
697
|
-
return (o, i) => n(a)?.available.value ? (
|
|
708
|
+
const a = Ft(), { t } = N();
|
|
709
|
+
return (o, i) => n(a)?.available.value ? (r(), p("button", {
|
|
698
710
|
key: 0,
|
|
699
711
|
type: "button",
|
|
700
712
|
"data-shell-menu-button": "",
|
|
@@ -709,40 +721,40 @@ const jt = ["id", "aria-label"], Vt = ["data-drawer", "inert"], Ft = /* @__PURE_
|
|
|
709
721
|
name: "menuLines",
|
|
710
722
|
size: 20
|
|
711
723
|
})
|
|
712
|
-
], 8,
|
|
724
|
+
], 8, Ut)) : L("", !0);
|
|
713
725
|
}
|
|
714
|
-
}),
|
|
726
|
+
}), Yt = { class: "grid min-h-bar-height grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-1" }, qt = { class: "flex min-w-0 items-center justify-start" }, Ht = ["data-page-action", "disabled"], Gt = { class: "truncate" }, Qt = { class: "ml-1 flex items-center gap-1" }, Jt = { class: "flex min-w-0 items-center justify-end" }, Zt = ["data-page-action", "aria-label", "disabled", "onClick"], en = ["data-page-action", "disabled", "aria-label", "aria-busy", "onClick"], tn = { class: "truncate" }, nn = ["aria-label", "onClick"], an = /* @__PURE__ */ M({
|
|
715
727
|
__name: "ShellTopBar",
|
|
716
728
|
props: {
|
|
717
729
|
home: {}
|
|
718
730
|
},
|
|
719
731
|
setup(e) {
|
|
720
|
-
const { t: a } = N(), t = re(), o =
|
|
732
|
+
const { t: a } = N(), t = re(), o = Se(), { session: i } = G(), s = H("(max-width: 47.999rem)");
|
|
721
733
|
ne(ce, "bar");
|
|
722
|
-
const u =
|
|
723
|
-
() =>
|
|
734
|
+
const u = C(() => i.state.value.status === "authenticated"), f = C(() => !u.value || s.value), c = C(() => u.value ? o.back.value : null), v = C(() => u.value ? o.leading.value : null), b = C(() => o.navTitle.value ?? o.title.value), w = C(() => u.value && !!b.value && (!!o.navTitle.value || !o.titleInView.value)), _ = C(() => u.value ? o.actions.value : []), S = C(() => _.value.filter((m) => m.placement === "primary" && m.tone !== "critical")), $ = C(
|
|
735
|
+
() => _.value.filter((m) => !S.value.includes(m)).map((m) => ({ id: m.id, label: m.label, icon: m.icon, tone: m.tone, disabled: m.disabled, processing: m.processing, onSelect: m.onClick }))
|
|
724
736
|
);
|
|
725
737
|
function A() {
|
|
726
|
-
|
|
738
|
+
c.value && t.push(c.value.to);
|
|
727
739
|
}
|
|
728
|
-
return (m,
|
|
740
|
+
return (m, z) => f.value ? (r(), p("header", {
|
|
729
741
|
key: 0,
|
|
730
742
|
"data-shell-top-bar": "",
|
|
731
|
-
class: y(["pt-[max(0.25rem,env(safe-area-inset-top))] pr-[max(0.5rem,env(safe-area-inset-right))] pb-1 pl-[max(0.5rem,env(safe-area-inset-left))] text-content-strong", u.value ? ["sticky top-0 z-30 border-b bg-surface-page/85 backdrop-blur-xl transition-colors duration-motion-normal",
|
|
743
|
+
class: y(["pt-[max(0.25rem,env(safe-area-inset-top))] pr-[max(0.5rem,env(safe-area-inset-right))] pb-1 pl-[max(0.5rem,env(safe-area-inset-left))] text-content-strong", u.value ? ["sticky top-0 z-30 border-b bg-surface-page/85 backdrop-blur-xl transition-colors duration-motion-normal", w.value ? "border-border-separator" : "border-transparent"] : "border-b border-border-separator bg-surface-cell"])
|
|
732
744
|
}, [
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
v.value ? (
|
|
745
|
+
d("div", Yt, [
|
|
746
|
+
d("div", qt, [
|
|
747
|
+
v.value ? (r(), p("button", {
|
|
736
748
|
key: 0,
|
|
737
749
|
type: "button",
|
|
738
750
|
"data-shell-bar-leading": "",
|
|
739
751
|
"data-page-action": v.value.id,
|
|
740
752
|
disabled: v.value.disabled || v.value.processing,
|
|
741
753
|
class: "hit-target inline-flex min-w-0 cursor-pointer items-center rounded-control px-2 text-body text-content-link disabled:text-content-disabled",
|
|
742
|
-
onClick:
|
|
754
|
+
onClick: z[0] || (z[0] = (l) => v.value.onClick())
|
|
743
755
|
}, [
|
|
744
|
-
|
|
745
|
-
], 8,
|
|
756
|
+
d("span", Gt, O(v.value.label), 1)
|
|
757
|
+
], 8, Ht)) : c.value ? (r(), p("button", {
|
|
746
758
|
key: 1,
|
|
747
759
|
type: "button",
|
|
748
760
|
"data-shell-bar-back": "",
|
|
@@ -754,19 +766,19 @@ const jt = ["id", "aria-label"], Vt = ["data-drawer", "inert"], Ft = /* @__PURE_
|
|
|
754
766
|
size: 28,
|
|
755
767
|
class: "-mr-0.5 shrink-0"
|
|
756
768
|
}),
|
|
757
|
-
|
|
758
|
-
class: y(["truncate",
|
|
759
|
-
}, O(
|
|
760
|
-
])) : u.value ? (
|
|
761
|
-
h(
|
|
762
|
-
|
|
769
|
+
d("span", {
|
|
770
|
+
class: y(["truncate", w.value ? "sr-only" : ""])
|
|
771
|
+
}, O(c.value.label), 3)
|
|
772
|
+
])) : u.value ? (r(), p(F, { key: 2 }, [
|
|
773
|
+
h(Xt),
|
|
774
|
+
d("span", Qt, [
|
|
763
775
|
h(n(ae), { name: "headerActions" })
|
|
764
776
|
])
|
|
765
|
-
], 64)) : (
|
|
777
|
+
], 64)) : (r(), T(ue, {
|
|
766
778
|
key: 3,
|
|
767
779
|
to: e.home,
|
|
768
780
|
tone: "brand",
|
|
769
|
-
class: y(["px-2 transition-opacity",
|
|
781
|
+
class: y(["px-2 transition-opacity", w.value ? "opacity-0" : "opacity-100"])
|
|
770
782
|
}, W({ _: 2 }, [
|
|
771
783
|
m.$slots.brand ? {
|
|
772
784
|
name: "default",
|
|
@@ -777,31 +789,31 @@ const jt = ["id", "aria-label"], Vt = ["data-drawer", "inert"], Ft = /* @__PURE_
|
|
|
777
789
|
} : void 0
|
|
778
790
|
]), 1032, ["to", "class"]))
|
|
779
791
|
]),
|
|
780
|
-
|
|
792
|
+
d("span", {
|
|
781
793
|
"aria-hidden": "true",
|
|
782
794
|
"data-shell-bar-title": "",
|
|
783
|
-
class: y(["pointer-events-none truncate text-center text-headline font-semibold transition-opacity duration-motion-normal",
|
|
795
|
+
class: y(["pointer-events-none truncate text-center text-headline font-semibold transition-opacity duration-motion-normal", w.value ? "max-w-[42vw] opacity-100" : "max-w-0 opacity-0"])
|
|
784
796
|
}, O(b.value), 3),
|
|
785
|
-
|
|
786
|
-
u.value ? (
|
|
787
|
-
(
|
|
797
|
+
d("div", Jt, [
|
|
798
|
+
u.value ? (r(), p(F, { key: 0 }, [
|
|
799
|
+
(r(!0), p(F, null, ee(S.value, (l) => (r(), p(F, {
|
|
788
800
|
key: l.id
|
|
789
801
|
}, [
|
|
790
|
-
l.compact === "icon" && l.icon ? (
|
|
802
|
+
l.compact === "icon" && l.icon ? (r(), p("button", {
|
|
791
803
|
key: 0,
|
|
792
804
|
type: "button",
|
|
793
805
|
"data-page-action": l.id,
|
|
794
806
|
"aria-label": l.label,
|
|
795
807
|
disabled: l.disabled || l.processing,
|
|
796
808
|
class: "hit-target mx-1 flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full bg-tint-soft text-content-link disabled:opacity-45",
|
|
797
|
-
onClick: (
|
|
809
|
+
onClick: (E) => l.onClick()
|
|
798
810
|
}, [
|
|
799
811
|
h(n(R), {
|
|
800
812
|
name: l.processing ? "loader4Line" : l.icon,
|
|
801
813
|
size: 18,
|
|
802
814
|
class: y(l.processing ? "animate-spin" : "")
|
|
803
815
|
}, null, 8, ["name", "class"])
|
|
804
|
-
], 8,
|
|
816
|
+
], 8, Zt)) : (r(), p("button", {
|
|
805
817
|
key: 1,
|
|
806
818
|
type: "button",
|
|
807
819
|
"data-page-action": l.id,
|
|
@@ -809,24 +821,24 @@ const jt = ["id", "aria-label"], Vt = ["data-drawer", "inert"], Ft = /* @__PURE_
|
|
|
809
821
|
"aria-label": l.shortLabel ? l.label : void 0,
|
|
810
822
|
"aria-busy": l.processing || void 0,
|
|
811
823
|
class: "hit-target flex min-w-0 shrink cursor-pointer items-center gap-1 rounded-control px-2 text-body font-semibold text-content-link disabled:text-content-disabled",
|
|
812
|
-
onClick: (
|
|
824
|
+
onClick: (E) => l.onClick()
|
|
813
825
|
}, [
|
|
814
|
-
l.processing ? (
|
|
826
|
+
l.processing ? (r(), T(n(R), {
|
|
815
827
|
key: 0,
|
|
816
828
|
name: "loader4Line",
|
|
817
829
|
size: 16,
|
|
818
830
|
class: "animate-spin"
|
|
819
831
|
})) : L("", !0),
|
|
820
|
-
|
|
821
|
-
], 8,
|
|
832
|
+
d("span", tn, O(l.shortLabel ?? l.label), 1)
|
|
833
|
+
], 8, en))
|
|
822
834
|
], 64))), 128)),
|
|
823
|
-
|
|
835
|
+
$.value.length ? (r(), T(n(Ze), {
|
|
824
836
|
key: 0,
|
|
825
|
-
items:
|
|
837
|
+
items: $.value,
|
|
826
838
|
label: n(a)("core.page.more_actions")
|
|
827
839
|
}, {
|
|
828
|
-
trigger: I(({ toggle: l, attrs:
|
|
829
|
-
|
|
840
|
+
trigger: I(({ toggle: l, attrs: E }) => [
|
|
841
|
+
d("button", K({ type: "button" }, E, {
|
|
830
842
|
"aria-label": n(a)("core.page.more_actions"),
|
|
831
843
|
"data-shell-bar-more": "",
|
|
832
844
|
class: "hit-target flex size-9 cursor-pointer items-center justify-center rounded-full text-content-link",
|
|
@@ -836,7 +848,7 @@ const jt = ["id", "aria-label"], Vt = ["data-drawer", "inert"], Ft = /* @__PURE_
|
|
|
836
848
|
name: "moreLine",
|
|
837
849
|
size: 22
|
|
838
850
|
})
|
|
839
|
-
], 16,
|
|
851
|
+
], 16, nn)
|
|
840
852
|
]),
|
|
841
853
|
_: 1
|
|
842
854
|
}, 8, ["items", "label"])) : L("", !0)
|
|
@@ -847,18 +859,18 @@ const jt = ["id", "aria-label"], Vt = ["data-drawer", "inert"], Ft = /* @__PURE_
|
|
|
847
859
|
], 2)) : L("", !0);
|
|
848
860
|
}
|
|
849
861
|
});
|
|
850
|
-
function
|
|
862
|
+
function on(e) {
|
|
851
863
|
const { name: a, email: t } = e;
|
|
852
864
|
return { name: typeof a == "string" && a !== "" ? a : String(e.id), detail: typeof t == "string" ? t : null };
|
|
853
865
|
}
|
|
854
|
-
function
|
|
855
|
-
const { session: a } = G(), t = e ??
|
|
856
|
-
return
|
|
866
|
+
function sn(e) {
|
|
867
|
+
const { session: a } = G(), t = e ?? on;
|
|
868
|
+
return C(() => {
|
|
857
869
|
const o = a.state.value;
|
|
858
870
|
return o.status === "authenticated" ? t(o.user) : null;
|
|
859
871
|
});
|
|
860
872
|
}
|
|
861
|
-
const
|
|
873
|
+
const ln = { class: "flex min-h-screen flex-col bg-surface-page text-base text-content antialiased" }, rn = ["aria-label"], cn = { class: "flex flex-1" }, un = { class: "flex min-w-0 flex-1 overflow-x-clip" }, dn = { "data-dialog-inert-skip": "" }, fn = /* @__PURE__ */ M({
|
|
862
874
|
__name: "BackofficeShell",
|
|
863
875
|
props: {
|
|
864
876
|
home: { default: void 0 },
|
|
@@ -866,66 +878,66 @@ const on = { class: "flex min-h-screen flex-col bg-surface-page text-base text-c
|
|
|
866
878
|
progress: { default: void 0 }
|
|
867
879
|
},
|
|
868
880
|
setup(e) {
|
|
869
|
-
const a = e, { t } = N(), { session: o } = G(), i =
|
|
870
|
-
return (
|
|
871
|
-
e.progress?.visible.value ? (
|
|
881
|
+
const a = e, { t } = N(), { session: o } = G(), i = Se(), s = sn(a.identity), u = C(() => o.state.value.status === "authenticated"), f = te("accountSheet");
|
|
882
|
+
return (c, v) => (r(), p("div", ln, [
|
|
883
|
+
e.progress?.visible.value ? (r(), p("div", {
|
|
872
884
|
key: 0,
|
|
873
885
|
role: "progressbar",
|
|
874
886
|
"aria-label": n(t)("core.state.loading"),
|
|
875
887
|
"data-shell-progress": "",
|
|
876
888
|
class: "fixed inset-x-0 top-0 z-10000 flex h-1 justify-center bg-primary-800"
|
|
877
889
|
}, [...v[0] || (v[0] = [
|
|
878
|
-
|
|
879
|
-
])], 8,
|
|
880
|
-
h(
|
|
890
|
+
d("div", { class: "animate-grow-and-shrink-width bg-primary-600 motion-reduce:w-full motion-reduce:animate-none motion-reduce:opacity-60" }, null, -1)
|
|
891
|
+
])], 8, rn)) : L("", !0),
|
|
892
|
+
h(Kt, { enabled: u.value }, W({
|
|
881
893
|
default: I(() => [
|
|
882
|
-
h(
|
|
883
|
-
|
|
894
|
+
h(an, { home: e.home }, W({ _: 2 }, [
|
|
895
|
+
c.$slots.brand ? {
|
|
884
896
|
name: "brand",
|
|
885
897
|
fn: I((b) => [
|
|
886
|
-
D(
|
|
898
|
+
D(c.$slots, "brand", X(Y(b)))
|
|
887
899
|
]),
|
|
888
900
|
key: "0"
|
|
889
901
|
} : void 0,
|
|
890
|
-
|
|
902
|
+
c.$slots["top-bar-end"] ? {
|
|
891
903
|
name: "end",
|
|
892
904
|
fn: I(() => [
|
|
893
|
-
D(
|
|
905
|
+
D(c.$slots, "top-bar-end")
|
|
894
906
|
]),
|
|
895
907
|
key: "1"
|
|
896
908
|
} : void 0
|
|
897
909
|
]), 1032, ["home"]),
|
|
898
|
-
|
|
899
|
-
n(s) ? (
|
|
910
|
+
d("div", cn, [
|
|
911
|
+
n(s) ? (r(), T(Ot, {
|
|
900
912
|
key: 0,
|
|
901
913
|
identity: n(s),
|
|
902
914
|
home: e.home
|
|
903
915
|
}, W({ _: 2 }, [
|
|
904
|
-
|
|
916
|
+
c.$slots.brand ? {
|
|
905
917
|
name: "brand",
|
|
906
918
|
fn: I((b) => [
|
|
907
|
-
D(
|
|
919
|
+
D(c.$slots, "brand", X(Y(b)))
|
|
908
920
|
]),
|
|
909
921
|
key: "0"
|
|
910
922
|
} : void 0,
|
|
911
|
-
|
|
923
|
+
c.$slots.footer ? {
|
|
912
924
|
name: "footer",
|
|
913
925
|
fn: I(() => [
|
|
914
|
-
D(
|
|
926
|
+
D(c.$slots, "footer")
|
|
915
927
|
]),
|
|
916
928
|
key: "1"
|
|
917
929
|
} : void 0
|
|
918
930
|
]), 1032, ["identity", "home"])) : L("", !0),
|
|
919
|
-
|
|
920
|
-
|
|
931
|
+
d("div", un, [
|
|
932
|
+
d("main", {
|
|
921
933
|
class: y(["flex min-w-0 flex-1 flex-col", n(i).hasShell.value ? "" : "p-4 md:px-8 md:py-6"]),
|
|
922
934
|
style: ge(n(i).hasShell.value ? void 0 : { paddingBottom: "calc(var(--bottom-dock-h, 0px) + 1rem)" })
|
|
923
935
|
}, [
|
|
924
|
-
h(n(
|
|
936
|
+
h(n(Ge))
|
|
925
937
|
], 6)
|
|
926
938
|
])
|
|
927
939
|
]),
|
|
928
|
-
h(n(
|
|
940
|
+
h(n(He), {
|
|
929
941
|
class: y(u.value ? "md:left-64" : "")
|
|
930
942
|
}, null, 8, ["class"])
|
|
931
943
|
]),
|
|
@@ -933,24 +945,24 @@ const on = { class: "flex min-h-screen flex-col bg-surface-page text-base text-c
|
|
|
933
945
|
}, [
|
|
934
946
|
n(s) ? {
|
|
935
947
|
name: "drawer",
|
|
936
|
-
fn: I(({ select: b, dismiss:
|
|
937
|
-
h(
|
|
948
|
+
fn: I(({ select: b, dismiss: w }) => [
|
|
949
|
+
h(Et, {
|
|
938
950
|
identity: n(s),
|
|
939
951
|
home: e.home,
|
|
940
952
|
onSelect: b,
|
|
941
|
-
onAccount: (
|
|
953
|
+
onAccount: (_) => w(() => f.value?.present())
|
|
942
954
|
}, W({ _: 2 }, [
|
|
943
|
-
|
|
955
|
+
c.$slots.brand ? {
|
|
944
956
|
name: "brand",
|
|
945
|
-
fn: I((
|
|
946
|
-
D(
|
|
957
|
+
fn: I((_) => [
|
|
958
|
+
D(c.$slots, "brand", X(Y(_)))
|
|
947
959
|
]),
|
|
948
960
|
key: "0"
|
|
949
961
|
} : void 0,
|
|
950
|
-
|
|
962
|
+
c.$slots.footer ? {
|
|
951
963
|
name: "footer",
|
|
952
964
|
fn: I(() => [
|
|
953
|
-
D(
|
|
965
|
+
D(c.$slots, "footer")
|
|
954
966
|
]),
|
|
955
967
|
key: "1"
|
|
956
968
|
} : void 0
|
|
@@ -959,24 +971,24 @@ const on = { class: "flex min-h-screen flex-col bg-surface-page text-base text-c
|
|
|
959
971
|
key: "0"
|
|
960
972
|
} : void 0
|
|
961
973
|
]), 1032, ["enabled"]),
|
|
962
|
-
n(s) ? (
|
|
974
|
+
n(s) ? (r(), T(vt, {
|
|
963
975
|
key: 1,
|
|
964
976
|
ref_key: "accountSheet",
|
|
965
|
-
ref:
|
|
977
|
+
ref: f,
|
|
966
978
|
identity: n(s)
|
|
967
979
|
}, null, 8, ["identity"])) : L("", !0),
|
|
968
|
-
(
|
|
969
|
-
|
|
970
|
-
h(n(
|
|
980
|
+
(r(), T(Ne, { to: "body" }, [
|
|
981
|
+
d("div", dn, [
|
|
982
|
+
h(n(qe))
|
|
971
983
|
])
|
|
972
984
|
])),
|
|
973
|
-
h(
|
|
985
|
+
h(Ye),
|
|
974
986
|
h(n(ae), { name: "host" })
|
|
975
987
|
]));
|
|
976
988
|
}
|
|
977
989
|
});
|
|
978
|
-
function
|
|
979
|
-
const a =
|
|
990
|
+
function mn(e = et) {
|
|
991
|
+
const a = Pe(!1);
|
|
980
992
|
let t;
|
|
981
993
|
return {
|
|
982
994
|
visible: a,
|
|
@@ -988,13 +1000,13 @@ function dn(e = Ze) {
|
|
|
988
1000
|
}
|
|
989
1001
|
};
|
|
990
1002
|
}
|
|
991
|
-
function
|
|
992
|
-
const a =
|
|
1003
|
+
function Yn(e = {}) {
|
|
1004
|
+
const a = mn(), { brand: t, footer: o, topBarEnd: i } = e;
|
|
993
1005
|
return { component: M({
|
|
994
1006
|
name: "BackofficeShell",
|
|
995
1007
|
setup() {
|
|
996
1008
|
return () => J(
|
|
997
|
-
|
|
1009
|
+
fn,
|
|
998
1010
|
{
|
|
999
1011
|
home: e.home,
|
|
1000
1012
|
// The application's session produces U; the shell reads it as the SessionUser it is guaranteed to be.
|
|
@@ -1010,26 +1022,26 @@ function Kn(e = {}) {
|
|
|
1010
1022
|
}
|
|
1011
1023
|
}), slots: ["headerActions", "accountMenu", "host"], progress: a };
|
|
1012
1024
|
}
|
|
1013
|
-
const
|
|
1014
|
-
function
|
|
1025
|
+
const vn = 30 * 6e4, pn = 6e4;
|
|
1026
|
+
function hn(e, a) {
|
|
1015
1027
|
const t = new DOMParser().parseFromString(e, "text/html").querySelectorAll('script[type="module"][src]');
|
|
1016
1028
|
return Array.from(t, (o) => new URL(o.getAttribute("src") ?? "", a).pathname).sort();
|
|
1017
1029
|
}
|
|
1018
|
-
function
|
|
1030
|
+
function bn() {
|
|
1019
1031
|
return Array.from(document.querySelectorAll('script[type="module"][src]'), (e) => new URL(e.src, location.href).pathname).sort();
|
|
1020
1032
|
}
|
|
1021
|
-
function
|
|
1033
|
+
function gn(e) {
|
|
1022
1034
|
return M({
|
|
1023
1035
|
name: "AppUpdateNotice",
|
|
1024
1036
|
setup() {
|
|
1025
1037
|
if (e.enabled === !1) return () => null;
|
|
1026
|
-
const { t: a } = N(), t = e.url ?? "/", o =
|
|
1038
|
+
const { t: a } = N(), t = e.url ?? "/", o = bn();
|
|
1027
1039
|
let i = !1, s = 0;
|
|
1028
1040
|
async function u() {
|
|
1029
|
-
if (!(i || o.length === 0 || !navigator.onLine || document.visibilityState !== "visible") && !(Date.now() - s <
|
|
1041
|
+
if (!(i || o.length === 0 || !navigator.onLine || document.visibilityState !== "visible") && !(Date.now() - s < pn)) {
|
|
1030
1042
|
s = Date.now();
|
|
1031
1043
|
try {
|
|
1032
|
-
const v = await fetch(t, { cache: "no-store", credentials: "include" }), b = v.ok ?
|
|
1044
|
+
const v = await fetch(t, { cache: "no-store", credentials: "include" }), b = v.ok ? hn(await v.text(), location.href) : [];
|
|
1033
1045
|
if (b.length === 0 || b.join() === o.join()) return;
|
|
1034
1046
|
i = !0, we.info(a("core.shell.update.available"), {
|
|
1035
1047
|
duration: 1 / 0,
|
|
@@ -1039,27 +1051,27 @@ function hn(e) {
|
|
|
1039
1051
|
}
|
|
1040
1052
|
}
|
|
1041
1053
|
}
|
|
1042
|
-
const
|
|
1043
|
-
document.addEventListener("visibilitychange",
|
|
1044
|
-
const
|
|
1054
|
+
const f = () => void u();
|
|
1055
|
+
document.addEventListener("visibilitychange", f);
|
|
1056
|
+
const c = setInterval(u, e.checkEveryMs ?? vn);
|
|
1045
1057
|
return le(() => {
|
|
1046
|
-
document.removeEventListener("visibilitychange",
|
|
1058
|
+
document.removeEventListener("visibilitychange", f), clearInterval(c);
|
|
1047
1059
|
}), () => null;
|
|
1048
1060
|
}
|
|
1049
1061
|
});
|
|
1050
1062
|
}
|
|
1051
|
-
function
|
|
1063
|
+
function qn(e = {}) {
|
|
1052
1064
|
return ke({
|
|
1053
1065
|
id: "vue-core.app-updates",
|
|
1054
|
-
contributions: [{ id: "vue-core.app-updates", slot: "host", component:
|
|
1066
|
+
contributions: [{ id: "vue-core.app-updates", slot: "host", component: gn(e), scope: "always" }]
|
|
1055
1067
|
});
|
|
1056
1068
|
}
|
|
1057
|
-
const
|
|
1069
|
+
const yn = {
|
|
1058
1070
|
key: 1,
|
|
1059
1071
|
"aria-hidden": "true",
|
|
1060
1072
|
"data-header-action-badge": "",
|
|
1061
1073
|
class: "absolute -top-0.5 -right-0.5 min-w-4 rounded-full bg-status-danger-solid px-1 text-center text-3xs leading-4 font-semibold text-white"
|
|
1062
|
-
},
|
|
1074
|
+
}, Hn = /* @__PURE__ */ M({
|
|
1063
1075
|
__name: "HeaderAction",
|
|
1064
1076
|
props: {
|
|
1065
1077
|
label: {},
|
|
@@ -1069,95 +1081,95 @@ const bn = {
|
|
|
1069
1081
|
},
|
|
1070
1082
|
emits: ["click"],
|
|
1071
1083
|
setup(e, { emit: a }) {
|
|
1072
|
-
const t = a, o = be(ce, "bar"), i =
|
|
1073
|
-
return (s, u) => (
|
|
1084
|
+
const t = a, o = be(ce, "bar"), i = C(() => o === "rail");
|
|
1085
|
+
return (s, u) => (r(), T(he(e.to ? n(oe) : "button"), K(e.to ? { to: e.to } : { type: "button" }, {
|
|
1074
1086
|
"aria-label": e.label,
|
|
1075
1087
|
"data-header-action": "",
|
|
1076
1088
|
class: ["hit-target relative flex shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", i.value ? "size-9 text-gray-300 hover:bg-white/10 hover:text-white" : "size-8 text-content-link active:bg-tint-soft"],
|
|
1077
|
-
onClick: u[0] || (u[0] = (
|
|
1089
|
+
onClick: u[0] || (u[0] = (f) => t("click"))
|
|
1078
1090
|
}), {
|
|
1079
1091
|
default: I(() => [
|
|
1080
1092
|
h(n(R), {
|
|
1081
1093
|
name: e.icon,
|
|
1082
1094
|
size: i.value ? 20 : 18
|
|
1083
1095
|
}, null, 8, ["name", "size"]),
|
|
1084
|
-
e.badge === "dot" ? (
|
|
1096
|
+
e.badge === "dot" ? (r(), p("span", {
|
|
1085
1097
|
key: 0,
|
|
1086
1098
|
"aria-hidden": "true",
|
|
1087
1099
|
"data-header-action-badge": "",
|
|
1088
1100
|
class: y(["absolute top-1 right-1 size-2.5 rounded-full bg-status-danger-solid ring-2", i.value ? "ring-anchor-900" : "ring-surface-page"])
|
|
1089
|
-
}, null, 2)) : e.badge !== void 0 ? (
|
|
1101
|
+
}, null, 2)) : e.badge !== void 0 ? (r(), p("span", yn, O(e.badge), 1)) : L("", !0)
|
|
1090
1102
|
]),
|
|
1091
1103
|
_: 1
|
|
1092
1104
|
}, 16, ["aria-label", "class"]));
|
|
1093
1105
|
}
|
|
1094
|
-
}),
|
|
1095
|
-
function
|
|
1106
|
+
}), xn = 1e3, Z = (e) => e.path.split("/").filter(Boolean).length;
|
|
1107
|
+
function wn(e) {
|
|
1096
1108
|
if (typeof document > "u" || typeof document.startViewTransition != "function") return () => {
|
|
1097
1109
|
};
|
|
1098
1110
|
let a = null;
|
|
1099
|
-
const t = () => window.matchMedia("(max-width: 1023px)").matches && !window.matchMedia("(prefers-reduced-motion: reduce)").matches && !document.body.classList.contains(
|
|
1100
|
-
if (i(), !
|
|
1101
|
-
const v = Z(
|
|
1111
|
+
const t = () => window.matchMedia("(max-width: 1023px)").matches && !window.matchMedia("(prefers-reduced-motion: reduce)").matches && !document.body.classList.contains(tt), o = e.beforeResolve((f, c) => {
|
|
1112
|
+
if (i(), !c.matched.length || f.path === c.path || !t()) return;
|
|
1113
|
+
const v = Z(f) > Z(c) ? "forward" : Z(f) < Z(c) ? "back" : null;
|
|
1102
1114
|
if (!v) return;
|
|
1103
1115
|
const b = document.documentElement;
|
|
1104
|
-
return b.dataset.navDirection = v, new Promise((
|
|
1105
|
-
const
|
|
1106
|
-
() => new Promise((
|
|
1107
|
-
const
|
|
1116
|
+
return b.dataset.navDirection = v, new Promise((w) => {
|
|
1117
|
+
const _ = document.startViewTransition(
|
|
1118
|
+
() => new Promise((S) => {
|
|
1119
|
+
const $ = setTimeout(S, xn);
|
|
1108
1120
|
a = () => {
|
|
1109
|
-
clearTimeout(
|
|
1110
|
-
},
|
|
1121
|
+
clearTimeout($), S();
|
|
1122
|
+
}, w();
|
|
1111
1123
|
})
|
|
1112
1124
|
);
|
|
1113
|
-
|
|
1114
|
-
}),
|
|
1125
|
+
_.ready.catch(() => {
|
|
1126
|
+
}), _.finished.catch(() => {
|
|
1115
1127
|
}).finally(() => {
|
|
1116
1128
|
b.dataset.navDirection === v && delete b.dataset.navDirection;
|
|
1117
1129
|
});
|
|
1118
1130
|
});
|
|
1119
1131
|
});
|
|
1120
1132
|
function i() {
|
|
1121
|
-
const
|
|
1122
|
-
a = null,
|
|
1133
|
+
const f = a;
|
|
1134
|
+
a = null, f && ye().then(f);
|
|
1123
1135
|
}
|
|
1124
1136
|
const s = e.afterEach(i), u = e.onError(i);
|
|
1125
1137
|
return () => {
|
|
1126
1138
|
o(), s(), u(), delete document.documentElement.dataset.navDirection, a?.(), a = null;
|
|
1127
1139
|
};
|
|
1128
1140
|
}
|
|
1129
|
-
const
|
|
1141
|
+
const kn = M({
|
|
1130
1142
|
name: "ViewTransitions",
|
|
1131
1143
|
setup() {
|
|
1132
|
-
return le(
|
|
1144
|
+
return le(wn(re())), () => null;
|
|
1133
1145
|
}
|
|
1134
1146
|
});
|
|
1135
|
-
function
|
|
1147
|
+
function Gn() {
|
|
1136
1148
|
return ke({
|
|
1137
1149
|
id: "vue-core.view-transitions",
|
|
1138
|
-
contributions: [{ id: "vue-core.view-transitions", slot: "host", component:
|
|
1150
|
+
contributions: [{ id: "vue-core.view-transitions", slot: "host", component: kn, scope: "always" }]
|
|
1139
1151
|
});
|
|
1140
1152
|
}
|
|
1141
1153
|
export {
|
|
1142
|
-
|
|
1154
|
+
mt as AccountMenu,
|
|
1143
1155
|
me as AccountMenuItem,
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1156
|
+
vt as AccountSheet,
|
|
1157
|
+
fn as BackofficeShell,
|
|
1158
|
+
Hn as HeaderAction,
|
|
1159
|
+
Et as NavigationDrawer,
|
|
1160
|
+
Ee as NavigationList,
|
|
1161
|
+
Xt as NavigationMenuButton,
|
|
1150
1162
|
ue as ShellBrand,
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
+
Ot as ShellSidebar,
|
|
1164
|
+
Kt as ShellStage,
|
|
1165
|
+
an as ShellTopBar,
|
|
1166
|
+
qn as appUpdates,
|
|
1167
|
+
Yn as backofficeShell,
|
|
1168
|
+
mn as createNavigationProgress,
|
|
1169
|
+
on as defaultIdentity,
|
|
1170
|
+
ht as groupNavigation,
|
|
1171
|
+
wn as installViewTransitions,
|
|
1172
|
+
Ft as useNavigationDrawer,
|
|
1173
|
+
sn as useShellIdentity,
|
|
1174
|
+
Gn as viewTransitions
|
|
1163
1175
|
};
|