@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/Collapsible.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
1
|
+
import { computed as e, createElementBlock as t, createElementVNode as n, createVNode as r, defineComponent as i, mergeModels as a, mergeProps as o, openBlock as s, renderSlot as c, toDisplayString as l, unref as u, useId as d, useModel as f } from "vue";
|
|
2
|
+
import * as p from "@zag-js/collapsible";
|
|
3
|
+
import { normalizeProps as m, useMachine as h } from "@zag-js/vue";
|
|
4
|
+
import { pageDir as g } from "@glimstone/core";
|
|
5
|
+
import { c as _ } from "./glyphs-DncaPYo_.js";
|
|
6
6
|
// src/Collapsible.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var v = { class: "glim-disclosure-label" }, y = { class: "glim-disclosure-body" }, b = /* @__PURE__ */
|
|
7
|
+
var v = { class: "glim-disclosure-label" }, y = { class: "glim-disclosure-body" }, b = /* @__PURE__ */ i({
|
|
8
8
|
__name: "Collapsible",
|
|
9
|
-
props: /*@__PURE__*/
|
|
9
|
+
props: /*@__PURE__*/ a({
|
|
10
10
|
label: {},
|
|
11
11
|
disabled: {
|
|
12
12
|
type: Boolean,
|
|
@@ -20,15 +20,15 @@ var v = { class: "glim-disclosure-label" }, y = { class: "glim-disclosure-body"
|
|
|
20
20
|
openModifiers: {}
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:open"],
|
|
23
|
-
setup(
|
|
24
|
-
let
|
|
23
|
+
setup(i) {
|
|
24
|
+
let a = i, b = f(i, "open"), x = d(), S = h(p.machine, e(() => ({
|
|
25
25
|
id: x,
|
|
26
|
-
dir:
|
|
26
|
+
dir: g(),
|
|
27
27
|
open: b.value,
|
|
28
|
-
disabled:
|
|
28
|
+
disabled: a.disabled,
|
|
29
29
|
onOpenChange: (e) => b.value = e.open
|
|
30
|
-
}))), C =
|
|
31
|
-
return (
|
|
30
|
+
}))), C = e(() => p.connect(S, m));
|
|
31
|
+
return (e, a) => (s(), t("div", o({ "data-glim": "Collapsible" }, C.value.getRootProps(), { class: "glim-collapsible" }), [n("button", o(C.value.getTriggerProps(), { class: "glim-disclosure-trigger" }), [n("span", v, l(i.label), 1), n("span", o(C.value.getIndicatorProps(), { class: "glim-disclosure-indicator" }), [r(u(_))], 16)], 16), n("div", o(C.value.getContentProps(), { class: "glim-disclosure-content" }), [n("div", y, [c(e.$slots, "default")])], 16)], 16));
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export { b as Collapsible };
|
|
@@ -5,6 +5,8 @@ type __VLS_Props = {
|
|
|
5
5
|
anchor?: HTMLElement | null;
|
|
6
6
|
/** The names a colour is matched against, nearest in OKLab. `false` shows none. */
|
|
7
7
|
names?: readonly ColorName[] | false;
|
|
8
|
+
/** The ready colours under the hue bar, as `#rrggbb`. The page's rainbow unless given, and `false` shows none. */
|
|
9
|
+
swatches?: string[] | false;
|
|
8
10
|
/** The words, read when the picker opens. */
|
|
9
11
|
text?: Partial<ColorPickerPanelText>;
|
|
10
12
|
};
|
|
@@ -25,6 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
27
|
}>, {
|
|
26
28
|
anchor: HTMLElement | null;
|
|
27
29
|
names: false | readonly ColorName[];
|
|
30
|
+
swatches: false | string[];
|
|
28
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
32
|
declare const _default: typeof __VLS_export;
|
|
30
33
|
export default _default;
|
package/dist/Combobox.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
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, mergeModels as l, mergeProps as u, openBlock as d, ref as f, renderList as p, shallowRef as m, toDisplayString as h, unref as g, useId as _, useModel as v, watch as y } from "vue";
|
|
2
|
+
import { portalTarget as b } from "@glimstone/core";
|
|
3
|
+
import * as x from "@zag-js/combobox";
|
|
4
|
+
import { normalizeProps as S, useMachine as C } from "@zag-js/vue";
|
|
5
|
+
import { r as w } from "./fieldName-DBygJJfe.js";
|
|
6
|
+
import { c as T, i as E } from "./glyphs-DncaPYo_.js";
|
|
7
|
+
import { t as D } from "./SearchHit-Ch6ef2dk.js";
|
|
7
8
|
// src/Combobox.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
9
|
+
var O = ["aria-label"], k = ["data-state"], A = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "glim-select-empty"
|
|
11
|
-
},
|
|
12
|
+
}, j = ["data-search"], M = /* @__PURE__ */ c({
|
|
12
13
|
__name: "Combobox",
|
|
13
|
-
props: /*@__PURE__*/
|
|
14
|
+
props: /*@__PURE__*/ l({
|
|
14
15
|
label: {},
|
|
15
16
|
hideLabel: {
|
|
16
17
|
type: Boolean,
|
|
@@ -29,44 +30,47 @@ var E = ["aria-label"], D = ["data-state"], O = {
|
|
|
29
30
|
modelModifiers: {}
|
|
30
31
|
}),
|
|
31
32
|
emits: ["update:modelValue"],
|
|
32
|
-
setup(
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
items:
|
|
33
|
+
setup(c) {
|
|
34
|
+
let l = c, M = v(c, "modelValue"), N = w(() => l.label), P = _(), F = m(l.options), I = f("");
|
|
35
|
+
y(() => l.options, (e) => F.value = e);
|
|
36
|
+
let L = n(() => x.collection({
|
|
37
|
+
items: F.value,
|
|
37
38
|
itemToValue: (e) => e.value,
|
|
38
39
|
itemToString: (e) => e.label,
|
|
39
40
|
isItemDisabled: (e) => !!e.disabled
|
|
40
|
-
})),
|
|
41
|
-
id:
|
|
42
|
-
collection:
|
|
43
|
-
value:
|
|
44
|
-
placeholder:
|
|
45
|
-
disabled:
|
|
41
|
+
})), R = C(x.machine, n(() => ({
|
|
42
|
+
id: P,
|
|
43
|
+
collection: L.value,
|
|
44
|
+
value: M.value ? [M.value] : [],
|
|
45
|
+
placeholder: l.placeholder,
|
|
46
|
+
disabled: l.disabled,
|
|
46
47
|
positioning: {
|
|
47
48
|
sameWidth: !0,
|
|
48
49
|
gutter: 6
|
|
49
50
|
},
|
|
50
51
|
onOpenChange: ({ open: e }) => {
|
|
51
|
-
e || (
|
|
52
|
+
e || (F.value = l.options, I.value = "");
|
|
52
53
|
},
|
|
53
|
-
onInputValueChange: ({ inputValue: e }) => {
|
|
54
|
-
let t =
|
|
55
|
-
|
|
54
|
+
onInputValueChange: ({ inputValue: e, reason: t }) => {
|
|
55
|
+
let n = t === "input-change" ? e : "", r = n.toLocaleLowerCase();
|
|
56
|
+
I.value = n, F.value = l.options.filter((e) => e.label.toLocaleLowerCase().includes(r));
|
|
56
57
|
},
|
|
57
|
-
onValueChange: (e) =>
|
|
58
|
-
}))),
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"aria-label":
|
|
58
|
+
onValueChange: (e) => M.value = e.value[0] ?? ""
|
|
59
|
+
}))), z = n(() => x.connect(R, S));
|
|
60
|
+
return (n, l) => (d(), a("div", u({ "data-glim": "Combobox" }, z.value.getRootProps(), { class: "glim-combobox" }), [
|
|
61
|
+
o("label", u(z.value.getLabelProps(), { class: c.hideLabel || c.label === void 0 ? "glim-sr-only" : "glim-field-label" }), h(g(N)), 17),
|
|
62
|
+
o("div", u(z.value.getControlProps(), { class: "glim-combobox-control" }), [o("input", u(z.value.getInputProps(), { class: "glim-combobox-input" }), null, 16), o("button", u(z.value.getTriggerProps(), {
|
|
63
|
+
"aria-label": c.toggleLabel,
|
|
63
64
|
class: "glim-combobox-toggle"
|
|
64
|
-
}), [
|
|
65
|
+
}), [o("span", {
|
|
65
66
|
class: "glim-select-indicator",
|
|
66
|
-
"data-state":
|
|
67
|
-
}, [
|
|
68
|
-
(
|
|
67
|
+
"data-state": z.value.open ? "open" : "closed"
|
|
68
|
+
}, [s(g(T))], 8, k)], 16, O)], 16),
|
|
69
|
+
(d(), r(t, { to: g(b)() }, [o("div", u(z.value.getPositionerProps(), { class: "glim-select-positioner" }), [o("ul", u(z.value.getContentProps(), { class: "glim-select-content" }), [F.value.length === 0 ? (d(), a("li", A, h(c.empty), 1)) : i("", !0), (d(!0), a(e, null, p(F.value, (e) => (d(), a("li", u({ key: e.value }, { ref_for: !0 }, z.value.getItemProps({ item: e }), { class: "glim-select-item" }), [o("span", u({ ref_for: !0 }, z.value.getItemTextProps({ item: e }), { "data-search": I.value ? "" : void 0 }), [s(D, {
|
|
70
|
+
label: e.label,
|
|
71
|
+
query: I.value
|
|
72
|
+
}, null, 8, ["label", "query"])], 16, j), o("span", u({ ref_for: !0 }, z.value.getItemIndicatorProps({ item: e }), { class: "glim-select-check" }), [s(g(E))], 16)], 16))), 128))], 16)], 16)], 8, ["to"]))
|
|
69
73
|
], 16));
|
|
70
74
|
}
|
|
71
75
|
});
|
|
72
|
-
export {
|
|
76
|
+
export { M as Combobox };
|
|
@@ -6,6 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
items: MenuEntry[];
|
|
7
7
|
/** Stand the menu on the point instead, for a menu opened from a bar at the bottom. */
|
|
8
8
|
above?: boolean;
|
|
9
|
+
/** Line the menu's end edge up with the point, for a menu opened from a button at a row's end (`menuPointUnder()`). */
|
|
10
|
+
end?: boolean;
|
|
9
11
|
/** The menu's accessible name. */
|
|
10
12
|
label?: string;
|
|
11
13
|
/** The menu element's id, for a caller or a script that looks for it. */
|
|
@@ -24,6 +26,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
24
26
|
onStep?: ((direction: 1 | -1) => any) | undefined;
|
|
25
27
|
}>, {
|
|
26
28
|
label: string;
|
|
29
|
+
end: boolean;
|
|
27
30
|
above: boolean;
|
|
28
31
|
opener: HTMLElement | null;
|
|
29
32
|
fromEnd: boolean;
|
package/dist/DatePicker.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeProps as f, openBlock as p, ref as m, renderList as h, toDisplayString as g, unref as _, useId as v, useModel as y, watch as b } from "vue";
|
|
2
|
+
import * as x from "@zag-js/date-picker";
|
|
3
|
+
import { normalizeProps as S, useMachine as C } from "@zag-js/vue";
|
|
4
|
+
import { DATE_PICKER_TEXT as w, SELECT_POSITIONING as T, formatDay as E, pageDir as D, pageLocale as O, portalTarget as k } from "@glimstone/core";
|
|
5
|
+
import { r as A } from "./fieldName-DBygJJfe.js";
|
|
6
|
+
import { f as j, n as M, t as N } from "./glyphs-DncaPYo_.js";
|
|
7
|
+
import { t as P } from "./selectParts-0e1ib8BL.js";
|
|
8
8
|
// src/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var F = ["hidden"], I = ["aria-label"], L = ["data-turn"], R = ["hidden"], z = ["hidden"], B = { class: "glim-date-title glim-num" }, V = /* @__PURE__ */ s({
|
|
10
10
|
__name: "DatePicker",
|
|
11
|
-
props: /*@__PURE__*/
|
|
11
|
+
props: /*@__PURE__*/ l({
|
|
12
12
|
label: {},
|
|
13
13
|
min: {},
|
|
14
14
|
max: {},
|
|
@@ -23,81 +23,83 @@ var P = ["hidden"], F = ["aria-label"], I = ["hidden"], L = ["hidden"], R = { cl
|
|
|
23
23
|
modelModifiers: {}
|
|
24
24
|
}),
|
|
25
25
|
emits: ["update:modelValue"],
|
|
26
|
-
setup(
|
|
27
|
-
let
|
|
28
|
-
...
|
|
29
|
-
...
|
|
30
|
-
})),
|
|
31
|
-
id:
|
|
32
|
-
dir:
|
|
33
|
-
locale:
|
|
34
|
-
value:
|
|
35
|
-
min:
|
|
36
|
-
max:
|
|
37
|
-
disabled:
|
|
38
|
-
positioning:
|
|
39
|
-
onValueChange: (e) =>
|
|
26
|
+
setup(s) {
|
|
27
|
+
let l = s, V = y(s, "modelValue"), H = A(() => l.label), U = n(() => ({
|
|
28
|
+
...w,
|
|
29
|
+
...l.text
|
|
30
|
+
})), W = n(() => l.locale ?? O()), G = n(() => V.value ? E(V.value, W.value) : U.value.placeholder), K = v(), q = C(x.machine, n(() => ({
|
|
31
|
+
id: K,
|
|
32
|
+
dir: D(),
|
|
33
|
+
locale: W.value,
|
|
34
|
+
value: V.value ? [x.parse(V.value)] : [],
|
|
35
|
+
min: l.min ? x.parse(l.min) : void 0,
|
|
36
|
+
max: l.max ? x.parse(l.max) : void 0,
|
|
37
|
+
disabled: l.disabled,
|
|
38
|
+
positioning: T,
|
|
39
|
+
onValueChange: (e) => V.value = e.value[0]?.toString() ?? null,
|
|
40
40
|
translations: {
|
|
41
|
-
content:
|
|
42
|
-
trigger: () =>
|
|
43
|
-
prevTrigger: (e) =>
|
|
44
|
-
nextTrigger: (e) =>
|
|
45
|
-
viewTrigger: () =>
|
|
41
|
+
content: U.value.calendar,
|
|
42
|
+
trigger: () => H.value ? `${H.value}, ${G.value}` : G.value,
|
|
43
|
+
prevTrigger: (e) => U.value.previous[e],
|
|
44
|
+
nextTrigger: (e) => U.value.next[e],
|
|
45
|
+
viewTrigger: () => U.value.zoomOut
|
|
46
46
|
}
|
|
47
|
-
}))),
|
|
47
|
+
}))), J = n(() => x.connect(q, S)), Y = n(() => J.value.visibleRange.start.toString()), X = m(void 0);
|
|
48
|
+
b(Y, (e, t) => X.value = e > t ? "next" : "prev");
|
|
49
|
+
let Z = m(null), Q = P(() => J.value.open, Z), $ = n(() => J.value.getMonthsGrid({
|
|
48
50
|
columns: 4,
|
|
49
51
|
format: "short"
|
|
50
|
-
})),
|
|
51
|
-
return (
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
})), ee = n(() => J.value.getYearsGrid({ columns: 4 }));
|
|
53
|
+
return (n, l) => (p(), i("div", u({ "data-glim": "DatePicker" }, J.value.getRootProps(), { class: "glim-date" }), [
|
|
54
|
+
a("label", u(J.value.getLabelProps(), { class: s.label === void 0 ? "glim-sr-only" : "glim-field-label" }), g(_(H)), 17),
|
|
55
|
+
a("div", u(J.value.getControlProps(), { class: "glim-date-control" }), [a("button", u({
|
|
54
56
|
ref_key: "triggerRef",
|
|
55
|
-
ref:
|
|
56
|
-
},
|
|
57
|
-
(
|
|
58
|
-
style:
|
|
59
|
-
class: ["glim-date-positioner",
|
|
60
|
-
}), [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
], 16),
|
|
57
|
+
ref: Z
|
|
58
|
+
}, J.value.getTriggerProps(), { class: "glim-input glim-date-trigger" }), [a("span", { class: d(V.value ? "glim-date-value" : "glim-date-value glim-date-value--empty") }, g(G.value), 3), o(_(M))], 16)], 16),
|
|
59
|
+
(p(), r(t, { to: _(k)() }, [a("div", u(J.value.getPositionerProps(), {
|
|
60
|
+
style: _(Q).style.value,
|
|
61
|
+
class: ["glim-date-positioner", _(Q).className.value]
|
|
62
|
+
}), [a("div", u(J.value.getContentProps(), { class: "glim-date-panel" }), [
|
|
63
|
+
a("div", u(J.value.getViewProps({ view: "day" }), { hidden: J.value.view !== "day" }), [a("div", u(J.value.getViewControlProps({ view: "day" }), { class: "glim-date-head" }), [
|
|
64
|
+
a("button", u(J.value.getPrevTriggerProps({ view: "day" }), { class: "glim-date-step" }), [o(_(N))], 16),
|
|
65
|
+
a("button", u(J.value.getViewTriggerProps({ view: "day" }), { class: "glim-date-title" }), g(J.value.visibleRangeText.start), 17),
|
|
66
|
+
a("button", u(J.value.getNextTriggerProps({ view: "day" }), { class: "glim-date-step" }), [o(_(j))], 16)
|
|
67
|
+
], 16), a("table", u(J.value.getTableProps({ view: "day" }), { class: "glim-date-grid" }), [a("thead", f(c(J.value.getTableHeadProps({ view: "day" }))), [a("tr", f(c(J.value.getTableRowProps({ view: "day" }))), [(p(!0), i(e, null, h(J.value.weekDays, (e, t) => (p(), i("th", {
|
|
66
68
|
key: t,
|
|
67
69
|
scope: "col",
|
|
68
70
|
"aria-label": e.long,
|
|
69
71
|
class: "glim-date-weekday"
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
], 16),
|
|
72
|
+
}, g(e.narrow), 9, I))), 128))], 16)], 16), (p(), i("tbody", u({ key: Y.value }, J.value.getTableBodyProps({ view: "day" }), { "data-turn": X.value }), [(p(!0), i(e, null, h(J.value.weeks, (t, n) => (p(), i("tr", u({ key: n }, { ref_for: !0 }, J.value.getTableRowProps({ view: "day" })), [(p(!0), i(e, null, h(t, (e, t) => (p(), i("td", u({ key: t }, { ref_for: !0 }, J.value.getDayTableCellProps({ value: e })), [a("div", u({ ref_for: !0 }, J.value.getDayTableCellTriggerProps({ value: e }), { class: "glim-date-cell glim-num" }), g(e.day), 17)], 16))), 128))], 16))), 128))], 16, L))], 16)], 16, F),
|
|
73
|
+
a("div", u(J.value.getViewProps({ view: "month" }), { hidden: J.value.view !== "month" }), [a("div", u(J.value.getViewControlProps({ view: "month" }), { class: "glim-date-head" }), [
|
|
74
|
+
a("button", u(J.value.getPrevTriggerProps({ view: "month" }), { class: "glim-date-step" }), [o(_(N))], 16),
|
|
75
|
+
a("button", u(J.value.getViewTriggerProps({ view: "month" }), { class: "glim-date-title" }), g(J.value.visibleRange.start.year), 17),
|
|
76
|
+
a("button", u(J.value.getNextTriggerProps({ view: "month" }), { class: "glim-date-step" }), [o(_(j))], 16)
|
|
77
|
+
], 16), a("table", u(J.value.getTableProps({
|
|
76
78
|
view: "month",
|
|
77
79
|
columns: 4
|
|
78
|
-
}), { class: "glim-date-grid" }), [
|
|
80
|
+
}), { class: "glim-date-grid" }), [a("tbody", f(c(J.value.getTableBodyProps({ view: "month" }))), [(p(!0), i(e, null, h($.value, (t, n) => (p(), i("tr", u({ key: n }, { ref_for: !0 }, J.value.getTableRowProps()), [(p(!0), i(e, null, h(t, (e, t) => (p(), i("td", u({ key: t }, { ref_for: !0 }, J.value.getMonthTableCellProps({
|
|
79
81
|
...e,
|
|
80
82
|
columns: 4
|
|
81
|
-
})), [
|
|
83
|
+
})), [a("div", u({ ref_for: !0 }, J.value.getMonthTableCellTriggerProps({
|
|
82
84
|
...e,
|
|
83
85
|
columns: 4
|
|
84
|
-
}), { class: "glim-date-cell glim-date-cell--wide" }),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
], 16),
|
|
86
|
+
}), { class: "glim-date-cell glim-date-cell--wide" }), g(e.label), 17)], 16))), 128))], 16))), 128))], 16)], 16)], 16, R),
|
|
87
|
+
a("div", u(J.value.getViewProps({ view: "year" }), { hidden: J.value.view !== "year" }), [a("div", u(J.value.getViewControlProps({ view: "year" }), { class: "glim-date-head" }), [
|
|
88
|
+
a("button", u(J.value.getPrevTriggerProps({ view: "year" }), { class: "glim-date-step" }), [o(_(N))], 16),
|
|
89
|
+
a("span", B, g(`${J.value.getDecade().start} - ${J.value.getDecade().end}`), 1),
|
|
90
|
+
a("button", u(J.value.getNextTriggerProps({ view: "year" }), { class: "glim-date-step" }), [o(_(j))], 16)
|
|
91
|
+
], 16), a("table", u(J.value.getTableProps({
|
|
90
92
|
view: "year",
|
|
91
93
|
columns: 4
|
|
92
|
-
}), { class: "glim-date-grid" }), [
|
|
94
|
+
}), { class: "glim-date-grid" }), [a("tbody", f(c(J.value.getTableBodyProps({ view: "year" }))), [(p(!0), i(e, null, h(ee.value, (t, n) => (p(), i("tr", u({ key: n }, { ref_for: !0 }, J.value.getTableRowProps({ view: "year" })), [(p(!0), i(e, null, h(t, (e, t) => (p(), i("td", u({ key: t }, { ref_for: !0 }, J.value.getYearTableCellProps({
|
|
93
95
|
...e,
|
|
94
96
|
columns: 4
|
|
95
|
-
})), [
|
|
97
|
+
})), [a("div", u({ ref_for: !0 }, J.value.getYearTableCellTriggerProps({
|
|
96
98
|
...e,
|
|
97
99
|
columns: 4
|
|
98
|
-
}), { class: "glim-date-cell glim-date-cell--wide glim-num" }),
|
|
100
|
+
}), { class: "glim-date-cell glim-date-cell--wide glim-num" }), g(e.label), 17)], 16))), 128))], 16))), 128))], 16)], 16)], 16, z)
|
|
99
101
|
], 16)], 16)], 8, ["to"]))
|
|
100
102
|
], 16));
|
|
101
103
|
}
|
|
102
104
|
});
|
|
103
|
-
export {
|
|
105
|
+
export { V as DatePicker };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id: string | undefined;
|
|
3
|
+
error: string | undefined;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: 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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
package/dist/FileUpload.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { FILE_UPLOAD_TEXT as b, formatFileSize as x, pageDir as S } from "@glimstone/core";
|
|
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/file-upload";
|
|
3
|
+
import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
|
|
4
|
+
import { FILE_UPLOAD_TEXT as b, formatFileSize as x, pageDir as S, uploadProgressView as C } from "@glimstone/core";
|
|
5
|
+
import { t as w } from "./IconButton-DGy1eP0I.js";
|
|
6
|
+
import { o as T, x as E } from "./glyphs-DncaPYo_.js";
|
|
7
7
|
// src/FileUpload.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var D = { class: "glim-upload-words" }, O = ["aria-busy", "data-progress"], k = /* @__PURE__ */ o({
|
|
9
9
|
__name: "FileUpload",
|
|
10
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ c({
|
|
11
11
|
label: {},
|
|
12
12
|
accept: {},
|
|
13
13
|
maxFiles: { default: 1 },
|
|
@@ -16,52 +16,58 @@ var E = { class: "glim-upload-words" }, D = /* @__PURE__ */ l({
|
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: !1
|
|
18
18
|
},
|
|
19
|
+
progress: {},
|
|
19
20
|
text: {}
|
|
20
21
|
}, {
|
|
21
22
|
modelValue: { required: !0 },
|
|
22
23
|
modelModifiers: {}
|
|
23
24
|
}),
|
|
24
25
|
emits: ["update:modelValue"],
|
|
25
|
-
setup(
|
|
26
|
-
let
|
|
26
|
+
setup(o) {
|
|
27
|
+
let c = o, k = g(o, "modelValue"), A = t(() => ({
|
|
27
28
|
...b,
|
|
28
|
-
...
|
|
29
|
-
})),
|
|
30
|
-
id:
|
|
29
|
+
...c.text
|
|
30
|
+
})), j = h(), M = y(_.machine, t(() => ({
|
|
31
|
+
id: j,
|
|
31
32
|
dir: S(),
|
|
32
|
-
acceptedFiles:
|
|
33
|
-
accept:
|
|
34
|
-
maxFiles:
|
|
35
|
-
maxFileSize:
|
|
36
|
-
disabled:
|
|
37
|
-
onFileChange: (e) =>
|
|
33
|
+
acceptedFiles: k.value,
|
|
34
|
+
accept: c.accept,
|
|
35
|
+
maxFiles: c.maxFiles,
|
|
36
|
+
maxFileSize: c.maxFileSize,
|
|
37
|
+
disabled: c.disabled,
|
|
38
|
+
onFileChange: (e) => k.value = e.acceptedFiles,
|
|
38
39
|
translations: {
|
|
39
|
-
dropzone:
|
|
40
|
-
deleteFile: (e) =>
|
|
40
|
+
dropzone: A.value.drop,
|
|
41
|
+
deleteFile: (e) => A.value.remove(e.name)
|
|
41
42
|
}
|
|
42
|
-
}))),
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
}))), N = t(() => _.connect(M, v)), P = (e) => C(c.progress?.(e));
|
|
44
|
+
return (t, c) => (d(), r("div", l({ "data-glim": "FileUpload" }, N.value.getRootProps(), { class: "glim-upload" }), [
|
|
45
|
+
i("label", l(N.value.getLabelProps(), { class: "glim-field-label" }), p(o.label), 17),
|
|
46
|
+
i("div", l(N.value.getDropzoneProps(), { class: "glim-upload-drop" }), [a(m(E)), i("span", D, p(A.value.drop), 1)], 16),
|
|
47
|
+
i("input", u(s(N.value.getHiddenInputProps())), null, 16),
|
|
48
|
+
N.value.acceptedFiles.length > 0 ? (d(), r("ul", l({ key: 0 }, N.value.getItemGroupProps(), { class: "glim-upload-files" }), [(d(!0), r(e, null, f(N.value.acceptedFiles, (e) => (d(), r("li", l({ key: `${e.name}-${e.size}` }, { ref_for: !0 }, N.value.getItemProps({ file: e }), {
|
|
49
|
+
"aria-busy": P(e).state === "sending" || void 0,
|
|
50
|
+
"data-progress": P(e).state,
|
|
51
|
+
style: P(e).share === void 0 ? void 0 : { "--glim-upload-progress": P(e).share },
|
|
52
|
+
class: "glim-upload-file"
|
|
53
|
+
}), [
|
|
54
|
+
i("span", l({ ref_for: !0 }, N.value.getItemNameProps({ file: e }), { class: "glim-upload-name" }), p(e.name), 17),
|
|
55
|
+
i("span", l({ ref_for: !0 }, N.value.getItemSizeTextProps({ file: e }), { class: "glim-upload-size glim-num" }), p(m(x)(e.size)), 17),
|
|
56
|
+
a(w, {
|
|
57
|
+
tip: A.value.remove(e.name),
|
|
58
|
+
glyph: m(T),
|
|
59
|
+
onClick: (t) => N.value.deleteFile(e)
|
|
54
60
|
}, null, 8, [
|
|
55
61
|
"tip",
|
|
56
62
|
"glyph",
|
|
57
63
|
"onClick"
|
|
58
64
|
])
|
|
59
|
-
], 16))), 128))], 16)) :
|
|
60
|
-
(
|
|
65
|
+
], 16, O))), 128))], 16)) : n("", !0),
|
|
66
|
+
(d(!0), r(e, null, f(N.value.rejectedFiles, ({ file: e, errors: t }) => (d(), r("p", {
|
|
61
67
|
key: `${e.name}-${e.size}`,
|
|
62
68
|
class: "glim-field-error"
|
|
63
|
-
},
|
|
69
|
+
}, p(A.value.refused(e.name, t[0])), 1))), 128))
|
|
64
70
|
], 16));
|
|
65
71
|
}
|
|
66
72
|
});
|
|
67
|
-
export {
|
|
73
|
+
export { k as FileUpload };
|
package/dist/FileUpload.vue.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
/** The largest file it takes, in bytes. */
|
|
8
8
|
maxFileSize?: number;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
/** How far a file has gone up, from 0 to 1, while the app sends it. Its row fills with it. */
|
|
11
|
+
progress?: (file: File) => number | undefined;
|
|
10
12
|
text?: Partial<FileUploadText>;
|
|
11
13
|
};
|
|
12
14
|
type __VLS_ModelProps = {
|
package/dist/FloatingPanel.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useId as _, useModel as v, withCtx as y } from "vue";
|
|
2
|
+
import * as b from "@zag-js/floating-panel";
|
|
3
|
+
import { normalizeProps as x, useMachine as S } from "@zag-js/vue";
|
|
4
|
+
import { FLOATING_PANEL_TEXT as C, pageDir as w, portalTarget as T } from "@glimstone/core";
|
|
5
|
+
import { t as E } from "./Badge-C9DRRspu.js";
|
|
6
|
+
import { t as D } from "./Button-DVUuFYk0.js";
|
|
7
|
+
import { C as O, S as k, o as A, w as j } from "./glyphs-DncaPYo_.js";
|
|
8
8
|
// src/FloatingPanel.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var M = {
|
|
10
10
|
"data-glim": "FloatingPanel",
|
|
11
11
|
class: "glim-fpanel-layer"
|
|
12
|
-
}, N = { class: "glim-fpanel-foot" }, P = /* @__PURE__ */
|
|
12
|
+
}, N = { class: "glim-fpanel-foot" }, P = /* @__PURE__ */ l({
|
|
13
13
|
__name: "FloatingPanel",
|
|
14
|
-
props: /*@__PURE__*/
|
|
14
|
+
props: /*@__PURE__*/ u({
|
|
15
15
|
title: {},
|
|
16
16
|
defaultSize: { default: () => ({
|
|
17
17
|
width: 360,
|
|
@@ -30,8 +30,8 @@ var M = {
|
|
|
30
30
|
openModifiers: {}
|
|
31
31
|
}),
|
|
32
32
|
emits: ["update:open"],
|
|
33
|
-
setup(
|
|
34
|
-
let
|
|
33
|
+
setup(l) {
|
|
34
|
+
let u = l, P = v(l, "open"), F = [
|
|
35
35
|
"n",
|
|
36
36
|
"e",
|
|
37
37
|
"s",
|
|
@@ -40,15 +40,15 @@ var M = {
|
|
|
40
40
|
"se",
|
|
41
41
|
"sw",
|
|
42
42
|
"nw"
|
|
43
|
-
], I =
|
|
44
|
-
...
|
|
45
|
-
...
|
|
46
|
-
})), L =
|
|
43
|
+
], I = n(() => ({
|
|
44
|
+
...C,
|
|
45
|
+
...u.text
|
|
46
|
+
})), L = _(), R = S(b.machine, n(() => ({
|
|
47
47
|
id: L,
|
|
48
|
-
dir:
|
|
48
|
+
dir: w(),
|
|
49
49
|
open: P.value,
|
|
50
|
-
defaultSize:
|
|
51
|
-
resizable:
|
|
50
|
+
defaultSize: u.defaultSize,
|
|
51
|
+
resizable: u.resizable,
|
|
52
52
|
strategy: "fixed",
|
|
53
53
|
closeOnEscape: !0,
|
|
54
54
|
onOpenChange: (e) => P.value = e.open,
|
|
@@ -57,28 +57,28 @@ var M = {
|
|
|
57
57
|
maximize: I.value.maximize,
|
|
58
58
|
restore: I.value.restore
|
|
59
59
|
}
|
|
60
|
-
}))), z =
|
|
61
|
-
return (
|
|
62
|
-
|
|
60
|
+
}))), z = n(() => b.connect(R, x));
|
|
61
|
+
return (n, u) => (f(), r(t, { to: g(T)() }, [o("div", M, [o("div", d(z.value.getPositionerProps(), { class: "glim-fpanel-positioner" }), [o("div", d(z.value.getContentProps(), { class: "glim-fpanel" }), [
|
|
62
|
+
o("div", d(z.value.getDragTriggerProps(), { class: "glim-fpanel-drag" }), [o("div", d(z.value.getHeaderProps(), { class: "glim-fpanel-head" }), [o("h2", d(z.value.getTitleProps(), { class: "glim-panel-heading" }), [c(E, {
|
|
63
63
|
tone: "heading",
|
|
64
64
|
size: "heading",
|
|
65
65
|
wrap: ""
|
|
66
66
|
}, {
|
|
67
|
-
default:
|
|
67
|
+
default: y(() => [s(h(l.title), 1)]),
|
|
68
68
|
_: 1
|
|
69
|
-
})], 16),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
})], 16), o("div", d(z.value.getControlProps(), { class: "glim-fpanel-control" }), [
|
|
70
|
+
o("button", d(z.value.getStageTriggerProps({ stage: "minimized" }), { class: "glim-btn-bare glim-icon-btn" }), [c(g(O))], 16),
|
|
71
|
+
o("button", d(z.value.getStageTriggerProps({ stage: "maximized" }), { class: "glim-btn-bare glim-icon-btn" }), [c(g(k))], 16),
|
|
72
|
+
o("button", d(z.value.getStageTriggerProps({ stage: "default" }), { class: "glim-btn-bare glim-icon-btn" }), [c(g(j))], 16)
|
|
73
73
|
], 16)], 16)], 16),
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
o("div", d(z.value.getBodyProps(), { class: "glim-fpanel-body" }), [m(n.$slots, "default")], 16),
|
|
75
|
+
o("div", N, [c(D, {
|
|
76
76
|
label: I.value.close,
|
|
77
77
|
"label-key": null,
|
|
78
|
-
glyph:
|
|
79
|
-
onClick:
|
|
78
|
+
glyph: g(A),
|
|
79
|
+
onClick: u[0] ||= (e) => z.value.setOpen(!1)
|
|
80
80
|
}, null, 8, ["label", "glyph"])]),
|
|
81
|
-
|
|
81
|
+
l.resizable ? (f(), a(e, { key: 0 }, p(F, (e) => o("div", d({ key: e }, { ref_for: !0 }, z.value.getResizeTriggerProps({ axis: e }), { class: "glim-fpanel-edge" }), null, 16)), 64)) : i("", !0)
|
|
82
82
|
], 16)], 16)])], 8, ["to"]));
|
|
83
83
|
}
|
|
84
84
|
});
|