@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
@@ -0,0 +1,56 @@
1
+ import { n as e, r as t, t as n } from "./TipWrap-5Nw7Yj0O.js";
2
+ import { Fragment as r, createBlock as i, createElementBlock as a, createVNode as o, defineComponent as s, mergeProps as c, openBlock as l, renderSlot as u, resolveDynamicComponent as d, unref as f, withCtx as p } from "vue";
3
+ // src/IconTipButton.vue
4
+ var m = /* @__PURE__ */ s({
5
+ inheritAttrs: !1,
6
+ __name: "IconTipButton",
7
+ props: {
8
+ tip: {},
9
+ disabled: {
10
+ type: Boolean,
11
+ default: !1
12
+ },
13
+ href: {},
14
+ type: { default: "button" }
15
+ },
16
+ setup(s) {
17
+ let m = s, h = t(() => m.tip, () => m.disabled);
18
+ return (t, m) => (l(), a(r, null, [o(f(n), {
19
+ on: s.disabled,
20
+ show: f(h).show,
21
+ hide: f(h).hide
22
+ }, {
23
+ default: p(() => [(l(), i(d(s.href && !s.disabled ? "a" : "button"), c({ "data-glim": "IconTipButton" }, t.$attrs, {
24
+ ref: (e) => f(h).trigger.value = e,
25
+ href: s.disabled ? void 0 : s.href,
26
+ type: s.href && !s.disabled ? void 0 : s.type,
27
+ disabled: s.href && !s.disabled ? void 0 : s.disabled,
28
+ "aria-label": s.tip,
29
+ "aria-describedby": f(h).describedBy.value,
30
+ onMouseenter: f(h).show,
31
+ onMouseleave: f(h).hide,
32
+ onFocus: f(h).showOnFocus,
33
+ onBlur: f(h).hide
34
+ }), {
35
+ default: p(() => [u(t.$slots, "default")]),
36
+ _: 3
37
+ }, 16, [
38
+ "href",
39
+ "type",
40
+ "disabled",
41
+ "aria-label",
42
+ "aria-describedby",
43
+ "onMouseenter",
44
+ "onMouseleave",
45
+ "onFocus",
46
+ "onBlur"
47
+ ]))]),
48
+ _: 3
49
+ }, 8, [
50
+ "on",
51
+ "show",
52
+ "hide"
53
+ ]), o(e, { state: f(h) }, null, 8, ["state"])], 64));
54
+ }
55
+ });
56
+ export { m as t };
@@ -0,0 +1,49 @@
1
+ import { t as e } from "./IconButton-D5YOChZI.js";
2
+ import { f as t, m 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, mergeProps as l, openBlock as u, ref as d, renderList as f, renderSlot as p, unref as m, useId as h } from "vue";
4
+ import { MARQUEE_TEXT as g, pageDir as _ } from "@glimstone/core";
5
+ import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
6
+ import * as b from "@zag-js/marquee";
7
+ // src/Marquee.vue?vue&type=script&setup=true&lang.ts
8
+ var x = {
9
+ "data-glim": "Marquee",
10
+ class: "glim-marquee-frame"
11
+ }, S = /* @__PURE__ */ c({
12
+ __name: "Marquee",
13
+ props: {
14
+ label: {},
15
+ items: {},
16
+ speed: { default: 40 },
17
+ reverse: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ text: {}
22
+ },
23
+ setup(c) {
24
+ let S = c, C = i(() => ({
25
+ ...g,
26
+ ...S.text
27
+ })), w = d(!1), T = h(), E = y(b.machine, i(() => ({
28
+ id: T,
29
+ dir: _(),
30
+ speed: S.speed,
31
+ reverse: S.reverse,
32
+ autoFill: !0,
33
+ paused: w.value,
34
+ spacing: "var(--space-10)",
35
+ translations: { root: S.label }
36
+ }))), D = i(() => b.connect(E, v));
37
+ return (i, d) => (u(), a("div", x, [o("div", l(D.value.getRootProps(), { class: "glim-marquee" }), [o("div", l(D.value.getViewportProps(), { class: "glim-marquee-viewport" }), [(u(!0), a(r, null, f(D.value.contentCount, (e) => (u(), a("div", l({ key: e - 1 }, { ref_for: !0 }, D.value.getContentProps({ index: e - 1 }), { class: "glim-marquee-content" }), [(u(!0), a(r, null, f(c.items, (e, t) => (u(), a("div", l({ key: t }, { ref_for: !0 }, D.value.getItemProps(), { class: "glim-marquee-item" }), [p(i.$slots, "item", { item: e })], 16))), 128))], 16))), 128))], 16)], 16), s(e, {
38
+ tip: w.value ? C.value.resume : C.value.pause,
39
+ glyph: w.value ? m(n) : m(t),
40
+ pressed: w.value,
41
+ onClick: d[0] ||= (e) => w.value = !w.value
42
+ }, null, 8, [
43
+ "tip",
44
+ "glyph",
45
+ "pressed"
46
+ ])]));
47
+ }
48
+ });
49
+ export { S as Marquee };
@@ -0,0 +1,32 @@
1
+ import { type MarqueeText } 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 row's accessible name. */
5
+ label: string;
6
+ items: readonly T[];
7
+ /** How fast it runs, in pixels a second. */
8
+ speed?: number;
9
+ /** Runs the other way. */
10
+ reverse?: boolean;
11
+ text?: Partial<MarqueeText>;
12
+ }> & (typeof globalThis extends {
13
+ __VLS_PROPS_FALLBACK: infer P;
14
+ } ? P : {});
15
+ expose: (exposed: {}) => void;
16
+ attrs: any;
17
+ slots: {
18
+ item(props: {
19
+ item: T;
20
+ }): unknown;
21
+ };
22
+ emit: {};
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
+ }) & {};
@@ -4,10 +4,8 @@ type __VLS_Props = {
4
4
  label: string;
5
5
  menus: MenuBarMenu[];
6
6
  };
7
- /** Opens a menu by its index and puts the focus on its first row. */
8
- declare function show(at: number): void;
9
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
10
- open: typeof show;
8
+ open: (at: number) => void;
11
9
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
10
  declare const _default: typeof __VLS_export;
13
11
  export default _default;
@@ -0,0 +1,72 @@
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, createVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, openBlock as u, renderList as d, toDisplayString as f, unref as p, useId as m, useModel as h } from "vue";
4
+ import { PAGINATION_TEXT as g, pageDir as _ } from "@glimstone/core";
5
+ import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
6
+ import * as b from "@zag-js/pagination";
7
+ // src/Pagination.vue
8
+ var x = /* @__PURE__ */ s({
9
+ __name: "Pagination",
10
+ props: /*@__PURE__*/ c({
11
+ count: {},
12
+ pageSize: { default: 10 },
13
+ siblingCount: { default: 1 },
14
+ text: {}
15
+ }, {
16
+ page: {},
17
+ pageModifiers: {}
18
+ }),
19
+ emits: ["update:page"],
20
+ setup(s) {
21
+ let c = s, x = h(s, "page"), S = i(() => ({
22
+ ...g,
23
+ ...c.text
24
+ })), C = m(), w = y(b.machine, i(() => ({
25
+ id: C,
26
+ dir: _(),
27
+ count: c.count,
28
+ pageSize: c.pageSize,
29
+ siblingCount: c.siblingCount,
30
+ page: x.value ?? 1,
31
+ onPageChange: (e) => x.value = e.page,
32
+ translations: {
33
+ rootLabel: S.value.label,
34
+ itemLabel: (e) => S.value.page(e.page, e.totalPages)
35
+ }
36
+ }))), T = i(() => b.connect(w, v));
37
+ return (i, s) => (u(), a("nav", l({ "data-glim": "Pagination" }, T.value.getRootProps(), { class: "glim-pagination" }), [
38
+ o(e, {
39
+ label: S.value.previous,
40
+ "label-key": null,
41
+ glyph: p(n),
42
+ variant: "icon",
43
+ disabled: T.value.previousPage === null,
44
+ onClick: s[0] ||= (e) => T.value.goToPrevPage()
45
+ }, null, 8, [
46
+ "label",
47
+ "glyph",
48
+ "disabled"
49
+ ]),
50
+ (u(!0), a(r, null, d(T.value.pages, (e, t) => (u(), a(r, { key: e.type === "page" ? e.value : `gap-${t}` }, [e.type === "page" ? (u(), a("button", l({
51
+ key: 0,
52
+ ref_for: !0
53
+ }, T.value.getItemProps(e), { class: "glim-page glim-num" }), f(e.value), 17)) : (u(), a("span", l({
54
+ key: 1,
55
+ ref_for: !0
56
+ }, T.value.getEllipsisProps({ index: t }), { class: "glim-page-gap" }), "…", 16))], 64))), 128)),
57
+ o(e, {
58
+ label: S.value.next,
59
+ "label-key": null,
60
+ glyph: p(t),
61
+ variant: "icon",
62
+ disabled: T.value.nextPage === null,
63
+ onClick: s[1] ||= (e) => T.value.goToNextPage()
64
+ }, null, 8, [
65
+ "label",
66
+ "glyph",
67
+ "disabled"
68
+ ])
69
+ ], 16));
70
+ }
71
+ });
72
+ export { x as Pagination };
@@ -0,0 +1,23 @@
1
+ import { type PaginationText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ /** How many items the pages hold between them. */
4
+ count: number;
5
+ pageSize?: number;
6
+ /** How many pages stand on each side of the one in force before a gap. */
7
+ siblingCount?: number;
8
+ text?: Partial<PaginationText>;
9
+ };
10
+ type __VLS_ModelProps = {
11
+ "page"?: number;
12
+ };
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "update:page": (value: number | undefined) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
18
+ }>, {
19
+ pageSize: number;
20
+ siblingCount: number;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,63 @@
1
+ import type { GiveFrequency } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ text: {
4
+ title: string;
5
+ /** The app's appeal, the same in every giving window. */
6
+ appeal: string;
7
+ /** One sentence: the payment happens at PayPal, by account or by card. */
8
+ intro: string;
9
+ frequencyLabel: string;
10
+ frequencies: Record<GiveFrequency, string>;
11
+ amountLabel: string;
12
+ /** Placeholder and accessible name of the free amount. */
13
+ otherAmount: string;
14
+ loading: string;
15
+ thanks: string;
16
+ failed: string;
17
+ closeLabel: string;
18
+ };
19
+ frequency: GiveFrequency;
20
+ /** The preset amounts, as whole numbers in the currency. */
21
+ amounts: string[];
22
+ currencySymbol: string;
23
+ /** The picked preset, or null while the free amount is in use. */
24
+ preset: string | null;
25
+ typed: string;
26
+ /** Whether `typed` parses as an amount PayPal accepts. */
27
+ typedValid: boolean;
28
+ /** From usePaypalButtons. */
29
+ buttonsRef: (el: unknown) => void;
30
+ status: "idle" | "done" | "failed";
31
+ };
32
+ type __VLS_Slots = {
33
+ selector(props: {
34
+ labelledBy: string;
35
+ options: {
36
+ value: string;
37
+ label: string;
38
+ }[];
39
+ value: string | null;
40
+ onChange: (value: string) => void;
41
+ }): unknown;
42
+ };
43
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
44
+ card: import("vue").ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
45
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
+ close: () => any;
47
+ "update:frequency": (frequency: GiveFrequency) => any;
48
+ "update:preset": (amount: string) => any;
49
+ "update:typed": (text: string) => any;
50
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
51
+ onClose?: (() => any) | undefined;
52
+ "onUpdate:frequency"?: ((frequency: GiveFrequency) => any) | undefined;
53
+ "onUpdate:preset"?: ((amount: string) => any) | undefined;
54
+ "onUpdate:typed"?: ((text: string) => any) | undefined;
55
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
56
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
57
+ declare const _default: typeof __VLS_export;
58
+ export default _default;
59
+ type __VLS_WithSlots<T, S> = T & {
60
+ new (): {
61
+ $slots: S;
62
+ };
63
+ };
@@ -0,0 +1,61 @@
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 { PIN_INPUT_TEXT as g, pinCells as _ } from "@glimstone/core";
4
+ import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
5
+ import * as b from "@zag-js/pin-input";
6
+ // src/PinInput.vue
7
+ var x = /* @__PURE__ */ a({
8
+ __name: "PinInput",
9
+ props: /*@__PURE__*/ s({
10
+ label: {},
11
+ length: { default: 6 },
12
+ type: { default: "numeric" },
13
+ mask: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ otp: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ invalid: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ disabled: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ text: {}
30
+ }, {
31
+ modelValue: { required: !0 },
32
+ modelModifiers: {}
33
+ }),
34
+ emits: /*@__PURE__*/ s(["complete"], ["update:modelValue"]),
35
+ setup(a, { emit: s }) {
36
+ let x = a, S = h(a, "modelValue"), C = s, w = e(() => x.label), T = n(() => ({
37
+ ...g,
38
+ ...x.text
39
+ })), E = m(), D = y(b.machine, n(() => ({
40
+ id: E,
41
+ dir: "ltr",
42
+ count: x.length,
43
+ value: _(S.value, x.length),
44
+ type: x.type,
45
+ mask: x.mask,
46
+ otp: x.otp,
47
+ invalid: x.invalid,
48
+ disabled: x.disabled,
49
+ placeholder: "",
50
+ onValueChange: (e) => S.value = e.valueAsString,
51
+ onValueComplete: (e) => C("complete", e.valueAsString),
52
+ translations: { inputLabel: (e, t) => T.value.cell(e + 1, t) }
53
+ }))), O = n(() => b.connect(D, v));
54
+ return (e, n) => (u(), r("div", c({ "data-glim": "PinInput" }, O.value.getRootProps(), { class: "glim-pin" }), [
55
+ i("label", c(O.value.getLabelProps(), { class: a.label === void 0 ? "glim-sr-only" : "glim-field-label" }), f(p(w)), 17),
56
+ i("div", c(O.value.getControlProps(), { class: "glim-pin-control" }), [(u(!0), r(t, null, d(O.value.items, (e) => (u(), r("input", c({ key: e }, { ref_for: !0 }, O.value.getInputProps({ index: e }), { class: "glim-input glim-pin-cell glim-num" }), null, 16))), 128))], 16),
57
+ i("input", l(o(O.value.getHiddenInputProps())), null, 16)
58
+ ], 16));
59
+ }
60
+ });
61
+ export { x as PinInput };
@@ -0,0 +1,34 @@
1
+ import { type PinInputText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ label?: string;
4
+ length?: number;
5
+ /** What a box takes: digits by default. */
6
+ type?: "numeric" | "alphanumeric" | "alphabetic";
7
+ /** Draws dots instead of the characters, for a code that is a secret. */
8
+ mask?: boolean;
9
+ /** Offers the code the phone just received, as a one-time code. */
10
+ otp?: boolean;
11
+ invalid?: boolean;
12
+ disabled?: boolean;
13
+ text?: Partial<PinInputText>;
14
+ };
15
+ type __VLS_ModelProps = {
16
+ modelValue: string;
17
+ };
18
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
19
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:modelValue": (value: string) => any;
21
+ complete: (value: string) => any;
22
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
24
+ onComplete?: ((value: string) => any) | undefined;
25
+ }>, {
26
+ length: number;
27
+ disabled: boolean;
28
+ mask: boolean;
29
+ invalid: boolean;
30
+ type: "numeric" | "alphanumeric" | "alphabetic";
31
+ otp: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { type FortressInstance, type FortressText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ instance: FortressInstance;
4
+ text: FortressText;
5
+ };
6
+ 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>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -11,9 +11,9 @@ type __VLS_Props = {
11
11
  valueText?: string;
12
12
  };
13
13
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ failed: boolean;
14
15
  value: number | null;
15
16
  paused: boolean;
16
- failed: boolean;
17
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
18
  declare const _default: typeof __VLS_export;
19
19
  export default _default;
package/dist/Rating.js ADDED
@@ -0,0 +1,56 @@
1
+ import { r as e } from "./fieldName-DBygJJfe.js";
2
+ import { g 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 { RATING_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/rating-group";
7
+ // src/Rating.vue?vue&type=script&setup=true&lang.ts
8
+ var C = {
9
+ class: "glim-rating-fill",
10
+ "aria-hidden": "true"
11
+ }, w = /* @__PURE__ */ s({
12
+ __name: "Rating",
13
+ props: /*@__PURE__*/ l({
14
+ label: {},
15
+ count: { default: 5 },
16
+ allowHalf: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ readOnly: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ disabled: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ text: {}
29
+ }, {
30
+ modelValue: { required: !0 },
31
+ modelModifiers: {}
32
+ }),
33
+ emits: ["update:modelValue"],
34
+ setup(s) {
35
+ let l = s, w = _(s, "modelValue"), T = e(() => l.label), E = r(() => ({
36
+ ...v,
37
+ ...l.text
38
+ })), D = g(), O = x(S.machine, r(() => ({
39
+ id: D,
40
+ dir: y(),
41
+ value: w.value,
42
+ count: l.count,
43
+ allowHalf: l.allowHalf,
44
+ readOnly: l.readOnly,
45
+ disabled: l.disabled,
46
+ onValueChange: (e) => w.value = e.value,
47
+ translations: { ratingValueText: (e) => E.value.star(e, l.count) }
48
+ }))), k = r(() => S.connect(O, b));
49
+ return (e, r) => (f(), i("div", u({ "data-glim": "Rating" }, k.value.getRootProps(), { class: "glim-rating" }), [
50
+ a("label", u(k.value.getLabelProps(), { class: s.label === void 0 ? "glim-sr-only" : "glim-field-label" }), m(h(T)), 17),
51
+ a("div", u(k.value.getControlProps(), { class: "glim-rating-control" }), [(f(!0), i(n, null, p(k.value.items, (e) => (f(), i("span", u({ key: e }, { ref_for: !0 }, k.value.getItemProps({ index: e }), { class: "glim-rating-star" }), [o(h(t)), a("span", C, [o(h(t))])], 16))), 128))], 16),
52
+ a("input", d(c(k.value.getHiddenInputProps())), null, 16)
53
+ ], 16));
54
+ }
55
+ });
56
+ export { w as Rating };
@@ -0,0 +1,27 @@
1
+ import { type RatingText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ label?: string;
4
+ count?: number;
5
+ /** Takes half stars, from the pointer and from the arrows. */
6
+ allowHalf?: boolean;
7
+ /** Shows the value and takes no input, such as an average. */
8
+ readOnly?: boolean;
9
+ disabled?: boolean;
10
+ text?: Partial<RatingText>;
11
+ };
12
+ type __VLS_ModelProps = {
13
+ modelValue: number;
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: number) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
20
+ }>, {
21
+ disabled: boolean;
22
+ readOnly: boolean;
23
+ count: number;
24
+ allowHalf: boolean;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, mergeProps as i, openBlock as a, renderSlot as o, useId as s } from "vue";
2
+ import { pageDir as c } from "@glimstone/core";
3
+ import { normalizeProps as l, useMachine as u } from "@zag-js/vue";
4
+ import * as d from "@zag-js/scroll-area";
5
+ // src/ScrollArea.vue?vue&type=script&setup=true&lang.ts
6
+ var f = ["aria-label"], p = /* @__PURE__ */ r({
7
+ __name: "ScrollArea",
8
+ props: {
9
+ label: {},
10
+ maxHeight: {}
11
+ },
12
+ setup(r) {
13
+ let p = s(), m = u(d.machine, {
14
+ id: p,
15
+ dir: c()
16
+ }), h = e(() => d.connect(m, l)), g = e(() => h.value.getViewportProps());
17
+ return (e, s) => (a(), t("div", i({ "data-glim": "ScrollArea" }, h.value.getRootProps(), { class: "glim-scroll" }), [
18
+ n("div", i(g.value, {
19
+ role: "region",
20
+ "aria-label": r.label,
21
+ tabindex: "0",
22
+ style: [g.value.style, { maxHeight: r.maxHeight }],
23
+ class: "glim-scroll-viewport"
24
+ }), [n("div", i(h.value.getContentProps(), { class: "glim-scroll-content" }), [o(e.$slots, "default")], 16)], 16, f),
25
+ n("div", i(h.value.getScrollbarProps({ orientation: "vertical" }), { class: "glim-scroll-bar" }), [n("div", i(h.value.getThumbProps({ orientation: "vertical" }), { class: "glim-scroll-thumb" }), null, 16)], 16),
26
+ n("div", i(h.value.getScrollbarProps({ orientation: "horizontal" }), { class: "glim-scroll-bar" }), [n("div", i(h.value.getThumbProps({ orientation: "horizontal" }), { class: "glim-scroll-thumb" }), null, 16)], 16),
27
+ n("div", i(h.value.getCornerProps(), { class: "glim-scroll-corner" }), null, 16)
28
+ ], 16));
29
+ }
30
+ });
31
+ export { p as ScrollArea };
@@ -0,0 +1,21 @@
1
+ type __VLS_Props = {
2
+ /** The region's accessible name. */
3
+ label: string;
4
+ /** How tall it grows before it scrolls, as a CSS length. */
5
+ maxHeight: string;
6
+ };
7
+ declare const __VLS_template: () => {
8
+ __VLS_Slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ };
12
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
13
+ declare const __VLS_base: 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>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };