@bridge-ui/vue 0.0.1-beta.6 → 0.0.1-beta.7

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 (29) hide show
  1. package/dist/Components/List/composables/useList.js +1 -1
  2. package/dist/Components/ListItem/composables/useListItem.js +7 -7
  3. package/dist/Components/ListSection/composables/useListSection.js +2 -2
  4. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +73 -61
  5. package/dist/Components/Listbox/composables/useListbox.d.ts +0 -5
  6. package/dist/Components/Listbox/composables/useListbox.js +10 -19
  7. package/dist/Components/Listbox/listbox.types.d.ts +2 -2
  8. package/dist/Components/Menu/composables/useMenu.js +1 -1
  9. package/dist/Components/Progress/Progress.js +5 -0
  10. package/dist/Components/Progress/Progress.vue.d.ts +4 -0
  11. package/dist/Components/Progress/Progress.vue_vue_type_script_setup_true_lang.js +32 -0
  12. package/dist/Components/Progress/composables/useProgress.d.ts +29 -0
  13. package/dist/Components/Progress/composables/useProgress.js +75 -0
  14. package/dist/Components/Progress/index.d.ts +3 -0
  15. package/dist/Components/Progress/index.js +3 -0
  16. package/dist/Components/Progress/progress.types.d.ts +94 -0
  17. package/dist/Components/Spinner/Spinner.js +5 -0
  18. package/dist/Components/Spinner/Spinner.vue.d.ts +4 -0
  19. package/dist/Components/Spinner/Spinner.vue_vue_type_script_setup_true_lang.js +31 -0
  20. package/dist/Components/Spinner/composables/useSpinner.d.ts +58 -0
  21. package/dist/Components/Spinner/composables/useSpinner.js +97 -0
  22. package/dist/Components/Spinner/index.d.ts +3 -0
  23. package/dist/Components/Spinner/index.js +3 -0
  24. package/dist/Components/Spinner/spinner.types.d.ts +99 -0
  25. package/dist/augments.d.ts +10 -0
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.js +29 -25
  28. package/dist/theme.css +46 -3
  29. package/package.json +2 -2
@@ -30,7 +30,7 @@ function f(f) {
30
30
  return {
31
31
  merged: h,
32
32
  rootBind: i(() => e(_.value?.root, y.value, l({
33
- "m-0 list-none py-2": !0,
33
+ "m-0 list-none py-2 text-dark-900 dark:text-dark-100": !0,
34
34
  "pl-4": h.value.nested,
35
35
  [s(v.value, "root") ?? ""]: !0
36
36
  })))
@@ -56,7 +56,7 @@ function C(t, n, C) {
56
56
  }), B = l(() => "dense" in (u()?.vnode.props ?? {}) ? t.dense === !0 : t.dense === !0 ? !0 : T ? p(T).dense : !1), V = l(() => e(C, "primary") || e(C, "default") || !!k.value.primary), H = l(() => e(C, "secondary") || !!k.value.secondary), U = l(() => e(C, "start")), W = l(() => P.value ? !F.value || !j.value?.showCheckmark ? null : x : !k.value.selected || _(k.value.selectedIcon) ? null : k.value.selectedIcon ?? x), G = l(() => e(C, "end") || W.value != null), K = l(() => v(O.value.inheritedAttrs, [])), q = l(() => r(R.value?.root, K.value, {
57
57
  class: y({
58
58
  "list-none": !0,
59
- "border-b border-black/10 last:border-b-0": k.value.divider,
59
+ "border-b border-black/10 last:border-b-0 dark:border-white/10": k.value.divider,
60
60
  [g(z.value, "root") ?? ""]: !0
61
61
  }),
62
62
  id: P.value && j.value?.listboxId && I.value >= 0 ? s(j.value.listboxId, I.value) : void 0
@@ -73,13 +73,13 @@ function C(t, n, C) {
73
73
  M.value && j.value?.onSelect(M.value);
74
74
  } : void 0,
75
75
  class: y({
76
- "flex w-full min-w-0 items-center gap-x-3 text-left outline-hidden transition-colors": !0,
76
+ "flex w-full min-w-0 items-center gap-x-3 text-left text-dark-900 outline-hidden transition-colors dark:text-dark-100": !0,
77
77
  "cursor-pointer select-none": !k.value.disabled,
78
78
  "px-4": !0,
79
79
  "py-2": !B.value,
80
80
  "py-1.5": B.value,
81
- "hover:bg-black/5 focus-visible:bg-black/5": !k.value.disabled && !P.value,
82
- "bg-primary-50 text-primary-700": k.value.selected && !P.value,
81
+ "hover:bg-black/5 focus-visible:bg-black/5 dark:hover:bg-white/10 dark:focus-visible:bg-white/10": !k.value.disabled && !P.value,
82
+ "bg-dark-100 font-medium text-dark-900 dark:bg-white/15 dark:text-white": k.value.selected && !P.value,
83
83
  [j.value?.optionSelectedClass ?? ""]: P.value && F.value,
84
84
  [j.value?.mergedClasses.optionSelected ?? ""]: P.value && F.value,
85
85
  [j.value?.optionHighlightedClass ?? ""]: P.value && L.value && !F.value,
@@ -90,17 +90,17 @@ function C(t, n, C) {
90
90
  })
91
91
  }) : null), Y = l(() => y({
92
92
  "flex w-full min-w-0 gap-x-3": !0,
93
- "items-center": !k.value.interactive,
93
+ "items-center text-dark-900 dark:text-dark-100": !k.value.interactive,
94
94
  "px-4": !k.value.interactive,
95
95
  "py-2": !k.value.interactive && !B.value,
96
96
  "py-1.5": !k.value.interactive && B.value
97
97
  })), X = l(() => r(R.value?.start, {}, y({
98
- "flex shrink-0": !0,
98
+ "flex shrink-0 text-dark-600 dark:text-dark-300": !0,
99
99
  [g(z.value, "start") ?? ""]: !0
100
100
  }))), Z = l(() => r(R.value?.content, {}, y({
101
101
  "min-w-0 flex-1": !0,
102
102
  [g(z.value, "content") ?? ""]: !0
103
- }))), Q = l(() => r(R.value?.primary, {}, y("block truncate text-sm font-medium", j.value?.sizeClasses?.primary, g(z.value, "primary")))), $ = l(() => r(R.value?.secondary, {}, y("mt-0.5 block truncate text-xs text-dark-500", j.value?.sizeClasses?.secondary, g(z.value, "secondary"))));
103
+ }))), Q = l(() => r(R.value?.primary, {}, y("block truncate text-sm font-medium", j.value?.sizeClasses?.primary, g(z.value, "primary")))), $ = l(() => r(R.value?.secondary, {}, y("mt-0.5 block truncate text-xs text-dark-500 dark:text-dark-400", j.value?.sizeClasses?.secondary, g(z.value, "secondary"))));
104
104
  return {
105
105
  merged: k,
106
106
  hasEnd: G,
@@ -32,13 +32,13 @@ function m(m, h) {
32
32
  merged: y,
33
33
  rootBind: a(() => t(x.value?.root, T.value, d({
34
34
  "list-none": !0,
35
- "sticky top-0 z-10 bg-white dark:bg-dark-950": y.value.sticky && !E.value,
35
+ "sticky top-0 z-10 bg-white dark:bg-dark-800": y.value.sticky && !E.value,
36
36
  [l(S.value, "root") ?? ""]: !0
37
37
  }))),
38
38
  titleBind: a(() => t(x.value?.title, {}, {
39
39
  role: "presentation",
40
40
  class: d({
41
- "bg-white px-4 text-xs font-semibold tracking-wide text-dark-500 uppercase dark:bg-dark-950 dark:text-dark-400": !0,
41
+ "bg-white px-4 text-xs font-semibold tracking-wide text-dark-500 uppercase dark:bg-dark-800 dark:text-dark-300": !0,
42
42
  "sticky top-0 z-10": y.value.sticky && E.value,
43
43
  "py-2": !C.value,
44
44
  "py-1.5": C.value,
@@ -2,16 +2,17 @@ import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp
2
2
  import n from "../List/List.js";
3
3
  import { useListbox as r } from "./composables/useListbox.js";
4
4
  import { LISTBOX_INJECTION_KEY as i } from "./listboxInjectionKey.js";
5
- import ee from "../ListItem/ListItem.js";
6
- import a from "../ListSection/ListSection.js";
7
- import te from "../Menu/Menu.js";
8
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as ne, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeModels as h, mergeProps as g, normalizeClass as re, normalizeProps as _, openBlock as v, provide as ie, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useModel as T, useSlots as E, watch as D, withCtx as O } from "vue";
9
- import { cn as k, entriesFromListboxOptions as A, flattenListboxOptions as j, mapListboxEntriesToRows as ae } from "@bridge-ui/core";
5
+ import a from "../ListItem/ListItem.js";
6
+ import o from "../ListSection/ListSection.js";
7
+ import s from "../Menu/Menu.js";
8
+ import ee from "../Progress/Progress.js";
9
+ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as te, createVNode as m, defineComponent as h, guardReactiveProps as g, mergeModels as _, mergeProps as v, normalizeClass as y, normalizeProps as b, openBlock as x, provide as S, ref as C, renderList as ne, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, useModel as O, useSlots as k, watch as A, withCtx as j } from "vue";
10
+ import { cn as M, entriesFromListboxOptions as re, flattenListboxOptions as ie, mapListboxEntriesToRows as ae } from "@bridge-ui/core";
10
11
  import { Check as oe } from "@lucide/vue";
11
12
  //#region src/Components/Listbox/Listbox.vue?vue&type=script&setup=true&lang.ts
12
- var se = { key: 1 }, M = /* @__PURE__ */ p({
13
+ var se = { key: 1 }, N = /* @__PURE__ */ h({
13
14
  __name: "Listbox",
14
- props: /* @__PURE__ */ h({
15
+ props: /* @__PURE__ */ _({
15
16
  anchorEl: {},
16
17
  classes: {},
17
18
  color: { default: "primary" },
@@ -56,96 +57,107 @@ var se = { key: 1 }, M = /* @__PURE__ */ p({
56
57
  },
57
58
  modelModifiers: {}
58
59
  }),
59
- emits: /* @__PURE__ */ h([
60
+ emits: /* @__PURE__ */ _([
60
61
  "registered-options-change",
61
62
  "select",
62
63
  "show-change"
63
64
  ], ["update:modelValue"]),
64
- setup(p, { emit: h }) {
65
- let M = E(), N = h, P = T(p, "modelValue");
66
- D(P, (e) => {
67
- N("show-change", e);
65
+ setup(h, { emit: _ }) {
66
+ let N = k(), P = _, F = O(h, "modelValue");
67
+ A(F, (e) => {
68
+ P("show-change", e);
68
69
  });
69
- let F = p, { merged: I, checkClass: L, scrollBind: R, messageBind: z, loadingBind: B, sizeClasses: V, mergedClasses: H, loadingTrackBind: U, optionSelectedClass: W, optionHighlightedClass: G } = r(F, {
70
+ let I = h, { merged: L, checkClass: R, scrollBind: z, messageBind: B, sizeClasses: V, mergedClasses: H, optionSelectedClass: U, optionHighlightedClass: W } = r(I, {
70
71
  size: "md",
71
72
  color: "primary"
72
- }), ce = s(() => F.options ?? []), K = s(() => F.entries ? F.entries : A(ce.value)), q = s(() => j(K.value)), J = s(() => e(M, "default")), Y = s(() => !F.loading && !J.value && q.value.length === 0 && F.hideEmptyMessage !== !0), X = s(() => k(L.value, H.value.check)), Z = y([]);
73
+ }), G = l(() => I.options ?? []), K = l(() => I.entries ? I.entries : re(G.value)), q = l(() => ie(K.value)), J = l(() => e(N, "default")), Y = l(() => !I.loading && !J.value && q.value.length === 0 && I.hideEmptyMessage !== !0), X = l(() => M(R.value, H.value.check)), Z = C([]);
73
74
  function Q(e) {
74
- return F.isSelected?.(e) ?? !1;
75
+ return I.isSelected?.(e) ?? !1;
75
76
  }
76
- function le(e) {
77
- return F.highlightedIndex === e;
77
+ function ce(e) {
78
+ return I.highlightedIndex === e;
78
79
  }
79
- function ue(e) {
80
+ function le(e) {
80
81
  e.preventDefault();
81
82
  }
82
- function de(e, t) {
83
+ function ue(e, t) {
83
84
  let n = {
84
85
  tabindex: -1,
85
- onMousedown: ue,
86
- class: k(V.value?.option)
86
+ onMousedown: le,
87
+ class: M(V.value?.option)
87
88
  };
88
- return Q(e.value) ? n.class = k(n.class, W.value, H.value.optionSelected) : le(t) && (n.class = k(n.class, G.value, H.value.optionHighlighted)), {
89
+ return Q(e.value) ? n.class = M(n.class, U.value, H.value.optionSelected) : ce(t) && (n.class = M(n.class, W.value, H.value.optionHighlighted)), {
89
90
  interactive: n,
90
91
  primary: { class: V.value?.primary },
91
92
  secondary: { class: V.value?.secondary }
92
93
  };
93
94
  }
94
95
  function $(e) {
95
- e.disabled || N("select", e);
96
+ e.disabled || P("select", e);
96
97
  }
97
- function fe(e) {
98
+ function de(e) {
98
99
  return Z.value.some((t) => String(t.value) === String(e.value)) || (Z.value = [...Z.value, e]), () => {
99
100
  Z.value = Z.value.filter((t) => String(t.value) !== String(e.value));
100
101
  };
101
102
  }
102
- function pe(e) {
103
+ function fe(e) {
103
104
  return (J.value ? Z.value : q.value).findIndex((t) => String(t.value) === String(e));
104
105
  }
105
- D(Z, (e) => {
106
- J.value && N("registered-options-change", e);
107
- }, { deep: !0 }), ie(i, s(() => ({
108
- getOptionIndex: pe,
109
- registerOption: fe,
106
+ A(Z, (e) => {
107
+ J.value && P("registered-options-change", e);
108
+ }, { deep: !0 }), S(i, l(() => ({
109
+ getOptionIndex: fe,
110
+ registerOption: de,
110
111
  onSelect: $,
111
- listboxId: F.listboxId,
112
+ listboxId: I.listboxId,
112
113
  isSelected: Q,
113
114
  sizeClasses: V.value,
114
- showCheckmark: F.showCheckmark,
115
+ showCheckmark: I.showCheckmark,
115
116
  checkClass: X.value,
116
- highlightedIndex: F.highlightedIndex,
117
- optionSelectedClass: W.value,
118
- optionHighlightedClass: G.value,
117
+ highlightedIndex: I.highlightedIndex,
118
+ optionSelectedClass: U.value,
119
+ optionHighlightedClass: W.value,
119
120
  mergedClasses: {
120
121
  optionSelected: H.value.optionSelected,
121
122
  optionHighlighted: H.value.optionHighlighted
122
123
  }
123
124
  })));
124
- let me = s(() => ae(K.value, Q));
125
- return (r, i) => (v(), c(w(te), {
126
- modelValue: P.value,
127
- "onUpdate:modelValue": i[0] ||= (e) => P.value = e,
128
- "anchor-el": p.anchorEl,
129
- placement: p.placement,
125
+ let pe = l(() => ae(K.value, Q));
126
+ return (r, i) => (x(), u(D(s), {
127
+ modelValue: F.value,
128
+ "onUpdate:modelValue": i[0] ||= (e) => F.value = e,
129
+ "anchor-el": h.anchorEl,
130
+ placement: h.placement,
130
131
  "close-on-click-away": !0,
131
- "disable-auto-focus": p.disableAutoFocus,
132
- "custom-props": { content: w(I).customProps?.content }
132
+ "disable-auto-focus": h.disableAutoFocus,
133
+ "custom-props": { content: D(L).customProps?.content }
133
134
  }, {
134
- default: O(() => [
135
- w(e)(w(M), "beforeOptions") ? (v(), c(S(w(t)(w(M), "beforeOptions")), { key: 0 })) : l("", !0),
136
- p.loading ? (v(), u(o, { key: 1 }, [d("div", _(m(w(U))), [d("div", _(m(w(B))), null, 16)], 16), d("div", _(m(w(z))), [w(e)(w(M), "loading") ? (v(), c(S(w(t)(w(M), "loading")), { key: 0 })) : (v(), u("span", se, C(p.loadingMessage), 1))], 16)], 64)) : (v(), u("div", _(g({ key: 2 }, w(R))), [f(w(n), {
135
+ default: j(() => [
136
+ D(e)(D(N), "beforeOptions") ? (x(), u(T(D(t)(D(N), "beforeOptions")), { key: 0 })) : d("", !0),
137
+ h.loading ? (x(), f(c, { key: 1 }, [m(D(ee), {
138
+ size: "xs",
139
+ "aria-hidden": "",
140
+ class: "shrink-0",
141
+ color: D(L).color,
142
+ classes: { bar: D(H).loading },
143
+ "custom-props": { bar: D(L).customProps?.loading }
144
+ }, null, 8, [
145
+ "color",
146
+ "classes",
147
+ "custom-props"
148
+ ]), p("div", b(g(D(B))), [D(e)(D(N), "loading") ? (x(), u(T(D(t)(D(N), "loading")), { key: 0 })) : (x(), f("span", se, E(h.loadingMessage), 1))], 16)], 64)) : (x(), f("div", b(v({ key: 2 }, D(z))), [m(D(n), {
137
149
  dense: "",
138
150
  class: "p-0",
139
151
  role: "listbox",
140
- id: p.listboxId,
141
- "aria-labelledby": p.labelledBy,
142
- "aria-multiselectable": p.multiple || void 0
152
+ id: h.listboxId,
153
+ "aria-labelledby": h.labelledBy,
154
+ "aria-multiselectable": h.multiple || void 0
143
155
  }, {
144
- default: O(() => [J.value ? x(r.$slots, "default", { key: 0 }) : (v(!0), u(o, { key: 1 }, b(me.value, (t) => (v(), u(o, { key: t.key }, [t.kind === "section" ? (v(), c(w(a), {
156
+ default: j(() => [J.value ? w(r.$slots, "default", { key: 0 }) : (x(!0), f(c, { key: 1 }, ne(pe.value, (t) => (x(), f(c, { key: t.key }, [t.kind === "section" ? (x(), u(D(o), {
145
157
  key: 0,
146
158
  title: t.title,
147
159
  sticky: t.sticky
148
- }, null, 8, ["title", "sticky"])) : (v(), c(w(ee), {
160
+ }, null, 8, ["title", "sticky"])) : (x(), u(D(a), {
149
161
  key: 1,
150
162
  interactive: "",
151
163
  role: "option",
@@ -154,19 +166,19 @@ var se = { key: 1 }, M = /* @__PURE__ */ p({
154
166
  disabled: t.option.disabled,
155
167
  secondary: t.option.description,
156
168
  onClick: (e) => $(t.option),
157
- id: `${p.listboxId}-option-${t.index}`,
158
- "custom-props": de(t.option, t.index),
159
- primary: w(e)(w(M), "option") ? void 0 : t.option.label
160
- }, ne({ _: 2 }, [w(e)(w(M), "option") ? {
169
+ id: `${h.listboxId}-option-${t.index}`,
170
+ "custom-props": ue(t.option, t.index),
171
+ primary: D(e)(D(N), "option") ? void 0 : t.option.label
172
+ }, te({ _: 2 }, [D(e)(D(N), "option") ? {
161
173
  name: "default",
162
- fn: O(() => [x(r.$slots, "option", {
174
+ fn: j(() => [w(r.$slots, "option", {
163
175
  option: t.option,
164
176
  selected: t.selected
165
177
  })]),
166
178
  key: "0"
167
- } : void 0, p.showCheckmark && t.selected ? {
179
+ } : void 0, h.showCheckmark && t.selected ? {
168
180
  name: "end",
169
- fn: O(() => [f(w(oe), { class: re(X.value) }, null, 8, ["class"])]),
181
+ fn: j(() => [m(D(oe), { class: y(X.value) }, null, 8, ["class"])]),
170
182
  key: "1"
171
183
  } : void 0]), 1032, [
172
184
  "aria-selected",
@@ -183,8 +195,8 @@ var se = { key: 1 }, M = /* @__PURE__ */ p({
183
195
  "aria-labelledby",
184
196
  "aria-multiselectable"
185
197
  ])], 16)),
186
- Y.value && !w(e)(w(M), "empty") ? (v(), u("div", _(g({ key: 3 }, w(z))), C(p.emptyMessage), 17)) : Y.value && w(e)(w(M), "empty") ? (v(), c(S(w(t)(w(M), "empty")), { key: 4 })) : l("", !0),
187
- w(e)(w(M), "afterOptions") ? (v(), c(S(w(t)(w(M), "afterOptions")), { key: 5 })) : l("", !0)
198
+ Y.value && !D(e)(D(N), "empty") ? (x(), f("div", b(v({ key: 3 }, D(B))), E(h.emptyMessage), 17)) : Y.value && D(e)(D(N), "empty") ? (x(), u(T(D(t)(D(N), "empty")), { key: 4 })) : d("", !0),
199
+ D(e)(D(N), "afterOptions") ? (x(), u(T(D(t)(D(N), "afterOptions")), { key: 5 })) : d("", !0)
188
200
  ]),
189
201
  _: 3
190
202
  }, 8, [
@@ -197,4 +209,4 @@ var se = { key: 1 }, M = /* @__PURE__ */ p({
197
209
  }
198
210
  });
199
211
  //#endregion
200
- export { M as default };
212
+ export { N as default };
@@ -8,13 +8,8 @@ export declare function useListbox(props: ListboxOwnProps, libDefaults: ListboxL
8
8
  checkClass: import('vue').ComputedRef<string>;
9
9
  scrollBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
10
10
  messageBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
11
- loadingBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
12
11
  sizeClasses: import('vue').ComputedRef<import('@bridge-ui/core').ListboxSizeItem | undefined>;
13
12
  mergedClasses: import('vue').ComputedRef<Partial<ListboxClasses>>;
14
- loadingTrackBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {
15
- role: string;
16
- "aria-hidden": boolean;
17
- }>>;
18
13
  optionSelectedClass: import('vue').ComputedRef<string | undefined>;
19
14
  optionHighlightedClass: import('vue').ComputedRef<string | undefined>;
20
15
  };
@@ -27,33 +27,24 @@ function p(p, m) {
27
27
  }), y = n({
28
28
  entry: v,
29
29
  props: () => g.value.componentProps
30
- }), b = r(() => a(s(l, v.value?.customProps?.color), _.value.color ?? "primary")), x = r(() => s(u, v.value?.customProps?.invalidated)), S = r(() => _.value.invalidated ? x.value : b.value), C = r(() => a(s(d, v.value?.customProps?.size), _.value.size ?? "md")), w = r(() => S.value?.selected), T = r(() => S.value?.highlighted), E = r(() => o(C.value?.check, S.value?.check)), D = r(() => {
31
- let t = _.value.maxHeight ?? "max-h-60", n = _.value.disableMaxHeight === !0;
32
- return e(_.value.customProps?.scroll, {}, o({
33
- "overflow-y-auto overscroll-contain": !n,
34
- [t]: !n,
35
- [y.value.scroll ?? ""]: !0
36
- }));
37
- }), O = r(() => e({}, {
38
- role: "progressbar",
39
- "aria-hidden": !0
40
- }, o({ "h-0.5 w-full shrink-0 overflow-hidden": !0 }))), k = r(() => e(_.value.customProps?.loading, {}, o({
41
- "h-full w-1/3 animate-bridge-listbox-indeterminate": !0,
42
- [b.value?.progressColor ?? ""]: !0,
43
- [y.value.loading ?? ""]: !0
44
- })));
30
+ }), b = r(() => a(s(l, v.value?.customProps?.color), _.value.color ?? "primary")), x = r(() => s(u, v.value?.customProps?.invalidated)), S = r(() => _.value.invalidated ? x.value : b.value), C = r(() => a(s(d, v.value?.customProps?.size), _.value.size ?? "md")), w = r(() => S.value?.selected), T = r(() => S.value?.highlighted);
45
31
  return {
46
32
  merged: _,
47
- checkClass: E,
48
- scrollBind: D,
33
+ checkClass: r(() => o(C.value?.check, S.value?.check)),
34
+ scrollBind: r(() => {
35
+ let t = _.value.maxHeight ?? "max-h-60", n = _.value.disableMaxHeight === !0;
36
+ return e(_.value.customProps?.scroll, {}, o({
37
+ "overflow-y-auto overscroll-contain": !n,
38
+ [t]: !n,
39
+ [y.value.scroll ?? ""]: !0
40
+ }));
41
+ }),
49
42
  messageBind: r(() => e({}, {}, o({
50
43
  "text-gray-500": !0,
51
44
  [C.value?.message ?? ""]: !0
52
45
  }))),
53
- loadingBind: k,
54
46
  sizeClasses: C,
55
47
  mergedClasses: y,
56
- loadingTrackBind: O,
57
48
  optionSelectedClass: w,
58
49
  optionHighlightedClass: T
59
50
  };
@@ -8,7 +8,7 @@ export interface ListboxClasses {
8
8
  */
9
9
  check?: string;
10
10
  /**
11
- * Classes merged onto the indeterminate loading progress bar.
11
+ * Classes forwarded to the loading `Progress` bar.
12
12
  */
13
13
  loading?: string;
14
14
  /**
@@ -30,7 +30,7 @@ export interface ListboxCustomProps {
30
30
  */
31
31
  content?: HTMLAttributes;
32
32
  /**
33
- * Props forwarded to the indeterminate loading progress bar.
33
+ * Props forwarded to the loading `Progress` bar.
34
34
  */
35
35
  loading?: HTMLAttributes;
36
36
  /**
@@ -161,7 +161,7 @@ function y(y, le, b = {}) {
161
161
  style: { zIndex: N.value },
162
162
  "aria-hidden": V.value ? !0 : void 0,
163
163
  class: f({
164
- "bg-white ring-1 ring-black/5 outline-hidden overflow-hidden min-w-32 w-max max-w-[calc(100vw-16px)]": !0,
164
+ "bg-white text-dark-900 dark:bg-dark-800 dark:text-dark-100 ring-1 ring-black/5 dark:ring-white/10 outline-hidden overflow-hidden min-w-32 w-max max-w-[calc(100vw-16px)]": !0,
165
165
  "invisible pointer-events-none": V.value,
166
166
  [de.value ?? ""]: !0,
167
167
  [fe.value ?? ""]: !0,
@@ -0,0 +1,5 @@
1
+ import e from "./Progress.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Progress/Progress.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,4 @@
1
+ import { ProgressOwnProps } from './progress.types';
2
+ declare const __VLS_export: import('vue').DefineComponent<ProgressOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ProgressOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { useProgress as e } from "./composables/useProgress.js";
2
+ import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, guardReactiveProps as a, mergeProps as o, normalizeProps as s, openBlock as c, unref as l } from "vue";
3
+ //#region src/Components/Progress/Progress.vue?vue&type=script&setup=true&lang.ts
4
+ var u = /* @__PURE__ */ i({
5
+ inheritAttrs: !1,
6
+ __name: "Progress",
7
+ props: {
8
+ classes: {},
9
+ color: {},
10
+ customProps: {},
11
+ rounded: {},
12
+ size: {},
13
+ value: {},
14
+ valueBuffer: {},
15
+ variant: {}
16
+ },
17
+ setup(i) {
18
+ let { barBind: u, isBuffer: d, rootBind: f, trackBind: p, bufferBind: m } = e(i, {
19
+ size: "md",
20
+ rounded: "full",
21
+ color: "primary",
22
+ variant: "indeterminate"
23
+ });
24
+ return (e, i) => (c(), n("div", s(a(l(f))), [
25
+ r("div", s(a(l(p))), null, 16),
26
+ l(d) && l(m) ? (c(), n("div", s(o({ key: 0 }, l(m))), null, 16)) : t("", !0),
27
+ r("div", s(a(l(u))), null, 16)
28
+ ], 16));
29
+ }
30
+ });
31
+ //#endregion
32
+ export { u as default };
@@ -0,0 +1,29 @@
1
+ import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
2
+ import { ProgressOwnProps, ProgressProps } from '../progress.types';
3
+ type ProgressLibDefaults = LibDefaultsShape<ProgressOwnProps, "size" | "color" | "rounded" | "variant">;
4
+ type ProgressMerged = MergeLibDefaults<ProgressOwnProps, ProgressLibDefaults>;
5
+ export declare function useProgress(props: ProgressOwnProps, libDefaults: ProgressLibDefaults): {
6
+ merged: import('vue').ComputedRef<ProgressMerged>;
7
+ barBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
8
+ style: {
9
+ width: string;
10
+ };
11
+ } | {
12
+ style?: undefined;
13
+ }>>;
14
+ isBuffer: import('vue').ComputedRef<boolean>;
15
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
16
+ class: string;
17
+ "aria-valuemin"?: number | undefined;
18
+ "aria-valuemax"?: number | undefined;
19
+ "aria-valuenow"?: number | undefined;
20
+ role: string;
21
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<ProgressProps, "color" | "size" | "value" | "classes" | "customProps" | "rounded" | "variant" | "valueBuffer">>>;
22
+ trackBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
23
+ bufferBind: import('vue').ComputedRef<(object & {
24
+ style: {
25
+ width: string;
26
+ };
27
+ } & Record<"class", string>) | null>;
28
+ };
29
+ export {};
@@ -0,0 +1,75 @@
1
+ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
+ import { computed as r, useAttrs as i } from "vue";
3
+ import { get as a, isNil as o } from "es-toolkit/compat";
4
+ import { cn as s, mergeBridgeUILayeredClasses as c, splitComponentProps as l } from "@bridge-ui/core";
5
+ import { colorProps as u, roundedProps as d, sizeProps as f, variantProps as p } from "@bridge-ui/core/Components/Progress";
6
+ //#region src/Components/Progress/composables/useProgress.ts
7
+ var m = [
8
+ "size",
9
+ "color",
10
+ "value",
11
+ "classes",
12
+ "rounded",
13
+ "variant",
14
+ "customProps",
15
+ "valueBuffer"
16
+ ];
17
+ function h(e) {
18
+ return o(e) || Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e));
19
+ }
20
+ function g(o, g) {
21
+ let _ = i(), v = r(() => l({
22
+ props: {
23
+ ..._,
24
+ ...o
25
+ },
26
+ bridgeKeys: m
27
+ })), { merged: y, entry: b } = t({
28
+ libDefaults: g,
29
+ componentName: "Progress",
30
+ props: () => v.value.componentProps
31
+ }), x = n({
32
+ entry: b,
33
+ props: () => v.value.componentProps
34
+ }), S = r(() => y.value.customProps), C = r(() => a(c(u, b.value?.customProps?.color), y.value.color)), w = r(() => a(c(f, b.value?.customProps?.size), y.value.size)), T = r(() => a(c(d, b.value?.customProps?.rounded), y.value.rounded)), E = r(() => a(c(p, b.value?.customProps?.variant), y.value.variant)), D = r(() => y.value.variant === "buffer"), O = r(() => y.value.variant === "determinate" || y.value.variant === "buffer"), k = r(() => y.value.variant === "indeterminate" || y.value.variant === "query"), A = r(() => h(y.value.value)), j = r(() => h(y.value.valueBuffer)), M = r(() => e(S.value?.root, v.value.inheritedAttrs, {
35
+ role: "progressbar",
36
+ ...O.value ? {
37
+ "aria-valuemin": 0,
38
+ "aria-valuemax": 100,
39
+ "aria-valuenow": A.value
40
+ } : {},
41
+ class: s({
42
+ "relative w-full overflow-hidden": !0,
43
+ [w.value ?? ""]: !0,
44
+ [T.value ?? ""]: !0,
45
+ [x.value.root ?? ""]: !0
46
+ })
47
+ })), N = r(() => e(S.value?.track, {}, s({
48
+ "absolute inset-0": !0,
49
+ [C.value?.track ?? ""]: !0,
50
+ [T.value ?? ""]: !0,
51
+ [x.value.track ?? ""]: !0
52
+ }))), P = r(() => D.value ? e(S.value?.buffer, { style: { width: `${j.value}%` } }, s({
53
+ "absolute top-0 left-0 h-full transition-[width] duration-200 ease-linear": !0,
54
+ [C.value?.buffer ?? ""]: !0,
55
+ [T.value ?? ""]: !0,
56
+ [x.value.buffer ?? ""]: !0
57
+ })) : null);
58
+ return {
59
+ merged: y,
60
+ barBind: r(() => e(S.value?.bar, O.value ? { style: { width: `${A.value}%` } } : {}, s({
61
+ "absolute top-0 left-0 h-full": !0,
62
+ "transition-[width] duration-200 ease-linear": O.value,
63
+ [E.value ?? ""]: k.value,
64
+ [C.value?.bar ?? ""]: !0,
65
+ [T.value ?? ""]: !0,
66
+ [x.value.bar ?? ""]: !0
67
+ }))),
68
+ isBuffer: D,
69
+ rootBind: M,
70
+ trackBind: N,
71
+ bufferBind: P
72
+ };
73
+ }
74
+ //#endregion
75
+ export { g as useProgress };
@@ -0,0 +1,3 @@
1
+ export { useProgress } from './composables/useProgress';
2
+ export type { ProgressClasses, ProgressColorOverrides, ProgressCustomProps, ProgressOwnProps, ProgressProps, ProgressRoundedOverrides, ProgressSizeOverrides, ProgressVariantOverrides, } from './progress.types';
3
+ export { default as Progress } from './Progress.vue';
@@ -0,0 +1,3 @@
1
+ import { useProgress as e } from "./composables/useProgress.js";
2
+ import t from "./Progress.js";
3
+ export { t as Progress, e as useProgress };
@@ -0,0 +1,94 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ import { MergeHtmlProps, MergeProps, ProgressColor, ProgressRounded, ProgressSize, ProgressVariant } from '@bridge-ui/core';
3
+ export interface ProgressSizeOverrides {}
4
+ export interface ProgressColorOverrides {}
5
+ export interface ProgressRoundedOverrides {}
6
+ export interface ProgressVariantOverrides {}
7
+ export interface ProgressClasses {
8
+ /**
9
+ * The classes to apply to the primary progress bar.
10
+ */
11
+ bar?: string;
12
+ /**
13
+ * The classes to apply to the buffer bar.
14
+ */
15
+ buffer?: string;
16
+ /**
17
+ * The classes to apply to the root.
18
+ */
19
+ root?: string;
20
+ /**
21
+ * The classes to apply to the track.
22
+ */
23
+ track?: string;
24
+ }
25
+ export interface ProgressCustomProps {
26
+ /**
27
+ * Props forwarded to the primary progress bar.
28
+ */
29
+ bar?: HTMLAttributes;
30
+ /**
31
+ * Props forwarded to the buffer bar.
32
+ */
33
+ buffer?: HTMLAttributes;
34
+ /**
35
+ * Props forwarded to the root element.
36
+ */
37
+ root?: HTMLAttributes;
38
+ /**
39
+ * Props forwarded to the track element.
40
+ */
41
+ track?: HTMLAttributes;
42
+ }
43
+ export interface ProgressOwnProps {
44
+ /**
45
+ * The classes to apply to progress parts.
46
+ *
47
+ * @default undefined
48
+ */
49
+ classes?: ProgressClasses;
50
+ /**
51
+ * The color of the progress indicator.
52
+ *
53
+ * @default "primary"
54
+ */
55
+ color?: MergeProps<ProgressColor, ProgressColorOverrides>;
56
+ /**
57
+ * Extra props for internal parts (`root`, `track`, `bar`, `buffer`).
58
+ * Root HTML attributes stay on the component top level.
59
+ *
60
+ * @default undefined
61
+ */
62
+ customProps?: ProgressCustomProps;
63
+ /**
64
+ * The roundedness of the progress bar.
65
+ *
66
+ * @default "full"
67
+ */
68
+ rounded?: MergeProps<ProgressRounded, ProgressRoundedOverrides>;
69
+ /**
70
+ * The height size of the progress bar.
71
+ *
72
+ * @default "md"
73
+ */
74
+ size?: MergeProps<ProgressSize, ProgressSizeOverrides>;
75
+ /**
76
+ * Progress value from 0 to 100. Used by `determinate` and `buffer` variants.
77
+ *
78
+ * @default undefined
79
+ */
80
+ value?: number;
81
+ /**
82
+ * Buffer value from 0 to 100. Used by the `buffer` variant; should be ≥ `value`.
83
+ *
84
+ * @default undefined
85
+ */
86
+ valueBuffer?: number;
87
+ /**
88
+ * Visual variant of the progress indicator.
89
+ *
90
+ * @default "indeterminate"
91
+ */
92
+ variant?: MergeProps<ProgressVariant, ProgressVariantOverrides>;
93
+ }
94
+ export type ProgressProps = MergeHtmlProps<ProgressOwnProps, HTMLAttributes>;
@@ -0,0 +1,5 @@
1
+ import e from "./Spinner.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Spinner/Spinner.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,4 @@
1
+ import { SpinnerOwnProps } from './spinner.types';
2
+ declare const __VLS_export: import('vue').DefineComponent<SpinnerOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpinnerOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { useSpinner as e } from "./composables/useSpinner.js";
2
+ import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, guardReactiveProps as a, mergeProps as o, normalizeProps as s, openBlock as c, unref as l } from "vue";
3
+ //#region src/Components/Spinner/Spinner.vue?vue&type=script&setup=true&lang.ts
4
+ var u = /* @__PURE__ */ i({
5
+ inheritAttrs: !1,
6
+ __name: "Spinner",
7
+ props: {
8
+ classes: {},
9
+ color: {},
10
+ customProps: {},
11
+ disableShrink: { type: Boolean },
12
+ enableTrack: { type: Boolean },
13
+ size: {},
14
+ thickness: {},
15
+ value: {},
16
+ variant: {}
17
+ },
18
+ setup(i) {
19
+ let { svgBind: u, rootBind: d, trackBind: f, circleBind: p, enableTrack: m } = e(i, {
20
+ size: "md",
21
+ thickness: 3.6,
22
+ color: "primary",
23
+ enableTrack: !1,
24
+ disableShrink: !1,
25
+ variant: "indeterminate"
26
+ });
27
+ return (e, i) => (c(), n("span", s(a(l(d))), [(c(), n("svg", s(a(l(u))), [l(m) && l(f) ? (c(), n("circle", s(o({ key: 0 }, l(f))), null, 16)) : t("", !0), r("circle", s(a(l(p))), null, 16)], 16))], 16));
28
+ }
29
+ });
30
+ //#endregion
31
+ export { u as default };
@@ -0,0 +1,58 @@
1
+ import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
2
+ import { SpinnerOwnProps, SpinnerProps } from '../spinner.types';
3
+ type SpinnerLibDefaults = LibDefaultsShape<SpinnerOwnProps, "size" | "color" | "variant" | "thickness" | "enableTrack" | "disableShrink">;
4
+ type SpinnerMerged = MergeLibDefaults<SpinnerOwnProps, SpinnerLibDefaults>;
5
+ export declare function useSpinner(props: SpinnerOwnProps, libDefaults: SpinnerLibDefaults): {
6
+ merged: import('vue').ComputedRef<SpinnerMerged>;
7
+ svgBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').SVGAttributes | undefined, {
8
+ viewBox: string;
9
+ }>>;
10
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
11
+ class: string;
12
+ "aria-valuemin"?: number | undefined;
13
+ "aria-valuemax"?: number | undefined;
14
+ "aria-valuenow"?: number | undefined;
15
+ role: string;
16
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<SpinnerProps, "color" | "size" | "value" | "classes" | "customProps" | "variant" | "disableShrink" | "enableTrack" | "thickness">>>;
17
+ trackBind: import('vue').ComputedRef<(object & {
18
+ cx: number;
19
+ cy: number;
20
+ fill: string;
21
+ r: number;
22
+ "stroke-width": number;
23
+ } & Record<"class", string>) | null>;
24
+ circleBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').SVGAttributes | undefined, {
25
+ r: number;
26
+ cx: number;
27
+ cy: number;
28
+ fill: string;
29
+ "stroke-width": number;
30
+ style: {
31
+ strokeDashoffset: number;
32
+ strokeDasharray: string;
33
+ transformOrigin: string;
34
+ transform: string;
35
+ transition: string;
36
+ } | {
37
+ strokeDashoffset: number;
38
+ strokeDasharray: number;
39
+ transformOrigin: string;
40
+ transform: string;
41
+ transition: string;
42
+ } | {
43
+ strokeDashoffset: number;
44
+ strokeDasharray: string;
45
+ transformOrigin?: undefined;
46
+ transform?: undefined;
47
+ transition?: undefined;
48
+ } | {
49
+ strokeDashoffset?: undefined;
50
+ strokeDasharray?: undefined;
51
+ transformOrigin?: undefined;
52
+ transform?: undefined;
53
+ transition?: undefined;
54
+ };
55
+ }>>;
56
+ enableTrack: import('vue').ComputedRef<boolean>;
57
+ };
58
+ export {};
@@ -0,0 +1,97 @@
1
+ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
+ import { computed as r, useAttrs as i } from "vue";
3
+ import { get as a, isNil as o } from "es-toolkit/compat";
4
+ import { DEFAULT_SPINNER_THICKNESS as s, SPINNER_VIEWBOX_SIZE as c, cn as l, getSpinnerCircleGeometry as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core";
5
+ import { colorProps as p, sizeProps as m, variantProps as h } from "@bridge-ui/core/Components/Spinner";
6
+ //#region src/Components/Spinner/composables/useSpinner.ts
7
+ var g = [
8
+ "size",
9
+ "color",
10
+ "value",
11
+ "classes",
12
+ "variant",
13
+ "thickness",
14
+ "customProps",
15
+ "enableTrack",
16
+ "disableShrink"
17
+ ];
18
+ function _(e) {
19
+ return o(e) || Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e));
20
+ }
21
+ function v(o, v) {
22
+ let y = i(), b = r(() => f({
23
+ props: {
24
+ ...y,
25
+ ...o
26
+ },
27
+ bridgeKeys: g
28
+ })), { merged: x, entry: S } = t({
29
+ libDefaults: v,
30
+ componentName: "Spinner",
31
+ props: () => b.value.componentProps
32
+ }), C = n({
33
+ entry: S,
34
+ props: () => b.value.componentProps
35
+ }), w = r(() => x.value.customProps), T = r(() => a(d(p, S.value?.customProps?.color), x.value.color)), E = r(() => a(d(m, S.value?.customProps?.size), x.value.size)), D = r(() => a(d(h, S.value?.customProps?.variant), x.value.variant)), O = r(() => x.value.thickness ?? s), k = r(() => x.value.variant === "determinate"), A = r(() => x.value.variant === "indeterminate"), j = r(() => !!x.value.enableTrack), M = r(() => !!x.value.disableShrink), N = r(() => _(x.value.value)), P = r(() => u(O.value)), F = c / 2, I = r(() => e(w.value?.root, b.value.inheritedAttrs, {
36
+ role: "progressbar",
37
+ ...k.value ? {
38
+ "aria-valuemin": 0,
39
+ "aria-valuemax": 100,
40
+ "aria-valuenow": N.value
41
+ } : {},
42
+ class: l({
43
+ "inline-block": !0,
44
+ [E.value ?? ""]: !0,
45
+ [D.value ?? ""]: A.value,
46
+ [C.value.root ?? ""]: !0
47
+ })
48
+ }));
49
+ return {
50
+ merged: x,
51
+ svgBind: r(() => e(w.value?.svg, { viewBox: `0 0 ${c} ${c}` }, l({
52
+ "block size-full": !0,
53
+ [C.value.svg ?? ""]: !0
54
+ }))),
55
+ rootBind: I,
56
+ trackBind: r(() => j.value ? e(w.value?.track, {
57
+ cx: F,
58
+ cy: F,
59
+ fill: "none",
60
+ r: P.value.radius,
61
+ "stroke-width": O.value
62
+ }, l({
63
+ [T.value?.track ?? ""]: !0,
64
+ [C.value.track ?? ""]: !0
65
+ })) : null),
66
+ circleBind: r(() => {
67
+ let { radius: t, circumference: n } = P.value, r = k.value ? {
68
+ transformOrigin: "50% 50%",
69
+ transform: "rotate(-90deg)",
70
+ strokeDasharray: n,
71
+ transition: "stroke-dashoffset 200ms linear",
72
+ strokeDashoffset: (100 - N.value) / 100 * n
73
+ } : {}, i = A.value ? {
74
+ strokeDashoffset: 0,
75
+ strokeDasharray: M.value ? `${n * .8}px, ${n}px` : "80px, 200px"
76
+ } : {};
77
+ return e(w.value?.circle, {
78
+ r: t,
79
+ cx: F,
80
+ cy: F,
81
+ fill: "none",
82
+ "stroke-width": O.value,
83
+ style: {
84
+ ...r,
85
+ ...i
86
+ }
87
+ }, l({
88
+ [T.value?.circle ?? ""]: !0,
89
+ "animate-bridge-spinner-dash": A.value && !M.value,
90
+ [C.value.circle ?? ""]: !0
91
+ }));
92
+ }),
93
+ enableTrack: j
94
+ };
95
+ }
96
+ //#endregion
97
+ export { v as useSpinner };
@@ -0,0 +1,3 @@
1
+ export { useSpinner } from './composables/useSpinner';
2
+ export type { SpinnerClasses, SpinnerColorOverrides, SpinnerCustomProps, SpinnerOwnProps, SpinnerProps, SpinnerSizeOverrides, SpinnerVariantOverrides, } from './spinner.types';
3
+ export { default as Spinner } from './Spinner.vue';
@@ -0,0 +1,3 @@
1
+ import { useSpinner as e } from "./composables/useSpinner.js";
2
+ import t from "./Spinner.js";
3
+ export { t as Spinner, e as useSpinner };
@@ -0,0 +1,99 @@
1
+ import { HTMLAttributes, SVGAttributes } from 'vue';
2
+ import { MergeHtmlProps, MergeProps, SpinnerColor, SpinnerSize, SpinnerVariant } from '@bridge-ui/core';
3
+ export interface SpinnerSizeOverrides {}
4
+ export interface SpinnerColorOverrides {}
5
+ export interface SpinnerVariantOverrides {}
6
+ export interface SpinnerClasses {
7
+ /**
8
+ * The classes to apply to the progress circle.
9
+ */
10
+ circle?: string;
11
+ /**
12
+ * The classes to apply to the root.
13
+ */
14
+ root?: string;
15
+ /**
16
+ * The classes to apply to the svg element.
17
+ */
18
+ svg?: string;
19
+ /**
20
+ * The classes to apply to the track circle.
21
+ */
22
+ track?: string;
23
+ }
24
+ export interface SpinnerCustomProps {
25
+ /**
26
+ * Props forwarded to the progress circle.
27
+ */
28
+ circle?: SVGAttributes;
29
+ /**
30
+ * Props forwarded to the root element.
31
+ */
32
+ root?: HTMLAttributes;
33
+ /**
34
+ * Props forwarded to the svg element.
35
+ */
36
+ svg?: SVGAttributes;
37
+ /**
38
+ * Props forwarded to the track circle.
39
+ */
40
+ track?: SVGAttributes;
41
+ }
42
+ export interface SpinnerOwnProps {
43
+ /**
44
+ * The classes to apply to spinner parts.
45
+ *
46
+ * @default undefined
47
+ */
48
+ classes?: SpinnerClasses;
49
+ /**
50
+ * The color of the spinner.
51
+ *
52
+ * @default "primary"
53
+ */
54
+ color?: MergeProps<SpinnerColor, SpinnerColorOverrides>;
55
+ /**
56
+ * Extra props for internal parts (`root`, `svg`, `circle`, `track`).
57
+ * Root HTML attributes stay on the component top level.
58
+ *
59
+ * @default undefined
60
+ */
61
+ customProps?: SpinnerCustomProps;
62
+ /**
63
+ * Disables the indeterminate shrink animation on the circle.
64
+ *
65
+ * @default false
66
+ */
67
+ disableShrink?: boolean;
68
+ /**
69
+ * Renders a subtle track circle behind the progress arc.
70
+ *
71
+ * @default false
72
+ */
73
+ enableTrack?: boolean;
74
+ /**
75
+ * The size of the spinner.
76
+ *
77
+ * @default "md"
78
+ */
79
+ size?: MergeProps<SpinnerSize, SpinnerSizeOverrides>;
80
+ /**
81
+ * The stroke thickness of the circle.
82
+ *
83
+ * @default 3.6
84
+ */
85
+ thickness?: number;
86
+ /**
87
+ * Progress value from 0 to 100. Used by the `determinate` variant.
88
+ *
89
+ * @default undefined
90
+ */
91
+ value?: number;
92
+ /**
93
+ * Visual variant of the spinner.
94
+ *
95
+ * @default "indeterminate"
96
+ */
97
+ variant?: MergeProps<SpinnerVariant, SpinnerVariantOverrides>;
98
+ }
99
+ export type SpinnerProps = MergeHtmlProps<SpinnerOwnProps, HTMLAttributes>;
@@ -18,10 +18,12 @@ import { MenuClasses, MenuProps } from './Components/Menu';
18
18
  import { ModalClasses, ModalProps } from './Components/Modal';
19
19
  import { NumberFieldClasses } from './Components/NumberField';
20
20
  import { PasswordFieldClasses } from './Components/PasswordField';
21
+ import { ProgressClasses, ProgressProps } from './Components/Progress';
21
22
  import { RadioClasses, RadioProps } from './Components/Radio';
22
23
  import { SelectClasses, SelectProps } from './Components/Select';
23
24
  import { SkeletonClasses, SkeletonProps } from './Components/Skeleton';
24
25
  import { SnackbarClasses, SnackbarProps } from './Components/Snackbar';
26
+ import { SpinnerClasses, SpinnerProps } from './Components/Spinner';
25
27
  import { SwitchClasses, SwitchProps } from './Components/Switch';
26
28
  import { TextareaClasses, TextareaProps } from './Components/Textarea';
27
29
  declare module "@bridge-ui/core" {
@@ -100,6 +102,10 @@ declare module "@bridge-ui/core" {
100
102
  interface PasswordFieldConfigOverrides {
101
103
  classes: PasswordFieldClasses;
102
104
  }
105
+ interface ProgressConfigOverrides {
106
+ classes: ProgressClasses;
107
+ defaultProps: Partial<Pick<ProgressProps, "size" | "color" | "rounded" | "variant">>;
108
+ }
103
109
  interface RadioConfigOverrides {
104
110
  classes: RadioClasses;
105
111
  defaultProps: Partial<Pick<RadioProps, "size" | "color" | "rounded">>;
@@ -116,6 +122,10 @@ declare module "@bridge-ui/core" {
116
122
  classes: SkeletonClasses;
117
123
  defaultProps: Partial<Pick<SkeletonProps, "rounded">>;
118
124
  }
125
+ interface SpinnerConfigOverrides {
126
+ classes: SpinnerClasses;
127
+ defaultProps: Partial<Pick<SpinnerProps, "size" | "color" | "variant" | "thickness" | "enableTrack" | "disableShrink">>;
128
+ }
119
129
  interface SwitchConfigOverrides {
120
130
  classes: SwitchClasses;
121
131
  defaultProps: Partial<Pick<SwitchProps, "size" | "color" | "rounded">>;
package/dist/index.d.ts CHANGED
@@ -40,6 +40,8 @@ export { NumberField, useNumberField } from './Components/NumberField';
40
40
  export type { NumberFieldClasses, NumberFieldCustomProps, NumberFieldOwnProps, NumberFieldProps, NumberFieldSlots, } from './Components/NumberField';
41
41
  export { PasswordField, usePasswordField } from './Components/PasswordField';
42
42
  export type { PasswordFieldClasses, PasswordFieldCustomProps, PasswordFieldOwnProps, PasswordFieldProps, PasswordFieldSlots, } from './Components/PasswordField';
43
+ export { Progress, useProgress } from './Components/Progress';
44
+ export type { ProgressClasses, ProgressColorOverrides, ProgressCustomProps, ProgressOwnProps, ProgressProps, ProgressRoundedOverrides, ProgressSizeOverrides, ProgressVariantOverrides, } from './Components/Progress';
43
45
  export { Radio, useRadio } from './Components/Radio';
44
46
  export type { RadioClasses, RadioColorOverrides, RadioCustomProps, RadioOwnProps, RadioProps, RadioRoundedOverrides, RadioSizeOverrides, RadioSlots, } from './Components/Radio';
45
47
  export { Select, SelectOption } from './Components/Select';
@@ -48,6 +50,8 @@ export { Skeleton, useSkeleton } from './Components/Skeleton';
48
50
  export type { SkeletonClasses, SkeletonOwnProps, SkeletonProps, SkeletonRoundedOverrides, } from './Components/Skeleton';
49
51
  export { Snackbar, useSnackbar } from './Components/Snackbar';
50
52
  export type { SnackbarClasses, SnackbarColorOverrides, SnackbarCustomProps, SnackbarEmits, SnackbarOwnProps, SnackbarPaddingOverrides, SnackbarProps, SnackbarSlots, SnackbarTransitionOverrides, } from './Components/Snackbar';
53
+ export { Spinner, useSpinner } from './Components/Spinner';
54
+ export type { SpinnerClasses, SpinnerColorOverrides, SpinnerCustomProps, SpinnerOwnProps, SpinnerProps, SpinnerSizeOverrides, SpinnerVariantOverrides, } from './Components/Spinner';
51
55
  export { Switch, useSwitch } from './Components/Switch';
52
56
  export type { SwitchClasses, SwitchColorOverrides, SwitchCustomProps, SwitchOwnProps, SwitchProps, SwitchRoundedOverrides, SwitchSizeOverrides, SwitchSlots, } from './Components/Switch';
53
57
  export { Textarea, useTextarea } from './Components/Textarea';
package/dist/index.js CHANGED
@@ -32,28 +32,32 @@ import I from "./Components/ListItem/ListItem.js";
32
32
  import L from "./Components/ListSection/ListSection.js";
33
33
  import { useMenu as R } from "./Components/Menu/composables/useMenu.js";
34
34
  import z from "./Components/Menu/Menu.js";
35
- import B from "./Components/Listbox/Listbox.js";
36
- import { useModal as V } from "./Components/Modal/composables/useModal.js";
37
- import H from "./Components/Modal/Modal.js";
38
- import { useNumberField as U } from "./Components/NumberField/composables/useNumberField.js";
39
- import W from "./Components/NumberField/NumberField.js";
40
- import { usePasswordField as G } from "./Components/PasswordField/composables/usePasswordField.js";
41
- import K from "./Components/PasswordField/PasswordField.js";
42
- import { useRadio as q } from "./Components/Radio/composables/useRadio.js";
43
- import J from "./Components/Radio/Radio.js";
44
- import Y from "./Components/Select/Select.js";
45
- import X from "./Components/Select/SelectOption.js";
46
- import { useSkeleton as Z } from "./Components/Skeleton/composables/useSkeleton.js";
47
- import Q from "./Components/Skeleton/Skeleton.js";
48
- import { useSnackbar as $ } from "./Components/Snackbar/composables/useSnackbar.js";
49
- import ee from "./Components/Snackbar/Snackbar.js";
50
- import { useSwitch as te } from "./Components/Switch/composables/useSwitch.js";
51
- import ne from "./Components/Switch/Switch.js";
52
- import { useTextarea as re } from "./Components/Textarea/composables/useTextarea.js";
53
- import ie from "./Components/Textarea/Textarea.js";
54
- import { useTextField as ae } from "./Components/TextField/composables/useTextField.js";
55
- import oe from "./Components/TextField/TextField.js";
56
- import se from "./Provider/BridgeUIProvider.js";
57
- import { createBridgeUI as ce } from "./Provider/createBridgeUI.js";
58
- import { BRIDGE_UI_DEFAULT_GLOBAL as le, cn as ue, mergeBridgeUIComponents as de, mergeBridgeUIGlobal as fe, resolveBridgeUIOptions as pe } from "@bridge-ui/core";
59
- export { a as Alert, o as Avatar, le as BRIDGE_UI_DEFAULT_GLOBAL, c as Badge, se as BridgeUIProvider, u as Button, f as Card, g as Checkbox, v as Chip, b as Divider, m as FormControl, S as FormField, i as Icon, w as Label, E as Link, O as List, I as ListItem, L as ListSection, B as Listbox, z as Menu, H as Modal, W as NumberField, K as PasswordField, J as Radio, Y as Select, X as SelectOption, Q as Skeleton, ee as Snackbar, ne as Switch, oe as TextField, ie as Textarea, ue as cn, ce as createBridgeUI, A as findFirstEnabledOptionIndex, j as findLastEnabledOptionIndex, M as getListboxActiveDescendantId, N as getListboxOptionId, de as mergeBridgeUIComponents, fe as mergeBridgeUIGlobal, P as moveListboxHighlight, pe as resolveBridgeUIOptions, r as useAlert, s as useBadge, e as useBridgeUI, t as useBridgeUIComponent, n as useBridgeUIMergedRegistryClasses, l as useButton, d as useCard, h as useCheckbox, _ as useChip, y as useDivider, p as useFormControl, x as useFormField, C as useLabel, T as useLink, D as useList, k as useListbox, F as useListboxNavigation, R as useMenu, V as useModal, U as useNumberField, G as usePasswordField, q as useRadio, Z as useSkeleton, $ as useSnackbar, te as useSwitch, ae as useTextField, re as useTextarea };
35
+ import { useProgress as B } from "./Components/Progress/composables/useProgress.js";
36
+ import V from "./Components/Progress/Progress.js";
37
+ import H from "./Components/Listbox/Listbox.js";
38
+ import { useModal as U } from "./Components/Modal/composables/useModal.js";
39
+ import W from "./Components/Modal/Modal.js";
40
+ import { useNumberField as G } from "./Components/NumberField/composables/useNumberField.js";
41
+ import K from "./Components/NumberField/NumberField.js";
42
+ import { usePasswordField as q } from "./Components/PasswordField/composables/usePasswordField.js";
43
+ import J from "./Components/PasswordField/PasswordField.js";
44
+ import { useRadio as Y } from "./Components/Radio/composables/useRadio.js";
45
+ import X from "./Components/Radio/Radio.js";
46
+ import Z from "./Components/Select/Select.js";
47
+ import Q from "./Components/Select/SelectOption.js";
48
+ import { useSkeleton as $ } from "./Components/Skeleton/composables/useSkeleton.js";
49
+ import ee from "./Components/Skeleton/Skeleton.js";
50
+ import { useSnackbar as te } from "./Components/Snackbar/composables/useSnackbar.js";
51
+ import ne from "./Components/Snackbar/Snackbar.js";
52
+ import { useSpinner as re } from "./Components/Spinner/composables/useSpinner.js";
53
+ import ie from "./Components/Spinner/Spinner.js";
54
+ import { useSwitch as ae } from "./Components/Switch/composables/useSwitch.js";
55
+ import oe from "./Components/Switch/Switch.js";
56
+ import { useTextarea as se } from "./Components/Textarea/composables/useTextarea.js";
57
+ import ce from "./Components/Textarea/Textarea.js";
58
+ import { useTextField as le } from "./Components/TextField/composables/useTextField.js";
59
+ import ue from "./Components/TextField/TextField.js";
60
+ import de from "./Provider/BridgeUIProvider.js";
61
+ import { createBridgeUI as fe } from "./Provider/createBridgeUI.js";
62
+ import { BRIDGE_UI_DEFAULT_GLOBAL as pe, cn as me, mergeBridgeUIComponents as he, mergeBridgeUIGlobal as ge, resolveBridgeUIOptions as _e } from "@bridge-ui/core";
63
+ export { a as Alert, o as Avatar, pe as BRIDGE_UI_DEFAULT_GLOBAL, c as Badge, de as BridgeUIProvider, u as Button, f as Card, g as Checkbox, v as Chip, b as Divider, m as FormControl, S as FormField, i as Icon, w as Label, E as Link, O as List, I as ListItem, L as ListSection, H as Listbox, z as Menu, W as Modal, K as NumberField, J as PasswordField, V as Progress, X as Radio, Z as Select, Q as SelectOption, ee as Skeleton, ne as Snackbar, ie as Spinner, oe as Switch, ue as TextField, ce as Textarea, me as cn, fe as createBridgeUI, A as findFirstEnabledOptionIndex, j as findLastEnabledOptionIndex, M as getListboxActiveDescendantId, N as getListboxOptionId, he as mergeBridgeUIComponents, ge as mergeBridgeUIGlobal, P as moveListboxHighlight, _e as resolveBridgeUIOptions, r as useAlert, s as useBadge, e as useBridgeUI, t as useBridgeUIComponent, n as useBridgeUIMergedRegistryClasses, l as useButton, d as useCard, h as useCheckbox, _ as useChip, y as useDivider, p as useFormControl, x as useFormField, C as useLabel, T as useLink, D as useList, k as useListbox, F as useListboxNavigation, R as useMenu, U as useModal, G as useNumberField, q as usePasswordField, B as useProgress, Y as useRadio, $ as useSkeleton, te as useSnackbar, re as useSpinner, ae as useSwitch, le as useTextField, se as useTextarea };
package/dist/theme.css CHANGED
@@ -98,12 +98,18 @@
98
98
  --color-info-900: var(--color-blue-900);
99
99
  --color-info-950: var(--color-blue-950);
100
100
 
101
- /* Listbox indeterminate loading bar */
102
- --animate-bridge-listbox-indeterminate: bridge-listbox-indeterminate 1.4s
101
+ /* Progress linear bar animations */
102
+ --animate-bridge-progress-indeterminate: bridge-progress-indeterminate 1.4s
103
103
  ease-in-out infinite;
104
+ --animate-bridge-progress-query: bridge-progress-query 1.4s ease-in-out
105
+ infinite;
106
+
107
+ /* Spinner circular animations */
108
+ --animate-bridge-spinner-rotate: bridge-spinner-rotate 1.4s linear infinite;
109
+ --animate-bridge-spinner-dash: bridge-spinner-dash 1.4s ease-in-out infinite;
104
110
  }
105
111
 
106
- @keyframes bridge-listbox-indeterminate {
112
+ @keyframes bridge-progress-indeterminate {
107
113
  0% {
108
114
  transform: translateX(-100%);
109
115
  }
@@ -113,6 +119,43 @@
113
119
  }
114
120
  }
115
121
 
122
+ @keyframes bridge-progress-query {
123
+ 0% {
124
+ transform: translateX(400%);
125
+ }
126
+
127
+ 100% {
128
+ transform: translateX(-100%);
129
+ }
130
+ }
131
+
132
+ @keyframes bridge-spinner-rotate {
133
+ 0% {
134
+ transform: rotate(0deg);
135
+ }
136
+
137
+ 100% {
138
+ transform: rotate(360deg);
139
+ }
140
+ }
141
+
142
+ @keyframes bridge-spinner-dash {
143
+ 0% {
144
+ stroke-dasharray: 1px, 200px;
145
+ stroke-dashoffset: 0;
146
+ }
147
+
148
+ 50% {
149
+ stroke-dasharray: 100px, 200px;
150
+ stroke-dashoffset: -15px;
151
+ }
152
+
153
+ 100% {
154
+ stroke-dasharray: 1px, 200px;
155
+ stroke-dashoffset: -126px;
156
+ }
157
+ }
158
+
116
159
  /**
117
160
  * FormField slot adornments (`bridge-start-adornment` / `bridge-end-adornment`).
118
161
  * Parent `.group/field` sets `data-bridge-rounded` from FormField `rounded`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "license": "MIT",
4
- "version": "0.0.1-beta.6",
4
+ "version": "0.0.1-beta.7",
5
5
  "author": "BridgeUI",
6
6
  "sideEffects": false,
7
7
  "name": "@bridge-ui/vue",
@@ -60,7 +60,7 @@
60
60
  "dist"
61
61
  ],
62
62
  "peerDependencies": {
63
- "@bridge-ui/core": "^0.0.1-beta.6",
63
+ "@bridge-ui/core": "^0.0.1-beta.7",
64
64
  "@lucide/vue": ">=1.0.0",
65
65
  "vue": "^3.4.0"
66
66
  },