@glimstone/vue 0.0.0-stage → 4.0.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 +51 -2
- package/dist/Badge.vue.d.ts +49 -0
- package/dist/BrandMark.vue.d.ts +6 -0
- package/dist/Button.vue.d.ts +43 -0
- package/dist/Card.vue.d.ts +25 -0
- package/dist/Combobox.js +70 -0
- package/dist/Combobox.vue.d.ts +27 -0
- package/dist/ConfirmDialog.vue.d.ts +37 -0
- package/dist/EmptyState.vue.d.ts +28 -0
- package/dist/IconTipButton.vue.d.ts +24 -0
- package/dist/InfoAboutCard.vue.d.ts +4 -0
- package/dist/InfoBubble.vue.d.ts +9 -0
- package/dist/InfoHelpCard.vue.d.ts +6 -0
- package/dist/InfoTile.vue.d.ts +22 -0
- package/dist/InfoVersionCard.vue.d.ts +15 -0
- package/dist/ListSelect.vue.d.ts +37 -0
- package/dist/MenuChoice.vue.d.ts +27 -0
- package/dist/MenuSelect.vue.d.ts +37 -0
- package/dist/MenuSubmenu.vue.d.ts +31 -0
- package/dist/NumberField.vue.d.ts +10 -0
- package/dist/ReadmeButton.vue.d.ts +33 -0
- package/dist/Select.js +444 -0
- package/dist/Select.vue.d.ts +50 -0
- package/dist/SelectFace.vue.d.ts +26 -0
- package/dist/Selector.vue.d.ts +55 -0
- package/dist/SelectorSegment.vue.d.ts +28 -0
- package/dist/SidebarRow.vue.d.ts +22 -0
- package/dist/Slider.js +36 -0
- package/dist/Slider.vue.d.ts +23 -0
- package/dist/SubCard.vue.d.ts +21 -0
- package/dist/TipBubble.vue.d.ts +7 -0
- package/dist/TipWrap-rNAEgvb0.js +51 -0
- package/dist/TipWrap.d.ts +11 -0
- package/dist/ToastViewport.vue.d.ts +25 -0
- package/dist/Toggle.vue.d.ts +21 -0
- package/dist/UnavailableNotice.vue.d.ts +20 -0
- package/dist/confirm.d.ts +20 -0
- package/dist/engines.d.ts +12 -0
- package/dist/entries/combobox.d.ts +1 -0
- package/dist/entries/select.d.ts +1 -0
- package/dist/entries/slider.d.ts +1 -0
- package/dist/glyphs-CvCRgBMU.js +27 -0
- package/dist/glyphs.d.ts +21 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +1301 -0
- package/dist/info.d.ts +71 -0
- package/dist/selectParts.d.ts +25 -0
- package/dist/selectorItem.d.ts +19 -0
- package/dist/tipBubble.d.ts +16 -0
- package/package.json +47 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,1301 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./TipWrap-rNAEgvb0.js";
|
|
2
|
+
import { a as r, c as i, i as a, l as o, n as s, o as c, r as l, s as u, t as d, u as f } from "./glyphs-CvCRgBMU.js";
|
|
3
|
+
import { Fragment as p, Teleport as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, h as w, mergeModels as ee, mergeProps as T, normalizeClass as E, normalizeStyle as D, onBeforeUnmount as te, onMounted as ne, onScopeDispose as O, openBlock as k, ref as re, renderList as A, renderSlot as j, resolveDynamicComponent as M, shallowRef as N, toDisplayString as P, unref as F, useAttrs as ie, useId as ae, useModel as I, useSlots as oe, watch as L, withCtx as R, withKeys as se, withModifiers as z } from "vue";
|
|
4
|
+
import { DEFAULT_MOTION as ce, DEFAULT_SHAPE as le, DESKTOP_QUERY as ue, GLIMSTONE_VERSION as de, MARKS as fe, TOAST_MARKS as pe, WIDE_QUERY as me, applyAccent as he, applyMotion as ge, applyRainbow as _e, applyShape as ve, attachNumberSteppers as ye, badgeClassName as be, buttonView as xe, countSelector as Se, focusedAsker as Ce, getLabelMode as B, hueVars as V, keepReadmeFit as we, labelModeChanged as Te, mailHref as Ee, mediaMatches as H, offersMail as De, openInBrowser as U, rainbowState as Oe, readmePartClass as ke, readmeSoon as Ae, readmeUnitClass as je, returnFocus as Me, roveSelector as Ne, rovedIndex as Pe, runUpdateCheck as Fe, segmentView as Ie, selectorAxis as Le, selectorFlex as Re, selectorTabId as ze, selectorTabId as Be, selectorView as Ve, setLabelMode as He, sidebarRowView as Ue, subscribeLabelMode as We, subscribeMedia as Ge, subscribeRainbow as Ke, syncNumberSteppers as qe, takePageHue as W, toggleSelection as Je, trapDialogKeys as Ye, updateFace as Xe, updateStage as Ze, versionLink as G, watchSelectorFit as Qe, watchSelectorRows as $e } from "@glimstone/core";
|
|
5
|
+
// src/IconTipButton.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var et = [
|
|
7
|
+
"type",
|
|
8
|
+
"disabled",
|
|
9
|
+
"aria-label",
|
|
10
|
+
"aria-describedby"
|
|
11
|
+
], tt = /* @__PURE__ */ C({
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "IconTipButton",
|
|
14
|
+
props: {
|
|
15
|
+
tip: {},
|
|
16
|
+
disabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
type: { default: "button" }
|
|
21
|
+
},
|
|
22
|
+
setup(r) {
|
|
23
|
+
let i = r, a = t(() => i.tip, () => i.disabled);
|
|
24
|
+
return (t, i) => (k(), v(p, null, [S(F(n), {
|
|
25
|
+
on: r.disabled,
|
|
26
|
+
show: F(a).show,
|
|
27
|
+
hide: F(a).hide
|
|
28
|
+
}, {
|
|
29
|
+
default: R(() => [y("button", T(t.$attrs, {
|
|
30
|
+
ref: (e) => F(a).trigger.value = e,
|
|
31
|
+
type: r.type,
|
|
32
|
+
disabled: r.disabled,
|
|
33
|
+
"aria-label": r.tip,
|
|
34
|
+
"aria-describedby": F(a).describedBy.value,
|
|
35
|
+
onMouseenter: i[0] ||= (...e) => F(a).show && F(a).show(...e),
|
|
36
|
+
onMouseleave: i[1] ||= (...e) => F(a).hide && F(a).hide(...e),
|
|
37
|
+
onFocus: i[2] ||= (...e) => F(a).showOnFocus && F(a).showOnFocus(...e),
|
|
38
|
+
onBlur: i[3] ||= (...e) => F(a).hide && F(a).hide(...e)
|
|
39
|
+
}), [j(t.$slots, "default")], 16, et)]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 8, [
|
|
42
|
+
"on",
|
|
43
|
+
"show",
|
|
44
|
+
"hide"
|
|
45
|
+
]), S(e, { state: F(a) }, null, 8, ["state"])], 64));
|
|
46
|
+
}
|
|
47
|
+
}), nt = ["disabled"], K = /* @__PURE__ */ C({
|
|
48
|
+
__name: "Badge",
|
|
49
|
+
props: {
|
|
50
|
+
tone: { default: "neutral" },
|
|
51
|
+
size: { default: "medium" },
|
|
52
|
+
shape: { default: "rounded" },
|
|
53
|
+
as: { default: "span" },
|
|
54
|
+
disabled: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !1
|
|
57
|
+
},
|
|
58
|
+
wrap: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
hueIndex: {},
|
|
63
|
+
tip: {},
|
|
64
|
+
insetStart: {},
|
|
65
|
+
inFlow: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
setup(e) {
|
|
71
|
+
let t = e, n = h(() => t.hueIndex !== void 0 && (t.tone === "heading" || t.tone === "active")), r = h(() => [
|
|
72
|
+
n.value && "glim-hue",
|
|
73
|
+
n.value && t.size === "heading" && "glim-notch-hue",
|
|
74
|
+
be({
|
|
75
|
+
tone: t.tone,
|
|
76
|
+
size: t.size,
|
|
77
|
+
shape: t.shape,
|
|
78
|
+
wrap: t.wrap,
|
|
79
|
+
iconOnly: t.tip !== void 0,
|
|
80
|
+
inFlow: t.inFlow,
|
|
81
|
+
insetStart: t.insetStart,
|
|
82
|
+
action: t.as !== "span"
|
|
83
|
+
})
|
|
84
|
+
].filter(Boolean)), i = h(() => n.value ? V(t.hueIndex) : void 0);
|
|
85
|
+
return (t, n) => e.as === "button" && e.tip !== void 0 ? (k(), g(tt, {
|
|
86
|
+
key: 0,
|
|
87
|
+
tip: e.tip,
|
|
88
|
+
disabled: e.disabled,
|
|
89
|
+
class: E(r.value),
|
|
90
|
+
style: D(i.value)
|
|
91
|
+
}, {
|
|
92
|
+
default: R(() => [j(t.$slots, "default")]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 8, [
|
|
95
|
+
"tip",
|
|
96
|
+
"disabled",
|
|
97
|
+
"class",
|
|
98
|
+
"style"
|
|
99
|
+
])) : e.as === "button" ? (k(), v("button", {
|
|
100
|
+
key: 1,
|
|
101
|
+
type: "button",
|
|
102
|
+
disabled: e.disabled,
|
|
103
|
+
class: E(r.value),
|
|
104
|
+
style: D(i.value)
|
|
105
|
+
}, [j(t.$slots, "default")], 14, nt)) : e.as === "a" ? (k(), v("a", {
|
|
106
|
+
key: 2,
|
|
107
|
+
class: E(r.value),
|
|
108
|
+
style: D(i.value)
|
|
109
|
+
}, [j(t.$slots, "default")], 6)) : (k(), v("span", {
|
|
110
|
+
key: 3,
|
|
111
|
+
class: E(r.value),
|
|
112
|
+
style: D(i.value)
|
|
113
|
+
}, [j(t.$slots, "default")], 6));
|
|
114
|
+
}
|
|
115
|
+
}), rt = ["innerHTML"], it = /* @__PURE__ */ C({
|
|
116
|
+
__name: "BrandMark",
|
|
117
|
+
props: { svg: {} },
|
|
118
|
+
setup(e) {
|
|
119
|
+
return (t, n) => (k(), v("span", {
|
|
120
|
+
class: "glim-brand-svg",
|
|
121
|
+
"aria-hidden": "true",
|
|
122
|
+
innerHTML: e.svg
|
|
123
|
+
}, null, 8, rt));
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
// src/engines.ts
|
|
127
|
+
function q(e) {
|
|
128
|
+
let t = N(B(e));
|
|
129
|
+
return O(We(() => t.value = B(e))), h({
|
|
130
|
+
get: () => t.value,
|
|
131
|
+
set: (t) => {
|
|
132
|
+
He(e, t), Te();
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function at() {
|
|
137
|
+
let e = N(Oe());
|
|
138
|
+
return O(Ke(() => e.value = Oe())), h({
|
|
139
|
+
get: () => e.value,
|
|
140
|
+
set: (e) => _e(e)
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function ot(e) {
|
|
144
|
+
return h(() => {
|
|
145
|
+
let t = e();
|
|
146
|
+
return t === void 0 ? void 0 : V(t);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function J(e, t) {
|
|
150
|
+
let n = N(t()), r = new MutationObserver(() => n.value = t());
|
|
151
|
+
return r.observe(document.documentElement, {
|
|
152
|
+
attributes: !0,
|
|
153
|
+
attributeFilter: [e]
|
|
154
|
+
}), O(() => r.disconnect()), n;
|
|
155
|
+
}
|
|
156
|
+
function st() {
|
|
157
|
+
let e = J("data-shape", () => document.documentElement.getAttribute("data-shape") ?? le);
|
|
158
|
+
return h({
|
|
159
|
+
get: () => e.value,
|
|
160
|
+
set: ve
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
function ct() {
|
|
164
|
+
let e = J("data-motion", () => document.documentElement.getAttribute("data-motion") ?? ce);
|
|
165
|
+
return h({
|
|
166
|
+
get: () => e.value,
|
|
167
|
+
set: ge
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function lt() {
|
|
171
|
+
let e = J("style", () => document.documentElement.style.getPropertyValue("--accent"));
|
|
172
|
+
return h({
|
|
173
|
+
get: () => e.value,
|
|
174
|
+
set: (e) => he(e || void 0)
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
// src/Button.vue?vue&type=script&setup=true&lang.ts
|
|
178
|
+
var ut = [
|
|
179
|
+
"type",
|
|
180
|
+
"disabled",
|
|
181
|
+
"aria-busy",
|
|
182
|
+
"aria-describedby"
|
|
183
|
+
], dt = {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: "glim-btn-glyph"
|
|
186
|
+
}, ft = {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: "glim-spinner"
|
|
189
|
+
}, Y = /* @__PURE__ */ C({
|
|
190
|
+
inheritAttrs: !1,
|
|
191
|
+
__name: "Button",
|
|
192
|
+
props: {
|
|
193
|
+
label: {},
|
|
194
|
+
labelKey: {},
|
|
195
|
+
glyph: {},
|
|
196
|
+
tone: { default: "neutral" },
|
|
197
|
+
variant: { default: "default" },
|
|
198
|
+
disabled: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
default: !1
|
|
201
|
+
},
|
|
202
|
+
type: { default: "button" },
|
|
203
|
+
title: {},
|
|
204
|
+
hueIndex: {},
|
|
205
|
+
busy: {
|
|
206
|
+
type: Boolean,
|
|
207
|
+
default: !1
|
|
208
|
+
},
|
|
209
|
+
stage: {},
|
|
210
|
+
keepLabel: {
|
|
211
|
+
type: Boolean,
|
|
212
|
+
default: !1
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
setup(r, { expose: i }) {
|
|
216
|
+
let a = r, s = q("buttons"), c = h(() => a.glyph ?? (a.labelKey ? o(a.labelKey) : void 0) ?? (a.variant === "chip" ? l : void 0)), u = h(() => xe({
|
|
217
|
+
mode: s.value,
|
|
218
|
+
label: a.label,
|
|
219
|
+
hasGlyph: !!c.value || a.busy,
|
|
220
|
+
tone: a.tone,
|
|
221
|
+
variant: a.variant,
|
|
222
|
+
disabled: a.disabled,
|
|
223
|
+
keepLabel: a.keepLabel,
|
|
224
|
+
title: a.title,
|
|
225
|
+
hueIndex: a.hueIndex,
|
|
226
|
+
stage: a.stage
|
|
227
|
+
})), d = t(() => u.value.tip, () => a.disabled), f = N(null);
|
|
228
|
+
function m(e) {
|
|
229
|
+
f.value = e, d.trigger.value = f.value;
|
|
230
|
+
}
|
|
231
|
+
function b(e) {
|
|
232
|
+
u.value.pageHue && W(e.currentTarget), d.show();
|
|
233
|
+
}
|
|
234
|
+
function x(e) {
|
|
235
|
+
u.value.pageHue && W(e.currentTarget), d.showOnFocus();
|
|
236
|
+
}
|
|
237
|
+
return i({ el: f }), (t, i) => (k(), v(p, null, [S(F(n), {
|
|
238
|
+
on: r.disabled && !!u.value.tip,
|
|
239
|
+
show: F(d).show,
|
|
240
|
+
hide: F(d).hide
|
|
241
|
+
}, {
|
|
242
|
+
default: R(() => [y("button", T(t.$attrs, {
|
|
243
|
+
ref: m,
|
|
244
|
+
type: r.type,
|
|
245
|
+
disabled: r.disabled,
|
|
246
|
+
"aria-busy": r.busy || void 0,
|
|
247
|
+
"aria-describedby": F(d).describedBy.value,
|
|
248
|
+
style: u.value.style,
|
|
249
|
+
class: u.value.className,
|
|
250
|
+
onMouseenter: b,
|
|
251
|
+
onMouseleave: i[0] ||= (...e) => F(d).hide && F(d).hide(...e),
|
|
252
|
+
onFocus: x,
|
|
253
|
+
onBlur: i[1] ||= (...e) => F(d).hide && F(d).hide(...e)
|
|
254
|
+
}), [u.value.showGlyph ? (k(), v("span", dt, [r.busy ? (k(), v("span", ft)) : (k(), g(M(c.value), { key: 1 }))])) : _("", !0), y("span", { class: E(u.value.labelClass) }, P(r.label), 3)], 16, ut)]),
|
|
255
|
+
_: 1
|
|
256
|
+
}, 8, [
|
|
257
|
+
"on",
|
|
258
|
+
"show",
|
|
259
|
+
"hide"
|
|
260
|
+
]), S(e, { state: F(d) }, null, 8, ["state"])], 64));
|
|
261
|
+
}
|
|
262
|
+
}), pt = ["aria-label", "aria-describedby"], X = /* @__PURE__ */ C({
|
|
263
|
+
__name: "InfoBubble",
|
|
264
|
+
props: {
|
|
265
|
+
tip: {},
|
|
266
|
+
onAccent: {
|
|
267
|
+
type: Boolean,
|
|
268
|
+
default: !1
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
setup(n) {
|
|
272
|
+
let r = n, i = t(() => r.tip);
|
|
273
|
+
return (t, r) => (k(), v(p, null, [y("span", {
|
|
274
|
+
ref: (e) => F(i).trigger.value = e,
|
|
275
|
+
"aria-label": n.tip,
|
|
276
|
+
"aria-describedby": F(i).describedBy.value,
|
|
277
|
+
tabindex: "0",
|
|
278
|
+
class: E(n.onAccent ? "glim-info-icon glim-info-icon--on-accent" : "glim-info-icon"),
|
|
279
|
+
onMouseenter: r[0] ||= (...e) => F(i).show && F(i).show(...e),
|
|
280
|
+
onMouseleave: r[1] ||= (...e) => F(i).hide && F(i).hide(...e),
|
|
281
|
+
onFocus: r[2] ||= (...e) => F(i).showOnFocus && F(i).showOnFocus(...e),
|
|
282
|
+
onBlur: r[3] ||= (...e) => F(i).hide && F(i).hide(...e),
|
|
283
|
+
onClick: r[4] ||= z(() => {}, ["prevent"])
|
|
284
|
+
}, [...r[5] ||= [y("svg", {
|
|
285
|
+
viewBox: "0 0 16 16",
|
|
286
|
+
width: "15",
|
|
287
|
+
height: "15",
|
|
288
|
+
fill: "none",
|
|
289
|
+
"aria-hidden": "true"
|
|
290
|
+
}, [
|
|
291
|
+
y("circle", {
|
|
292
|
+
cx: "8",
|
|
293
|
+
cy: "8",
|
|
294
|
+
r: "7",
|
|
295
|
+
stroke: "currentColor",
|
|
296
|
+
"stroke-width": "1.3"
|
|
297
|
+
}),
|
|
298
|
+
y("circle", {
|
|
299
|
+
cx: "8",
|
|
300
|
+
cy: "4.6",
|
|
301
|
+
r: "0.9",
|
|
302
|
+
fill: "currentColor"
|
|
303
|
+
}),
|
|
304
|
+
y("path", {
|
|
305
|
+
d: "M8 7v4.4",
|
|
306
|
+
stroke: "currentColor",
|
|
307
|
+
"stroke-width": "1.3",
|
|
308
|
+
"stroke-linecap": "round"
|
|
309
|
+
})
|
|
310
|
+
], -1)]], 42, pt), S(e, { state: F(i) }, null, 8, ["state"])], 64));
|
|
311
|
+
}
|
|
312
|
+
}), mt = {
|
|
313
|
+
key: 0,
|
|
314
|
+
class: "glim-panel-heading"
|
|
315
|
+
}, Z = /* @__PURE__ */ C({
|
|
316
|
+
__name: "Card",
|
|
317
|
+
props: {
|
|
318
|
+
title: {},
|
|
319
|
+
hint: {},
|
|
320
|
+
hueIndex: {},
|
|
321
|
+
nested: { type: Boolean }
|
|
322
|
+
},
|
|
323
|
+
setup(e) {
|
|
324
|
+
let t = e, n = h(() => t.hueIndex === void 0 ? void 0 : V(t.hueIndex));
|
|
325
|
+
return (t, r) => (k(), v("div", {
|
|
326
|
+
class: E([
|
|
327
|
+
"glim-panel",
|
|
328
|
+
"glim-notch-card",
|
|
329
|
+
{
|
|
330
|
+
"glim-panel--nested": e.nested,
|
|
331
|
+
"glim-hue": e.hueIndex !== void 0
|
|
332
|
+
}
|
|
333
|
+
]),
|
|
334
|
+
style: D(n.value)
|
|
335
|
+
}, [e.title || e.hint ? (k(), v("h2", mt, [S(K, {
|
|
336
|
+
tone: "heading",
|
|
337
|
+
size: "heading",
|
|
338
|
+
wrap: "",
|
|
339
|
+
"hue-index": e.hueIndex
|
|
340
|
+
}, {
|
|
341
|
+
default: R(() => [x(P(e.title) + " ", 1), e.hint ? (k(), g(X, {
|
|
342
|
+
key: 0,
|
|
343
|
+
tip: e.hint,
|
|
344
|
+
"on-accent": ""
|
|
345
|
+
}, null, 8, ["tip"])) : _("", !0)]),
|
|
346
|
+
_: 1
|
|
347
|
+
}, 8, ["hue-index"])])) : _("", !0), j(t.$slots, "default")], 6));
|
|
348
|
+
}
|
|
349
|
+
}), ht = { class: "glim-modal-head" }, gt = {
|
|
350
|
+
id: "confirmdialog-title",
|
|
351
|
+
class: "glim-modal-title"
|
|
352
|
+
}, _t = { class: "glim-modal-body" }, vt = {
|
|
353
|
+
id: "confirmdialog-message",
|
|
354
|
+
class: "glim-modal-text"
|
|
355
|
+
}, yt = {
|
|
356
|
+
key: 0,
|
|
357
|
+
class: "glim-modal-extra"
|
|
358
|
+
}, bt = { class: "glim-modal-foot" }, xt = /* @__PURE__ */ C({
|
|
359
|
+
__name: "ConfirmDialog",
|
|
360
|
+
props: {
|
|
361
|
+
title: {},
|
|
362
|
+
message: {},
|
|
363
|
+
confirmLabel: {},
|
|
364
|
+
confirmLabelKey: {},
|
|
365
|
+
confirmGlyph: {},
|
|
366
|
+
cancelLabel: {},
|
|
367
|
+
closeLabel: {}
|
|
368
|
+
},
|
|
369
|
+
emits: ["confirm", "cancel"],
|
|
370
|
+
setup(e, { expose: t, emit: n }) {
|
|
371
|
+
let r = n, i = N(null), a = N(null);
|
|
372
|
+
return ne(() => a.value?.el?.focus()), t({ card: i }), (t, n) => (k(), v("div", {
|
|
373
|
+
class: "glim-modal-backdrop",
|
|
374
|
+
onClick: n[3] ||= z((e) => r("cancel"), ["self"])
|
|
375
|
+
}, [y("div", {
|
|
376
|
+
ref_key: "card",
|
|
377
|
+
ref: i,
|
|
378
|
+
role: "dialog",
|
|
379
|
+
"aria-modal": "true",
|
|
380
|
+
"aria-labelledby": "confirmdialog-title",
|
|
381
|
+
"aria-describedby": "confirmdialog-message",
|
|
382
|
+
class: "glim-modal-card"
|
|
383
|
+
}, [
|
|
384
|
+
y("div", ht, [y("h2", gt, [S(K, {
|
|
385
|
+
tone: "heading",
|
|
386
|
+
size: "heading",
|
|
387
|
+
wrap: ""
|
|
388
|
+
}, {
|
|
389
|
+
default: R(() => [x(P(e.title), 1)]),
|
|
390
|
+
_: 1
|
|
391
|
+
})]), e.closeLabel === void 0 ? _("", !0) : (k(), g(Y, {
|
|
392
|
+
key: 0,
|
|
393
|
+
label: e.closeLabel,
|
|
394
|
+
"label-key": "common.close",
|
|
395
|
+
glyph: F(l),
|
|
396
|
+
class: "glim-modal-close",
|
|
397
|
+
onClick: n[0] ||= (e) => r("cancel")
|
|
398
|
+
}, null, 8, ["label", "glyph"]))]),
|
|
399
|
+
y("div", _t, [y("p", vt, P(e.message), 1), t.$slots.extra ? (k(), v("div", yt, [j(t.$slots, "extra")])) : _("", !0)]),
|
|
400
|
+
y("div", bt, [S(Y, {
|
|
401
|
+
ref_key: "cancel",
|
|
402
|
+
ref: a,
|
|
403
|
+
label: e.cancelLabel,
|
|
404
|
+
"label-key": "common.cancel",
|
|
405
|
+
glyph: F(d),
|
|
406
|
+
onClick: n[1] ||= (e) => r("cancel")
|
|
407
|
+
}, null, 8, ["label", "glyph"]), S(Y, {
|
|
408
|
+
label: e.confirmLabel,
|
|
409
|
+
"label-key": e.confirmLabelKey ?? null,
|
|
410
|
+
glyph: e.confirmGlyph,
|
|
411
|
+
onClick: n[2] ||= (e) => r("confirm")
|
|
412
|
+
}, null, 8, [
|
|
413
|
+
"label",
|
|
414
|
+
"label-key",
|
|
415
|
+
"glyph"
|
|
416
|
+
])])
|
|
417
|
+
], 512)]));
|
|
418
|
+
}
|
|
419
|
+
}), St = {
|
|
420
|
+
key: 0,
|
|
421
|
+
class: "glim-empty-glyph",
|
|
422
|
+
"aria-hidden": "true"
|
|
423
|
+
}, Ct = { class: "glim-empty-title" }, wt = {
|
|
424
|
+
key: 1,
|
|
425
|
+
class: "glim-empty-hint"
|
|
426
|
+
}, Tt = /* @__PURE__ */ C({
|
|
427
|
+
__name: "EmptyState",
|
|
428
|
+
props: {
|
|
429
|
+
glyph: {},
|
|
430
|
+
title: {},
|
|
431
|
+
hint: {},
|
|
432
|
+
nested: {
|
|
433
|
+
type: Boolean,
|
|
434
|
+
default: !1
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
setup(e) {
|
|
438
|
+
return (t, n) => (k(), v("div", { class: E(e.nested ? "glim-empty" : "glim-card glim-empty") }, [
|
|
439
|
+
e.glyph ? (k(), v("span", St, [(k(), g(M(e.glyph)))])) : _("", !0),
|
|
440
|
+
y("p", Ct, P(e.title), 1),
|
|
441
|
+
e.hint ? (k(), v("p", wt, P(e.hint), 1)) : _("", !0),
|
|
442
|
+
j(t.$slots, "default")
|
|
443
|
+
], 2));
|
|
444
|
+
}
|
|
445
|
+
}), Et = {
|
|
446
|
+
key: 0,
|
|
447
|
+
class: "glim-readme-btn-art",
|
|
448
|
+
"aria-hidden": "true"
|
|
449
|
+
}, Dt = { class: "glim-readme-btn-text" }, Ot = { class: "glim-readme-btn-name" }, kt = {
|
|
450
|
+
key: 0,
|
|
451
|
+
class: "glim-readme-btn-sub"
|
|
452
|
+
}, At = {
|
|
453
|
+
key: 0,
|
|
454
|
+
class: "glim-readme-btn-sheen",
|
|
455
|
+
"aria-hidden": "true"
|
|
456
|
+
}, jt = {
|
|
457
|
+
key: 1,
|
|
458
|
+
class: "glim-readme-btn-hint"
|
|
459
|
+
}, Q = /* @__PURE__ */ C({
|
|
460
|
+
__name: "ReadmeButton",
|
|
461
|
+
props: {
|
|
462
|
+
brand: {},
|
|
463
|
+
parts: {},
|
|
464
|
+
markClass: {},
|
|
465
|
+
hint: {},
|
|
466
|
+
note: {
|
|
467
|
+
type: Boolean,
|
|
468
|
+
default: !1
|
|
469
|
+
},
|
|
470
|
+
soonLabel: {}
|
|
471
|
+
},
|
|
472
|
+
emits: ["linkClick"],
|
|
473
|
+
setup(e, { emit: t }) {
|
|
474
|
+
let n = e, r = t, i = h(() => Ae(n.parts)), a = N(null), o = h(() => n.parts.map((e) => `${e.name}\n${e.sub ?? ""}`).join("\n") + (i.value ? n.soonLabel : "")), s;
|
|
475
|
+
L([a, o], () => {
|
|
476
|
+
s?.(), s = a.value ? we(a.value) : void 0;
|
|
477
|
+
}, { flush: "post" }), O(() => s?.());
|
|
478
|
+
let c = (e) => i.value ? n.soonLabel : e.sub, l = (e) => c(e) ? `${e.name} ${c(e)}` : e.name, u = (e) => i.value ? "span" : e.href ? "a" : "button", d = (e) => i.value ? { "aria-disabled": !0 } : e.href ? {
|
|
479
|
+
href: e.href,
|
|
480
|
+
target: "_blank",
|
|
481
|
+
rel: "noreferrer noopener",
|
|
482
|
+
onClick: (e) => r("linkClick", e)
|
|
483
|
+
} : {
|
|
484
|
+
type: "button",
|
|
485
|
+
onClick: e.onClick
|
|
486
|
+
};
|
|
487
|
+
return (t, n) => (k(), v("div", {
|
|
488
|
+
ref_key: "root",
|
|
489
|
+
ref: a,
|
|
490
|
+
class: E(F(je)(e.brand, e.parts.length, e.note, i.value))
|
|
491
|
+
}, [
|
|
492
|
+
(k(!0), v(p, null, A(e.parts, (n, r) => (k(), g(M(u(n)), T({ key: r }, { ref_for: !0 }, d(n), {
|
|
493
|
+
"aria-label": l(n),
|
|
494
|
+
class: F(ke)(r, i.value)
|
|
495
|
+
}), {
|
|
496
|
+
default: R(() => [r === 0 && t.$slots.art ? (k(), v("span", Et, [j(t.$slots, "art")])) : (k(), v(p, { key: 1 }, [r === 0 && t.$slots.mark ? (k(), v("span", {
|
|
497
|
+
key: 0,
|
|
498
|
+
class: E(`glim-readme-btn-mark ${e.markClass ?? ""}`),
|
|
499
|
+
"aria-hidden": "true"
|
|
500
|
+
}, [j(t.$slots, "mark")], 2)) : _("", !0), y("span", Dt, [y("span", Ot, P(n.name), 1), c(n) ? (k(), v("span", kt, P(c(n)), 1)) : _("", !0)])], 64))]),
|
|
501
|
+
_: 2
|
|
502
|
+
}, 1040, ["aria-label", "class"]))), 128)),
|
|
503
|
+
i.value ? _("", !0) : (k(), v("span", At)),
|
|
504
|
+
e.hint ? (k(), v("span", jt, [S(X, { tip: e.hint }, null, 8, ["tip"])])) : _("", !0)
|
|
505
|
+
], 2));
|
|
506
|
+
}
|
|
507
|
+
}), Mt = { class: "glim-info-text" }, Nt = { class: "glim-info-text" }, Pt = { class: "glim-readme-btn-rows glim-about-give" }, Ft = /* @__PURE__ */ C({
|
|
508
|
+
__name: "InfoAboutCard",
|
|
509
|
+
props: {
|
|
510
|
+
text: {},
|
|
511
|
+
onCoffee: { type: Function },
|
|
512
|
+
coffeeArt: {},
|
|
513
|
+
onPaypal: { type: Function },
|
|
514
|
+
paypalGlyph: {},
|
|
515
|
+
onCrypto: { type: Function },
|
|
516
|
+
cryptoGlyph: {},
|
|
517
|
+
hueIndex: {}
|
|
518
|
+
},
|
|
519
|
+
setup(e) {
|
|
520
|
+
return (t, n) => (k(), g(Z, {
|
|
521
|
+
title: e.text.title,
|
|
522
|
+
"hue-index": e.hueIndex
|
|
523
|
+
}, {
|
|
524
|
+
default: R(() => [
|
|
525
|
+
y("p", Mt, P(e.text.body), 1),
|
|
526
|
+
y("p", Nt, P(e.text.coffee), 1),
|
|
527
|
+
y("div", Pt, [
|
|
528
|
+
S(Q, {
|
|
529
|
+
brand: "coffee",
|
|
530
|
+
parts: [{
|
|
531
|
+
name: e.text.coffeeButton,
|
|
532
|
+
onClick: e.onCoffee
|
|
533
|
+
}]
|
|
534
|
+
}, {
|
|
535
|
+
art: R(() => [(k(), g(M(e.coffeeArt)))]),
|
|
536
|
+
_: 1
|
|
537
|
+
}, 8, ["parts"]),
|
|
538
|
+
e.onPaypal && e.text.paypalButton ? (k(), g(Q, {
|
|
539
|
+
key: 0,
|
|
540
|
+
brand: "paypal",
|
|
541
|
+
parts: [{
|
|
542
|
+
name: e.text.paypalButton,
|
|
543
|
+
onClick: e.onPaypal
|
|
544
|
+
}],
|
|
545
|
+
"mark-class": "glim-paypal-mark"
|
|
546
|
+
}, b({ _: 2 }, [e.paypalGlyph ? {
|
|
547
|
+
name: "mark",
|
|
548
|
+
fn: R(() => [(k(), g(M(e.paypalGlyph)))]),
|
|
549
|
+
key: "0"
|
|
550
|
+
} : void 0]), 1032, ["parts"])) : _("", !0),
|
|
551
|
+
e.onCrypto && e.text.cryptoButton ? (k(), g(Q, {
|
|
552
|
+
key: 1,
|
|
553
|
+
brand: "bitcoin",
|
|
554
|
+
parts: [{
|
|
555
|
+
name: e.text.cryptoButton,
|
|
556
|
+
onClick: e.onCrypto
|
|
557
|
+
}],
|
|
558
|
+
"mark-class": "glim-bitcoin-mark"
|
|
559
|
+
}, b({ _: 2 }, [e.cryptoGlyph ? {
|
|
560
|
+
name: "mark",
|
|
561
|
+
fn: R(() => [(k(), g(M(e.cryptoGlyph)))]),
|
|
562
|
+
key: "0"
|
|
563
|
+
} : void 0]), 1032, ["parts"])) : _("", !0)
|
|
564
|
+
])
|
|
565
|
+
]),
|
|
566
|
+
_: 1
|
|
567
|
+
}, 8, ["title", "hue-index"]));
|
|
568
|
+
}
|
|
569
|
+
}), It = { class: "glim-info-text" }, Lt = { class: "glim-readme-btn-rows" }, Rt = /* @__PURE__ */ C({
|
|
570
|
+
__name: "InfoHelpCard",
|
|
571
|
+
props: {
|
|
572
|
+
text: {},
|
|
573
|
+
repoUrl: {},
|
|
574
|
+
repoGlyph: {},
|
|
575
|
+
mailAddress: {},
|
|
576
|
+
mailGlyph: {},
|
|
577
|
+
manualUrl: {},
|
|
578
|
+
manualGlyph: {},
|
|
579
|
+
onBugReport: {},
|
|
580
|
+
bugGlyph: {},
|
|
581
|
+
openUrl: { default: U },
|
|
582
|
+
hueIndex: {}
|
|
583
|
+
},
|
|
584
|
+
setup(e) {
|
|
585
|
+
let t = e, n = h(() => De(t.text.report, t.mailAddress));
|
|
586
|
+
return (t, r) => (k(), g(Z, {
|
|
587
|
+
title: e.text.title,
|
|
588
|
+
hint: e.text.hint,
|
|
589
|
+
"hue-index": e.hueIndex
|
|
590
|
+
}, {
|
|
591
|
+
default: R(() => [y("p", It, P(e.text.report), 1), y("div", Lt, [
|
|
592
|
+
S(Q, {
|
|
593
|
+
brand: "github",
|
|
594
|
+
parts: [{
|
|
595
|
+
name: e.text.repoButton,
|
|
596
|
+
onClick: () => e.openUrl(e.repoUrl)
|
|
597
|
+
}],
|
|
598
|
+
"mark-class": "glim-github-mark"
|
|
599
|
+
}, b({ _: 2 }, [e.repoGlyph ? {
|
|
600
|
+
name: "mark",
|
|
601
|
+
fn: R(() => [(k(), g(M(e.repoGlyph)))]),
|
|
602
|
+
key: "0"
|
|
603
|
+
} : void 0]), 1032, ["parts"]),
|
|
604
|
+
n.value ? (k(), g(Q, {
|
|
605
|
+
key: 0,
|
|
606
|
+
brand: "house",
|
|
607
|
+
parts: [{
|
|
608
|
+
name: e.text.mailButton,
|
|
609
|
+
onClick: () => e.openUrl(F(Ee)(e.mailAddress, e.text.mailSubject))
|
|
610
|
+
}],
|
|
611
|
+
"mark-class": "glim-house-mark"
|
|
612
|
+
}, b({ _: 2 }, [e.mailGlyph ? {
|
|
613
|
+
name: "mark",
|
|
614
|
+
fn: R(() => [(k(), g(M(e.mailGlyph)))]),
|
|
615
|
+
key: "0"
|
|
616
|
+
} : void 0]), 1032, ["parts"])) : _("", !0),
|
|
617
|
+
e.manualUrl && e.text.manual ? (k(), g(Q, {
|
|
618
|
+
key: 1,
|
|
619
|
+
brand: "docs",
|
|
620
|
+
parts: [{
|
|
621
|
+
name: e.text.manual,
|
|
622
|
+
sub: e.text.manualSub,
|
|
623
|
+
onClick: () => e.openUrl(e.manualUrl)
|
|
624
|
+
}],
|
|
625
|
+
"mark-class": "glim-docs-mark"
|
|
626
|
+
}, b({ _: 2 }, [e.manualGlyph ? {
|
|
627
|
+
name: "mark",
|
|
628
|
+
fn: R(() => [(k(), g(M(e.manualGlyph)))]),
|
|
629
|
+
key: "0"
|
|
630
|
+
} : void 0]), 1032, ["parts"])) : _("", !0),
|
|
631
|
+
e.onBugReport && e.text.bugReport ? (k(), g(Q, {
|
|
632
|
+
key: 2,
|
|
633
|
+
brand: "github",
|
|
634
|
+
parts: [{
|
|
635
|
+
name: e.text.bugReport,
|
|
636
|
+
sub: e.text.bugReportSub,
|
|
637
|
+
onClick: e.onBugReport
|
|
638
|
+
}]
|
|
639
|
+
}, b({ _: 2 }, [e.bugGlyph ? {
|
|
640
|
+
name: "mark",
|
|
641
|
+
fn: R(() => [(k(), g(M(e.bugGlyph)))]),
|
|
642
|
+
key: "0"
|
|
643
|
+
} : void 0]), 1032, ["parts"])) : _("", !0)
|
|
644
|
+
])]),
|
|
645
|
+
_: 1
|
|
646
|
+
}, 8, [
|
|
647
|
+
"title",
|
|
648
|
+
"hint",
|
|
649
|
+
"hue-index"
|
|
650
|
+
]));
|
|
651
|
+
}
|
|
652
|
+
}), zt = { class: "glim-version-rows" }, Bt = { class: "glim-version-name" }, Vt = { class: "glim-version-part" }, Ht = {
|
|
653
|
+
key: 0,
|
|
654
|
+
class: "glim-version-sub"
|
|
655
|
+
}, Ut = ["href", "onClick"], Wt = {
|
|
656
|
+
key: 1,
|
|
657
|
+
class: "glim-num glim-version-number"
|
|
658
|
+
}, Gt = {
|
|
659
|
+
key: 0,
|
|
660
|
+
class: "glim-version-actions"
|
|
661
|
+
}, Kt = {
|
|
662
|
+
role: "status",
|
|
663
|
+
class: "glim-sr-only"
|
|
664
|
+
}, $ = /* @__PURE__ */ C({
|
|
665
|
+
__name: "InfoVersionCard",
|
|
666
|
+
props: {
|
|
667
|
+
text: {},
|
|
668
|
+
rows: {},
|
|
669
|
+
updateCheck: {},
|
|
670
|
+
onReleaseNotes: {},
|
|
671
|
+
openUrl: { default: U },
|
|
672
|
+
hueIndex: {}
|
|
673
|
+
},
|
|
674
|
+
setup(e) {
|
|
675
|
+
let t = e, n = oe(), r = h(() => !n["whats-new"] && t.onReleaseNotes && t.text.releaseNotes), i = N({ kind: "idle" }), a = N(0), o = h(() => t.updateCheck && Xe(i.value, t.updateCheck.text));
|
|
676
|
+
function s() {
|
|
677
|
+
Fe(t.updateCheck, i.value, (e) => {
|
|
678
|
+
i.value = e, e.kind === "failed" && a.value++;
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
function c(e, n) {
|
|
682
|
+
e.preventDefault(), t.openUrl(n);
|
|
683
|
+
}
|
|
684
|
+
return (t, n) => (k(), g(Z, {
|
|
685
|
+
title: e.text.title,
|
|
686
|
+
hint: e.text.hint,
|
|
687
|
+
"hue-index": e.hueIndex
|
|
688
|
+
}, {
|
|
689
|
+
default: R(() => [y("ul", zt, [(k(!0), v(p, null, A(e.rows, (t) => (k(), v("li", {
|
|
690
|
+
key: t.name,
|
|
691
|
+
class: "glim-version-row"
|
|
692
|
+
}, [y("span", Bt, [y("span", Vt, P(t.name), 1), t.sub ? (k(), v("span", Ht, P(t.sub), 1)) : _("", !0)]), F(G)(t).href ? (k(), v("a", {
|
|
693
|
+
key: 0,
|
|
694
|
+
href: F(G)(t).href,
|
|
695
|
+
target: "_blank",
|
|
696
|
+
rel: "noopener noreferrer",
|
|
697
|
+
class: "glim-num glim-version-number",
|
|
698
|
+
onClick: (e) => c(e, F(G)(t).href)
|
|
699
|
+
}, P(F(G)(t).shown), 9, Ut)) : (k(), v("span", Wt, P(F(G)(t).released ? F(G)(t).shown : e.text.unreleased(F(G)(t).shown)), 1))]))), 128))]), r.value || t.$slots["whats-new"] || e.updateCheck ? (k(), v("div", Gt, [
|
|
700
|
+
r.value ? (k(), g(Y, {
|
|
701
|
+
key: 0,
|
|
702
|
+
label: e.text.releaseNotes,
|
|
703
|
+
"label-key": "about.releaseNotes",
|
|
704
|
+
onClick: n[0] ||= (t) => e.onReleaseNotes()
|
|
705
|
+
}, null, 8, ["label"])) : _("", !0),
|
|
706
|
+
j(t.$slots, "whats-new"),
|
|
707
|
+
e.updateCheck && o.value ? (k(), v(p, { key: 1 }, [(k(), g(Y, {
|
|
708
|
+
key: a.value,
|
|
709
|
+
label: o.value.label,
|
|
710
|
+
"label-key": o.value.labelKey,
|
|
711
|
+
tone: o.value.tone,
|
|
712
|
+
stage: F(Ze)(e.updateCheck.text, o.value.label),
|
|
713
|
+
busy: i.value.kind === "busy",
|
|
714
|
+
class: E(a.value > 0 ? "glim-shake" : ""),
|
|
715
|
+
onClick: s
|
|
716
|
+
}, null, 8, [
|
|
717
|
+
"label",
|
|
718
|
+
"label-key",
|
|
719
|
+
"tone",
|
|
720
|
+
"stage",
|
|
721
|
+
"busy",
|
|
722
|
+
"class"
|
|
723
|
+
])), y("span", Kt, P(o.value.announced), 1)], 64)) : _("", !0)
|
|
724
|
+
])) : _("", !0)]),
|
|
725
|
+
_: 3
|
|
726
|
+
}, 8, [
|
|
727
|
+
"title",
|
|
728
|
+
"hint",
|
|
729
|
+
"hue-index"
|
|
730
|
+
]));
|
|
731
|
+
}
|
|
732
|
+
}), qt = /* @__PURE__ */ C({
|
|
733
|
+
__name: "InfoTile",
|
|
734
|
+
props: {
|
|
735
|
+
version: {},
|
|
736
|
+
help: {},
|
|
737
|
+
about: {},
|
|
738
|
+
hueIndex: {}
|
|
739
|
+
},
|
|
740
|
+
setup(e) {
|
|
741
|
+
let t = e, n = (e) => t.hueIndex === void 0 ? void 0 : t.hueIndex + e;
|
|
742
|
+
return (t, r) => (k(), v(p, null, [
|
|
743
|
+
S($, T(e.version, { "hue-index": n(0) }), b({ _: 2 }, [t.$slots["whats-new"] ? {
|
|
744
|
+
name: "whats-new",
|
|
745
|
+
fn: R(() => [j(t.$slots, "whats-new")]),
|
|
746
|
+
key: "0"
|
|
747
|
+
} : void 0]), 1040, ["hue-index"]),
|
|
748
|
+
S(Rt, T(e.help, { "hue-index": n(1) }), null, 16, ["hue-index"]),
|
|
749
|
+
S(Ft, T(e.about, { "hue-index": n(2) }), null, 16, ["hue-index"])
|
|
750
|
+
], 64));
|
|
751
|
+
}
|
|
752
|
+
}), Jt = { class: "glim-num-wrap" }, Yt = /* @__PURE__ */ C({
|
|
753
|
+
inheritAttrs: !1,
|
|
754
|
+
__name: "NumberField",
|
|
755
|
+
props: {
|
|
756
|
+
modelValue: { default: null },
|
|
757
|
+
modelModifiers: {}
|
|
758
|
+
},
|
|
759
|
+
emits: ["update:modelValue"],
|
|
760
|
+
setup(e) {
|
|
761
|
+
let t = I(e, "modelValue"), n = ie(), r = N(null), i;
|
|
762
|
+
ne(() => {
|
|
763
|
+
a(t.value), i = ye(r.value);
|
|
764
|
+
}), te(() => i?.());
|
|
765
|
+
function a(e) {
|
|
766
|
+
let t = r.value;
|
|
767
|
+
t && (t.value === "" ? null : t.valueAsNumber) !== e && (t.value = e === null ? "" : String(e));
|
|
768
|
+
}
|
|
769
|
+
L([
|
|
770
|
+
t,
|
|
771
|
+
() => n.min,
|
|
772
|
+
() => n.max,
|
|
773
|
+
() => n.step,
|
|
774
|
+
() => n.disabled,
|
|
775
|
+
() => n.readonly
|
|
776
|
+
], () => {
|
|
777
|
+
a(t.value), r.value && qe(r.value);
|
|
778
|
+
}, { flush: "post" });
|
|
779
|
+
function o(e) {
|
|
780
|
+
let n = e.target;
|
|
781
|
+
t.value = n.value === "" ? null : n.valueAsNumber;
|
|
782
|
+
}
|
|
783
|
+
return (e, t) => (k(), v("span", Jt, [y("input", T(e.$attrs, {
|
|
784
|
+
ref_key: "input",
|
|
785
|
+
ref: r,
|
|
786
|
+
type: "number",
|
|
787
|
+
class: "glim-num-input glim-num-field glim-num",
|
|
788
|
+
onInput: o
|
|
789
|
+
}), null, 16)]));
|
|
790
|
+
}
|
|
791
|
+
}), Xt = [
|
|
792
|
+
"href",
|
|
793
|
+
"data-sel-id",
|
|
794
|
+
"aria-selected",
|
|
795
|
+
"aria-current",
|
|
796
|
+
"aria-describedby",
|
|
797
|
+
"tabindex"
|
|
798
|
+
], Zt = [
|
|
799
|
+
"data-sel-id",
|
|
800
|
+
"id",
|
|
801
|
+
"role",
|
|
802
|
+
"aria-selected",
|
|
803
|
+
"aria-controls",
|
|
804
|
+
"aria-checked",
|
|
805
|
+
"aria-pressed",
|
|
806
|
+
"aria-label",
|
|
807
|
+
"aria-describedby",
|
|
808
|
+
"disabled",
|
|
809
|
+
"tabindex"
|
|
810
|
+
], Qt = ["id"], $t = /* @__PURE__ */ C({
|
|
811
|
+
__name: "SelectorSegment",
|
|
812
|
+
props: {
|
|
813
|
+
item: {},
|
|
814
|
+
index: {},
|
|
815
|
+
strip: {},
|
|
816
|
+
on: { type: Boolean },
|
|
817
|
+
disabled: { type: Boolean },
|
|
818
|
+
roved: { type: Boolean },
|
|
819
|
+
share: {},
|
|
820
|
+
squeezed: { type: Boolean },
|
|
821
|
+
orientation: {},
|
|
822
|
+
size: {},
|
|
823
|
+
variant: {},
|
|
824
|
+
equalWidth: { type: Boolean },
|
|
825
|
+
buttonHeight: { type: Boolean },
|
|
826
|
+
pairsOnPhone: { type: Boolean },
|
|
827
|
+
hue: { type: Boolean },
|
|
828
|
+
hueOffset: {},
|
|
829
|
+
panelId: {}
|
|
830
|
+
},
|
|
831
|
+
emits: ["select"],
|
|
832
|
+
setup(r, { emit: i }) {
|
|
833
|
+
let a = r, o = i, s = h(() => Ie({
|
|
834
|
+
strip: a.strip,
|
|
835
|
+
orientation: a.orientation,
|
|
836
|
+
size: a.size,
|
|
837
|
+
variant: a.variant,
|
|
838
|
+
equalWidth: a.equalWidth,
|
|
839
|
+
buttonHeight: a.buttonHeight,
|
|
840
|
+
pairsOnPhone: a.pairsOnPhone,
|
|
841
|
+
hue: a.hue,
|
|
842
|
+
hueOffset: a.hueOffset,
|
|
843
|
+
index: a.index,
|
|
844
|
+
label: a.item.label,
|
|
845
|
+
hasGlyph: !!a.item.glyph,
|
|
846
|
+
iconOnly: !!a.item.iconOnly,
|
|
847
|
+
tip: a.item.tip,
|
|
848
|
+
title: a.item.title,
|
|
849
|
+
on: a.on,
|
|
850
|
+
disabled: a.disabled,
|
|
851
|
+
dim: a.item.dim,
|
|
852
|
+
squeezed: a.squeezed
|
|
853
|
+
})), c = t(() => s.value.tip, () => a.disabled), l = ae(), u = h(() => a.disabled && !!s.value.tip), d = h(() => u.value ? l : c.describedBy.value), f = h(() => a.strip.kind === "tab"), m = h(() => ({
|
|
854
|
+
...s.value.style,
|
|
855
|
+
...a.share
|
|
856
|
+
}));
|
|
857
|
+
function b(e) {
|
|
858
|
+
c.trigger.value = e;
|
|
859
|
+
}
|
|
860
|
+
function x(e) {
|
|
861
|
+
e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), o("select"));
|
|
862
|
+
}
|
|
863
|
+
return (t, i) => (k(), v(p, null, [r.orientation === "vertical" ? (k(), v("a", {
|
|
864
|
+
key: 0,
|
|
865
|
+
ref: b,
|
|
866
|
+
href: r.item.href,
|
|
867
|
+
"data-sel-id": r.item.id,
|
|
868
|
+
role: "tab",
|
|
869
|
+
"aria-selected": r.on,
|
|
870
|
+
"aria-current": r.on ? "page" : void 0,
|
|
871
|
+
"aria-describedby": d.value,
|
|
872
|
+
tabindex: r.roved ? 0 : -1,
|
|
873
|
+
class: E(s.value.className),
|
|
874
|
+
style: D(m.value),
|
|
875
|
+
onClick: x,
|
|
876
|
+
onMouseenter: i[0] ||= (...e) => F(c).show && F(c).show(...e),
|
|
877
|
+
onMouseleave: i[1] ||= (...e) => F(c).hide && F(c).hide(...e),
|
|
878
|
+
onFocus: i[2] ||= (...e) => F(c).showOnFocus && F(c).showOnFocus(...e),
|
|
879
|
+
onBlur: i[3] ||= (...e) => F(c).hide && F(c).hide(...e)
|
|
880
|
+
}, [s.value.showGlyph && r.item.glyph ? (k(), g(M(r.item.glyph), { key: 0 })) : _("", !0), s.value.labelClass === null ? _("", !0) : (k(), v("span", {
|
|
881
|
+
key: 1,
|
|
882
|
+
"data-sel-label": "",
|
|
883
|
+
class: E(s.value.labelClass)
|
|
884
|
+
}, P(r.item.label), 3))], 46, Xt)) : (k(), v(p, { key: 1 }, [S(F(n), T({
|
|
885
|
+
on: u.value,
|
|
886
|
+
show: F(c).show,
|
|
887
|
+
hide: F(c).hide
|
|
888
|
+
}, u.value ? { style: r.share } : {}), {
|
|
889
|
+
default: R(() => [y("button", {
|
|
890
|
+
ref: b,
|
|
891
|
+
type: "button",
|
|
892
|
+
"data-sel-id": r.item.id,
|
|
893
|
+
id: r.panelId && f.value ? F(Be)(r.panelId, r.item.id) : void 0,
|
|
894
|
+
role: r.strip.kind === "toggle" ? void 0 : r.strip.kind,
|
|
895
|
+
"aria-selected": f.value ? r.on : void 0,
|
|
896
|
+
"aria-controls": r.panelId && f.value && r.on ? r.panelId : void 0,
|
|
897
|
+
"aria-checked": r.strip.kind === "radio" ? r.on : void 0,
|
|
898
|
+
"aria-pressed": r.strip.kind === "toggle" ? r.on : void 0,
|
|
899
|
+
"aria-label": s.value.ariaLabel,
|
|
900
|
+
"aria-describedby": d.value,
|
|
901
|
+
disabled: r.disabled,
|
|
902
|
+
tabindex: r.roved ? 0 : -1,
|
|
903
|
+
class: E(s.value.className),
|
|
904
|
+
style: D(m.value),
|
|
905
|
+
onClick: i[4] ||= (e) => o("select"),
|
|
906
|
+
onMouseenter: i[5] ||= (...e) => F(c).show && F(c).show(...e),
|
|
907
|
+
onMouseleave: i[6] ||= (...e) => F(c).hide && F(c).hide(...e),
|
|
908
|
+
onFocus: i[7] ||= (...e) => F(c).showOnFocus && F(c).showOnFocus(...e),
|
|
909
|
+
onBlur: i[8] ||= (...e) => F(c).hide && F(c).hide(...e)
|
|
910
|
+
}, [s.value.showGlyph && r.item.glyph ? (k(), g(M(r.item.glyph), { key: 0 })) : _("", !0), s.value.labelClass === null ? _("", !0) : (k(), v("span", {
|
|
911
|
+
key: 1,
|
|
912
|
+
"data-sel-label": "",
|
|
913
|
+
class: E(s.value.labelClass)
|
|
914
|
+
}, P(r.item.label), 3))], 46, Zt)]),
|
|
915
|
+
_: 1
|
|
916
|
+
}, 16, [
|
|
917
|
+
"on",
|
|
918
|
+
"show",
|
|
919
|
+
"hide"
|
|
920
|
+
]), u.value ? (k(), v("span", {
|
|
921
|
+
key: 0,
|
|
922
|
+
id: F(l),
|
|
923
|
+
hidden: ""
|
|
924
|
+
}, P(s.value.tip), 9, Qt)) : _("", !0)], 64)), S(e, { state: F(c) }, null, 8, ["state"])], 64));
|
|
925
|
+
}
|
|
926
|
+
}), en = [
|
|
927
|
+
"role",
|
|
928
|
+
"aria-label",
|
|
929
|
+
"aria-orientation"
|
|
930
|
+
], tn = /* @__PURE__ */ C({
|
|
931
|
+
__name: "Selector",
|
|
932
|
+
props: /*@__PURE__*/ ee({
|
|
933
|
+
items: {},
|
|
934
|
+
label: {},
|
|
935
|
+
select: { default: "one" },
|
|
936
|
+
orientation: { default: "horizontal" },
|
|
937
|
+
size: { default: "md" },
|
|
938
|
+
variant: { default: "well" },
|
|
939
|
+
activation: { default: "auto" },
|
|
940
|
+
equalWidth: {
|
|
941
|
+
type: Boolean,
|
|
942
|
+
default: !1
|
|
943
|
+
},
|
|
944
|
+
inline: {
|
|
945
|
+
type: Boolean,
|
|
946
|
+
default: !1
|
|
947
|
+
},
|
|
948
|
+
fit: {
|
|
949
|
+
type: Boolean,
|
|
950
|
+
default: !1
|
|
951
|
+
},
|
|
952
|
+
pairsOnPhone: {
|
|
953
|
+
type: Boolean,
|
|
954
|
+
default: !1
|
|
955
|
+
},
|
|
956
|
+
buttonHeight: {
|
|
957
|
+
type: Boolean,
|
|
958
|
+
default: !1
|
|
959
|
+
},
|
|
960
|
+
hue: {
|
|
961
|
+
type: Boolean,
|
|
962
|
+
default: !0
|
|
963
|
+
},
|
|
964
|
+
hueOffset: {},
|
|
965
|
+
disabled: {
|
|
966
|
+
type: Boolean,
|
|
967
|
+
default: !1
|
|
968
|
+
},
|
|
969
|
+
panelId: {}
|
|
970
|
+
}, {
|
|
971
|
+
modelValue: { required: !0 },
|
|
972
|
+
modelModifiers: {}
|
|
973
|
+
}),
|
|
974
|
+
emits: ["update:modelValue"],
|
|
975
|
+
setup(e) {
|
|
976
|
+
let t = e, n = I(e, "modelValue");
|
|
977
|
+
function r(e) {
|
|
978
|
+
let t = N(H(e));
|
|
979
|
+
return O(Ge(e, () => t.value = H(e))), t;
|
|
980
|
+
}
|
|
981
|
+
let i = q(Le(t.size, t.orientation)), a = r(ue), o = r(me), s = h(() => Ve({
|
|
982
|
+
mode: i.value,
|
|
983
|
+
select: t.select,
|
|
984
|
+
activation: t.activation,
|
|
985
|
+
orientation: t.orientation,
|
|
986
|
+
size: t.size,
|
|
987
|
+
variant: t.variant,
|
|
988
|
+
equalWidth: t.equalWidth,
|
|
989
|
+
inline: t.inline,
|
|
990
|
+
fit: t.fit,
|
|
991
|
+
pairsOnPhone: t.pairsOnPhone,
|
|
992
|
+
hue: t.hue,
|
|
993
|
+
hueOffset: t.hueOffset,
|
|
994
|
+
desktop: a.value,
|
|
995
|
+
wide: o.value,
|
|
996
|
+
items: t.items.map((e) => ({
|
|
997
|
+
hasGlyph: !!e.glyph,
|
|
998
|
+
iconOnly: !!e.iconOnly
|
|
999
|
+
}))
|
|
1000
|
+
})), c = N(null), l = N(null), u = re("even"), d = h(() => t.items.map((e) => e.label).join("\n")), f = h(() => t.items.map((e) => t.disabled || e.disabled ? "1" : "0").join(""));
|
|
1001
|
+
function m(e, t) {
|
|
1002
|
+
L([c, e], (e, n, r) => {
|
|
1003
|
+
if (!c.value) return;
|
|
1004
|
+
let i = t(c.value);
|
|
1005
|
+
i && r(i);
|
|
1006
|
+
}, { flush: "post" });
|
|
1007
|
+
}
|
|
1008
|
+
m(() => s.value.counted, (e) => s.value.counted ? Se(e) : void 0), m(() => [
|
|
1009
|
+
s.value.pinWidth,
|
|
1010
|
+
t.equalWidth,
|
|
1011
|
+
t.inline,
|
|
1012
|
+
d.value,
|
|
1013
|
+
f.value,
|
|
1014
|
+
t.size,
|
|
1015
|
+
s.value.mode
|
|
1016
|
+
].join("|"), (e) => {
|
|
1017
|
+
if (!s.value.pinWidth) l.value = null;
|
|
1018
|
+
else return $e(e, {
|
|
1019
|
+
inline: t.inline,
|
|
1020
|
+
equalWidth: t.equalWidth
|
|
1021
|
+
}, (e) => l.value = e);
|
|
1022
|
+
}), m(() => [
|
|
1023
|
+
s.value.canSqueeze,
|
|
1024
|
+
d.value,
|
|
1025
|
+
f.value,
|
|
1026
|
+
t.size
|
|
1027
|
+
].join("|"), (e) => {
|
|
1028
|
+
if (!s.value.canSqueeze) u.value = "even";
|
|
1029
|
+
else return Qe(e, (e) => u.value = e);
|
|
1030
|
+
});
|
|
1031
|
+
let _ = h(() => Re({
|
|
1032
|
+
rows: l.value,
|
|
1033
|
+
pinWidth: s.value.pinWidth,
|
|
1034
|
+
inline: t.inline,
|
|
1035
|
+
fit: t.fit,
|
|
1036
|
+
fitMode: u.value,
|
|
1037
|
+
pairsOnPhone: t.pairsOnPhone
|
|
1038
|
+
})), y = h(() => t.select === "many"), b = (e) => y.value ? (n.value ?? []).includes(e) : n.value === e, x = h(() => t.items.map((e) => t.disabled || !!e.disabled)), S = h(() => Pe(x.value, t.items.findIndex((e) => b(e.id))));
|
|
1039
|
+
function C(e) {
|
|
1040
|
+
n.value = y.value ? Je(n.value ?? [], e, t.items.map((e) => e.id)) : e;
|
|
1041
|
+
}
|
|
1042
|
+
function w(e) {
|
|
1043
|
+
let n = e.target;
|
|
1044
|
+
if (t.orientation === "vertical" && e.key === " " && n.dataset.selId) {
|
|
1045
|
+
e.preventDefault(), n.click();
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
let r = Ne(c.value, e.key, t.orientation);
|
|
1049
|
+
r && (e.preventDefault(), s.value.autoSelect && r.dataset.selId && C(r.dataset.selId));
|
|
1050
|
+
}
|
|
1051
|
+
return (t, n) => (k(), v("div", {
|
|
1052
|
+
ref_key: "track",
|
|
1053
|
+
ref: c,
|
|
1054
|
+
role: s.value.role,
|
|
1055
|
+
"aria-label": e.label,
|
|
1056
|
+
"aria-orientation": s.value.role === "group" ? void 0 : e.orientation,
|
|
1057
|
+
class: E(s.value.className),
|
|
1058
|
+
style: D(_.value.track),
|
|
1059
|
+
onKeydown: w
|
|
1060
|
+
}, [(k(!0), v(p, null, A(e.items, (t, n) => (k(), g($t, {
|
|
1061
|
+
key: t.id,
|
|
1062
|
+
item: t,
|
|
1063
|
+
index: n,
|
|
1064
|
+
strip: s.value,
|
|
1065
|
+
on: b(t.id),
|
|
1066
|
+
disabled: x.value[n],
|
|
1067
|
+
roved: n === S.value,
|
|
1068
|
+
share: e.orientation === "vertical" ? {} : _.value.segment,
|
|
1069
|
+
squeezed: s.value.canSqueeze && u.value === "squeezed",
|
|
1070
|
+
orientation: e.orientation,
|
|
1071
|
+
size: e.size,
|
|
1072
|
+
variant: e.variant,
|
|
1073
|
+
"equal-width": e.equalWidth,
|
|
1074
|
+
"button-height": e.buttonHeight,
|
|
1075
|
+
"pairs-on-phone": e.pairsOnPhone,
|
|
1076
|
+
hue: e.hue,
|
|
1077
|
+
"hue-offset": e.hueOffset,
|
|
1078
|
+
"panel-id": e.panelId,
|
|
1079
|
+
onSelect: (e) => C(t.id)
|
|
1080
|
+
}, null, 8, [
|
|
1081
|
+
"item",
|
|
1082
|
+
"index",
|
|
1083
|
+
"strip",
|
|
1084
|
+
"on",
|
|
1085
|
+
"disabled",
|
|
1086
|
+
"roved",
|
|
1087
|
+
"share",
|
|
1088
|
+
"squeezed",
|
|
1089
|
+
"orientation",
|
|
1090
|
+
"size",
|
|
1091
|
+
"variant",
|
|
1092
|
+
"equal-width",
|
|
1093
|
+
"button-height",
|
|
1094
|
+
"pairs-on-phone",
|
|
1095
|
+
"hue",
|
|
1096
|
+
"hue-offset",
|
|
1097
|
+
"panel-id",
|
|
1098
|
+
"onSelect"
|
|
1099
|
+
]))), 128))], 46, en));
|
|
1100
|
+
}
|
|
1101
|
+
}), nn = [
|
|
1102
|
+
"href",
|
|
1103
|
+
"aria-current",
|
|
1104
|
+
"aria-describedby"
|
|
1105
|
+
], rn = { class: "glim-sr-only" }, an = /* @__PURE__ */ C({
|
|
1106
|
+
inheritAttrs: !1,
|
|
1107
|
+
__name: "SidebarRow",
|
|
1108
|
+
props: {
|
|
1109
|
+
label: {},
|
|
1110
|
+
glyph: {},
|
|
1111
|
+
href: {},
|
|
1112
|
+
active: {
|
|
1113
|
+
type: Boolean,
|
|
1114
|
+
default: !1
|
|
1115
|
+
},
|
|
1116
|
+
hueIndex: {},
|
|
1117
|
+
count: {}
|
|
1118
|
+
},
|
|
1119
|
+
setup(n) {
|
|
1120
|
+
let r = n, i = q("sidebar"), a = h(() => Ue({
|
|
1121
|
+
mode: i.value,
|
|
1122
|
+
label: r.label,
|
|
1123
|
+
hasGlyph: !!r.glyph,
|
|
1124
|
+
active: r.active,
|
|
1125
|
+
hueIndex: r.hueIndex,
|
|
1126
|
+
count: r.count?.value
|
|
1127
|
+
})), o = t(() => a.value.tip);
|
|
1128
|
+
function s(e) {
|
|
1129
|
+
o.trigger.value = e;
|
|
1130
|
+
}
|
|
1131
|
+
return (t, r) => (k(), v(p, null, [y("a", T(t.$attrs, {
|
|
1132
|
+
ref: s,
|
|
1133
|
+
href: n.href,
|
|
1134
|
+
"aria-current": n.active ? "page" : void 0,
|
|
1135
|
+
"aria-describedby": F(o).describedBy.value,
|
|
1136
|
+
class: a.value.className,
|
|
1137
|
+
style: a.value.style,
|
|
1138
|
+
onMouseenter: r[0] ||= (...e) => F(o).show && F(o).show(...e),
|
|
1139
|
+
onMouseleave: r[1] ||= (...e) => F(o).hide && F(o).hide(...e),
|
|
1140
|
+
onFocus: r[2] ||= (...e) => F(o).showOnFocus && F(o).showOnFocus(...e),
|
|
1141
|
+
onBlur: r[3] ||= (...e) => F(o).hide && F(o).hide(...e)
|
|
1142
|
+
}), [
|
|
1143
|
+
a.value.showGlyph && n.glyph ? (k(), g(M(n.glyph), { key: 0 })) : _("", !0),
|
|
1144
|
+
y("span", { class: E(a.value.labelClass) }, P(n.label), 3),
|
|
1145
|
+
a.value.countClass && n.count ? (k(), v(p, { key: 1 }, [y("span", {
|
|
1146
|
+
class: E(a.value.countClass),
|
|
1147
|
+
"aria-hidden": "true"
|
|
1148
|
+
}, P(n.count.value), 3), y("span", rn, P(n.count.label), 1)], 64)) : _("", !0)
|
|
1149
|
+
], 16, nn), S(e, { state: F(o) }, null, 8, ["state"])], 64));
|
|
1150
|
+
}
|
|
1151
|
+
}), on = ["aria-labelledby"], sn = { class: "glim-subcard-title" }, cn = ["id"], ln = /* @__PURE__ */ C({
|
|
1152
|
+
__name: "SubCard",
|
|
1153
|
+
props: {
|
|
1154
|
+
title: {},
|
|
1155
|
+
hint: {}
|
|
1156
|
+
},
|
|
1157
|
+
setup(e) {
|
|
1158
|
+
let t = ae();
|
|
1159
|
+
return (n, r) => (k(), v("section", {
|
|
1160
|
+
class: "glim-subcard",
|
|
1161
|
+
"aria-labelledby": F(t)
|
|
1162
|
+
}, [y("h3", sn, [y("span", { id: F(t) }, P(e.title), 9, cn), e.hint ? (k(), g(X, {
|
|
1163
|
+
key: 0,
|
|
1164
|
+
tip: e.hint
|
|
1165
|
+
}, null, 8, ["tip"])) : _("", !0)]), j(n.$slots, "default")], 8, on));
|
|
1166
|
+
}
|
|
1167
|
+
}), un = { class: "glim-toast-stack" }, dn = [
|
|
1168
|
+
"role",
|
|
1169
|
+
"onMouseenter",
|
|
1170
|
+
"onMouseleave",
|
|
1171
|
+
"onFocusin",
|
|
1172
|
+
"onFocusout",
|
|
1173
|
+
"onKeydown"
|
|
1174
|
+
], fn = { class: "glim-toast-message" }, pn = ["aria-label", "onClick"], mn = /* @__PURE__ */ C({
|
|
1175
|
+
__name: "ToastViewport",
|
|
1176
|
+
props: {
|
|
1177
|
+
toasts: {},
|
|
1178
|
+
dismissLabel: {}
|
|
1179
|
+
},
|
|
1180
|
+
emits: [
|
|
1181
|
+
"dismiss",
|
|
1182
|
+
"enter",
|
|
1183
|
+
"leave",
|
|
1184
|
+
"focusin",
|
|
1185
|
+
"focusout"
|
|
1186
|
+
],
|
|
1187
|
+
setup(e, { emit: t }) {
|
|
1188
|
+
let n = t, r = (e) => e === "success" ? "status" : "alert";
|
|
1189
|
+
return (t, a) => (k(), v("div", un, [(k(!0), v(p, null, A(e.toasts, (t) => (k(), v("div", {
|
|
1190
|
+
key: t.id,
|
|
1191
|
+
role: r(t.severity),
|
|
1192
|
+
class: "glim-toast glim-toast-card",
|
|
1193
|
+
onMouseenter: (e) => n("enter", t.id),
|
|
1194
|
+
onMouseleave: (e) => n("leave", t.id),
|
|
1195
|
+
onFocusin: (e) => n("focusin", t.id),
|
|
1196
|
+
onFocusout: (e) => n("focusout", t.id),
|
|
1197
|
+
onKeydown: se(z((e) => n("dismiss", t.id), ["stop"]), ["esc"])
|
|
1198
|
+
}, [
|
|
1199
|
+
S(F(i), {
|
|
1200
|
+
mark: F(pe)[t.severity],
|
|
1201
|
+
class: E(`glim-toast-glyph glim-toast-glyph--${t.severity}`)
|
|
1202
|
+
}, null, 8, ["mark", "class"]),
|
|
1203
|
+
y("p", fn, P(t.message), 1),
|
|
1204
|
+
y("button", {
|
|
1205
|
+
type: "button",
|
|
1206
|
+
"aria-label": e.dismissLabel,
|
|
1207
|
+
class: "glim-btn-bare glim-toast-dismiss",
|
|
1208
|
+
onClick: (e) => n("dismiss", t.id)
|
|
1209
|
+
}, [S(F(i), { mark: F(fe).dismiss }, null, 8, ["mark"])], 8, pn)
|
|
1210
|
+
], 40, dn))), 128))]));
|
|
1211
|
+
}
|
|
1212
|
+
}), hn = { class: "glim-toggle" }, gn = {
|
|
1213
|
+
key: 0,
|
|
1214
|
+
class: "glim-toggle-label"
|
|
1215
|
+
}, _n = [
|
|
1216
|
+
"aria-checked",
|
|
1217
|
+
"aria-label",
|
|
1218
|
+
"disabled"
|
|
1219
|
+
], vn = /* @__PURE__ */ C({
|
|
1220
|
+
__name: "Toggle",
|
|
1221
|
+
props: /*@__PURE__*/ ee({
|
|
1222
|
+
label: {},
|
|
1223
|
+
hideLabel: {
|
|
1224
|
+
type: Boolean,
|
|
1225
|
+
default: !1
|
|
1226
|
+
},
|
|
1227
|
+
disabled: {
|
|
1228
|
+
type: Boolean,
|
|
1229
|
+
default: !1
|
|
1230
|
+
}
|
|
1231
|
+
}, {
|
|
1232
|
+
modelValue: {
|
|
1233
|
+
type: Boolean,
|
|
1234
|
+
required: !0
|
|
1235
|
+
},
|
|
1236
|
+
modelModifiers: {}
|
|
1237
|
+
}),
|
|
1238
|
+
emits: ["update:modelValue"],
|
|
1239
|
+
setup(e) {
|
|
1240
|
+
let t = I(e, "modelValue");
|
|
1241
|
+
return (n, r) => (k(), v("span", hn, [e.hideLabel ? _("", !0) : (k(), v("span", gn, P(e.label), 1)), y("button", {
|
|
1242
|
+
type: "button",
|
|
1243
|
+
role: "switch",
|
|
1244
|
+
"aria-checked": t.value,
|
|
1245
|
+
"aria-label": e.label,
|
|
1246
|
+
disabled: e.disabled,
|
|
1247
|
+
class: "glim-toggle-track",
|
|
1248
|
+
onClick: r[0] ||= (e) => t.value = !t.value
|
|
1249
|
+
}, [...r[1] ||= [y("span", { class: "glim-toggle-thumb" }, null, -1)]], 8, _n)]));
|
|
1250
|
+
}
|
|
1251
|
+
}), yn = { class: "glim-notice" }, bn = { class: "glim-notice-title" }, xn = { class: "glim-notice-reason" }, Sn = {
|
|
1252
|
+
key: 0,
|
|
1253
|
+
class: "glim-notice-action"
|
|
1254
|
+
}, Cn = /* @__PURE__ */ C({
|
|
1255
|
+
__name: "UnavailableNotice",
|
|
1256
|
+
props: { title: {} },
|
|
1257
|
+
setup(e) {
|
|
1258
|
+
return (t, n) => (k(), v("div", yn, [
|
|
1259
|
+
y("p", bn, P(e.title), 1),
|
|
1260
|
+
y("p", xn, [j(t.$slots, "default")]),
|
|
1261
|
+
t.$slots.action ? (k(), v("div", Sn, [j(t.$slots, "action")])) : _("", !0)
|
|
1262
|
+
]));
|
|
1263
|
+
}
|
|
1264
|
+
});
|
|
1265
|
+
// src/confirm.ts
|
|
1266
|
+
function wn(e) {
|
|
1267
|
+
let t = N(null), n = N(null), r = null, i = null;
|
|
1268
|
+
function a(e, n) {
|
|
1269
|
+
return i = Ce(), new Promise((i) => {
|
|
1270
|
+
r = i, t.value = {
|
|
1271
|
+
message: e,
|
|
1272
|
+
...n
|
|
1273
|
+
};
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
function o(e) {
|
|
1277
|
+
r?.(e), r = null, t.value = null, Me(i), i = null;
|
|
1278
|
+
}
|
|
1279
|
+
let s = () => o(!1);
|
|
1280
|
+
return L(t, (e, t, r) => {
|
|
1281
|
+
e && r(Ye(() => n.value, s));
|
|
1282
|
+
}), {
|
|
1283
|
+
confirm: a,
|
|
1284
|
+
dismiss: s,
|
|
1285
|
+
ConfirmHost: C(() => () => {
|
|
1286
|
+
let r = t.value;
|
|
1287
|
+
return r ? w(m, { to: "body" }, [w(xt, {
|
|
1288
|
+
ref: (e) => n.value = e?.card ?? null,
|
|
1289
|
+
title: e.title,
|
|
1290
|
+
message: r.message,
|
|
1291
|
+
confirmLabel: r.confirmLabel ?? e.confirm,
|
|
1292
|
+
confirmLabelKey: r.confirmLabelKey,
|
|
1293
|
+
confirmGlyph: r.confirmGlyph,
|
|
1294
|
+
cancelLabel: e.cancel,
|
|
1295
|
+
onConfirm: () => o(!0),
|
|
1296
|
+
onCancel: () => o(!1)
|
|
1297
|
+
}, r.extra ? { extra: () => w(r.extra) } : void 0)]) : null;
|
|
1298
|
+
})
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
export { K as Badge, it as BrandMark, Y as Button, Z as Card, xt as ConfirmDialog, Tt as EmptyState, de as GLIMSTONE_VERSION, d as IconCancel, s as IconCheck, l as IconClose, a as IconExpand, tt as IconTipButton, r as IconWindowMaximise, c as IconWindowMinimise, u as IconWindowRestore, Ft as InfoAboutCard, X as InfoBubble, Rt as InfoHelpCard, qt as InfoTile, $ as InfoVersionCard, i as MarkSvg, Yt as NumberField, Q as ReadmeButton, tn as Selector, an as SidebarRow, ln as SubCard, mn as ToastViewport, vn as Toggle, Cn as UnavailableNotice, o as glyphFor, ze as selectorTabId, f as setGlyphResolver, lt as useAccent, wn as useConfirm, ot as useHue, q as useLabelMode, ct as useMotion, at as useRainbow, st as useShape, t as useTipBubble };
|