@glimstone/vue 4.0.0 → 4.1.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.
Files changed (53) hide show
  1. package/dist/Button.vue.d.ts +23 -2
  2. package/dist/Card.vue.d.ts +2 -0
  3. package/dist/Checkbox.vue.d.ts +24 -0
  4. package/dist/ColorPicker.vue.d.ts +30 -0
  5. package/dist/Combobox.js +32 -31
  6. package/dist/Combobox.vue.d.ts +1 -1
  7. package/dist/ContextMenu.vue.d.ts +29 -0
  8. package/dist/CopyField.vue.d.ts +24 -0
  9. package/dist/FieldRow.vue.d.ts +32 -0
  10. package/dist/FieldRowGroup.vue.d.ts +19 -0
  11. package/dist/GlyphField.vue.d.ts +35 -0
  12. package/dist/GlyphTile.vue.d.ts +13 -0
  13. package/dist/IconButton.vue.d.ts +18 -0
  14. package/dist/IconTipButton.vue.d.ts +2 -0
  15. package/dist/Kbd.vue.d.ts +15 -0
  16. package/dist/ListRow.vue.d.ts +26 -0
  17. package/dist/ListSelect.vue.d.ts +4 -1
  18. package/dist/MenuBar.vue.d.ts +13 -0
  19. package/dist/MenuChoice.vue.d.ts +2 -1
  20. package/dist/MenuRows.vue.d.ts +12 -0
  21. package/dist/MenuSelect.vue.d.ts +4 -1
  22. package/dist/MenuSubmenu.vue.d.ts +2 -1
  23. package/dist/Meter.vue.d.ts +23 -0
  24. package/dist/PasswordField.vue.d.ts +31 -0
  25. package/dist/PathField.vue.d.ts +40 -0
  26. package/dist/Pill.vue.d.ts +23 -0
  27. package/dist/ProgressBar.vue.d.ts +19 -0
  28. package/dist/RowMark.vue.d.ts +6 -0
  29. package/dist/Select.js +241 -218
  30. package/dist/Select.vue.d.ts +10 -4
  31. package/dist/Selector.vue.d.ts +48 -50
  32. package/dist/SelectorSegment.vue.d.ts +1 -1
  33. package/dist/SidebarRow.vue.d.ts +19 -2
  34. package/dist/SidebarRowLink.vue.d.ts +17 -0
  35. package/dist/Slider.js +19 -18
  36. package/dist/Slider.vue.d.ts +1 -1
  37. package/dist/SubCard.vue.d.ts +1 -1
  38. package/dist/Table.vue.d.ts +32 -0
  39. package/dist/TextArea.vue.d.ts +21 -0
  40. package/dist/TextField.vue.d.ts +21 -0
  41. package/dist/ToastViewport.vue.d.ts +2 -1
  42. package/dist/Toggle.vue.d.ts +2 -1
  43. package/dist/Tree.vue.d.ts +23 -0
  44. package/dist/Window.vue.d.ts +46 -0
  45. package/dist/fieldName-DBygJJfe.js +8 -0
  46. package/dist/fieldName.d.ts +5 -0
  47. package/dist/{glyphs-CvCRgBMU.js → glyphs-CYhs4mrY.js} +2 -2
  48. package/dist/glyphs.d.ts +5 -0
  49. package/dist/index.d.ts +26 -0
  50. package/dist/index.js +1734 -459
  51. package/dist/selectorItem.d.ts +5 -3
  52. package/dist/windowParts.d.ts +27 -0
  53. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,14 +1,10 @@
1
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({
2
+ import { a as r, c as i, d as a, f as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _ } from "./glyphs-CYhs4mrY.js";
3
+ import { n as v, r as y, t as ee } from "./fieldName-DBygJJfe.js";
4
+ import { Fragment as b, Teleport as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as D, createTextVNode as O, createVNode as k, defineComponent as A, h as te, inject as ne, mergeModels as j, mergeProps as M, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as re, onMounted as F, onScopeDispose as I, onUnmounted as ie, openBlock as L, provide as ae, ref as R, renderList as z, renderSlot as B, resolveDynamicComponent as V, shallowReactive as oe, shallowRef as H, toDisplayString as U, unref as W, useAttrs as se, useId as ce, useModel as G, useSlots as le, vModelDynamic as ue, vModelText as de, watch as K, watchEffect as fe, withCtx as q, withDirectives as J, withKeys as pe, withModifiers as Y } from "vue";
5
+ import { COLOR_NAMES_DE as me, COLOR_PICKER_TEXT as he, COPIED_MS as ge, DEFAULT_MOTION as _e, DEFAULT_SHAPE as ve, DESKTOP_QUERY as ye, GLIMSTONE_VERSION as be, MARKS as xe, PATH_ROOM_PX as Se, TOAST_MARKS as Ce, WIDE_QUERY as we, applyAccent as Te, applyMotion as Ee, applyRainbow as De, applyShape as Oe, attachNumberSteppers as ke, badgeClassName as Ae, buttonView as je, claimMenu as Me, closeMenuOutside as Ne, colorPicker as Pe, copyText as Fe, countSelector as Ie, fieldWidthClass as Le, floatColorPicker as Re, focusFirstMenuRow as ze, focusMenuRow as Be, focusTreeRow as Ve, focusedAsker as He, getLabelMode as Ue, hueVars as We, isMenuHead as Ge, keepReadmeFit as Ke, labelModeChanged as qe, mailHref as Je, mediaMatches as Ye, menuIsOpen as Xe, menuMove as Ze, menuRowView as Qe, meterView as $e, narrowerThan as et, nearestColorName as tt, normalizeHex as nt, offersMail as rt, openInBrowser as it, pillClassName as at, placeMenu as ot, placeSubmenu as st, pressRowControl as ct, progressView as lt, rainbowState as ut, readmePartClass as dt, readmeSoon as ft, readmeUnitClass as pt, returnFocus as mt, roveSelector as ht, rovedIndex as gt, runUpdateCheck as _t, segmentView as vt, selectorAxis as yt, selectorFlex as bt, selectorTabId as xt, selectorTabId as St, selectorView as Ct, setLabelMode as wt, sidebarRowView as Tt, softBreaks as Et, stackWindow as Dt, subscribeLabelMode as Ot, subscribeMedia as kt, subscribeRainbow as At, syncNumberSteppers as jt, tableCellClass as Mt, takePageHue as Nt, textFieldClass as Pt, tidyMenu as Ft, toggleSelection as It, trapDialogKeys as Lt, treeRows as Rt, treeStep as zt, updateFace as Bt, updateStage as Vt, versionLink as X, watchSelectorFit as Ht, watchSelectorRows as Ut, windowFocusTarget as Wt, windowFoot as Gt } from "@glimstone/core";
6
+ // src/IconTipButton.vue
7
+ var Kt = /* @__PURE__ */ A({
12
8
  inheritAttrs: !1,
13
9
  __name: "IconTipButton",
14
10
  props: {
@@ -17,34 +13,49 @@ var et = [
17
13
  type: Boolean,
18
14
  default: !1
19
15
  },
16
+ href: {},
20
17
  type: { default: "button" }
21
18
  },
22
19
  setup(r) {
23
20
  let i = r, a = t(() => i.tip, () => i.disabled);
24
- return (t, i) => (k(), v(p, null, [S(F(n), {
21
+ return (t, i) => (L(), T(b, null, [k(W(n), {
25
22
  on: r.disabled,
26
- show: F(a).show,
27
- hide: F(a).hide
23
+ show: W(a).show,
24
+ hide: W(a).hide
28
25
  }, {
29
- default: R(() => [y("button", T(t.$attrs, {
30
- ref: (e) => F(a).trigger.value = e,
31
- type: r.type,
32
- disabled: r.disabled,
26
+ default: q(() => [(L(), C(V(r.href && !r.disabled ? "a" : "button"), M(t.$attrs, {
27
+ ref: (e) => W(a).trigger.value = e,
28
+ href: r.disabled ? void 0 : r.href,
29
+ type: r.href && !r.disabled ? void 0 : r.type,
30
+ disabled: r.href && !r.disabled ? void 0 : r.disabled,
33
31
  "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)]),
32
+ "aria-describedby": W(a).describedBy.value,
33
+ onMouseenter: W(a).show,
34
+ onMouseleave: W(a).hide,
35
+ onFocus: W(a).showOnFocus,
36
+ onBlur: W(a).hide
37
+ }), {
38
+ default: q(() => [B(t.$slots, "default")]),
39
+ _: 3
40
+ }, 16, [
41
+ "href",
42
+ "type",
43
+ "disabled",
44
+ "aria-label",
45
+ "aria-describedby",
46
+ "onMouseenter",
47
+ "onMouseleave",
48
+ "onFocus",
49
+ "onBlur"
50
+ ]))]),
40
51
  _: 3
41
52
  }, 8, [
42
53
  "on",
43
54
  "show",
44
55
  "hide"
45
- ]), S(e, { state: F(a) }, null, 8, ["state"])], 64));
56
+ ]), k(e, { state: W(a) }, null, 8, ["state"])], 64));
46
57
  }
47
- }), nt = ["disabled"], K = /* @__PURE__ */ C({
58
+ }), qt = ["disabled"], Jt = /* @__PURE__ */ A({
48
59
  __name: "Badge",
49
60
  props: {
50
61
  tone: { default: "neutral" },
@@ -68,10 +79,10 @@ var et = [
68
79
  }
69
80
  },
70
81
  setup(e) {
71
- let t = e, n = h(() => t.hueIndex !== void 0 && (t.tone === "heading" || t.tone === "active")), r = h(() => [
82
+ let t = e, n = S(() => t.hueIndex !== void 0 && (t.tone === "heading" || t.tone === "active")), r = S(() => [
72
83
  n.value && "glim-hue",
73
84
  n.value && t.size === "heading" && "glim-notch-hue",
74
- be({
85
+ Ae({
75
86
  tone: t.tone,
76
87
  size: t.size,
77
88
  shape: t.shape,
@@ -81,112 +92,107 @@ var et = [
81
92
  insetStart: t.insetStart,
82
93
  action: t.as !== "span"
83
94
  })
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, {
95
+ ].filter(Boolean)), i = S(() => n.value ? We(t.hueIndex) : void 0);
96
+ return (t, n) => e.as === "button" && e.tip !== void 0 ? (L(), C(Kt, {
86
97
  key: 0,
87
98
  tip: e.tip,
88
99
  disabled: e.disabled,
89
- class: E(r.value),
90
- style: D(i.value)
100
+ class: N(r.value),
101
+ style: P(i.value)
91
102
  }, {
92
- default: R(() => [j(t.$slots, "default")]),
103
+ default: q(() => [B(t.$slots, "default")]),
93
104
  _: 3
94
105
  }, 8, [
95
106
  "tip",
96
107
  "disabled",
97
108
  "class",
98
109
  "style"
99
- ])) : e.as === "button" ? (k(), v("button", {
110
+ ])) : e.as === "button" ? (L(), T("button", {
100
111
  key: 1,
101
112
  type: "button",
102
113
  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", {
114
+ class: N(r.value),
115
+ style: P(i.value)
116
+ }, [B(t.$slots, "default")], 14, qt)) : e.as === "a" ? (L(), T("a", {
106
117
  key: 2,
107
- class: E(r.value),
108
- style: D(i.value)
109
- }, [j(t.$slots, "default")], 6)) : (k(), v("span", {
118
+ class: N(r.value),
119
+ style: P(i.value)
120
+ }, [B(t.$slots, "default")], 6)) : (L(), T("span", {
110
121
  key: 3,
111
- class: E(r.value),
112
- style: D(i.value)
113
- }, [j(t.$slots, "default")], 6));
122
+ class: N(r.value),
123
+ style: P(i.value)
124
+ }, [B(t.$slots, "default")], 6));
114
125
  }
115
- }), rt = ["innerHTML"], it = /* @__PURE__ */ C({
126
+ }), Yt = ["innerHTML"], Xt = /* @__PURE__ */ A({
116
127
  __name: "BrandMark",
117
128
  props: { svg: {} },
118
129
  setup(e) {
119
- return (t, n) => (k(), v("span", {
130
+ return (t, n) => (L(), T("span", {
120
131
  class: "glim-brand-svg",
121
132
  "aria-hidden": "true",
122
133
  innerHTML: e.svg
123
- }, null, 8, rt));
134
+ }, null, 8, Yt));
124
135
  }
125
136
  });
126
137
  // src/engines.ts
127
- function q(e) {
128
- let t = N(B(e));
129
- return O(We(() => t.value = B(e))), h({
138
+ function Zt(e) {
139
+ let t = H(Ue(e));
140
+ return I(Ot(() => t.value = Ue(e))), S({
130
141
  get: () => t.value,
131
142
  set: (t) => {
132
- He(e, t), Te();
143
+ wt(e, t), qe();
133
144
  }
134
145
  });
135
146
  }
136
- function at() {
137
- let e = N(Oe());
138
- return O(Ke(() => e.value = Oe())), h({
147
+ function Qt() {
148
+ let e = H(ut());
149
+ return I(At(() => e.value = ut())), S({
139
150
  get: () => e.value,
140
- set: (e) => _e(e)
151
+ set: (e) => De(e)
141
152
  });
142
153
  }
143
- function ot(e) {
144
- return h(() => {
154
+ function $t(e) {
155
+ return S(() => {
145
156
  let t = e();
146
- return t === void 0 ? void 0 : V(t);
157
+ return t === void 0 ? void 0 : We(t);
147
158
  });
148
159
  }
149
- function J(e, t) {
150
- let n = N(t()), r = new MutationObserver(() => n.value = t());
160
+ function en(e, t) {
161
+ let n = H(t()), r = new MutationObserver(() => n.value = t());
151
162
  return r.observe(document.documentElement, {
152
163
  attributes: !0,
153
164
  attributeFilter: [e]
154
- }), O(() => r.disconnect()), n;
165
+ }), I(() => r.disconnect()), n;
155
166
  }
156
- function st() {
157
- let e = J("data-shape", () => document.documentElement.getAttribute("data-shape") ?? le);
158
- return h({
167
+ function tn() {
168
+ let e = en("data-shape", () => document.documentElement.getAttribute("data-shape") ?? ve);
169
+ return S({
159
170
  get: () => e.value,
160
- set: ve
171
+ set: Oe
161
172
  });
162
173
  }
163
- function ct() {
164
- let e = J("data-motion", () => document.documentElement.getAttribute("data-motion") ?? ce);
165
- return h({
174
+ function nn() {
175
+ let e = en("data-motion", () => document.documentElement.getAttribute("data-motion") ?? _e);
176
+ return S({
166
177
  get: () => e.value,
167
- set: ge
178
+ set: Ee
168
179
  });
169
180
  }
170
- function lt() {
171
- let e = J("style", () => document.documentElement.style.getPropertyValue("--accent"));
172
- return h({
181
+ function rn() {
182
+ let e = en("style", () => document.documentElement.style.getPropertyValue("--accent"));
183
+ return S({
173
184
  get: () => e.value,
174
- set: (e) => he(e || void 0)
185
+ set: (e) => Te(e || void 0)
175
186
  });
176
187
  }
177
188
  // 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 = {
189
+ var an = {
184
190
  key: 0,
185
191
  class: "glim-btn-glyph"
186
- }, ft = {
192
+ }, on = {
187
193
  key: 0,
188
194
  class: "glim-spinner"
189
- }, Y = /* @__PURE__ */ C({
195
+ }, Z = /* @__PURE__ */ A({
190
196
  inheritAttrs: !1,
191
197
  __name: "Button",
192
198
  props: {
@@ -199,6 +205,7 @@ var ut = [
199
205
  type: Boolean,
200
206
  default: !1
201
207
  },
208
+ href: {},
202
209
  type: { default: "button" },
203
210
  title: {},
204
211
  hueIndex: {},
@@ -210,56 +217,86 @@ var ut = [
210
217
  keepLabel: {
211
218
  type: Boolean,
212
219
  default: !1
213
- }
220
+ },
221
+ compact: { type: Boolean },
222
+ compactBelow: {},
223
+ size: {}
214
224
  },
215
225
  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,
226
+ let a = r, o = Zt("buttons"), s = H(!1);
227
+ fe((e) => {
228
+ if (a.compactBelow === void 0) return void (s.value = !1);
229
+ let t = et(a.compactBelow), n = () => s.value = Ye(t);
230
+ n(), e(kt(t, n));
231
+ });
232
+ let c = S(() => a.glyph ?? (a.labelKey ? u(a.labelKey) : void 0) ?? (a.variant === "chip" ? m : void 0)), l = S(() => je({
233
+ mode: o.value,
218
234
  label: a.label,
219
235
  hasGlyph: !!c.value || a.busy,
220
236
  tone: a.tone,
221
237
  variant: a.variant,
222
238
  disabled: a.disabled,
223
239
  keepLabel: a.keepLabel,
240
+ compact: a.compact || s.value,
241
+ size: a.size,
224
242
  title: a.title,
225
243
  hueIndex: a.hueIndex,
226
244
  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;
245
+ })), d = S(() => !!a.href && !a.disabled), f = t(() => l.value.tip, () => a.disabled), p = H(null);
246
+ function h(e) {
247
+ p.value = e, f.trigger.value = p.value;
230
248
  }
231
- function b(e) {
232
- u.value.pageHue && W(e.currentTarget), d.show();
249
+ function g(e) {
250
+ l.value.pageHue && Nt(e.currentTarget), f.show();
233
251
  }
234
- function x(e) {
235
- u.value.pageHue && W(e.currentTarget), d.showOnFocus();
252
+ function _(e) {
253
+ l.value.pageHue && Nt(e.currentTarget), f.showOnFocus();
236
254
  }
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
255
+ return i({ el: p }), (t, i) => (L(), T(b, null, [k(W(n), {
256
+ on: r.disabled && !!l.value.tip,
257
+ show: W(f).show,
258
+ hide: W(f).hide
241
259
  }, {
242
- default: R(() => [y("button", T(t.$attrs, {
243
- ref: m,
244
- type: r.type,
245
- disabled: r.disabled,
260
+ default: q(() => [(L(), C(V(d.value ? "a" : "button"), M(t.$attrs, {
261
+ ref: h,
262
+ href: d.value ? r.href : void 0,
263
+ type: d.value ? void 0 : r.type,
264
+ disabled: d.value ? void 0 : r.disabled,
246
265
  "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
266
+ "aria-describedby": W(f).describedBy.value,
267
+ style: l.value.style,
268
+ class: l.value.className,
269
+ onMouseenter: g,
270
+ onMouseleave: W(f).hide,
271
+ onFocus: _,
272
+ onBlur: W(f).hide
273
+ }), {
274
+ default: q(() => [
275
+ B(t.$slots, "before"),
276
+ l.value.showGlyph ? (L(), T("span", an, [r.busy ? (L(), T("span", on)) : (L(), C(V(c.value), { key: 1 }))])) : w("", !0),
277
+ E("span", { class: N(l.value.labelClass) }, U(r.label), 3),
278
+ B(t.$slots, "after")
279
+ ]),
280
+ _: 3
281
+ }, 16, [
282
+ "href",
283
+ "type",
284
+ "disabled",
285
+ "aria-busy",
286
+ "aria-describedby",
287
+ "style",
288
+ "class",
289
+ "onMouseleave",
290
+ "onBlur"
291
+ ]))]),
292
+ _: 3
256
293
  }, 8, [
257
294
  "on",
258
295
  "show",
259
296
  "hide"
260
- ]), S(e, { state: F(d) }, null, 8, ["state"])], 64));
297
+ ]), k(e, { state: W(f) }, null, 8, ["state"])], 64));
261
298
  }
262
- }), pt = ["aria-label", "aria-describedby"], X = /* @__PURE__ */ C({
299
+ }), sn = ["aria-label", "aria-describedby"], Q = /* @__PURE__ */ A({
263
300
  __name: "InfoBubble",
264
301
  props: {
265
302
  tip: {},
@@ -270,49 +307,49 @@ var ut = [
270
307
  },
271
308
  setup(n) {
272
309
  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,
310
+ return (t, r) => (L(), T(b, null, [E("span", {
311
+ ref: (e) => W(i).trigger.value = e,
275
312
  "aria-label": n.tip,
276
- "aria-describedby": F(i).describedBy.value,
313
+ "aria-describedby": W(i).describedBy.value,
277
314
  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", {
315
+ class: N(n.onAccent ? "glim-info-icon glim-info-icon--on-accent" : "glim-info-icon"),
316
+ onMouseenter: r[0] ||= (...e) => W(i).show && W(i).show(...e),
317
+ onMouseleave: r[1] ||= (...e) => W(i).hide && W(i).hide(...e),
318
+ onFocus: r[2] ||= (...e) => W(i).showOnFocus && W(i).showOnFocus(...e),
319
+ onBlur: r[3] ||= (...e) => W(i).hide && W(i).hide(...e),
320
+ onClick: r[4] ||= Y(() => {}, ["prevent"])
321
+ }, [...r[5] ||= [E("svg", {
285
322
  viewBox: "0 0 16 16",
286
323
  width: "15",
287
324
  height: "15",
288
325
  fill: "none",
289
326
  "aria-hidden": "true"
290
327
  }, [
291
- y("circle", {
328
+ E("circle", {
292
329
  cx: "8",
293
330
  cy: "8",
294
331
  r: "7",
295
332
  stroke: "currentColor",
296
333
  "stroke-width": "1.3"
297
334
  }),
298
- y("circle", {
335
+ E("circle", {
299
336
  cx: "8",
300
337
  cy: "4.6",
301
338
  r: "0.9",
302
339
  fill: "currentColor"
303
340
  }),
304
- y("path", {
341
+ E("path", {
305
342
  d: "M8 7v4.4",
306
343
  stroke: "currentColor",
307
344
  "stroke-width": "1.3",
308
345
  "stroke-linecap": "round"
309
346
  })
310
- ], -1)]], 42, pt), S(e, { state: F(i) }, null, 8, ["state"])], 64));
347
+ ], -1)]], 42, sn), k(e, { state: W(i) }, null, 8, ["state"])], 64));
311
348
  }
312
- }), mt = {
349
+ }), cn = {
313
350
  key: 0,
314
351
  class: "glim-panel-heading"
315
- }, Z = /* @__PURE__ */ C({
352
+ }, ln = /* @__PURE__ */ A({
316
353
  __name: "Card",
317
354
  props: {
318
355
  title: {},
@@ -321,9 +358,9 @@ var ut = [
321
358
  nested: { type: Boolean }
322
359
  },
323
360
  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([
361
+ let t = e, n = S(() => t.hueIndex === void 0 ? void 0 : We(t.hueIndex));
362
+ return (t, r) => (L(), T("div", {
363
+ class: N([
327
364
  "glim-panel",
328
365
  "glim-notch-card",
329
366
  {
@@ -331,31 +368,158 @@ var ut = [
331
368
  "glim-hue": e.hueIndex !== void 0
332
369
  }
333
370
  ]),
334
- style: D(n.value)
335
- }, [e.title || e.hint ? (k(), v("h2", mt, [S(K, {
371
+ style: P(n.value)
372
+ }, [e.title || e.hint || t.$slots.title ? (L(), T("h2", cn, [k(Jt, {
336
373
  tone: "heading",
337
374
  size: "heading",
338
375
  wrap: "",
339
376
  "hue-index": e.hueIndex
340
377
  }, {
341
- default: R(() => [x(P(e.title) + " ", 1), e.hint ? (k(), g(X, {
378
+ default: q(() => [B(t.$slots, "title", {}, () => [O(U(e.title), 1)]), e.hint ? (L(), C(Q, {
342
379
  key: 0,
343
380
  tip: e.hint,
344
381
  "on-accent": ""
345
- }, null, 8, ["tip"])) : _("", !0)]),
346
- _: 1
347
- }, 8, ["hue-index"])])) : _("", !0), j(t.$slots, "default")], 6));
382
+ }, null, 8, ["tip"])) : w("", !0)]),
383
+ _: 3
384
+ }, 8, ["hue-index"])])) : w("", !0), B(t.$slots, "default")], 6));
385
+ }
386
+ }), un = [
387
+ "aria-checked",
388
+ "aria-label",
389
+ "disabled"
390
+ ], dn = {
391
+ class: "glim-checkbox-box",
392
+ "aria-hidden": "true"
393
+ }, fn = { key: 0 }, pn = /* @__PURE__ */ A({
394
+ __name: "Checkbox",
395
+ props: /*@__PURE__*/ j({
396
+ label: {},
397
+ hideLabel: {
398
+ type: Boolean,
399
+ default: !1
400
+ },
401
+ slim: {
402
+ type: Boolean,
403
+ default: !1
404
+ },
405
+ disabled: {
406
+ type: Boolean,
407
+ default: !1
408
+ }
409
+ }, {
410
+ modelValue: {
411
+ type: Boolean,
412
+ required: !0
413
+ },
414
+ modelModifiers: {}
415
+ }),
416
+ emits: ["update:modelValue"],
417
+ setup(e) {
418
+ let t = e, n = S(() => t.hideLabel || t.slim), r = G(e, "modelValue");
419
+ return (t, i) => (L(), T("button", {
420
+ type: "button",
421
+ role: "checkbox",
422
+ "aria-checked": r.value,
423
+ "aria-label": n.value ? e.label : void 0,
424
+ disabled: e.disabled,
425
+ class: N(["glim-checkbox", { "glim-checkbox--slim": e.slim }]),
426
+ onClick: i[0] ||= (e) => r.value = !r.value
427
+ }, [E("span", dn, [k(W(d))]), n.value ? w("", !0) : (L(), T("span", fn, U(e.label), 1))], 10, un));
348
428
  }
349
- }), ht = { class: "glim-modal-head" }, gt = {
429
+ }), mn = { class: "glim-picker-foot" }, hn = {
430
+ key: 0,
431
+ class: "glim-picker-name"
432
+ }, gn = ["value", "aria-label"], _n = { class: "glim-picker-actions" }, vn = /* @__PURE__ */ A({
433
+ __name: "ColorPicker",
434
+ props: /*@__PURE__*/ j({
435
+ anchor: { default: null },
436
+ names: {
437
+ type: [Array, Boolean],
438
+ default: () => me
439
+ },
440
+ text: {}
441
+ }, {
442
+ modelValue: { required: !0 },
443
+ modelModifiers: {}
444
+ }),
445
+ emits: /*@__PURE__*/ j([
446
+ "apply",
447
+ "input",
448
+ "close"
449
+ ], ["update:modelValue"]),
450
+ setup(e, { emit: t }) {
451
+ let n = e, r = G(e, "modelValue"), i = t, a = {
452
+ ...he,
453
+ ...n.text
454
+ }, o = H(null), s = H(null), c = R(nt(r.value) ?? "#000000"), l = R(c.value), u = S(() => n.names === !1 ? null : tt(c.value, n.names)), f = Pe(c.value, (e) => {
455
+ c.value = e, l.value = e, i("input", e);
456
+ }, { text: a }), p;
457
+ F(() => {
458
+ s.value.appendChild(f.el), n.anchor && o.value && (p = Re(o.value, n.anchor, () => i("close")), f.focus());
459
+ }), re(() => p?.()), K(r, (e) => {
460
+ let t = nt(e);
461
+ t && (c.value = t, l.value = t, f.setValue(t));
462
+ });
463
+ function m(e) {
464
+ l.value = e.target.value;
465
+ let t = nt(l.value);
466
+ t && (c.value = t, f.setValue(t), i("input", t));
467
+ }
468
+ function h() {
469
+ r.value = c.value, i("apply", c.value, u.value), n.anchor && (n.anchor.focus(), i("close"));
470
+ }
471
+ function g(e) {
472
+ e.key === "Enter" && !(e.target instanceof HTMLButtonElement) && (e.preventDefault(), h());
473
+ }
474
+ return (t, n) => (L(), C(x, {
475
+ to: "body",
476
+ disabled: !e.anchor
477
+ }, [E("div", {
478
+ ref_key: "panel",
479
+ ref: o,
480
+ class: N(["glim-picker-panel", e.anchor && "glim-picker-panel--float"]),
481
+ style: P({ "--glim-picker-colour": c.value }),
482
+ onKeydown: g
483
+ }, [
484
+ E("div", {
485
+ ref_key: "host",
486
+ ref: s,
487
+ style: { display: "contents" }
488
+ }, null, 512),
489
+ E("div", mn, [
490
+ n[0] ||= E("span", {
491
+ class: "glim-picker-swatch",
492
+ "aria-hidden": "true"
493
+ }, null, -1),
494
+ u.value === null ? w("", !0) : (L(), T("span", hn, U(u.value), 1)),
495
+ E("input", {
496
+ class: "glim-picker-hex",
497
+ value: l.value,
498
+ maxlength: "7",
499
+ spellcheck: "false",
500
+ "aria-label": a.hex,
501
+ onInput: m
502
+ }, null, 40, gn)
503
+ ]),
504
+ E("div", _n, [k(Z, {
505
+ label: a.apply,
506
+ "label-key": "apply",
507
+ glyph: W(d),
508
+ tone: "accent",
509
+ onClick: h
510
+ }, null, 8, ["label", "glyph"])])
511
+ ], 38)], 8, ["disabled"]));
512
+ }
513
+ }), yn = { class: "glim-modal-head" }, bn = {
350
514
  id: "confirmdialog-title",
351
515
  class: "glim-modal-title"
352
- }, _t = { class: "glim-modal-body" }, vt = {
516
+ }, xn = { class: "glim-modal-body" }, Sn = {
353
517
  id: "confirmdialog-message",
354
518
  class: "glim-modal-text"
355
- }, yt = {
519
+ }, Cn = {
356
520
  key: 0,
357
521
  class: "glim-modal-extra"
358
- }, bt = { class: "glim-modal-foot" }, xt = /* @__PURE__ */ C({
522
+ }, wn = { class: "glim-modal-foot" }, Tn = /* @__PURE__ */ A({
359
523
  __name: "ConfirmDialog",
360
524
  props: {
361
525
  title: {},
@@ -368,11 +532,11 @@ var ut = [
368
532
  },
369
533
  emits: ["confirm", "cancel"],
370
534
  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", {
535
+ let r = n, i = H(null), a = H(null);
536
+ return F(() => a.value?.el?.focus()), t({ card: i }), (t, n) => (L(), T("div", {
373
537
  class: "glim-modal-backdrop",
374
- onClick: n[3] ||= z((e) => r("cancel"), ["self"])
375
- }, [y("div", {
538
+ onClick: n[3] ||= Y((e) => r("cancel"), ["self"])
539
+ }, [E("div", {
376
540
  ref_key: "card",
377
541
  ref: i,
378
542
  role: "dialog",
@@ -381,30 +545,30 @@ var ut = [
381
545
  "aria-describedby": "confirmdialog-message",
382
546
  class: "glim-modal-card"
383
547
  }, [
384
- y("div", ht, [y("h2", gt, [S(K, {
548
+ E("div", yn, [E("h2", bn, [k(Jt, {
385
549
  tone: "heading",
386
550
  size: "heading",
387
551
  wrap: ""
388
552
  }, {
389
- default: R(() => [x(P(e.title), 1)]),
553
+ default: q(() => [O(U(e.title), 1)]),
390
554
  _: 1
391
- })]), e.closeLabel === void 0 ? _("", !0) : (k(), g(Y, {
555
+ })]), e.closeLabel === void 0 ? w("", !0) : (L(), C(Z, {
392
556
  key: 0,
393
557
  label: e.closeLabel,
394
558
  "label-key": "common.close",
395
- glyph: F(l),
559
+ glyph: W(m),
396
560
  class: "glim-modal-close",
397
561
  onClick: n[0] ||= (e) => r("cancel")
398
562
  }, 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, {
563
+ E("div", xn, [E("p", Sn, U(e.message), 1), t.$slots.extra ? (L(), T("div", Cn, [B(t.$slots, "extra")])) : w("", !0)]),
564
+ E("div", wn, [k(Z, {
401
565
  ref_key: "cancel",
402
566
  ref: a,
403
567
  label: e.cancelLabel,
404
568
  "label-key": "common.cancel",
405
- glyph: F(d),
569
+ glyph: W(g),
406
570
  onClick: n[1] ||= (e) => r("cancel")
407
- }, null, 8, ["label", "glyph"]), S(Y, {
571
+ }, null, 8, ["label", "glyph"]), k(Z, {
408
572
  label: e.confirmLabel,
409
573
  "label-key": e.confirmLabelKey ?? null,
410
574
  glyph: e.confirmGlyph,
@@ -416,14 +580,288 @@ var ut = [
416
580
  ])])
417
581
  ], 512)]));
418
582
  }
419
- }), St = {
583
+ }), En = { class: "glim-kbd" }, Dn = /* @__PURE__ */ A({
584
+ __name: "Kbd",
585
+ setup(e) {
586
+ return (e, t) => (L(), T("kbd", En, [B(e.$slots, "default")]));
587
+ }
588
+ }), On = {
589
+ key: 0,
590
+ class: "glim-menu-sep",
591
+ role: "separator"
592
+ }, kn = {
593
+ key: 1,
594
+ class: "glim-menu-head",
595
+ role: "presentation"
596
+ }, An = [
597
+ "role",
598
+ "aria-checked",
599
+ "aria-haspopup",
600
+ "aria-expanded",
601
+ "disabled",
602
+ "data-row",
603
+ "onClick"
604
+ ], jn = {
605
+ key: 0,
606
+ class: "glim-checkbox-box",
607
+ "aria-hidden": "true"
608
+ }, Mn = {
609
+ key: 2,
610
+ class: "glim-menu-glyph",
611
+ "aria-hidden": "true"
612
+ }, Nn = { class: "glim-menu-label" }, Pn = {
613
+ key: 3,
614
+ class: "glim-menu-end glim-menu-caret",
615
+ "aria-hidden": "true"
616
+ }, Fn = {
617
+ key: 4,
618
+ class: "glim-menu-end glim-menu-tick",
619
+ "aria-hidden": "true"
620
+ }, In = {
621
+ key: 6,
622
+ class: "glim-menu-end glim-menu-count glim-num"
623
+ }, Ln = /* @__PURE__ */ A({
624
+ __name: "MenuRows",
625
+ props: {
626
+ entries: {},
627
+ openAt: {}
628
+ },
629
+ emits: ["pick"],
630
+ setup(e, { emit: t }) {
631
+ let n = e, i = t, a = S(() => n.entries.map((e) => e === "-" ? { kind: "sep" } : Ge(e) ? {
632
+ kind: "head",
633
+ head: e
634
+ } : {
635
+ kind: "item",
636
+ item: e,
637
+ view: Qe(e)
638
+ }));
639
+ return (t, n) => (L(!0), T(b, null, z(a.value, (t, n) => (L(), T(b, { key: n }, [t.kind === "sep" ? (L(), T("div", On)) : t.kind === "head" ? (L(), T("div", kn, [E("span", null, U(t.head.head), 1), t.head.edit ? (L(), C(Kt, {
640
+ key: 0,
641
+ tip: t.head.edit.tip,
642
+ role: "menuitem",
643
+ tabindex: "-1",
644
+ class: "glim-menu-head-edit",
645
+ "data-row": n,
646
+ onClick: (e) => i("pick", n)
647
+ }, {
648
+ default: q(() => [(L(), C(V(t.head.edit.glyph ?? W(l))))]),
649
+ _: 2
650
+ }, 1032, [
651
+ "tip",
652
+ "data-row",
653
+ "onClick"
654
+ ])) : w("", !0)])) : (L(), T("button", {
655
+ key: 2,
656
+ type: "button",
657
+ role: t.view.role,
658
+ tabindex: "-1",
659
+ "aria-checked": t.view.role === "menuitem" ? void 0 : t.item.checked,
660
+ "aria-haspopup": t.item.sub ? "menu" : void 0,
661
+ "aria-expanded": t.item.sub ? e.openAt === n : void 0,
662
+ disabled: t.item.disabled,
663
+ class: N(["glim-menu-item", { "glim-menu-item--current": t.view.current }]),
664
+ "data-row": n,
665
+ onClick: (e) => i("pick", n)
666
+ }, [
667
+ t.view.lead === "box" ? (L(), T("span", jn, [k(W(d))])) : t.view.lead === "dot" ? (L(), T("span", {
668
+ key: 1,
669
+ class: "glim-menu-dot",
670
+ style: P({ backgroundColor: t.item.color }),
671
+ "aria-hidden": "true"
672
+ }, null, 4)) : (L(), T("span", Mn, [t.view.lead === "glyph" ? (L(), C(V(t.item.glyph), { key: 0 })) : w("", !0)])),
673
+ E("span", Nn, U(t.item.label), 1),
674
+ t.view.end === "submenu" ? (L(), T("span", Pn, [k(W(r))])) : t.view.end === "tick" ? (L(), T("span", Fn, [k(W(d))])) : t.view.end === "shortcut" ? (L(), C(Dn, {
675
+ key: 5,
676
+ class: "glim-menu-end"
677
+ }, {
678
+ default: q(() => [O(U(t.item.shortcut), 1)]),
679
+ _: 2
680
+ }, 1024)) : t.view.end === "count" ? (L(), T("span", In, U(t.item.count), 1)) : w("", !0)
681
+ ], 10, An))], 64))), 128));
682
+ }
683
+ }), Rn = ["id", "aria-label"], zn = ["id", "aria-label"], Bn = /* @__PURE__ */ A({
684
+ __name: "ContextMenu",
685
+ props: {
686
+ x: {},
687
+ y: {},
688
+ items: {},
689
+ above: {
690
+ type: Boolean,
691
+ default: !1
692
+ },
693
+ label: { default: void 0 },
694
+ id: {},
695
+ opener: { default: null }
696
+ },
697
+ emits: ["close", "step"],
698
+ setup(e, { emit: t }) {
699
+ let n = e, r = t, i = H(null), a = H(null), o = He(), s = R({
700
+ left: n.x,
701
+ top: n.y
702
+ }), c = H(null), l = R(null), u = S(() => Ft(n.items)), d = S(() => {
703
+ let e = c.value ? u.value[c.value.at] : void 0;
704
+ return e && e !== "-" && !Ge(e) && e.sub ? e : null;
705
+ }), f = S(() => d.value?.sub ? Ft(d.value.sub) : null), p = () => ({
706
+ width: innerWidth,
707
+ height: innerHeight
708
+ });
709
+ function m(e) {
710
+ r("close"), e && mt(n.opener ?? o);
711
+ }
712
+ function h() {
713
+ let e = i.value;
714
+ e && (s.value = ot(n.x, n.y, {
715
+ width: e.offsetWidth,
716
+ height: e.offsetHeight
717
+ }, p(), n.above));
718
+ }
719
+ K(() => [
720
+ n.x,
721
+ n.y,
722
+ n.above
723
+ ], h, { flush: "post" });
724
+ let g, _;
725
+ F(() => {
726
+ h(), g = Me(m), _ = Ne(() => [
727
+ i.value,
728
+ a.value,
729
+ n.opener
730
+ ], () => m(!1)), i.value && ze(i.value);
731
+ }), ie(() => {
732
+ g?.(), _?.();
733
+ }), K(c, (e) => {
734
+ l.value = null;
735
+ let t = e && i.value?.querySelector(`[data-row="${e.at}"]`), n = a.value;
736
+ if (!e || !t || !n) return;
737
+ let r = getComputedStyle(i.value).direction === "rtl";
738
+ l.value = st(t.getBoundingClientRect(), {
739
+ width: n.offsetWidth,
740
+ height: n.offsetHeight
741
+ }, p(), r), e.focus && ze(n);
742
+ }, { flush: "post" });
743
+ function v(e, t) {
744
+ let n = e[t];
745
+ n !== "-" && (Ge(n) ? (m(!0), n.edit?.onSelect()) : n.sub && e === u.value ? c.value = {
746
+ at: t,
747
+ focus: !0
748
+ } : (Qe(n).staysOpen || m(!0), n.onSelect?.()));
749
+ }
750
+ function y(e, t) {
751
+ if (e.key === "Tab") return m(!1);
752
+ let n = e.currentTarget, a = Ze(e.key, getComputedStyle(n).direction === "rtl");
753
+ if (!a) return;
754
+ if (e.preventDefault(), a !== "in" && a !== "out") return Be(n, a);
755
+ if (t) {
756
+ a === "out" && c.value && (i.value?.querySelector(`[data-row="${c.value.at}"]`)?.focus(), c.value = null);
757
+ return;
758
+ }
759
+ let o = Number(document.activeElement?.dataset.row), s = u.value[o];
760
+ a === "in" && s && s !== "-" && !Ge(s) && s.sub && !s.disabled ? c.value = {
761
+ at: o,
762
+ focus: !0
763
+ } : r("step", a === "in" ? 1 : -1);
764
+ }
765
+ function ee(e) {
766
+ let t = e.target.closest("[data-row]");
767
+ if (!t) return;
768
+ let n = Number(t.dataset.row), r = u.value[n], i = r !== "-" && !Ge(r) && !!r.sub && !r.disabled;
769
+ i && c.value?.at !== n ? c.value = {
770
+ at: n,
771
+ focus: !1
772
+ } : !i && c.value && (c.value = null);
773
+ }
774
+ return (t, n) => (L(), C(x, { to: "body" }, [E("div", {
775
+ id: e.id,
776
+ ref_key: "menu",
777
+ ref: i,
778
+ role: "menu",
779
+ "aria-label": e.label,
780
+ class: "glim-menu",
781
+ style: P({
782
+ left: `${s.value.left}px`,
783
+ top: `${s.value.top}px`
784
+ }),
785
+ onKeydown: n[1] ||= (e) => y(e, !1),
786
+ onMouseover: ee,
787
+ onContextmenu: n[2] ||= Y(() => {}, ["prevent"])
788
+ }, [k(Ln, {
789
+ entries: u.value,
790
+ "open-at": c.value?.at,
791
+ onPick: n[0] ||= (e) => v(u.value, e)
792
+ }, null, 8, ["entries", "open-at"])], 44, Rn), f.value ? (L(), T("div", {
793
+ key: 0,
794
+ id: d.value?.subId,
795
+ ref_key: "subMenu",
796
+ ref: a,
797
+ role: "menu",
798
+ "aria-label": d.value?.label,
799
+ class: "glim-menu",
800
+ style: P({
801
+ left: `${l.value?.left ?? 0}px`,
802
+ top: `${l.value?.top ?? 0}px`
803
+ }),
804
+ onKeydown: n[4] ||= (e) => y(e, !0),
805
+ onContextmenu: n[5] ||= Y(() => {}, ["prevent"])
806
+ }, [k(Ln, {
807
+ entries: f.value,
808
+ onPick: n[3] ||= (e) => v(f.value, e)
809
+ }, null, 8, ["entries"])], 44, zn)) : w("", !0)]));
810
+ }
811
+ }), Vn = ["value", "aria-label"], Hn = {
812
+ role: "status",
813
+ class: "glim-sr-only"
814
+ }, Un = /* @__PURE__ */ A({
815
+ __name: "CopyField",
816
+ props: {
817
+ value: {},
818
+ label: {},
819
+ width: {},
820
+ text: { default: () => ({
821
+ copy: "Copy",
822
+ copied: "Copied"
823
+ }) }
824
+ },
825
+ emits: ["copy"],
826
+ setup(e, { emit: t }) {
827
+ let n = e, r = t, i = y(() => n.label), a = R(!1), o = H(null), s;
828
+ re(() => clearTimeout(s));
829
+ async function l() {
830
+ let e = await Fe(n.value);
831
+ r("copy", e), e ? (a.value = !0, clearTimeout(s), s = window.setTimeout(() => a.value = !1, ge)) : (o.value?.focus(), o.value?.select());
832
+ }
833
+ return (t, n) => (L(), T("span", { class: N(["glim-copy", W(Le)(e.width)]) }, [
834
+ E("input", {
835
+ ref_key: "field",
836
+ ref: o,
837
+ readonly: "",
838
+ value: e.value,
839
+ "aria-label": W(i),
840
+ spellcheck: "false",
841
+ class: "glim-input glim-input--mono"
842
+ }, null, 8, Vn),
843
+ k(Z, {
844
+ label: a.value ? e.text.copied : e.text.copy,
845
+ "label-key": a.value ? "copied" : "copy",
846
+ glyph: a.value ? W(d) : W(c),
847
+ variant: "icon",
848
+ onClick: l
849
+ }, null, 8, [
850
+ "label",
851
+ "label-key",
852
+ "glyph"
853
+ ]),
854
+ E("span", Hn, U(a.value ? e.text.copied : ""), 1)
855
+ ], 2));
856
+ }
857
+ }), Wn = {
420
858
  key: 0,
421
859
  class: "glim-empty-glyph",
422
860
  "aria-hidden": "true"
423
- }, Ct = { class: "glim-empty-title" }, wt = {
861
+ }, Gn = { class: "glim-empty-title" }, Kn = {
424
862
  key: 1,
425
863
  class: "glim-empty-hint"
426
- }, Tt = /* @__PURE__ */ C({
864
+ }, qn = /* @__PURE__ */ A({
427
865
  __name: "EmptyState",
428
866
  props: {
429
867
  glyph: {},
@@ -435,28 +873,187 @@ var ut = [
435
873
  }
436
874
  },
437
875
  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")
876
+ return (t, n) => (L(), T("div", { class: N(e.nested ? "glim-empty" : "glim-card glim-empty") }, [
877
+ e.glyph ? (L(), T("span", Wn, [(L(), C(V(e.glyph)))])) : w("", !0),
878
+ E("p", Gn, U(e.title), 1),
879
+ e.hint ? (L(), T("p", Kn, U(e.hint), 1)) : w("", !0),
880
+ B(t.$slots, "default")
443
881
  ], 2));
444
882
  }
445
- }), Et = {
883
+ }), Jn = /* @__PURE__ */ A({
884
+ __name: "Pill",
885
+ props: { tone: { default: "neutral" } },
886
+ setup(e) {
887
+ let t = e, n = S(() => at(t.tone));
888
+ return (e, t) => (L(), T("span", { class: N(n.value) }, [B(e.$slots, "default")], 2));
889
+ }
890
+ }), Yn = { class: "glim-field-row-name" }, Xn = {
891
+ key: 0,
892
+ class: "glim-field-row-controls"
893
+ }, Zn = /* @__PURE__ */ A({
894
+ __name: "FieldRow",
895
+ props: {
896
+ label: {},
897
+ hint: {},
898
+ value: {},
899
+ tone: {},
900
+ wide: { type: Boolean }
901
+ },
902
+ setup(e) {
903
+ let t = e;
904
+ ae(ee, S(() => t.label));
905
+ let n = ne(v, !1), r = H(null);
906
+ return (t, i) => (L(), T("div", {
907
+ ref_key: "row",
908
+ ref: r,
909
+ class: N(["glim-field-row", { "glim-field-row--wide": e.wide }])
910
+ }, [E("span", Yn, [E("span", {
911
+ class: "glim-field-row-label",
912
+ onClick: i[0] ||= (e) => W(ct)(r.value)
913
+ }, [B(t.$slots, "label", {}, () => [O(U(e.label), 1)])]), e.hint ? (L(), C(Q, {
914
+ key: 0,
915
+ tip: e.hint
916
+ }, null, 8, ["tip"])) : w("", !0)]), W(n) ? (L(), T("span", Xn, [B(t.$slots, "default", {}, () => [e.value === void 0 ? w("", !0) : (L(), C(Jn, {
917
+ key: 0,
918
+ class: "glim-num",
919
+ tone: e.tone
920
+ }, {
921
+ default: q(() => [O(U(e.value), 1)]),
922
+ _: 1
923
+ }, 8, ["tone"]))])])) : B(t.$slots, "default", {}, () => [e.value === void 0 ? w("", !0) : (L(), C(Jn, {
924
+ key: 0,
925
+ class: "glim-num",
926
+ tone: e.tone
927
+ }, {
928
+ default: q(() => [O(U(e.value), 1)]),
929
+ _: 1
930
+ }, 8, ["tone"]))], void 0, 1)], 2));
931
+ }
932
+ }), Qn = /* @__PURE__ */ A({
933
+ __name: "FieldRowGroup",
934
+ props: { columns: {} },
935
+ setup(e) {
936
+ return ae(v, !0), (t, n) => (L(), T("div", {
937
+ class: "glim-field-row-group",
938
+ style: P(e.columns ? { "--field-columns": e.columns } : void 0)
939
+ }, [B(t.$slots, "default")], 4));
940
+ }
941
+ }), $n = {
942
+ class: "glim-glyph-field-glyph",
943
+ "aria-hidden": "true"
944
+ }, er = ["aria-label"], tr = /* @__PURE__ */ A({
945
+ inheritAttrs: !1,
946
+ __name: "GlyphField",
947
+ props: /*@__PURE__*/ j({
948
+ glyph: {},
949
+ label: {},
950
+ mono: { type: Boolean },
951
+ width: {}
952
+ }, {
953
+ modelValue: { default: "" },
954
+ modelModifiers: {}
955
+ }),
956
+ emits: ["update:modelValue"],
957
+ setup(e, { expose: t }) {
958
+ let n = e, r = G(e, "modelValue"), i = y(() => n.label), a = S(() => Le(n.width)), o = H(null);
959
+ return t({ input: o }), (t, n) => (L(), T("label", {
960
+ class: N([
961
+ "glim-input",
962
+ "glim-glyph-field",
963
+ a.value,
964
+ { "glim-input--mono": e.mono },
965
+ t.$attrs.class
966
+ ]),
967
+ style: P(t.$attrs.style)
968
+ }, [
969
+ E("span", $n, [(L(), C(V(e.glyph)))]),
970
+ J(E("input", M({
971
+ ref_key: "input",
972
+ ref: o,
973
+ "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
974
+ type: "text",
975
+ "aria-label": W(i)
976
+ }, {
977
+ ...t.$attrs,
978
+ class: void 0,
979
+ style: void 0
980
+ }, { class: "glim-glyph-field-input" }), null, 16, er), [[de, r.value]]),
981
+ B(t.$slots, "after")
982
+ ], 6));
983
+ }
984
+ }), nr = /* @__PURE__ */ A({
985
+ __name: "GlyphTile",
986
+ props: {
987
+ glyph: {},
988
+ quiet: { type: Boolean },
989
+ ground: { type: Boolean },
990
+ active: { type: Boolean }
991
+ },
992
+ setup(e) {
993
+ return (t, n) => (L(), T("span", {
994
+ class: N(["glim-tile", {
995
+ "glim-tile--quiet": e.quiet,
996
+ "glim-tile--ground": e.ground,
997
+ "glim-tile--active": e.active
998
+ }]),
999
+ "aria-hidden": "true"
1000
+ }, [(L(), C(V(e.glyph)))], 2));
1001
+ }
1002
+ }), rr = {
1003
+ key: 0,
1004
+ class: "glim-icon-btn-gap",
1005
+ "aria-hidden": "true"
1006
+ }, ir = /* @__PURE__ */ A({
1007
+ __name: "IconButton",
1008
+ props: {
1009
+ tip: {},
1010
+ glyph: {},
1011
+ href: {},
1012
+ pressed: {
1013
+ type: Boolean,
1014
+ default: void 0
1015
+ },
1016
+ absent: { type: Boolean },
1017
+ disabled: { type: Boolean }
1018
+ },
1019
+ setup(e) {
1020
+ function t(e) {
1021
+ Nt(e.currentTarget);
1022
+ }
1023
+ return (n, r) => e.absent ? (L(), T("span", rr)) : (L(), C(Kt, {
1024
+ key: 1,
1025
+ tip: e.tip,
1026
+ href: e.href,
1027
+ "aria-pressed": e.pressed,
1028
+ disabled: e.disabled,
1029
+ class: "glim-btn-bare glim-icon-btn",
1030
+ onPointerenter: t,
1031
+ onFocusin: t
1032
+ }, {
1033
+ default: q(() => [(L(), C(V(e.glyph)))]),
1034
+ _: 1
1035
+ }, 8, [
1036
+ "tip",
1037
+ "href",
1038
+ "aria-pressed",
1039
+ "disabled"
1040
+ ]));
1041
+ }
1042
+ }), ar = {
446
1043
  key: 0,
447
1044
  class: "glim-readme-btn-art",
448
1045
  "aria-hidden": "true"
449
- }, Dt = { class: "glim-readme-btn-text" }, Ot = { class: "glim-readme-btn-name" }, kt = {
1046
+ }, or = { class: "glim-readme-btn-text" }, sr = { class: "glim-readme-btn-name" }, cr = {
450
1047
  key: 0,
451
1048
  class: "glim-readme-btn-sub"
452
- }, At = {
1049
+ }, lr = {
453
1050
  key: 0,
454
1051
  class: "glim-readme-btn-sheen",
455
1052
  "aria-hidden": "true"
456
- }, jt = {
1053
+ }, ur = {
457
1054
  key: 1,
458
1055
  class: "glim-readme-btn-hint"
459
- }, Q = /* @__PURE__ */ C({
1056
+ }, $ = /* @__PURE__ */ A({
460
1057
  __name: "ReadmeButton",
461
1058
  props: {
462
1059
  brand: {},
@@ -471,10 +1068,10 @@ var ut = [
471
1068
  },
472
1069
  emits: ["linkClick"],
473
1070
  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?.());
1071
+ let n = e, r = t, i = S(() => ft(n.parts)), a = H(null), o = S(() => n.parts.map((e) => `${e.name}\n${e.sub ?? ""}`).join("\n") + (i.value ? n.soonLabel : "")), s;
1072
+ K([a, o], () => {
1073
+ s?.(), s = a.value ? Ke(a.value) : void 0;
1074
+ }, { flush: "post" }), I(() => s?.());
478
1075
  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
1076
  href: e.href,
480
1077
  target: "_blank",
@@ -484,27 +1081,27 @@ var ut = [
484
1081
  type: "button",
485
1082
  onClick: e.onClick
486
1083
  };
487
- return (t, n) => (k(), v("div", {
1084
+ return (t, n) => (L(), T("div", {
488
1085
  ref_key: "root",
489
1086
  ref: a,
490
- class: E(F(je)(e.brand, e.parts.length, e.note, i.value))
1087
+ class: N(W(pt)(e.brand, e.parts.length, e.note, i.value))
491
1088
  }, [
492
- (k(!0), v(p, null, A(e.parts, (n, r) => (k(), g(M(u(n)), T({ key: r }, { ref_for: !0 }, d(n), {
1089
+ (L(!0), T(b, null, z(e.parts, (n, r) => (L(), C(V(u(n)), M({ key: r }, { ref_for: !0 }, d(n), {
493
1090
  "aria-label": l(n),
494
- class: F(ke)(r, i.value)
1091
+ class: W(dt)(r, i.value)
495
1092
  }), {
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", {
1093
+ default: q(() => [r === 0 && t.$slots.art ? (L(), T("span", ar, [B(t.$slots, "art")])) : (L(), T(b, { key: 1 }, [r === 0 && t.$slots.mark ? (L(), T("span", {
497
1094
  key: 0,
498
- class: E(`glim-readme-btn-mark ${e.markClass ?? ""}`),
1095
+ class: N(`glim-readme-btn-mark ${e.markClass ?? ""}`),
499
1096
  "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))]),
1097
+ }, [B(t.$slots, "mark")], 2)) : w("", !0), E("span", or, [E("span", sr, U(n.name), 1), c(n) ? (L(), T("span", cr, U(c(n)), 1)) : w("", !0)])], 64))]),
501
1098
  _: 2
502
1099
  }, 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)
1100
+ i.value ? w("", !0) : (L(), T("span", lr)),
1101
+ e.hint ? (L(), T("span", ur, [k(Q, { tip: e.hint }, null, 8, ["tip"])])) : w("", !0)
505
1102
  ], 2));
506
1103
  }
507
- }), Mt = { class: "glim-info-text" }, Nt = { class: "glim-info-text" }, Pt = { class: "glim-readme-btn-rows glim-about-give" }, Ft = /* @__PURE__ */ C({
1104
+ }), dr = { class: "glim-info-text" }, fr = { class: "glim-info-text" }, pr = { class: "glim-readme-btn-rows glim-about-give" }, mr = /* @__PURE__ */ A({
508
1105
  __name: "InfoAboutCard",
509
1106
  props: {
510
1107
  text: {},
@@ -517,25 +1114,25 @@ var ut = [
517
1114
  hueIndex: {}
518
1115
  },
519
1116
  setup(e) {
520
- return (t, n) => (k(), g(Z, {
1117
+ return (t, n) => (L(), C(ln, {
521
1118
  title: e.text.title,
522
1119
  "hue-index": e.hueIndex
523
1120
  }, {
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, {
1121
+ default: q(() => [
1122
+ E("p", dr, U(e.text.body), 1),
1123
+ E("p", fr, U(e.text.coffee), 1),
1124
+ E("div", pr, [
1125
+ k($, {
529
1126
  brand: "coffee",
530
1127
  parts: [{
531
1128
  name: e.text.coffeeButton,
532
1129
  onClick: e.onCoffee
533
1130
  }]
534
1131
  }, {
535
- art: R(() => [(k(), g(M(e.coffeeArt)))]),
1132
+ art: q(() => [(L(), C(V(e.coffeeArt)))]),
536
1133
  _: 1
537
1134
  }, 8, ["parts"]),
538
- e.onPaypal && e.text.paypalButton ? (k(), g(Q, {
1135
+ e.onPaypal && e.text.paypalButton ? (L(), C($, {
539
1136
  key: 0,
540
1137
  brand: "paypal",
541
1138
  parts: [{
@@ -543,12 +1140,12 @@ var ut = [
543
1140
  onClick: e.onPaypal
544
1141
  }],
545
1142
  "mark-class": "glim-paypal-mark"
546
- }, b({ _: 2 }, [e.paypalGlyph ? {
1143
+ }, D({ _: 2 }, [e.paypalGlyph ? {
547
1144
  name: "mark",
548
- fn: R(() => [(k(), g(M(e.paypalGlyph)))]),
1145
+ fn: q(() => [(L(), C(V(e.paypalGlyph)))]),
549
1146
  key: "0"
550
- } : void 0]), 1032, ["parts"])) : _("", !0),
551
- e.onCrypto && e.text.cryptoButton ? (k(), g(Q, {
1147
+ } : void 0]), 1032, ["parts"])) : w("", !0),
1148
+ e.onCrypto && e.text.cryptoButton ? (L(), C($, {
552
1149
  key: 1,
553
1150
  brand: "bitcoin",
554
1151
  parts: [{
@@ -556,17 +1153,17 @@ var ut = [
556
1153
  onClick: e.onCrypto
557
1154
  }],
558
1155
  "mark-class": "glim-bitcoin-mark"
559
- }, b({ _: 2 }, [e.cryptoGlyph ? {
1156
+ }, D({ _: 2 }, [e.cryptoGlyph ? {
560
1157
  name: "mark",
561
- fn: R(() => [(k(), g(M(e.cryptoGlyph)))]),
1158
+ fn: q(() => [(L(), C(V(e.cryptoGlyph)))]),
562
1159
  key: "0"
563
- } : void 0]), 1032, ["parts"])) : _("", !0)
1160
+ } : void 0]), 1032, ["parts"])) : w("", !0)
564
1161
  ])
565
1162
  ]),
566
1163
  _: 1
567
1164
  }, 8, ["title", "hue-index"]));
568
1165
  }
569
- }), It = { class: "glim-info-text" }, Lt = { class: "glim-readme-btn-rows" }, Rt = /* @__PURE__ */ C({
1166
+ }), hr = { class: "glim-info-text" }, gr = { class: "glim-readme-btn-rows" }, _r = /* @__PURE__ */ A({
570
1167
  __name: "InfoHelpCard",
571
1168
  props: {
572
1169
  text: {},
@@ -578,43 +1175,43 @@ var ut = [
578
1175
  manualGlyph: {},
579
1176
  onBugReport: {},
580
1177
  bugGlyph: {},
581
- openUrl: { default: U },
1178
+ openUrl: { default: it },
582
1179
  hueIndex: {}
583
1180
  },
584
1181
  setup(e) {
585
- let t = e, n = h(() => De(t.text.report, t.mailAddress));
586
- return (t, r) => (k(), g(Z, {
1182
+ let t = e, n = S(() => rt(t.text.report, t.mailAddress));
1183
+ return (t, r) => (L(), C(ln, {
587
1184
  title: e.text.title,
588
1185
  hint: e.text.hint,
589
1186
  "hue-index": e.hueIndex
590
1187
  }, {
591
- default: R(() => [y("p", It, P(e.text.report), 1), y("div", Lt, [
592
- S(Q, {
1188
+ default: q(() => [E("p", hr, U(e.text.report), 1), E("div", gr, [
1189
+ k($, {
593
1190
  brand: "github",
594
1191
  parts: [{
595
1192
  name: e.text.repoButton,
596
1193
  onClick: () => e.openUrl(e.repoUrl)
597
1194
  }],
598
1195
  "mark-class": "glim-github-mark"
599
- }, b({ _: 2 }, [e.repoGlyph ? {
1196
+ }, D({ _: 2 }, [e.repoGlyph ? {
600
1197
  name: "mark",
601
- fn: R(() => [(k(), g(M(e.repoGlyph)))]),
1198
+ fn: q(() => [(L(), C(V(e.repoGlyph)))]),
602
1199
  key: "0"
603
1200
  } : void 0]), 1032, ["parts"]),
604
- n.value ? (k(), g(Q, {
1201
+ n.value ? (L(), C($, {
605
1202
  key: 0,
606
1203
  brand: "house",
607
1204
  parts: [{
608
1205
  name: e.text.mailButton,
609
- onClick: () => e.openUrl(F(Ee)(e.mailAddress, e.text.mailSubject))
1206
+ onClick: () => e.openUrl(W(Je)(e.mailAddress, e.text.mailSubject))
610
1207
  }],
611
1208
  "mark-class": "glim-house-mark"
612
- }, b({ _: 2 }, [e.mailGlyph ? {
1209
+ }, D({ _: 2 }, [e.mailGlyph ? {
613
1210
  name: "mark",
614
- fn: R(() => [(k(), g(M(e.mailGlyph)))]),
1211
+ fn: q(() => [(L(), C(V(e.mailGlyph)))]),
615
1212
  key: "0"
616
- } : void 0]), 1032, ["parts"])) : _("", !0),
617
- e.manualUrl && e.text.manual ? (k(), g(Q, {
1213
+ } : void 0]), 1032, ["parts"])) : w("", !0),
1214
+ e.manualUrl && e.text.manual ? (L(), C($, {
618
1215
  key: 1,
619
1216
  brand: "docs",
620
1217
  parts: [{
@@ -623,12 +1220,12 @@ var ut = [
623
1220
  onClick: () => e.openUrl(e.manualUrl)
624
1221
  }],
625
1222
  "mark-class": "glim-docs-mark"
626
- }, b({ _: 2 }, [e.manualGlyph ? {
1223
+ }, D({ _: 2 }, [e.manualGlyph ? {
627
1224
  name: "mark",
628
- fn: R(() => [(k(), g(M(e.manualGlyph)))]),
1225
+ fn: q(() => [(L(), C(V(e.manualGlyph)))]),
629
1226
  key: "0"
630
- } : void 0]), 1032, ["parts"])) : _("", !0),
631
- e.onBugReport && e.text.bugReport ? (k(), g(Q, {
1227
+ } : void 0]), 1032, ["parts"])) : w("", !0),
1228
+ e.onBugReport && e.text.bugReport ? (L(), C($, {
632
1229
  key: 2,
633
1230
  brand: "github",
634
1231
  parts: [{
@@ -636,11 +1233,11 @@ var ut = [
636
1233
  sub: e.text.bugReportSub,
637
1234
  onClick: e.onBugReport
638
1235
  }]
639
- }, b({ _: 2 }, [e.bugGlyph ? {
1236
+ }, D({ _: 2 }, [e.bugGlyph ? {
640
1237
  name: "mark",
641
- fn: R(() => [(k(), g(M(e.bugGlyph)))]),
1238
+ fn: q(() => [(L(), C(V(e.bugGlyph)))]),
642
1239
  key: "0"
643
- } : void 0]), 1032, ["parts"])) : _("", !0)
1240
+ } : void 0]), 1032, ["parts"])) : w("", !0)
644
1241
  ])]),
645
1242
  _: 1
646
1243
  }, 8, [
@@ -649,69 +1246,69 @@ var ut = [
649
1246
  "hue-index"
650
1247
  ]));
651
1248
  }
652
- }), zt = { class: "glim-version-rows" }, Bt = { class: "glim-version-name" }, Vt = { class: "glim-version-part" }, Ht = {
1249
+ }), vr = { class: "glim-version-rows" }, yr = { class: "glim-version-name" }, br = { class: "glim-version-part" }, xr = {
653
1250
  key: 0,
654
1251
  class: "glim-version-sub"
655
- }, Ut = ["href", "onClick"], Wt = {
1252
+ }, Sr = ["href", "onClick"], Cr = {
656
1253
  key: 1,
657
1254
  class: "glim-num glim-version-number"
658
- }, Gt = {
1255
+ }, wr = {
659
1256
  key: 0,
660
1257
  class: "glim-version-actions"
661
- }, Kt = {
1258
+ }, Tr = {
662
1259
  role: "status",
663
1260
  class: "glim-sr-only"
664
- }, $ = /* @__PURE__ */ C({
1261
+ }, Er = /* @__PURE__ */ A({
665
1262
  __name: "InfoVersionCard",
666
1263
  props: {
667
1264
  text: {},
668
1265
  rows: {},
669
1266
  updateCheck: {},
670
1267
  onReleaseNotes: {},
671
- openUrl: { default: U },
1268
+ openUrl: { default: it },
672
1269
  hueIndex: {}
673
1270
  },
674
1271
  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));
1272
+ let t = e, n = le(), r = S(() => !n["whats-new"] && t.onReleaseNotes && t.text.releaseNotes), i = H({ kind: "idle" }), a = H(0), o = S(() => t.updateCheck && Bt(i.value, t.updateCheck.text));
676
1273
  function s() {
677
- Fe(t.updateCheck, i.value, (e) => {
1274
+ _t(t.updateCheck, i.value, (e) => {
678
1275
  i.value = e, e.kind === "failed" && a.value++;
679
1276
  });
680
1277
  }
681
1278
  function c(e, n) {
682
1279
  e.preventDefault(), t.openUrl(n);
683
1280
  }
684
- return (t, n) => (k(), g(Z, {
1281
+ return (t, n) => (L(), C(ln, {
685
1282
  title: e.text.title,
686
1283
  hint: e.text.hint,
687
1284
  "hue-index": e.hueIndex
688
1285
  }, {
689
- default: R(() => [y("ul", zt, [(k(!0), v(p, null, A(e.rows, (t) => (k(), v("li", {
1286
+ default: q(() => [E("ul", vr, [(L(!0), T(b, null, z(e.rows, (t) => (L(), T("li", {
690
1287
  key: t.name,
691
1288
  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", {
1289
+ }, [E("span", yr, [E("span", br, U(t.name), 1), t.sub ? (L(), T("span", xr, U(t.sub), 1)) : w("", !0)]), W(X)(t).href ? (L(), T("a", {
693
1290
  key: 0,
694
- href: F(G)(t).href,
1291
+ href: W(X)(t).href,
695
1292
  target: "_blank",
696
1293
  rel: "noopener noreferrer",
697
1294
  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, {
1295
+ onClick: (e) => c(e, W(X)(t).href)
1296
+ }, U(W(X)(t).shown), 9, Sr)) : (L(), T("span", Cr, U(W(X)(t).released ? W(X)(t).shown : e.text.unreleased(W(X)(t).shown)), 1))]))), 128))]), r.value || t.$slots["whats-new"] || e.updateCheck ? (L(), T("div", wr, [
1297
+ r.value ? (L(), C(Z, {
701
1298
  key: 0,
702
1299
  label: e.text.releaseNotes,
703
1300
  "label-key": "about.releaseNotes",
704
1301
  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, {
1302
+ }, null, 8, ["label"])) : w("", !0),
1303
+ B(t.$slots, "whats-new"),
1304
+ e.updateCheck && o.value ? (L(), T(b, { key: 1 }, [(L(), C(Z, {
708
1305
  key: a.value,
709
1306
  label: o.value.label,
710
1307
  "label-key": o.value.labelKey,
711
1308
  tone: o.value.tone,
712
- stage: F(Ze)(e.updateCheck.text, o.value.label),
1309
+ stage: W(Vt)(e.updateCheck.text, o.value.label),
713
1310
  busy: i.value.kind === "busy",
714
- class: E(a.value > 0 ? "glim-shake" : ""),
1311
+ class: N(a.value > 0 ? "glim-shake" : ""),
715
1312
  onClick: s
716
1313
  }, null, 8, [
717
1314
  "label",
@@ -720,8 +1317,8 @@ var ut = [
720
1317
  "stage",
721
1318
  "busy",
722
1319
  "class"
723
- ])), y("span", Kt, P(o.value.announced), 1)], 64)) : _("", !0)
724
- ])) : _("", !0)]),
1320
+ ])), E("span", Tr, U(o.value.announced), 1)], 64)) : w("", !0)
1321
+ ])) : w("", !0)]),
725
1322
  _: 3
726
1323
  }, 8, [
727
1324
  "title",
@@ -729,7 +1326,7 @@ var ut = [
729
1326
  "hue-index"
730
1327
  ]));
731
1328
  }
732
- }), qt = /* @__PURE__ */ C({
1329
+ }), Dr = /* @__PURE__ */ A({
733
1330
  __name: "InfoTile",
734
1331
  props: {
735
1332
  version: {},
@@ -739,17 +1336,180 @@ var ut = [
739
1336
  },
740
1337
  setup(e) {
741
1338
  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"] ? {
1339
+ return (t, r) => (L(), T(b, null, [
1340
+ k(Er, M(e.version, { "hue-index": n(0) }), D({ _: 2 }, [t.$slots["whats-new"] ? {
744
1341
  name: "whats-new",
745
- fn: R(() => [j(t.$slots, "whats-new")]),
1342
+ fn: q(() => [B(t.$slots, "whats-new")]),
746
1343
  key: "0"
747
1344
  } : 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"])
1345
+ k(_r, M(e.help, { "hue-index": n(1) }), null, 16, ["hue-index"]),
1346
+ k(mr, M(e.about, { "hue-index": n(2) }), null, 16, ["hue-index"])
750
1347
  ], 64));
751
1348
  }
752
- }), Jt = { class: "glim-num-wrap" }, Yt = /* @__PURE__ */ C({
1349
+ }), Or = [
1350
+ "aria-label",
1351
+ "tabindex",
1352
+ "onKeydown"
1353
+ ], kr = {
1354
+ key: 0,
1355
+ class: "glim-list-row-tile"
1356
+ }, Ar = { class: "glim-list-row-title" }, jr = {
1357
+ key: 1,
1358
+ class: "glim-list-row-badges"
1359
+ }, Mr = /* @__PURE__ */ A({
1360
+ __name: "ListRow",
1361
+ props: {
1362
+ name: {},
1363
+ tip: {},
1364
+ mono: { type: Boolean }
1365
+ },
1366
+ setup(e) {
1367
+ let t = e, n = se(), r = S(() => !!n.onClick), i = S(() => ["glim-list-row-name", { "glim-list-row-name--mono": t.mono }]);
1368
+ function a(e) {
1369
+ e.preventDefault(), e.currentTarget.click();
1370
+ }
1371
+ return (t, n) => (L(), T("div", {
1372
+ role: "group",
1373
+ "aria-label": e.name,
1374
+ tabindex: r.value ? 0 : void 0,
1375
+ class: N(["glim-list-row", { "glim-list-row--opens": r.value }]),
1376
+ onKeydown: [pe(Y(a, ["self"]), ["enter"]), pe(Y(a, ["self"]), ["space"])]
1377
+ }, [
1378
+ t.$slots.tile ? (L(), T("span", kr, [B(t.$slots, "tile")])) : w("", !0),
1379
+ E("span", { class: N(i.value) }, [E("span", Ar, U(e.name), 1), e.tip ? (L(), T("span", {
1380
+ key: 0,
1381
+ class: "glim-list-row-tip",
1382
+ onClick: n[0] ||= Y(() => {}, ["stop"])
1383
+ }, [k(Q, { tip: e.tip }, null, 8, ["tip"])])) : w("", !0)], 2),
1384
+ t.$slots.badges ? (L(), T("span", jr, [B(t.$slots, "badges")])) : w("", !0),
1385
+ t.$slots.actions ? (L(), T("span", {
1386
+ key: 2,
1387
+ class: "glim-list-row-actions",
1388
+ onClick: n[1] ||= Y(() => {}, ["stop"])
1389
+ }, [B(t.$slots, "actions")])) : w("", !0)
1390
+ ], 42, Or));
1391
+ }
1392
+ }), Nr = ["aria-label"], Pr = [
1393
+ "aria-expanded",
1394
+ "tabindex",
1395
+ "onClick",
1396
+ "onMouseenter",
1397
+ "onKeydown",
1398
+ "onFocus"
1399
+ ], Fr = /* @__PURE__ */ A({
1400
+ __name: "MenuBar",
1401
+ props: {
1402
+ label: {},
1403
+ menus: {}
1404
+ },
1405
+ setup(e, { expose: t }) {
1406
+ let n = e, r = [], i = H(null), a = H(0);
1407
+ function o(e) {
1408
+ let t = r[e];
1409
+ if (!t) return;
1410
+ t.focus(), a.value = e;
1411
+ let n = t.getBoundingClientRect();
1412
+ i.value = {
1413
+ at: e,
1414
+ x: n.left,
1415
+ y: n.bottom + 6
1416
+ };
1417
+ }
1418
+ t({ open: o });
1419
+ let s = (e) => (e + n.menus.length) % n.menus.length;
1420
+ function c(e) {
1421
+ i.value?.at === e ? i.value = null : o(e);
1422
+ }
1423
+ function l(e, t) {
1424
+ let n = getComputedStyle(e.currentTarget).direction === "rtl", i = {
1425
+ ArrowRight: n ? -1 : 1,
1426
+ ArrowLeft: n ? 1 : -1
1427
+ }[e.key];
1428
+ i === void 0 ? e.key === "ArrowDown" && (e.preventDefault(), o(t)) : (e.preventDefault(), a.value = s(t + i), r[a.value]?.focus());
1429
+ }
1430
+ return (t, n) => (L(), T("div", {
1431
+ role: "menubar",
1432
+ "aria-label": e.label,
1433
+ class: "glim-menubar"
1434
+ }, [(L(!0), T(b, null, z(e.menus, (e, t) => (L(), T("button", {
1435
+ key: t,
1436
+ ref_for: !0,
1437
+ ref: (e) => r[t] = e,
1438
+ type: "button",
1439
+ role: "menuitem",
1440
+ "aria-haspopup": "menu",
1441
+ "aria-expanded": i.value?.at === t,
1442
+ tabindex: t === a.value ? 0 : -1,
1443
+ class: "glim-menubar-item",
1444
+ onClick: (e) => c(t),
1445
+ onMouseenter: (e) => i.value && i.value.at !== t && o(t),
1446
+ onKeydown: (e) => l(e, t),
1447
+ onFocus: (e) => a.value = t
1448
+ }, U(e.label), 41, Pr))), 128)), i.value && e.menus[i.value.at] ? (L(), C(Bn, {
1449
+ key: i.value.at,
1450
+ x: i.value.x,
1451
+ y: i.value.y,
1452
+ items: e.menus[i.value.at].items,
1453
+ label: e.menus[i.value.at].label,
1454
+ id: e.menus[i.value.at].id,
1455
+ opener: r[i.value.at],
1456
+ onClose: n[0] ||= (e) => i.value = null,
1457
+ onStep: n[1] ||= (e) => i.value && o(s(i.value.at + e))
1458
+ }, null, 8, [
1459
+ "x",
1460
+ "y",
1461
+ "items",
1462
+ "label",
1463
+ "id",
1464
+ "opener"
1465
+ ])) : w("", !0)], 8, Nr));
1466
+ }
1467
+ }), Ir = [
1468
+ "role",
1469
+ "aria-label",
1470
+ "aria-valuemin",
1471
+ "aria-valuemax",
1472
+ "aria-valuenow",
1473
+ "aria-valuetext",
1474
+ "aria-busy"
1475
+ ], Lr = /* @__PURE__ */ A({
1476
+ inheritAttrs: !1,
1477
+ __name: "Meter",
1478
+ props: {
1479
+ value: { default: null },
1480
+ label: {},
1481
+ size: { default: "medium" },
1482
+ threshold: { default: .9 },
1483
+ quiet: {
1484
+ type: Boolean,
1485
+ default: !1
1486
+ },
1487
+ valueText: {}
1488
+ },
1489
+ setup(n) {
1490
+ let r = n, i = S(() => $e(r.value, {
1491
+ size: r.size,
1492
+ threshold: r.threshold,
1493
+ quiet: r.quiet
1494
+ })), a = S(() => i.value.percent === null), o = t(() => r.valueText);
1495
+ return (t, r) => (L(), T(b, null, [E("span", M(t.$attrs, {
1496
+ ref: (e) => W(o).trigger.value = e,
1497
+ role: a.value ? "progressbar" : "meter",
1498
+ "aria-label": n.label,
1499
+ "aria-valuemin": a.value ? void 0 : 0,
1500
+ "aria-valuemax": a.value ? void 0 : 100,
1501
+ "aria-valuenow": i.value.percent ?? void 0,
1502
+ "aria-valuetext": n.valueText,
1503
+ "aria-busy": a.value || void 0,
1504
+ class: i.value.className,
1505
+ onMouseenter: r[0] ||= (...e) => W(o).show && W(o).show(...e),
1506
+ onMouseleave: r[1] ||= (...e) => W(o).hide && W(o).hide(...e)
1507
+ }), [E("span", {
1508
+ class: "glim-meter-fill",
1509
+ style: P(i.value.width ? { width: i.value.width } : void 0)
1510
+ }, null, 4)], 16, Ir), k(e, { state: W(o) }, null, 8, ["state"])], 64));
1511
+ }
1512
+ }), Rr = { class: "glim-num-wrap" }, zr = ["aria-label"], Br = /* @__PURE__ */ A({
753
1513
  inheritAttrs: !1,
754
1514
  __name: "NumberField",
755
1515
  props: {
@@ -758,15 +1518,15 @@ var ut = [
758
1518
  },
759
1519
  emits: ["update:modelValue"],
760
1520
  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;
1521
+ let t = G(e, "modelValue"), n = se(), r = y(() => n["aria-label"]), i = H(null), a;
1522
+ F(() => {
1523
+ o(t.value), a = ke(i.value);
1524
+ }), re(() => a?.());
1525
+ function o(e) {
1526
+ let t = i.value;
767
1527
  t && (t.value === "" ? null : t.valueAsNumber) !== e && (t.value = e === null ? "" : String(e));
768
1528
  }
769
- L([
1529
+ K([
770
1530
  t,
771
1531
  () => n.min,
772
1532
  () => n.max,
@@ -774,28 +1534,202 @@ var ut = [
774
1534
  () => n.disabled,
775
1535
  () => n.readonly
776
1536
  ], () => {
777
- a(t.value), r.value && qe(r.value);
1537
+ o(t.value), i.value && jt(i.value);
778
1538
  }, { flush: "post" });
779
- function o(e) {
1539
+ function s(e) {
780
1540
  let n = e.target;
781
1541
  t.value = n.value === "" ? null : n.valueAsNumber;
782
1542
  }
783
- return (e, t) => (k(), v("span", Jt, [y("input", T(e.$attrs, {
1543
+ return (e, t) => (L(), T("span", Rr, [E("input", M(e.$attrs, {
784
1544
  ref_key: "input",
785
- ref: r,
1545
+ ref: i,
1546
+ "aria-label": W(r),
786
1547
  type: "number",
787
1548
  class: "glim-num-input glim-num-field glim-num",
788
- onInput: o
789
- }), null, 16)]));
1549
+ onInput: s
1550
+ }), null, 16, zr)]));
790
1551
  }
791
- }), Xt = [
1552
+ }), Vr = [
1553
+ "aria-label",
1554
+ "disabled",
1555
+ "type"
1556
+ ], Hr = /* @__PURE__ */ A({
1557
+ inheritAttrs: !1,
1558
+ __name: "PasswordField",
1559
+ props: /*@__PURE__*/ j({
1560
+ width: {},
1561
+ eyeAttrs: {},
1562
+ text: { default: () => ({
1563
+ show: "Show",
1564
+ hide: "Hide"
1565
+ }) },
1566
+ disabled: {
1567
+ type: Boolean,
1568
+ default: !1
1569
+ }
1570
+ }, {
1571
+ modelValue: { default: "" },
1572
+ modelModifiers: {}
1573
+ }),
1574
+ emits: ["update:modelValue"],
1575
+ setup(e, { expose: t }) {
1576
+ let n = e, r = G(e, "modelValue"), i = R(!1), a = se(), o = y(() => a["aria-label"]), s = S(() => Le(n.width)), c = H(null);
1577
+ return t({ input: c }), (t, n) => (L(), T("span", {
1578
+ class: N([
1579
+ "glim-secret",
1580
+ s.value,
1581
+ t.$attrs.class
1582
+ ]),
1583
+ style: P(t.$attrs.style)
1584
+ }, [J(E("input", M({
1585
+ ref_key: "input",
1586
+ ref: c,
1587
+ "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
1588
+ autocomplete: "current-password",
1589
+ spellcheck: "false"
1590
+ }, {
1591
+ ...t.$attrs,
1592
+ class: void 0,
1593
+ style: void 0
1594
+ }, {
1595
+ "aria-label": W(o),
1596
+ disabled: e.disabled,
1597
+ type: i.value ? "text" : "password",
1598
+ class: "glim-input"
1599
+ }), null, 16, Vr), [[ue, r.value]]), k(Kt, M(e.eyeAttrs, {
1600
+ tip: i.value ? e.text.hide : e.text.show,
1601
+ class: "glim-secret-eye",
1602
+ disabled: e.disabled,
1603
+ onClick: n[1] ||= (e) => i.value = !i.value
1604
+ }), {
1605
+ default: q(() => [(L(), C(V(i.value ? W(h) : W(f))))]),
1606
+ _: 1
1607
+ }, 16, ["tip", "disabled"])], 6));
1608
+ }
1609
+ }), Ur = ["aria-label", "disabled"], Wr = /* @__PURE__ */ A({
1610
+ inheritAttrs: !1,
1611
+ __name: "PathField",
1612
+ props: /*@__PURE__*/ j({
1613
+ pick: {},
1614
+ label: {},
1615
+ width: {},
1616
+ text: { default: () => ({ pick: "Choose" }) },
1617
+ glyph: {},
1618
+ compact: { type: Boolean },
1619
+ buttonAttrs: {},
1620
+ disabled: {
1621
+ type: Boolean,
1622
+ default: !1
1623
+ }
1624
+ }, {
1625
+ modelValue: { default: "" },
1626
+ modelModifiers: {}
1627
+ }),
1628
+ emits: /*@__PURE__*/ j(["picked"], ["update:modelValue"]),
1629
+ setup(e, { expose: t, emit: n }) {
1630
+ let r = e, a = G(e, "modelValue"), o = n, s = y(() => r.label), c = H(null);
1631
+ t({ input: c });
1632
+ let l = H(null), u = R(!1), d = new ResizeObserver(([e]) => u.value = e.contentRect.width < Se);
1633
+ F(() => d.observe(l.value)), re(() => d.disconnect());
1634
+ async function f() {
1635
+ let e = await r.pick(a.value);
1636
+ c.value?.focus(), e && (a.value = e, o("picked", e));
1637
+ }
1638
+ return (t, n) => (L(), T("span", {
1639
+ ref_key: "box",
1640
+ ref: l,
1641
+ class: N([
1642
+ "glim-path",
1643
+ W(Le)(e.width),
1644
+ t.$attrs.class
1645
+ ]),
1646
+ style: P(t.$attrs.style)
1647
+ }, [J(E("input", M({
1648
+ ref_key: "input",
1649
+ ref: c,
1650
+ "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
1651
+ type: "text",
1652
+ spellcheck: "false",
1653
+ autocomplete: "off",
1654
+ "aria-label": W(s)
1655
+ }, {
1656
+ ...t.$attrs,
1657
+ class: void 0,
1658
+ style: void 0
1659
+ }, {
1660
+ disabled: e.disabled,
1661
+ class: "glim-input glim-input--mono"
1662
+ }), null, 16, Ur), [[de, a.value]]), k(Z, M(e.buttonAttrs, {
1663
+ variant: "icon",
1664
+ label: e.text.pick,
1665
+ "label-key": null,
1666
+ glyph: e.glyph ?? W(i),
1667
+ compact: e.compact || u.value,
1668
+ disabled: e.disabled,
1669
+ onClick: f
1670
+ }), null, 16, [
1671
+ "label",
1672
+ "glyph",
1673
+ "compact",
1674
+ "disabled"
1675
+ ])], 6));
1676
+ }
1677
+ }), Gr = [
1678
+ "aria-label",
1679
+ "aria-valuemin",
1680
+ "aria-valuemax",
1681
+ "aria-valuenow",
1682
+ "aria-valuetext"
1683
+ ], Kr = /* @__PURE__ */ A({
1684
+ __name: "ProgressBar",
1685
+ props: {
1686
+ value: { default: null },
1687
+ label: {},
1688
+ paused: {
1689
+ type: Boolean,
1690
+ default: !1
1691
+ },
1692
+ failed: {
1693
+ type: Boolean,
1694
+ default: !1
1695
+ },
1696
+ valueText: {}
1697
+ },
1698
+ setup(e) {
1699
+ let t = e, n = S(() => lt(t.value, {
1700
+ paused: t.paused,
1701
+ failed: t.failed
1702
+ }));
1703
+ return (t, r) => (L(), T("span", {
1704
+ role: "progressbar",
1705
+ "aria-label": e.label,
1706
+ "aria-valuemin": n.value.percent === null ? void 0 : 0,
1707
+ "aria-valuemax": n.value.percent === null ? void 0 : 100,
1708
+ "aria-valuenow": n.value.percent ?? void 0,
1709
+ "aria-valuetext": e.valueText,
1710
+ class: N(n.value.className)
1711
+ }, [E("span", {
1712
+ class: "glim-progress-fill",
1713
+ style: P(n.value.width ? { width: n.value.width } : void 0)
1714
+ }, null, 4)], 10, Gr));
1715
+ }
1716
+ }), qr = /* @__PURE__ */ A({
1717
+ __name: "RowMark",
1718
+ props: { on: { type: Boolean } },
1719
+ setup(e) {
1720
+ return (t, n) => (L(), T("span", {
1721
+ class: N(["glim-rowmark", { "glim-rowmark--on": e.on }]),
1722
+ "aria-hidden": "true"
1723
+ }, [k(W(d))], 2));
1724
+ }
1725
+ }), Jr = [
792
1726
  "href",
793
1727
  "data-sel-id",
794
1728
  "aria-selected",
795
1729
  "aria-current",
796
1730
  "aria-describedby",
797
1731
  "tabindex"
798
- ], Zt = [
1732
+ ], Yr = [
799
1733
  "data-sel-id",
800
1734
  "id",
801
1735
  "role",
@@ -807,7 +1741,7 @@ var ut = [
807
1741
  "aria-describedby",
808
1742
  "disabled",
809
1743
  "tabindex"
810
- ], Qt = ["id"], $t = /* @__PURE__ */ C({
1744
+ ], Xr = ["id"], Zr = /* @__PURE__ */ A({
811
1745
  __name: "SelectorSegment",
812
1746
  props: {
813
1747
  item: {},
@@ -830,7 +1764,7 @@ var ut = [
830
1764
  },
831
1765
  emits: ["select"],
832
1766
  setup(r, { emit: i }) {
833
- let a = r, o = i, s = h(() => Ie({
1767
+ let a = r, o = i, s = S(() => vt({
834
1768
  strip: a.strip,
835
1769
  orientation: a.orientation,
836
1770
  size: a.size,
@@ -850,19 +1784,18 @@ var ut = [
850
1784
  disabled: a.disabled,
851
1785
  dim: a.item.dim,
852
1786
  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(() => ({
1787
+ })), c = t(() => s.value.tip, () => a.disabled), l = ce(), u = S(() => a.disabled && !!s.value.tip), d = S(() => u.value ? l : c.describedBy.value), f = S(() => a.strip.kind === "tab"), p = S(() => ({
854
1788
  ...s.value.style,
855
1789
  ...a.share
856
1790
  }));
857
- function b(e) {
1791
+ function m(e) {
858
1792
  c.trigger.value = e;
859
1793
  }
860
- function x(e) {
1794
+ function h(e) {
861
1795
  e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), o("select"));
862
1796
  }
863
- return (t, i) => (k(), v(p, null, [r.orientation === "vertical" ? (k(), v("a", {
864
- key: 0,
865
- ref: b,
1797
+ return (t, i) => (L(), T(b, null, [r.orientation === "vertical" ? (L(), T("a", M({ key: 0 }, r.item.attrs, {
1798
+ ref: m,
866
1799
  href: r.item.href,
867
1800
  "data-sel-id": r.item.id,
868
1801
  role: "tab",
@@ -870,27 +1803,27 @@ var ut = [
870
1803
  "aria-current": r.on ? "page" : void 0,
871
1804
  "aria-describedby": d.value,
872
1805
  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", {
1806
+ class: s.value.className,
1807
+ style: p.value,
1808
+ onClick: h,
1809
+ onMouseenter: i[0] ||= (...e) => W(c).show && W(c).show(...e),
1810
+ onMouseleave: i[1] ||= (...e) => W(c).hide && W(c).hide(...e),
1811
+ onFocus: i[2] ||= (...e) => W(c).showOnFocus && W(c).showOnFocus(...e),
1812
+ onBlur: i[3] ||= (...e) => W(c).hide && W(c).hide(...e)
1813
+ }), [s.value.showGlyph && r.item.glyph ? (L(), C(V(r.item.glyph), { key: 0 })) : w("", !0), s.value.labelClass === null ? w("", !0) : (L(), T("span", {
881
1814
  key: 1,
882
1815
  "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({
1816
+ class: N(s.value.labelClass)
1817
+ }, U(r.item.label), 3))], 16, Jr)) : (L(), T(b, { key: 1 }, [k(W(n), M({
885
1818
  on: u.value,
886
- show: F(c).show,
887
- hide: F(c).hide
1819
+ show: W(c).show,
1820
+ hide: W(c).hide
888
1821
  }, u.value ? { style: r.share } : {}), {
889
- default: R(() => [y("button", {
890
- ref: b,
1822
+ default: q(() => [E("button", M(r.item.attrs, {
1823
+ ref: m,
891
1824
  type: "button",
892
1825
  "data-sel-id": r.item.id,
893
- id: r.panelId && f.value ? F(Be)(r.panelId, r.item.id) : void 0,
1826
+ id: r.panelId && f.value ? W(St)(r.panelId, r.item.id) : void 0,
894
1827
  role: r.strip.kind === "toggle" ? void 0 : r.strip.kind,
895
1828
  "aria-selected": f.value ? r.on : void 0,
896
1829
  "aria-controls": r.panelId && f.value && r.on ? r.panelId : void 0,
@@ -900,39 +1833,40 @@ var ut = [
900
1833
  "aria-describedby": d.value,
901
1834
  disabled: r.disabled,
902
1835
  tabindex: r.roved ? 0 : -1,
903
- class: E(s.value.className),
904
- style: D(m.value),
1836
+ class: s.value.className,
1837
+ style: p.value,
905
1838
  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", {
1839
+ onMouseenter: i[5] ||= (...e) => W(c).show && W(c).show(...e),
1840
+ onMouseleave: i[6] ||= (...e) => W(c).hide && W(c).hide(...e),
1841
+ onFocus: i[7] ||= (...e) => W(c).showOnFocus && W(c).showOnFocus(...e),
1842
+ onBlur: i[8] ||= (...e) => W(c).hide && W(c).hide(...e)
1843
+ }), [s.value.showGlyph && r.item.glyph ? (L(), C(V(r.item.glyph), { key: 0 })) : w("", !0), s.value.labelClass === null ? w("", !0) : (L(), T("span", {
911
1844
  key: 1,
912
1845
  "data-sel-label": "",
913
- class: E(s.value.labelClass)
914
- }, P(r.item.label), 3))], 46, Zt)]),
1846
+ class: N(s.value.labelClass)
1847
+ }, U(r.item.label), 3))], 16, Yr)]),
915
1848
  _: 1
916
1849
  }, 16, [
917
1850
  "on",
918
1851
  "show",
919
1852
  "hide"
920
- ]), u.value ? (k(), v("span", {
1853
+ ]), u.value ? (L(), T("span", {
921
1854
  key: 0,
922
- id: F(l),
1855
+ id: W(l),
923
1856
  hidden: ""
924
- }, P(s.value.tip), 9, Qt)) : _("", !0)], 64)), S(e, { state: F(c) }, null, 8, ["state"])], 64));
1857
+ }, U(s.value.tip), 9, Xr)) : w("", !0)], 64)), k(e, { state: W(c) }, null, 8, ["state"])], 64));
925
1858
  }
926
- }), en = [
1859
+ }), Qr = [
927
1860
  "role",
928
1861
  "aria-label",
929
1862
  "aria-orientation"
930
- ], tn = /* @__PURE__ */ C({
1863
+ ], $r = /* @__PURE__ */ A({
931
1864
  __name: "Selector",
932
- props: /*@__PURE__*/ ee({
1865
+ props: {
933
1866
  items: {},
934
1867
  label: {},
935
- select: { default: "one" },
1868
+ modelValue: {},
1869
+ select: {},
936
1870
  orientation: { default: "horizontal" },
937
1871
  size: { default: "md" },
938
1872
  variant: { default: "well" },
@@ -967,106 +1901,108 @@ var ut = [
967
1901
  default: !1
968
1902
  },
969
1903
  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;
1904
+ },
1905
+ emits: ["update:modelValue", "press"],
1906
+ setup(e, { emit: t }) {
1907
+ let n = e, r = t, i = S(() => n.modelValue);
1908
+ function a(e) {
1909
+ let t = H(Ye(e));
1910
+ return I(kt(e, () => t.value = Ye(e))), t;
980
1911
  }
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) => ({
1912
+ let o = y(() => n.label), s = S(() => n.inline || n.label === void 0 && o.value !== void 0), c = Zt(yt(n.size, n.orientation)), l = a(ye), u = a(we), d = S(() => Ct({
1913
+ mode: c.value,
1914
+ select: n.select === "many" ? "many" : "one",
1915
+ activation: n.activation,
1916
+ orientation: n.orientation,
1917
+ size: n.size,
1918
+ variant: n.variant,
1919
+ equalWidth: n.equalWidth,
1920
+ inline: s.value,
1921
+ fit: n.fit,
1922
+ pairsOnPhone: n.pairsOnPhone,
1923
+ hue: n.hue,
1924
+ hueOffset: n.hueOffset,
1925
+ desktop: l.value,
1926
+ wide: u.value,
1927
+ items: n.items.map((e) => ({
997
1928
  hasGlyph: !!e.glyph,
998
1929
  iconOnly: !!e.iconOnly
999
1930
  }))
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);
1931
+ })), f = H(null), p = H(null), m = R("even"), h = S(() => n.items.map((e) => e.label).join("\n")), g = S(() => n.items.map((e) => n.disabled || e.disabled ? "1" : "0").join(""));
1932
+ function _(e, t) {
1933
+ K([f, e], (e, n, r) => {
1934
+ if (!f.value) return;
1935
+ let i = t(f.value);
1005
1936
  i && r(i);
1006
1937
  }, { flush: "post" });
1007
1938
  }
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
1939
+ _(() => d.value.counted, (e) => d.value.counted ? Ie(e) : void 0), _(() => [
1940
+ d.value.pinWidth,
1941
+ n.equalWidth,
1942
+ s.value,
1943
+ h.value,
1944
+ g.value,
1945
+ n.size,
1946
+ d.value.mode
1016
1947
  ].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
1948
+ if (!d.value.pinWidth) p.value = null;
1949
+ else return Ut(e, {
1950
+ inline: s.value,
1951
+ equalWidth: n.equalWidth
1952
+ }, (e) => p.value = e);
1953
+ }), _(() => [
1954
+ d.value.canSqueeze,
1955
+ h.value,
1956
+ g.value,
1957
+ n.size
1027
1958
  ].join("|"), (e) => {
1028
- if (!s.value.canSqueeze) u.value = "even";
1029
- else return Qe(e, (e) => u.value = e);
1959
+ if (!d.value.canSqueeze) m.value = "even";
1960
+ else return Ht(e, (e) => m.value = e);
1030
1961
  });
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;
1962
+ let v = S(() => bt({
1963
+ rows: p.value,
1964
+ pinWidth: d.value.pinWidth,
1965
+ inline: s.value,
1966
+ fit: n.fit,
1967
+ fitMode: m.value,
1968
+ pairsOnPhone: n.pairsOnPhone
1969
+ })), ee = S(() => n.select === "many"), x = (e) => ee.value ? (i.value ?? []).includes(e) : i.value === e, w = S(() => n.items.map((e) => n.disabled || !!e.disabled)), E = S(() => gt(w.value, n.items.findIndex((e) => x(e.id))));
1970
+ function D(e) {
1971
+ r("press", e);
1972
+ let t = ee.value ? It(i.value ?? [], e, n.items.map((e) => e.id)) : e;
1973
+ t !== i.value && r("update:modelValue", t);
1041
1974
  }
1042
- function w(e) {
1043
- let n = e.target;
1044
- if (t.orientation === "vertical" && e.key === " " && n.dataset.selId) {
1045
- e.preventDefault(), n.click();
1975
+ function O(e) {
1976
+ let t = e.target;
1977
+ if (n.orientation === "vertical" && e.key === " " && t.dataset.selId) {
1978
+ e.preventDefault(), t.click();
1046
1979
  return;
1047
1980
  }
1048
- let r = Ne(c.value, e.key, t.orientation);
1049
- r && (e.preventDefault(), s.value.autoSelect && r.dataset.selId && C(r.dataset.selId));
1981
+ let r = ht(f.value, e.key, n.orientation);
1982
+ if (!r) return;
1983
+ e.preventDefault();
1984
+ let i = n.items.find((e) => String(e.id) === r.dataset.selId);
1985
+ d.value.autoSelect && i && D(i.id);
1050
1986
  }
1051
- return (t, n) => (k(), v("div", {
1987
+ return (t, n) => (L(), T("div", {
1052
1988
  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, {
1989
+ ref: f,
1990
+ role: d.value.role,
1991
+ "aria-label": W(o),
1992
+ "aria-orientation": d.value.role === "group" ? void 0 : e.orientation,
1993
+ class: N(d.value.className),
1994
+ style: P(v.value.track),
1995
+ onKeydown: O
1996
+ }, [(L(!0), T(b, null, z(e.items, (t, n) => (L(), C(Zr, {
1061
1997
  key: t.id,
1062
1998
  item: t,
1063
1999
  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",
2000
+ strip: d.value,
2001
+ on: x(t.id),
2002
+ disabled: w.value[n],
2003
+ roved: n === E.value,
2004
+ share: e.orientation === "vertical" ? {} : v.value.segment,
2005
+ squeezed: d.value.canSqueeze && m.value === "squeezed",
1070
2006
  orientation: e.orientation,
1071
2007
  size: e.size,
1072
2008
  variant: e.variant,
@@ -1076,7 +2012,7 @@ var ut = [
1076
2012
  hue: e.hue,
1077
2013
  "hue-offset": e.hueOffset,
1078
2014
  "panel-id": e.panelId,
1079
- onSelect: (e) => C(t.id)
2015
+ onSelect: (e) => D(t.id)
1080
2016
  }, null, 8, [
1081
2017
  "item",
1082
2018
  "index",
@@ -1096,13 +2032,65 @@ var ut = [
1096
2032
  "hue-offset",
1097
2033
  "panel-id",
1098
2034
  "onSelect"
1099
- ]))), 128))], 46, en));
2035
+ ]))), 128))], 46, Qr));
1100
2036
  }
1101
- }), nn = [
1102
- "href",
1103
- "aria-current",
1104
- "aria-describedby"
1105
- ], rn = { class: "glim-sr-only" }, an = /* @__PURE__ */ C({
2037
+ }), ei = { class: "glim-sr-only" }, ti = /* @__PURE__ */ A({
2038
+ inheritAttrs: !1,
2039
+ __name: "SidebarRowLink",
2040
+ props: {
2041
+ view: {},
2042
+ className: {},
2043
+ label: {},
2044
+ glyph: {},
2045
+ href: {},
2046
+ active: { type: Boolean },
2047
+ count: {}
2048
+ },
2049
+ setup(n) {
2050
+ let r = n, i = t(() => r.view.tip);
2051
+ function a(e) {
2052
+ i.trigger.value = e;
2053
+ }
2054
+ return (t, r) => (L(), T(b, null, [(L(), C(V(n.href ? "a" : "button"), M(t.$attrs, {
2055
+ ref: a,
2056
+ href: n.href,
2057
+ type: n.href ? void 0 : "button",
2058
+ "aria-current": n.active ? "page" : void 0,
2059
+ "aria-describedby": W(i).describedBy.value,
2060
+ class: n.className,
2061
+ onMouseenter: W(i).show,
2062
+ onMouseleave: W(i).hide,
2063
+ onFocus: W(i).showOnFocus,
2064
+ onBlur: W(i).hide
2065
+ }), {
2066
+ default: q(() => [
2067
+ n.view.showGlyph && n.glyph ? (L(), C(V(n.glyph), { key: 0 })) : w("", !0),
2068
+ E("span", { class: N(n.view.labelClass) }, U(n.label), 3),
2069
+ n.view.countClass && n.count ? (L(), T(b, { key: 1 }, [E("span", {
2070
+ class: N(n.view.countClass),
2071
+ "aria-hidden": "true"
2072
+ }, U(n.count.value), 3), E("span", ei, U(n.count.label), 1)], 64)) : w("", !0)
2073
+ ]),
2074
+ _: 1
2075
+ }, 16, [
2076
+ "href",
2077
+ "type",
2078
+ "aria-current",
2079
+ "aria-describedby",
2080
+ "class",
2081
+ "onMouseenter",
2082
+ "onMouseleave",
2083
+ "onFocus",
2084
+ "onBlur"
2085
+ ])), k(e, { state: W(i) }, null, 8, ["state"])], 64));
2086
+ }
2087
+ }), ni = {
2088
+ key: 0,
2089
+ class: "glim-nav-row-slot"
2090
+ }, ri = {
2091
+ key: 1,
2092
+ class: "glim-nav-row-slot"
2093
+ }, ii = /* @__PURE__ */ A({
1106
2094
  inheritAttrs: !1,
1107
2095
  __name: "SidebarRow",
1108
2096
  props: {
@@ -1114,64 +2102,164 @@ var ut = [
1114
2102
  default: !1
1115
2103
  },
1116
2104
  hueIndex: {},
1117
- count: {}
2105
+ count: {},
2106
+ depth: {}
1118
2107
  },
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));
2108
+ setup(e) {
2109
+ let t = e, n = Zt("sidebar"), r = le(), i = S(() => Tt({
2110
+ mode: n.value,
2111
+ label: t.label,
2112
+ hasGlyph: !!t.glyph,
2113
+ active: t.active,
2114
+ hueIndex: t.hueIndex,
2115
+ count: t.count?.value,
2116
+ framed: !!(r.before || r.after),
2117
+ depth: t.depth
2118
+ })), a = S(() => ({
2119
+ view: i.value,
2120
+ label: t.label,
2121
+ glyph: t.glyph,
2122
+ href: t.href,
2123
+ active: t.active,
2124
+ count: t.count
2125
+ }));
2126
+ return (e, t) => e.$slots.before || e.$slots.after ? (L(), T("div", {
2127
+ key: 0,
2128
+ class: N([
2129
+ i.value.className,
2130
+ "glim-nav-row--slots",
2131
+ e.$attrs.class
2132
+ ]),
2133
+ style: P([i.value.style, e.$attrs.style])
2134
+ }, [
2135
+ e.$slots.before ? (L(), T("span", ni, [B(e.$slots, "before")])) : w("", !0),
2136
+ k(ti, M({
2137
+ ...e.$attrs,
2138
+ ...a.value,
2139
+ class: void 0,
2140
+ style: void 0
2141
+ }, { "class-name": "glim-nav-row-main" }), null, 16),
2142
+ e.$slots.after ? (L(), T("span", ri, [B(e.$slots, "after")])) : w("", !0)
2143
+ ], 6)) : (L(), C(ti, M({ key: 1 }, {
2144
+ ...e.$attrs,
2145
+ ...a.value,
2146
+ class: void 0
2147
+ }, {
2148
+ "class-name": i.value.className,
2149
+ class: e.$attrs.class,
2150
+ style: i.value.style
2151
+ }), null, 16, [
2152
+ "class-name",
2153
+ "class",
2154
+ "style"
2155
+ ]));
1150
2156
  }
1151
- }), on = ["aria-labelledby"], sn = { class: "glim-subcard-title" }, cn = ["id"], ln = /* @__PURE__ */ C({
2157
+ }), ai = ["aria-labelledby"], oi = {
2158
+ key: 0,
2159
+ class: "glim-subcard-title"
2160
+ }, si = ["id"], ci = /* @__PURE__ */ A({
1152
2161
  __name: "SubCard",
1153
2162
  props: {
1154
2163
  title: {},
1155
2164
  hint: {}
1156
2165
  },
1157
2166
  setup(e) {
1158
- let t = ae();
1159
- return (n, r) => (k(), v("section", {
2167
+ let t = ce();
2168
+ return (n, r) => (L(), T("section", {
1160
2169
  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, {
2170
+ "aria-labelledby": e.title ? W(t) : void 0
2171
+ }, [e.title ? (L(), T("h3", oi, [E("span", { id: W(t) }, U(e.title), 9, si), e.hint ? (L(), C(Q, {
1163
2172
  key: 0,
1164
2173
  tip: e.hint
1165
- }, null, 8, ["tip"])) : _("", !0)]), j(n.$slots, "default")], 8, on));
2174
+ }, null, 8, ["tip"])) : w("", !0)])) : w("", !0), B(n.$slots, "default")], 8, ai));
2175
+ }
2176
+ }), li = ["aria-label"], ui = { key: 0 }, di = { key: 0 }, fi = ["colspan"], pi = /* @__PURE__ */ A({
2177
+ __name: "Table",
2178
+ props: {
2179
+ label: {},
2180
+ columns: {},
2181
+ rows: {},
2182
+ more: {}
2183
+ },
2184
+ setup(e) {
2185
+ let t = e, n = S(() => t.columns.some((e) => e.label)), r = (e, t) => e[t.key];
2186
+ return (t, i) => (L(), T("table", {
2187
+ class: "glim-table",
2188
+ "aria-label": e.label
2189
+ }, [n.value ? (L(), T("thead", ui, [E("tr", null, [(L(!0), T(b, null, z(e.columns, (e) => (L(), T("th", {
2190
+ key: e.key,
2191
+ scope: "col",
2192
+ class: N({ "glim-table-end": e.end })
2193
+ }, U(e.label), 3))), 128))])])) : w("", !0), E("tbody", null, [(L(!0), T(b, null, z(e.rows, (n, i) => (L(), T("tr", { key: i }, [(L(!0), T(b, null, z(e.columns, (e) => (L(), T("td", {
2194
+ key: e.key,
2195
+ class: N(W(Mt)(e))
2196
+ }, [B(t.$slots, "cell", {
2197
+ row: n,
2198
+ column: e,
2199
+ value: r(n, e)
2200
+ }, () => [O(U(r(n, e)), 1)])], 2))), 128))]))), 128)), e.more ? (L(), T("tr", di, [E("td", {
2201
+ colspan: e.columns.length,
2202
+ class: "glim-table-muted"
2203
+ }, U(e.more), 9, fi)])) : w("", !0)])], 8, li));
2204
+ }
2205
+ }), mi = ["aria-label"], hi = /* @__PURE__ */ A({
2206
+ __name: "TextArea",
2207
+ props: /*@__PURE__*/ j({
2208
+ label: {},
2209
+ mono: { type: Boolean },
2210
+ width: {}
2211
+ }, {
2212
+ modelValue: { default: "" },
2213
+ modelModifiers: {}
2214
+ }),
2215
+ emits: ["update:modelValue"],
2216
+ setup(e, { expose: t }) {
2217
+ let n = e, r = G(e, "modelValue"), i = y(() => n.label), a = S(() => Pt({
2218
+ width: n.width,
2219
+ mono: n.mono,
2220
+ area: !0
2221
+ })), o = H(null);
2222
+ return t({ input: o }), (e, t) => J((L(), T("textarea", {
2223
+ ref_key: "input",
2224
+ ref: o,
2225
+ "onUpdate:modelValue": t[0] ||= (e) => r.value = e,
2226
+ "aria-label": W(i),
2227
+ class: N(a.value)
2228
+ }, null, 10, mi)), [[de, r.value]]);
1166
2229
  }
1167
- }), un = { class: "glim-toast-stack" }, dn = [
2230
+ }), gi = ["aria-label"], _i = /* @__PURE__ */ A({
2231
+ __name: "TextField",
2232
+ props: /*@__PURE__*/ j({
2233
+ label: {},
2234
+ mono: { type: Boolean },
2235
+ width: {}
2236
+ }, {
2237
+ modelValue: { default: "" },
2238
+ modelModifiers: {}
2239
+ }),
2240
+ emits: ["update:modelValue"],
2241
+ setup(e, { expose: t }) {
2242
+ let n = e, r = G(e, "modelValue"), i = y(() => n.label), a = S(() => Pt({
2243
+ width: n.width,
2244
+ mono: n.mono
2245
+ })), o = H(null);
2246
+ return t({ input: o }), (e, t) => J((L(), T("input", {
2247
+ ref_key: "input",
2248
+ ref: o,
2249
+ "onUpdate:modelValue": t[0] ||= (e) => r.value = e,
2250
+ type: "text",
2251
+ "aria-label": W(i),
2252
+ class: N(a.value)
2253
+ }, null, 10, gi)), [[de, r.value]]);
2254
+ }
2255
+ }), vi = { class: "glim-toast-stack" }, yi = [
1168
2256
  "role",
1169
2257
  "onMouseenter",
1170
2258
  "onMouseleave",
1171
2259
  "onFocusin",
1172
2260
  "onFocusout",
1173
2261
  "onKeydown"
1174
- ], fn = { class: "glim-toast-message" }, pn = ["aria-label", "onClick"], mn = /* @__PURE__ */ C({
2262
+ ], bi = { class: "glim-toast-body" }, xi = { class: "glim-toast-message" }, Si = { key: 0 }, Ci = ["aria-label", "onClick"], wi = /* @__PURE__ */ A({
1175
2263
  __name: "ToastViewport",
1176
2264
  props: {
1177
2265
  toasts: {},
@@ -1186,7 +2274,10 @@ var ut = [
1186
2274
  ],
1187
2275
  setup(e, { emit: t }) {
1188
2276
  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", {
2277
+ function i(e, t) {
2278
+ t.onClick(), n("dismiss", e);
2279
+ }
2280
+ return (t, a) => (L(), T("div", vi, [(L(!0), T(b, null, z(e.toasts, (t) => (L(), T("div", {
1190
2281
  key: t.id,
1191
2282
  role: r(t.severity),
1192
2283
  class: "glim-toast glim-toast-card",
@@ -1194,31 +2285,39 @@ var ut = [
1194
2285
  onMouseleave: (e) => n("leave", t.id),
1195
2286
  onFocusin: (e) => n("focusin", t.id),
1196
2287
  onFocusout: (e) => n("focusout", t.id),
1197
- onKeydown: se(z((e) => n("dismiss", t.id), ["stop"]), ["esc"])
2288
+ onKeydown: pe(Y((e) => n("dismiss", t.id), ["stop"]), ["esc"])
1198
2289
  }, [
1199
- S(F(i), {
1200
- mark: F(pe)[t.severity],
1201
- class: E(`glim-toast-glyph glim-toast-glyph--${t.severity}`)
2290
+ k(W(p), {
2291
+ mark: W(Ce)[t.severity],
2292
+ class: N(`glim-toast-glyph glim-toast-glyph--${t.severity}`)
1202
2293
  }, null, 8, ["mark", "class"]),
1203
- y("p", fn, P(t.message), 1),
1204
- y("button", {
2294
+ E("div", bi, [E("p", xi, [(L(!0), T(b, null, z(W(Et)(t.message), (e, t) => (L(), T(b, { key: t }, [t > 0 ? (L(), T("wbr", Si)) : w("", !0), O(U(e), 1)], 64))), 128))]), t.action ? (L(), C(Z, {
2295
+ key: 0,
2296
+ class: "glim-toast-action",
2297
+ tone: "subtle",
2298
+ label: t.action.label,
2299
+ "label-key": null,
2300
+ onClick: (e) => i(t.id, t.action)
2301
+ }, null, 8, ["label", "onClick"])) : w("", !0)]),
2302
+ E("button", {
1205
2303
  type: "button",
1206
2304
  "aria-label": e.dismissLabel,
1207
2305
  class: "glim-btn-bare glim-toast-dismiss",
1208
2306
  onClick: (e) => n("dismiss", t.id)
1209
- }, [S(F(i), { mark: F(fe).dismiss }, null, 8, ["mark"])], 8, pn)
1210
- ], 40, dn))), 128))]));
2307
+ }, [k(W(p), { mark: W(xe).dismiss }, null, 8, ["mark"])], 8, Ci)
2308
+ ], 40, yi))), 128))]));
1211
2309
  }
1212
- }), hn = { class: "glim-toggle" }, gn = {
2310
+ }), Ti = {
1213
2311
  key: 0,
1214
2312
  class: "glim-toggle-label"
1215
- }, _n = [
2313
+ }, Ei = [
1216
2314
  "aria-checked",
1217
2315
  "aria-label",
1218
2316
  "disabled"
1219
- ], vn = /* @__PURE__ */ C({
2317
+ ], Di = /* @__PURE__ */ A({
2318
+ inheritAttrs: !1,
1220
2319
  __name: "Toggle",
1221
- props: /*@__PURE__*/ ee({
2320
+ props: /*@__PURE__*/ j({
1222
2321
  label: {},
1223
2322
  hideLabel: {
1224
2323
  type: Boolean,
@@ -1237,36 +2336,212 @@ var ut = [
1237
2336
  }),
1238
2337
  emits: ["update:modelValue"],
1239
2338
  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", {
2339
+ let t = e, n = G(e, "modelValue"), r = y(() => t.label), i = S(() => t.label !== void 0 && !t.hideLabel);
2340
+ return (t, a) => (L(), T("span", {
2341
+ class: N(["glim-toggle", t.$attrs.class]),
2342
+ style: P(t.$attrs.style)
2343
+ }, [i.value ? (L(), T("span", Ti, U(e.label), 1)) : w("", !0), E("button", M({
2344
+ ...t.$attrs,
2345
+ class: void 0,
2346
+ style: void 0
2347
+ }, {
1242
2348
  type: "button",
1243
2349
  role: "switch",
1244
- "aria-checked": t.value,
1245
- "aria-label": e.label,
2350
+ "aria-checked": n.value,
2351
+ "aria-label": W(r),
1246
2352
  disabled: e.disabled,
1247
2353
  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)]));
2354
+ onClick: a[0] ||= (e) => n.value = !n.value
2355
+ }), [...a[1] ||= [E("span", { class: "glim-toggle-thumb" }, null, -1)]], 16, Ei)], 6));
1250
2356
  }
1251
- }), yn = { class: "glim-notice" }, bn = { class: "glim-notice-title" }, xn = { class: "glim-notice-reason" }, Sn = {
2357
+ }), Oi = ["aria-label"], ki = [
2358
+ "aria-level",
2359
+ "aria-posinset",
2360
+ "aria-setsize",
2361
+ "aria-expanded",
2362
+ "aria-selected",
2363
+ "tabindex",
2364
+ "data-tree-id",
2365
+ "onClick",
2366
+ "onDblclick",
2367
+ "onKeydown"
2368
+ ], Ai = ["onClick"], ji = {
2369
+ key: 0,
2370
+ class: "glim-tree-glyph",
2371
+ "aria-hidden": "true"
2372
+ }, Mi = { class: "glim-tree-label" }, Ni = /* @__PURE__ */ A({
2373
+ __name: "Tree",
2374
+ props: /*@__PURE__*/ j({
2375
+ label: {},
2376
+ load: { type: Function }
2377
+ }, {
2378
+ modelValue: { default: null },
2379
+ modelModifiers: {},
2380
+ open: { default: () => [] },
2381
+ openModifiers: {}
2382
+ }),
2383
+ emits: /*@__PURE__*/ j(["activate"], ["update:modelValue", "update:open"]),
2384
+ setup(e, { emit: t }) {
2385
+ let n = e, i = G(e, "modelValue"), a = G(e, "open"), o = t, s = oe(/* @__PURE__ */ new Map()), c = /* @__PURE__ */ new Set(), l = H(null);
2386
+ function u(e) {
2387
+ c.has(e) || (c.add(e), Promise.resolve(n.load(e)).then((t) => s.set(e, t), () => c.delete(e)));
2388
+ }
2389
+ K(a, (e) => [null, ...e].forEach(u), { immediate: !0 });
2390
+ let d = S(() => Rt(s, a.value)), f = S(() => Math.max(d.value.findIndex((e) => e.node.id === i.value), 0));
2391
+ function p(e) {
2392
+ a.value = a.value.includes(e) ? a.value.filter((t) => t !== e) : [...a.value, e];
2393
+ }
2394
+ function m(e, t) {
2395
+ if (e.ctrlKey || e.metaKey || e.altKey) return;
2396
+ let n = d.value[t].node.id;
2397
+ if (e.key === " " || e.key === "Enter") {
2398
+ e.preventDefault(), i.value = n, e.key === "Enter" && o("activate", n);
2399
+ return;
2400
+ }
2401
+ let r = zt(d.value, t, e.key, getComputedStyle(l.value).direction === "rtl");
2402
+ r && (e.preventDefault(), "focus" in r ? (i.value = r.focus, Ve(l.value, r.focus)) : p("open" in r ? r.open : r.close));
2403
+ }
2404
+ return (t, n) => (L(), T("div", {
2405
+ ref_key: "tree",
2406
+ ref: l,
2407
+ role: "tree",
2408
+ "aria-label": e.label,
2409
+ class: "glim-tree"
2410
+ }, [(L(!0), T(b, null, z(d.value, (e, t) => (L(), T("div", M({ ref_for: !0 }, e.node.attrs, {
2411
+ key: e.node.id,
2412
+ role: "treeitem",
2413
+ "aria-level": e.level,
2414
+ "aria-posinset": e.position,
2415
+ "aria-setsize": e.siblings,
2416
+ "aria-expanded": e.node.hasChildren ? e.open : void 0,
2417
+ "aria-selected": e.node.id === i.value,
2418
+ tabindex: t === f.value ? 0 : -1,
2419
+ "data-tree-id": e.node.id,
2420
+ class: "glim-tree-row",
2421
+ style: { "--tree-level": e.level - 1 },
2422
+ onClick: (t) => i.value = e.node.id,
2423
+ onDblclick: (t) => o("activate", e.node.id),
2424
+ onKeydown: (e) => m(e, t)
2425
+ }), [
2426
+ E("span", {
2427
+ class: "glim-tree-toggle",
2428
+ "aria-hidden": "true",
2429
+ onClick: Y((t) => e.node.hasChildren && p(e.node.id), ["stop"]),
2430
+ onDblclick: n[0] ||= Y(() => {}, ["stop"])
2431
+ }, [e.node.hasChildren ? (L(), C(W(r), { key: 0 })) : w("", !0)], 40, Ai),
2432
+ e.node.glyph ? (L(), T("span", ji, [(L(), C(V(e.open && e.node.openGlyph || e.node.glyph)))])) : w("", !0),
2433
+ E("span", Mi, U(e.node.label), 1)
2434
+ ], 16, ki))), 128))], 8, Oi));
2435
+ }
2436
+ }), Pi = { class: "glim-notice" }, Fi = { class: "glim-notice-title" }, Ii = { class: "glim-notice-reason" }, Li = {
1252
2437
  key: 0,
1253
2438
  class: "glim-notice-action"
1254
- }, Cn = /* @__PURE__ */ C({
2439
+ }, Ri = /* @__PURE__ */ A({
1255
2440
  __name: "UnavailableNotice",
1256
2441
  props: { title: {} },
1257
2442
  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)
2443
+ return (t, n) => (L(), T("div", Pi, [
2444
+ E("p", Fi, U(e.title), 1),
2445
+ E("p", Ii, [B(t.$slots, "default")]),
2446
+ t.$slots.action ? (L(), T("div", Li, [B(t.$slots, "action")])) : w("", !0)
1262
2447
  ]));
1263
2448
  }
2449
+ }), zi = ["aria-labelledby", "aria-label"], Bi = ["id"], Vi = { class: "glim-modal-body glim-window-body" }, Hi = {
2450
+ key: 0,
2451
+ class: "glim-modal-foot"
2452
+ }, Ui = {
2453
+ key: 0,
2454
+ class: "glim-window-start"
2455
+ }, Wi = /* @__PURE__ */ A({
2456
+ inheritAttrs: !1,
2457
+ __name: "Window",
2458
+ props: {
2459
+ title: {},
2460
+ actions: { default: () => [] },
2461
+ start: {},
2462
+ size: { default: "normal" },
2463
+ text: {}
2464
+ },
2465
+ emits: ["close"],
2466
+ setup(e, { expose: t, emit: n }) {
2467
+ let r = e, i = n, a = le(), o = H(null), s = ce(), c = He(), l = S(() => r.start !== void 0 || !!a.start), u = S(() => Gt(r.actions, l.value, {
2468
+ cancel: {
2469
+ label: r.text.cancel,
2470
+ labelKey: "common.cancel",
2471
+ glyph: g,
2472
+ wayOut: !0
2473
+ },
2474
+ close: {
2475
+ label: r.text.close,
2476
+ labelKey: "common.close",
2477
+ glyph: m,
2478
+ wayOut: !0
2479
+ }
2480
+ })), d;
2481
+ F(() => {
2482
+ d = Dt(() => o.value, () => i("close")), o.value && Wt(o.value)?.focus();
2483
+ }), ie(() => {
2484
+ d?.(), mt(c);
2485
+ }), t({ card: o });
2486
+ function f(e) {
2487
+ e.onClick?.() !== !1 && i("close");
2488
+ }
2489
+ function p() {
2490
+ Xe() || i("close");
2491
+ }
2492
+ return (t, n) => (L(), C(x, { to: "body" }, [E("div", {
2493
+ class: "glim-modal-backdrop",
2494
+ onMousedown: Y(p, ["self"])
2495
+ }, [E("div", M(t.$attrs, {
2496
+ ref_key: "card",
2497
+ ref: o,
2498
+ role: "dialog",
2499
+ "aria-modal": "true",
2500
+ "aria-labelledby": t.$slots.title ? void 0 : W(s),
2501
+ "aria-label": t.$slots.title ? e.title : void 0,
2502
+ class: [
2503
+ "glim-modal-card",
2504
+ "glim-window",
2505
+ e.size !== "normal" && `glim-window--${e.size}`
2506
+ ]
2507
+ }), [
2508
+ E("h2", {
2509
+ id: W(s),
2510
+ class: "glim-window-title"
2511
+ }, [k(Jt, {
2512
+ tone: "heading",
2513
+ size: "heading",
2514
+ wrap: "",
2515
+ "inset-start": 5
2516
+ }, {
2517
+ default: q(() => [B(t.$slots, "title", {}, () => [O(U(e.title), 1)])]),
2518
+ _: 3
2519
+ })], 8, Bi),
2520
+ E("div", Vi, [B(t.$slots, "default")]),
2521
+ u.value.length ? (L(), T("div", Hi, [l.value ? (L(), T("span", Ui, [B(t.$slots, "start", {}, () => [O(U(e.start), 1)])])) : w("", !0), (L(!0), T(b, null, z(u.value, (e, t) => (L(), C(Z, M({ ref_for: !0 }, e.attrs, {
2522
+ key: t,
2523
+ label: e.label,
2524
+ "label-key": e.labelKey,
2525
+ glyph: e.glyph,
2526
+ tone: e.primary ? "accent" : "neutral",
2527
+ disabled: e.disabled,
2528
+ onClick: (t) => f(e)
2529
+ }), null, 16, [
2530
+ "label",
2531
+ "label-key",
2532
+ "glyph",
2533
+ "tone",
2534
+ "disabled",
2535
+ "onClick"
2536
+ ]))), 128))])) : w("", !0)
2537
+ ], 16, zi)], 32)]));
2538
+ }
1264
2539
  });
1265
2540
  // src/confirm.ts
1266
- function wn(e) {
1267
- let t = N(null), n = N(null), r = null, i = null;
2541
+ function Gi(e) {
2542
+ let t = H(null), n = H(null), r = null, i = null;
1268
2543
  function a(e, n) {
1269
- return i = Ce(), new Promise((i) => {
2544
+ return i = He(), new Promise((i) => {
1270
2545
  r = i, t.value = {
1271
2546
  message: e,
1272
2547
  ...n
@@ -1274,17 +2549,17 @@ function wn(e) {
1274
2549
  });
1275
2550
  }
1276
2551
  function o(e) {
1277
- r?.(e), r = null, t.value = null, Me(i), i = null;
2552
+ r?.(e), r = null, t.value = null, mt(i), i = null;
1278
2553
  }
1279
2554
  let s = () => o(!1);
1280
- return L(t, (e, t, r) => {
1281
- e && r(Ye(() => n.value, s));
2555
+ return K(t, (e, t, r) => {
2556
+ e && r(Lt(() => n.value, s));
1282
2557
  }), {
1283
2558
  confirm: a,
1284
2559
  dismiss: s,
1285
- ConfirmHost: C(() => () => {
2560
+ ConfirmHost: A(() => () => {
1286
2561
  let r = t.value;
1287
- return r ? w(m, { to: "body" }, [w(xt, {
2562
+ return r ? te(x, { to: "body" }, [te(Tn, {
1288
2563
  ref: (e) => n.value = e?.card ?? null,
1289
2564
  title: e.title,
1290
2565
  message: r.message,
@@ -1294,8 +2569,8 @@ function wn(e) {
1294
2569
  cancelLabel: e.cancel,
1295
2570
  onConfirm: () => o(!0),
1296
2571
  onCancel: () => o(!1)
1297
- }, r.extra ? { extra: () => w(r.extra) } : void 0)]) : null;
2572
+ }, r.extra ? { extra: () => te(r.extra) } : void 0)]) : null;
1298
2573
  })
1299
2574
  };
1300
2575
  }
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 };
2576
+ export { Jt as Badge, Xt as BrandMark, Z as Button, ln as Card, pn as Checkbox, vn as ColorPicker, Tn as ConfirmDialog, Bn as ContextMenu, Un as CopyField, qn as EmptyState, Zn as FieldRow, Qn as FieldRowGroup, be as GLIMSTONE_VERSION, tr as GlyphField, nr as GlyphTile, ir as IconButton, g as IconCancel, d as IconCheck, m as IconClose, c as IconCopy, r as IconExpand, f as IconEye, h as IconEyeOff, i as IconFolderOpen, l as IconPencil, Kt as IconTipButton, _ as IconWindowMaximise, a as IconWindowMinimise, o as IconWindowRestore, mr as InfoAboutCard, Q as InfoBubble, _r as InfoHelpCard, Dr as InfoTile, Er as InfoVersionCard, Dn as Kbd, Mr as ListRow, p as MarkSvg, Fr as MenuBar, Lr as Meter, Br as NumberField, Hr as PasswordField, Wr as PathField, Jn as Pill, Kr as ProgressBar, $ as ReadmeButton, qr as RowMark, $r as Selector, ii as SidebarRow, ci as SubCard, pi as Table, hi as TextArea, _i as TextField, wi as ToastViewport, Di as Toggle, Ni as Tree, Ri as UnavailableNotice, Wi as Window, u as glyphFor, xt as selectorTabId, s as setGlyphResolver, rn as useAccent, Gi as useConfirm, y as useFieldName, $t as useHue, Zt as useLabelMode, nn as useMotion, Qt as useRainbow, tn as useShape, t as useTipBubble };