@glimstone/vue 4.9.2 → 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/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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, mergeModels as s, mergeProps as c, openBlock as l, renderList as u, renderSlot as d, resolveDynamicComponent as f, toDisplayString as p, unref as m, useId as h, useModel as g, withCtx as _ } from "vue";
|
|
2
|
+
import * as v from "@zag-js/accordion";
|
|
3
|
+
import { normalizeProps as y, useMachine as b } from "@zag-js/vue";
|
|
4
|
+
import { pageDir as x } from "@glimstone/core";
|
|
5
|
+
import { c as S } from "./glyphs-DncaPYo_.js";
|
|
6
|
+
// src/Accordion.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var C = { class: "glim-disclosure-label" }, w = { class: "glim-disclosure-body" }, T = /* @__PURE__ */ o({
|
|
8
|
+
__name: "Accordion",
|
|
9
|
+
props: /*@__PURE__*/ s({
|
|
10
|
+
items: {},
|
|
11
|
+
multiple: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
headingLevel: { default: 3 }
|
|
16
|
+
}, {
|
|
17
|
+
modelValue: {},
|
|
18
|
+
modelModifiers: {}
|
|
19
|
+
}),
|
|
20
|
+
emits: ["update:modelValue"],
|
|
21
|
+
setup(o) {
|
|
22
|
+
let s = o, T = g(o, "modelValue"), E = h(), D = b(v.machine, t(() => ({
|
|
23
|
+
id: E,
|
|
24
|
+
dir: x(),
|
|
25
|
+
value: T.value ?? [],
|
|
26
|
+
multiple: s.multiple,
|
|
27
|
+
collapsible: !0,
|
|
28
|
+
onValueChange: (e) => T.value = e.value
|
|
29
|
+
}))), O = t(() => v.connect(D, y));
|
|
30
|
+
return (t, s) => (l(), r("div", c({ "data-glim": "Accordion" }, O.value.getRootProps(), { class: "glim-accordion" }), [(l(!0), r(e, null, u(o.items, (e) => (l(), r("div", c({ key: e.value }, { ref_for: !0 }, O.value.getItemProps(e), { class: "glim-accordion-item" }), [(l(), n(f(`h${o.headingLevel}`), { class: "glim-disclosure-heading" }, {
|
|
31
|
+
default: _(() => [i("button", c({ ref_for: !0 }, O.value.getItemTriggerProps(e), { class: "glim-disclosure-trigger" }), [i("span", C, p(e.title), 1), i("span", c({ ref_for: !0 }, O.value.getItemIndicatorProps(e), { class: "glim-disclosure-indicator" }), [a(m(S))], 16)], 16)]),
|
|
32
|
+
_: 2
|
|
33
|
+
}, 1024)), i("div", c({ ref_for: !0 }, O.value.getItemContentProps(e), { class: "glim-disclosure-content" }), [i("div", w, [d(t.$slots, "content", { item: e })])], 16)], 16))), 128))], 16));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export { T as t };
|
package/dist/Accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Accordion } from "./Accordion-
|
|
1
|
+
export { t as Accordion } from "./Accordion-D37jhS5C.js";
|
package/dist/AngleSlider.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
1
|
+
import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, guardReactiveProps as a, mergeModels as o, mergeProps as s, normalizeProps as c, openBlock as l, ref as u, renderList as d, toDisplayString as f, unref as p, useId as m, useModel as h, watch as g } from "vue";
|
|
2
|
+
import * as _ from "@zag-js/angle-slider";
|
|
3
|
+
import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
|
|
4
|
+
import { ANGLE_MARKS as b, angleKeyTarget as x, pageDir as S } from "@glimstone/core";
|
|
5
|
+
import { r as C } from "./fieldName-DBygJJfe.js";
|
|
6
6
|
// src/AngleSlider.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var w = { class: "glim-angle-body" }, T = ["data-quarter"], E = ["aria-valuetext", "data-across"], D = /* @__PURE__ */ i({
|
|
8
8
|
__name: "AngleSlider",
|
|
9
|
-
props: /*@__PURE__*/
|
|
9
|
+
props: /*@__PURE__*/ o({
|
|
10
10
|
label: {},
|
|
11
|
-
step: { default:
|
|
12
|
-
marks: { default: () =>
|
|
13
|
-
0,
|
|
14
|
-
90,
|
|
15
|
-
180,
|
|
16
|
-
270
|
|
17
|
-
] },
|
|
11
|
+
step: { default: 15 },
|
|
12
|
+
marks: { default: () => b },
|
|
18
13
|
disabled: {
|
|
19
14
|
type: Boolean,
|
|
20
15
|
default: !1
|
|
@@ -24,23 +19,41 @@ var b = { class: "glim-angle-body" }, x = ["aria-valuetext"], S = /* @__PURE__ *
|
|
|
24
19
|
modelModifiers: {}
|
|
25
20
|
}),
|
|
26
21
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
let
|
|
29
|
-
id:
|
|
30
|
-
dir:
|
|
31
|
-
value:
|
|
32
|
-
step:
|
|
33
|
-
disabled:
|
|
34
|
-
onValueChange: (e) =>
|
|
35
|
-
}))),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
setup(i) {
|
|
23
|
+
let o = i, b = h(i, "modelValue"), D = C(() => o.label), O = m(), k = y(_.machine, t(() => ({
|
|
24
|
+
id: O,
|
|
25
|
+
dir: S(),
|
|
26
|
+
value: b.value,
|
|
27
|
+
step: o.step,
|
|
28
|
+
disabled: o.disabled,
|
|
29
|
+
onValueChange: (e) => b.value = e.value
|
|
30
|
+
}))), A = t(() => _.connect(k, v)), j = t(() => {
|
|
31
|
+
let e = A.value.getThumbProps();
|
|
32
|
+
return {
|
|
33
|
+
...e,
|
|
34
|
+
onKeydown: (t) => {
|
|
35
|
+
let n = x(t.key, o.step);
|
|
36
|
+
if (n === void 0) return e.onKeydown?.(t);
|
|
37
|
+
t.preventDefault(), A.value.setValue(n);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}), M = u(!1);
|
|
41
|
+
return g(() => A.value.value, (e, t) => M.value = Math.abs(e - t) > 180), (t, o) => (l(), n("div", s({ "data-glim": "AngleSlider" }, A.value.getRootProps(), { class: "glim-angle" }), [
|
|
42
|
+
r("label", s(A.value.getLabelProps(), { class: i.label === void 0 ? "glim-sr-only" : "glim-field-label" }), f(p(D)), 17),
|
|
43
|
+
r("div", w, [r("div", s(A.value.getControlProps(), { class: "glim-angle-dial" }), [
|
|
44
|
+
r("div", s(A.value.getMarkerGroupProps(), { class: "glim-angle-marks" }), [(l(!0), n(e, null, d(i.marks, (e) => (l(), n("span", s({ key: e }, { ref_for: !0 }, A.value.getMarkerProps({ value: e }), {
|
|
45
|
+
"data-quarter": e % 90 == 0 ? "" : void 0,
|
|
46
|
+
class: "glim-angle-mark"
|
|
47
|
+
}), null, 16, T))), 128))], 16),
|
|
48
|
+
r("div", s(j.value, {
|
|
49
|
+
"aria-valuetext": `${A.value.value}°`,
|
|
50
|
+
"data-across": M.value ? "" : void 0,
|
|
51
|
+
class: "glim-angle-thumb"
|
|
52
|
+
}), [...o[0] ||= [r("span", { class: "glim-angle-hand" }, null, -1)]], 16, E),
|
|
53
|
+
r("div", s(A.value.getValueTextProps(), { class: "glim-angle-value glim-num" }), f(`${A.value.value}°`), 17)
|
|
54
|
+
], 16)]),
|
|
55
|
+
r("input", c(a(A.value.getHiddenInputProps())), null, 16)
|
|
43
56
|
], 16));
|
|
44
57
|
}
|
|
45
58
|
});
|
|
46
|
-
export {
|
|
59
|
+
export { D as AngleSlider };
|
package/dist/Avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, mergeProps as a, openBlock as o, toDisplayString as s, unref as c, useId as l } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { normalizeProps as
|
|
4
|
-
import
|
|
2
|
+
import * as u from "@zag-js/avatar";
|
|
3
|
+
import { normalizeProps as d, useMachine as f } from "@zag-js/vue";
|
|
4
|
+
import { avatarView as p, initials as m, pageDir as h } from "@glimstone/core";
|
|
5
5
|
// src/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var g = ["aria-label"], _ = ["src"], v = /* @__PURE__ */ i({
|
|
7
7
|
__name: "Avatar",
|
|
@@ -12,12 +12,13 @@ var g = ["aria-label"], _ = ["src"], v = /* @__PURE__ */ i({
|
|
|
12
12
|
hueIndex: {}
|
|
13
13
|
},
|
|
14
14
|
setup(i) {
|
|
15
|
-
let v = i, y = l(), b =
|
|
15
|
+
let v = i, y = l(), b = f(u.machine, {
|
|
16
16
|
id: y,
|
|
17
|
-
dir:
|
|
18
|
-
}), x = e(() =>
|
|
17
|
+
dir: h()
|
|
18
|
+
}), x = e(() => u.connect(b, d)), S = e(() => p({
|
|
19
19
|
size: v.size,
|
|
20
|
-
hueIndex: v.hueIndex
|
|
20
|
+
hueIndex: v.hueIndex,
|
|
21
|
+
name: v.name
|
|
21
22
|
}));
|
|
22
23
|
return (e, l) => (o(), n("span", a({ "data-glim": "Avatar" }, x.value.getRootProps(), {
|
|
23
24
|
role: "img",
|
|
@@ -31,7 +32,7 @@ var g = ["aria-label"], _ = ["src"], v = /* @__PURE__ */ i({
|
|
|
31
32
|
}), null, 16, _)) : t("", !0), r("span", a(x.value.getFallbackProps(), {
|
|
32
33
|
"aria-hidden": "true",
|
|
33
34
|
class: "glim-avatar-fallback"
|
|
34
|
-
}), s(c(
|
|
35
|
+
}), s(c(m)(i.name)), 17)], 16, g));
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
export { v as Avatar };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { computed as e, createBlock as t, createElementBlock as n, defineComponent as r, normalizeClass as i, normalizeStyle as a, openBlock as o, renderSlot as s, withCtx as c } from "vue";
|
|
2
|
+
import { badgeClassName as l, hueVars as u } from "@glimstone/core";
|
|
3
|
+
import { t as d } from "./IconTipButton-B8kcqxcE.js";
|
|
4
|
+
// src/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var f = ["disabled"], p = ["role"], m = /* @__PURE__ */ r({
|
|
6
|
+
__name: "Badge",
|
|
7
|
+
props: {
|
|
8
|
+
tone: { default: "neutral" },
|
|
9
|
+
size: { default: "medium" },
|
|
10
|
+
form: {},
|
|
11
|
+
as: { default: "span" },
|
|
12
|
+
disabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
wrap: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
hueIndex: {},
|
|
21
|
+
tip: {},
|
|
22
|
+
insetStart: {},
|
|
23
|
+
inFlow: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup(r) {
|
|
29
|
+
let m = r, h = e(() => m.hueIndex !== void 0 && (m.tone === "heading" || m.tone === "active")), g = e(() => [
|
|
30
|
+
h.value && "glim-hue",
|
|
31
|
+
h.value && m.size === "heading" && "glim-notch-hue",
|
|
32
|
+
l({
|
|
33
|
+
tone: m.tone,
|
|
34
|
+
size: m.size,
|
|
35
|
+
form: m.form,
|
|
36
|
+
wrap: m.wrap,
|
|
37
|
+
iconOnly: m.tip !== void 0,
|
|
38
|
+
inFlow: m.inFlow,
|
|
39
|
+
insetStart: m.insetStart,
|
|
40
|
+
action: m.as !== "span"
|
|
41
|
+
})
|
|
42
|
+
].filter(Boolean)), _ = e(() => h.value ? u(m.hueIndex) : void 0);
|
|
43
|
+
return (e, l) => r.as === "button" && r.tip !== void 0 ? (o(), t(d, {
|
|
44
|
+
key: 0,
|
|
45
|
+
"data-glim": "Badge",
|
|
46
|
+
tip: r.tip,
|
|
47
|
+
disabled: r.disabled,
|
|
48
|
+
class: i(g.value),
|
|
49
|
+
style: a(_.value)
|
|
50
|
+
}, {
|
|
51
|
+
default: c(() => [s(e.$slots, "default")]),
|
|
52
|
+
_: 3
|
|
53
|
+
}, 8, [
|
|
54
|
+
"tip",
|
|
55
|
+
"disabled",
|
|
56
|
+
"class",
|
|
57
|
+
"style"
|
|
58
|
+
])) : r.as === "button" ? (o(), n("button", {
|
|
59
|
+
key: 1,
|
|
60
|
+
"data-glim": "Badge",
|
|
61
|
+
type: "button",
|
|
62
|
+
disabled: r.disabled,
|
|
63
|
+
class: i(g.value),
|
|
64
|
+
style: a(_.value)
|
|
65
|
+
}, [s(e.$slots, "default")], 14, f)) : r.as === "a" ? (o(), n("a", {
|
|
66
|
+
key: 2,
|
|
67
|
+
"data-glim": "Badge",
|
|
68
|
+
class: i(g.value),
|
|
69
|
+
style: a(_.value)
|
|
70
|
+
}, [s(e.$slots, "default")], 6)) : (o(), n("span", {
|
|
71
|
+
key: 3,
|
|
72
|
+
"data-glim": "Badge",
|
|
73
|
+
role: e.$attrs["aria-label"] ? "img" : void 0,
|
|
74
|
+
class: i(g.value),
|
|
75
|
+
style: a(_.value)
|
|
76
|
+
}, [s(e.$slots, "default")], 14, p));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export { m as t };
|
package/dist/Badge.vue.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { type BadgeForm, type
|
|
1
|
+
import { type BadgeForm, type BadgeSize, type BadgeTone, type NotchInset } from "@glimstone/core";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
tone?: BadgeTone;
|
|
4
4
|
size?: BadgeSize;
|
|
5
5
|
/** The corners: rounded, square, pill or circle. Without it they follow
|
|
6
6
|
* the shape setting. */
|
|
7
7
|
form?: BadgeForm;
|
|
8
|
-
/** @deprecated Use `form`. Only "circle" has an effect: it makes the
|
|
9
|
-
* badge icon-only. Removed in 5.0.0. */
|
|
10
|
-
shape?: BadgeShape;
|
|
11
8
|
as?: "span" | "button" | "a";
|
|
12
9
|
disabled?: boolean;
|
|
13
10
|
/** Let content that wraps grow the box instead of overflowing it. */
|
|
@@ -36,9 +33,9 @@ declare const __VLS_template: () => {
|
|
|
36
33
|
};
|
|
37
34
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
38
35
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
36
|
+
size: BadgeSize;
|
|
39
37
|
disabled: boolean;
|
|
40
38
|
tone: BadgeTone;
|
|
41
|
-
size: BadgeSize;
|
|
42
39
|
as: "a" | "button" | "span";
|
|
43
40
|
wrap: boolean;
|
|
44
41
|
inFlow: boolean;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, mergeProps as c, normalizeClass as l, normalizeStyle as u, onScopeDispose as d, openBlock as f, renderSlot as p, resolveDynamicComponent as m, shallowRef as h, toDisplayString as g, unref as _, watchEffect as v, withCtx as y } from "vue";
|
|
2
|
+
import { DEFAULT_DENSITY as b, DEFAULT_GLYPHS as x, DEFAULT_LAYOUT as S, DEFAULT_LIGHT as C, DEFAULT_MOTION as w, DEFAULT_SHAPE as T, applyAccent as E, applyDensity as D, applyGlyphs as O, applyLayout as k, applyLight as A, applyMotion as j, applyRainbow as ee, applyShape as te, busyRingView as ne, buttonView as M, getLabelMode as N, hueVars as P, labelModeChanged as F, mediaMatches as I, narrowerThan as L, rainbowState as R, setLabelMode as z, subscribeLabelMode as B, subscribeMedia as V, subscribeRainbow as H, takePageHue as U } from "@glimstone/core";
|
|
3
|
+
import { E as W, o as G } from "./glyphs-DncaPYo_.js";
|
|
4
|
+
import { n as K, r as q, t as re } from "./TipWrap-BZAveG4U.js";
|
|
5
|
+
// src/engines.ts
|
|
6
|
+
function J(e) {
|
|
7
|
+
let n = h(N(e));
|
|
8
|
+
return d(B(() => n.value = N(e))), t({
|
|
9
|
+
get: () => n.value,
|
|
10
|
+
set: (t) => {
|
|
11
|
+
z(e, t), F();
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function Y() {
|
|
16
|
+
let e = h(R());
|
|
17
|
+
return d(H(() => e.value = R())), t({
|
|
18
|
+
get: () => e.value,
|
|
19
|
+
set: (e) => ee(e)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function X(e) {
|
|
23
|
+
return t(() => {
|
|
24
|
+
let t = e();
|
|
25
|
+
return t === void 0 ? void 0 : P(t);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function Z(e, t) {
|
|
29
|
+
let n = h(t()), r = new MutationObserver(() => n.value = t());
|
|
30
|
+
return r.observe(document.documentElement, {
|
|
31
|
+
attributes: !0,
|
|
32
|
+
attributeFilter: [e]
|
|
33
|
+
}), d(() => r.disconnect()), n;
|
|
34
|
+
}
|
|
35
|
+
function ie() {
|
|
36
|
+
let e = Z("data-shape", () => document.documentElement.getAttribute("data-shape") ?? T);
|
|
37
|
+
return t({
|
|
38
|
+
get: () => e.value,
|
|
39
|
+
set: te
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function ae() {
|
|
43
|
+
let e = Z("data-motion", () => document.documentElement.getAttribute("data-motion") ?? w);
|
|
44
|
+
return t({
|
|
45
|
+
get: () => e.value,
|
|
46
|
+
set: j
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function oe() {
|
|
50
|
+
let e = Z("data-light", () => document.documentElement.getAttribute("data-light") ?? C);
|
|
51
|
+
return t({
|
|
52
|
+
get: () => e.value,
|
|
53
|
+
set: A
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function se() {
|
|
57
|
+
let e = Z("data-glyphs", () => document.documentElement.getAttribute("data-glyphs") ?? x);
|
|
58
|
+
return t({
|
|
59
|
+
get: () => e.value,
|
|
60
|
+
set: O
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function Q() {
|
|
64
|
+
let e = Z("data-layout", () => document.documentElement.getAttribute("data-layout") ?? S);
|
|
65
|
+
return t({
|
|
66
|
+
get: () => e.value,
|
|
67
|
+
set: k
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function ce() {
|
|
71
|
+
let e = Z("data-density", () => document.documentElement.getAttribute("data-density") ?? b);
|
|
72
|
+
return t({
|
|
73
|
+
get: () => e.value,
|
|
74
|
+
set: D
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function le() {
|
|
78
|
+
let e = Z("style", () => document.documentElement.style.getPropertyValue("--accent"));
|
|
79
|
+
return t({
|
|
80
|
+
get: () => e.value,
|
|
81
|
+
set: (e) => E(e || void 0)
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
// src/BusyRing.vue?vue&type=script&setup=true&lang.ts
|
|
85
|
+
var ue = ["role", "aria-hidden"], de = {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: "glim-sr-only"
|
|
88
|
+
}, $ = /* @__PURE__ */ s({
|
|
89
|
+
__name: "BusyRing",
|
|
90
|
+
props: {
|
|
91
|
+
size: {},
|
|
92
|
+
label: {},
|
|
93
|
+
delay: {}
|
|
94
|
+
},
|
|
95
|
+
setup(e) {
|
|
96
|
+
let n = e, o = t(() => ne({
|
|
97
|
+
size: n.size,
|
|
98
|
+
delay: n.delay
|
|
99
|
+
}));
|
|
100
|
+
return (t, n) => (f(), i("span", {
|
|
101
|
+
"data-glim": "BusyRing",
|
|
102
|
+
role: e.label ? "status" : void 0,
|
|
103
|
+
"aria-hidden": e.label ? void 0 : "true",
|
|
104
|
+
class: l(o.value.className),
|
|
105
|
+
style: u(o.value.style)
|
|
106
|
+
}, [
|
|
107
|
+
n[0] ||= a("span", { class: "glim-busy-ring-arc" }, [a("span", { class: "glim-busy-ring-tail" })], -1),
|
|
108
|
+
n[1] ||= a("span", { class: "glim-busy-ring-arc glim-busy-ring-arc--inner" }, [a("span", { class: "glim-busy-ring-tail" })], -1),
|
|
109
|
+
e.label ? (f(), i("span", de, g(e.label), 1)) : r("", !0)
|
|
110
|
+
], 14, ue));
|
|
111
|
+
}
|
|
112
|
+
}), fe = {
|
|
113
|
+
key: 0,
|
|
114
|
+
class: "glim-btn-glyph"
|
|
115
|
+
}, pe = /* @__PURE__ */ s({
|
|
116
|
+
inheritAttrs: !1,
|
|
117
|
+
__name: "Button",
|
|
118
|
+
props: {
|
|
119
|
+
label: {},
|
|
120
|
+
labelKey: {},
|
|
121
|
+
glyph: {},
|
|
122
|
+
tone: { default: "neutral" },
|
|
123
|
+
variant: { default: "default" },
|
|
124
|
+
disabled: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: !1
|
|
127
|
+
},
|
|
128
|
+
href: {},
|
|
129
|
+
type: { default: "button" },
|
|
130
|
+
title: {},
|
|
131
|
+
hueIndex: {},
|
|
132
|
+
busy: {
|
|
133
|
+
type: Boolean,
|
|
134
|
+
default: !1
|
|
135
|
+
},
|
|
136
|
+
stage: {},
|
|
137
|
+
keepLabel: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: !1
|
|
140
|
+
},
|
|
141
|
+
compact: { type: Boolean },
|
|
142
|
+
compactBelow: {},
|
|
143
|
+
size: {}
|
|
144
|
+
},
|
|
145
|
+
setup(s, { expose: u }) {
|
|
146
|
+
let d = s, b = J("buttons"), x = h(!1);
|
|
147
|
+
v((e) => {
|
|
148
|
+
if (d.compactBelow === void 0) return void (x.value = !1);
|
|
149
|
+
let t = L(d.compactBelow), n = () => x.value = I(t);
|
|
150
|
+
n(), e(V(t, n));
|
|
151
|
+
});
|
|
152
|
+
let S = t(() => d.glyph ?? (d.labelKey ? W(d.labelKey) : void 0) ?? (d.variant === "chip" ? G : void 0)), C = t(() => M({
|
|
153
|
+
mode: b.value,
|
|
154
|
+
label: d.label,
|
|
155
|
+
hasGlyph: !!S.value || d.busy,
|
|
156
|
+
tone: d.tone,
|
|
157
|
+
variant: d.variant,
|
|
158
|
+
disabled: d.disabled,
|
|
159
|
+
keepLabel: d.keepLabel,
|
|
160
|
+
compact: d.compact || x.value,
|
|
161
|
+
size: d.size,
|
|
162
|
+
title: d.title,
|
|
163
|
+
hueIndex: d.hueIndex,
|
|
164
|
+
stage: d.stage
|
|
165
|
+
})), w = t(() => !!d.href && !d.disabled), T = q(() => C.value.tip, () => d.disabled), E = h(null);
|
|
166
|
+
function D(e) {
|
|
167
|
+
E.value = e, T.trigger.value = E.value;
|
|
168
|
+
}
|
|
169
|
+
function O(e) {
|
|
170
|
+
C.value.pageHue && U(e.currentTarget), T.show();
|
|
171
|
+
}
|
|
172
|
+
function k(e) {
|
|
173
|
+
C.value.pageHue && U(e.currentTarget), T.showOnFocus();
|
|
174
|
+
}
|
|
175
|
+
return u({ el: E }), (t, u) => (f(), i(e, null, [o(_(re), {
|
|
176
|
+
on: s.disabled && !!C.value.tip,
|
|
177
|
+
show: _(T).show,
|
|
178
|
+
hide: _(T).hide
|
|
179
|
+
}, {
|
|
180
|
+
default: y(() => [(f(), n(m(w.value ? "a" : "button"), c({ "data-glim": "Button" }, t.$attrs, {
|
|
181
|
+
ref: D,
|
|
182
|
+
href: w.value ? s.href : void 0,
|
|
183
|
+
type: w.value ? void 0 : s.type,
|
|
184
|
+
disabled: w.value ? void 0 : s.disabled,
|
|
185
|
+
"aria-busy": s.busy || void 0,
|
|
186
|
+
"aria-describedby": _(T).describedBy.value,
|
|
187
|
+
style: C.value.style,
|
|
188
|
+
class: C.value.className,
|
|
189
|
+
onMouseenter: O,
|
|
190
|
+
onMouseleave: _(T).hide,
|
|
191
|
+
onFocus: k,
|
|
192
|
+
onBlur: _(T).hide
|
|
193
|
+
}), {
|
|
194
|
+
default: y(() => [
|
|
195
|
+
p(t.$slots, "before"),
|
|
196
|
+
C.value.showGlyph ? (f(), i("span", fe, [s.busy ? (f(), n($, {
|
|
197
|
+
key: 0,
|
|
198
|
+
size: "small",
|
|
199
|
+
delay: 0
|
|
200
|
+
})) : (f(), n(m(S.value), { key: 1 }))])) : r("", !0),
|
|
201
|
+
a("span", { class: l(C.value.labelClass) }, g(s.label), 3),
|
|
202
|
+
p(t.$slots, "after")
|
|
203
|
+
]),
|
|
204
|
+
_: 3
|
|
205
|
+
}, 16, [
|
|
206
|
+
"href",
|
|
207
|
+
"type",
|
|
208
|
+
"disabled",
|
|
209
|
+
"aria-busy",
|
|
210
|
+
"aria-describedby",
|
|
211
|
+
"style",
|
|
212
|
+
"class",
|
|
213
|
+
"onMouseleave",
|
|
214
|
+
"onBlur"
|
|
215
|
+
]))]),
|
|
216
|
+
_: 3
|
|
217
|
+
}, 8, [
|
|
218
|
+
"on",
|
|
219
|
+
"show",
|
|
220
|
+
"hide"
|
|
221
|
+
]), o(K, { state: _(T) }, null, 8, ["state"])], 64));
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
export { se as a, Q as c, Y as d, ie as f, ce as i, oe as l, $ as n, X as o, le as r, J as s, pe as t, ae as u };
|
package/dist/Button.vue.d.ts
CHANGED
|
@@ -47,8 +47,8 @@ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
|
47
47
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
48
48
|
el: import("vue").ShallowRef<HTMLButtonElement | null, HTMLButtonElement | null>;
|
|
49
49
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
50
|
-
disabled: boolean;
|
|
51
50
|
type: "button" | "submit";
|
|
51
|
+
disabled: boolean;
|
|
52
52
|
tone: ButtonTone;
|
|
53
53
|
variant: ButtonVariant;
|
|
54
54
|
busy: boolean;
|
package/dist/Card.vue.d.ts
CHANGED
package/dist/Carousel.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, openBlock as c, renderList as l, renderSlot as u, unref as d, useId as f, useModel as p } from "vue";
|
|
2
|
+
import * as m from "@zag-js/carousel";
|
|
3
|
+
import { normalizeProps as h, useMachine as g } from "@zag-js/vue";
|
|
4
4
|
import { CAROUSEL_TEXT as _, pageDir as v, stillMotion as y } from "@glimstone/core";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { t as b } from "./Button-DVUuFYk0.js";
|
|
6
|
+
import { f as x, t as S } from "./glyphs-DncaPYo_.js";
|
|
7
7
|
// src/Carousel.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var C = ["aria-label"], w = /* @__PURE__ */
|
|
8
|
+
var C = ["aria-label"], w = /* @__PURE__ */ a({
|
|
9
9
|
__name: "Carousel",
|
|
10
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ o({
|
|
11
11
|
label: {},
|
|
12
12
|
items: {},
|
|
13
13
|
slidesPerPage: { default: 1 },
|
|
@@ -21,16 +21,16 @@ var C = ["aria-label"], w = /* @__PURE__ */ c({
|
|
|
21
21
|
pageModifiers: {}
|
|
22
22
|
}),
|
|
23
23
|
emits: ["update:page"],
|
|
24
|
-
setup(
|
|
25
|
-
let
|
|
24
|
+
setup(a) {
|
|
25
|
+
let o = a, w = p(a, "page"), T = t(() => ({
|
|
26
26
|
..._,
|
|
27
|
-
...
|
|
28
|
-
})), E =
|
|
27
|
+
...o.text
|
|
28
|
+
})), E = f(), D = g(m.machine, t(() => ({
|
|
29
29
|
id: E,
|
|
30
30
|
dir: v(),
|
|
31
|
-
slideCount:
|
|
32
|
-
slidesPerPage:
|
|
33
|
-
loop:
|
|
31
|
+
slideCount: o.items.length,
|
|
32
|
+
slidesPerPage: o.slidesPerPage,
|
|
33
|
+
loop: o.loop,
|
|
34
34
|
page: w.value ?? 0,
|
|
35
35
|
spacing: "var(--space-6)",
|
|
36
36
|
onPageChange: (e) => w.value = e.page,
|
|
@@ -38,37 +38,37 @@ var C = ["aria-label"], w = /* @__PURE__ */ c({
|
|
|
38
38
|
item: (e, t) => T.value.slide(e + 1, t),
|
|
39
39
|
indicator: (e) => T.value.goTo(e + 1)
|
|
40
40
|
}
|
|
41
|
-
}))), O =
|
|
41
|
+
}))), O = t(() => m.connect(D, h)), k = (e) => ({
|
|
42
42
|
...O.value.getIndicatorProps({ index: e }),
|
|
43
43
|
onClick: () => O.value.scrollTo(e, y())
|
|
44
44
|
});
|
|
45
|
-
return (
|
|
46
|
-
"aria-label":
|
|
45
|
+
return (t, o) => (c(), n("section", s({ "data-glim": "Carousel" }, O.value.getRootProps(), {
|
|
46
|
+
"aria-label": a.label,
|
|
47
47
|
class: "glim-carousel"
|
|
48
|
-
}), [
|
|
48
|
+
}), [r("div", s(O.value.getItemGroupProps(), { class: "glim-carousel-slides" }), [(c(!0), n(e, null, l(a.items, (e, r) => (c(), n("div", s({ key: r }, { ref_for: !0 }, O.value.getItemProps({ index: r }), { class: "glim-carousel-slide" }), [u(t.$slots, "slide", {
|
|
49
49
|
item: e,
|
|
50
|
-
index:
|
|
51
|
-
})], 16))), 128))], 16),
|
|
52
|
-
|
|
50
|
+
index: r
|
|
51
|
+
})], 16))), 128))], 16), r("div", s(O.value.getControlProps(), { class: "glim-carousel-control" }), [
|
|
52
|
+
i(b, {
|
|
53
53
|
label: T.value.previous,
|
|
54
54
|
"label-key": null,
|
|
55
|
-
glyph:
|
|
55
|
+
glyph: d(S),
|
|
56
56
|
variant: "icon",
|
|
57
57
|
disabled: !O.value.canScrollPrev,
|
|
58
|
-
onClick:
|
|
58
|
+
onClick: o[0] ||= (e) => O.value.scrollPrev(d(y)())
|
|
59
59
|
}, null, 8, [
|
|
60
60
|
"label",
|
|
61
61
|
"glyph",
|
|
62
62
|
"disabled"
|
|
63
63
|
]),
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
r("div", s(O.value.getIndicatorGroupProps(), { class: "glim-carousel-dots" }), [(c(!0), n(e, null, l(O.value.pageSnapPoints, (e, t) => (c(), n("button", s({ key: t }, { ref_for: !0 }, k(t), { class: "glim-carousel-dot" }), null, 16))), 128))], 16),
|
|
65
|
+
i(b, {
|
|
66
66
|
label: T.value.next,
|
|
67
67
|
"label-key": null,
|
|
68
|
-
glyph:
|
|
68
|
+
glyph: d(x),
|
|
69
69
|
variant: "icon",
|
|
70
70
|
disabled: !O.value.canScrollNext,
|
|
71
|
-
onClick:
|
|
71
|
+
onClick: o[1] ||= (e) => O.value.scrollNext(d(y)())
|
|
72
72
|
}, null, 8, [
|
|
73
73
|
"label",
|
|
74
74
|
"glyph",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ChartKind, type ChartRow, type ChartSeries } from "@glimstone/core";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
data: readonly ChartRow[];
|
|
4
|
+
/** The field that names each point on the x axis, such as "day". */
|
|
5
|
+
x: string;
|
|
6
|
+
series: readonly ChartSeries[];
|
|
7
|
+
/** What the chart shows, for a screen reader. */
|
|
8
|
+
label: string;
|
|
9
|
+
kind?: ChartKind;
|
|
10
|
+
height?: number;
|
|
11
|
+
/** How a figure reads on the axis and in the tooltip. */
|
|
12
|
+
format?: (n: number) => string;
|
|
13
|
+
/** The legend under the plot, shown where there is more than one series. */
|
|
14
|
+
legend?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
legend: boolean;
|
|
18
|
+
height: number;
|
|
19
|
+
kind: ChartKind;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ChartSeries } from "@glimstone/core";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
series: readonly ChartSeries[];
|
|
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;
|