@glimstone/vue 4.9.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion-D37jhS5C.js +36 -0
- package/dist/Accordion.js +1 -1
- package/dist/AngleSlider.js +44 -31
- package/dist/AngleSlider.vue.d.ts +1 -1
- package/dist/Avatar.js +9 -8
- package/dist/Badge-C9DRRspu.js +79 -0
- package/dist/Badge.vue.d.ts +2 -5
- package/dist/Button-DVUuFYk0.js +224 -0
- package/dist/Button.vue.d.ts +1 -1
- package/dist/Card.vue.d.ts +2 -0
- package/dist/Carousel.js +27 -27
- package/dist/Chart.vue.d.ts +22 -0
- package/dist/ChartLegend.vue.d.ts +7 -0
- package/dist/Collapsible.js +13 -13
- package/dist/ColorPicker.vue.d.ts +3 -0
- package/dist/Combobox.js +39 -35
- package/dist/ConnectionRow.vue.d.ts +2 -0
- package/dist/ContextMenu.vue.d.ts +3 -0
- package/dist/DatePicker.js +64 -62
- package/dist/FieldErrorLine.vue.d.ts +7 -0
- package/dist/FileUpload.js +43 -37
- package/dist/FileUpload.vue.d.ts +2 -0
- package/dist/FloatingPanel.js +31 -31
- package/dist/HoverCard.js +50 -25
- package/dist/HoverCard.vue.d.ts +9 -1
- package/dist/{IconButton-D5YOChZI.js → IconButton-DGy1eP0I.js} +12 -12
- package/dist/IconTipButton-B8kcqxcE.js +59 -0
- package/dist/IconTipButton.vue.d.ts +4 -1
- package/dist/InfoComponentsCard.vue.d.ts +1 -1
- package/dist/ListRow.vue.d.ts +12 -1
- package/dist/ListTable.vue.d.ts +10 -0
- package/dist/Marquee.js +13 -13
- package/dist/Meter.vue.d.ts +5 -0
- package/dist/MultiSelect.js +113 -0
- package/dist/MultiSelect.vue.d.ts +28 -0
- package/dist/Pagination.js +71 -38
- package/dist/PinInput.js +32 -28
- package/dist/PinInput.vue.d.ts +2 -2
- package/dist/Rating.js +35 -29
- package/dist/ReadmeButton.vue.d.ts +1 -1
- package/dist/RevealEye.vue.d.ts +6 -0
- package/dist/ScrollArea.js +5 -5
- package/dist/SearchHit-Ch6ef2dk.js +19 -0
- package/dist/SearchHit.vue.d.ts +7 -0
- package/dist/Select-BiQGVqg_.js +469 -0
- package/dist/Select.js +1 -1
- package/dist/Selector.vue.d.ts +4 -3
- package/dist/SettingsNav.vue.d.ts +38 -0
- package/dist/SignInTile.vue.d.ts +1 -1
- package/dist/SignaturePad.js +23 -23
- package/dist/SkeletonRow.vue.d.ts +6 -0
- package/dist/Slider.js +21 -18
- package/dist/Sparkline.vue.d.ts +15 -0
- package/dist/Splitter.js +8 -8
- package/dist/StatusSummary.vue.d.ts +15 -0
- package/dist/Steps.js +33 -33
- package/dist/SubCard.vue.d.ts +2 -2
- package/dist/TagsInput.js +33 -33
- package/dist/TimeDial.vue.d.ts +18 -0
- package/dist/TimePicker.vue.d.ts +22 -0
- package/dist/TimeRangePicker.vue.d.ts +20 -0
- package/dist/TimeSegment.vue.d.ts +11 -0
- package/dist/{DropdownListbox.vue.d.ts → TimeShell.vue.d.ts} +8 -11
- package/dist/Timer.js +33 -30
- package/dist/TipWrap-BZAveG4U.js +62 -0
- package/dist/ToastCard.vue.d.ts +2 -0
- package/dist/ToastViewport.vue.d.ts +1 -8
- package/dist/Tour.js +51 -44
- package/dist/Window.vue.d.ts +3 -1
- package/dist/engines.d.ts +7 -1
- package/dist/entries/multiselect.d.ts +2 -0
- package/dist/{glyphs-CS3VBARx.js → glyphs-DncaPYo_.js} +2 -2
- package/dist/glyphs.d.ts +2 -0
- package/dist/index.d.ts +15 -7
- package/dist/index.js +4128 -3447
- package/dist/settingsNavItem.d.ts +16 -0
- package/dist/tipBubble.d.ts +12 -1
- package/dist/windowParts.d.ts +4 -1
- package/package.json +6 -2
- package/dist/AboutCard.vue.d.ts +0 -43
- package/dist/Accordion-JaQ-i8V1.js +0 -36
- package/dist/Badge-BhK0gMse.js +0 -81
- package/dist/Button-CZHmbNOm.js +0 -203
- package/dist/IconTipButton-BLtrZfgN.js +0 -56
- package/dist/Select-DBABOjwc.js +0 -458
- package/dist/TipWrap-5Nw7Yj0O.js +0 -51
- package/dist/deprecatedEvents.d.ts +0 -8
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, guardReactiveProps as l, mergeModels as u, mergeProps as d, normalizeClass as f, normalizeProps as p, onMounted as m, openBlock as h, renderList as g, resolveDynamicComponent as _, shallowRef as v, toDisplayString as y, unref as b, useId as x, useModel as S, watch as C, withCtx as w } from "vue";
|
|
2
|
+
import { SELECT_POSITIONING as ee, alignOverTrigger as T, closeOnPageMove as E, defaultWidth as D, endOption as O, faceLabels as k, flattenRuns as A, hasSubmenu as j, homeRow as M, isSubmenu as N, pageDir as P, portalTarget as F, selectRootClass as te, selectRowParts as ne, selectTriggerClass as I } from "@glimstone/core";
|
|
3
|
+
import { r as L } from "./fieldName-DBygJJfe.js";
|
|
4
|
+
import * as R from "@zag-js/select";
|
|
5
|
+
import { normalizeProps as z, useMachine as B } from "@zag-js/vue";
|
|
6
|
+
import { c as V, i as H } from "./glyphs-DncaPYo_.js";
|
|
7
|
+
import { n as U, t as W } from "./selectParts-0e1ib8BL.js";
|
|
8
|
+
import { n as G, r as K, t as q } from "./TipWrap-BZAveG4U.js";
|
|
9
|
+
import * as J from "@zag-js/menu";
|
|
10
|
+
// src/SelectFace.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var Y = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "glim-select-glyph"
|
|
14
|
+
}, X = { class: "glim-select-value" }, Z = ["aria-hidden"], re = /* @__PURE__ */ c({
|
|
15
|
+
__name: "SelectFace",
|
|
16
|
+
props: {
|
|
17
|
+
all: {},
|
|
18
|
+
value: {},
|
|
19
|
+
placeholder: {},
|
|
20
|
+
width: {},
|
|
21
|
+
glyphs: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
setup(t) {
|
|
24
|
+
let s = t, c = n(() => k(s.all, s.value, s.placeholder, s.width)), l = n(() => s.all.find((e) => e.value === s.value)?.glyph);
|
|
25
|
+
return (n, s) => (h(), a(e, null, [t.glyphs ? (h(), a("span", Y, [l.value ? (h(), r(_(l.value), { key: 0 })) : i("", !0)])) : i("", !0), o("span", X, [(h(!0), a(e, null, g(c.value.labels, (e) => (h(), a("span", {
|
|
26
|
+
key: e,
|
|
27
|
+
"aria-hidden": e !== c.value.text || void 0,
|
|
28
|
+
class: f(e === c.value.text ? void 0 : "glim-select-ghost")
|
|
29
|
+
}, y(e), 11, Z))), 128))])], 64));
|
|
30
|
+
}
|
|
31
|
+
}), ie = ["aria-busy", "aria-describedby"], Q = /* @__PURE__ */ c({
|
|
32
|
+
__name: "ListSelect",
|
|
33
|
+
props: {
|
|
34
|
+
label: {},
|
|
35
|
+
hideLabel: { type: Boolean },
|
|
36
|
+
groups: {},
|
|
37
|
+
value: {},
|
|
38
|
+
placeholder: {},
|
|
39
|
+
width: {},
|
|
40
|
+
rows: {},
|
|
41
|
+
triggerClass: {},
|
|
42
|
+
id: {},
|
|
43
|
+
triggerAttrs: {},
|
|
44
|
+
listId: {},
|
|
45
|
+
disabled: { type: Boolean },
|
|
46
|
+
busy: { type: Boolean },
|
|
47
|
+
tip: {},
|
|
48
|
+
shake: {}
|
|
49
|
+
},
|
|
50
|
+
emits: ["change"],
|
|
51
|
+
setup(c, { expose: u, emit: m }) {
|
|
52
|
+
let S = c, D = m, k = x(), j = n(() => A(S.groups)), M = n(() => j.value.some((e) => e.glyph)), N = n(() => ne(S.rows, M.value)), I = n(() => R.collection({
|
|
53
|
+
items: j.value,
|
|
54
|
+
itemToValue: (e) => e.value,
|
|
55
|
+
itemToString: (e) => e.label,
|
|
56
|
+
isItemDisabled: (e) => !!e.disabled
|
|
57
|
+
})), L = B(R.machine, n(() => ({
|
|
58
|
+
id: k,
|
|
59
|
+
ids: {
|
|
60
|
+
trigger: S.id,
|
|
61
|
+
content: S.listId
|
|
62
|
+
},
|
|
63
|
+
dir: P(),
|
|
64
|
+
collection: I.value,
|
|
65
|
+
value: S.value === null ? [] : [S.value],
|
|
66
|
+
disabled: S.disabled,
|
|
67
|
+
readOnly: S.busy,
|
|
68
|
+
onValueChange: (e) => {
|
|
69
|
+
let t = e.value[0];
|
|
70
|
+
t !== void 0 && t !== S.value && D("change", t);
|
|
71
|
+
},
|
|
72
|
+
positioning: ee
|
|
73
|
+
}))), J = n(() => R.connect(L, z)), Y = v(null), X = K(() => S.tip, () => !!S.disabled);
|
|
74
|
+
U(Y, {
|
|
75
|
+
all: () => j.value,
|
|
76
|
+
value: () => S.value,
|
|
77
|
+
inert: () => !!(S.disabled || S.busy),
|
|
78
|
+
onChange: (e) => D("change", e),
|
|
79
|
+
shakeCount: () => S.shake ?? 0
|
|
80
|
+
}), C(() => J.value.open, (e, t, n) => {
|
|
81
|
+
e && n(E(() => J.value.setOpen(!1)));
|
|
82
|
+
});
|
|
83
|
+
let Z = W(() => J.value.open, Y), Q = v(null);
|
|
84
|
+
C(() => J.value.open, (e, t, n) => {
|
|
85
|
+
e && Q.value && Y.value && n(T(Q.value, Y.value, S.value));
|
|
86
|
+
}, { flush: "post" });
|
|
87
|
+
function ae(e) {
|
|
88
|
+
let t = J.value.open ? void 0 : O(j.value, e.key);
|
|
89
|
+
if (t === void 0) return J.value.getTriggerProps().onKeydown?.(e);
|
|
90
|
+
e.preventDefault(), J.value.setOpen(!0), J.value.setHighlightValue(t);
|
|
91
|
+
}
|
|
92
|
+
function $(e) {
|
|
93
|
+
Y.value = e, X.trigger.value = Y.value;
|
|
94
|
+
}
|
|
95
|
+
return u({ trigger: Y }), (n, u) => (h(), a("div", d(J.value.getRootProps(), { class: b(te)(c.width) }), [
|
|
96
|
+
o("label", d(J.value.getLabelProps(), { class: c.hideLabel ? "glim-sr-only" : "glim-field-label" }), y(c.label), 17),
|
|
97
|
+
o("div", p(l(J.value.getControlProps())), [s(b(q), {
|
|
98
|
+
on: !!c.disabled && !!c.tip,
|
|
99
|
+
show: b(X).show,
|
|
100
|
+
hide: b(X).hide
|
|
101
|
+
}, {
|
|
102
|
+
default: w(() => [o("button", d({
|
|
103
|
+
...c.triggerAttrs,
|
|
104
|
+
...J.value.getTriggerProps(),
|
|
105
|
+
onKeydown: ae
|
|
106
|
+
}, {
|
|
107
|
+
ref: $,
|
|
108
|
+
"aria-busy": c.busy || void 0,
|
|
109
|
+
"aria-describedby": b(X).describedBy.value,
|
|
110
|
+
class: c.triggerClass,
|
|
111
|
+
onMouseenter: u[0] ||= (...e) => b(X).show && b(X).show(...e),
|
|
112
|
+
onMouseleave: u[1] ||= (...e) => b(X).hide && b(X).hide(...e),
|
|
113
|
+
onFocus: u[2] ||= (...e) => b(X).showOnFocus && b(X).showOnFocus(...e),
|
|
114
|
+
onBlur: u[3] ||= (...e) => b(X).hide && b(X).hide(...e)
|
|
115
|
+
}), [s(re, {
|
|
116
|
+
all: j.value,
|
|
117
|
+
value: c.value,
|
|
118
|
+
placeholder: c.placeholder,
|
|
119
|
+
width: c.width,
|
|
120
|
+
glyphs: M.value
|
|
121
|
+
}, null, 8, [
|
|
122
|
+
"all",
|
|
123
|
+
"value",
|
|
124
|
+
"placeholder",
|
|
125
|
+
"width",
|
|
126
|
+
"glyphs"
|
|
127
|
+
]), o("span", d(J.value.getIndicatorProps(), { class: "glim-select-indicator" }), [s(b(V))], 16)], 16, ie)]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 8, [
|
|
130
|
+
"on",
|
|
131
|
+
"show",
|
|
132
|
+
"hide"
|
|
133
|
+
])], 16),
|
|
134
|
+
s(G, { state: b(X) }, null, 8, ["state"]),
|
|
135
|
+
(h(), r(t, { to: b(F)() }, [o("div", d(J.value.getPositionerProps(), {
|
|
136
|
+
style: b(Z).style.value,
|
|
137
|
+
class: ["glim-select-positioner", b(Z).className.value]
|
|
138
|
+
}), [o("div", d({
|
|
139
|
+
ref_key: "content",
|
|
140
|
+
ref: Q
|
|
141
|
+
}, J.value.getContentProps(), { class: N.value.content }), [(h(!0), a(e, null, g(c.groups, (t, n) => (h(), a(e, { key: n }, [t.entries.length > 0 ? (h(), a("div", d({
|
|
142
|
+
key: 0,
|
|
143
|
+
ref_for: !0
|
|
144
|
+
}, t.heading ? J.value.getItemGroupProps({ id: `${b(k)}-g${n}` }) : {}, { class: "glim-select-group" }), [t.heading ? (h(), a("div", d({
|
|
145
|
+
key: 0,
|
|
146
|
+
ref_for: !0
|
|
147
|
+
}, J.value.getItemGroupLabelProps({ htmlFor: `${b(k)}-g${n}` }), { class: N.value.heading }), y(t.heading), 17)) : i("", !0), (h(!0), a(e, null, g(t.entries, (e) => (h(), a("div", d({ key: e.value }, { ref_for: !0 }, J.value.getItemProps({ item: e }), { class: N.value.item }), [
|
|
148
|
+
N.value.glyph ? (h(), a("span", {
|
|
149
|
+
key: 0,
|
|
150
|
+
class: f(N.value.glyph)
|
|
151
|
+
}, [e.glyph ? (h(), r(_(e.glyph), { key: 0 })) : i("", !0)], 2)) : i("", !0),
|
|
152
|
+
o("span", d({ ref_for: !0 }, J.value.getItemTextProps({ item: e }), { class: N.value.label }), y(e.label), 17),
|
|
153
|
+
o("span", d({ ref_for: !0 }, J.value.getItemIndicatorProps({ item: e }), { class: N.value.check }), [s(b(H))], 16)
|
|
154
|
+
], 16))), 128))], 16)) : i("", !0)], 64))), 128))], 16)], 16)], 8, ["to"])),
|
|
155
|
+
o("select", p(l(J.value.getHiddenSelectProps())), null, 16)
|
|
156
|
+
], 16));
|
|
157
|
+
}
|
|
158
|
+
}), ae = ["data-state"], $ = /* @__PURE__ */ c({
|
|
159
|
+
__name: "MenuChoice",
|
|
160
|
+
props: {
|
|
161
|
+
api: {},
|
|
162
|
+
option: {},
|
|
163
|
+
value: {},
|
|
164
|
+
parts: {}
|
|
165
|
+
},
|
|
166
|
+
emits: ["change"],
|
|
167
|
+
setup(e, { emit: t }) {
|
|
168
|
+
let c = e, l = t, u = n(() => c.option.value === c.value), p = n(() => ({
|
|
169
|
+
type: "radio",
|
|
170
|
+
value: c.option.value,
|
|
171
|
+
valueText: c.option.label,
|
|
172
|
+
checked: u.value,
|
|
173
|
+
disabled: c.option.disabled,
|
|
174
|
+
onCheckedChange: () => {
|
|
175
|
+
u.value || l("change", c.option.value);
|
|
176
|
+
}
|
|
177
|
+
}));
|
|
178
|
+
return (t, n) => (h(), a("div", d(e.api.getOptionItemProps(p.value), { class: e.parts.item }), [
|
|
179
|
+
e.parts.glyph ? (h(), a("span", {
|
|
180
|
+
key: 0,
|
|
181
|
+
class: f(e.parts.glyph)
|
|
182
|
+
}, [e.option.glyph ? (h(), r(_(e.option.glyph), { key: 0 })) : i("", !0)], 2)) : i("", !0),
|
|
183
|
+
o("span", d(e.api.getItemTextProps(p.value), { class: e.parts.label }), y(e.option.label), 17),
|
|
184
|
+
o("span", {
|
|
185
|
+
"aria-hidden": "true",
|
|
186
|
+
"data-state": u.value ? "checked" : "unchecked",
|
|
187
|
+
class: f(e.parts.check)
|
|
188
|
+
}, [s(b(H))], 10, ae)
|
|
189
|
+
], 16));
|
|
190
|
+
}
|
|
191
|
+
}), oe = /* @__PURE__ */ c({
|
|
192
|
+
__name: "MenuSubmenu",
|
|
193
|
+
props: {
|
|
194
|
+
parent: {},
|
|
195
|
+
parentApi: {},
|
|
196
|
+
triggerId: {},
|
|
197
|
+
entry: {},
|
|
198
|
+
value: {},
|
|
199
|
+
parts: {},
|
|
200
|
+
hueStyle: {},
|
|
201
|
+
hueClass: {}
|
|
202
|
+
},
|
|
203
|
+
emits: ["change"],
|
|
204
|
+
setup(c, { emit: l }) {
|
|
205
|
+
let u = c, p = l, v = B(J.machine, {
|
|
206
|
+
id: x(),
|
|
207
|
+
ids: { trigger: u.triggerId },
|
|
208
|
+
dir: P(),
|
|
209
|
+
"aria-label": u.entry.label
|
|
210
|
+
}), S = n(() => J.connect(v, z));
|
|
211
|
+
return m(() => {
|
|
212
|
+
u.parentApi.setChild(v), S.value.setParent(u.parent);
|
|
213
|
+
}), (n, l) => (h(), a(e, null, [o("div", d(c.parentApi.getTriggerItemProps(S.value), { class: c.parts.item }), [
|
|
214
|
+
c.parts.glyph ? (h(), a("span", {
|
|
215
|
+
key: 0,
|
|
216
|
+
class: f(c.parts.glyph)
|
|
217
|
+
}, [c.entry.glyph ? (h(), r(_(c.entry.glyph), { key: 0 })) : i("", !0)], 2)) : i("", !0),
|
|
218
|
+
o("span", { class: f(c.parts.label) }, y(c.entry.label), 3),
|
|
219
|
+
o("span", {
|
|
220
|
+
"aria-hidden": "true",
|
|
221
|
+
class: f(c.parts.caret)
|
|
222
|
+
}, [s(b(V))], 2)
|
|
223
|
+
], 16), (h(), r(t, { to: b(F)() }, [o("div", d(S.value.getPositionerProps(), {
|
|
224
|
+
style: c.hueStyle,
|
|
225
|
+
class: ["glim-select-positioner", c.hueClass]
|
|
226
|
+
}), [o("div", d(S.value.getContentProps(), { class: c.parts.content }), [(h(!0), a(e, null, g(c.entry.options, (e) => (h(), r($, {
|
|
227
|
+
key: e.value,
|
|
228
|
+
api: S.value,
|
|
229
|
+
option: e,
|
|
230
|
+
value: c.value,
|
|
231
|
+
parts: c.parts,
|
|
232
|
+
onChange: l[0] ||= (e) => p("change", e)
|
|
233
|
+
}, null, 8, [
|
|
234
|
+
"api",
|
|
235
|
+
"option",
|
|
236
|
+
"value",
|
|
237
|
+
"parts"
|
|
238
|
+
]))), 128))], 16)], 16)], 8, ["to"]))], 64));
|
|
239
|
+
}
|
|
240
|
+
}), se = {
|
|
241
|
+
key: 0,
|
|
242
|
+
"aria-hidden": "true",
|
|
243
|
+
class: "glim-field-label"
|
|
244
|
+
}, ce = [
|
|
245
|
+
"disabled",
|
|
246
|
+
"data-disabled",
|
|
247
|
+
"data-readonly",
|
|
248
|
+
"aria-busy",
|
|
249
|
+
"aria-label",
|
|
250
|
+
"aria-describedby"
|
|
251
|
+
], le = /* @__PURE__ */ c({
|
|
252
|
+
__name: "MenuSelect",
|
|
253
|
+
props: {
|
|
254
|
+
label: {},
|
|
255
|
+
hideLabel: { type: Boolean },
|
|
256
|
+
groups: {},
|
|
257
|
+
value: {},
|
|
258
|
+
placeholder: {},
|
|
259
|
+
width: {},
|
|
260
|
+
rows: {},
|
|
261
|
+
triggerClass: {},
|
|
262
|
+
id: {},
|
|
263
|
+
triggerAttrs: {},
|
|
264
|
+
listId: {},
|
|
265
|
+
disabled: { type: Boolean },
|
|
266
|
+
busy: { type: Boolean },
|
|
267
|
+
tip: {},
|
|
268
|
+
shake: {}
|
|
269
|
+
},
|
|
270
|
+
emits: ["change"],
|
|
271
|
+
setup(c, { expose: l, emit: u }) {
|
|
272
|
+
let p = c, m = u, _ = x(), S = B(J.machine, n(() => ({
|
|
273
|
+
id: _,
|
|
274
|
+
ids: {
|
|
275
|
+
trigger: p.id,
|
|
276
|
+
content: p.listId
|
|
277
|
+
},
|
|
278
|
+
dir: P(),
|
|
279
|
+
"aria-label": p.label,
|
|
280
|
+
positioning: ee
|
|
281
|
+
}))), D = n(() => J.connect(S, z)), O = n(() => A(p.groups)), j = n(() => O.value.some((e) => e.glyph)), I = n(() => ne(p.rows, j.value)), L = n(() => k(O.value, p.value, p.placeholder, p.width).text), R = (e, t) => `${_}-sub-${e}-${t}`, H = v(null), Y = K(() => p.tip, () => !!p.disabled);
|
|
282
|
+
U(H, {
|
|
283
|
+
all: () => O.value,
|
|
284
|
+
value: () => p.value,
|
|
285
|
+
inert: () => !!(p.disabled || p.busy),
|
|
286
|
+
onChange: (e) => m("change", e),
|
|
287
|
+
shakeCount: () => p.shake ?? 0
|
|
288
|
+
});
|
|
289
|
+
let X = W(() => D.value.open, H), Z = v(null);
|
|
290
|
+
C(() => D.value.open, (e, t, n) => {
|
|
291
|
+
e && Z.value && H.value && n(T(Z.value, H.value, M(p.groups, p.value, R)));
|
|
292
|
+
}, { flush: "post" }), C(() => D.value.open, (e, t, n) => {
|
|
293
|
+
if (!e) return;
|
|
294
|
+
n(E(() => D.value.setOpen(!1)));
|
|
295
|
+
let r = M(p.groups, p.value, R);
|
|
296
|
+
if (r === null) return;
|
|
297
|
+
let i = 0, a = requestAnimationFrame(() => {
|
|
298
|
+
i = requestAnimationFrame(() => D.value.setHighlightedValue(r));
|
|
299
|
+
});
|
|
300
|
+
n(() => {
|
|
301
|
+
cancelAnimationFrame(a), cancelAnimationFrame(i);
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
let ie = n(() => {
|
|
305
|
+
let e = D.value.getTriggerProps(), t = (t) => (n) => {
|
|
306
|
+
p.busy ? n.preventDefault() : e[t]?.(n);
|
|
307
|
+
};
|
|
308
|
+
return {
|
|
309
|
+
...p.triggerAttrs,
|
|
310
|
+
...e,
|
|
311
|
+
onPointerdown: t("onPointerdown"),
|
|
312
|
+
onClick: t("onClick"),
|
|
313
|
+
onKeydown: t("onKeydown")
|
|
314
|
+
};
|
|
315
|
+
});
|
|
316
|
+
function Q(e) {
|
|
317
|
+
H.value = e, Y.trigger.value = H.value;
|
|
318
|
+
}
|
|
319
|
+
return l({ trigger: H }), (n, l) => (h(), a("div", { class: f(b(te)(c.width)) }, [
|
|
320
|
+
c.hideLabel ? i("", !0) : (h(), a("span", se, y(c.label), 1)),
|
|
321
|
+
o("div", null, [s(b(q), {
|
|
322
|
+
on: !!c.disabled && !!c.tip,
|
|
323
|
+
show: b(Y).show,
|
|
324
|
+
hide: b(Y).hide
|
|
325
|
+
}, {
|
|
326
|
+
default: w(() => [o("button", d(ie.value, {
|
|
327
|
+
ref: Q,
|
|
328
|
+
disabled: c.disabled,
|
|
329
|
+
"data-disabled": c.disabled ? "" : void 0,
|
|
330
|
+
"data-readonly": c.busy ? "" : void 0,
|
|
331
|
+
"aria-busy": c.busy || void 0,
|
|
332
|
+
"aria-label": `${c.label}: ${L.value}`,
|
|
333
|
+
"aria-describedby": b(Y).describedBy.value,
|
|
334
|
+
class: c.triggerClass,
|
|
335
|
+
onMouseenter: l[0] ||= (...e) => b(Y).show && b(Y).show(...e),
|
|
336
|
+
onMouseleave: l[1] ||= (...e) => b(Y).hide && b(Y).hide(...e),
|
|
337
|
+
onFocus: l[2] ||= (...e) => b(Y).showOnFocus && b(Y).showOnFocus(...e),
|
|
338
|
+
onBlur: l[3] ||= (...e) => b(Y).hide && b(Y).hide(...e)
|
|
339
|
+
}), [s(re, {
|
|
340
|
+
all: O.value,
|
|
341
|
+
value: c.value,
|
|
342
|
+
placeholder: c.placeholder,
|
|
343
|
+
width: c.width,
|
|
344
|
+
glyphs: j.value
|
|
345
|
+
}, null, 8, [
|
|
346
|
+
"all",
|
|
347
|
+
"value",
|
|
348
|
+
"placeholder",
|
|
349
|
+
"width",
|
|
350
|
+
"glyphs"
|
|
351
|
+
]), o("span", d(D.value.getIndicatorProps(), { class: "glim-select-indicator" }), [s(b(V))], 16)], 16, ce)]),
|
|
352
|
+
_: 1
|
|
353
|
+
}, 8, [
|
|
354
|
+
"on",
|
|
355
|
+
"show",
|
|
356
|
+
"hide"
|
|
357
|
+
])]),
|
|
358
|
+
s(G, { state: b(Y) }, null, 8, ["state"]),
|
|
359
|
+
(h(), r(t, { to: b(F)() }, [o("div", d(D.value.getPositionerProps(), {
|
|
360
|
+
style: b(X).style.value,
|
|
361
|
+
class: ["glim-select-positioner", b(X).className.value]
|
|
362
|
+
}), [o("div", d({
|
|
363
|
+
ref_key: "content",
|
|
364
|
+
ref: Z
|
|
365
|
+
}, D.value.getContentProps(), { class: I.value.content }), [(h(!0), a(e, null, g(c.groups, (t, n) => (h(), a(e, { key: n }, [t.entries.length > 0 ? (h(), a("div", d({
|
|
366
|
+
key: 0,
|
|
367
|
+
ref_for: !0
|
|
368
|
+
}, t.heading ? D.value.getItemGroupProps({ id: `g${n}` }) : {}, { class: "glim-select-group" }), [t.heading ? (h(), a("div", d({
|
|
369
|
+
key: 0,
|
|
370
|
+
ref_for: !0
|
|
371
|
+
}, D.value.getItemGroupLabelProps({ htmlFor: `g${n}` }), { class: I.value.heading }), y(t.heading), 17)) : i("", !0), (h(!0), a(e, null, g(t.entries, (t, i) => (h(), a(e, { key: b(N)(t) ? `s${i}` : t.value }, [b(N)(t) ? (h(), r(oe, {
|
|
372
|
+
key: 0,
|
|
373
|
+
parent: b(S),
|
|
374
|
+
"parent-api": D.value,
|
|
375
|
+
"trigger-id": R(n, i),
|
|
376
|
+
entry: t,
|
|
377
|
+
value: c.value,
|
|
378
|
+
parts: I.value,
|
|
379
|
+
"hue-style": b(X).style.value,
|
|
380
|
+
"hue-class": b(X).className.value,
|
|
381
|
+
onChange: l[4] ||= (e) => m("change", e)
|
|
382
|
+
}, null, 8, [
|
|
383
|
+
"parent",
|
|
384
|
+
"parent-api",
|
|
385
|
+
"trigger-id",
|
|
386
|
+
"entry",
|
|
387
|
+
"value",
|
|
388
|
+
"parts",
|
|
389
|
+
"hue-style",
|
|
390
|
+
"hue-class"
|
|
391
|
+
])) : (h(), r($, {
|
|
392
|
+
key: 1,
|
|
393
|
+
api: D.value,
|
|
394
|
+
option: t,
|
|
395
|
+
value: c.value,
|
|
396
|
+
parts: I.value,
|
|
397
|
+
onChange: l[5] ||= (e) => m("change", e)
|
|
398
|
+
}, null, 8, [
|
|
399
|
+
"api",
|
|
400
|
+
"option",
|
|
401
|
+
"value",
|
|
402
|
+
"parts"
|
|
403
|
+
]))], 64))), 128))], 16)) : i("", !0)], 64))), 128))], 16)], 16)], 8, ["to"]))
|
|
404
|
+
], 2));
|
|
405
|
+
}
|
|
406
|
+
}), ue = /* @__PURE__ */ c({
|
|
407
|
+
__name: "Select",
|
|
408
|
+
props: /*@__PURE__*/ u({
|
|
409
|
+
label: {},
|
|
410
|
+
hideLabel: {
|
|
411
|
+
type: Boolean,
|
|
412
|
+
default: !1
|
|
413
|
+
},
|
|
414
|
+
options: {},
|
|
415
|
+
groups: {},
|
|
416
|
+
placeholder: {},
|
|
417
|
+
width: {},
|
|
418
|
+
size: { default: "field" },
|
|
419
|
+
rows: { default: "list" },
|
|
420
|
+
wrap: {
|
|
421
|
+
type: Boolean,
|
|
422
|
+
default: !1
|
|
423
|
+
},
|
|
424
|
+
id: {},
|
|
425
|
+
triggerAttrs: {},
|
|
426
|
+
listId: {},
|
|
427
|
+
disabled: {
|
|
428
|
+
type: Boolean,
|
|
429
|
+
default: !1
|
|
430
|
+
},
|
|
431
|
+
busy: {
|
|
432
|
+
type: Boolean,
|
|
433
|
+
default: !1
|
|
434
|
+
},
|
|
435
|
+
tip: {},
|
|
436
|
+
shake: {}
|
|
437
|
+
}, {
|
|
438
|
+
modelValue: { required: !0 },
|
|
439
|
+
modelModifiers: {}
|
|
440
|
+
}),
|
|
441
|
+
emits: ["update:modelValue"],
|
|
442
|
+
setup(e) {
|
|
443
|
+
let t = e, i = S(e, "modelValue"), a = n(() => t.groups ?? [{ entries: t.options ?? [] }]), o = L(() => t.label), s = n(() => t.label === void 0), c = n(() => ({
|
|
444
|
+
label: o.value ?? "",
|
|
445
|
+
hideLabel: t.hideLabel || s.value,
|
|
446
|
+
groups: a.value,
|
|
447
|
+
value: i.value,
|
|
448
|
+
placeholder: t.placeholder,
|
|
449
|
+
width: t.width ?? (s.value ? "steady" : D(t.size)),
|
|
450
|
+
rows: t.rows,
|
|
451
|
+
triggerClass: I(t.size, t.wrap),
|
|
452
|
+
id: t.id,
|
|
453
|
+
triggerAttrs: t.triggerAttrs,
|
|
454
|
+
listId: t.listId,
|
|
455
|
+
disabled: t.disabled,
|
|
456
|
+
busy: t.busy,
|
|
457
|
+
tip: t.tip,
|
|
458
|
+
shake: t.shake
|
|
459
|
+
}));
|
|
460
|
+
return (e, t) => b(j)(a.value) ? (h(), r(le, d({
|
|
461
|
+
key: 0,
|
|
462
|
+
"data-glim": "Select"
|
|
463
|
+
}, c.value, { onChange: t[0] ||= (e) => i.value = e }), null, 16)) : (h(), r(Q, d({
|
|
464
|
+
key: 1,
|
|
465
|
+
"data-glim": "Select"
|
|
466
|
+
}, c.value, { onChange: t[1] ||= (e) => i.value = e }), null, 16));
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
export { ue as t };
|
package/dist/Select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Select } from "./Select-
|
|
1
|
+
export { t as Select } from "./Select-BiQGVqg_.js";
|
package/dist/Selector.vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SelectMode, type SelectorActivation, type SelectorOrientation, type SelectorSize, type SelectorVariant } from "@glimstone/core";
|
|
1
|
+
import { type LabelMode, type SelectMode, type SelectorActivation, type SelectorOrientation, type SelectorSize, type SelectorVariant } from "@glimstone/core";
|
|
2
2
|
import type { SelectorItem } from "./selectorItem";
|
|
3
3
|
declare const __VLS_export: <V extends string | number = string, M extends SelectMode = "one">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
@@ -10,6 +10,9 @@ declare const __VLS_export: <V extends string | number = string, M extends Selec
|
|
|
10
10
|
select?: M;
|
|
11
11
|
/** `vertical` is the column of tiles beside a settings area's pages. */
|
|
12
12
|
orientation?: SelectorOrientation;
|
|
13
|
+
/** The label mode of this strip alone, in place of the app's setting, for a
|
|
14
|
+
* strip that has to speak in glyphs, words or both whatever the rest does. */
|
|
15
|
+
labels?: LabelMode;
|
|
13
16
|
size?: SelectorSize;
|
|
14
17
|
variant?: SelectorVariant;
|
|
15
18
|
/** "manual" moves the focus and chooses on Space, Enter or a click, for a strip that saves a setting. */
|
|
@@ -21,8 +24,6 @@ declare const __VLS_export: <V extends string | number = string, M extends Selec
|
|
|
21
24
|
/** Share the row evenly without a pinned width, for page tabs. Every strip keeps to one row, a strip of one
|
|
22
25
|
* turning into a dropdown where its labels do not fit and not every segment has a glyph. */
|
|
23
26
|
fit?: boolean;
|
|
24
|
-
/** Has no effect: every strip keeps to one row. */
|
|
25
|
-
pairsOnPhone?: boolean;
|
|
26
27
|
/** The button height for every segment, for a strip beside a Button. */
|
|
27
28
|
buttonHeight?: boolean;
|
|
28
29
|
/** Take a colour under rainbow. */
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type SettingsNavText } from "@glimstone/core";
|
|
2
|
+
import type { SettingsNavGroup } from "./settingsNavItem";
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
groups: SettingsNavGroup[];
|
|
5
|
+
/** The page that is showing. Without one a phone shows the list itself. */
|
|
6
|
+
modelValue: string | null;
|
|
7
|
+
/** The area's name, such as "Settings": the list's accessible name and the
|
|
8
|
+
* back link's words. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Where the back link leads, the list's own address. Without one it is a button. */
|
|
11
|
+
backHref?: string;
|
|
12
|
+
/** The person's order of the pages as ids, which the tiles follow with cards.
|
|
13
|
+
* Without one they stand in the order of the groups. */
|
|
14
|
+
order?: readonly string[] | null;
|
|
15
|
+
/** The words the component brings along, in the app's language. */
|
|
16
|
+
text?: Partial<SettingsNavText>;
|
|
17
|
+
/** Hears the page a row opens, and null from the back link. Without a
|
|
18
|
+
* listener a row with an href is a plain link for the app's router. */
|
|
19
|
+
"onUpdate:modelValue"?: (id: string | null) => void;
|
|
20
|
+
/** Hears the whole new order once a tile is dragged or moved with Alt and an
|
|
21
|
+
* arrow key. Without a listener, and always without cards, nothing moves. */
|
|
22
|
+
onReorder?: (order: string[]) => void;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_template: () => {
|
|
25
|
+
__VLS_Slots: {
|
|
26
|
+
default?: (props: {}) => any;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
30
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
package/dist/SignInTile.vue.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ type __VLS_Props = {
|
|
|
25
25
|
labelKeys?: Partial<SignInTileLabelKeys>;
|
|
26
26
|
};
|
|
27
27
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
28
|
+
cards: readonly SignInTileCard[];
|
|
28
29
|
hueStart: number;
|
|
29
30
|
scopes: string[];
|
|
30
|
-
cards: readonly SignInTileCard[];
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
package/dist/SignaturePad.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { SIGNATURE_PAD_TEXT as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, guardReactiveProps as s, mergeModels as c, mergeProps as l, normalizeProps as u, openBlock as d, renderList as f, toDisplayString as p, unref as m, useId as h, useModel as g } from "vue";
|
|
2
|
+
import * as _ from "@zag-js/signature-pad";
|
|
3
|
+
import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
|
|
4
|
+
import { SIGNATURE_PAD_TEXT as b, pageDir as x } from "@glimstone/core";
|
|
5
|
+
import { t as S } from "./Button-DVUuFYk0.js";
|
|
6
|
+
import { _ as C } from "./glyphs-DncaPYo_.js";
|
|
7
7
|
// src/SignaturePad.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var w = { class: "glim-signature-foot" }, T = /* @__PURE__ */
|
|
8
|
+
var w = { class: "glim-signature-foot" }, T = /* @__PURE__ */ o({
|
|
9
9
|
__name: "SignaturePad",
|
|
10
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ c({
|
|
11
11
|
label: {},
|
|
12
12
|
disabled: {
|
|
13
13
|
type: Boolean,
|
|
@@ -19,15 +19,15 @@ var w = { class: "glim-signature-foot" }, T = /* @__PURE__ */ c({
|
|
|
19
19
|
modelModifiers: {}
|
|
20
20
|
}),
|
|
21
21
|
emits: ["update:modelValue"],
|
|
22
|
-
setup(
|
|
23
|
-
let
|
|
24
|
-
...
|
|
25
|
-
...
|
|
26
|
-
})), D =
|
|
22
|
+
setup(o) {
|
|
23
|
+
let c = o, T = g(o, "modelValue"), E = t(() => ({
|
|
24
|
+
...b,
|
|
25
|
+
...c.text
|
|
26
|
+
})), D = h(), O = y(_.machine, t(() => ({
|
|
27
27
|
id: D,
|
|
28
|
-
dir:
|
|
28
|
+
dir: x(),
|
|
29
29
|
paths: T.value,
|
|
30
|
-
disabled:
|
|
30
|
+
disabled: c.disabled,
|
|
31
31
|
drawing: {
|
|
32
32
|
fill: "currentColor",
|
|
33
33
|
size: 2,
|
|
@@ -38,25 +38,25 @@ var w = { class: "glim-signature-foot" }, T = /* @__PURE__ */ c({
|
|
|
38
38
|
control: E.value.area,
|
|
39
39
|
clearTrigger: E.value.clear
|
|
40
40
|
}
|
|
41
|
-
}))), k =
|
|
41
|
+
}))), k = t(() => _.connect(O, v));
|
|
42
42
|
function A() {
|
|
43
43
|
k.value.clear(), T.value = [];
|
|
44
44
|
}
|
|
45
|
-
return (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
return (t, c) => (d(), r("div", l({ "data-glim": "SignaturePad" }, k.value.getRootProps(), { class: "glim-signature" }), [
|
|
46
|
+
i("label", l(k.value.getLabelProps(), { class: "glim-field-label" }), p(o.label), 17),
|
|
47
|
+
i("div", l(k.value.getControlProps(), { class: "glim-signature-pad" }), [(d(), r("svg", l(k.value.getSegmentProps(), { class: "glim-signature-ink" }), [(d(!0), r(e, null, f(k.value.paths, (e, t) => (d(), r("path", l({ key: t }, { ref_for: !0 }, k.value.getSegmentPathProps({ path: e })), null, 16))), 128)), k.value.currentPath ? (d(), r("path", u(l({ key: 0 }, k.value.getSegmentPathProps({ path: k.value.currentPath }))), null, 16)) : n("", !0)], 16)), i("div", l(k.value.getGuideProps(), { class: "glim-signature-guide" }), null, 16)], 16),
|
|
48
|
+
i("div", w, [a(S, {
|
|
49
49
|
label: E.value.clear,
|
|
50
50
|
"label-key": null,
|
|
51
|
-
glyph:
|
|
52
|
-
disabled: k.value.empty ||
|
|
51
|
+
glyph: m(C),
|
|
52
|
+
disabled: k.value.empty || o.disabled,
|
|
53
53
|
onClick: A
|
|
54
54
|
}, null, 8, [
|
|
55
55
|
"label",
|
|
56
56
|
"glyph",
|
|
57
57
|
"disabled"
|
|
58
58
|
])]),
|
|
59
|
-
|
|
59
|
+
i("input", u(s(k.value.getHiddenInputProps({ value: k.value.paths.join(" ") }))), null, 16)
|
|
60
60
|
], 16));
|
|
61
61
|
}
|
|
62
62
|
});
|
|
@@ -5,8 +5,14 @@ type __VLS_Props = {
|
|
|
5
5
|
tile?: boolean;
|
|
6
6
|
/** The badge at the row's end, for a list whose rows have one. */
|
|
7
7
|
badge?: boolean;
|
|
8
|
+
/** A bar in the value column, for a list whose rows carry a `value`. */
|
|
9
|
+
value?: boolean;
|
|
10
|
+
/** How many row buttons to keep room for, so the value bar stands where the real rows put their figures. */
|
|
11
|
+
actions?: number;
|
|
8
12
|
};
|
|
9
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
value: boolean;
|
|
15
|
+
actions: number;
|
|
10
16
|
tile: boolean;
|
|
11
17
|
badge: boolean;
|
|
12
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|