@bridge-ui/vue 0.0.1-beta.6 → 0.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 (116) hide show
  1. package/dist/Actions/BridgeUIHosts.vue.d.ts +3 -2
  2. package/dist/Actions/BridgeUIHosts.vue_vue_type_script_setup_true_lang.js +15 -10
  3. package/dist/Actions/Drawer/BridgeDrawerHost.js +5 -0
  4. package/dist/Actions/Drawer/BridgeDrawerHost.vue.d.ts +14 -0
  5. package/dist/Actions/Drawer/BridgeDrawerHost.vue_vue_type_script_setup_true_lang.js +35 -0
  6. package/dist/Actions/Drawer/bridgeDrawer.types.d.ts +44 -0
  7. package/dist/Actions/Drawer/bridgeDrawerInjectionKey.d.ts +3 -0
  8. package/dist/Actions/Drawer/bridgeDrawerInjectionKey.js +4 -0
  9. package/dist/Actions/Drawer/createBridgeDrawerApi.d.ts +2 -0
  10. package/dist/Actions/Drawer/createBridgeDrawerApi.js +49 -0
  11. package/dist/Actions/Drawer/index.d.ts +3 -0
  12. package/dist/Actions/Drawer/index.js +3 -0
  13. package/dist/Actions/Drawer/useDrawerAction.d.ts +5 -0
  14. package/dist/Actions/Drawer/useDrawerAction.js +26 -0
  15. package/dist/Actions/bridgeUIHosts.types.d.ts +5 -0
  16. package/dist/Actions/index.d.ts +2 -0
  17. package/dist/Actions/index.js +8 -6
  18. package/dist/Components/Badge/badge.types.d.ts +1 -1
  19. package/dist/Components/Chip/chip.types.d.ts +1 -1
  20. package/dist/Components/Drawer/Drawer.js +5 -0
  21. package/dist/Components/Drawer/Drawer.vue.d.ts +39 -0
  22. package/dist/Components/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +96 -0
  23. package/dist/Components/Drawer/composables/useDrawer.d.ts +63 -0
  24. package/dist/Components/Drawer/composables/useDrawer.js +208 -0
  25. package/dist/Components/Drawer/drawer.types.d.ts +188 -0
  26. package/dist/Components/Drawer/index.d.ts +4 -0
  27. package/dist/Components/Drawer/index.js +3 -0
  28. package/dist/Components/FormControl/formControl.types.d.ts +6 -6
  29. package/dist/Components/FormField/formField.types.d.ts +7 -7
  30. package/dist/Components/Label/label.types.d.ts +1 -1
  31. package/dist/Components/Link/link.types.d.ts +3 -3
  32. package/dist/Components/List/composables/useList.js +1 -1
  33. package/dist/Components/List/list.types.d.ts +1 -1
  34. package/dist/Components/ListItem/composables/useListItem.js +7 -7
  35. package/dist/Components/ListItem/listItem.types.d.ts +1 -1
  36. package/dist/Components/ListSection/composables/useListSection.js +2 -2
  37. package/dist/Components/ListSection/listSection.types.d.ts +1 -1
  38. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +73 -61
  39. package/dist/Components/Listbox/composables/useListbox.d.ts +0 -5
  40. package/dist/Components/Listbox/composables/useListbox.js +10 -19
  41. package/dist/Components/Listbox/listbox.types.d.ts +7 -7
  42. package/dist/Components/Menu/composables/useMenu.js +1 -1
  43. package/dist/Components/Menu/menu.types.d.ts +3 -3
  44. package/dist/Components/Modal/composables/useModal.js +0 -1
  45. package/dist/Components/Modal/modal.types.d.ts +3 -2
  46. package/dist/Components/Progress/Progress.js +5 -0
  47. package/dist/Components/Progress/Progress.vue.d.ts +4 -0
  48. package/dist/Components/Progress/Progress.vue_vue_type_script_setup_true_lang.js +32 -0
  49. package/dist/Components/Progress/composables/useProgress.d.ts +29 -0
  50. package/dist/Components/Progress/composables/useProgress.js +75 -0
  51. package/dist/Components/Progress/index.d.ts +3 -0
  52. package/dist/Components/Progress/index.js +3 -0
  53. package/dist/Components/Progress/progress.types.d.ts +94 -0
  54. package/dist/Components/Select/Select.vue.d.ts +2 -2
  55. package/dist/Components/Select/select.types.d.ts +5 -5
  56. package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
  57. package/dist/Components/Snackbar/snackbar.types.d.ts +7 -7
  58. package/dist/Components/Spinner/Spinner.js +5 -0
  59. package/dist/Components/Spinner/Spinner.vue.d.ts +4 -0
  60. package/dist/Components/Spinner/Spinner.vue_vue_type_script_setup_true_lang.js +31 -0
  61. package/dist/Components/Spinner/composables/useSpinner.d.ts +58 -0
  62. package/dist/Components/Spinner/composables/useSpinner.js +97 -0
  63. package/dist/Components/Spinner/index.d.ts +3 -0
  64. package/dist/Components/Spinner/index.js +3 -0
  65. package/dist/Components/Spinner/spinner.types.d.ts +99 -0
  66. package/dist/Components/Tab/Tab.js +5 -0
  67. package/dist/Components/Tab/Tab.vue.d.ts +11 -0
  68. package/dist/Components/Tab/Tab.vue_vue_type_script_setup_true_lang.js +33 -0
  69. package/dist/Components/Tab/composables/useTab.d.ts +23 -0
  70. package/dist/Components/Tab/composables/useTab.js +88 -0
  71. package/dist/Components/Tab/index.d.ts +3 -0
  72. package/dist/Components/Tab/index.js +3 -0
  73. package/dist/Components/Tab/tab.types.d.ts +94 -0
  74. package/dist/Components/TabItem/TabItem.js +5 -0
  75. package/dist/Components/TabItem/TabItem.vue.d.ts +11 -0
  76. package/dist/Components/TabItem/TabItem.vue_vue_type_script_setup_true_lang.js +25 -0
  77. package/dist/Components/TabItem/composables/useTabItem.d.ts +3 -0
  78. package/dist/Components/TabItem/composables/useTabItem.js +39 -0
  79. package/dist/Components/TabItem/index.d.ts +3 -0
  80. package/dist/Components/TabItem/index.js +3 -0
  81. package/dist/Components/TabItem/tabItem.types.d.ts +72 -0
  82. package/dist/Components/TabList/TabList.js +5 -0
  83. package/dist/Components/TabList/TabList.vue.d.ts +11 -0
  84. package/dist/Components/TabList/TabList.vue_vue_type_script_setup_true_lang.js +18 -0
  85. package/dist/Components/TabList/composables/useTabList.d.ts +10 -0
  86. package/dist/Components/TabList/composables/useTabList.js +65 -0
  87. package/dist/Components/TabList/index.d.ts +3 -0
  88. package/dist/Components/TabList/index.js +3 -0
  89. package/dist/Components/TabList/tabList.types.d.ts +38 -0
  90. package/dist/Components/TabPanel/TabPanel.js +5 -0
  91. package/dist/Components/TabPanel/TabPanel.vue.d.ts +11 -0
  92. package/dist/Components/TabPanel/TabPanel.vue_vue_type_script_setup_true_lang.js +20 -0
  93. package/dist/Components/TabPanel/composables/useTabPanel.d.ts +14 -0
  94. package/dist/Components/TabPanel/composables/useTabPanel.js +51 -0
  95. package/dist/Components/TabPanel/index.d.ts +3 -0
  96. package/dist/Components/TabPanel/index.js +3 -0
  97. package/dist/Components/TabPanel/tabPanel.types.d.ts +48 -0
  98. package/dist/Components/Tabs/Tabs.js +5 -0
  99. package/dist/Components/Tabs/Tabs.vue.d.ts +24 -0
  100. package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +73 -0
  101. package/dist/Components/Tabs/composables/useTabs.d.ts +39 -0
  102. package/dist/Components/Tabs/composables/useTabs.js +99 -0
  103. package/dist/Components/Tabs/index.d.ts +4 -0
  104. package/dist/Components/Tabs/index.js +4 -0
  105. package/dist/Components/Tabs/tabs.types.d.ts +93 -0
  106. package/dist/Components/Tabs/tabsInjectionKey.d.ts +121 -0
  107. package/dist/Components/Tabs/tabsInjectionKey.js +4 -0
  108. package/dist/Utils/index.d.ts +2 -0
  109. package/dist/Utils/index.js +20 -19
  110. package/dist/Utils/useBreakpoint.d.ts +19 -0
  111. package/dist/Utils/useBreakpoint.js +35 -0
  112. package/dist/augments.d.ts +10 -0
  113. package/dist/index.d.ts +18 -1
  114. package/dist/index.js +76 -58
  115. package/dist/theme.css +55 -3
  116. package/package.json +2 -2
@@ -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
  /**
@@ -182,25 +182,25 @@ export interface ListboxSlots {
182
182
  /**
183
183
  * Content below the list.
184
184
  */
185
- afterOptions?: Slot;
185
+ afterOptions?: Slot<undefined>;
186
186
  /**
187
187
  * Content above the list.
188
188
  */
189
- beforeOptions?: Slot;
189
+ beforeOptions?: Slot<undefined>;
190
190
  /**
191
191
  * Composed list content (`ListSection` / `ListItem`). When set, replaces the
192
192
  * mapped `options` / `entries` render inside the list.
193
193
  */
194
- default?: Slot;
194
+ default?: Slot<undefined>;
195
195
  /**
196
196
  * Custom empty-state content.
197
197
  */
198
- empty?: Slot;
198
+ empty?: Slot<undefined>;
199
199
  /**
200
200
  * Custom loading content. Replaces the default `loadingMessage` when set.
201
201
  * The progress bar still renders above this content.
202
202
  */
203
- loading?: Slot;
203
+ loading?: Slot<undefined>;
204
204
  /**
205
205
  * Custom option item content.
206
206
  */
@@ -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,
@@ -54,13 +54,13 @@ export interface MenuEmits {
54
54
  close: [];
55
55
  }
56
56
  /**
57
- * Anchored menu panel (MUI `Menu`-like). Visibility is controlled with `v-model`
58
- * (not listed here — `defineModel` handles it). Anchor with `anchorEl` (MUI style)
57
+ * Anchored menu panel. Visibility is controlled with `v-model`
58
+ * (not listed here — `defineModel` handles it). Anchor with `anchorEl`
59
59
  * or put the opener in the `trigger` slot; menu items go in the default slot.
60
60
  */
61
61
  export interface MenuOwnProps {
62
62
  /**
63
- * Element that anchors the menu panel (MUI `anchorEl`). When set, it is used
63
+ * Element that anchors the menu panel. When set, it is used
64
64
  * for positioning and click-away instead of the `trigger` slot wrapper.
65
65
  * Prefer this when the opener lives outside the `Menu` or is controlled manually.
66
66
  * Not merged into Bridge defaults (DOM nodes must not be deep-merged).
@@ -65,7 +65,6 @@ function x(x, ue, S = {}) {
65
65
  })
66
66
  })), be = n(() => e(z.value?.wrapper, { onClick: Q }, l({
67
67
  "flex min-h-full w-full transform p-4": !0,
68
- "items-end justify-center": !0,
69
68
  [fe.value ?? ""]: !0,
70
69
  [s(B.value, "wrapper") ?? ""]: !0
71
70
  }))), xe = n(() => e(z.value?.panel, {
@@ -59,8 +59,9 @@ export interface ModalEmits {
59
59
  */
60
60
  export interface ModalOwnProps {
61
61
  /**
62
- * Panel position from the `sm` breakpoint up (`{row}-{column}` grid).
63
- * Mobile always uses bottom sheet (`bottom-center`).
62
+ * Panel position on all breakpoints (`{row}-{column}` grid).
63
+ * Use `useBreakpoint` if you need a different align per viewport
64
+ * (e.g. bottom sheet on mobile, centered on desktop).
64
65
  *
65
66
  * @default "middle-center"
66
67
  */
@@ -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>;