@glimstone/vue 4.9.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) 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/ConnectionRow.vue.d.ts +2 -0
  18. package/dist/ContextMenu.vue.d.ts +3 -0
  19. package/dist/DatePicker.js +64 -62
  20. package/dist/FieldErrorLine.vue.d.ts +7 -0
  21. package/dist/FileUpload.js +43 -37
  22. package/dist/FileUpload.vue.d.ts +2 -0
  23. package/dist/FloatingPanel.js +31 -31
  24. package/dist/HoverCard.js +50 -25
  25. package/dist/HoverCard.vue.d.ts +9 -1
  26. package/dist/{IconButton-D5YOChZI.js → IconButton-DGy1eP0I.js} +12 -12
  27. package/dist/IconTipButton-B8kcqxcE.js +59 -0
  28. package/dist/IconTipButton.vue.d.ts +4 -1
  29. package/dist/InfoComponentsCard.vue.d.ts +1 -1
  30. package/dist/ListRow.vue.d.ts +12 -1
  31. package/dist/ListTable.vue.d.ts +10 -0
  32. package/dist/Marquee.js +13 -13
  33. package/dist/Meter.vue.d.ts +5 -0
  34. package/dist/MultiSelect.js +113 -0
  35. package/dist/MultiSelect.vue.d.ts +28 -0
  36. package/dist/Pagination.js +71 -38
  37. package/dist/PinInput.js +32 -28
  38. package/dist/PinInput.vue.d.ts +2 -2
  39. package/dist/Rating.js +35 -29
  40. package/dist/ReadmeButton.vue.d.ts +1 -1
  41. package/dist/RevealEye.vue.d.ts +6 -0
  42. package/dist/ScrollArea.js +5 -5
  43. package/dist/SearchHit-Ch6ef2dk.js +19 -0
  44. package/dist/SearchHit.vue.d.ts +7 -0
  45. package/dist/Select-BiQGVqg_.js +469 -0
  46. package/dist/Select.js +1 -1
  47. package/dist/Selector.vue.d.ts +4 -3
  48. package/dist/SettingsNav.vue.d.ts +38 -0
  49. package/dist/SignInTile.vue.d.ts +1 -1
  50. package/dist/SignaturePad.js +23 -23
  51. package/dist/SkeletonRow.vue.d.ts +6 -0
  52. package/dist/Slider.js +21 -18
  53. package/dist/Sparkline.vue.d.ts +15 -0
  54. package/dist/Splitter.js +8 -8
  55. package/dist/StatusSummary.vue.d.ts +15 -0
  56. package/dist/Steps.js +33 -33
  57. package/dist/SubCard.vue.d.ts +2 -2
  58. package/dist/TagsInput.js +33 -33
  59. package/dist/TimeDial.vue.d.ts +18 -0
  60. package/dist/TimePicker.vue.d.ts +22 -0
  61. package/dist/TimeRangePicker.vue.d.ts +20 -0
  62. package/dist/TimeSegment.vue.d.ts +11 -0
  63. package/dist/{DropdownListbox.vue.d.ts → TimeShell.vue.d.ts} +8 -11
  64. package/dist/Timer.js +33 -30
  65. package/dist/TipWrap-BZAveG4U.js +62 -0
  66. package/dist/ToastCard.vue.d.ts +2 -0
  67. package/dist/ToastViewport.vue.d.ts +1 -8
  68. package/dist/Tour.js +51 -44
  69. package/dist/Window.vue.d.ts +3 -1
  70. package/dist/engines.d.ts +7 -1
  71. package/dist/entries/multiselect.d.ts +2 -0
  72. package/dist/{glyphs-CS3VBARx.js → glyphs-DncaPYo_.js} +2 -2
  73. package/dist/glyphs.d.ts +2 -0
  74. package/dist/index.d.ts +15 -7
  75. package/dist/index.js +4128 -3447
  76. package/dist/settingsNavItem.d.ts +16 -0
  77. package/dist/tipBubble.d.ts +12 -1
  78. package/dist/windowParts.d.ts +4 -1
  79. package/package.json +6 -2
  80. package/dist/AboutCard.vue.d.ts +0 -43
  81. package/dist/Accordion-JaQ-i8V1.js +0 -36
  82. package/dist/Badge-BhK0gMse.js +0 -81
  83. package/dist/Button-CZHmbNOm.js +0 -203
  84. package/dist/IconTipButton-BLtrZfgN.js +0 -56
  85. package/dist/Select-DBABOjwc.js +0 -458
  86. package/dist/TipWrap-5Nw7Yj0O.js +0 -51
  87. package/dist/deprecatedEvents.d.ts +0 -8
package/dist/Slider.js CHANGED
@@ -1,11 +1,14 @@
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, mergeModels as o, mergeProps as s, openBlock as c, renderList as l, toDisplayString as u, unref as d, useId as f, useModel as p } from "vue";
1
+ import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, mergeModels as a, mergeProps as o, openBlock as s, renderList as c, toDisplayString as l, unref as u, useId as d, useModel as f } from "vue";
2
+ import * as p from "@zag-js/slider";
3
3
  import { normalizeProps as m, useMachine as h } from "@zag-js/vue";
4
- import * as g from "@zag-js/slider";
4
+ import { r as g } from "./fieldName-DBygJJfe.js";
5
5
  // src/Slider.vue?vue&type=script&setup=true&lang.ts
6
- var _ = { class: "glim-slider-head" }, v = /* @__PURE__ */ a({
6
+ var _ = { class: "glim-slider-head" }, v = {
7
+ class: "glim-slider-bubble",
8
+ "aria-hidden": "true"
9
+ }, y = /* @__PURE__ */ i({
7
10
  __name: "Slider",
8
- props: /*@__PURE__*/ o({
11
+ props: /*@__PURE__*/ a({
9
12
  label: {},
10
13
  min: {},
11
14
  max: {},
@@ -20,18 +23,18 @@ var _ = { class: "glim-slider-head" }, v = /* @__PURE__ */ a({
20
23
  modelModifiers: {}
21
24
  }),
22
25
  emits: ["update:modelValue"],
23
- setup(a) {
24
- let o = a, v = p(a, "modelValue"), y = e(() => o.label), b = f(), x = h(g.machine, n(() => ({
25
- id: b,
26
- value: [v.value],
27
- min: o.min,
28
- max: o.max,
29
- step: o.step,
30
- disabled: o.disabled,
31
- onValueChange: (e) => v.value = e.value[0],
32
- getAriaValueText: (e) => o.format(e.value)
33
- }))), S = n(() => g.connect(x, m));
34
- return (e, n) => (c(), r("div", s({ "data-glim": "Slider" }, S.value.getRootProps(), { class: "glim-slider" }), [i("div", _, [i("label", s(S.value.getLabelProps(), { class: a.label === void 0 ? "glim-sr-only" : "glim-field-label" }), u(d(y)), 17), i("output", s(S.value.getValueTextProps(), { class: "glim-slider-value" }), u(a.format(S.value.value[0])), 17)]), i("div", s(S.value.getControlProps(), { class: "glim-slider-control" }), [i("div", s(S.value.getTrackProps(), { class: "glim-slider-track" }), [i("div", s(S.value.getRangeProps(), { class: "glim-slider-range" }), null, 16)], 16), (c(!0), r(t, null, l(S.value.value, (e, t) => (c(), r("div", s({ key: t }, { ref_for: !0 }, S.value.getThumbProps({ index: t }), { class: "glim-slider-thumb" }), [i("input", s({ ref_for: !0 }, S.value.getHiddenInputProps({ index: t })), null, 16)], 16))), 128))], 16)], 16));
26
+ setup(i) {
27
+ let a = i, y = f(i, "modelValue"), b = g(() => a.label), x = d(), S = h(p.machine, t(() => ({
28
+ id: x,
29
+ value: [y.value],
30
+ min: a.min,
31
+ max: a.max,
32
+ step: a.step,
33
+ disabled: a.disabled,
34
+ onValueChange: (e) => y.value = e.value[0],
35
+ getAriaValueText: (e) => a.format(e.value)
36
+ }))), C = t(() => p.connect(S, m));
37
+ return (t, a) => (s(), n("div", o({ "data-glim": "Slider" }, C.value.getRootProps(), { class: "glim-slider" }), [r("div", _, [r("label", o(C.value.getLabelProps(), { class: i.label === void 0 ? "glim-sr-only" : "glim-field-label" }), l(u(b)), 17), r("output", o(C.value.getValueTextProps(), { class: "glim-slider-value" }), l(i.format(C.value.value[0])), 17)]), r("div", o(C.value.getControlProps(), { class: "glim-slider-control" }), [r("div", o(C.value.getTrackProps(), { class: "glim-slider-track" }), [r("div", o(C.value.getRangeProps(), { class: "glim-slider-range" }), null, 16)], 16), (s(!0), n(e, null, c(C.value.value, (e, t) => (s(), n("div", o({ key: t }, { ref_for: !0 }, C.value.getThumbProps({ index: t }), { class: "glim-slider-thumb" }), [r("span", v, l(i.format(C.value.value[t])), 1), r("input", o({ ref_for: !0 }, C.value.getHiddenInputProps({ index: t })), null, 16)], 16))), 128))], 16)], 16));
35
38
  }
36
39
  });
37
- export { v as Slider };
40
+ export { y as Slider };
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ values: readonly number[];
3
+ /** What the line shows, for a screen reader. */
4
+ label: string;
5
+ color?: string;
6
+ width?: number;
7
+ height?: number;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ width: number;
11
+ height: number;
12
+ color: string;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
package/dist/Splitter.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, openBlock as c, renderList as l, renderSlot as u, useId as d, useModel as f } from "vue";
2
- import { SPLITTER_TEXT as p, pageDir as m, splitterHandleId as h } from "@glimstone/core";
3
- import { normalizeProps as g, useMachine as _ } from "@zag-js/vue";
4
- import * as v from "@zag-js/splitter";
2
+ import * as p from "@zag-js/splitter";
3
+ import { normalizeProps as m, useMachine as h } from "@zag-js/vue";
4
+ import { SPLITTER_TEXT as g, pageDir as _, splitterHandleId as v } from "@glimstone/core";
5
5
  // src/Splitter.vue?vue&type=script&setup=true&lang.ts
6
6
  var y = ["aria-label"], b = /* @__PURE__ */ a({
7
7
  __name: "Splitter",
@@ -16,11 +16,11 @@ var y = ["aria-label"], b = /* @__PURE__ */ a({
16
16
  emits: ["update:size"],
17
17
  setup(a) {
18
18
  let o = a, b = f(a, "size"), x = t(() => ({
19
- ...p,
19
+ ...g,
20
20
  ...o.text
21
- })), S = d(), C = _(v.machine, t(() => ({
21
+ })), S = d(), C = h(p.machine, t(() => ({
22
22
  id: S,
23
- dir: m(),
23
+ dir: _(),
24
24
  orientation: o.orientation,
25
25
  panels: o.panels.map(({ id: e, minSize: t, maxSize: n, collapsible: r }) => ({
26
26
  id: e,
@@ -30,9 +30,9 @@ var y = ["aria-label"], b = /* @__PURE__ */ a({
30
30
  })),
31
31
  size: b.value,
32
32
  onResize: (e) => b.value = e.size
33
- }))), w = t(() => v.connect(C, g)), T = (e) => {
33
+ }))), w = t(() => p.connect(C, m)), T = (e) => {
34
34
  let t = o.panels[e + 1];
35
- return t && h(o.panels[e], t);
35
+ return t && v(o.panels[e], t);
36
36
  };
37
37
  return (t, o) => (c(), r("div", s({ "data-glim": "Splitter" }, w.value.getRootProps(), { class: "glim-splitter" }), [(c(!0), r(e, null, l(a.panels, (a, o) => (c(), r(e, { key: a.id }, [i("div", s({ ref_for: !0 }, w.value.getPanelProps({ id: a.id }), { class: "glim-splitter-panel" }), [u(t.$slots, "panel", { panel: a })], 16), T(o) ? (c(), r("div", s({
38
38
  key: 0,
@@ -0,0 +1,15 @@
1
+ import { type StatusSummaryTone } from "@glimstone/core";
2
+ import type { StatusNeed } from "./windowParts";
3
+ type __VLS_Props = {
4
+ /** How things stand. A summary that says `ok` while something waits shows the warning's mark. */
5
+ tone: StatusSummaryTone;
6
+ /** The one sentence, such as "Documents needs a look" or "All is well". */
7
+ title: string;
8
+ /** A quiet line under it, such as when the last run was and when the next one is. */
9
+ detail?: string;
10
+ /** What waits for the person. A count of zero is left out, and with none the sentence stands alone. */
11
+ needs?: StatusNeed[];
12
+ };
13
+ 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>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
package/dist/Steps.js CHANGED
@@ -1,13 +1,13 @@
1
- import { t as e } from "./Button-CZHmbNOm.js";
2
- import { d as t, i as n, t as r } from "./glyphs-CS3VBARx.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";
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, useId as g, useModel as _ } from "vue";
2
+ import * as v from "@zag-js/steps";
3
+ import { normalizeProps as y, useMachine as b } from "@zag-js/vue";
4
+ import { STEPS_TEXT as x, pageDir as S, stepsKeyTarget as C } from "@glimstone/core";
5
+ import { t as w } from "./Button-DVUuFYk0.js";
6
+ import { f as T, i as E, t as D } from "./glyphs-DncaPYo_.js";
7
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({
8
+ var O = ["tabindex", "onKeydown"], k = { class: "glim-steps-title" }, A = { class: "glim-steps-foot" }, j = /* @__PURE__ */ c({
9
9
  __name: "Steps",
10
- props: /*@__PURE__*/ p({
10
+ props: /*@__PURE__*/ l({
11
11
  items: {},
12
12
  linear: {
13
13
  type: Boolean,
@@ -18,58 +18,58 @@ var O = ["tabindex", "onKeydown"], k = { class: "glim-steps-title" }, A = { clas
18
18
  step: {},
19
19
  stepModifiers: {}
20
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,
21
+ emits: /*@__PURE__*/ l(["finish"], ["update:step"]),
22
+ setup(c, { emit: l }) {
23
+ let j = c, M = _(c, "step"), N = l, P = t(() => ({
24
+ ...x,
25
25
  ...j.text
26
- })), F = b(), I = E(D.machine, a(() => ({
26
+ })), F = g(), I = b(v.machine, t(() => ({
27
27
  id: F,
28
- dir: C(),
28
+ dir: S(),
29
29
  count: j.items.length,
30
30
  step: M.value ?? 0,
31
31
  linear: j.linear,
32
32
  onStepChange: (e) => M.value = e.step
33
- }))), L = a(() => D.connect(I, T)), R = a(() => L.value.value === j.items.length - 1);
33
+ }))), L = t(() => v.connect(I, y)), R = t(() => L.value.value === j.items.length - 1);
34
34
  function z(e, t) {
35
- let n = w(t.key, e, j.items.length, C());
35
+ let n = C(t.key, e, j.items.length, S());
36
36
  n !== null && (t.preventDefault(), document.getElementById(L.value.getItemState({ index: n }).triggerId)?.focus());
37
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,
38
+ return (t, l) => (d(), i("div", u({ "data-glim": "Steps" }, L.value.getRootProps(), { class: "glim-steps" }), [
39
+ a("div", u(L.value.getListProps(), { class: "glim-steps-list" }), [(d(!0), i(e, null, f(c.items, (t, s) => (d(), i("div", u({ key: s }, { ref_for: !0 }, L.value.getItemProps({ index: s }), { class: "glim-steps-item" }), [a("button", u({ ref_for: !0 }, L.value.getTriggerProps({ index: s }), {
40
+ tabindex: s === L.value.value ? 0 : -1,
41
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({
42
+ onKeydown: (e) => z(s, e)
43
+ }), [a("span", u({ ref_for: !0 }, L.value.getIndicatorProps({ index: s }), { class: "glim-steps-indicator glim-num" }), [L.value.getItemState({ index: s }).completed ? (d(), n(h(E), { key: 0 })) : (d(), i(e, { key: 1 }, [o(m(s + 1), 1)], 64))], 16), a("span", k, m(t.title), 1)], 16, O), s < c.items.length - 1 ? (d(), i("div", u({
44
44
  key: 0,
45
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", {
46
+ }, L.value.getSeparatorProps({ index: s }), { class: "glim-steps-separator" }), null, 16)) : r("", !0)], 16))), 128))], 16),
47
+ (d(!0), i(e, null, f(c.items, (e, n) => (d(), i("div", u({ key: n }, { ref_for: !0 }, L.value.getContentProps({ index: n }), { class: "glim-steps-content" }), [p(t.$slots, "content", {
48
48
  item: e,
49
- index: t
49
+ index: n
50
50
  })], 16))), 128)),
51
- l("div", A, [d(e, {
51
+ a("div", A, [s(w, {
52
52
  label: P.value.back,
53
53
  "label-key": null,
54
- glyph: y(r),
54
+ glyph: h(D),
55
55
  disabled: !L.value.hasPrevStep,
56
- onClick: p[0] ||= (e) => L.value.goToPrevStep()
56
+ onClick: l[0] ||= (e) => L.value.goToPrevStep()
57
57
  }, null, 8, [
58
58
  "label",
59
59
  "glyph",
60
60
  "disabled"
61
- ]), R.value ? (h(), o(e, {
61
+ ]), R.value ? (d(), n(w, {
62
62
  key: 0,
63
63
  label: P.value.finish,
64
64
  "label-key": null,
65
- glyph: y(n),
66
- onClick: p[1] ||= (e) => N("finish")
67
- }, null, 8, ["label", "glyph"])) : (h(), o(e, {
65
+ glyph: h(E),
66
+ onClick: l[1] ||= (e) => N("finish")
67
+ }, null, 8, ["label", "glyph"])) : (d(), n(w, {
68
68
  key: 1,
69
69
  label: P.value.next,
70
70
  "label-key": null,
71
- glyph: y(t),
72
- onClick: p[2] ||= (e) => L.value.goToNextStep()
71
+ glyph: h(T),
72
+ onClick: l[2] ||= (e) => L.value.goToNextStep()
73
73
  }, null, 8, ["label", "glyph"]))])
74
74
  ], 16));
75
75
  }
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
- /** The group's name, drawn as a section badge on its top edge. */
2
+ /** The group's name, a title above its content. */
3
3
  title?: string;
4
- /** One line on what the group does, drawn as an "(i)" inside the badge. */
4
+ /** One line on what the group does, drawn as an "(i)" beside the title. */
5
5
  hint?: string;
6
6
  };
7
7
  declare const __VLS_template: () => {
package/dist/TagsInput.js CHANGED
@@ -1,13 +1,13 @@
1
- import { r as e } from "./fieldName-DBygJJfe.js";
2
- import { a as t } from "./glyphs-CS3VBARx.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";
1
+ import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, createVNode 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";
2
+ import * as g from "@zag-js/tags-input";
3
+ import { normalizeProps as _, useMachine as v } from "@zag-js/vue";
4
+ import { TAGS_INPUT_TEXT as y, pageDir as b } from "@glimstone/core";
5
+ import { r as x } from "./fieldName-DBygJJfe.js";
6
+ import { o as S } from "./glyphs-DncaPYo_.js";
7
7
  // src/TagsInput.vue
8
- var C = /* @__PURE__ */ s({
8
+ var C = /* @__PURE__ */ a({
9
9
  __name: "TagsInput",
10
- props: /*@__PURE__*/ l({
10
+ props: /*@__PURE__*/ s({
11
11
  label: {},
12
12
  placeholder: {},
13
13
  max: {},
@@ -25,18 +25,18 @@ var C = /* @__PURE__ */ s({
25
25
  modelModifiers: {}
26
26
  }),
27
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(() => ({
28
+ setup(a) {
29
+ let s = a, C = h(a, "modelValue"), w = x(() => s.label), T = t(() => ({
30
+ ...y,
31
+ ...s.text
32
+ })), E = m(), D = v(g.machine, t(() => ({
33
33
  id: E,
34
- dir: y(),
34
+ dir: b(),
35
35
  value: C.value,
36
- max: l.max,
37
- allowDuplicates: l.allowDuplicates,
38
- disabled: l.disabled,
39
- placeholder: l.placeholder,
36
+ max: s.max,
37
+ allowDuplicates: s.allowDuplicates,
38
+ disabled: s.disabled,
39
+ placeholder: s.placeholder,
40
40
  editable: !1,
41
41
  blurBehavior: "add",
42
42
  addOnPaste: !0,
@@ -47,26 +47,26 @@ var C = /* @__PURE__ */ s({
47
47
  tagSelected: T.value.selected,
48
48
  tagDeleted: T.value.removed
49
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,
50
+ }))), O = t(() => g.connect(D, _));
51
+ return (t, s) => (u(), n("div", c({ "data-glim": "TagsInput" }, O.value.getRootProps(), { class: "glim-tags" }), [
52
+ r("label", c(O.value.getLabelProps(), { class: a.label === void 0 ? "glim-sr-only" : "glim-field-label" }), f(p(w)), 17),
53
+ r("div", c(O.value.getControlProps(), { class: "glim-tags-control" }), [(u(!0), n(e, null, d(O.value.value, (e, t) => (u(), n("span", c({ key: `${e}-${t}` }, { ref_for: !0 }, O.value.getItemProps({
54
+ index: t,
55
55
  value: e
56
- }), { class: "glim-tag-item" }), [a("span", u({ ref_for: !0 }, O.value.getItemPreviewProps({
57
- index: n,
56
+ }), { class: "glim-tag-item" }), [r("span", c({ ref_for: !0 }, O.value.getItemPreviewProps({
57
+ index: t,
58
58
  value: e
59
- }), { class: "glim-tag" }), [a("span", u({ ref_for: !0 }, O.value.getItemTextProps({
60
- index: n,
59
+ }), { class: "glim-tag" }), [r("span", c({ ref_for: !0 }, O.value.getItemTextProps({
60
+ index: t,
61
61
  value: e
62
- }), { class: "glim-tag-text" }), m(e), 17), a("button", u({ ref_for: !0 }, O.value.getItemDeleteTriggerProps({
63
- index: n,
62
+ }), { class: "glim-tag-text" }), f(e), 17), r("button", c({ ref_for: !0 }, O.value.getItemDeleteTriggerProps({
63
+ index: t,
64
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,
65
+ }), { class: "glim-tag-remove" }), [i(p(S))], 16)], 16), r("input", c({ ref_for: !0 }, O.value.getItemInputProps({
66
+ index: t,
67
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)
68
+ }), { class: "glim-tag-edit" }), null, 16)], 16))), 128)), r("input", c(O.value.getInputProps(), { class: "glim-tags-input" }), null, 16)], 16),
69
+ r("input", l(o(O.value.getHiddenInputProps())), null, 16)
70
70
  ], 16));
71
71
  }
72
72
  });
@@ -0,0 +1,18 @@
1
+ import { type ClockFace } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ anchor: HTMLElement;
4
+ face: ClockFace;
5
+ value: number | null;
6
+ minuteStep: number;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ close: () => any;
10
+ point: (value: number, done: boolean) => any;
11
+ turn: (delta: 1 | -1) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onClose?: (() => any) | undefined;
14
+ onPoint?: ((value: number, done: boolean) => any) | undefined;
15
+ onTurn?: ((delta: 1 | -1) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { type TimePickerText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ label?: string;
4
+ /** How far an arrow moves the minutes. */
5
+ minuteStep?: number;
6
+ /** The name the time is sent under in a form. */
7
+ name?: string;
8
+ disabled?: boolean;
9
+ /** The segments' names. English where left out. */
10
+ text?: Partial<TimePickerText>;
11
+ };
12
+ type __VLS_ModelProps = {
13
+ modelValue: string | null;
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 | null) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { type TimePickerText } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ label?: string;
4
+ /** How far an arrow moves the minutes. */
5
+ minuteStep?: number;
6
+ disabled?: boolean;
7
+ /** The segments' names, the halves' and the word between them. English where left out. */
8
+ text?: Partial<TimePickerText>;
9
+ };
10
+ type __VLS_ModelProps = {
11
+ modelValue: [string | null, string | null];
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:modelValue": (value: [string | null, string | null]) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ "onUpdate:modelValue"?: ((value: [string | null, string | null]) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { type TimeSegmentValue } from "@glimstone/core";
2
+ type __VLS_Props = {
3
+ at: number;
4
+ value: TimeSegmentValue;
5
+ label: string;
6
+ disabled: boolean;
7
+ editing: boolean;
8
+ };
9
+ 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>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -1,13 +1,10 @@
1
+ import { type TimePickerText, type TimeSegmentValue } from "@glimstone/core";
1
2
  type __VLS_Props = {
2
- /** Whether the panel is mounted. The caller owns the trigger; only the panel is shared. */
3
- open: boolean;
4
- /** The trigger, which anchors the panel and is exempt from the outside press,
5
- * so a press on it does not close and reopen the list. */
6
- triggerRef: HTMLElement | null;
7
- /** Accessible name for the listbox, normally the label the trigger carries. */
8
- label: string;
9
- /** `aria-multiselectable`, for a checkbox multi-select list. */
10
- multiselectable?: boolean;
3
+ label?: string;
4
+ values: TimeSegmentValue[];
5
+ minuteStep?: number;
6
+ disabled?: boolean;
7
+ text?: Partial<TimePickerText>;
11
8
  };
12
9
  declare const __VLS_template: () => {
13
10
  __VLS_Slots: {
@@ -16,9 +13,9 @@ declare const __VLS_template: () => {
16
13
  };
17
14
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
18
15
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- close: () => any;
16
+ values: (values: TimeSegmentValue[]) => any;
20
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
- onClose?: (() => any) | undefined;
18
+ onValues?: ((values: TimeSegmentValue[]) => any) | undefined;
22
19
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
21
  declare const _default: typeof __VLS_export;
package/dist/Timer.js CHANGED
@@ -1,11 +1,11 @@
1
- import { t as e } from "./Button-CZHmbNOm.js";
2
- import { f as t, h as n, m as r } from "./glyphs-CS3VBARx.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";
1
+ import { computed as e, createBlock as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, guardReactiveProps as o, mergeProps as s, normalizeProps as c, openBlock as l, toDisplayString as u, unref as d, useId as f } from "vue";
2
+ import * as p from "@zag-js/timer";
3
+ import { normalizeProps as m, useMachine as h } from "@zag-js/vue";
4
+ import { TIMER_TEXT as g } from "@glimstone/core";
5
+ import { t as _ } from "./Button-DVUuFYk0.js";
6
+ import { _ as v, g as y, m as b } from "./glyphs-DncaPYo_.js";
7
7
  // src/Timer.vue?vue&type=script&setup=true&lang.ts
8
- var x = ["aria-label", "data-running"], S = /* @__PURE__ */ l({
8
+ var x = ["aria-label", "data-running"], S = /* @__PURE__ */ a({
9
9
  __name: "Timer",
10
10
  props: {
11
11
  countdown: {
@@ -21,11 +21,11 @@ var x = ["aria-label", "data-running"], S = /* @__PURE__ */ l({
21
21
  text: {}
22
22
  },
23
23
  emits: ["complete"],
24
- setup(l, { emit: S }) {
25
- let C = l, w = S, T = i(() => ({
26
- ..._,
24
+ setup(a, { emit: S }) {
25
+ let C = a, w = S, T = e(() => ({
26
+ ...g,
27
27
  ...C.text
28
- })), E = g(), D = y(b.machine, i(() => ({
28
+ })), E = f(), D = h(p.machine, e(() => ({
29
29
  id: E,
30
30
  countdown: C.countdown,
31
31
  startMs: C.startMs,
@@ -33,41 +33,44 @@ var x = ["aria-label", "data-running"], S = /* @__PURE__ */ l({
33
33
  autoStart: C.autoStart,
34
34
  interval: 250,
35
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(), {
36
+ }))), O = e(() => p.connect(D, m)), k = e(() => T.value.spoken(O.value.time.hours, O.value.time.minutes, O.value.time.seconds));
37
+ function A() {
38
+ O.value.pause(), O.value.reset();
39
+ }
40
+ return (e, a) => (l(), n("div", s({ "data-glim": "Timer" }, O.value.getRootProps(), { class: "glim-timer" }), [r("div", s(O.value.getAreaProps(), {
38
41
  role: "timer",
39
42
  "aria-label": k.value,
40
43
  "data-running": O.value.running ? "" : void 0,
41
44
  class: "glim-timer-figure glim-num"
42
45
  }), [
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, {
46
+ r("span", c(o(O.value.getItemProps({ type: "hours" }))), u(O.value.formattedTime.hours), 17),
47
+ r("span", c(o(O.value.getSeparatorProps())), ":", 16),
48
+ r("span", c(o(O.value.getItemProps({ type: "minutes" }))), u(O.value.formattedTime.minutes), 17),
49
+ r("span", c(o(O.value.getSeparatorProps())), ":", 16),
50
+ r("span", c(o(O.value.getItemProps({ type: "seconds" }))), u(O.value.formattedTime.seconds), 17)
51
+ ], 16, x), r("div", s(O.value.getControlProps(), { class: "glim-timer-control" }), [O.value.running ? (l(), t(_, {
49
52
  key: 0,
50
53
  label: T.value.pause,
51
54
  "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
+ glyph: d(b),
56
+ onClick: a[0] ||= (e) => O.value.pause()
57
+ }, null, 8, ["label", "glyph"])) : O.value.paused ? (l(), t(_, {
55
58
  key: 1,
56
59
  label: T.value.resume,
57
60
  "label-key": null,
58
- glyph: h(r),
59
- onClick: l[1] ||= (e) => O.value.resume()
60
- }, null, 8, ["label", "glyph"])) : (p(), a(e, {
61
+ glyph: d(y),
62
+ onClick: a[1] ||= (e) => O.value.resume()
63
+ }, null, 8, ["label", "glyph"])) : (l(), t(_, {
61
64
  key: 2,
62
65
  label: T.value.start,
63
66
  "label-key": null,
64
- glyph: h(r),
65
- onClick: l[2] ||= (e) => O.value.start()
66
- }, null, 8, ["label", "glyph"])), c(e, {
67
+ glyph: d(y),
68
+ onClick: a[2] ||= (e) => O.value.start()
69
+ }, null, 8, ["label", "glyph"])), i(_, {
67
70
  label: T.value.reset,
68
71
  "label-key": null,
69
- glyph: h(n),
70
- onClick: l[3] ||= (e) => O.value.reset()
72
+ glyph: d(v),
73
+ onClick: A
71
74
  }, null, 8, ["label", "glyph"])], 16)], 16));
72
75
  }
73
76
  });
@@ -0,0 +1,62 @@
1
+ import { Teleport as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, defineComponent as o, h as s, normalizeClass as c, onScopeDispose as l, openBlock as u, ref as d, shallowRef as f, toDisplayString as p, unref as m, useId as h, watch as g } from "vue";
2
+ import { dismissBubbleOn as _, placeBubble as v, pointerWasLast as y, portalTarget as b, restTimer as x, trackInputModality as S } from "@glimstone/core";
3
+ // src/tipBubble.ts
4
+ function C(e, n = () => !1, { kind: r = "tip", shortcut: i = () => void 0 } = {}) {
5
+ let a = d(!1), o = x(r), s = f(null), c = f(null), u = h(), p = t(e), m = t(() => !!p.value && a.value);
6
+ g(n, () => a.value = !1), S();
7
+ let b = () => {
8
+ p.value && o.rest(() => a.value = !0);
9
+ }, C = () => {
10
+ o.cancel(), o.closed(a.value), a.value = !1;
11
+ }, w;
12
+ return g(m, (e) => {
13
+ w?.(), w = void 0, e && (s.value && c.value && v(s.value, c.value), w = _(C));
14
+ }, { flush: "post" }), l(() => {
15
+ w?.(), o.cancel();
16
+ }), {
17
+ trigger: s,
18
+ bubble: c,
19
+ id: u,
20
+ text: p,
21
+ shown: m,
22
+ kind: r,
23
+ shortcut: t(i),
24
+ describedBy: t(() => m.value ? u : void 0),
25
+ show: b,
26
+ hide: C,
27
+ showOnFocus: () => {
28
+ p.value && !y() && (a.value = !0);
29
+ }
30
+ };
31
+ }
32
+ // src/TipBubble.vue?vue&type=script&setup=true&lang.ts
33
+ var w = ["id"], T = {
34
+ key: 0,
35
+ class: "glim-bubble-key"
36
+ }, E = /* @__PURE__ */ o({
37
+ __name: "TipBubble",
38
+ props: { state: {} },
39
+ setup(t) {
40
+ return (o, s) => (u(), n(e, { to: m(b)() }, [t.state.shown.value ? (u(), i("div", {
41
+ key: 0,
42
+ ref: (e) => t.state.bubble.value = e,
43
+ id: t.state.id,
44
+ role: "tooltip",
45
+ class: c([
46
+ "glim-bubble",
47
+ "glim-fade",
48
+ `glim-bubble--${t.state.kind}`
49
+ ])
50
+ }, [a(p(t.state.text.value), 1), t.state.shortcut.value ? (u(), i("kbd", T, p(t.state.shortcut.value), 1)) : r("", !0)], 10, w)) : r("", !0)], 8, ["to"]));
51
+ }
52
+ }), D = (e, { slots: t }) => e.on ? s("span", {
53
+ class: "glim-tip-wrap",
54
+ onMouseenter: e.show,
55
+ onMouseleave: e.hide
56
+ }, t.default?.()) : t.default?.();
57
+ D.props = [
58
+ "on",
59
+ "show",
60
+ "hide"
61
+ ];
62
+ export { E as n, C as r, D as t };
@@ -1,6 +1,8 @@
1
1
  import { type ToastAction, type ToastSeverity } from "@glimstone/core";
2
2
  type __VLS_Props = {
3
3
  id: string;
4
+ /** A short first line; the message then reads as its description. */
5
+ title?: string;
4
6
  message: string;
5
7
  severity: ToastSeverity;
6
8
  /** A button such as Undo. A press runs it and dismisses the toast. */