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

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 (49) 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 +1 -1
  9. package/dist/Components/Button/button.types.d.ts +1 -1
  10. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
  11. package/dist/Components/Chip/Chip.js +5 -0
  12. package/dist/Components/Chip/Chip.vue.d.ts +20 -0
  13. package/dist/Components/Chip/Chip.vue_vue_type_script_setup_true_lang.js +35 -0
  14. package/dist/Components/Chip/chip.types.d.ts +93 -0
  15. package/dist/Components/Chip/composables/useChip.d.ts +22 -0
  16. package/dist/Components/Chip/composables/useChip.js +66 -0
  17. package/dist/Components/Chip/index.d.ts +3 -0
  18. package/dist/Components/Chip/index.js +3 -0
  19. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  20. package/dist/Components/FormField/composables/useFormField.js +1 -1
  21. package/dist/Components/FormField/formField.types.d.ts +1 -1
  22. package/dist/Components/Icon/icon.types.d.ts +1 -1
  23. package/dist/Components/Link/link.types.d.ts +1 -1
  24. package/dist/Components/Listbox/Listbox.vue.d.ts +2 -0
  25. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +53 -49
  26. package/dist/Components/Listbox/composables/useListbox.d.ts +11 -2
  27. package/dist/Components/Listbox/composables/useListbox.js +44 -28
  28. package/dist/Components/Listbox/listbox.types.d.ts +28 -3
  29. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +1 -1
  30. package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
  31. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +1 -1
  32. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
  33. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +69 -89
  34. package/dist/Components/Select/composables/useSelect.d.ts +27 -3
  35. package/dist/Components/Select/composables/useSelect.js +162 -140
  36. package/dist/Components/Select/select.types.d.ts +22 -1
  37. package/dist/Components/Snackbar/Snackbar.vue.d.ts +1 -1
  38. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +1 -1
  39. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +1 -1
  40. package/dist/Components/Snackbar/snackbar.types.d.ts +1 -1
  41. package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +1 -1
  42. package/dist/Components/Snackbar/snackbarDefaultIcons.js +1 -1
  43. package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
  44. package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
  45. package/dist/augments.d.ts +5 -0
  46. package/dist/index.d.ts +2 -0
  47. package/dist/index.js +39 -37
  48. package/dist/theme.css +14 -0
  49. package/package.json +4 -4
@@ -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,51 @@ 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(() => e(_.value.customProps?.content, {}, o({ relative: !0 }))), O = 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
+ }), k = r(() => e({}, {
38
+ role: "progressbar",
39
+ "aria-hidden": !0
40
+ }, o({ "h-0.5 w-full shrink-0 overflow-hidden": !0 }))), A = 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: O,
49
+ contentBind: D,
50
+ messageBind: r(() => e({}, {}, o({
51
+ "text-gray-500": !0,
52
+ [C.value?.message ?? ""]: !0
53
+ }))),
54
+ loadingBind: A,
55
+ sizeClasses: C,
56
+ mergedClasses: y,
57
+ loadingTrackBind: k,
58
+ optionSelectedClass: w,
59
+ optionHighlightedClass: T
44
60
  };
45
61
  }
46
62
  //#endregion
47
- export { f as useListbox };
63
+ 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;
@@ -1,37 +1,36 @@
1
1
  import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp.js";
2
2
  import n from "../Icon/Icon.js";
3
- import r from "../FormField/FormField.js";
4
- import i from "../Listbox/Listbox.js";
5
- import { useSelect as a } from "./composables/useSelect.js";
6
- import { SELECT_OPTION_KEY as o } from "./selectInjectionKey.js";
7
- import { Fragment as s, createBlock as c, createCommentVNode as ee, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p, guardReactiveProps as m, isRef as h, mergeModels as g, mergeProps as _, normalizeProps as v, openBlock as y, provide as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as w, toDisplayString as T, unref as E, useModel as te, useTemplateRef as D, withCtx as O, withKeys as k, withModifiers as A } from "vue";
8
- import { X as j } from "lucide-vue-next";
3
+ import r from "../Chip/Chip.js";
4
+ import i from "../FormField/FormField.js";
5
+ import a from "../Listbox/Listbox.js";
6
+ import { useSelect as o } from "./composables/useSelect.js";
7
+ import { SELECT_OPTION_KEY as s } from "./selectInjectionKey.js";
8
+ import { Fragment as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, isRef as v, mergeModels as y, mergeProps as b, normalizeProps as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, toDisplayString as O, unref as k, useModel as A, useTemplateRef as j, withCtx as M, withKeys as N, withModifiers as P } from "vue";
9
+ import { X as F } from "@lucide/vue";
9
10
  //#region src/Components/Select/Select.vue?vue&type=script&setup=true&lang.ts
10
- var ne = {
11
+ var I = {
11
12
  key: 0,
12
- class: "flex min-w-0 flex-1 flex-wrap items-center gap-1"
13
- }, M = { class: "truncate" }, N = [
14
- "aria-label",
15
- "onClick",
16
- "onKeydown"
17
- ], P = {
13
+ class: "flex min-w-0 flex-1 flex-wrap items-center gap-0.5"
14
+ }, L = {
18
15
  key: 1,
19
16
  class: "flex min-w-0 flex-1 items-center gap-1"
20
- }, F = /* @__PURE__ */ p({
17
+ }, R = /* @__PURE__ */ g({
21
18
  inheritAttrs: !1,
22
19
  __name: "Select",
23
- props: /* @__PURE__ */ g({
20
+ props: /* @__PURE__ */ y({
24
21
  asyncData: {},
25
22
  clearable: {
26
23
  type: Boolean,
27
24
  default: !0
28
25
  },
26
+ customProps: {},
29
27
  defaultValue: {},
30
28
  disableMaxHeight: { type: Boolean },
31
29
  emptyMessage: { default: "No options" },
32
30
  flipOptions: { type: Boolean },
33
31
  hideEmptyMessage: { type: Boolean },
34
32
  loading: { type: Boolean },
33
+ loadingMessage: {},
35
34
  maxHeight: {},
36
35
  minItemsForSearch: { default: 11 },
37
36
  multiple: { type: Boolean },
@@ -48,7 +47,6 @@ var ne = {
48
47
  color: {},
49
48
  controlId: {},
50
49
  corner: {},
51
- customProps: {},
52
50
  description: {},
53
51
  disabled: { type: Boolean },
54
52
  end: {},
@@ -74,7 +72,7 @@ var ne = {
74
72
  modelValue: {},
75
73
  modelModifiers: {}
76
74
  }),
77
- emits: /* @__PURE__ */ g([
75
+ emits: /* @__PURE__ */ y([
78
76
  "change",
79
77
  "clear",
80
78
  "close",
@@ -84,108 +82,90 @@ var ne = {
84
82
  "select",
85
83
  "update:modelValue"
86
84
  ], ["update:modelValue"]),
87
- setup(p, { emit: g }) {
88
- let F = te(p, "modelValue"), I = p, L = g, R = D("trigger"), z = x([]);
89
- b(o, {
85
+ setup(g, { emit: y }) {
86
+ let R = A(g, "modelValue"), z = g, B = y, V = j("trigger"), H = w([]);
87
+ C(s, {
90
88
  unregister(e) {
91
- z.value = z.value.filter((t) => String(t.value) !== String(e));
89
+ H.value = H.value.filter((t) => String(t.value) !== String(e));
92
90
  },
93
91
  register(e) {
94
- z.value.some((t) => String(t.value) === String(e.value)) || (z.value = [...z.value, e]);
92
+ H.value.some((t) => String(t.value) === String(e.value)) || (H.value = [...H.value, e]);
95
93
  }
96
94
  });
97
- let { open: B, slots: V, hasValue: H, multiple: U, listboxId: W, formField: G, isLoading: K, clearable: q, clearBind: J, isSelected: Y, clearValue: X, removeChip: Z, triggerBind: Q, selectOption: re, containerRef: ie, emptyMessage: ae, clearIconSize: $, visibleOptions: oe, selectedOptions: se, highlightedIndex: ce, hideEmptyMessage: le } = a(I, F, R, L, z);
98
- return (a, o) => (y(), l(s, null, [
99
- f(E(r), { field: E(G) }, {
100
- default: O(() => [E(U) ? (y(), l("div", ne, [(y(!0), l(s, null, S(E(se), (e) => (y(), l("span", {
95
+ let { open: U, slots: W, hasValue: G, multiple: K, formField: q, clearable: J, clearBind: Y, clearValue: X, removeChip: Z, triggerBind: Q, selectOption: $, containerRef: ee, listboxProps: te, clearIconSize: ne, mergedClasses: re, selectedOptions: ie } = o(z, R, V, B, H);
96
+ return (o, s) => (S(), d(c, null, [
97
+ h(k(i), { field: k(q) }, {
98
+ default: M(() => [k(K) ? (S(), d("div", I, [(S(!0), d(c, null, T(k(ie), (e) => (S(), l(k(r), {
99
+ dismissible: "",
101
100
  key: String(e.value),
102
- class: "inline-flex max-w-full items-center gap-1 rounded-md bg-gray-100 px-2 py-0.5 text-sm text-gray-800 dark:bg-gray-700 dark:text-gray-100"
103
- }, [C(a.$slots, "chip", { option: e }, () => [u("span", M, T(e.label), 1)]), u("span", _({ ref_for: !0 }, E(J), {
104
- "aria-label": `Remove ${e.label}`,
105
- onClick: (t) => E(Z)(e, t),
106
- onKeydown: [k(A((t) => E(Z)(e, t), ["prevent"]), ["enter"]), k(A((t) => E(Z)(e, t), ["prevent"]), ["space"])]
107
- }), [f(E(n), {
108
- icon: E(j),
109
- size: E($)
110
- }, null, 8, ["icon", "size"])], 16, N)]))), 128)), u("textarea", _({ ref: "trigger" }, E(Q)), null, 16)])) : (y(), l("div", P, [u("input", _({
101
+ size: k(q).merged.value.size,
102
+ "custom-props": { clear: k(Y) },
103
+ disabled: k(q).isDisabled.value,
104
+ "clear-label": `Remove ${e.label}`,
105
+ classes: { root: k(re).chip },
106
+ onDismiss: (t) => k(Z)(e, t)
107
+ }, {
108
+ default: M(() => [E(o.$slots, "chip", { option: e }, () => [m(O(e.label), 1)])]),
109
+ _: 2
110
+ }, 1032, [
111
+ "size",
112
+ "custom-props",
113
+ "disabled",
114
+ "clear-label",
115
+ "classes",
116
+ "onDismiss"
117
+ ]))), 128)), f("textarea", b({ ref: "trigger" }, k(Q)), null, 16)])) : (S(), d("div", L, [f("input", b({
111
118
  ref: "trigger",
112
119
  class: "min-w-0 flex-1"
113
- }, E(Q)), null, 16), E(q) && E(H) && !E(G).isDisabled.value ? (y(), l("span", _({ key: 0 }, E(J), {
114
- onClick: o[0] ||= (...e) => E(X) && E(X)(...e),
120
+ }, k(Q)), null, 16), k(J) && k(G) && !k(q).isDisabled.value ? (S(), d("span", b({ key: 0 }, k(Y), {
121
+ onClick: s[0] ||= (...e) => k(X) && k(X)(...e),
115
122
  "aria-label": "Clear selection",
116
- onKeydown: [o[1] ||= k(A((...e) => E(X) && E(X)(...e), ["prevent"]), ["enter"]), o[2] ||= k(A((...e) => E(X) && E(X)(...e), ["prevent"]), ["space"])]
117
- }), [f(E(n), {
118
- icon: E(j),
119
- size: E($)
120
- }, null, 8, ["icon", "size"])], 16)) : ee("", !0)]))]),
123
+ onKeydown: [s[1] ||= N(P((...e) => k(X) && k(X)(...e), ["prevent"]), ["enter"]), s[2] ||= N(P((...e) => k(X) && k(X)(...e), ["prevent"]), ["space"])]
124
+ }), [h(k(n), {
125
+ icon: k(F),
126
+ size: k(ne)
127
+ }, null, 8, ["icon", "size"])], 16)) : u("", !0)]))]),
121
128
  _: 3
122
129
  }, 8, ["field"]),
123
- f(E(i), {
124
- modelValue: E(B),
125
- "onUpdate:modelValue": o[3] ||= (e) => h(B) ? B.value = e : null,
126
- loading: E(K),
127
- multiple: E(U),
128
- "listbox-id": E(W),
129
- "anchor-el": E(ie),
130
- options: E(oe),
131
- "is-selected": E(Y),
132
- onSelect: E(re),
133
- "disable-auto-focus": !0,
134
- "empty-message": E(ae),
135
- "max-height": I.maxHeight,
136
- color: E(G).merged.value.color,
137
- "highlighted-index": E(ce),
138
- "hide-empty-message": E(le),
139
- "labelled-by": E(G).controlId.value,
140
- invalidated: E(G).invalidated.value,
141
- "disable-max-height": I.disableMaxHeight
142
- }, d({ _: 2 }, [
143
- E(e)(E(V), "beforeOptions") ? {
130
+ h(k(a), b(k(te), {
131
+ modelValue: k(U),
132
+ "onUpdate:modelValue": s[3] ||= (e) => v(U) ? U.value = e : null,
133
+ "anchor-el": k(ee),
134
+ onSelect: k($)
135
+ }), p({ _: 2 }, [
136
+ k(e)(k(W), "beforeOptions") ? {
144
137
  name: "beforeOptions",
145
- fn: O(() => [(y(), c(w(E(t)(E(V), "beforeOptions"))))]),
138
+ fn: M(() => [(S(), l(D(k(t)(k(W), "beforeOptions"))))]),
146
139
  key: "0"
147
140
  } : void 0,
148
- E(e)(E(V), "loading") ? {
141
+ k(e)(k(W), "loading") ? {
149
142
  name: "loading",
150
- fn: O(() => [(y(), c(w(E(t)(E(V), "loading"))))]),
143
+ fn: M(() => [(S(), l(D(k(t)(k(W), "loading"))))]),
151
144
  key: "1"
152
145
  } : void 0,
153
- E(e)(E(V), "option") ? {
146
+ k(e)(k(W), "option") ? {
154
147
  name: "option",
155
- fn: O((e) => [C(a.$slots, "option", v(m(e)))]),
148
+ fn: M((e) => [E(o.$slots, "option", x(_(e)))]),
156
149
  key: "2"
157
150
  } : void 0,
158
- E(e)(E(V), "empty") ? {
151
+ k(e)(k(W), "empty") ? {
159
152
  name: "empty",
160
- fn: O(() => [(y(), c(w(E(t)(E(V), "empty"))))]),
153
+ fn: M(() => [(S(), l(D(k(t)(k(W), "empty"))))]),
161
154
  key: "3"
162
155
  } : void 0,
163
- E(e)(E(V), "afterOptions") ? {
156
+ k(e)(k(W), "afterOptions") ? {
164
157
  name: "afterOptions",
165
- fn: O(() => [(y(), c(w(E(t)(E(V), "afterOptions"))))]),
158
+ fn: M(() => [(S(), l(D(k(t)(k(W), "afterOptions"))))]),
166
159
  key: "4"
167
160
  } : void 0
168
- ]), 1032, [
161
+ ]), 1040, [
169
162
  "modelValue",
170
- "loading",
171
- "multiple",
172
- "listbox-id",
173
163
  "anchor-el",
174
- "options",
175
- "is-selected",
176
- "onSelect",
177
- "empty-message",
178
- "max-height",
179
- "color",
180
- "highlighted-index",
181
- "hide-empty-message",
182
- "labelled-by",
183
- "invalidated",
184
- "disable-max-height"
164
+ "onSelect"
185
165
  ]),
186
- C(a.$slots, "default")
166
+ E(o.$slots, "default")
187
167
  ], 64));
188
168
  }
189
169
  });
190
170
  //#endregion
191
- export { F as default };
171
+ export { R as default };
@@ -1,6 +1,6 @@
1
1
  import { Ref, SetupContext } from 'vue';
2
2
  import { FormFieldOwnProps } from '../../FormField/formField.types';
3
- import { SelectEmits, SelectOption, SelectOwnProps, SelectValue } from '../select.types';
3
+ import { SelectClasses, SelectEmits, SelectOption, SelectOwnProps, SelectValue } from '../select.types';
4
4
  export declare function useSelect(props: SelectOwnProps, model: Ref<null | undefined | SelectValue | SelectValue[]>, triggerRef: Ref<null | HTMLInputElement | HTMLTextAreaElement>, emit: SetupContext<SelectEmits>["emit"], declarativeOptions: Ref<SelectOption[]>): {
5
5
  open: Ref<boolean, boolean>;
6
6
  slots: Readonly<{
@@ -18,7 +18,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
18
18
  size: NonNullable<keyof import('@bridge-ui/core').FormFieldSize | undefined>;
19
19
  rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
20
20
  variant: NonNullable<keyof import('@bridge-ui/core').FormFieldVariant | undefined>;
21
- errorIcon: import('lucide-vue-next').LucideIcon;
21
+ errorIcon: import('@lucide/vue').LucideIcon;
22
22
  withErrorIcon: NonNullable<boolean | undefined>;
23
23
  }>;
24
24
  control: import('vue').ComputedRef<string>;
@@ -214,7 +214,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
214
214
  }>>;
215
215
  controlId: import('vue').ComputedRef<string>;
216
216
  errorBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
217
- errorIcon: import('vue').ComputedRef<import('lucide-vue-next').LucideIcon>;
217
+ errorIcon: import('vue').ComputedRef<import('@lucide/vue').LucideIcon>;
218
218
  inputBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {
219
219
  id: string;
220
220
  disabled: boolean;
@@ -723,11 +723,35 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
723
723
  }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "description" | "errorMessage" | "readonly" | "required" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>>;
724
724
  selectOption: (option: SelectOption) => void;
725
725
  containerRef: Ref<HTMLElement | null, HTMLElement | null>;
726
+ listboxProps: import('vue').ComputedRef<{
727
+ listboxId: string;
728
+ isSelected: (value: SelectValue) => boolean;
729
+ loading: boolean;
730
+ multiple: boolean;
731
+ options: import('@bridge-ui/core').ListboxOption[];
732
+ labelledBy: string;
733
+ highlightedIndex: number;
734
+ invalidated: boolean;
735
+ color: "dark" | "error" | "info" | "primary" | "secondary" | "success" | "warning";
736
+ size: "2xl" | "2xs" | "lg" | "md" | "sm" | "xl" | "xs";
737
+ classes?: import('../../Listbox').ListboxClasses;
738
+ customProps?: import('../../Listbox').ListboxCustomProps;
739
+ disableAutoFocus: boolean;
740
+ placement?: import('@floating-ui/utils').Placement;
741
+ disableMaxHeight: boolean;
742
+ emptyMessage: string;
743
+ hideEmptyMessage: boolean;
744
+ loadingMessage: string;
745
+ maxHeight: string;
746
+ showCheckmark?: boolean;
747
+ }>;
726
748
  clearIconSize: import('vue').ComputedRef<keyof import('@bridge-ui/core').IconSize>;
749
+ mergedClasses: import('vue').ComputedRef<Partial<SelectClasses>>;
727
750
  visibleOptions: import('vue').ComputedRef<import('@bridge-ui/core').ListboxOption[]>;
728
751
  isSearchActive: import('vue').ComputedRef<boolean>;
729
752
  selectedOptions: import('vue').ComputedRef<import('@bridge-ui/core').ListboxOption[]>;
730
753
  highlightedIndex: Ref<number, number>;
731
754
  emptyMessage: import('vue').ComputedRef<string>;
732
755
  hideEmptyMessage: import('vue').ComputedRef<boolean>;
756
+ loadingMessage: import('vue').ComputedRef<string>;
733
757
  };