@glimstone/vue 4.4.1 → 4.5.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.
Files changed (95) hide show
  1. package/dist/AboutCard.vue.d.ts +40 -0
  2. package/dist/Accordion.js +36 -0
  3. package/dist/Accordion.vue.d.ts +32 -0
  4. package/dist/AngleSlider.js +46 -0
  5. package/dist/AngleSlider.vue.d.ts +22 -0
  6. package/dist/Avatar.js +37 -0
  7. package/dist/Avatar.vue.d.ts +14 -0
  8. package/dist/Badge-BhK0gMse.js +81 -0
  9. package/dist/Badge.vue.d.ts +1 -1
  10. package/dist/Button-BM5Dzboj.js +203 -0
  11. package/dist/Carousel.js +80 -0
  12. package/dist/Carousel.vue.d.ts +36 -0
  13. package/dist/CoffeeDialog.vue.d.ts +21 -0
  14. package/dist/Collapsible.js +34 -0
  15. package/dist/Collapsible.vue.d.ts +30 -0
  16. package/dist/Combobox.js +3 -3
  17. package/dist/ContextMenu.vue.d.ts +3 -0
  18. package/dist/CryptoDonateDialog.vue.d.ts +48 -0
  19. package/dist/DatePicker.js +103 -0
  20. package/dist/DatePicker.vue.d.ts +24 -0
  21. package/dist/DropdownListbox.vue.d.ts +30 -0
  22. package/dist/FileUpload.js +67 -0
  23. package/dist/FileUpload.vue.d.ts +25 -0
  24. package/dist/FloatingPanel.js +85 -0
  25. package/dist/FloatingPanel.vue.d.ts +34 -0
  26. package/dist/HoverCard.js +42 -0
  27. package/dist/HoverCard.vue.d.ts +23 -0
  28. package/dist/IconButton-D5YOChZI.js +48 -0
  29. package/dist/IconTipButton-BLtrZfgN.js +56 -0
  30. package/dist/Marquee.js +49 -0
  31. package/dist/Marquee.vue.d.ts +32 -0
  32. package/dist/MenuBar.vue.d.ts +1 -3
  33. package/dist/Pagination.js +72 -0
  34. package/dist/Pagination.vue.d.ts +23 -0
  35. package/dist/PaypalDialog.vue.d.ts +63 -0
  36. package/dist/PinInput.js +61 -0
  37. package/dist/PinInput.vue.d.ts +34 -0
  38. package/dist/PresenceBadges.vue.d.ts +8 -0
  39. package/dist/ProgressBar.vue.d.ts +1 -1
  40. package/dist/Rating.js +56 -0
  41. package/dist/Rating.vue.d.ts +27 -0
  42. package/dist/ScrollArea.js +31 -0
  43. package/dist/ScrollArea.vue.d.ts +21 -0
  44. package/dist/Select-CBScnONy.js +458 -0
  45. package/dist/Select.js +1 -1
  46. package/dist/SignaturePad.js +63 -0
  47. package/dist/SignaturePad.vue.d.ts +19 -0
  48. package/dist/Splitter.js +46 -0
  49. package/dist/Splitter.vue.d.ts +31 -0
  50. package/dist/Steps.js +77 -0
  51. package/dist/Steps.vue.d.ts +34 -0
  52. package/dist/TagsInput.js +73 -0
  53. package/dist/TagsInput.vue.d.ts +25 -0
  54. package/dist/Timer.js +74 -0
  55. package/dist/Timer.vue.d.ts +22 -0
  56. package/dist/TipWrap-5Nw7Yj0O.js +51 -0
  57. package/dist/ToastCard.vue.d.ts +25 -0
  58. package/dist/ToastViewport.vue.d.ts +16 -8
  59. package/dist/Tour.js +84 -0
  60. package/dist/Tour.vue.d.ts +16 -0
  61. package/dist/Tree.vue.d.ts +2 -2
  62. package/dist/WindowBar.vue.d.ts +27 -0
  63. package/dist/confirm.d.ts +5 -1
  64. package/dist/deprecatedEvents.d.ts +8 -0
  65. package/dist/engines.d.ts +2 -1
  66. package/dist/entries/accordion.d.ts +2 -0
  67. package/dist/entries/angleslider.d.ts +1 -0
  68. package/dist/entries/avatar.d.ts +2 -0
  69. package/dist/entries/carousel.d.ts +2 -0
  70. package/dist/entries/collapsible.d.ts +1 -0
  71. package/dist/entries/datepicker.d.ts +2 -0
  72. package/dist/entries/fileupload.d.ts +2 -0
  73. package/dist/entries/floatingpanel.d.ts +2 -0
  74. package/dist/entries/hovercard.d.ts +1 -0
  75. package/dist/entries/marquee.d.ts +2 -0
  76. package/dist/entries/pagination.d.ts +2 -0
  77. package/dist/entries/pininput.d.ts +2 -0
  78. package/dist/entries/rating.d.ts +2 -0
  79. package/dist/entries/scrollarea.d.ts +1 -0
  80. package/dist/entries/signaturepad.d.ts +2 -0
  81. package/dist/entries/splitter.d.ts +2 -0
  82. package/dist/entries/steps.d.ts +2 -0
  83. package/dist/entries/tagsinput.d.ts +2 -0
  84. package/dist/entries/timer.d.ts +2 -0
  85. package/dist/entries/tour.d.ts +2 -0
  86. package/dist/fortressParts.d.ts +3 -0
  87. package/dist/{glyphs-CYhs4mrY.js → glyphs-DEch1yYd.js} +2 -2
  88. package/dist/glyphs.d.ts +8 -0
  89. package/dist/index.d.ts +16 -3
  90. package/dist/index.js +3654 -3330
  91. package/dist/paypalButtons.d.ts +17 -0
  92. package/dist/selectParts-0e1ib8BL.js +23 -0
  93. package/dist/selectParts.d.ts +9 -5
  94. package/package.json +108 -7
  95. package/dist/Select-D8Kf1NZa.js +0 -520
package/dist/Steps.js ADDED
@@ -0,0 +1,77 @@
1
+ import { t as e } from "./Button-BM5Dzboj.js";
2
+ import { d as t, i as n, t as r } from "./glyphs-DEch1yYd.js";
3
+ import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeModels as p, mergeProps as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useId as b, useModel as x } from "vue";
4
+ import { STEPS_TEXT as S, pageDir as C, stepsKeyTarget as w } from "@glimstone/core";
5
+ import { normalizeProps as T, useMachine as E } from "@zag-js/vue";
6
+ import * as D from "@zag-js/steps";
7
+ // src/Steps.vue?vue&type=script&setup=true&lang.ts
8
+ var O = ["tabindex", "onKeydown"], k = { class: "glim-steps-title" }, A = { class: "glim-steps-foot" }, j = /* @__PURE__ */ f({
9
+ __name: "Steps",
10
+ props: /*@__PURE__*/ p({
11
+ items: {},
12
+ linear: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ text: {}
17
+ }, {
18
+ step: {},
19
+ stepModifiers: {}
20
+ }),
21
+ emits: /*@__PURE__*/ p(["finish"], ["update:step"]),
22
+ setup(f, { emit: p }) {
23
+ let j = f, M = x(f, "step"), N = p, P = a(() => ({
24
+ ...S,
25
+ ...j.text
26
+ })), F = b(), I = E(D.machine, a(() => ({
27
+ id: F,
28
+ dir: C(),
29
+ count: j.items.length,
30
+ step: M.value ?? 0,
31
+ linear: j.linear,
32
+ onStepChange: (e) => M.value = e.step
33
+ }))), L = a(() => D.connect(I, T)), R = a(() => L.value.value === j.items.length - 1);
34
+ function z(e, t) {
35
+ let n = w(t.key, e, j.items.length, C());
36
+ n !== null && (t.preventDefault(), document.getElementById(L.value.getItemState({ index: n }).triggerId)?.focus());
37
+ }
38
+ return (a, p) => (h(), c("div", m({ "data-glim": "Steps" }, L.value.getRootProps(), { class: "glim-steps" }), [
39
+ l("div", m(L.value.getListProps(), { class: "glim-steps-list" }), [(h(!0), c(i, null, g(f.items, (e, t) => (h(), c("div", m({ key: t }, { ref_for: !0 }, L.value.getItemProps({ index: t }), { class: "glim-steps-item" }), [l("button", m({ ref_for: !0 }, L.value.getTriggerProps({ index: t }), {
40
+ tabindex: t === L.value.value ? 0 : -1,
41
+ class: "glim-steps-trigger",
42
+ onKeydown: (e) => z(t, e)
43
+ }), [l("span", m({ ref_for: !0 }, L.value.getIndicatorProps({ index: t }), { class: "glim-steps-indicator glim-num" }), [L.value.getItemState({ index: t }).completed ? (h(), o(y(n), { key: 0 })) : (h(), c(i, { key: 1 }, [u(v(t + 1), 1)], 64))], 16), l("span", k, v(e.title), 1)], 16, O), t < f.items.length - 1 ? (h(), c("div", m({
44
+ key: 0,
45
+ ref_for: !0
46
+ }, L.value.getSeparatorProps({ index: t }), { class: "glim-steps-separator" }), null, 16)) : s("", !0)], 16))), 128))], 16),
47
+ (h(!0), c(i, null, g(f.items, (e, t) => (h(), c("div", m({ key: t }, { ref_for: !0 }, L.value.getContentProps({ index: t }), { class: "glim-steps-content" }), [_(a.$slots, "content", {
48
+ item: e,
49
+ index: t
50
+ })], 16))), 128)),
51
+ l("div", A, [d(e, {
52
+ label: P.value.back,
53
+ "label-key": null,
54
+ glyph: y(r),
55
+ disabled: !L.value.hasPrevStep,
56
+ onClick: p[0] ||= (e) => L.value.goToPrevStep()
57
+ }, null, 8, [
58
+ "label",
59
+ "glyph",
60
+ "disabled"
61
+ ]), R.value ? (h(), o(e, {
62
+ key: 0,
63
+ label: P.value.finish,
64
+ "label-key": null,
65
+ glyph: y(n),
66
+ onClick: p[1] ||= (e) => N("finish")
67
+ }, null, 8, ["label", "glyph"])) : (h(), o(e, {
68
+ key: 1,
69
+ label: P.value.next,
70
+ "label-key": null,
71
+ glyph: y(t),
72
+ onClick: p[2] ||= (e) => L.value.goToNextStep()
73
+ }, null, 8, ["label", "glyph"]))])
74
+ ], 16));
75
+ }
76
+ });
77
+ export { j as Steps };
@@ -0,0 +1,34 @@
1
+ import { type StepsItem, type StepsText } from "@glimstone/core";
2
+ declare const __VLS_export: <T extends StepsItem>(__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
+ /** Only Back and Next move, so no step is skipped. */
6
+ linear?: boolean;
7
+ text?: Partial<StepsText>;
8
+ } & {
9
+ step?: number;
10
+ }) & {
11
+ onFinish?: (() => any) | undefined;
12
+ "onUpdate:step"?: ((value: number | undefined) => any) | undefined;
13
+ }> & (typeof globalThis extends {
14
+ __VLS_PROPS_FALLBACK: infer P;
15
+ } ? P : {});
16
+ expose: (exposed: {}) => void;
17
+ attrs: any;
18
+ slots: {
19
+ content(props: {
20
+ item: T;
21
+ index: number;
22
+ }): unknown;
23
+ };
24
+ emit: ((evt: "finish") => void) & ((event: "update:step", value: number | undefined) => void);
25
+ }>) => import("vue").VNode & {
26
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
27
+ };
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
31
+ [K in keyof T]: T[K];
32
+ } : {
33
+ [K in keyof T as K]: T[K];
34
+ }) & {};
@@ -0,0 +1,73 @@
1
+ import { r as e } from "./fieldName-DBygJJfe.js";
2
+ import { a as t } from "./glyphs-DEch1yYd.js";
3
+ import { Fragment as n, computed as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, mergeModels as l, mergeProps as u, normalizeProps as d, openBlock as f, renderList as p, toDisplayString as m, unref as h, useId as g, useModel as _ } from "vue";
4
+ import { TAGS_INPUT_TEXT as v, pageDir as y } from "@glimstone/core";
5
+ import { normalizeProps as b, useMachine as x } from "@zag-js/vue";
6
+ import * as S from "@zag-js/tags-input";
7
+ // src/TagsInput.vue
8
+ var C = /* @__PURE__ */ s({
9
+ __name: "TagsInput",
10
+ props: /*@__PURE__*/ l({
11
+ label: {},
12
+ placeholder: {},
13
+ max: {},
14
+ allowDuplicates: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ disabled: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ text: {}
23
+ }, {
24
+ modelValue: { required: !0 },
25
+ modelModifiers: {}
26
+ }),
27
+ emits: ["update:modelValue"],
28
+ setup(s) {
29
+ let l = s, C = _(s, "modelValue"), w = e(() => l.label), T = r(() => ({
30
+ ...v,
31
+ ...l.text
32
+ })), E = g(), D = x(S.machine, r(() => ({
33
+ id: E,
34
+ dir: y(),
35
+ value: C.value,
36
+ max: l.max,
37
+ allowDuplicates: l.allowDuplicates,
38
+ disabled: l.disabled,
39
+ placeholder: l.placeholder,
40
+ editable: !1,
41
+ blurBehavior: "add",
42
+ addOnPaste: !0,
43
+ onValueChange: (e) => C.value = e.value,
44
+ translations: {
45
+ deleteTagTriggerLabel: T.value.remove,
46
+ tagAdded: T.value.added,
47
+ tagSelected: T.value.selected,
48
+ tagDeleted: T.value.removed
49
+ }
50
+ }))), O = r(() => S.connect(D, b));
51
+ return (e, r) => (f(), i("div", u({ "data-glim": "TagsInput" }, O.value.getRootProps(), { class: "glim-tags" }), [
52
+ a("label", u(O.value.getLabelProps(), { class: s.label === void 0 ? "glim-sr-only" : "glim-field-label" }), m(h(w)), 17),
53
+ a("div", u(O.value.getControlProps(), { class: "glim-tags-control" }), [(f(!0), i(n, null, p(O.value.value, (e, n) => (f(), i("span", u({ key: `${e}-${n}` }, { ref_for: !0 }, O.value.getItemProps({
54
+ index: n,
55
+ value: e
56
+ }), { class: "glim-tag-item" }), [a("span", u({ ref_for: !0 }, O.value.getItemPreviewProps({
57
+ index: n,
58
+ value: e
59
+ }), { class: "glim-tag" }), [a("span", u({ ref_for: !0 }, O.value.getItemTextProps({
60
+ index: n,
61
+ value: e
62
+ }), { class: "glim-tag-text" }), m(e), 17), a("button", u({ ref_for: !0 }, O.value.getItemDeleteTriggerProps({
63
+ index: n,
64
+ value: e
65
+ }), { class: "glim-tag-remove" }), [o(h(t))], 16)], 16), a("input", u({ ref_for: !0 }, O.value.getItemInputProps({
66
+ index: n,
67
+ value: e
68
+ }), { class: "glim-tag-edit" }), null, 16)], 16))), 128)), a("input", u(O.value.getInputProps(), { class: "glim-tags-input" }), null, 16)], 16),
69
+ a("input", d(c(O.value.getHiddenInputProps())), null, 16)
70
+ ], 16));
71
+ }
72
+ });
73
+ export { C as TagsInput };
@@ -0,0 +1,25 @@
1
+ import { type TagsInputText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ label?: string;
4
+ placeholder?: string;
5
+ /** How many tags it takes at most. */
6
+ max?: number;
7
+ /** Takes the same tag twice. */
8
+ allowDuplicates?: boolean;
9
+ disabled?: boolean;
10
+ text?: Partial<TagsInputText>;
11
+ };
12
+ type __VLS_ModelProps = {
13
+ modelValue: string[];
14
+ };
15
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
16
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ "update:modelValue": (value: string[]) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
20
+ }>, {
21
+ disabled: boolean;
22
+ allowDuplicates: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
package/dist/Timer.js ADDED
@@ -0,0 +1,74 @@
1
+ import { t as e } from "./Button-BM5Dzboj.js";
2
+ import { f as t, h as n, m as r } from "./glyphs-DEch1yYd.js";
3
+ import { computed as i, createBlock as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, openBlock as p, toDisplayString as m, unref as h, useId as g } from "vue";
4
+ import { TIMER_TEXT as _ } from "@glimstone/core";
5
+ import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
6
+ import * as b from "@zag-js/timer";
7
+ // src/Timer.vue?vue&type=script&setup=true&lang.ts
8
+ var x = ["aria-label", "data-running"], S = /* @__PURE__ */ l({
9
+ __name: "Timer",
10
+ props: {
11
+ countdown: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ startMs: { default: 0 },
16
+ targetMs: {},
17
+ autoStart: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ text: {}
22
+ },
23
+ emits: ["complete"],
24
+ setup(l, { emit: S }) {
25
+ let C = l, w = S, T = i(() => ({
26
+ ..._,
27
+ ...C.text
28
+ })), E = g(), D = y(b.machine, i(() => ({
29
+ id: E,
30
+ countdown: C.countdown,
31
+ startMs: C.startMs,
32
+ targetMs: C.targetMs,
33
+ autoStart: C.autoStart,
34
+ interval: 250,
35
+ onComplete: () => w("complete")
36
+ }))), O = i(() => b.connect(D, v)), k = i(() => T.value.spoken(O.value.time.hours, O.value.time.minutes, O.value.time.seconds));
37
+ return (i, l) => (p(), o("div", d({ "data-glim": "Timer" }, O.value.getRootProps(), { class: "glim-timer" }), [s("div", d(O.value.getAreaProps(), {
38
+ role: "timer",
39
+ "aria-label": k.value,
40
+ "data-running": O.value.running ? "" : void 0,
41
+ class: "glim-timer-figure glim-num"
42
+ }), [
43
+ s("span", f(u(O.value.getItemProps({ type: "hours" }))), m(O.value.formattedTime.hours), 17),
44
+ s("span", f(u(O.value.getSeparatorProps())), ":", 16),
45
+ s("span", f(u(O.value.getItemProps({ type: "minutes" }))), m(O.value.formattedTime.minutes), 17),
46
+ s("span", f(u(O.value.getSeparatorProps())), ":", 16),
47
+ s("span", f(u(O.value.getItemProps({ type: "seconds" }))), m(O.value.formattedTime.seconds), 17)
48
+ ], 16, x), s("div", d(O.value.getControlProps(), { class: "glim-timer-control" }), [O.value.running ? (p(), a(e, {
49
+ key: 0,
50
+ label: T.value.pause,
51
+ "label-key": null,
52
+ glyph: h(t),
53
+ onClick: l[0] ||= (e) => O.value.pause()
54
+ }, null, 8, ["label", "glyph"])) : O.value.paused ? (p(), a(e, {
55
+ key: 1,
56
+ label: T.value.resume,
57
+ "label-key": null,
58
+ glyph: h(r),
59
+ onClick: l[1] ||= (e) => O.value.resume()
60
+ }, null, 8, ["label", "glyph"])) : (p(), a(e, {
61
+ key: 2,
62
+ label: T.value.start,
63
+ "label-key": null,
64
+ glyph: h(r),
65
+ onClick: l[2] ||= (e) => O.value.start()
66
+ }, null, 8, ["label", "glyph"])), c(e, {
67
+ label: T.value.reset,
68
+ "label-key": null,
69
+ glyph: h(n),
70
+ onClick: l[3] ||= (e) => O.value.reset()
71
+ }, null, 8, ["label", "glyph"])], 16)], 16));
72
+ }
73
+ });
74
+ export { S as Timer };
@@ -0,0 +1,22 @@
1
+ import { type TimerText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ /** Counts down from startMs to zero rather than up. */
4
+ countdown?: boolean;
5
+ /** Where it starts, in milliseconds. */
6
+ startMs?: number;
7
+ /** Where a count up stops, in milliseconds. */
8
+ targetMs?: number;
9
+ autoStart?: boolean;
10
+ text?: Partial<TimerText>;
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ complete: () => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onComplete?: (() => any) | undefined;
16
+ }>, {
17
+ countdown: boolean;
18
+ startMs: number;
19
+ autoStart: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import { Teleport as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, h as o, onScopeDispose as s, openBlock as c, ref as l, shallowRef as u, toDisplayString as d, unref as f, useId as p, watch as m } from "vue";
2
+ import { dismissBubbleOn as h, placeBubble as g, pointerWasLast as _, portalTarget as v, trackInputModality as y } from "@glimstone/core";
3
+ // src/tipBubble.ts
4
+ function b(e, n = () => !1) {
5
+ let r = l(!1), i = u(null), a = u(null), o = p(), c = t(e), d = t(() => !!c.value && r.value);
6
+ m(n, () => r.value = !1), y();
7
+ let f = () => {
8
+ c.value && (r.value = !0);
9
+ }, v = () => {
10
+ r.value = !1;
11
+ }, b;
12
+ return m(d, (e) => {
13
+ b?.(), b = void 0, e && (i.value && a.value && g(i.value, a.value), b = h(v));
14
+ }, { flush: "post" }), s(() => b?.()), {
15
+ trigger: i,
16
+ bubble: a,
17
+ id: o,
18
+ text: c,
19
+ shown: d,
20
+ describedBy: t(() => d.value ? o : void 0),
21
+ show: f,
22
+ hide: v,
23
+ showOnFocus: () => {
24
+ _() || f();
25
+ }
26
+ };
27
+ }
28
+ // src/TipBubble.vue?vue&type=script&setup=true&lang.ts
29
+ var x = ["id"], S = /* @__PURE__ */ a({
30
+ __name: "TipBubble",
31
+ props: { state: {} },
32
+ setup(t) {
33
+ return (a, o) => (c(), n(e, { to: f(v)() }, [t.state.shown.value ? (c(), i("div", {
34
+ key: 0,
35
+ ref: (e) => t.state.bubble.value = e,
36
+ id: t.state.id,
37
+ role: "tooltip",
38
+ class: "glim-bubble glim-fade"
39
+ }, d(t.state.text.value), 9, x)) : r("", !0)], 8, ["to"]));
40
+ }
41
+ }), C = (e, { slots: t }) => e.on ? o("span", {
42
+ class: "glim-tip-wrap",
43
+ onMouseenter: e.show,
44
+ onMouseleave: e.hide
45
+ }, t.default?.()) : t.default?.();
46
+ C.props = [
47
+ "on",
48
+ "show",
49
+ "hide"
50
+ ];
51
+ export { S as n, b as r, C as t };
@@ -0,0 +1,25 @@
1
+ import { type ToastAction, type ToastSeverity } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ id: string;
4
+ message: string;
5
+ severity: ToastSeverity;
6
+ /** A button such as Undo. A press runs it and dismisses the toast. */
7
+ action?: ToastAction;
8
+ /** Accessible name for the dismiss button, the same for every toast. */
9
+ dismissLabel: string;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ blur: (id: string) => any;
13
+ focus: (id: string) => any;
14
+ dismiss: (id: string) => any;
15
+ mouseEnter: (id: string) => any;
16
+ mouseLeave: (id: string) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onBlur?: ((id: string) => any) | undefined;
19
+ onFocus?: ((id: string) => any) | undefined;
20
+ onDismiss?: ((id: string) => any) | undefined;
21
+ onMouseEnter?: ((id: string) => any) | undefined;
22
+ onMouseLeave?: ((id: string) => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -8,19 +8,27 @@ type __VLS_Props = {
8
8
  }[];
9
9
  /** Accessible name for each dismiss button. */
10
10
  dismissLabel: string;
11
+ /** @deprecated Listen to `mouse-enter`. Removed in 5.0.0. */
12
+ onEnter?: (id: string) => void;
13
+ /** @deprecated Listen to `mouse-leave`. Removed in 5.0.0. */
14
+ onLeave?: (id: string) => void;
15
+ /** @deprecated Listen to `focus`. Removed in 5.0.0. */
16
+ onFocusin?: (id: string) => void;
17
+ /** @deprecated Listen to `blur`. Removed in 5.0.0. */
18
+ onFocusout?: (id: string) => void;
11
19
  };
12
20
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- focusin: (id: string) => any;
14
- focusout: (id: string) => any;
15
- enter: (id: string) => any;
16
- leave: (id: string) => any;
21
+ blur: (id: string) => any;
22
+ focus: (id: string) => any;
17
23
  dismiss: (id: string) => any;
24
+ mouseEnter: (id: string) => any;
25
+ mouseLeave: (id: string) => any;
18
26
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
- onFocusin?: ((id: string) => any) | undefined;
20
- onFocusout?: ((id: string) => any) | undefined;
21
- onEnter?: ((id: string) => any) | undefined;
22
- onLeave?: ((id: string) => any) | undefined;
27
+ onBlur?: ((id: string) => any) | undefined;
28
+ onFocus?: ((id: string) => any) | undefined;
23
29
  onDismiss?: ((id: string) => any) | undefined;
30
+ onMouseEnter?: ((id: string) => any) | undefined;
31
+ onMouseLeave?: ((id: string) => any) | undefined;
24
32
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
33
  declare const _default: typeof __VLS_export;
26
34
  export default _default;
package/dist/Tour.js ADDED
@@ -0,0 +1,84 @@
1
+ import { t as e } from "./Badge-BhK0gMse.js";
2
+ import { t } from "./Button-BM5Dzboj.js";
3
+ import { d as n, i as r, t as i } from "./glyphs-DEch1yYd.js";
4
+ import { Teleport as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeModels as m, mergeProps as h, openBlock as g, toDisplayString as _, unref as v, useId as y, useModel as b, watch as x, withCtx as S } from "vue";
5
+ import { TOUR_TEXT as C, pageDir as w, portalTarget as T, tourSteps as E } from "@glimstone/core";
6
+ import { normalizeProps as D, useMachine as O } from "@zag-js/vue";
7
+ import * as k from "@zag-js/tour";
8
+ // src/Tour.vue?vue&type=script&setup=true&lang.ts
9
+ var A = {
10
+ key: 0,
11
+ "data-glim": "Tour",
12
+ class: "glim-tour-layer"
13
+ }, j = { class: "glim-tour-foot" }, M = /* @__PURE__ */ p({
14
+ __name: "Tour",
15
+ props: /*@__PURE__*/ m({
16
+ steps: {},
17
+ text: {}
18
+ }, {
19
+ open: {
20
+ type: Boolean,
21
+ required: !0
22
+ },
23
+ openModifiers: {}
24
+ }),
25
+ emits: ["update:open"],
26
+ setup(p) {
27
+ let m = p, M = b(p, "open"), N = o(() => ({
28
+ ...C,
29
+ ...m.text
30
+ })), P = y(), F = O(k.machine, o(() => ({
31
+ id: P,
32
+ dir: w(),
33
+ steps: E(m.steps),
34
+ onStatusChange: (e) => {
35
+ (e.status === "dismissed" || e.status === "completed" || e.status === "skipped") && (M.value = !1);
36
+ }
37
+ }))), I = o(() => k.connect(F, D)), L = () => I.value.getCloseTriggerProps().onClick();
38
+ return x(M, (e) => e && !I.value.open && I.value.start(), { immediate: !0 }), (o, p) => (g(), s(a, { to: v(T)() }, [I.value.open && I.value.step ? (g(), l("div", A, [
39
+ u("div", h(I.value.getBackdropProps(), { class: "glim-tour-backdrop" }), null, 16),
40
+ u("div", h(I.value.getSpotlightProps(), { class: "glim-tour-spotlight" }), null, 16),
41
+ u("div", h(I.value.getPositionerProps(), { class: "glim-tour-positioner" }), [u("div", h(I.value.getContentProps(), { class: "glim-tour" }), [
42
+ u("h2", h(I.value.getTitleProps(), { class: "glim-panel-heading" }), [f(e, {
43
+ tone: "heading",
44
+ size: "heading",
45
+ wrap: ""
46
+ }, {
47
+ default: S(() => [d(_(I.value.step.title), 1)]),
48
+ _: 1
49
+ })], 16),
50
+ u("p", h(I.value.getDescriptionProps(), { class: "glim-tour-text" }), _(I.value.step.description), 17),
51
+ u("div", j, [
52
+ u("span", h(I.value.getProgressTextProps(), { class: "glim-tour-progress glim-num" }), _(N.value.progress(I.value.stepIndex + 1, I.value.totalSteps)), 17),
53
+ f(t, {
54
+ label: N.value.back,
55
+ "label-key": null,
56
+ glyph: v(i),
57
+ disabled: !I.value.hasPrevStep,
58
+ onClick: p[0] ||= (e) => I.value.prev()
59
+ }, null, 8, [
60
+ "label",
61
+ "glyph",
62
+ "disabled"
63
+ ]),
64
+ I.value.lastStep ? (g(), s(t, {
65
+ key: 0,
66
+ label: N.value.close,
67
+ "label-key": null,
68
+ glyph: v(r),
69
+ tone: "accent",
70
+ onClick: L
71
+ }, null, 8, ["label", "glyph"])) : (g(), s(t, {
72
+ key: 1,
73
+ label: N.value.next,
74
+ "label-key": null,
75
+ glyph: v(n),
76
+ tone: "accent",
77
+ onClick: p[1] ||= (e) => I.value.next()
78
+ }, null, 8, ["label", "glyph"]))
79
+ ])
80
+ ], 16)], 16)
81
+ ])) : c("", !0)], 8, ["to"]));
82
+ }
83
+ });
84
+ export { M as Tour };
@@ -0,0 +1,16 @@
1
+ import { type TourStep, type TourText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ steps: readonly TourStep[];
4
+ text?: Partial<TourText>;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ "open": boolean;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:open": (value: boolean) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -12,12 +12,12 @@ type __VLS_ModelProps = {
12
12
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
13
13
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
14
  "update:modelValue": (value: string | null) => any;
15
- activate: (id: string) => any;
16
15
  "update:open": (value: string[]) => any;
16
+ activate: (id: string) => any;
17
17
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
18
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
19
- onActivate?: ((id: string) => any) | undefined;
20
19
  "onUpdate:open"?: ((value: string[]) => any) | undefined;
20
+ onActivate?: ((id: string) => any) | undefined;
21
21
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: typeof __VLS_export;
23
23
  export default _default;
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ /** The app's name. The bar shows none, so this is what a screen reader announces for it. */
3
+ appName: string;
4
+ /** Whether the window fills the screen. The middle button then restores it,
5
+ * and the app turns its edge resizing off. */
6
+ maximised: boolean;
7
+ /** The buttons' accessible names, which also show in their bubbles. */
8
+ text: {
9
+ minimise: string;
10
+ maximise: string;
11
+ restore: string;
12
+ close: string;
13
+ };
14
+ };
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ close: () => any;
17
+ minimise: () => any;
18
+ toggleMaximise: () => any;
19
+ dragStart: () => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onClose?: (() => any) | undefined;
22
+ onMinimise?: (() => any) | undefined;
23
+ onToggleMaximise?: (() => any) | undefined;
24
+ onDragStart?: (() => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
package/dist/confirm.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type Component } from "vue";
1
+ import { type Component, type Ref } from "vue";
2
2
  export interface ConfirmText {
3
3
  /** The dialog's title, the same for every question, such as "Confirm". */
4
4
  title: string;
@@ -18,3 +18,7 @@ export declare function useConfirm(text: ConfirmText): {
18
18
  dismiss: () => void;
19
19
  ConfirmHost: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
20
20
  };
21
+ /** Escape from anywhere and a Tab trap over the dialog's own controls while
22
+ * it is open, so focus never reaches the page it covers. For any other modal
23
+ * window too. */
24
+ export declare function useDialogKeys(open: () => boolean, dialog: Ref<HTMLElement | null>, onCancel: () => void): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * relayDeprecated keeps the old names of renamed events working until they
3
+ * go. `aliases` maps each new name to its old one, which the component takes
4
+ * as a listener prop. A page that listens to an old name is told through
5
+ * `warn`, the core's warnDeprecated, and the returned function hands every
6
+ * new event to that listener as well.
7
+ */
8
+ export declare function relayDeprecated(component: string, aliases: Record<string, string>, props: Record<string, unknown>, warn: (name: string) => void): (event: string, ...args: unknown[]) => void;
package/dist/engines.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Ref, type WritableComputedRef } from "vue";
2
- import { type LabelAxis, type LabelMode, type Motion, type RainbowState, type Shape } from "@glimstone/core";
2
+ import { type Density, type LabelAxis, type LabelMode, type Motion, type RainbowState, type Shape } from "@glimstone/core";
3
3
  /** One axis of the label engine. Writing it stores the mode and tells every control. */
4
4
  export declare function useLabelMode(axis: LabelAxis): WritableComputedRef<LabelMode>;
5
5
  /** The rainbow state. Writing it applies the new state to the document. */
@@ -8,5 +8,6 @@ export declare function useRainbow(): WritableComputedRef<RainbowState>;
8
8
  export declare function useHue(index: () => number | undefined): Ref<Record<string, string> | undefined>;
9
9
  export declare function useShape(): WritableComputedRef<Shape>;
10
10
  export declare function useMotion(): WritableComputedRef<Motion>;
11
+ export declare function useDensity(): WritableComputedRef<Density>;
11
12
  /** The accent the user chose, or "" for the default. */
12
13
  export declare function useAccent(): WritableComputedRef<string>;
@@ -0,0 +1,2 @@
1
+ export { default as Accordion } from "../Accordion.vue";
2
+ export type { AccordionItem, HeadingLevel } from "@glimstone/core";
@@ -0,0 +1 @@
1
+ export { default as AngleSlider } from "../AngleSlider.vue";
@@ -0,0 +1,2 @@
1
+ export { default as Avatar } from "../Avatar.vue";
2
+ export type { AvatarSize } from "@glimstone/core";
@@ -0,0 +1,2 @@
1
+ export { default as Carousel } from "../Carousel.vue";
2
+ export type { CarouselText } from "@glimstone/core";
@@ -0,0 +1 @@
1
+ export { default as Collapsible } from "../Collapsible.vue";
@@ -0,0 +1,2 @@
1
+ export { default as DatePicker } from "../DatePicker.vue";
2
+ export type { DatePickerText, DateView } from "@glimstone/core";
@@ -0,0 +1,2 @@
1
+ export { default as FileUpload } from "../FileUpload.vue";
2
+ export type { FileRefusal, FileUploadText } from "@glimstone/core";
@@ -0,0 +1,2 @@
1
+ export { default as FloatingPanel } from "../FloatingPanel.vue";
2
+ export type { FloatingPanelText, PanelSize } from "@glimstone/core";
@@ -0,0 +1 @@
1
+ export { default as HoverCard } from "../HoverCard.vue";
@@ -0,0 +1,2 @@
1
+ export { default as Marquee } from "../Marquee.vue";
2
+ export type { MarqueeText } from "@glimstone/core";
@@ -0,0 +1,2 @@
1
+ export { default as Pagination } from "../Pagination.vue";
2
+ export type { PaginationText } from "@glimstone/core";