@bridge-ui/vue 0.0.1-beta.2 → 0.0.1-beta.4

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 (66) hide show
  1. package/dist/Components/Alert/alert.types.d.ts +1 -1
  2. package/dist/Components/Alert/alertDefaultIcons.d.ts +1 -1
  3. package/dist/Components/Alert/alertDefaultIcons.js +1 -1
  4. package/dist/Components/Alert/composables/useAlert.d.ts +1 -1
  5. package/dist/Components/Avatar/avatar.types.d.ts +1 -1
  6. package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
  7. package/dist/Components/Avatar/composables/useAvatar.js +1 -1
  8. package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +3 -5
  9. package/dist/Components/Button/button.types.d.ts +1 -1
  10. package/dist/Components/Button/composables/useButton.js +52 -44
  11. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
  12. package/dist/Components/Chip/Chip.js +5 -0
  13. package/dist/Components/Chip/Chip.vue.d.ts +20 -0
  14. package/dist/Components/Chip/Chip.vue_vue_type_script_setup_true_lang.js +35 -0
  15. package/dist/Components/Chip/chip.types.d.ts +93 -0
  16. package/dist/Components/Chip/composables/useChip.d.ts +22 -0
  17. package/dist/Components/Chip/composables/useChip.js +66 -0
  18. package/dist/Components/Chip/index.d.ts +3 -0
  19. package/dist/Components/Chip/index.js +3 -0
  20. package/dist/Components/Divider/Divider.js +5 -0
  21. package/dist/Components/Divider/Divider.vue.d.ts +4 -0
  22. package/dist/Components/Divider/Divider.vue_vue_type_script_setup_true_lang.js +21 -0
  23. package/dist/Components/Divider/composables/useDivider.d.ts +13 -0
  24. package/dist/Components/Divider/composables/useDivider.js +42 -0
  25. package/dist/Components/Divider/divider.types.d.ts +31 -0
  26. package/dist/Components/Divider/index.d.ts +3 -0
  27. package/dist/Components/Divider/index.js +3 -0
  28. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  29. package/dist/Components/FormField/composables/useFormField.js +1 -1
  30. package/dist/Components/FormField/formField.types.d.ts +1 -1
  31. package/dist/Components/Icon/icon.types.d.ts +1 -1
  32. package/dist/Components/Link/link.types.d.ts +1 -1
  33. package/dist/Components/Listbox/Listbox.vue.d.ts +2 -0
  34. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +51 -47
  35. package/dist/Components/Listbox/composables/useListbox.d.ts +10 -2
  36. package/dist/Components/Listbox/composables/useListbox.js +43 -28
  37. package/dist/Components/Listbox/listbox.types.d.ts +28 -3
  38. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +1 -1
  39. package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
  40. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +1 -1
  41. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
  42. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +69 -89
  43. package/dist/Components/Select/composables/useSelect.d.ts +27 -3
  44. package/dist/Components/Select/composables/useSelect.js +162 -140
  45. package/dist/Components/Select/select.types.d.ts +22 -1
  46. package/dist/Components/Skeleton/Skeleton.js +5 -0
  47. package/dist/Components/Skeleton/Skeleton.vue.d.ts +4 -0
  48. package/dist/Components/Skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js +17 -0
  49. package/dist/Components/Skeleton/composables/useSkeleton.d.ts +9 -0
  50. package/dist/Components/Skeleton/composables/useSkeleton.js +33 -0
  51. package/dist/Components/Skeleton/index.d.ts +3 -0
  52. package/dist/Components/Skeleton/index.js +3 -0
  53. package/dist/Components/Skeleton/skeleton.types.d.ts +24 -0
  54. package/dist/Components/Snackbar/Snackbar.vue.d.ts +1 -1
  55. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +1 -1
  56. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +1 -1
  57. package/dist/Components/Snackbar/snackbar.types.d.ts +1 -1
  58. package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +1 -1
  59. package/dist/Components/Snackbar/snackbarDefaultIcons.js +1 -1
  60. package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
  61. package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
  62. package/dist/augments.d.ts +15 -0
  63. package/dist/index.d.ts +6 -0
  64. package/dist/index.js +43 -37
  65. package/dist/theme.css +14 -0
  66. package/package.json +4 -4
@@ -3,7 +3,7 @@ import { mergePartBind as n, useBridgeUIComponent as r, useBridgeUIMergedRegistr
3
3
  import { computed as a, toValue as o, useId as s, useSlots as c } from "vue";
4
4
  import { get as l, omit as u } from "es-toolkit/compat";
5
5
  import { cn as d, mergeBridgeUILayeredClasses as f, splitComponentProps as p } from "@bridge-ui/core";
6
- import { CircleAlert as m } from "lucide-vue-next";
6
+ import { CircleAlert as m } from "@lucide/vue";
7
7
  import { colorProps as h, invalidatedProps as g, roundedProps as _, sizeProps as v, variantProps as y } from "@bridge-ui/core/Components/FormField";
8
8
  //#region src/Components/FormField/composables/useFormField.ts
9
9
  var b = [
@@ -1,4 +1,4 @@
1
- import { LucideIcon } from 'lucide-vue-next';
1
+ import { LucideIcon } from '@lucide/vue';
2
2
  import { HTMLAttributes, InputHTMLAttributes, Slot } from 'vue';
3
3
  import { FormFieldColor, FormFieldInvalidated, FormFieldRounded, FormFieldSize, FormFieldVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
4
4
  import { UseFormFieldReturn } from './composables/useFormField';
@@ -1,4 +1,4 @@
1
- import { LucideIcon } from 'lucide-vue-next';
1
+ import { LucideIcon } from '@lucide/vue';
2
2
  import { SVGAttributes } from 'vue';
3
3
  import { IconSize, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
4
4
  export interface IconSizeOverrides {}
@@ -1,4 +1,4 @@
1
- import { LucideIcon } from 'lucide-vue-next';
1
+ import { LucideIcon } from '@lucide/vue';
2
2
  import { AnchorHTMLAttributes, HTMLAttributes, Slot } from 'vue';
3
3
  import { LinkColor, LinkSize, LinkUnderline, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
4
4
  import { IconProps } from '../Icon';
@@ -15,6 +15,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
15
15
  "onShow-change"?: ((show: boolean) => any) | undefined;
16
16
  }>, {
17
17
  color: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').ListboxColor, import('./listbox.types').ListboxColorOverrides>;
18
+ size: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').ListboxSize, import('./listbox.types').ListboxSizeOverrides>;
18
19
  loading: boolean;
19
20
  multiple: boolean;
20
21
  disableAutoFocus: boolean;
@@ -22,6 +23,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
22
23
  emptyMessage: string;
23
24
  hideEmptyMessage: boolean;
24
25
  highlightedIndex: number;
26
+ loadingMessage: string;
25
27
  showCheckmark: boolean;
26
28
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
29
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -3,19 +3,13 @@ import n from "../List/List.js";
3
3
  import { useListbox as r } from "./composables/useListbox.js";
4
4
  import i from "../ListItem/ListItem.js";
5
5
  import a from "../Menu/Menu.js";
6
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createSlots as d, createVNode as f, defineComponent as p, mergeModels as m, mergeProps as h, normalizeClass as g, normalizeProps as _, openBlock as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, useModel as w, useSlots as T, watch as E, withCtx as D } from "vue";
7
- import { cn as O } from "@bridge-ui/core";
8
- import { Check as k } from "lucide-vue-next";
6
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createVNode as p, defineComponent as m, guardReactiveProps as h, mergeModels as g, mergeProps as _, normalizeClass as v, normalizeProps as y, openBlock as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, useModel as E, useSlots as D, watch as O, withCtx as k } from "vue";
7
+ import { cn as A } from "@bridge-ui/core";
8
+ import { Check as j } from "@lucide/vue";
9
9
  //#region src/Components/Listbox/Listbox.vue?vue&type=script&setup=true&lang.ts
10
- var A = {
11
- key: 1,
12
- class: "px-4 py-3 text-sm text-gray-500"
13
- }, j = { key: 1 }, M = {
14
- key: 3,
15
- class: "px-4 py-3 text-sm text-gray-500"
16
- }, N = /* @__PURE__ */ p({
10
+ var M = { key: 1 }, N = /* @__PURE__ */ m({
17
11
  __name: "Listbox",
18
- props: /* @__PURE__ */ m({
12
+ props: /* @__PURE__ */ g({
19
13
  anchorEl: {},
20
14
  classes: {},
21
15
  color: { default: "primary" },
@@ -39,6 +33,7 @@ var A = {
39
33
  type: Boolean,
40
34
  default: !1
41
35
  },
36
+ loadingMessage: { default: "Loading..." },
42
37
  maxHeight: {},
43
38
  multiple: {
44
39
  type: Boolean,
@@ -49,7 +44,8 @@ var A = {
49
44
  showCheckmark: {
50
45
  type: Boolean,
51
46
  default: !0
52
- }
47
+ },
48
+ size: { default: "md" }
53
49
  }, {
54
50
  modelValue: {
55
51
  type: Boolean,
@@ -57,52 +53,60 @@ var A = {
57
53
  },
58
54
  modelModifiers: {}
59
55
  }),
60
- emits: /* @__PURE__ */ m(["select", "show-change"], ["update:modelValue"]),
61
- setup(p, { emit: m }) {
62
- let N = T(), P = m, F = w(p, "modelValue");
63
- E(F, (e) => {
56
+ emits: /* @__PURE__ */ g(["select", "show-change"], ["update:modelValue"]),
57
+ setup(m, { emit: g }) {
58
+ let N = D(), P = g, F = E(m, "modelValue");
59
+ O(F, (e) => {
64
60
  P("show-change", e);
65
61
  });
66
- let I = p, { merged: L, checkClass: R, scrollBind: z, mergedClasses: B, optionSelectedClass: V, optionHighlightedClass: H } = r(I, { color: "primary" }), U = s(() => !I.loading && I.options.length === 0 && I.hideEmptyMessage !== !0), W = s(() => O(R.value, B.value.check));
67
- function G(e) {
62
+ let I = m, { merged: L, checkClass: R, scrollBind: z, messageBind: B, loadingBind: V, sizeClasses: H, mergedClasses: U, loadingTrackBind: W, optionSelectedClass: G, optionHighlightedClass: K } = r(I, {
63
+ size: "md",
64
+ color: "primary"
65
+ }), q = s(() => !I.loading && I.options.length === 0 && I.hideEmptyMessage !== !0), J = s(() => A(R.value, U.value.check));
66
+ function Y(e) {
68
67
  return I.isSelected?.(e) ?? !1;
69
68
  }
70
- function K(e) {
69
+ function X(e) {
71
70
  return I.highlightedIndex === e;
72
71
  }
73
- function q(e) {
72
+ function Z(e) {
74
73
  e.preventDefault();
75
74
  }
76
- function J(e, t) {
75
+ function Q(e, t) {
77
76
  let n = {
78
77
  tabindex: -1,
79
- onMousedown: q
78
+ onMousedown: Z,
79
+ class: A(H.value?.option)
80
+ };
81
+ return Y(e.value) ? n.class = A(n.class, G.value, U.value.optionSelected) : X(t) && (n.class = A(n.class, K.value, U.value.optionHighlighted)), {
82
+ interactive: n,
83
+ primary: { class: H.value?.primary },
84
+ secondary: { class: H.value?.secondary }
80
85
  };
81
- return G(e.value) ? n.class = O(V.value, B.value.optionSelected) : K(t) && (n.class = O(H.value, B.value.optionHighlighted)), { interactive: n };
82
86
  }
83
- function Y(e) {
87
+ function $(e) {
84
88
  e.disabled || P("select", e);
85
89
  }
86
- return (r, s) => (v(), c(C(a), {
90
+ return (r, s) => (b(), c(T(a), {
87
91
  modelValue: F.value,
88
92
  "onUpdate:modelValue": s[0] ||= (e) => F.value = e,
89
- "anchor-el": p.anchorEl,
90
- placement: p.placement,
93
+ "anchor-el": m.anchorEl,
94
+ placement: m.placement,
91
95
  "close-on-click-away": !0,
92
- "disable-auto-focus": p.disableAutoFocus,
93
- "custom-props": { content: C(L).customProps?.content }
96
+ "disable-auto-focus": m.disableAutoFocus,
97
+ "custom-props": { content: T(L).customProps?.content }
94
98
  }, {
95
- default: D(() => [
96
- C(e)(C(N), "beforeOptions") ? (v(), c(x(C(t)(C(N), "beforeOptions")), { key: 0 })) : l("", !0),
97
- p.loading ? (v(), u("div", A, [C(e)(C(N), "loading") ? (v(), c(x(C(t)(C(N), "loading")), { key: 0 })) : (v(), u("span", j, "Loading..."))])) : (v(), u("div", _(h({ key: 2 }, C(z))), [f(C(n), {
99
+ default: k(() => [
100
+ T(e)(T(N), "beforeOptions") ? (b(), c(C(T(t)(T(N), "beforeOptions")), { key: 0 })) : l("", !0),
101
+ m.loading ? (b(), u(o, { key: 1 }, [d("div", y(h(T(W))), [d("div", y(h(T(V))), null, 16)], 16), d("div", y(h(T(B))), [T(e)(T(N), "loading") ? (b(), c(C(T(t)(T(N), "loading")), { key: 0 })) : (b(), u("span", M, w(m.loadingMessage), 1))], 16)], 64)) : (b(), u("div", y(_({ key: 2 }, T(z))), [p(T(n), {
98
102
  dense: "",
99
103
  role: "listbox",
100
104
  padding: "none",
101
- id: p.listboxId,
102
- "aria-labelledby": p.labelledBy,
103
- "aria-multiselectable": p.multiple || void 0
105
+ id: m.listboxId,
106
+ "aria-labelledby": m.labelledBy,
107
+ "aria-multiselectable": m.multiple || void 0
104
108
  }, {
105
- default: D(() => [(v(!0), u(o, null, y(p.options, (t, n) => (v(), c(C(i), {
109
+ default: k(() => [(b(!0), u(o, null, x(m.options, (t, n) => (b(), c(T(i), {
106
110
  interactive: "",
107
111
  role: "option",
108
112
  selected: !1,
@@ -110,20 +114,20 @@ var A = {
110
114
  key: String(t.value),
111
115
  disabled: t.disabled,
112
116
  secondary: t.description,
113
- onClick: (e) => Y(t),
114
- id: `${p.listboxId}-option-${n}`,
115
- "aria-selected": G(t.value),
116
- "custom-props": J(t, n)
117
- }, d({ _: 2 }, [C(e)(C(N), "option") ? {
117
+ onClick: (e) => $(t),
118
+ id: `${m.listboxId}-option-${n}`,
119
+ "aria-selected": Y(t.value),
120
+ "custom-props": Q(t, n)
121
+ }, f({ _: 2 }, [T(e)(T(N), "option") ? {
118
122
  name: "default",
119
- fn: D(() => [b(r.$slots, "option", {
123
+ fn: k(() => [S(r.$slots, "option", {
120
124
  option: t,
121
- selected: G(t.value)
125
+ selected: Y(t.value)
122
126
  })]),
123
127
  key: "0"
124
- } : void 0, p.showCheckmark && G(t.value) ? {
128
+ } : void 0, m.showCheckmark && Y(t.value) ? {
125
129
  name: "end",
126
- fn: D(() => [f(C(k), { class: g(["size-4", W.value]) }, null, 8, ["class"])]),
130
+ fn: k(() => [p(T(j), { class: v(J.value) }, null, 8, ["class"])]),
127
131
  key: "1"
128
132
  } : void 0]), 1032, [
129
133
  "primary",
@@ -140,8 +144,8 @@ var A = {
140
144
  "aria-labelledby",
141
145
  "aria-multiselectable"
142
146
  ])], 16)),
143
- U.value && !C(e)(C(N), "empty") ? (v(), u("div", M, S(p.emptyMessage), 1)) : U.value && C(e)(C(N), "empty") ? (v(), c(x(C(t)(C(N), "empty")), { key: 4 })) : l("", !0),
144
- C(e)(C(N), "afterOptions") ? (v(), c(x(C(t)(C(N), "afterOptions")), { key: 5 })) : l("", !0)
147
+ q.value && !T(e)(T(N), "empty") ? (b(), u("div", y(_({ key: 3 }, T(B))), w(m.emptyMessage), 17)) : q.value && T(e)(T(N), "empty") ? (b(), c(C(T(t)(T(N), "empty")), { key: 4 })) : l("", !0),
148
+ T(e)(T(N), "afterOptions") ? (b(), c(C(T(t)(T(N), "afterOptions")), { key: 5 })) : l("", !0)
145
149
  ]),
146
150
  _: 3
147
151
  }, 8, [
@@ -1,12 +1,20 @@
1
1
  import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
2
2
  import { ListboxClasses, ListboxOwnProps } from '../listbox.types';
3
- type ListboxLibDefaults = LibDefaultsShape<ListboxOwnProps, "color">;
3
+ export declare const listboxBridgeKeys: readonly ["size", "color", "classes", "maxHeight", "customProps", "invalidated", "disableMaxHeight"];
4
+ type ListboxLibDefaults = LibDefaultsShape<ListboxOwnProps, "size" | "color">;
4
5
  type ListboxMerged = MergeLibDefaults<ListboxOwnProps, ListboxLibDefaults>;
5
6
  export declare function useListbox(props: ListboxOwnProps, libDefaults: ListboxLibDefaults): {
6
7
  merged: import('vue').ComputedRef<ListboxMerged>;
7
- checkClass: import('vue').ComputedRef<string | undefined>;
8
+ checkClass: import('vue').ComputedRef<string>;
8
9
  scrollBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
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
+ sizeClasses: import('vue').ComputedRef<import('@bridge-ui/core').ListboxSizeItem | undefined>;
9
13
  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
+ }>>;
10
18
  optionSelectedClass: import('vue').ComputedRef<string | undefined>;
11
19
  optionHighlightedClass: import('vue').ComputedRef<string | undefined>;
12
20
  };
@@ -2,9 +2,10 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
2
2
  import { computed as r, useAttrs as i } from "vue";
3
3
  import { get as a } from "es-toolkit/compat";
4
4
  import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
5
- import { colorProps as l, invalidatedProps as u } from "@bridge-ui/core/Components/Listbox";
5
+ import { colorProps as l, invalidatedProps as u, sizeProps as d } from "@bridge-ui/core/Components/Listbox";
6
6
  //#region src/Components/Listbox/composables/useListbox.ts
7
- var d = [
7
+ var f = [
8
+ "size",
8
9
  "color",
9
10
  "classes",
10
11
  "maxHeight",
@@ -12,36 +13,50 @@ var d = [
12
13
  "invalidated",
13
14
  "disableMaxHeight"
14
15
  ];
15
- function f(f, p) {
16
- let m = i(), h = r(() => c({
16
+ function p(p, m) {
17
+ let h = i(), g = r(() => c({
17
18
  props: {
18
- ...m,
19
- ...f
19
+ ...h,
20
+ ...p
20
21
  },
21
- bridgeKeys: d
22
- })), { merged: g, entry: _ } = t({
23
- libDefaults: p,
22
+ bridgeKeys: f
23
+ })), { merged: _, entry: v } = t({
24
+ libDefaults: m,
24
25
  componentName: "Listbox",
25
- props: () => h.value.componentProps
26
- }), v = n({
27
- entry: _,
28
- props: () => h.value.componentProps
29
- }), y = r(() => a(s(l, _.value?.customProps?.color), g.value.color ?? "primary")), b = r(() => s(u, _.value?.customProps?.invalidated)), x = r(() => g.value.invalidated ? b.value : y.value), S = r(() => x.value?.selected), C = r(() => x.value?.highlighted);
26
+ props: () => g.value.componentProps
27
+ }), y = n({
28
+ entry: v,
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
45
  return {
31
- merged: g,
32
- checkClass: r(() => x.value?.check),
33
- scrollBind: r(() => {
34
- let t = g.value.maxHeight ?? "max-h-60", n = g.value.disableMaxHeight === !0;
35
- return e(g.value.customProps?.scroll, {}, o({
36
- "overflow-y-auto overscroll-contain": !n,
37
- [t]: !n,
38
- [v.value.scroll ?? ""]: !0
39
- }));
40
- }),
41
- mergedClasses: v,
42
- optionSelectedClass: S,
43
- optionHighlightedClass: C
46
+ merged: _,
47
+ checkClass: E,
48
+ scrollBind: D,
49
+ messageBind: r(() => e({}, {}, o({
50
+ "text-gray-500": !0,
51
+ [C.value?.message ?? ""]: !0
52
+ }))),
53
+ loadingBind: k,
54
+ sizeClasses: C,
55
+ mergedClasses: y,
56
+ loadingTrackBind: O,
57
+ optionSelectedClass: w,
58
+ optionHighlightedClass: T
44
59
  };
45
60
  }
46
61
  //#endregion
47
- export { f as useListbox };
62
+ export { p as useListbox };
@@ -1,11 +1,16 @@
1
1
  import { HTMLAttributes, Slot } from 'vue';
2
- import { ListboxColor, ListboxOption, ListboxValue, MergeHtmlProps, MergeProps, PositionPlacement } from '@bridge-ui/core';
2
+ import { ListboxColor, ListboxOption, ListboxSize, ListboxValue, MergeHtmlProps, MergeProps, PositionPlacement } from '@bridge-ui/core';
3
+ export interface ListboxSizeOverrides {}
3
4
  export interface ListboxColorOverrides {}
4
5
  export interface ListboxClasses {
5
6
  /**
6
7
  * Classes merged onto the check icon.
7
8
  */
8
9
  check?: string;
10
+ /**
11
+ * Classes merged onto the indeterminate loading progress bar.
12
+ */
13
+ loading?: string;
9
14
  /**
10
15
  * Classes merged onto keyboard-highlighted options.
11
16
  */
@@ -24,6 +29,10 @@ export interface ListboxCustomProps {
24
29
  * Props forwarded to the floating menu panel.
25
30
  */
26
31
  content?: HTMLAttributes;
32
+ /**
33
+ * Props forwarded to the indeterminate loading progress bar.
34
+ */
35
+ loading?: HTMLAttributes;
27
36
  /**
28
37
  * Props forwarded to the scrollable options container.
29
38
  */
@@ -110,9 +119,18 @@ export interface ListboxOwnProps {
110
119
  */
111
120
  listboxId: string;
112
121
  /**
113
- * External loading state.
122
+ * When `true`, shows an indeterminate progress bar and loading text in the
123
+ * panel (options are hidden while loading).
124
+ *
125
+ * @default false
114
126
  */
115
127
  loading?: boolean;
128
+ /**
129
+ * Message shown while `loading` is true (ignored when the `loading` slot is set).
130
+ *
131
+ * @default "Loading..."
132
+ */
133
+ loadingMessage?: string;
116
134
  /**
117
135
  * Tailwind max-height class for the options scroll area (e.g. `max-h-80`).
118
136
  *
@@ -141,6 +159,12 @@ export interface ListboxOwnProps {
141
159
  * @default true
142
160
  */
143
161
  showCheckmark?: boolean;
162
+ /**
163
+ * Typography and option padding scale, aligned with `FormField` / `Select`.
164
+ *
165
+ * @default "md"
166
+ */
167
+ size?: MergeProps<ListboxSize, ListboxSizeOverrides>;
144
168
  }
145
169
  export interface ListboxSlots {
146
170
  /**
@@ -156,7 +180,8 @@ export interface ListboxSlots {
156
180
  */
157
181
  empty?: Slot;
158
182
  /**
159
- * Custom loading content.
183
+ * Custom loading content. Replaces the default `loadingMessage` when set.
184
+ * The progress bar still renders above this content.
160
185
  */
161
186
  loading?: Slot;
162
187
  /**
@@ -5,7 +5,7 @@ import r from "../FormField/FormField.js";
5
5
  import { useNumberField as i } from "./composables/useNumberField.js";
6
6
  import { computed as a, createBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, isRef as u, mergeModels as d, mergeProps as f, normalizeClass as p, openBlock as m, unref as h, useModel as g, vModelDynamic as _, withCtx as v, withDirectives as y } from "vue";
7
7
  import { cn as b } from "@bridge-ui/core";
8
- import { ChevronDown as x, ChevronUp as S } from "lucide-vue-next";
8
+ import { ChevronDown as x, ChevronUp as S } from "@lucide/vue";
9
9
  //#region src/Components/NumberField/NumberField.vue?vue&type=script&setup=true&lang.ts
10
10
  var C = { class: "bridge-end-adornment flex h-full min-w-9 flex-col gap-px overflow-hidden" }, w = ["disabled"], T = ["disabled"], E = /* @__PURE__ */ l({
11
11
  inheritAttrs: !1,
@@ -17,7 +17,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
17
17
  size: NonNullable<keyof import('@bridge-ui/core').FormFieldSize | undefined>;
18
18
  rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
19
19
  variant: NonNullable<keyof import('@bridge-ui/core').FormFieldVariant | undefined>;
20
- errorIcon: import('lucide-vue-next').LucideIcon;
20
+ errorIcon: import('@lucide/vue').LucideIcon;
21
21
  withErrorIcon: NonNullable<boolean | undefined>;
22
22
  }>;
23
23
  control: import('vue').ComputedRef<string>;
@@ -213,7 +213,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
213
213
  }>>;
214
214
  controlId: import('vue').ComputedRef<string>;
215
215
  errorBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
216
- errorIcon: import('vue').ComputedRef<import('lucide-vue-next').LucideIcon>;
216
+ errorIcon: import('vue').ComputedRef<import('@lucide/vue').LucideIcon>;
217
217
  inputBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {
218
218
  id: string;
219
219
  disabled: boolean;
@@ -4,7 +4,7 @@ import n from "../FormField/FormField.js";
4
4
  import { usePasswordField as r } from "./composables/usePasswordField.js";
5
5
  import { computed as i, createBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, unref as p, useModel as m, vModelDynamic as h, withCtx as g, withDirectives as _ } from "vue";
6
6
  import { cn as v } from "@bridge-ui/core";
7
- import { Eye as y, EyeOff as b } from "lucide-vue-next";
7
+ import { Eye as y, EyeOff as b } from "@lucide/vue";
8
8
  //#region src/Components/PasswordField/PasswordField.vue?vue&type=script&setup=true&lang.ts
9
9
  var x = ["disabled", "aria-label"], S = /* @__PURE__ */ c({
10
10
  inheritAttrs: !1,
@@ -15,7 +15,7 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
15
15
  size: NonNullable<keyof import('@bridge-ui/core').FormFieldSize | undefined>;
16
16
  rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
17
17
  variant: NonNullable<keyof import('@bridge-ui/core').FormFieldVariant | undefined>;
18
- errorIcon: import('lucide-vue-next').LucideIcon;
18
+ errorIcon: import('@lucide/vue').LucideIcon;
19
19
  withErrorIcon: NonNullable<boolean | undefined>;
20
20
  }>;
21
21
  control: import('vue').ComputedRef<string>;
@@ -211,7 +211,7 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
211
211
  }>>;
212
212
  controlId: import('vue').ComputedRef<string>;
213
213
  errorBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
214
- errorIcon: import('vue').ComputedRef<import('lucide-vue-next').LucideIcon>;
214
+ errorIcon: import('vue').ComputedRef<import('@lucide/vue').LucideIcon>;
215
215
  inputBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {
216
216
  id: string;
217
217
  disabled: boolean;