@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
package/dist/HoverCard.js CHANGED
@@ -1,42 +1,67 @@
1
- import { t as e } from "./selectParts-0e1ib8BL.js";
2
- import { Fragment as t, Teleport as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, mergeProps as l, openBlock as u, ref as d, renderSlot as f, toDisplayString as p, unref as m, useId as h } from "vue";
3
- import { pageDir as g, portalTarget as _ } from "@glimstone/core";
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, mergeProps as c, openBlock as l, ref as u, renderList as d, renderSlot as f, toDisplayString as p, unref as m, useId as h, useSlots as g } from "vue";
2
+ import * as _ from "@zag-js/hover-card";
4
3
  import { normalizeProps as v, useMachine as y } from "@zag-js/vue";
5
- import * as b from "@zag-js/hover-card";
4
+ import { hoverCardFacts as b, pageDir as x, portalTarget as S } from "@glimstone/core";
5
+ import { t as C } from "./selectParts-0e1ib8BL.js";
6
6
  // src/HoverCard.vue?vue&type=script&setup=true&lang.ts
7
- var x = ["href"], S = /* @__PURE__ */ c({
7
+ var w = ["href"], T = {
8
+ key: 0,
9
+ class: "glim-hovercard-head"
10
+ }, E = {
11
+ key: 0,
12
+ class: "glim-hovercard-media"
13
+ }, D = { class: "glim-hovercard-names" }, O = {
14
+ key: 0,
15
+ class: "glim-hovercard-title"
16
+ }, k = {
17
+ key: 1,
18
+ class: "glim-hovercard-meta"
19
+ }, A = {
20
+ key: 1,
21
+ class: "glim-hovercard-facts"
22
+ }, j = { class: "glim-num" }, M = /* @__PURE__ */ s({
8
23
  __name: "HoverCard",
9
24
  props: {
10
25
  label: {},
11
26
  href: {},
12
- openDelay: { default: 600 },
13
- closeDelay: { default: 300 }
27
+ openDelay: { default: 400 },
28
+ closeDelay: { default: 150 },
29
+ title: {},
30
+ meta: {},
31
+ facts: {}
14
32
  },
15
- setup(c) {
16
- let S = c, C = h(), w = y(b.machine, r(() => ({
17
- id: C,
18
- dir: g(),
19
- openDelay: S.openDelay,
20
- closeDelay: S.closeDelay,
33
+ setup(s) {
34
+ let M = s, N = g(), P = h(), F = y(_.machine, n(() => ({
35
+ id: P,
36
+ dir: x(),
37
+ openDelay: M.openDelay,
38
+ closeDelay: M.closeDelay,
21
39
  positioning: {
22
40
  placement: "bottom",
23
41
  gutter: 8
24
42
  }
25
- }))), T = r(() => b.connect(w, v)), E = d(null), D = e(() => T.value.open, E);
26
- return (e, r) => (u(), o(t, null, [s("a", l({
43
+ }))), I = n(() => _.connect(F, v)), L = u(null), R = C(() => I.value.open, L);
44
+ return (n, u) => (l(), a(e, null, [o("a", c({
27
45
  ref_key: "triggerRef",
28
- ref: E,
46
+ ref: L,
29
47
  "data-glim": "HoverCard"
30
- }, T.value.getTriggerProps(), {
31
- href: c.href,
48
+ }, I.value.getTriggerProps(), {
49
+ href: s.href,
32
50
  class: "glim-hovercard-link"
33
- }), p(c.label), 17, x), T.value.open ? (u(), i(n, {
51
+ }), p(s.label), 17, w), I.value.open ? (l(), r(t, {
34
52
  key: 0,
35
- to: m(_)()
36
- }, [s("div", l(T.value.getPositionerProps(), {
37
- style: m(D).style.value,
38
- class: ["glim-hovercard-positioner", m(D).className.value]
39
- }), [s("div", l(T.value.getContentProps(), { class: "glim-hovercard" }), [f(e.$slots, "content")], 16)], 16)], 8, ["to"])) : a("", !0)], 64));
53
+ to: m(S)()
54
+ }, [o("div", c(I.value.getPositionerProps(), {
55
+ style: m(R).style.value,
56
+ class: ["glim-hovercard-positioner", m(R).className.value]
57
+ }), [o("div", c(I.value.getContentProps(), { class: "glim-hovercard" }), [
58
+ N.media || s.title ? (l(), a("div", T, [N.media ? (l(), a("span", E, [f(n.$slots, "media")])) : i("", !0), o("span", D, [s.title ? (l(), a("strong", O, p(s.title), 1)) : i("", !0), s.meta ? (l(), a("span", k, p(s.meta), 1)) : i("", !0)])])) : i("", !0),
59
+ m(b)(s.facts).length ? (l(), a("dl", A, [(l(!0), a(e, null, d(m(b)(s.facts), (e) => (l(), a("div", {
60
+ key: e.label,
61
+ class: "glim-hovercard-fact"
62
+ }, [o("dt", null, p(e.label), 1), o("dd", j, p(e.value), 1)]))), 128))])) : i("", !0),
63
+ f(n.$slots, "content")
64
+ ], 16)], 16)], 8, ["to"])) : i("", !0)], 64));
40
65
  }
41
66
  });
42
- export { S as HoverCard };
67
+ export { M as HoverCard };
@@ -1,3 +1,4 @@
1
+ import { type HoverCardFact } from "@glimstone/core";
1
2
  type __VLS_Props = {
2
3
  /** The link's words. */
3
4
  label: string;
@@ -5,9 +6,16 @@ type __VLS_Props = {
5
6
  /** How long the pointer rests before the card opens, and after it leaves before it closes, in ms. */
6
7
  openDelay?: number;
7
8
  closeDelay?: number;
9
+ /** The head's name. */
10
+ title?: string;
11
+ /** One quiet line under the name, such as an address or a state. */
12
+ meta?: string;
13
+ /** Up to three figures under the head, each a name and a value. */
14
+ facts?: readonly HoverCardFact[];
8
15
  };
9
16
  type __VLS_Slots = {
10
- content(): unknown;
17
+ media?(): unknown;
18
+ content?(): unknown;
11
19
  };
12
20
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
21
  openDelay: number;
@@ -1,13 +1,13 @@
1
- import { t as e } from "./IconTipButton-BLtrZfgN.js";
2
- import { createBlock as t, createElementBlock as n, defineComponent as r, openBlock as i, resolveDynamicComponent as a, withCtx as o } from "vue";
3
- import { takePageHue as s } from "@glimstone/core";
1
+ import { createBlock as e, createElementBlock as t, defineComponent as n, openBlock as r, resolveDynamicComponent as i, withCtx as a } from "vue";
2
+ import { takePageHue as o } from "@glimstone/core";
3
+ import { t as s } from "./IconTipButton-B8kcqxcE.js";
4
4
  // src/IconButton.vue?vue&type=script&setup=true&lang.ts
5
5
  var c = {
6
6
  key: 0,
7
7
  "data-glim": "IconButton",
8
8
  class: "glim-icon-btn-gap",
9
9
  "aria-hidden": "true"
10
- }, l = /* @__PURE__ */ r({
10
+ }, l = /* @__PURE__ */ n({
11
11
  __name: "IconButton",
12
12
  props: {
13
13
  tip: {},
@@ -20,22 +20,22 @@ var c = {
20
20
  absent: { type: Boolean },
21
21
  disabled: { type: Boolean }
22
22
  },
23
- setup(r) {
23
+ setup(n) {
24
24
  function l(e) {
25
- s(e.currentTarget);
25
+ o(e.currentTarget);
26
26
  }
27
- return (s, u) => r.absent ? (i(), n("span", c)) : (i(), t(e, {
27
+ return (o, u) => n.absent ? (r(), t("span", c)) : (r(), e(s, {
28
28
  key: 1,
29
29
  "data-glim": "IconButton",
30
- tip: r.tip,
31
- href: r.href,
32
- "aria-pressed": r.pressed,
33
- disabled: r.disabled,
30
+ tip: n.tip,
31
+ href: n.href,
32
+ "aria-pressed": n.pressed,
33
+ disabled: n.disabled,
34
34
  class: "glim-btn-bare glim-icon-btn",
35
35
  onPointerenter: l,
36
36
  onFocusin: l
37
37
  }, {
38
- default: o(() => [(i(), t(a(r.glyph)))]),
38
+ default: a(() => [(r(), e(i(n.glyph)))]),
39
39
  _: 1
40
40
  }, 8, [
41
41
  "tip",
@@ -0,0 +1,59 @@
1
+ import { Fragment as e, createBlock as t, createElementBlock as n, createVNode as r, defineComponent as i, mergeProps as a, openBlock as o, renderSlot as s, resolveDynamicComponent as c, unref as l, withCtx as u } from "vue";
2
+ import { n as d, r as f, t as p } from "./TipWrap-BZAveG4U.js";
3
+ // src/IconTipButton.vue
4
+ var m = /* @__PURE__ */ i({
5
+ inheritAttrs: !1,
6
+ __name: "IconTipButton",
7
+ props: {
8
+ tip: {},
9
+ shortcut: {},
10
+ disabled: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ href: {},
15
+ type: { default: "button" }
16
+ },
17
+ setup(i) {
18
+ let m = i, h = f(() => m.tip, () => m.disabled, { shortcut: () => m.shortcut });
19
+ return (f, m) => (o(), n(e, null, [r(l(p), {
20
+ on: i.disabled,
21
+ show: l(h).show,
22
+ hide: l(h).hide
23
+ }, {
24
+ default: u(() => [(o(), t(c(i.href && !i.disabled ? "a" : "button"), a({ "data-glim": "IconTipButton" }, f.$attrs, {
25
+ ref: (e) => l(h).trigger.value = e,
26
+ href: i.disabled ? void 0 : i.href,
27
+ type: i.href && !i.disabled ? void 0 : i.type,
28
+ disabled: i.href && !i.disabled ? void 0 : i.disabled,
29
+ "aria-label": i.tip,
30
+ "aria-keyshortcuts": i.shortcut?.trim().replace(/\s+/g, "+"),
31
+ "aria-describedby": l(h).describedBy.value,
32
+ onMouseenter: l(h).show,
33
+ onMouseleave: l(h).hide,
34
+ onFocus: l(h).showOnFocus,
35
+ onBlur: l(h).hide
36
+ }), {
37
+ default: u(() => [s(f.$slots, "default")]),
38
+ _: 3
39
+ }, 16, [
40
+ "href",
41
+ "type",
42
+ "disabled",
43
+ "aria-label",
44
+ "aria-keyshortcuts",
45
+ "aria-describedby",
46
+ "onMouseenter",
47
+ "onMouseleave",
48
+ "onFocus",
49
+ "onBlur"
50
+ ]))]),
51
+ _: 3
52
+ }, 8, [
53
+ "on",
54
+ "show",
55
+ "hide"
56
+ ]), r(d, { state: l(h) }, null, 8, ["state"])], 64));
57
+ }
58
+ });
59
+ export { m as t };
@@ -1,6 +1,9 @@
1
1
  type __VLS_Props = {
2
2
  /** The hover and focus explanation, and the button's `aria-label`. */
3
3
  tip: string;
4
+ /** The keyboard shortcut that does the same, drawn beside the tip and
5
+ * announced as `aria-keyshortcuts`, such as "Ctrl K". */
6
+ shortcut?: string;
4
7
  disabled?: boolean;
5
8
  /** Makes it a link. A disabled one stays a disabled button. */
6
9
  href?: string;
@@ -13,8 +16,8 @@ declare const __VLS_template: () => {
13
16
  };
14
17
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
15
18
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
- disabled: boolean;
17
19
  type: "button" | "submit";
20
+ disabled: boolean;
18
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
22
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
23
  declare const _default: typeof __VLS_export;
@@ -9,8 +9,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
9
9
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
10
  "onUpdate:autoUpdate"?: ((value: boolean | undefined) => any) | undefined;
11
11
  }>, {
12
- openUrl: (url: string) => void;
13
12
  updating: boolean;
13
+ openUrl: (url: string) => void;
14
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const _default: typeof __VLS_export;
16
16
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { type ListRowStatus } from "@glimstone/core";
2
+ import type { ListRowAction, ListRowMenu } from "./windowParts";
1
3
  type __VLS_Props = {
2
4
  name: string;
3
5
  /** More about the row, drawn as an "(i)" beside the name. */
@@ -6,14 +8,23 @@ type __VLS_Props = {
6
8
  mono?: boolean;
7
9
  /** A quiet line under the name, such as when it was made or where it comes from. */
8
10
  meta?: string;
9
- /** Keeps the buttons in view at rest, for a short list of the person's own things, where each row's buttons are the point. */
11
+ /** Lets the buttons drop under the name where the row is narrow, for a short list of the person's own things, where each row's buttons are the point. */
10
12
  steady?: boolean;
13
+ /** A row that differs from the rest, as a mark in the state colour with
14
+ * neutral words. The normal case passes nothing and stays quiet. */
15
+ status?: ListRowStatus;
16
+ /** The one action the row keeps in view, such as Run, as a quiet button. */
17
+ action?: ListRowAction;
18
+ /** Every other action, such as pause, edit and delete, in the menu of the More button at the row's end. */
19
+ menu?: ListRowMenu;
11
20
  };
12
21
  declare const __VLS_template: () => {
13
22
  __VLS_Slots: {
14
23
  tile?: (props: {}) => any;
15
24
  } & {
16
25
  badges?: (props: {}) => any;
26
+ } & {
27
+ value?: (props: {}) => any;
17
28
  } & {
18
29
  actions?: (props: {}) => any;
19
30
  };
@@ -10,6 +10,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
10
10
  /** The columns the search looks in; the first column by default. */
11
11
  search?: readonly string[];
12
12
  text: ListTableText;
13
+ /** Puts the rows in sections, one per value, such as the instance a row
14
+ * comes from, each under that value as a plain title in the one card. */
15
+ section?: (row: T) => string;
16
+ /** Draws every row on one line, leaving out the columns' `sub` lines. */
17
+ oneLine?: boolean;
13
18
  } & {
14
19
  onSelect?: ((rows: T[]) => any) | undefined;
15
20
  onOpen?: ((row: T) => any) | undefined;
@@ -23,6 +28,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
23
28
  row: T;
24
29
  column: ListColumn;
25
30
  }) => any;
31
+ } & {
32
+ cell?: (props: {
33
+ row: T;
34
+ column: ListColumn;
35
+ }) => any;
26
36
  };
27
37
  emit: ((evt: "select", rows: T[]) => void) & ((evt: "open", row: T) => void);
28
38
  }>) => import("vue").VNode & {
package/dist/Marquee.js CHANGED
@@ -1,14 +1,14 @@
1
- import { t as e } from "./IconButton-D5YOChZI.js";
2
- import { f as t, m 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, mergeProps as l, openBlock as u, ref as d, renderList as f, renderSlot as p, unref as m, useId as h } from "vue";
1
+ import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, mergeProps as o, openBlock as s, ref as c, renderList as l, renderSlot as u, unref as d, useId as f } from "vue";
2
+ import * as p from "@zag-js/marquee";
3
+ import { normalizeProps as m, useMachine as h } from "@zag-js/vue";
4
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";
5
+ import { t as v } from "./IconButton-DGy1eP0I.js";
6
+ import { g as y, m as b } from "./glyphs-DncaPYo_.js";
7
7
  // src/Marquee.vue?vue&type=script&setup=true&lang.ts
8
8
  var x = {
9
9
  "data-glim": "Marquee",
10
10
  class: "glim-marquee-frame"
11
- }, S = /* @__PURE__ */ c({
11
+ }, S = /* @__PURE__ */ a({
12
12
  __name: "Marquee",
13
13
  props: {
14
14
  label: {},
@@ -20,11 +20,11 @@ var x = {
20
20
  },
21
21
  text: {}
22
22
  },
23
- setup(c) {
24
- let S = c, C = i(() => ({
23
+ setup(a) {
24
+ let S = a, C = t(() => ({
25
25
  ...g,
26
26
  ...S.text
27
- })), w = d(!1), T = h(), E = y(b.machine, i(() => ({
27
+ })), w = c(!1), T = f(), E = h(p.machine, t(() => ({
28
28
  id: T,
29
29
  dir: _(),
30
30
  speed: S.speed,
@@ -33,12 +33,12 @@ var x = {
33
33
  paused: w.value,
34
34
  spacing: "var(--space-10)",
35
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, {
36
+ }))), D = t(() => p.connect(E, m));
37
+ return (t, c) => (s(), n("div", x, [r("div", o(D.value.getRootProps(), { class: "glim-marquee" }), [r("div", o(D.value.getViewportProps(), { class: "glim-marquee-viewport" }), [(s(!0), n(e, null, l(D.value.contentCount, (r) => (s(), n("div", o({ key: r - 1 }, { ref_for: !0 }, D.value.getContentProps({ index: r - 1 }), { class: "glim-marquee-content" }), [(s(!0), n(e, null, l(a.items, (e, r) => (s(), n("div", o({ key: r }, { ref_for: !0 }, D.value.getItemProps(), { class: "glim-marquee-item" }), [u(t.$slots, "item", { item: e })], 16))), 128))], 16))), 128))], 16)], 16), i(v, {
38
38
  tip: w.value ? C.value.resume : C.value.pause,
39
- glyph: w.value ? m(n) : m(t),
39
+ glyph: w.value ? d(y) : d(b),
40
40
  pressed: w.value,
41
- onClick: d[0] ||= (e) => w.value = !w.value
41
+ onClick: c[0] ||= (e) => w.value = !w.value
42
42
  }, null, 8, [
43
43
  "tip",
44
44
  "glyph",
@@ -12,12 +12,17 @@ type __VLS_Props = {
12
12
  quiet?: boolean;
13
13
  /** The level in words, such as "120 GB free of 4 TB": read out, and shown in the bubble. */
14
14
  valueText?: string;
15
+ /** The figure beside the track, such as "1.4 / 2 TB". The percentage when left out. */
16
+ figure?: string;
17
+ /** Shows the figure beside the track. On by default for `medium`, off for `small` and `quiet`. */
18
+ showValue?: boolean;
15
19
  };
16
20
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
21
  size: MeterSize;
18
22
  value: number | null;
19
23
  quiet: boolean;
20
24
  threshold: number;
25
+ showValue: boolean;
21
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
27
  declare const _default: typeof __VLS_export;
23
28
  export default _default;
@@ -1,20 +1,21 @@
1
- import { r as e } from "./fieldName-DBygJJfe.js";
2
- import { a as t, i as n, s as r } from "./glyphs-CS3VBARx.js";
3
- import { Fragment as i, Teleport as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeModels as p, mergeProps as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, useId as b, useModel as x } from "vue";
4
- import { MULTI_SELECT_SEARCH_AFTER as S, MULTI_SELECT_TEXT as C, multiSelectMatches as w, multiSelectSearches as T, multiSelectWithout as E, pageDir as D, portalTarget as O } from "@glimstone/core";
5
- import { normalizeProps as k, useMachine as A } from "@zag-js/vue";
6
- import * as j from "@zag-js/combobox";
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, unref as h, useId as g, useModel as _ } from "vue";
2
+ import { MULTI_SELECT_SEARCH_AFTER as v, MULTI_SELECT_TEXT as y, multiSelectMatches as b, multiSelectSearches as x, multiSelectWithout as S, pageDir as C, portalTarget as w } from "@glimstone/core";
3
+ import * as T from "@zag-js/combobox";
4
+ import { normalizeProps as E, useMachine as D } from "@zag-js/vue";
5
+ import { r as O } from "./fieldName-DBygJJfe.js";
6
+ import { c as k, i as A, o as j } from "./glyphs-DncaPYo_.js";
7
+ import { t as M } from "./SearchHit-Ch6ef2dk.js";
7
8
  // src/MultiSelect.vue?vue&type=script&setup=true&lang.ts
8
- var M = { class: "glim-tag" }, N = { class: "glim-tag-text" }, P = [
9
+ var N = { class: "glim-tag" }, P = { class: "glim-tag-text" }, F = [
9
10
  "disabled",
10
11
  "aria-label",
11
12
  "onClick"
12
- ], F = ["readonly", "placeholder"], I = ["aria-label"], L = ["data-state"], R = {
13
+ ], I = ["readonly", "placeholder"], L = ["aria-label"], R = ["data-state"], z = {
13
14
  key: 0,
14
15
  class: "glim-select-empty"
15
- }, z = /* @__PURE__ */ f({
16
+ }, B = ["data-search"], V = /* @__PURE__ */ c({
16
17
  __name: "MultiSelect",
17
- props: /*@__PURE__*/ p({
18
+ props: /*@__PURE__*/ l({
18
19
  label: {},
19
20
  hideLabel: {
20
21
  type: Boolean,
@@ -33,22 +34,22 @@ var M = { class: "glim-tag" }, N = { class: "glim-tag-text" }, P = [
33
34
  modelModifiers: {}
34
35
  }),
35
36
  emits: ["update:modelValue"],
36
- setup(f) {
37
- let p = f, z = x(f, "modelValue"), B = e(() => p.label), V = o(() => ({
38
- ...C,
39
- ...p.text
40
- })), H = o(() => T(p.options.length, p.searchAfter ?? S)), U = g(""), W = o(() => H.value ? w(p.options, U.value) : p.options), G = g(null), K = b(), q = A(j.machine, o(() => ({
41
- id: K,
42
- dir: D(),
43
- collection: j.collection({
44
- items: W.value,
37
+ setup(c) {
38
+ let l = c, V = _(c, "modelValue"), H = O(() => l.label), U = n(() => ({
39
+ ...y,
40
+ ...l.text
41
+ })), W = n(() => x(l.options.length, l.searchAfter ?? v)), G = f(""), K = n(() => W.value ? b(l.options, G.value) : l.options), q = f(null), J = g(), Y = D(T.machine, n(() => ({
42
+ id: J,
43
+ dir: C(),
44
+ collection: T.collection({
45
+ items: K.value,
45
46
  itemToValue: (e) => e.value,
46
47
  itemToString: (e) => e.label,
47
48
  isItemDisabled: (e) => !!e.disabled
48
49
  }),
49
- value: z.value,
50
+ value: V.value,
50
51
  multiple: !0,
51
- disabled: p.disabled,
52
+ disabled: l.disabled,
52
53
  openOnClick: !0,
53
54
  selectionBehavior: "clear",
54
55
  positioning: {
@@ -56,54 +57,57 @@ var M = { class: "glim-tag" }, N = { class: "glim-tag-text" }, P = [
56
57
  gutter: 6
57
58
  },
58
59
  onOpenChange: ({ open: e }) => {
59
- e || (U.value = "");
60
+ e || (G.value = "");
60
61
  },
61
- onInputValueChange: ({ inputValue: e }) => U.value = e,
62
- onValueChange: (e) => z.value = e.value
63
- }))), J = o(() => j.connect(q, k)), Y = (e) => p.options.find((t) => t.value === e)?.label ?? e, X = o(() => {
64
- let { onKeydown: e, ...t } = J.value.getInputProps();
62
+ onInputValueChange: ({ inputValue: e }) => G.value = e,
63
+ onValueChange: (e) => V.value = e.value
64
+ }))), X = n(() => T.connect(Y, E)), Z = (e) => l.options.find((t) => t.value === e)?.label ?? e, Q = n(() => {
65
+ let { onKeydown: e, ...t } = X.value.getInputProps();
65
66
  return {
66
67
  rest: t,
67
68
  onKeydown: e
68
69
  };
69
- }), Z = o(() => z.value.length === 0 ? p.placeholder : H.value ? V.value.search : void 0);
70
- function Q(e) {
71
- e.key === "Backspace" && J.value.inputValue === "" && z.value.length > 0 ? (e.preventDefault(), z.value = z.value.slice(0, -1)) : !H.value && e.key === " " ? (e.preventDefault(), J.value.open ? J.value.highlightedValue && J.value.selectValue(J.value.highlightedValue) : J.value.setOpen(!0)) : X.value.onKeydown?.(e);
70
+ }), $ = n(() => V.value.length === 0 ? l.placeholder : W.value ? U.value.search : void 0);
71
+ function ee(e) {
72
+ e.key === "Backspace" && X.value.inputValue === "" && V.value.length > 0 ? (e.preventDefault(), V.value = V.value.slice(0, -1)) : !W.value && e.key === " " ? (e.preventDefault(), X.value.open ? X.value.highlightedValue && X.value.selectValue(X.value.highlightedValue) : X.value.setOpen(!0)) : Q.value.onKeydown?.(e);
72
73
  }
73
- function $(e) {
74
- z.value = E(z.value, e), G.value?.focus();
74
+ function te(e) {
75
+ V.value = S(V.value, e), q.value?.focus();
75
76
  }
76
- return (e, o) => (h(), l("div", m({ "data-glim": "MultiSelect" }, J.value.getRootProps(), { class: "glim-tags" }), [
77
- u("label", m(J.value.getLabelProps(), { class: f.hideLabel || f.label === void 0 ? "glim-sr-only" : "glim-field-label" }), v(y(B)), 17),
78
- u("div", m(J.value.getControlProps(), { class: H.value ? "glim-tags-control" : "glim-tags-control glim-tags-control--pick" }), [
79
- (h(!0), l(i, null, _(z.value, (e) => (h(), l("span", {
77
+ return (n, l) => (d(), a("div", u({ "data-glim": "MultiSelect" }, X.value.getRootProps(), { class: "glim-tags" }), [
78
+ o("label", u(X.value.getLabelProps(), { class: c.hideLabel || c.label === void 0 ? "glim-sr-only" : "glim-field-label" }), m(h(H)), 17),
79
+ o("div", u(X.value.getControlProps(), { class: W.value ? "glim-tags-control" : "glim-tags-control glim-tags-control--pick" }), [
80
+ (d(!0), a(e, null, p(V.value, (e) => (d(), a("span", {
80
81
  key: e,
81
82
  class: "glim-tag-item"
82
- }, [u("span", M, [u("span", N, v(Y(e)), 1), u("button", {
83
+ }, [o("span", N, [o("span", P, m(Z(e)), 1), o("button", {
83
84
  type: "button",
84
- disabled: f.disabled,
85
- "aria-label": V.value.remove(Y(e)),
85
+ disabled: c.disabled,
86
+ "aria-label": U.value.remove(Z(e)),
86
87
  class: "glim-tag-remove",
87
- onClick: (t) => $(e)
88
- }, [d(y(t))], 8, P)])]))), 128)),
89
- u("input", m(X.value.rest, {
88
+ onClick: (t) => te(e)
89
+ }, [s(h(j))], 8, F)])]))), 128)),
90
+ o("input", u(Q.value.rest, {
90
91
  ref_key: "field",
91
- ref: G,
92
- readonly: !H.value,
93
- placeholder: Z.value,
92
+ ref: q,
93
+ readonly: !W.value,
94
+ placeholder: $.value,
94
95
  class: "glim-tags-input",
95
- onKeydown: Q
96
- }), null, 16, F),
97
- u("button", m(J.value.getTriggerProps(), {
98
- "aria-label": V.value.toggle,
96
+ onKeydown: ee
97
+ }), null, 16, I),
98
+ o("button", u(X.value.getTriggerProps(), {
99
+ "aria-label": U.value.toggle,
99
100
  class: "glim-combobox-toggle"
100
- }), [u("span", {
101
+ }), [o("span", {
101
102
  class: "glim-select-indicator",
102
- "data-state": J.value.open ? "open" : "closed"
103
- }, [d(y(r))], 8, L)], 16, I)
103
+ "data-state": X.value.open ? "open" : "closed"
104
+ }, [s(h(k))], 8, R)], 16, L)
104
105
  ], 16),
105
- (h(), s(a, { to: y(O)() }, [u("div", m(J.value.getPositionerProps(), { class: "glim-select-positioner" }), [u("ul", m(J.value.getContentProps(), { class: "glim-select-content" }), [W.value.length === 0 ? (h(), l("li", R, v(V.value.empty), 1)) : c("", !0), (h(!0), l(i, null, _(W.value, (e) => (h(), l("li", m({ key: e.value }, { ref_for: !0 }, J.value.getItemProps({ item: e }), { class: "glim-select-item" }), [u("span", m({ ref_for: !0 }, J.value.getItemTextProps({ item: e })), v(e.label), 17), u("span", m({ ref_for: !0 }, J.value.getItemIndicatorProps({ item: e }), { class: "glim-select-check" }), [d(y(n))], 16)], 16))), 128))], 16)], 16)], 8, ["to"]))
106
+ (d(), r(t, { to: h(w)() }, [o("div", u(X.value.getPositionerProps(), { class: "glim-select-positioner" }), [o("ul", u(X.value.getContentProps(), { class: "glim-select-content" }), [K.value.length === 0 ? (d(), a("li", z, m(U.value.empty), 1)) : i("", !0), (d(!0), a(e, null, p(K.value, (e) => (d(), a("li", u({ key: e.value }, { ref_for: !0 }, X.value.getItemProps({ item: e }), { class: "glim-select-item" }), [o("span", u({ ref_for: !0 }, X.value.getItemTextProps({ item: e }), { "data-search": W.value && G.value ? "" : void 0 }), [s(M, {
107
+ label: e.label,
108
+ query: W.value ? G.value : ""
109
+ }, null, 8, ["label", "query"])], 16, B), o("span", u({ ref_for: !0 }, X.value.getItemIndicatorProps({ item: e }), { class: "glim-select-check" }), [s(h(A))], 16)], 16))), 128))], 16)], 16)], 8, ["to"]))
106
110
  ], 16));
107
111
  }
108
112
  });
109
- export { z as MultiSelect };
113
+ export { V as MultiSelect };