@glimstone/vue 4.9.2 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/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 +57 -53
- package/dist/Pagination.js +32 -32
- 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/{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 +4027 -3288
- package/dist/settingsNavItem.d.ts +16 -0
- package/dist/tipBubble.d.ts +12 -1
- package/dist/windowParts.d.ts +4 -1
- package/package.json +2 -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
package/dist/Select-DBABOjwc.js
DELETED
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./fieldName-DBygJJfe.js";
|
|
2
|
-
import { i as t, s as n } from "./glyphs-CS3VBARx.js";
|
|
3
|
-
import { n as r, t as i } from "./selectParts-0e1ib8BL.js";
|
|
4
|
-
import { n as a, r as o, t as s } from "./TipWrap-5Nw7Yj0O.js";
|
|
5
|
-
import { Fragment as c, Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeModels as v, mergeProps as y, normalizeClass as b, normalizeProps as x, onMounted as S, openBlock as C, renderList as w, resolveDynamicComponent as T, shallowRef as E, toDisplayString as D, unref as O, useId as k, useModel as A, watch as j, withCtx as M } from "vue";
|
|
6
|
-
import { SELECT_POSITIONING as N, closeOnPageMove as P, defaultWidth as F, endOption as I, faceLabels as L, flattenRuns as R, hasSubmenu as z, homeRow as B, isSubmenu as V, pageDir as H, portalTarget as U, selectRootClass as W, selectRowParts as G, selectTriggerClass as K } from "@glimstone/core";
|
|
7
|
-
import * as q from "@zag-js/select";
|
|
8
|
-
import { normalizeProps as J, useMachine as Y } from "@zag-js/vue";
|
|
9
|
-
import * as X from "@zag-js/menu";
|
|
10
|
-
// src/SelectFace.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var Z = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "glim-select-glyph"
|
|
14
|
-
}, Q = { class: "glim-select-value" }, $ = ["aria-hidden"], ee = /* @__PURE__ */ g({
|
|
15
|
-
__name: "SelectFace",
|
|
16
|
-
props: {
|
|
17
|
-
all: {},
|
|
18
|
-
value: {},
|
|
19
|
-
placeholder: {},
|
|
20
|
-
width: {},
|
|
21
|
-
glyphs: { type: Boolean }
|
|
22
|
-
},
|
|
23
|
-
setup(e) {
|
|
24
|
-
let t = e, n = u(() => L(t.all, t.value, t.placeholder, t.width)), r = u(() => t.all.find((e) => e.value === t.value)?.glyph);
|
|
25
|
-
return (t, i) => (C(), p(c, null, [e.glyphs ? (C(), p("span", Z, [r.value ? (C(), d(T(r.value), { key: 0 })) : f("", !0)])) : f("", !0), m("span", Q, [(C(!0), p(c, null, w(n.value.labels, (e) => (C(), p("span", {
|
|
26
|
-
key: e,
|
|
27
|
-
"aria-hidden": e !== n.value.text || void 0,
|
|
28
|
-
class: b(e === n.value.text ? void 0 : "glim-select-ghost")
|
|
29
|
-
}, D(e), 11, $))), 128))])], 64));
|
|
30
|
-
}
|
|
31
|
-
}), te = ["aria-busy", "aria-describedby"], ne = /* @__PURE__ */ g({
|
|
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(e, { expose: g, emit: v }) {
|
|
52
|
-
let S = e, A = v, F = k(), L = u(() => R(S.groups)), z = u(() => L.value.some((e) => e.glyph)), B = u(() => G(S.rows, z.value)), V = u(() => q.collection({
|
|
53
|
-
items: L.value,
|
|
54
|
-
itemToValue: (e) => e.value,
|
|
55
|
-
itemToString: (e) => e.label,
|
|
56
|
-
isItemDisabled: (e) => !!e.disabled
|
|
57
|
-
})), K = Y(q.machine, u(() => ({
|
|
58
|
-
id: F,
|
|
59
|
-
ids: {
|
|
60
|
-
trigger: S.id,
|
|
61
|
-
content: S.listId
|
|
62
|
-
},
|
|
63
|
-
dir: H(),
|
|
64
|
-
collection: V.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 && A("change", t);
|
|
71
|
-
},
|
|
72
|
-
positioning: N
|
|
73
|
-
}))), X = u(() => q.connect(K, J)), Z = E(null), Q = o(() => S.tip, () => !!S.disabled);
|
|
74
|
-
r(Z, {
|
|
75
|
-
all: () => L.value,
|
|
76
|
-
value: () => S.value,
|
|
77
|
-
inert: () => !!(S.disabled || S.busy),
|
|
78
|
-
onChange: (e) => A("change", e),
|
|
79
|
-
shakeCount: () => S.shake ?? 0
|
|
80
|
-
}), j(() => X.value.open, (e, t, n) => {
|
|
81
|
-
e && n(P(() => X.value.setOpen(!1)));
|
|
82
|
-
});
|
|
83
|
-
let $ = i(() => X.value.open, Z);
|
|
84
|
-
function ne(e) {
|
|
85
|
-
let t = X.value.open ? void 0 : I(L.value, e.key);
|
|
86
|
-
if (t === void 0) return X.value.getTriggerProps().onKeydown?.(e);
|
|
87
|
-
e.preventDefault(), X.value.setOpen(!0), X.value.setHighlightValue(t);
|
|
88
|
-
}
|
|
89
|
-
function re(e) {
|
|
90
|
-
Z.value = e, Q.trigger.value = Z.value;
|
|
91
|
-
}
|
|
92
|
-
return g({ trigger: Z }), (r, i) => (C(), p("div", y(X.value.getRootProps(), { class: O(W)(e.width) }), [
|
|
93
|
-
m("label", y(X.value.getLabelProps(), { class: e.hideLabel ? "glim-sr-only" : "glim-field-label" }), D(e.label), 17),
|
|
94
|
-
m("div", x(_(X.value.getControlProps())), [h(O(s), {
|
|
95
|
-
on: !!e.disabled && !!e.tip,
|
|
96
|
-
show: O(Q).show,
|
|
97
|
-
hide: O(Q).hide
|
|
98
|
-
}, {
|
|
99
|
-
default: M(() => [m("button", y({
|
|
100
|
-
...e.triggerAttrs,
|
|
101
|
-
...X.value.getTriggerProps(),
|
|
102
|
-
onKeydown: ne
|
|
103
|
-
}, {
|
|
104
|
-
ref: re,
|
|
105
|
-
"aria-busy": e.busy || void 0,
|
|
106
|
-
"aria-describedby": O(Q).describedBy.value,
|
|
107
|
-
class: e.triggerClass,
|
|
108
|
-
onMouseenter: i[0] ||= (...e) => O(Q).show && O(Q).show(...e),
|
|
109
|
-
onMouseleave: i[1] ||= (...e) => O(Q).hide && O(Q).hide(...e),
|
|
110
|
-
onFocus: i[2] ||= (...e) => O(Q).showOnFocus && O(Q).showOnFocus(...e),
|
|
111
|
-
onBlur: i[3] ||= (...e) => O(Q).hide && O(Q).hide(...e)
|
|
112
|
-
}), [h(ee, {
|
|
113
|
-
all: L.value,
|
|
114
|
-
value: e.value,
|
|
115
|
-
placeholder: e.placeholder,
|
|
116
|
-
width: e.width,
|
|
117
|
-
glyphs: z.value
|
|
118
|
-
}, null, 8, [
|
|
119
|
-
"all",
|
|
120
|
-
"value",
|
|
121
|
-
"placeholder",
|
|
122
|
-
"width",
|
|
123
|
-
"glyphs"
|
|
124
|
-
]), m("span", y(X.value.getIndicatorProps(), { class: "glim-select-indicator" }), [h(O(n))], 16)], 16, te)]),
|
|
125
|
-
_: 1
|
|
126
|
-
}, 8, [
|
|
127
|
-
"on",
|
|
128
|
-
"show",
|
|
129
|
-
"hide"
|
|
130
|
-
])], 16),
|
|
131
|
-
h(a, { state: O(Q) }, null, 8, ["state"]),
|
|
132
|
-
(C(), d(l, { to: O(U)() }, [m("div", y(X.value.getPositionerProps(), {
|
|
133
|
-
style: O($).style.value,
|
|
134
|
-
class: ["glim-select-positioner", O($).className.value]
|
|
135
|
-
}), [m("div", y(X.value.getContentProps(), { class: B.value.content }), [(C(!0), p(c, null, w(e.groups, (e, n) => (C(), p(c, { key: n }, [e.entries.length > 0 ? (C(), p("div", y({
|
|
136
|
-
key: 0,
|
|
137
|
-
ref_for: !0
|
|
138
|
-
}, e.heading ? X.value.getItemGroupProps({ id: `${O(F)}-g${n}` }) : {}, { class: "glim-select-group" }), [e.heading ? (C(), p("div", y({
|
|
139
|
-
key: 0,
|
|
140
|
-
ref_for: !0
|
|
141
|
-
}, X.value.getItemGroupLabelProps({ htmlFor: `${O(F)}-g${n}` }), { class: B.value.heading }), D(e.heading), 17)) : f("", !0), (C(!0), p(c, null, w(e.entries, (e) => (C(), p("div", y({ key: e.value }, { ref_for: !0 }, X.value.getItemProps({ item: e }), { class: B.value.item }), [
|
|
142
|
-
B.value.glyph ? (C(), p("span", {
|
|
143
|
-
key: 0,
|
|
144
|
-
class: b(B.value.glyph)
|
|
145
|
-
}, [e.glyph ? (C(), d(T(e.glyph), { key: 0 })) : f("", !0)], 2)) : f("", !0),
|
|
146
|
-
m("span", y({ ref_for: !0 }, X.value.getItemTextProps({ item: e }), { class: B.value.label }), D(e.label), 17),
|
|
147
|
-
m("span", y({ ref_for: !0 }, X.value.getItemIndicatorProps({ item: e }), { class: B.value.check }), [h(O(t))], 16)
|
|
148
|
-
], 16))), 128))], 16)) : f("", !0)], 64))), 128))], 16)], 16)], 8, ["to"])),
|
|
149
|
-
m("select", x(_(X.value.getHiddenSelectProps())), null, 16)
|
|
150
|
-
], 16));
|
|
151
|
-
}
|
|
152
|
-
}), re = ["data-state"], ie = /* @__PURE__ */ g({
|
|
153
|
-
__name: "MenuChoice",
|
|
154
|
-
props: {
|
|
155
|
-
api: {},
|
|
156
|
-
option: {},
|
|
157
|
-
value: {},
|
|
158
|
-
parts: {}
|
|
159
|
-
},
|
|
160
|
-
emits: ["change"],
|
|
161
|
-
setup(e, { emit: n }) {
|
|
162
|
-
let r = e, i = n, a = u(() => r.option.value === r.value), o = u(() => ({
|
|
163
|
-
type: "radio",
|
|
164
|
-
value: r.option.value,
|
|
165
|
-
valueText: r.option.label,
|
|
166
|
-
checked: a.value,
|
|
167
|
-
disabled: r.option.disabled,
|
|
168
|
-
onCheckedChange: () => {
|
|
169
|
-
a.value || i("change", r.option.value);
|
|
170
|
-
}
|
|
171
|
-
}));
|
|
172
|
-
return (n, r) => (C(), p("div", y(e.api.getOptionItemProps(o.value), { class: e.parts.item }), [
|
|
173
|
-
e.parts.glyph ? (C(), p("span", {
|
|
174
|
-
key: 0,
|
|
175
|
-
class: b(e.parts.glyph)
|
|
176
|
-
}, [e.option.glyph ? (C(), d(T(e.option.glyph), { key: 0 })) : f("", !0)], 2)) : f("", !0),
|
|
177
|
-
m("span", y(e.api.getItemTextProps(o.value), { class: e.parts.label }), D(e.option.label), 17),
|
|
178
|
-
m("span", {
|
|
179
|
-
"aria-hidden": "true",
|
|
180
|
-
"data-state": a.value ? "checked" : "unchecked",
|
|
181
|
-
class: b(e.parts.check)
|
|
182
|
-
}, [h(O(t))], 10, re)
|
|
183
|
-
], 16));
|
|
184
|
-
}
|
|
185
|
-
}), ae = /* @__PURE__ */ g({
|
|
186
|
-
__name: "MenuSubmenu",
|
|
187
|
-
props: {
|
|
188
|
-
parent: {},
|
|
189
|
-
parentApi: {},
|
|
190
|
-
triggerId: {},
|
|
191
|
-
entry: {},
|
|
192
|
-
value: {},
|
|
193
|
-
parts: {},
|
|
194
|
-
hueStyle: {},
|
|
195
|
-
hueClass: {}
|
|
196
|
-
},
|
|
197
|
-
emits: ["change"],
|
|
198
|
-
setup(e, { emit: t }) {
|
|
199
|
-
let r = e, i = t, a = Y(X.machine, {
|
|
200
|
-
id: k(),
|
|
201
|
-
ids: { trigger: r.triggerId },
|
|
202
|
-
dir: H(),
|
|
203
|
-
"aria-label": r.entry.label
|
|
204
|
-
}), o = u(() => X.connect(a, J));
|
|
205
|
-
return S(() => {
|
|
206
|
-
r.parentApi.setChild(a), o.value.setParent(r.parent);
|
|
207
|
-
}), (t, r) => (C(), p(c, null, [m("div", y(e.parentApi.getTriggerItemProps(o.value), { class: e.parts.item }), [
|
|
208
|
-
e.parts.glyph ? (C(), p("span", {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: b(e.parts.glyph)
|
|
211
|
-
}, [e.entry.glyph ? (C(), d(T(e.entry.glyph), { key: 0 })) : f("", !0)], 2)) : f("", !0),
|
|
212
|
-
m("span", { class: b(e.parts.label) }, D(e.entry.label), 3),
|
|
213
|
-
m("span", {
|
|
214
|
-
"aria-hidden": "true",
|
|
215
|
-
class: b(e.parts.caret)
|
|
216
|
-
}, [h(O(n))], 2)
|
|
217
|
-
], 16), (C(), d(l, { to: O(U)() }, [m("div", y(o.value.getPositionerProps(), {
|
|
218
|
-
style: e.hueStyle,
|
|
219
|
-
class: ["glim-select-positioner", e.hueClass]
|
|
220
|
-
}), [m("div", y(o.value.getContentProps(), { class: e.parts.content }), [(C(!0), p(c, null, w(e.entry.options, (t) => (C(), d(ie, {
|
|
221
|
-
key: t.value,
|
|
222
|
-
api: o.value,
|
|
223
|
-
option: t,
|
|
224
|
-
value: e.value,
|
|
225
|
-
parts: e.parts,
|
|
226
|
-
onChange: r[0] ||= (e) => i("change", e)
|
|
227
|
-
}, null, 8, [
|
|
228
|
-
"api",
|
|
229
|
-
"option",
|
|
230
|
-
"value",
|
|
231
|
-
"parts"
|
|
232
|
-
]))), 128))], 16)], 16)], 8, ["to"]))], 64));
|
|
233
|
-
}
|
|
234
|
-
}), oe = {
|
|
235
|
-
key: 0,
|
|
236
|
-
"aria-hidden": "true",
|
|
237
|
-
class: "glim-field-label"
|
|
238
|
-
}, se = [
|
|
239
|
-
"disabled",
|
|
240
|
-
"data-disabled",
|
|
241
|
-
"data-readonly",
|
|
242
|
-
"aria-busy",
|
|
243
|
-
"aria-label",
|
|
244
|
-
"aria-describedby"
|
|
245
|
-
], ce = /* @__PURE__ */ g({
|
|
246
|
-
__name: "MenuSelect",
|
|
247
|
-
props: {
|
|
248
|
-
label: {},
|
|
249
|
-
hideLabel: { type: Boolean },
|
|
250
|
-
groups: {},
|
|
251
|
-
value: {},
|
|
252
|
-
placeholder: {},
|
|
253
|
-
width: {},
|
|
254
|
-
rows: {},
|
|
255
|
-
triggerClass: {},
|
|
256
|
-
id: {},
|
|
257
|
-
triggerAttrs: {},
|
|
258
|
-
listId: {},
|
|
259
|
-
disabled: { type: Boolean },
|
|
260
|
-
busy: { type: Boolean },
|
|
261
|
-
tip: {},
|
|
262
|
-
shake: {}
|
|
263
|
-
},
|
|
264
|
-
emits: ["change"],
|
|
265
|
-
setup(e, { expose: t, emit: g }) {
|
|
266
|
-
let _ = e, v = g, x = k(), S = Y(X.machine, u(() => ({
|
|
267
|
-
id: x,
|
|
268
|
-
ids: {
|
|
269
|
-
trigger: _.id,
|
|
270
|
-
content: _.listId
|
|
271
|
-
},
|
|
272
|
-
dir: H(),
|
|
273
|
-
"aria-label": _.label,
|
|
274
|
-
positioning: N
|
|
275
|
-
}))), T = u(() => X.connect(S, J)), A = u(() => R(_.groups)), F = u(() => A.value.some((e) => e.glyph)), I = u(() => G(_.rows, F.value)), z = u(() => L(A.value, _.value, _.placeholder, _.width).text), K = (e, t) => `${x}-sub-${e}-${t}`, q = E(null), Z = o(() => _.tip, () => !!_.disabled);
|
|
276
|
-
r(q, {
|
|
277
|
-
all: () => A.value,
|
|
278
|
-
value: () => _.value,
|
|
279
|
-
inert: () => !!(_.disabled || _.busy),
|
|
280
|
-
onChange: (e) => v("change", e),
|
|
281
|
-
shakeCount: () => _.shake ?? 0
|
|
282
|
-
});
|
|
283
|
-
let Q = i(() => T.value.open, q);
|
|
284
|
-
j(() => T.value.open, (e, t, n) => {
|
|
285
|
-
if (!e) return;
|
|
286
|
-
n(P(() => T.value.setOpen(!1)));
|
|
287
|
-
let r = B(_.groups, _.value, K);
|
|
288
|
-
if (r === null) return;
|
|
289
|
-
let i = 0, a = requestAnimationFrame(() => {
|
|
290
|
-
i = requestAnimationFrame(() => T.value.setHighlightedValue(r));
|
|
291
|
-
});
|
|
292
|
-
n(() => {
|
|
293
|
-
cancelAnimationFrame(a), cancelAnimationFrame(i);
|
|
294
|
-
});
|
|
295
|
-
});
|
|
296
|
-
let $ = u(() => {
|
|
297
|
-
let e = T.value.getTriggerProps(), t = (t) => (n) => {
|
|
298
|
-
_.busy ? n.preventDefault() : e[t]?.(n);
|
|
299
|
-
};
|
|
300
|
-
return {
|
|
301
|
-
..._.triggerAttrs,
|
|
302
|
-
...e,
|
|
303
|
-
onPointerdown: t("onPointerdown"),
|
|
304
|
-
onClick: t("onClick"),
|
|
305
|
-
onKeydown: t("onKeydown")
|
|
306
|
-
};
|
|
307
|
-
});
|
|
308
|
-
function te(e) {
|
|
309
|
-
q.value = e, Z.trigger.value = q.value;
|
|
310
|
-
}
|
|
311
|
-
return t({ trigger: q }), (t, r) => (C(), p("div", { class: b(O(W)(e.width)) }, [
|
|
312
|
-
e.hideLabel ? f("", !0) : (C(), p("span", oe, D(e.label), 1)),
|
|
313
|
-
m("div", null, [h(O(s), {
|
|
314
|
-
on: !!e.disabled && !!e.tip,
|
|
315
|
-
show: O(Z).show,
|
|
316
|
-
hide: O(Z).hide
|
|
317
|
-
}, {
|
|
318
|
-
default: M(() => [m("button", y($.value, {
|
|
319
|
-
ref: te,
|
|
320
|
-
disabled: e.disabled,
|
|
321
|
-
"data-disabled": e.disabled ? "" : void 0,
|
|
322
|
-
"data-readonly": e.busy ? "" : void 0,
|
|
323
|
-
"aria-busy": e.busy || void 0,
|
|
324
|
-
"aria-label": `${e.label}: ${z.value}`,
|
|
325
|
-
"aria-describedby": O(Z).describedBy.value,
|
|
326
|
-
class: e.triggerClass,
|
|
327
|
-
onMouseenter: r[0] ||= (...e) => O(Z).show && O(Z).show(...e),
|
|
328
|
-
onMouseleave: r[1] ||= (...e) => O(Z).hide && O(Z).hide(...e),
|
|
329
|
-
onFocus: r[2] ||= (...e) => O(Z).showOnFocus && O(Z).showOnFocus(...e),
|
|
330
|
-
onBlur: r[3] ||= (...e) => O(Z).hide && O(Z).hide(...e)
|
|
331
|
-
}), [h(ee, {
|
|
332
|
-
all: A.value,
|
|
333
|
-
value: e.value,
|
|
334
|
-
placeholder: e.placeholder,
|
|
335
|
-
width: e.width,
|
|
336
|
-
glyphs: F.value
|
|
337
|
-
}, null, 8, [
|
|
338
|
-
"all",
|
|
339
|
-
"value",
|
|
340
|
-
"placeholder",
|
|
341
|
-
"width",
|
|
342
|
-
"glyphs"
|
|
343
|
-
]), m("span", y(T.value.getIndicatorProps(), { class: "glim-select-indicator" }), [h(O(n))], 16)], 16, se)]),
|
|
344
|
-
_: 1
|
|
345
|
-
}, 8, [
|
|
346
|
-
"on",
|
|
347
|
-
"show",
|
|
348
|
-
"hide"
|
|
349
|
-
])]),
|
|
350
|
-
h(a, { state: O(Z) }, null, 8, ["state"]),
|
|
351
|
-
(C(), d(l, { to: O(U)() }, [m("div", y(T.value.getPositionerProps(), {
|
|
352
|
-
style: O(Q).style.value,
|
|
353
|
-
class: ["glim-select-positioner", O(Q).className.value]
|
|
354
|
-
}), [m("div", y(T.value.getContentProps(), { class: I.value.content }), [(C(!0), p(c, null, w(e.groups, (t, n) => (C(), p(c, { key: n }, [t.entries.length > 0 ? (C(), p("div", y({
|
|
355
|
-
key: 0,
|
|
356
|
-
ref_for: !0
|
|
357
|
-
}, t.heading ? T.value.getItemGroupProps({ id: `g${n}` }) : {}, { class: "glim-select-group" }), [t.heading ? (C(), p("div", y({
|
|
358
|
-
key: 0,
|
|
359
|
-
ref_for: !0
|
|
360
|
-
}, T.value.getItemGroupLabelProps({ htmlFor: `g${n}` }), { class: I.value.heading }), D(t.heading), 17)) : f("", !0), (C(!0), p(c, null, w(t.entries, (t, i) => (C(), p(c, { key: O(V)(t) ? `s${i}` : t.value }, [O(V)(t) ? (C(), d(ae, {
|
|
361
|
-
key: 0,
|
|
362
|
-
parent: O(S),
|
|
363
|
-
"parent-api": T.value,
|
|
364
|
-
"trigger-id": K(n, i),
|
|
365
|
-
entry: t,
|
|
366
|
-
value: e.value,
|
|
367
|
-
parts: I.value,
|
|
368
|
-
"hue-style": O(Q).style.value,
|
|
369
|
-
"hue-class": O(Q).className.value,
|
|
370
|
-
onChange: r[4] ||= (e) => v("change", e)
|
|
371
|
-
}, null, 8, [
|
|
372
|
-
"parent",
|
|
373
|
-
"parent-api",
|
|
374
|
-
"trigger-id",
|
|
375
|
-
"entry",
|
|
376
|
-
"value",
|
|
377
|
-
"parts",
|
|
378
|
-
"hue-style",
|
|
379
|
-
"hue-class"
|
|
380
|
-
])) : (C(), d(ie, {
|
|
381
|
-
key: 1,
|
|
382
|
-
api: T.value,
|
|
383
|
-
option: t,
|
|
384
|
-
value: e.value,
|
|
385
|
-
parts: I.value,
|
|
386
|
-
onChange: r[5] ||= (e) => v("change", e)
|
|
387
|
-
}, null, 8, [
|
|
388
|
-
"api",
|
|
389
|
-
"option",
|
|
390
|
-
"value",
|
|
391
|
-
"parts"
|
|
392
|
-
]))], 64))), 128))], 16)) : f("", !0)], 64))), 128))], 16)], 16)], 8, ["to"]))
|
|
393
|
-
], 2));
|
|
394
|
-
}
|
|
395
|
-
}), le = /* @__PURE__ */ g({
|
|
396
|
-
__name: "Select",
|
|
397
|
-
props: /*@__PURE__*/ v({
|
|
398
|
-
label: {},
|
|
399
|
-
hideLabel: {
|
|
400
|
-
type: Boolean,
|
|
401
|
-
default: !1
|
|
402
|
-
},
|
|
403
|
-
options: {},
|
|
404
|
-
groups: {},
|
|
405
|
-
placeholder: {},
|
|
406
|
-
width: {},
|
|
407
|
-
size: { default: "field" },
|
|
408
|
-
rows: { default: "list" },
|
|
409
|
-
wrap: {
|
|
410
|
-
type: Boolean,
|
|
411
|
-
default: !1
|
|
412
|
-
},
|
|
413
|
-
id: {},
|
|
414
|
-
triggerAttrs: {},
|
|
415
|
-
listId: {},
|
|
416
|
-
disabled: {
|
|
417
|
-
type: Boolean,
|
|
418
|
-
default: !1
|
|
419
|
-
},
|
|
420
|
-
busy: {
|
|
421
|
-
type: Boolean,
|
|
422
|
-
default: !1
|
|
423
|
-
},
|
|
424
|
-
tip: {},
|
|
425
|
-
shake: {}
|
|
426
|
-
}, {
|
|
427
|
-
modelValue: { required: !0 },
|
|
428
|
-
modelModifiers: {}
|
|
429
|
-
}),
|
|
430
|
-
emits: ["update:modelValue"],
|
|
431
|
-
setup(t) {
|
|
432
|
-
let n = t, r = A(t, "modelValue"), i = u(() => n.groups ?? [{ entries: n.options ?? [] }]), a = e(() => n.label), o = u(() => n.label === void 0), s = u(() => ({
|
|
433
|
-
label: a.value ?? "",
|
|
434
|
-
hideLabel: n.hideLabel || o.value,
|
|
435
|
-
groups: i.value,
|
|
436
|
-
value: r.value,
|
|
437
|
-
placeholder: n.placeholder,
|
|
438
|
-
width: n.width ?? (o.value ? "steady" : F(n.size)),
|
|
439
|
-
rows: n.rows,
|
|
440
|
-
triggerClass: K(n.size, n.wrap),
|
|
441
|
-
id: n.id,
|
|
442
|
-
triggerAttrs: n.triggerAttrs,
|
|
443
|
-
listId: n.listId,
|
|
444
|
-
disabled: n.disabled,
|
|
445
|
-
busy: n.busy,
|
|
446
|
-
tip: n.tip,
|
|
447
|
-
shake: n.shake
|
|
448
|
-
}));
|
|
449
|
-
return (e, t) => O(z)(i.value) ? (C(), d(ce, y({
|
|
450
|
-
key: 0,
|
|
451
|
-
"data-glim": "Select"
|
|
452
|
-
}, s.value, { onChange: t[0] ||= (e) => r.value = e }), null, 16)) : (C(), d(ne, y({
|
|
453
|
-
key: 1,
|
|
454
|
-
"data-glim": "Select"
|
|
455
|
-
}, s.value, { onChange: t[1] ||= (e) => r.value = e }), null, 16));
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
export { le as t };
|
package/dist/TipWrap-5Nw7Yj0O.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Teleport as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, h as o, onScopeDispose as s, openBlock as c, ref as l, shallowRef as u, toDisplayString as d, unref as f, useId as p, watch as m } from "vue";
|
|
2
|
-
import { dismissBubbleOn as h, placeBubble as g, pointerWasLast as _, portalTarget as v, trackInputModality as y } from "@glimstone/core";
|
|
3
|
-
// src/tipBubble.ts
|
|
4
|
-
function b(e, n = () => !1) {
|
|
5
|
-
let r = l(!1), i = u(null), a = u(null), o = p(), c = t(e), d = t(() => !!c.value && r.value);
|
|
6
|
-
m(n, () => r.value = !1), y();
|
|
7
|
-
let f = () => {
|
|
8
|
-
c.value && (r.value = !0);
|
|
9
|
-
}, v = () => {
|
|
10
|
-
r.value = !1;
|
|
11
|
-
}, b;
|
|
12
|
-
return m(d, (e) => {
|
|
13
|
-
b?.(), b = void 0, e && (i.value && a.value && g(i.value, a.value), b = h(v));
|
|
14
|
-
}, { flush: "post" }), s(() => b?.()), {
|
|
15
|
-
trigger: i,
|
|
16
|
-
bubble: a,
|
|
17
|
-
id: o,
|
|
18
|
-
text: c,
|
|
19
|
-
shown: d,
|
|
20
|
-
describedBy: t(() => d.value ? o : void 0),
|
|
21
|
-
show: f,
|
|
22
|
-
hide: v,
|
|
23
|
-
showOnFocus: () => {
|
|
24
|
-
_() || f();
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
// src/TipBubble.vue?vue&type=script&setup=true&lang.ts
|
|
29
|
-
var x = ["id"], S = /* @__PURE__ */ a({
|
|
30
|
-
__name: "TipBubble",
|
|
31
|
-
props: { state: {} },
|
|
32
|
-
setup(t) {
|
|
33
|
-
return (a, o) => (c(), n(e, { to: f(v)() }, [t.state.shown.value ? (c(), i("div", {
|
|
34
|
-
key: 0,
|
|
35
|
-
ref: (e) => t.state.bubble.value = e,
|
|
36
|
-
id: t.state.id,
|
|
37
|
-
role: "tooltip",
|
|
38
|
-
class: "glim-bubble glim-fade"
|
|
39
|
-
}, d(t.state.text.value), 9, x)) : r("", !0)], 8, ["to"]));
|
|
40
|
-
}
|
|
41
|
-
}), C = (e, { slots: t }) => e.on ? o("span", {
|
|
42
|
-
class: "glim-tip-wrap",
|
|
43
|
-
onMouseenter: e.show,
|
|
44
|
-
onMouseleave: e.hide
|
|
45
|
-
}, t.default?.()) : t.default?.();
|
|
46
|
-
C.props = [
|
|
47
|
-
"on",
|
|
48
|
-
"show",
|
|
49
|
-
"hide"
|
|
50
|
-
];
|
|
51
|
-
export { S as n, b as r, C as t };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* relayDeprecated keeps the old names of renamed events working until they
|
|
3
|
-
* go. `aliases` maps each new name to its old one, which the component takes
|
|
4
|
-
* as a listener prop. A page that listens to an old name is told through
|
|
5
|
-
* `warn`, the core's warnDeprecated, and the returned function hands every
|
|
6
|
-
* new event to that listener as well.
|
|
7
|
-
*/
|
|
8
|
-
export declare function relayDeprecated(component: string, aliases: Record<string, string>, props: Record<string, unknown>, warn: (name: string) => void): (event: string, ...args: unknown[]) => void;
|