@glimstone/vue 4.9.2 → 5.0.1

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