@ac-design/design-system 2.1.1 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +89 -88
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +74 -73
- package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +151 -150
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +373 -372
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +56 -55
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +39 -38
- package/dist/lib/components/AcModal.vue.d.ts +10 -1
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +59 -39
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +90 -89
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +146 -145
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +156 -155
- package/dist/lib/components/AcTooltip.vue.d.ts +1 -1
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +73 -72
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +132 -131
- package/dist/lib/components/fixedFrame.d.ts +11 -0
- package/dist/lib/components/fixedFrame.js +24 -0
- package/package.json +1 -1
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { fixedFrame as e } from "./fixedFrame.js";
|
|
2
|
+
import t from "./AcAvatar.js";
|
|
3
|
+
import n from "./AcFontScale.js";
|
|
4
|
+
import r from "./AcThemeMode.js";
|
|
5
|
+
import { Fragment as i, Teleport as a, Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as ee, mergeModels as h, mergeProps as te, nextTick as g, normalizeClass as _, normalizeStyle as ne, onBeforeUnmount as re, openBlock as v, ref as y, renderList as b, renderSlot as ie, resolveDynamicComponent as x, toDisplayString as S, unref as C, useId as ae, useModel as w, watch as T, withCtx as E } from "vue";
|
|
6
|
+
import { Building2 as oe, Check as se, ChevronDown as ce, LogOut as le } from "@lucide/vue";
|
|
6
7
|
//#region src/lib/components/AcUserMenu.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var ue = {
|
|
8
9
|
class: "inline-flex",
|
|
9
10
|
"data-ac-ds": "",
|
|
10
11
|
"data-testid": "ac-user-menu"
|
|
11
|
-
},
|
|
12
|
+
}, de = [
|
|
12
13
|
"aria-expanded",
|
|
13
14
|
"aria-controls",
|
|
14
15
|
"aria-label"
|
|
15
|
-
],
|
|
16
|
+
], fe = {
|
|
16
17
|
key: 0,
|
|
17
18
|
class: "hidden max-w-36 truncate text-base font-medium text-heading md:block"
|
|
18
|
-
},
|
|
19
|
+
}, pe = {
|
|
19
20
|
class: "inline-flex size-9 shrink-0 rounded-full bg-linear-to-r from-primary/70 to-primary/90 p-0.5",
|
|
20
21
|
"aria-hidden": "true"
|
|
21
|
-
},
|
|
22
|
+
}, me = { class: "inline-flex size-full items-center justify-center overflow-hidden rounded-full bg-surface text-xs font-semibold text-primary-strong" }, he = ["src"], ge = {
|
|
22
23
|
class: "inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary/10 text-base font-semibold text-primary-strong ring-1 ring-primary/25 ring-inset",
|
|
23
24
|
"aria-hidden": "true"
|
|
24
|
-
},
|
|
25
|
+
}, _e = ["src"], ve = { class: "min-w-0 flex-1" }, ye = { class: "block truncate text-base font-medium text-heading" }, be = {
|
|
25
26
|
key: 0,
|
|
26
27
|
class: "block truncate text-xs text-muted"
|
|
27
|
-
},
|
|
28
|
+
}, xe = ["aria-labelledby"], Se = ["id"], Ce = { class: "flex flex-col gap-1" }, we = ["aria-checked", "onClick"], Te = { class: "flex min-w-0 items-center gap-2" }, Ee = { class: "min-w-0" }, D = { class: "block truncate font-medium text-heading" }, De = { class: "block truncate text-xs text-muted" }, Oe = ["aria-labelledby"], ke = ["id"], Ae = ["aria-labelledby"], je = ["id"], Me = {
|
|
28
29
|
role: "group",
|
|
29
30
|
class: "mt-1 flex flex-col border-t border-border py-1"
|
|
30
|
-
},
|
|
31
|
+
}, O = { class: "min-w-0 flex-1 truncate" }, k = "flex min-h-10 w-full cursor-pointer items-center gap-2 rounded-8 px-4 py-2.5 text-left text-base font-medium no-underline outline-none transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", Ne = "[role=\"menuitem\"]:not([aria-disabled=\"true\"]), [role=\"menuitemradio\"], [role=\"radio\"]", A = /*@__PURE__*/ m({
|
|
31
32
|
__name: "AcUserMenu",
|
|
32
33
|
props: /*@__PURE__*/ h({
|
|
33
34
|
name: {},
|
|
@@ -66,146 +67,146 @@ var le = {
|
|
|
66
67
|
"set:theme",
|
|
67
68
|
"switch-workspace"
|
|
68
69
|
], ["update:open", "update:workspace"]),
|
|
69
|
-
setup(
|
|
70
|
-
let
|
|
70
|
+
setup(m, { emit: h }) {
|
|
71
|
+
let A = m, j = w(m, "open"), M = w(m, "workspace"), N = h, P = `${k} text-heading [&>svg]:text-muted`, Pe = `${k} text-danger-strong`, F = ee()?.appContext.components.RouterLink, I = ae(), L = `${I}-trigger`, R = `${I}-menu`, z = y(null), B = y(null), V = y(!1), H = y({
|
|
71
72
|
top: 0,
|
|
72
73
|
right: 0
|
|
73
|
-
}),
|
|
74
|
-
let e =
|
|
74
|
+
}), U = s(() => {
|
|
75
|
+
let e = A.name.trim().split(/[\s._-]+/).filter(Boolean);
|
|
75
76
|
return e.length ? (e[0].charAt(0) + (e.length > 1 ? e[e.length - 1].charAt(0) : "")).toUpperCase() : "?";
|
|
76
|
-
}),
|
|
77
|
-
function
|
|
78
|
-
return e.to &&
|
|
77
|
+
}), W = s(() => !!A.avatarUrl && !V.value);
|
|
78
|
+
function G(e) {
|
|
79
|
+
return e.to && F && !e.disabled ? F : e.to || e.href ? "a" : "button";
|
|
79
80
|
}
|
|
80
81
|
function Fe(e) {
|
|
81
|
-
let t =
|
|
82
|
-
return t ===
|
|
82
|
+
let t = G(e);
|
|
83
|
+
return t === F ? { to: e.to } : t === "a" ? e.disabled ? { "aria-disabled": "true" } : { href: e.href ?? (typeof e.to == "string" ? e.to : void 0) } : {
|
|
83
84
|
type: "button",
|
|
84
85
|
"aria-disabled": e.disabled ? "true" : void 0
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
return [...
|
|
88
|
+
function K() {
|
|
89
|
+
return [...B.value?.querySelectorAll(Ne) ?? []];
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
-
let t =
|
|
91
|
+
function q(e) {
|
|
92
|
+
let t = K();
|
|
92
93
|
t.length && t[(e + t.length) % t.length].focus();
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
let
|
|
96
|
-
if (!
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
bottom:
|
|
100
|
-
right:
|
|
95
|
+
function J() {
|
|
96
|
+
let t = z.value;
|
|
97
|
+
if (!t) return;
|
|
98
|
+
let n = t.getBoundingClientRect(), r = e(), i = B.value?.offsetHeight ?? 320, a = B.value?.offsetWidth ?? 256, o = Math.max(8, Math.min(r.right - n.right, r.width - a - 8)), s = r.bottom - n.bottom - 6 - 8;
|
|
99
|
+
H.value = s < i && n.top - r.top > s ? {
|
|
100
|
+
bottom: r.bottom - n.top + 6,
|
|
101
|
+
right: o
|
|
101
102
|
} : {
|
|
102
|
-
top:
|
|
103
|
-
right:
|
|
103
|
+
top: n.bottom + 6 - r.top,
|
|
104
|
+
right: o
|
|
104
105
|
};
|
|
105
106
|
}
|
|
106
|
-
async function
|
|
107
|
-
|
|
107
|
+
async function Y(e = "first") {
|
|
108
|
+
j.value = !0, await g(), J(), q(e === "first" ? 0 : -1);
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
-
|
|
110
|
+
function X(e = !0) {
|
|
111
|
+
j.value && (j.value = !1, e && z.value?.focus());
|
|
111
112
|
}
|
|
112
113
|
function Ie(e) {
|
|
113
114
|
[
|
|
114
115
|
"Enter",
|
|
115
116
|
" ",
|
|
116
117
|
"ArrowDown"
|
|
117
|
-
].includes(e.key) ? (e.preventDefault(),
|
|
118
|
-
}
|
|
119
|
-
function X(e) {
|
|
120
|
-
let t = G().indexOf(document.activeElement);
|
|
121
|
-
e.key === "ArrowDown" ? (e.preventDefault(), K(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), K(t - 1)) : e.key === "Home" ? (e.preventDefault(), K(0)) : e.key === "End" ? (e.preventDefault(), K(-1)) : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), Y()) : e.key === "Tab" && Y();
|
|
118
|
+
].includes(e.key) ? (e.preventDefault(), Y("first")) : e.key === "ArrowUp" && (e.preventDefault(), Y("last"));
|
|
122
119
|
}
|
|
123
120
|
function Le(e) {
|
|
124
|
-
|
|
121
|
+
let t = K().indexOf(document.activeElement);
|
|
122
|
+
e.key === "ArrowDown" ? (e.preventDefault(), q(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), q(t - 1)) : e.key === "Home" ? (e.preventDefault(), q(0)) : e.key === "End" ? (e.preventDefault(), q(-1)) : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), X()) : e.key === "Tab" && X();
|
|
125
123
|
}
|
|
126
124
|
function Re(e) {
|
|
127
|
-
e.
|
|
125
|
+
e.disabled || (N("select", e), X());
|
|
126
|
+
}
|
|
127
|
+
function ze(e) {
|
|
128
|
+
e.name !== M.value && (M.value = e.name, N("switch-workspace", e)), X();
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
130
|
+
function Be() {
|
|
131
|
+
N("logout"), X(!1);
|
|
131
132
|
}
|
|
132
133
|
function Z(e) {
|
|
133
134
|
let t = e.target;
|
|
134
|
-
|
|
135
|
+
z.value?.contains(t) || B.value?.contains(t) || X(!1);
|
|
135
136
|
}
|
|
136
137
|
function Q() {
|
|
137
|
-
|
|
138
|
+
J();
|
|
138
139
|
}
|
|
139
140
|
function $() {
|
|
140
141
|
document.removeEventListener("pointerdown", Z, !0), window.removeEventListener("scroll", Q, !0), window.removeEventListener("resize", Q);
|
|
141
142
|
}
|
|
142
|
-
return T(
|
|
143
|
+
return T(j, (e) => {
|
|
143
144
|
if (!e) return $();
|
|
144
|
-
document.addEventListener("pointerdown", Z, !0), window.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q), g(
|
|
145
|
-
}), T(() =>
|
|
146
|
-
id:
|
|
145
|
+
document.addEventListener("pointerdown", Z, !0), window.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q), g(J);
|
|
146
|
+
}), T(() => A.avatarUrl, () => V.value = !1), re($), (e, s) => (v(), u("div", ue, [d("button", {
|
|
147
|
+
id: L,
|
|
147
148
|
ref_key: "trigger",
|
|
148
|
-
ref:
|
|
149
|
+
ref: z,
|
|
149
150
|
type: "button",
|
|
150
151
|
"aria-haspopup": "menu",
|
|
151
|
-
"aria-expanded":
|
|
152
|
-
"aria-controls":
|
|
153
|
-
"aria-label": `${
|
|
154
|
-
class: _(["group inline-flex shrink-0 cursor-pointer items-center gap-2 rounded-10 border border-transparent p-2 transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface", [
|
|
152
|
+
"aria-expanded": j.value,
|
|
153
|
+
"aria-controls": j.value ? R : void 0,
|
|
154
|
+
"aria-label": `${m.name}, account menu`,
|
|
155
|
+
class: _(["group inline-flex shrink-0 cursor-pointer items-center gap-2 rounded-10 border border-transparent p-2 transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface", [m.showName && "md:px-4", j.value && "border-border bg-surface-sunken/50"]]),
|
|
155
156
|
"data-ac-ds": "",
|
|
156
157
|
"data-testid": "ac-user-menu-trigger",
|
|
157
|
-
onClick:
|
|
158
|
+
onClick: s[1] ||= (e) => j.value ? X() : Y(),
|
|
158
159
|
onKeydown: Ie
|
|
159
160
|
}, [
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
m.showName ? (v(), u("span", fe, S(m.name), 1)) : l("", !0),
|
|
162
|
+
d("span", pe, [d("span", me, [W.value ? (v(), u("img", {
|
|
162
163
|
key: 0,
|
|
163
|
-
src:
|
|
164
|
+
src: m.avatarUrl,
|
|
164
165
|
alt: "",
|
|
165
166
|
class: "size-full object-cover",
|
|
166
|
-
onError:
|
|
167
|
-
}, null, 40,
|
|
168
|
-
|
|
167
|
+
onError: s[0] ||= (e) => V.value = !0
|
|
168
|
+
}, null, 40, he)) : (v(), u(i, { key: 1 }, [f(S(U.value), 1)], 64))])]),
|
|
169
|
+
m.showName ? (v(), c(C(ce), {
|
|
169
170
|
key: 1,
|
|
170
|
-
class: _(["hidden size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none sm:block",
|
|
171
|
+
class: _(["hidden size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none sm:block", j.value && "rotate-180"]),
|
|
171
172
|
"aria-hidden": "true"
|
|
172
|
-
}, null, 8, ["class"])) :
|
|
173
|
-
], 42,
|
|
173
|
+
}, null, 8, ["class"])) : l("", !0)
|
|
174
|
+
], 42, de), (v(), c(a, { to: "body" }, [p(o, {
|
|
174
175
|
"enter-active-class": "transition duration-150 ease-out motion-reduce:transition-none",
|
|
175
176
|
"enter-from-class": "opacity-0 scale-95",
|
|
176
177
|
"leave-active-class": "transition duration-100 ease-in",
|
|
177
178
|
"leave-to-class": "opacity-0"
|
|
178
179
|
}, {
|
|
179
|
-
default: E(() => [
|
|
180
|
+
default: E(() => [j.value ? (v(), u("div", {
|
|
180
181
|
key: 0,
|
|
181
|
-
id:
|
|
182
|
+
id: R,
|
|
182
183
|
ref_key: "panel",
|
|
183
|
-
ref:
|
|
184
|
+
ref: B,
|
|
184
185
|
role: "menu",
|
|
185
|
-
"aria-labelledby":
|
|
186
|
+
"aria-labelledby": L,
|
|
186
187
|
class: "fixed z-[90] w-64 max-w-[calc(100vw-16px)] origin-top-right overflow-hidden rounded-14 border border-border/80 bg-surface p-1 shadow-lg",
|
|
187
|
-
style:
|
|
188
|
-
top:
|
|
189
|
-
bottom:
|
|
190
|
-
right: `${
|
|
188
|
+
style: ne({
|
|
189
|
+
top: H.value.top === void 0 ? void 0 : `${H.value.top}px`,
|
|
190
|
+
bottom: H.value.bottom === void 0 ? void 0 : `${H.value.bottom}px`,
|
|
191
|
+
right: `${H.value.right}px`
|
|
191
192
|
}),
|
|
192
193
|
"data-ac-ds": "",
|
|
193
194
|
"data-testid": "ac-user-menu-panel",
|
|
194
|
-
onKeydown:
|
|
195
|
+
onKeydown: Le
|
|
195
196
|
}, [
|
|
196
|
-
(v(),
|
|
197
|
-
href:
|
|
198
|
-
role:
|
|
199
|
-
tabindex:
|
|
200
|
-
class: _(["flex items-center gap-3 rounded-8 px-3 py-2.5 no-underline outline-none",
|
|
197
|
+
(v(), c(x(m.profileUrl ? "a" : "div"), {
|
|
198
|
+
href: m.profileUrl || void 0,
|
|
199
|
+
role: m.profileUrl ? "menuitem" : "presentation",
|
|
200
|
+
tabindex: m.profileUrl ? -1 : void 0,
|
|
201
|
+
class: _(["flex items-center gap-3 rounded-8 px-3 py-2.5 no-underline outline-none", m.profileUrl && "transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"])
|
|
201
202
|
}, {
|
|
202
|
-
default: E(() => [
|
|
203
|
+
default: E(() => [d("span", ge, [W.value ? (v(), u("img", {
|
|
203
204
|
key: 0,
|
|
204
|
-
src:
|
|
205
|
+
src: m.avatarUrl,
|
|
205
206
|
alt: "",
|
|
206
207
|
class: "size-full object-cover",
|
|
207
|
-
onError:
|
|
208
|
-
}, null, 40,
|
|
208
|
+
onError: s[2] ||= (e) => V.value = !0
|
|
209
|
+
}, null, 40, _e)) : (v(), u(i, { key: 1 }, [f(S(U.value), 1)], 64))]), d("span", ve, [d("span", ye, S(m.name), 1), m.email ? (v(), u("span", be, S(m.email), 1)) : l("", !0)])]),
|
|
209
210
|
_: 1
|
|
210
211
|
}, 8, [
|
|
211
212
|
"href",
|
|
@@ -213,97 +214,97 @@ var le = {
|
|
|
213
214
|
"tabindex",
|
|
214
215
|
"class"
|
|
215
216
|
])),
|
|
216
|
-
|
|
217
|
+
m.workspaces.length ? (v(), u("div", {
|
|
217
218
|
key: 0,
|
|
218
219
|
role: "group",
|
|
219
|
-
"aria-labelledby": `${C(
|
|
220
|
+
"aria-labelledby": `${C(I)}-workspaces`,
|
|
220
221
|
class: "mt-1 border-t border-border px-3 py-2"
|
|
221
|
-
}, [
|
|
222
|
-
id: `${C(
|
|
222
|
+
}, [d("p", {
|
|
223
|
+
id: `${C(I)}-workspaces`,
|
|
223
224
|
class: "mb-2 flex items-center gap-2 text-xs font-semibold tracking-wide text-muted uppercase"
|
|
224
|
-
}, [
|
|
225
|
+
}, [p(C(oe), {
|
|
225
226
|
class: "size-4",
|
|
226
227
|
"aria-hidden": "true"
|
|
227
|
-
}),
|
|
228
|
-
key:
|
|
228
|
+
}), f(" " + S(m.workspacesLabel), 1)], 8, Se), d("div", Ce, [(v(!0), u(i, null, b(m.workspaces, (e) => (v(), u("button", {
|
|
229
|
+
key: e.name,
|
|
229
230
|
type: "button",
|
|
230
231
|
role: "menuitemradio",
|
|
231
232
|
tabindex: "-1",
|
|
232
|
-
"aria-checked":
|
|
233
|
-
class: _(["flex w-full cursor-pointer items-center justify-between gap-2 rounded-8 px-2 py-2 text-left text-base outline-none transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
233
|
+
"aria-checked": e.name === M.value,
|
|
234
|
+
class: _(["flex w-full cursor-pointer items-center justify-between gap-2 rounded-8 px-2 py-2 text-left text-base outline-none transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", e.name === M.value && "bg-surface-sunken/50"]),
|
|
234
235
|
"data-ac-ds": "",
|
|
235
236
|
"data-testid": "ac-user-menu-workspace",
|
|
236
|
-
onClick: (
|
|
237
|
-
}, [
|
|
238
|
-
name:
|
|
239
|
-
"img-url":
|
|
240
|
-
kind:
|
|
237
|
+
onClick: (t) => ze(e)
|
|
238
|
+
}, [d("span", Te, [p(t, {
|
|
239
|
+
name: e.displayName || e.name,
|
|
240
|
+
"img-url": e.avatarUrl,
|
|
241
|
+
kind: e.type === "user" ? "person" : "organization",
|
|
241
242
|
alt: ""
|
|
242
243
|
}, null, 8, [
|
|
243
244
|
"name",
|
|
244
245
|
"img-url",
|
|
245
246
|
"kind"
|
|
246
|
-
]),
|
|
247
|
+
]), d("span", Ee, [d("span", D, S(e.displayName || e.name), 1), d("span", De, [f(S(e.name), 1), e.type === "user" ? (v(), u(i, { key: 0 }, [f(" (Personal)")], 64)) : l("", !0)])])]), e.name === M.value ? (v(), c(C(se), {
|
|
247
248
|
key: 0,
|
|
248
249
|
class: "size-4 shrink-0 text-primary",
|
|
249
250
|
"aria-hidden": "true"
|
|
250
|
-
})) :
|
|
251
|
-
|
|
251
|
+
})) : l("", !0)], 10, we))), 128))])], 8, xe)) : l("", !0),
|
|
252
|
+
m.showThemeMode ? (v(), u("div", {
|
|
252
253
|
key: 1,
|
|
253
254
|
role: "group",
|
|
254
|
-
"aria-labelledby": `${C(
|
|
255
|
+
"aria-labelledby": `${C(I)}-theme`,
|
|
255
256
|
class: "mt-1 border-t border-border px-1 pt-2 pb-1"
|
|
256
|
-
}, [
|
|
257
|
-
id: `${C(
|
|
257
|
+
}, [d("p", {
|
|
258
|
+
id: `${C(I)}-theme`,
|
|
258
259
|
class: "mb-2 px-2 text-sm font-semibold tracking-[0.08em] text-muted uppercase"
|
|
259
|
-
}, "Theme", 8,
|
|
260
|
+
}, "Theme", 8, ke), p(r, {
|
|
260
261
|
display: "labels",
|
|
261
|
-
"onSet:theme":
|
|
262
|
-
})], 8,
|
|
263
|
-
|
|
262
|
+
"onSet:theme": s[3] ||= (e) => N("set:theme", e)
|
|
263
|
+
})], 8, Oe)) : l("", !0),
|
|
264
|
+
m.showFontScale ? (v(), u("div", {
|
|
264
265
|
key: 2,
|
|
265
266
|
role: "group",
|
|
266
|
-
"aria-labelledby": `${C(
|
|
267
|
+
"aria-labelledby": `${C(I)}-scale`,
|
|
267
268
|
class: "mt-1 border-t border-border px-1 pt-2 pb-1"
|
|
268
|
-
}, [
|
|
269
|
-
id: `${C(
|
|
269
|
+
}, [d("p", {
|
|
270
|
+
id: `${C(I)}-scale`,
|
|
270
271
|
class: "mb-2 px-2 text-sm font-semibold tracking-[0.08em] text-muted uppercase"
|
|
271
|
-
}, "Text size", 8,
|
|
272
|
-
|
|
273
|
-
(v(!0),
|
|
272
|
+
}, "Text size", 8, je), p(n, { display: "labels" })], 8, Ae)) : l("", !0),
|
|
273
|
+
d("div", Me, [
|
|
274
|
+
(v(!0), u(i, null, b(m.items, (e) => (v(), c(x(G(e)), te({ key: e.label }, { ref_for: !0 }, Fe(e), {
|
|
274
275
|
role: "menuitem",
|
|
275
276
|
tabindex: "-1",
|
|
276
|
-
class:
|
|
277
|
-
onClick: (t) =>
|
|
277
|
+
class: P,
|
|
278
|
+
onClick: (t) => Re(e)
|
|
278
279
|
}), {
|
|
279
|
-
default: E(() => [e.icon ? (v(),
|
|
280
|
+
default: E(() => [e.icon ? (v(), c(x(e.icon), {
|
|
280
281
|
key: 0,
|
|
281
282
|
"aria-hidden": "true"
|
|
282
|
-
})) :
|
|
283
|
+
})) : l("", !0), d("span", O, S(e.label), 1)]),
|
|
283
284
|
_: 2
|
|
284
285
|
}, 1040, ["onClick"]))), 128)),
|
|
285
|
-
|
|
286
|
-
close:
|
|
287
|
-
itemClass:
|
|
286
|
+
ie(e.$slots, "default", {
|
|
287
|
+
close: X,
|
|
288
|
+
itemClass: P
|
|
288
289
|
}),
|
|
289
|
-
(v(),
|
|
290
|
-
href:
|
|
291
|
-
type:
|
|
290
|
+
(v(), c(x(m.logoutUrl ? "a" : "button"), {
|
|
291
|
+
href: m.logoutUrl || void 0,
|
|
292
|
+
type: m.logoutUrl ? void 0 : "button",
|
|
292
293
|
role: "menuitem",
|
|
293
294
|
tabindex: "-1",
|
|
294
295
|
class: _(Pe),
|
|
295
296
|
"data-ac-ds": "",
|
|
296
297
|
"data-testid": "ac-user-menu-logout",
|
|
297
|
-
onClick:
|
|
298
|
+
onClick: Be
|
|
298
299
|
}, {
|
|
299
|
-
default: E(() => [
|
|
300
|
+
default: E(() => [p(C(le), { "aria-hidden": "true" }), d("span", null, S(m.logoutLabel), 1)]),
|
|
300
301
|
_: 1
|
|
301
302
|
}, 8, ["href", "type"]))
|
|
302
303
|
])
|
|
303
|
-
], 36)) :
|
|
304
|
+
], 36)) : l("", !0)]),
|
|
304
305
|
_: 3
|
|
305
306
|
})]))]));
|
|
306
307
|
}
|
|
307
308
|
});
|
|
308
309
|
//#endregion
|
|
309
|
-
export {
|
|
310
|
+
export { A as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The box `position: fixed` offsets are measured from, in viewport px. Matches the viewport when there's no gutter. */
|
|
2
|
+
export interface FixedFrame {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
right: number;
|
|
6
|
+
bottom: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
/** Measures the fixed containing block with a hidden probe. Call it once per positioning pass. */
|
|
11
|
+
export declare function fixedFrame(): FixedFrame;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/lib/components/fixedFrame.ts
|
|
2
|
+
function e() {
|
|
3
|
+
if (typeof document > "u") return {
|
|
4
|
+
left: 0,
|
|
5
|
+
top: 0,
|
|
6
|
+
right: 0,
|
|
7
|
+
bottom: 0,
|
|
8
|
+
width: 0,
|
|
9
|
+
height: 0
|
|
10
|
+
};
|
|
11
|
+
let e = document.createElement("div");
|
|
12
|
+
e.style.cssText = "position:fixed;inset:0;visibility:hidden;pointer-events:none", document.body.appendChild(e);
|
|
13
|
+
let { left: t, top: n, right: r, bottom: i, width: a, height: o } = e.getBoundingClientRect();
|
|
14
|
+
return e.remove(), {
|
|
15
|
+
left: t,
|
|
16
|
+
top: n,
|
|
17
|
+
right: r,
|
|
18
|
+
bottom: i,
|
|
19
|
+
width: a,
|
|
20
|
+
height: o
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { e as fixedFrame };
|