@glimstone/vue 4.4.1 → 4.5.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/AboutCard.vue.d.ts +40 -0
- package/dist/Accordion.js +36 -0
- package/dist/Accordion.vue.d.ts +32 -0
- package/dist/AngleSlider.js +46 -0
- package/dist/AngleSlider.vue.d.ts +22 -0
- package/dist/Avatar.js +37 -0
- package/dist/Avatar.vue.d.ts +14 -0
- package/dist/Badge-BhK0gMse.js +81 -0
- package/dist/Badge.vue.d.ts +1 -1
- package/dist/Button-BM5Dzboj.js +203 -0
- package/dist/Carousel.js +80 -0
- package/dist/Carousel.vue.d.ts +36 -0
- package/dist/CoffeeDialog.vue.d.ts +21 -0
- package/dist/Collapsible.js +34 -0
- package/dist/Collapsible.vue.d.ts +30 -0
- package/dist/Combobox.js +3 -3
- package/dist/ContextMenu.vue.d.ts +3 -0
- package/dist/CryptoDonateDialog.vue.d.ts +48 -0
- package/dist/DatePicker.js +103 -0
- package/dist/DatePicker.vue.d.ts +24 -0
- package/dist/DropdownListbox.vue.d.ts +30 -0
- package/dist/FileUpload.js +67 -0
- package/dist/FileUpload.vue.d.ts +25 -0
- package/dist/FloatingPanel.js +85 -0
- package/dist/FloatingPanel.vue.d.ts +34 -0
- package/dist/HoverCard.js +42 -0
- package/dist/HoverCard.vue.d.ts +23 -0
- package/dist/IconButton-D5YOChZI.js +48 -0
- package/dist/IconTipButton-BLtrZfgN.js +56 -0
- package/dist/Marquee.js +49 -0
- package/dist/Marquee.vue.d.ts +32 -0
- package/dist/MenuBar.vue.d.ts +1 -3
- package/dist/Pagination.js +72 -0
- package/dist/Pagination.vue.d.ts +23 -0
- package/dist/PaypalDialog.vue.d.ts +63 -0
- package/dist/PinInput.js +61 -0
- package/dist/PinInput.vue.d.ts +34 -0
- package/dist/PresenceBadges.vue.d.ts +8 -0
- package/dist/ProgressBar.vue.d.ts +1 -1
- package/dist/Rating.js +56 -0
- package/dist/Rating.vue.d.ts +27 -0
- package/dist/ScrollArea.js +31 -0
- package/dist/ScrollArea.vue.d.ts +21 -0
- package/dist/Select-CBScnONy.js +458 -0
- package/dist/Select.js +1 -1
- package/dist/SignaturePad.js +63 -0
- package/dist/SignaturePad.vue.d.ts +19 -0
- package/dist/Splitter.js +46 -0
- package/dist/Splitter.vue.d.ts +31 -0
- package/dist/Steps.js +77 -0
- package/dist/Steps.vue.d.ts +34 -0
- package/dist/TagsInput.js +73 -0
- package/dist/TagsInput.vue.d.ts +25 -0
- package/dist/Timer.js +74 -0
- package/dist/Timer.vue.d.ts +22 -0
- package/dist/TipWrap-5Nw7Yj0O.js +51 -0
- package/dist/ToastCard.vue.d.ts +25 -0
- package/dist/ToastViewport.vue.d.ts +16 -8
- package/dist/Tour.js +84 -0
- package/dist/Tour.vue.d.ts +16 -0
- package/dist/Tree.vue.d.ts +2 -2
- package/dist/WindowBar.vue.d.ts +27 -0
- package/dist/confirm.d.ts +5 -1
- package/dist/deprecatedEvents.d.ts +8 -0
- package/dist/engines.d.ts +2 -1
- package/dist/entries/accordion.d.ts +2 -0
- package/dist/entries/angleslider.d.ts +1 -0
- package/dist/entries/avatar.d.ts +2 -0
- package/dist/entries/carousel.d.ts +2 -0
- package/dist/entries/collapsible.d.ts +1 -0
- package/dist/entries/datepicker.d.ts +2 -0
- package/dist/entries/fileupload.d.ts +2 -0
- package/dist/entries/floatingpanel.d.ts +2 -0
- package/dist/entries/hovercard.d.ts +1 -0
- package/dist/entries/marquee.d.ts +2 -0
- package/dist/entries/pagination.d.ts +2 -0
- package/dist/entries/pininput.d.ts +2 -0
- package/dist/entries/rating.d.ts +2 -0
- package/dist/entries/scrollarea.d.ts +1 -0
- package/dist/entries/signaturepad.d.ts +2 -0
- package/dist/entries/splitter.d.ts +2 -0
- package/dist/entries/steps.d.ts +2 -0
- package/dist/entries/tagsinput.d.ts +2 -0
- package/dist/entries/timer.d.ts +2 -0
- package/dist/entries/tour.d.ts +2 -0
- package/dist/fortressParts.d.ts +3 -0
- package/dist/{glyphs-CYhs4mrY.js → glyphs-DEch1yYd.js} +2 -2
- package/dist/glyphs.d.ts +8 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.js +3655 -3331
- package/dist/paypalButtons.d.ts +17 -0
- package/dist/selectParts-0e1ib8BL.js +23 -0
- package/dist/selectParts.d.ts +9 -5
- package/package.json +108 -7
- package/dist/Select-D8Kf1NZa.js +0 -520
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type Component } from "vue";
|
|
2
|
+
type OpenUrl = (url: string) => void;
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
text: {
|
|
5
|
+
title: string;
|
|
6
|
+
body: string;
|
|
7
|
+
coffee: string;
|
|
8
|
+
coffeeButton: string;
|
|
9
|
+
cryptoButton?: string;
|
|
10
|
+
paypalButton?: string;
|
|
11
|
+
report: string;
|
|
12
|
+
repoButton: string;
|
|
13
|
+
mailButton: string;
|
|
14
|
+
mailSubject: string;
|
|
15
|
+
version: string;
|
|
16
|
+
unreleased: (version: string) => string;
|
|
17
|
+
/** The Help card's heading. Without it the card draws none. */
|
|
18
|
+
helpTitle?: string;
|
|
19
|
+
};
|
|
20
|
+
version: string | null;
|
|
21
|
+
glimstoneVersion: string;
|
|
22
|
+
repoUrl: string;
|
|
23
|
+
repoGlyph?: Component;
|
|
24
|
+
glimstoneRepoUrl: string;
|
|
25
|
+
onCoffee: () => void;
|
|
26
|
+
coffeeArt: Component;
|
|
27
|
+
cryptoGlyph?: Component;
|
|
28
|
+
paypalGlyph?: Component;
|
|
29
|
+
onPaypal?: () => void;
|
|
30
|
+
onCrypto?: () => void;
|
|
31
|
+
mailAddress?: string;
|
|
32
|
+
mailGlyph?: Component;
|
|
33
|
+
openUrl?: OpenUrl;
|
|
34
|
+
hueIndex?: number;
|
|
35
|
+
};
|
|
36
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
37
|
+
openUrl: OpenUrl;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { s as e } from "./glyphs-DEch1yYd.js";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, openBlock as u, renderList as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, useId as g, useModel as _, withCtx as v } from "vue";
|
|
3
|
+
import { pageDir as y } from "@glimstone/core";
|
|
4
|
+
import { normalizeProps as b, useMachine as x } from "@zag-js/vue";
|
|
5
|
+
import * as S from "@zag-js/accordion";
|
|
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__ */ s({
|
|
8
|
+
__name: "Accordion",
|
|
9
|
+
props: /*@__PURE__*/ c({
|
|
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(s) {
|
|
22
|
+
let c = s, T = _(s, "modelValue"), E = g(), D = x(S.machine, n(() => ({
|
|
23
|
+
id: E,
|
|
24
|
+
dir: y(),
|
|
25
|
+
value: T.value ?? [],
|
|
26
|
+
multiple: c.multiple,
|
|
27
|
+
collapsible: !0,
|
|
28
|
+
onValueChange: (e) => T.value = e.value
|
|
29
|
+
}))), O = n(() => S.connect(D, b));
|
|
30
|
+
return (n, c) => (u(), i("div", l({ "data-glim": "Accordion" }, O.value.getRootProps(), { class: "glim-accordion" }), [(u(!0), i(t, null, d(s.items, (t) => (u(), i("div", l({ key: t.value }, { ref_for: !0 }, O.value.getItemProps(t), { class: "glim-accordion-item" }), [(u(), r(p(`h${s.headingLevel}`), { class: "glim-disclosure-heading" }, {
|
|
31
|
+
default: v(() => [a("button", l({ ref_for: !0 }, O.value.getItemTriggerProps(t), { class: "glim-disclosure-trigger" }), [a("span", C, m(t.title), 1), a("span", l({ ref_for: !0 }, O.value.getItemIndicatorProps(t), { class: "glim-disclosure-indicator" }), [o(h(e))], 16)], 16)]),
|
|
32
|
+
_: 2
|
|
33
|
+
}, 1024)), a("div", l({ ref_for: !0 }, O.value.getItemContentProps(t), { class: "glim-disclosure-content" }), [a("div", w, [f(n.$slots, "content", { item: t })])], 16)], 16))), 128))], 16));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export { T as Accordion };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type AccordionItem, type HeadingLevel } from "@glimstone/core";
|
|
2
|
+
declare const __VLS_export: <T extends AccordionItem>(__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<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
items: readonly T[];
|
|
5
|
+
/** Several items open at once; otherwise opening one closes the other. */
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
headingLevel?: HeadingLevel;
|
|
8
|
+
} & {
|
|
9
|
+
modelValue?: string[];
|
|
10
|
+
}) & {
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string[] | undefined) => any) | undefined;
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {
|
|
18
|
+
content(props: {
|
|
19
|
+
item: T;
|
|
20
|
+
}): unknown;
|
|
21
|
+
};
|
|
22
|
+
emit: (event: "update:modelValue", value: string[] | undefined) => void;
|
|
23
|
+
}>) => import("vue").VNode & {
|
|
24
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
25
|
+
};
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
29
|
+
[K in keyof T]: T[K];
|
|
30
|
+
} : {
|
|
31
|
+
[K in keyof T as K]: T[K];
|
|
32
|
+
}) & {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { r as e } from "./fieldName-DBygJJfe.js";
|
|
2
|
+
import { Fragment as t, computed as n, createElementBlock as r, createElementVNode as i, defineComponent as a, guardReactiveProps as o, mergeModels as s, mergeProps as c, normalizeProps as l, openBlock as u, renderList as d, toDisplayString as f, unref as p, useId as m, useModel as h } from "vue";
|
|
3
|
+
import { pageDir as g } from "@glimstone/core";
|
|
4
|
+
import { normalizeProps as _, useMachine as v } from "@zag-js/vue";
|
|
5
|
+
import * as y from "@zag-js/angle-slider";
|
|
6
|
+
// src/AngleSlider.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var b = { class: "glim-angle-body" }, x = ["aria-valuetext"], S = /* @__PURE__ */ a({
|
|
8
|
+
__name: "AngleSlider",
|
|
9
|
+
props: /*@__PURE__*/ s({
|
|
10
|
+
label: {},
|
|
11
|
+
step: { default: 1 },
|
|
12
|
+
marks: { default: () => [
|
|
13
|
+
0,
|
|
14
|
+
90,
|
|
15
|
+
180,
|
|
16
|
+
270
|
|
17
|
+
] },
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
modelValue: { required: !0 },
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
setup(a) {
|
|
28
|
+
let s = a, S = h(a, "modelValue"), C = e(() => s.label), w = m(), T = v(y.machine, n(() => ({
|
|
29
|
+
id: w,
|
|
30
|
+
dir: g(),
|
|
31
|
+
value: S.value,
|
|
32
|
+
step: s.step,
|
|
33
|
+
disabled: s.disabled,
|
|
34
|
+
onValueChange: (e) => S.value = e.value
|
|
35
|
+
}))), E = n(() => y.connect(T, _));
|
|
36
|
+
return (e, n) => (u(), r("div", c({ "data-glim": "AngleSlider" }, E.value.getRootProps(), { class: "glim-angle" }), [
|
|
37
|
+
i("label", c(E.value.getLabelProps(), { class: a.label === void 0 ? "glim-sr-only" : "glim-field-label" }), f(p(C)), 17),
|
|
38
|
+
i("div", b, [i("div", c(E.value.getControlProps(), { class: "glim-angle-dial" }), [i("div", c(E.value.getMarkerGroupProps(), { class: "glim-angle-marks" }), [(u(!0), r(t, null, d(a.marks, (e) => (u(), r("span", c({ key: e }, { ref_for: !0 }, E.value.getMarkerProps({ value: e }), { class: "glim-angle-mark" }), null, 16))), 128))], 16), i("div", c(E.value.getThumbProps(), {
|
|
39
|
+
"aria-valuetext": `${E.value.value}°`,
|
|
40
|
+
class: "glim-angle-thumb"
|
|
41
|
+
}), null, 16, x)], 16), i("div", c(E.value.getValueTextProps(), { class: "glim-angle-value glim-num" }), f(`${E.value.value}°`), 17)]),
|
|
42
|
+
i("input", l(o(E.value.getHiddenInputProps())), null, 16)
|
|
43
|
+
], 16));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export { S as AngleSlider };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
step?: number;
|
|
4
|
+
/** The angles that carry a tick on the dial. */
|
|
5
|
+
marks?: number[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
modelValue: number;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: number) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
step: number;
|
|
19
|
+
marks: number[];
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
package/dist/Avatar.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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 { avatarView as u, initials as d, pageDir as f } from "@glimstone/core";
|
|
3
|
+
import { normalizeProps as p, useMachine as m } from "@zag-js/vue";
|
|
4
|
+
import * as h from "@zag-js/avatar";
|
|
5
|
+
// src/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var g = ["aria-label"], _ = ["src"], v = /* @__PURE__ */ i({
|
|
7
|
+
__name: "Avatar",
|
|
8
|
+
props: {
|
|
9
|
+
name: {},
|
|
10
|
+
src: {},
|
|
11
|
+
size: { default: "md" },
|
|
12
|
+
hueIndex: {}
|
|
13
|
+
},
|
|
14
|
+
setup(i) {
|
|
15
|
+
let v = i, y = l(), b = m(h.machine, {
|
|
16
|
+
id: y,
|
|
17
|
+
dir: f()
|
|
18
|
+
}), x = e(() => h.connect(b, p)), S = e(() => u({
|
|
19
|
+
size: v.size,
|
|
20
|
+
hueIndex: v.hueIndex
|
|
21
|
+
}));
|
|
22
|
+
return (e, l) => (o(), n("span", a({ "data-glim": "Avatar" }, x.value.getRootProps(), {
|
|
23
|
+
role: "img",
|
|
24
|
+
"aria-label": i.name,
|
|
25
|
+
class: S.value.className,
|
|
26
|
+
style: S.value.style
|
|
27
|
+
}), [i.src ? (o(), n("img", a({ key: 0 }, x.value.getImageProps(), {
|
|
28
|
+
src: i.src,
|
|
29
|
+
alt: "",
|
|
30
|
+
class: "glim-avatar-image"
|
|
31
|
+
}), null, 16, _)) : t("", !0), r("span", a(x.value.getFallbackProps(), {
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
class: "glim-avatar-fallback"
|
|
34
|
+
}), s(c(d)(i.name)), 17)], 16, g));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export { v as Avatar };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type AvatarSize } from "@glimstone/core";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The person's name: the accessible name, and where the initials come from. */
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
size?: AvatarSize;
|
|
7
|
+
/** A palette position, for a list of people whose circles each take a hue under rainbow. */
|
|
8
|
+
hueIndex?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
size: AvatarSize;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { t as e } from "./IconTipButton-BLtrZfgN.js";
|
|
2
|
+
import { computed as t, createBlock as n, createElementBlock as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, renderSlot as c, withCtx as l } from "vue";
|
|
3
|
+
import { badgeClassName as u, hueVars as d } from "@glimstone/core";
|
|
4
|
+
// src/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var f = ["disabled"], p = ["role"], m = /* @__PURE__ */ i({
|
|
6
|
+
__name: "Badge",
|
|
7
|
+
props: {
|
|
8
|
+
tone: { default: "neutral" },
|
|
9
|
+
size: { default: "medium" },
|
|
10
|
+
form: {},
|
|
11
|
+
shape: {},
|
|
12
|
+
as: { default: "span" },
|
|
13
|
+
disabled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
wrap: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
hueIndex: {},
|
|
22
|
+
tip: {},
|
|
23
|
+
insetStart: {},
|
|
24
|
+
inFlow: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
setup(i) {
|
|
30
|
+
let m = i, h = t(() => m.hueIndex !== void 0 && (m.tone === "heading" || m.tone === "active")), g = t(() => [
|
|
31
|
+
h.value && "glim-hue",
|
|
32
|
+
h.value && m.size === "heading" && "glim-notch-hue",
|
|
33
|
+
u({
|
|
34
|
+
tone: m.tone,
|
|
35
|
+
size: m.size,
|
|
36
|
+
form: m.form,
|
|
37
|
+
shape: m.shape,
|
|
38
|
+
wrap: m.wrap,
|
|
39
|
+
iconOnly: m.tip !== void 0,
|
|
40
|
+
inFlow: m.inFlow,
|
|
41
|
+
insetStart: m.insetStart,
|
|
42
|
+
action: m.as !== "span"
|
|
43
|
+
})
|
|
44
|
+
].filter(Boolean)), _ = t(() => h.value ? d(m.hueIndex) : void 0);
|
|
45
|
+
return (t, u) => i.as === "button" && i.tip !== void 0 ? (s(), n(e, {
|
|
46
|
+
key: 0,
|
|
47
|
+
"data-glim": "Badge",
|
|
48
|
+
tip: i.tip,
|
|
49
|
+
disabled: i.disabled,
|
|
50
|
+
class: a(g.value),
|
|
51
|
+
style: o(_.value)
|
|
52
|
+
}, {
|
|
53
|
+
default: l(() => [c(t.$slots, "default")]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, [
|
|
56
|
+
"tip",
|
|
57
|
+
"disabled",
|
|
58
|
+
"class",
|
|
59
|
+
"style"
|
|
60
|
+
])) : i.as === "button" ? (s(), r("button", {
|
|
61
|
+
key: 1,
|
|
62
|
+
"data-glim": "Badge",
|
|
63
|
+
type: "button",
|
|
64
|
+
disabled: i.disabled,
|
|
65
|
+
class: a(g.value),
|
|
66
|
+
style: o(_.value)
|
|
67
|
+
}, [c(t.$slots, "default")], 14, f)) : i.as === "a" ? (s(), r("a", {
|
|
68
|
+
key: 2,
|
|
69
|
+
"data-glim": "Badge",
|
|
70
|
+
class: a(g.value),
|
|
71
|
+
style: o(_.value)
|
|
72
|
+
}, [c(t.$slots, "default")], 6)) : (s(), r("span", {
|
|
73
|
+
key: 3,
|
|
74
|
+
"data-glim": "Badge",
|
|
75
|
+
role: t.$attrs["aria-label"] ? "img" : void 0,
|
|
76
|
+
class: a(g.value),
|
|
77
|
+
style: o(_.value)
|
|
78
|
+
}, [c(t.$slots, "default")], 14, p));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export { m as t };
|
package/dist/Badge.vue.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ type __VLS_Props = {
|
|
|
6
6
|
* the shape setting. */
|
|
7
7
|
form?: BadgeForm;
|
|
8
8
|
/** @deprecated Use `form`. Only "circle" has an effect: it makes the
|
|
9
|
-
* badge icon-only. */
|
|
9
|
+
* badge icon-only. Removed in 5.0.0. */
|
|
10
10
|
shape?: BadgeShape;
|
|
11
11
|
as?: "span" | "button" | "a";
|
|
12
12
|
disabled?: boolean;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { S as e, a as t } from "./glyphs-DEch1yYd.js";
|
|
2
|
+
import { n, r, t as i } from "./TipWrap-5Nw7Yj0O.js";
|
|
3
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, normalizeStyle as h, onScopeDispose as g, openBlock as _, renderSlot as v, resolveDynamicComponent as y, shallowRef as b, toDisplayString as x, unref as S, watchEffect as C, withCtx as w } from "vue";
|
|
4
|
+
import { DEFAULT_DENSITY as T, DEFAULT_MOTION as E, DEFAULT_SHAPE as D, applyAccent as O, applyDensity as k, applyMotion as A, applyRainbow as j, applyShape as M, busyRingView as N, buttonView as P, getLabelMode as F, hueVars as I, labelModeChanged as ee, mediaMatches as L, narrowerThan as R, rainbowState as z, setLabelMode as B, subscribeLabelMode as V, subscribeMedia as H, subscribeRainbow as U, takePageHue as W } from "@glimstone/core";
|
|
5
|
+
// src/engines.ts
|
|
6
|
+
function G(e) {
|
|
7
|
+
let t = b(F(e));
|
|
8
|
+
return g(V(() => t.value = F(e))), o({
|
|
9
|
+
get: () => t.value,
|
|
10
|
+
set: (t) => {
|
|
11
|
+
B(e, t), ee();
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function K() {
|
|
16
|
+
let e = b(z());
|
|
17
|
+
return g(U(() => e.value = z())), o({
|
|
18
|
+
get: () => e.value,
|
|
19
|
+
set: (e) => j(e)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function q(e) {
|
|
23
|
+
return o(() => {
|
|
24
|
+
let t = e();
|
|
25
|
+
return t === void 0 ? void 0 : I(t);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function J(e, t) {
|
|
29
|
+
let n = b(t()), r = new MutationObserver(() => n.value = t());
|
|
30
|
+
return r.observe(document.documentElement, {
|
|
31
|
+
attributes: !0,
|
|
32
|
+
attributeFilter: [e]
|
|
33
|
+
}), g(() => r.disconnect()), n;
|
|
34
|
+
}
|
|
35
|
+
function Y() {
|
|
36
|
+
let e = J("data-shape", () => document.documentElement.getAttribute("data-shape") ?? D);
|
|
37
|
+
return o({
|
|
38
|
+
get: () => e.value,
|
|
39
|
+
set: M
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function X() {
|
|
43
|
+
let e = J("data-motion", () => document.documentElement.getAttribute("data-motion") ?? E);
|
|
44
|
+
return o({
|
|
45
|
+
get: () => e.value,
|
|
46
|
+
set: A
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function Z() {
|
|
50
|
+
let e = J("data-density", () => document.documentElement.getAttribute("data-density") ?? T);
|
|
51
|
+
return o({
|
|
52
|
+
get: () => e.value,
|
|
53
|
+
set: k
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function Q() {
|
|
57
|
+
let e = J("style", () => document.documentElement.style.getPropertyValue("--accent"));
|
|
58
|
+
return o({
|
|
59
|
+
get: () => e.value,
|
|
60
|
+
set: (e) => O(e || void 0)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// src/BusyRing.vue?vue&type=script&setup=true&lang.ts
|
|
64
|
+
var te = ["role", "aria-hidden"], ne = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "glim-sr-only"
|
|
67
|
+
}, $ = /* @__PURE__ */ f({
|
|
68
|
+
__name: "BusyRing",
|
|
69
|
+
props: {
|
|
70
|
+
size: {},
|
|
71
|
+
label: {},
|
|
72
|
+
delay: {}
|
|
73
|
+
},
|
|
74
|
+
setup(e) {
|
|
75
|
+
let t = e, n = o(() => N({
|
|
76
|
+
size: t.size,
|
|
77
|
+
delay: t.delay
|
|
78
|
+
}));
|
|
79
|
+
return (t, r) => (_(), l("span", {
|
|
80
|
+
"data-glim": "BusyRing",
|
|
81
|
+
role: e.label ? "status" : void 0,
|
|
82
|
+
"aria-hidden": e.label ? void 0 : "true",
|
|
83
|
+
class: m(n.value.className),
|
|
84
|
+
style: h(n.value.style)
|
|
85
|
+
}, [
|
|
86
|
+
r[0] ||= u("span", { class: "glim-busy-ring-arc" }, [u("span", { class: "glim-busy-ring-tail" })], -1),
|
|
87
|
+
r[1] ||= u("span", { class: "glim-busy-ring-arc glim-busy-ring-arc--inner" }, [u("span", { class: "glim-busy-ring-tail" })], -1),
|
|
88
|
+
e.label ? (_(), l("span", ne, x(e.label), 1)) : c("", !0)
|
|
89
|
+
], 14, te));
|
|
90
|
+
}
|
|
91
|
+
}), re = {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: "glim-btn-glyph"
|
|
94
|
+
}, ie = /* @__PURE__ */ f({
|
|
95
|
+
inheritAttrs: !1,
|
|
96
|
+
__name: "Button",
|
|
97
|
+
props: {
|
|
98
|
+
label: {},
|
|
99
|
+
labelKey: {},
|
|
100
|
+
glyph: {},
|
|
101
|
+
tone: { default: "neutral" },
|
|
102
|
+
variant: { default: "default" },
|
|
103
|
+
disabled: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: !1
|
|
106
|
+
},
|
|
107
|
+
href: {},
|
|
108
|
+
type: { default: "button" },
|
|
109
|
+
title: {},
|
|
110
|
+
hueIndex: {},
|
|
111
|
+
busy: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !1
|
|
114
|
+
},
|
|
115
|
+
stage: {},
|
|
116
|
+
keepLabel: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: !1
|
|
119
|
+
},
|
|
120
|
+
compact: { type: Boolean },
|
|
121
|
+
compactBelow: {},
|
|
122
|
+
size: {}
|
|
123
|
+
},
|
|
124
|
+
setup(f, { expose: h }) {
|
|
125
|
+
let g = f, T = G("buttons"), E = b(!1);
|
|
126
|
+
C((e) => {
|
|
127
|
+
if (g.compactBelow === void 0) return void (E.value = !1);
|
|
128
|
+
let t = R(g.compactBelow), n = () => E.value = L(t);
|
|
129
|
+
n(), e(H(t, n));
|
|
130
|
+
});
|
|
131
|
+
let D = o(() => g.glyph ?? (g.labelKey ? e(g.labelKey) : void 0) ?? (g.variant === "chip" ? t : void 0)), O = o(() => P({
|
|
132
|
+
mode: T.value,
|
|
133
|
+
label: g.label,
|
|
134
|
+
hasGlyph: !!D.value || g.busy,
|
|
135
|
+
tone: g.tone,
|
|
136
|
+
variant: g.variant,
|
|
137
|
+
disabled: g.disabled,
|
|
138
|
+
keepLabel: g.keepLabel,
|
|
139
|
+
compact: g.compact || E.value,
|
|
140
|
+
size: g.size,
|
|
141
|
+
title: g.title,
|
|
142
|
+
hueIndex: g.hueIndex,
|
|
143
|
+
stage: g.stage
|
|
144
|
+
})), k = o(() => !!g.href && !g.disabled), A = r(() => O.value.tip, () => g.disabled), j = b(null);
|
|
145
|
+
function M(e) {
|
|
146
|
+
j.value = e, A.trigger.value = j.value;
|
|
147
|
+
}
|
|
148
|
+
function N(e) {
|
|
149
|
+
O.value.pageHue && W(e.currentTarget), A.show();
|
|
150
|
+
}
|
|
151
|
+
function F(e) {
|
|
152
|
+
O.value.pageHue && W(e.currentTarget), A.showOnFocus();
|
|
153
|
+
}
|
|
154
|
+
return h({ el: j }), (e, t) => (_(), l(a, null, [d(S(i), {
|
|
155
|
+
on: f.disabled && !!O.value.tip,
|
|
156
|
+
show: S(A).show,
|
|
157
|
+
hide: S(A).hide
|
|
158
|
+
}, {
|
|
159
|
+
default: w(() => [(_(), s(y(k.value ? "a" : "button"), p({ "data-glim": "Button" }, e.$attrs, {
|
|
160
|
+
ref: M,
|
|
161
|
+
href: k.value ? f.href : void 0,
|
|
162
|
+
type: k.value ? void 0 : f.type,
|
|
163
|
+
disabled: k.value ? void 0 : f.disabled,
|
|
164
|
+
"aria-busy": f.busy || void 0,
|
|
165
|
+
"aria-describedby": S(A).describedBy.value,
|
|
166
|
+
style: O.value.style,
|
|
167
|
+
class: O.value.className,
|
|
168
|
+
onMouseenter: N,
|
|
169
|
+
onMouseleave: S(A).hide,
|
|
170
|
+
onFocus: F,
|
|
171
|
+
onBlur: S(A).hide
|
|
172
|
+
}), {
|
|
173
|
+
default: w(() => [
|
|
174
|
+
v(e.$slots, "before"),
|
|
175
|
+
O.value.showGlyph ? (_(), l("span", re, [f.busy ? (_(), s($, {
|
|
176
|
+
key: 0,
|
|
177
|
+
size: "small",
|
|
178
|
+
delay: 0
|
|
179
|
+
})) : (_(), s(y(D.value), { key: 1 }))])) : c("", !0),
|
|
180
|
+
u("span", { class: m(O.value.labelClass) }, x(f.label), 3),
|
|
181
|
+
v(e.$slots, "after")
|
|
182
|
+
]),
|
|
183
|
+
_: 3
|
|
184
|
+
}, 16, [
|
|
185
|
+
"href",
|
|
186
|
+
"type",
|
|
187
|
+
"disabled",
|
|
188
|
+
"aria-busy",
|
|
189
|
+
"aria-describedby",
|
|
190
|
+
"style",
|
|
191
|
+
"class",
|
|
192
|
+
"onMouseleave",
|
|
193
|
+
"onBlur"
|
|
194
|
+
]))]),
|
|
195
|
+
_: 3
|
|
196
|
+
}, 8, [
|
|
197
|
+
"on",
|
|
198
|
+
"show",
|
|
199
|
+
"hide"
|
|
200
|
+
]), d(n, { state: S(A) }, null, 8, ["state"])], 64));
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
export { q as a, K as c, Z as i, Y as l, $ as n, G as o, Q as r, X as s, ie as t };
|
package/dist/Carousel.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { t as e } from "./Button-BM5Dzboj.js";
|
|
2
|
+
import { d as t, t as n } from "./glyphs-DEch1yYd.js";
|
|
3
|
+
import { Fragment as r, computed as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, openBlock as d, renderList as f, renderSlot as p, unref as m, useId as h, useModel as g } from "vue";
|
|
4
|
+
import { CAROUSEL_TEXT as _, pageDir as v, stillMotion as y } from "@glimstone/core";
|
|
5
|
+
import { normalizeProps as b, useMachine as x } from "@zag-js/vue";
|
|
6
|
+
import * as S from "@zag-js/carousel";
|
|
7
|
+
// src/Carousel.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var C = ["aria-label"], w = /* @__PURE__ */ c({
|
|
9
|
+
__name: "Carousel",
|
|
10
|
+
props: /*@__PURE__*/ l({
|
|
11
|
+
label: {},
|
|
12
|
+
items: {},
|
|
13
|
+
slidesPerPage: { default: 1 },
|
|
14
|
+
loop: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
text: {}
|
|
19
|
+
}, {
|
|
20
|
+
page: {},
|
|
21
|
+
pageModifiers: {}
|
|
22
|
+
}),
|
|
23
|
+
emits: ["update:page"],
|
|
24
|
+
setup(c) {
|
|
25
|
+
let l = c, w = g(c, "page"), T = i(() => ({
|
|
26
|
+
..._,
|
|
27
|
+
...l.text
|
|
28
|
+
})), E = h(), D = x(S.machine, i(() => ({
|
|
29
|
+
id: E,
|
|
30
|
+
dir: v(),
|
|
31
|
+
slideCount: l.items.length,
|
|
32
|
+
slidesPerPage: l.slidesPerPage,
|
|
33
|
+
loop: l.loop,
|
|
34
|
+
page: w.value ?? 0,
|
|
35
|
+
spacing: "var(--space-6)",
|
|
36
|
+
onPageChange: (e) => w.value = e.page,
|
|
37
|
+
translations: {
|
|
38
|
+
item: (e, t) => T.value.slide(e + 1, t),
|
|
39
|
+
indicator: (e) => T.value.goTo(e + 1)
|
|
40
|
+
}
|
|
41
|
+
}))), O = i(() => S.connect(D, b)), k = (e) => ({
|
|
42
|
+
...O.value.getIndicatorProps({ index: e }),
|
|
43
|
+
onClick: () => O.value.scrollTo(e, y())
|
|
44
|
+
});
|
|
45
|
+
return (i, l) => (d(), a("section", u({ "data-glim": "Carousel" }, O.value.getRootProps(), {
|
|
46
|
+
"aria-label": c.label,
|
|
47
|
+
class: "glim-carousel"
|
|
48
|
+
}), [o("div", u(O.value.getItemGroupProps(), { class: "glim-carousel-slides" }), [(d(!0), a(r, null, f(c.items, (e, t) => (d(), a("div", u({ key: t }, { ref_for: !0 }, O.value.getItemProps({ index: t }), { class: "glim-carousel-slide" }), [p(i.$slots, "slide", {
|
|
49
|
+
item: e,
|
|
50
|
+
index: t
|
|
51
|
+
})], 16))), 128))], 16), o("div", u(O.value.getControlProps(), { class: "glim-carousel-control" }), [
|
|
52
|
+
s(e, {
|
|
53
|
+
label: T.value.previous,
|
|
54
|
+
"label-key": null,
|
|
55
|
+
glyph: m(n),
|
|
56
|
+
variant: "icon",
|
|
57
|
+
disabled: !O.value.canScrollPrev,
|
|
58
|
+
onClick: l[0] ||= (e) => O.value.scrollPrev(m(y)())
|
|
59
|
+
}, null, 8, [
|
|
60
|
+
"label",
|
|
61
|
+
"glyph",
|
|
62
|
+
"disabled"
|
|
63
|
+
]),
|
|
64
|
+
o("div", u(O.value.getIndicatorGroupProps(), { class: "glim-carousel-dots" }), [(d(!0), a(r, null, f(O.value.pageSnapPoints, (e, t) => (d(), a("button", u({ key: t }, { ref_for: !0 }, k(t), { class: "glim-carousel-dot" }), null, 16))), 128))], 16),
|
|
65
|
+
s(e, {
|
|
66
|
+
label: T.value.next,
|
|
67
|
+
"label-key": null,
|
|
68
|
+
glyph: m(t),
|
|
69
|
+
variant: "icon",
|
|
70
|
+
disabled: !O.value.canScrollNext,
|
|
71
|
+
onClick: l[1] ||= (e) => O.value.scrollNext(m(y)())
|
|
72
|
+
}, null, 8, [
|
|
73
|
+
"label",
|
|
74
|
+
"glyph",
|
|
75
|
+
"disabled"
|
|
76
|
+
])
|
|
77
|
+
], 16)], 16, C));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export { w as Carousel };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type CarouselText } from "@glimstone/core";
|
|
2
|
+
declare const __VLS_export: <T>(__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<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
/** The carousel's accessible name. */
|
|
5
|
+
label: string;
|
|
6
|
+
items: readonly T[];
|
|
7
|
+
slidesPerPage?: number;
|
|
8
|
+
/** Goes from the last page on to the first. */
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
text?: Partial<CarouselText>;
|
|
11
|
+
} & {
|
|
12
|
+
page?: number;
|
|
13
|
+
}) & {
|
|
14
|
+
"onUpdate:page"?: ((value: number | undefined) => any) | undefined;
|
|
15
|
+
}> & (typeof globalThis extends {
|
|
16
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
17
|
+
} ? P : {});
|
|
18
|
+
expose: (exposed: {}) => void;
|
|
19
|
+
attrs: any;
|
|
20
|
+
slots: {
|
|
21
|
+
slide(props: {
|
|
22
|
+
item: T;
|
|
23
|
+
index: number;
|
|
24
|
+
}): unknown;
|
|
25
|
+
};
|
|
26
|
+
emit: (event: "update:page", value: number | undefined) => void;
|
|
27
|
+
}>) => import("vue").VNode & {
|
|
28
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
29
|
+
};
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} : {
|
|
35
|
+
[K in keyof T as K]: T[K];
|
|
36
|
+
}) & {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** `https://buymeacoffee.com/widget/page/<handle>` with its query. */
|
|
3
|
+
widgetUrl: string;
|
|
4
|
+
text: {
|
|
5
|
+
title: string;
|
|
6
|
+
/** The app's appeal, the same in every giving window. */
|
|
7
|
+
appeal: string;
|
|
8
|
+
/** One sentence: the payment happens at BMAC, and no account is needed. */
|
|
9
|
+
intro: string;
|
|
10
|
+
closeLabel: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
14
|
+
card: import("vue").ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
close: () => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onClose?: (() => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|