@bridge-ui/vue 0.0.6 → 0.0.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 (110) hide show
  1. package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +8 -8
  2. package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +5 -5
  3. package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +17 -17
  4. package/dist/Adapters/I18n/index.d.ts +1 -1
  5. package/dist/Adapters/I18n/index.js +2 -2
  6. package/dist/Adapters/I18n/useI18nAdapter.d.ts +7 -3
  7. package/dist/Adapters/I18n/useI18nAdapter.js +12 -7
  8. package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
  9. package/dist/Adapters/index.d.ts +1 -1
  10. package/dist/Adapters/index.js +3 -3
  11. package/dist/Components/Alert/composables/useAlert.js +17 -17
  12. package/dist/Components/Autocomplete/Autocomplete.js +5 -0
  13. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +40 -0
  14. package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +197 -0
  15. package/dist/Components/Autocomplete/AutocompleteOption.js +5 -0
  16. package/dist/Components/Autocomplete/AutocompleteOption.vue.d.ts +4 -0
  17. package/dist/Components/Autocomplete/AutocompleteOption.vue_vue_type_script_setup_true_lang.js +32 -0
  18. package/dist/Components/Autocomplete/autocomplete.types.d.ts +285 -0
  19. package/dist/Components/Autocomplete/autocompleteInjectionKey.d.ts +7 -0
  20. package/dist/Components/Autocomplete/autocompleteInjectionKey.js +4 -0
  21. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +762 -0
  22. package/dist/Components/Autocomplete/composables/useAutocomplete.js +382 -0
  23. package/dist/Components/Autocomplete/index.d.ts +4 -0
  24. package/dist/Components/Autocomplete/index.js +4 -0
  25. package/dist/Components/Avatar/composables/useAvatar.js +13 -13
  26. package/dist/Components/Badge/composables/useBadge.js +8 -8
  27. package/dist/Components/Button/composables/useButton.js +14 -14
  28. package/dist/Components/Card/composables/useCard.js +27 -27
  29. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -2
  30. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +3 -3
  31. package/dist/Components/Checkbox/composables/useCheckbox.js +9 -9
  32. package/dist/Components/Chip/composables/useChip.js +6 -6
  33. package/dist/Components/Divider/composables/useDivider.js +5 -5
  34. package/dist/Components/Drawer/composables/useDrawer.js +23 -23
  35. package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/Components/FormControl/composables/useFormControl.d.ts +3 -3
  37. package/dist/Components/FormControl/composables/useFormControl.js +12 -12
  38. package/dist/Components/FormControl/formControl.types.d.ts +6 -6
  39. package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  40. package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  41. package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  42. package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  43. package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  44. package/dist/Components/FormField/composables/useFormField.d.ts +3 -3
  45. package/dist/Components/FormField/composables/useFormField.js +28 -28
  46. package/dist/Components/FormField/formField.types.d.ts +14 -14
  47. package/dist/Components/Icon/composables/useIcon.js +5 -5
  48. package/dist/Components/Label/composables/useLabel.js +5 -5
  49. package/dist/Components/Link/composables/useLink.js +9 -9
  50. package/dist/Components/List/composables/useList.js +6 -6
  51. package/dist/Components/ListItem/composables/useListItem.js +20 -20
  52. package/dist/Components/ListSection/composables/useListSection.js +8 -8
  53. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +28 -28
  54. package/dist/Components/Listbox/composables/useListbox.js +7 -7
  55. package/dist/Components/Listbox/index.js +3 -3
  56. package/dist/Components/Menu/composables/useMenu.js +43 -43
  57. package/dist/Components/Modal/composables/useModal.js +18 -18
  58. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +34 -34
  59. package/dist/Components/NumberField/composables/useNumberField.d.ts +4 -4
  60. package/dist/Components/NumberField/composables/useNumberField.js +9 -9
  61. package/dist/Components/OtpField/OtpField.js +5 -0
  62. package/dist/Components/OtpField/OtpField.vue.d.ts +31 -0
  63. package/dist/Components/OtpField/OtpField.vue_vue_type_script_setup_true_lang.js +80 -0
  64. package/dist/Components/OtpField/OtpFieldLabel.js +5 -0
  65. package/dist/Components/OtpField/OtpFieldLabel.vue.d.ts +7 -0
  66. package/dist/Components/OtpField/OtpFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
  67. package/dist/Components/OtpField/composables/useOtpField.d.ts +460 -0
  68. package/dist/Components/OtpField/composables/useOtpField.js +212 -0
  69. package/dist/Components/OtpField/index.d.ts +4 -0
  70. package/dist/Components/OtpField/index.js +3 -0
  71. package/dist/Components/OtpField/otpField.types.d.ts +290 -0
  72. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +23 -23
  73. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +4 -4
  74. package/dist/Components/PasswordField/composables/usePasswordField.js +2 -2
  75. package/dist/Components/Progress/composables/useProgress.js +11 -11
  76. package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -2
  77. package/dist/Components/Radio/composables/useRadio.d.ts +3 -3
  78. package/dist/Components/Radio/composables/useRadio.js +9 -9
  79. package/dist/Components/Select/Select.vue.d.ts +1 -1
  80. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +16 -13
  81. package/dist/Components/Select/composables/useSelect.d.ts +4 -4
  82. package/dist/Components/Select/composables/useSelect.js +161 -161
  83. package/dist/Components/Skeleton/composables/useSkeleton.js +5 -5
  84. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +54 -54
  85. package/dist/Components/Snackbar/composables/useSnackbar.js +115 -115
  86. package/dist/Components/Spinner/composables/useSpinner.js +11 -11
  87. package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -2
  88. package/dist/Components/Switch/composables/useSwitch.d.ts +3 -3
  89. package/dist/Components/Switch/composables/useSwitch.js +9 -9
  90. package/dist/Components/Tab/composables/useTab.js +11 -11
  91. package/dist/Components/TabList/composables/useTabList.js +7 -7
  92. package/dist/Components/TabPanel/composables/useTabPanel.js +7 -7
  93. package/dist/Components/Tabs/composables/useTabs.js +22 -22
  94. package/dist/Components/TextField/TextField.vue.d.ts +1 -1
  95. package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +6 -6
  96. package/dist/Components/TextField/composables/useTextField.d.ts +4 -4
  97. package/dist/Components/TextField/composables/useTextField.js +1 -1
  98. package/dist/Components/Textarea/Textarea.vue.d.ts +1 -1
  99. package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +6 -6
  100. package/dist/Components/Textarea/composables/useTextarea.d.ts +4 -4
  101. package/dist/Components/Textarea/composables/useTextarea.js +9 -9
  102. package/dist/Components/Tooltip/composables/useTooltip.js +17 -17
  103. package/dist/Provider/bridgeUITypes.d.ts +4 -1
  104. package/dist/Provider/createBridgeUIApi.js +13 -1
  105. package/dist/Utils/index.js +7 -7
  106. package/dist/Utils/useBreakpoint.js +7 -7
  107. package/dist/augments.d.ts +2 -2
  108. package/dist/index.d.ts +6 -2
  109. package/dist/index.js +84 -80
  110. package/package.json +3 -2
@@ -1,14 +1,14 @@
1
- import { useI18nAdapter as e } from "../../../Adapters/I18n/useI18nAdapter.js";
1
+ import { useResolveMessage as e } from "../../../Adapters/I18n/useI18nAdapter.js";
2
2
  import { hasNamedSlot as t } from "../../../Utils/slotOrProp.js";
3
3
  import { mergePartBind as n, resolveFieldAdornmentIconSize as r, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as i } from "../../../Utils/index.js";
4
4
  import { formFieldBridgeKeys as te, useFormField as ne } from "../../FormField/composables/useFormField.js";
5
5
  import { useListboxNavigation as re } from "../../Listbox/composables/useListboxNavigation.js";
6
- import { Comment as ie, Text as ae, computed as a, nextTick as o, onBeforeUnmount as oe, onMounted as se, ref as s, useAttrs as ce, useId as le, useSlots as ue, watch as c } from "vue";
7
- import { get as l, isNil as de, omit as fe } from "es-toolkit/compat";
8
- import { adjustAutosizeTextareaHeight as pe, cn as u, createSelectAsyncSearch as me, filterListboxEntries as he, flattenListboxOptions as d, mergeBridgeUILayeredClasses as f, normalizeListboxEntries as p, normalizeSelectOptions as ge, resolveMessage as m, resolveSelectAsyncDebounce as _e, resolveSelectAsyncOptions as ve, selectValuesEqual as h, splitComponentProps as ye } from "@bridge-ui/core";
9
- import { colorProps as be, invalidatedProps as xe } from "@bridge-ui/core/Tokens/Listbox";
6
+ import { Comment as ie, Text as ae, computed as a, nextTick as oe, onBeforeUnmount as se, onMounted as ce, ref as o, useAttrs as le, useId as ue, useSlots as de, watch as s } from "vue";
7
+ import { adjustAutosizeTextareaHeight as fe, cn as c, createSelectAsyncSearch as pe, filterListboxEntries as me, flattenListboxOptions as l, mergeBridgeUILayeredClasses as u, normalizeListboxEntries as he, normalizeSelectOptions as ge, resolveSelectAsyncDebounce as _e, resolveSelectAsyncOptions as ve, selectValuesEqual as d, splitComponentProps as ye } from "@bridge-ui/core";
8
+ import { get as f, isNil as be, omit as xe } from "es-toolkit/compat";
9
+ import { colorProps as Se, invalidatedProps as Ce } from "@bridge-ui/core/Tokens/Listbox";
10
10
  //#region src/Components/Select/composables/useSelect.ts
11
- var Se = [
11
+ var we = [
12
12
  "classes",
13
13
  "loading",
14
14
  "options",
@@ -29,92 +29,92 @@ var Se = [
29
29
  "minItemsForSearch",
30
30
  "optionDescription"
31
31
  ];
32
- function g(g, _, v, y, b) {
33
- let Ce = ce(), x = ue(), S = e(), C = le(), w = s(!1), T = s(""), E = s(-1), we = s(null), D = s(!1), O = s([]), k = null, A = s([]), Te = a(() => ye({
34
- bridgeKeys: Se,
32
+ function p(p, m, h, g, _) {
33
+ let Te = le(), v = de(), y = ue(), b = e(), x = o(!1), S = o(""), C = o(-1), w = o(null), T = o(!1), E = o([]), D = null, O = o([]), k = a(() => ye({
34
+ bridgeKeys: we,
35
35
  props: {
36
- ...Ce,
37
- ...g
36
+ ...Te,
37
+ ...p
38
38
  }
39
- })), j = a(() => Te.value.componentProps), Ee = a(() => ({ classes: j.value.classes })), { components: M, entry: De } = ee({
39
+ })), A = a(() => k.value.componentProps), j = a(() => ({ classes: A.value.classes })), { components: M, entry: Ee } = ee({
40
40
  componentName: "Select",
41
- props: () => Ee.value
41
+ props: () => j.value
42
42
  }), N = i({
43
- entry: De,
44
- props: () => Ee.value
45
- }), P = a(() => !!j.value.multiple), F = a(() => ({
46
- optionLabel: j.value.optionLabel ?? "label",
47
- optionValue: j.value.optionValue ?? "value",
48
- optionDescription: j.value.optionDescription ?? "description"
49
- })), I = a(() => b.value.length > 0 ? b.value.map((e) => ({
43
+ entry: Ee,
44
+ props: () => j.value
45
+ }), P = a(() => !!A.value.multiple), F = a(() => ({
46
+ optionLabel: A.value.optionLabel ?? "label",
47
+ optionValue: A.value.optionValue ?? "value",
48
+ optionDescription: A.value.optionDescription ?? "description"
49
+ })), I = a(() => _.value.length > 0 ? _.value.map((e) => ({
50
50
  option: e,
51
51
  type: "option"
52
- })) : p(j.value.options, F.value)), Oe = a(() => d(I.value)), L = s([]);
53
- function ke(e) {
52
+ })) : he(A.value.options, F.value)), De = a(() => l(I.value)), L = o([]);
53
+ function Oe(e) {
54
54
  if (!e || typeof e != "object") return !1;
55
55
  let t = e.type;
56
56
  if (!t || typeof t != "object") return !1;
57
57
  let n = t.name, r = t.__name;
58
58
  return n === "SelectOption" || r === "SelectOption";
59
59
  }
60
- function Ae() {
61
- return t(x, "default") ? (x.default?.({}) ?? []).some((e) => {
60
+ function ke() {
61
+ return t(v, "default") ? (v.default?.({}) ?? []).some((e) => {
62
62
  if (!e || typeof e != "object") return !1;
63
63
  let t = e.type;
64
- return t === ie || t === ae || t === void 0 || typeof t == "symbol" ? !1 : !ke(e);
64
+ return t === ie || t === ae || t === void 0 || typeof t == "symbol" ? !1 : !Oe(e);
65
65
  }) : !1;
66
66
  }
67
- let R = a(() => Ae() && !j.value.options?.length), z = a(() => {
67
+ let R = a(() => ke() && !A.value.options?.length), z = a(() => {
68
68
  if (R.value) return [];
69
- if (O.value.length > 0) {
70
- let e = p(O.value, F.value);
71
- return j.value.flipOptions ? [...e].reverse() : e;
69
+ if (E.value.length > 0) {
70
+ let e = he(E.value, F.value);
71
+ return A.value.flipOptions ? [...e].reverse() : e;
72
72
  }
73
- return j.value.flipOptions ? [...I.value].reverse().map((e) => e.type === "section" ? {
73
+ return A.value.flipOptions ? [...I.value].reverse().map((e) => e.type === "section" ? {
74
74
  ...e,
75
75
  options: [...e.options].reverse()
76
76
  } : e) : I.value;
77
- }), je = a(() => R.value ? L.value : d(z.value)), B = a(() => {
78
- let e = _.value;
79
- return P.value ? Array.isArray(e) ? e : [] : !de(e) && e !== "" ? [e] : [];
77
+ }), Ae = a(() => R.value ? L.value : l(z.value)), B = a(() => {
78
+ let e = m.value;
79
+ return P.value ? Array.isArray(e) ? e : [] : !be(e) && e !== "" ? [e] : [];
80
80
  }), V = a(() => {
81
81
  let e = /* @__PURE__ */ new Map();
82
- for (let t of [...je.value, ...A.value]) e.set(t.value, t);
82
+ for (let t of [...Ae.value, ...O.value]) e.set(t.value, t);
83
83
  return B.value.map((t) => e.get(t) ?? {
84
84
  value: t,
85
85
  label: String(t)
86
86
  });
87
- }), Me = a(() => B.value.length > 0), Ne = a(() => j.value.clearable !== !1), H = a(() => !!j.value.asyncData), U = a(() => {
88
- if (H.value || j.value.searchable) return !0;
89
- let e = j.value.minItemsForSearch ?? 11;
90
- return Oe.value.length >= e;
91
- }), W = a(() => w.value && U.value), Pe = a(() => !!j.value.loading || D.value), Fe = a(() => {
87
+ }), je = a(() => B.value.length > 0), Me = a(() => A.value.clearable !== !1), H = a(() => !!A.value.asyncData), U = a(() => {
88
+ if (H.value || A.value.searchable) return !0;
89
+ let e = A.value.minItemsForSearch ?? 11;
90
+ return De.value.length >= e;
91
+ }), W = a(() => x.value && U.value), Ne = a(() => !!A.value.loading || T.value), Pe = a(() => {
92
92
  if (R.value) return [];
93
- if (!W.value || !T.value.trim()) return z.value;
94
- let e = T.value.trim().toLowerCase();
95
- return he(z.value, (t) => t.label.toLowerCase().includes(e));
96
- }), G = a(() => R.value ? L.value : d(Fe.value)), K = re(() => G.value, E, C), Ie = a(() => g.readonly || g.disabled ? !0 : !W.value), Le = a(() => W.value || P.value ? T.value : V.value[0]?.label ?? ""), Re = (e) => {
97
- we.value = e instanceof HTMLElement ? e : null;
93
+ if (!W.value || !S.value.trim()) return z.value;
94
+ let e = S.value.trim().toLowerCase();
95
+ return me(z.value, (t) => t.label.toLowerCase().includes(e));
96
+ }), G = a(() => R.value ? L.value : l(Pe.value)), K = re(() => G.value, C, y), Fe = a(() => p.readonly || p.disabled ? !0 : !W.value), Ie = a(() => W.value || P.value ? S.value : V.value[0]?.label ?? ""), Le = (e) => {
97
+ w.value = e instanceof HTMLElement ? e : null;
98
98
  };
99
- function ze(e) {
99
+ function Re(e) {
100
100
  e.preventDefault();
101
101
  }
102
- function Be(e) {
103
- if (g.disabled || g.readonly) return;
102
+ function ze(e) {
103
+ if (p.disabled || p.readonly) return;
104
104
  let t = e.target;
105
105
  if (!t.closest("[data-select-clear]") && !(t.closest(".wrapper-start-slot") || t.closest(".wrapper-end-slot"))) {
106
- if (!w.value) {
106
+ if (!x.value) {
107
107
  Q();
108
108
  return;
109
109
  }
110
- W.value || ($(), v.value?.focus({ preventScroll: !0 }));
110
+ W.value || ($(), h.value?.focus({ preventScroll: !0 }));
111
111
  }
112
112
  }
113
- let Ve = a(() => {
113
+ let Be = a(() => {
114
114
  let e = ye({
115
115
  bridgeKeys: te,
116
- props: fe(Te.value.inheritedAttrs, ["class"])
117
- }).componentProps, r = e.endIcon ?? (t(x, "end") ? void 0 : "chevronUpDown"), { listbox: ee, ...i } = e.customProps ?? {};
116
+ props: xe(k.value.inheritedAttrs, ["class"])
117
+ }).componentProps, r = e.endIcon ?? (t(v, "end") ? void 0 : "chevronUpDown"), { listbox: ee, ...i } = e.customProps ?? {};
118
118
  return {
119
119
  ...e,
120
120
  endIcon: r,
@@ -122,97 +122,97 @@ function g(g, _, v, y, b) {
122
122
  customProps: {
123
123
  ...i,
124
124
  container: n(i.container, {}, {
125
- ref: Re,
126
- onClick: Be,
127
- class: u({ "cursor-pointer": !g.disabled && !g.readonly && !W.value })
125
+ ref: Le,
126
+ onClick: ze,
127
+ class: c({ "cursor-pointer": !p.disabled && !p.readonly && !W.value })
128
128
  })
129
129
  }
130
130
  };
131
- }), He = a(() => g.customProps?.listbox), q = ne(() => Ve.value, {
131
+ }), Ve = a(() => p.customProps?.listbox), q = ne(() => Be.value, {
132
132
  size: "md",
133
133
  rounded: "md",
134
134
  color: "primary",
135
135
  variant: "outline",
136
- withErrorIcon: !0
136
+ showErrorIcon: !0
137
137
  }, {
138
138
  likeInput: () => P.value,
139
139
  control: () => P.value ? "textarea" : "input"
140
140
  }), J = (e) => {
141
- !e || !P.value || pe(e);
141
+ !e || !P.value || fe(e);
142
142
  };
143
143
  function Y(e) {
144
- return B.value.some((t) => h(t, e));
144
+ return B.value.some((t) => d(t, e));
145
145
  }
146
146
  function X(e) {
147
- _.value = e;
147
+ m.value = e;
148
148
  }
149
149
  function Z(e) {
150
150
  if (P.value) {
151
151
  let t = Array.isArray(e) ? e : [];
152
- y("update:modelValue", t), y("change", t);
152
+ g("update:modelValue", t), g("change", t);
153
153
  return;
154
154
  }
155
155
  let t = e ?? "";
156
- y("update:modelValue", t), y("change", t);
156
+ g("update:modelValue", t), g("change", t);
157
157
  }
158
158
  function Q() {
159
- g.disabled || g.readonly || w.value || (w.value = !0, T.value = "", K.highlightCurrentSelection(Y), y("open"), H.value && j.value.asyncData && k?.searchImmediate(""));
159
+ p.disabled || p.readonly || x.value || (x.value = !0, S.value = "", K.highlightCurrentSelection(Y), g("open"), H.value && A.value.asyncData && D?.searchImmediate(""));
160
160
  }
161
161
  function $() {
162
- k?.cancel(), w.value && (w.value = !1, T.value = "", E.value = -1, y("close"));
162
+ D?.cancel(), x.value && (x.value = !1, S.value = "", C.value = -1, g("close"));
163
163
  }
164
- function Ue(e) {
164
+ function He(e) {
165
165
  if (!e.disabled) {
166
166
  if (P.value) {
167
- let t = [...B.value], n = t.findIndex((t) => h(t, e.value));
168
- n >= 0 ? (t.splice(n, 1), y("deselect", e)) : (t.push(e.value), y("select", e)), X(t), Z(t), T.value = "", E.value = -1, o(() => {
169
- J(v.value), v.value?.focus({ preventScroll: !0 });
167
+ let t = [...B.value], n = t.findIndex((t) => d(t, e.value));
168
+ n >= 0 ? (t.splice(n, 1), g("deselect", e)) : (t.push(e.value), g("select", e)), X(t), Z(t), S.value = "", C.value = -1, oe(() => {
169
+ J(h.value), h.value?.focus({ preventScroll: !0 });
170
170
  });
171
171
  return;
172
172
  }
173
- X(e.value), Z(e.value), y("select", e), $();
173
+ X(e.value), Z(e.value), g("select", e), $();
174
174
  }
175
175
  }
176
- function We(e) {
177
- e?.preventDefault(), e?.stopPropagation(), P.value ? (X([]), Z([])) : (X(null), Z(null)), y("clear"), $();
176
+ function Ue(e) {
177
+ e?.preventDefault(), e?.stopPropagation(), P.value ? (X([]), Z([])) : (X(null), Z(null)), g("clear"), $();
178
178
  }
179
- function Ge(e, t) {
179
+ function We(e, t) {
180
180
  if (t.preventDefault(), t.stopPropagation(), !P.value) return;
181
- let n = B.value.filter((t) => !h(t, e.value));
182
- X(n), Z(n), y("deselect", e), o(() => J(v.value));
181
+ let n = B.value.filter((t) => !d(t, e.value));
182
+ X(n), Z(n), g("deselect", e), oe(() => J(h.value));
183
183
  }
184
- function Ke() {
184
+ function Ge() {
185
185
  let e = K.getHighlightedOption();
186
- e && Ue(e);
186
+ e && He(e);
187
187
  }
188
- function qe(e) {
189
- T.value = e.target.value, y("search", T.value), w.value || Q(), K.resetHighlight(), H.value && k?.searchDebounced(T.value);
188
+ function Ke(e) {
189
+ S.value = e.target.value, g("search", S.value), x.value || Q(), K.resetHighlight(), H.value && D?.searchDebounced(S.value);
190
190
  }
191
- function Je(e) {
192
- if (!(g.disabled || g.readonly)) switch (e.key) {
191
+ function qe(e) {
192
+ if (!(p.disabled || p.readonly)) switch (e.key) {
193
193
  case "ArrowDown":
194
- e.preventDefault(), w.value ? K.moveHighlight(1) : Q();
194
+ e.preventDefault(), x.value ? K.moveHighlight(1) : Q();
195
195
  break;
196
196
  case "ArrowUp":
197
- e.preventDefault(), w.value ? K.moveHighlight(-1) : Q();
197
+ e.preventDefault(), x.value ? K.moveHighlight(-1) : Q();
198
198
  break;
199
199
  case "Enter":
200
- e.preventDefault(), w.value ? Ke() : Q();
200
+ e.preventDefault(), x.value ? Ge() : Q();
201
201
  break;
202
202
  case "Escape":
203
203
  e.preventDefault(), $();
204
204
  break;
205
205
  case "Home":
206
- w.value && (e.preventDefault(), K.highlightFirst());
206
+ x.value && (e.preventDefault(), K.highlightFirst());
207
207
  break;
208
208
  case "End":
209
- w.value && (e.preventDefault(), K.highlightLast());
209
+ x.value && (e.preventDefault(), K.highlightLast());
210
210
  break;
211
211
  case "Backspace":
212
- if (P.value && !T.value && V.value.length > 0) {
212
+ if (P.value && !S.value && V.value.length > 0) {
213
213
  e.preventDefault();
214
214
  let t = V.value.at(-1);
215
- t && Ge(t, e);
215
+ t && We(t, e);
216
216
  }
217
217
  break;
218
218
  case "Tab":
@@ -221,141 +221,141 @@ function g(g, _, v, y, b) {
221
221
  default: break;
222
222
  }
223
223
  }
224
- async function Ye(e) {
225
- let t = j.value.asyncData;
224
+ async function Je(e) {
225
+ let t = A.value.asyncData;
226
226
  if (t) {
227
- D.value = !0;
227
+ T.value = !0;
228
228
  try {
229
229
  let { options: n, resolvedSelected: r } = await ve(t, e, B.value, (e) => ge(e, F.value));
230
- r.length > 0 && (A.value = r), O.value = n;
230
+ r.length > 0 && (O.value = r), E.value = n;
231
231
  } finally {
232
- D.value = !1;
232
+ T.value = !1;
233
233
  }
234
234
  }
235
235
  }
236
- async function Xe() {
237
- let e = j.value.asyncData;
238
- !e?.resolve || B.value.length === 0 || (A.value = ge(await e.resolve(B.value), F.value));
236
+ async function Ye() {
237
+ let e = A.value.asyncData;
238
+ !e?.resolve || B.value.length === 0 || (O.value = ge(await e.resolve(B.value), F.value));
239
239
  }
240
- let Ze = a(() => {
241
- let e = l(f(be, l(M.value, [
240
+ let Xe = a(() => {
241
+ let e = f(u(Se, f(M.value, [
242
242
  "Listbox",
243
243
  "tokens",
244
244
  "color"
245
245
  ])), q.merged.value.color ?? "primary");
246
- return q.invalidated.value ? f(xe, l(M.value, [
246
+ return q.invalidated.value ? u(Ce, f(M.value, [
247
247
  "Listbox",
248
248
  "tokens",
249
249
  "invalidated"
250
250
  ])) : e;
251
- }), Qe = a(() => Ze.value?.value), $e = a(() => {
252
- let e = !g.disabled && !g.readonly && !W.value, t = !g.disabled && !g.readonly && W.value && U.value, r = Me.value && !P.value && !W.value;
251
+ }), Ze = a(() => Xe.value?.value), Qe = a(() => {
252
+ let e = !p.disabled && !p.readonly && !W.value, t = !p.disabled && !p.readonly && W.value && U.value, r = je.value && !P.value && !W.value;
253
253
  return n({
254
254
  role: "combobox",
255
- value: Le.value,
256
- "aria-controls": C,
257
- "aria-expanded": w.value,
258
- readonly: Ie.value,
259
- onKeydown: Je,
260
- placeholder: j.value.placeholder,
255
+ value: Ie.value,
256
+ "aria-controls": y,
257
+ "aria-expanded": x.value,
258
+ readonly: Fe.value,
259
+ onKeydown: qe,
260
+ placeholder: A.value.placeholder,
261
261
  "aria-autocomplete": U.value ? "list" : void 0,
262
- "aria-activedescendant": w.value ? K.activeDescendantId.value : void 0,
262
+ "aria-activedescendant": x.value ? K.activeDescendantId.value : void 0,
263
263
  ...P.value ? {
264
264
  rows: 1,
265
265
  onInput: (e) => {
266
- qe(e), J(e.target);
266
+ Ke(e), J(e.target);
267
267
  }
268
- } : { onInput: qe }
269
- }, q.inputBind.value, u({
268
+ } : { onInput: Ke }
269
+ }, q.inputBind.value, c({
270
270
  "cursor-text": t,
271
271
  "cursor-pointer": e,
272
272
  "resize-none overflow-hidden": P.value,
273
- [u(Qe.value, N.value.value) ?? ""]: r
273
+ [c(Ze.value, N.value.value) ?? ""]: r
274
274
  }));
275
275
  });
276
- c(() => [
277
- w.value,
276
+ s(() => [
277
+ x.value,
278
278
  P.value,
279
- v.value
279
+ h.value
280
280
  ], () => {
281
- J(v.value);
282
- }, { immediate: !0 }), c(() => _.value, () => {
283
- Xe();
284
- }, { immediate: !0 }), c(() => j.value.asyncData, (e) => {
285
- if (k?.cancel(), O.value = [], Xe(), !e) {
286
- k = null;
281
+ J(h.value);
282
+ }, { immediate: !0 }), s(() => m.value, () => {
283
+ Ye();
284
+ }, { immediate: !0 }), s(() => A.value.asyncData, (e) => {
285
+ if (D?.cancel(), E.value = [], Ye(), !e) {
286
+ D = null;
287
287
  return;
288
288
  }
289
- k = me((e) => void Ye(e), _e(e));
290
- }, { immediate: !0 }), oe(() => {
291
- k?.cancel();
292
- }), se(() => {
293
- J(v.value);
289
+ D = pe((e) => void Je(e), _e(e));
290
+ }, { immediate: !0 }), se(() => {
291
+ D?.cancel();
292
+ }), ce(() => {
293
+ J(h.value);
294
294
  });
295
- let et = a(() => r(q.merged.value.size)), tt = a(() => n({}, {}, {
295
+ let $e = a(() => r(q.merged.value.size)), et = a(() => n({}, {}, {
296
296
  tabindex: 0,
297
297
  role: "button",
298
298
  "data-select-clear": !0,
299
- onMousedown: ze,
300
- class: u({
299
+ onMousedown: Re,
300
+ class: c({
301
301
  "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition-colors duration-150": !0,
302
- [Ze.value?.clear ?? ""]: !0,
302
+ [Xe.value?.clear ?? ""]: !0,
303
303
  [N.value.clear ?? ""]: !0
304
304
  })
305
- })), nt = a(() => ({
306
- listboxId: C,
305
+ })), tt = a(() => ({
306
+ listboxId: y,
307
307
  isSelected: Y,
308
308
  disableAutoFocus: !0,
309
- loading: Pe.value,
309
+ loading: Ne.value,
310
310
  multiple: P.value,
311
- maxHeight: g.maxHeight,
312
- entries: Fe.value,
311
+ maxHeight: p.maxHeight,
312
+ entries: Pe.value,
313
313
  options: G.value,
314
314
  size: q.merged.value.size,
315
315
  color: q.merged.value.color,
316
316
  labelledBy: q.controlId.value,
317
317
  rounded: q.merged.value.rounded,
318
318
  invalidated: q.invalidated.value,
319
- highlightedIndex: E.value,
320
- disableMaxHeight: g.disableMaxHeight === !0,
321
- hideEmptyMessage: j.value.hideEmptyMessage === !0,
322
- emptyMessage: j.value.emptyMessage ?? m("No options", S.value),
323
- loadingMessage: j.value.loadingMessage ?? m("Loading...", S.value),
324
- ...He.value
319
+ highlightedIndex: C.value,
320
+ disableMaxHeight: p.disableMaxHeight === !0,
321
+ hideEmptyMessage: A.value.hideEmptyMessage === !0,
322
+ emptyMessage: A.value.emptyMessage ?? b("No options"),
323
+ loadingMessage: A.value.loadingMessage ?? b("Loading..."),
324
+ ...Ve.value
325
325
  }));
326
- function rt(e) {
326
+ function nt(e) {
327
327
  let t = L.value;
328
328
  t.length === e.length && t.every((t, n) => String(t.value) === String(e[n]?.value)) || (L.value = e);
329
329
  }
330
330
  return {
331
- open: w,
332
- slots: x,
333
- hasValue: Me,
331
+ open: x,
332
+ slots: v,
333
+ hasValue: je,
334
334
  multiple: P,
335
- listboxId: C,
335
+ listboxId: y,
336
336
  formField: q,
337
- isLoading: Pe,
338
- clearable: Ne,
339
- clearBind: tt,
337
+ isLoading: Ne,
338
+ clearable: Me,
339
+ clearBind: et,
340
340
  isSelected: Y,
341
- clearValue: We,
342
- removeChip: Ge,
343
- triggerBind: $e,
344
- selectOption: Ue,
345
- containerRef: we,
346
- listboxProps: nt,
347
- clearIconSize: et,
341
+ clearValue: Ue,
342
+ removeChip: We,
343
+ triggerBind: Qe,
344
+ selectOption: He,
345
+ containerRef: w,
346
+ listboxProps: tt,
347
+ clearIconSize: $e,
348
348
  mergedClasses: N,
349
349
  visibleOptions: G,
350
350
  isSearchActive: W,
351
351
  selectedOptions: V,
352
352
  hasComposedList: R,
353
- highlightedIndex: E,
354
- handleRegisteredOptionsChange: rt,
355
- hideEmptyMessage: a(() => j.value.hideEmptyMessage === !0),
356
- emptyMessage: a(() => j.value.emptyMessage ?? m("No options", S.value)),
357
- loadingMessage: a(() => j.value.loadingMessage ?? m("Loading...", S.value))
353
+ highlightedIndex: C,
354
+ handleRegisteredOptionsChange: nt,
355
+ hideEmptyMessage: a(() => A.value.hideEmptyMessage === !0),
356
+ emptyMessage: a(() => A.value.emptyMessage ?? b("No options")),
357
+ loadingMessage: a(() => A.value.loadingMessage ?? b("Loading..."))
358
358
  };
359
359
  }
360
360
  //#endregion
361
- export { g as useSelect };
361
+ export { p as useSelect };
@@ -1,12 +1,12 @@
1
1
  import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
2
  import { computed as r, useAttrs as i } from "vue";
3
- import { get as a } from "es-toolkit/compat";
4
- import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
3
+ import { cn as a, mergeBridgeUILayeredClasses as o, splitComponentProps as s } from "@bridge-ui/core";
4
+ import { get as c } from "es-toolkit/compat";
5
5
  import { roundedProps as l } from "@bridge-ui/core/Tokens/Skeleton";
6
6
  //#region src/Components/Skeleton/composables/useSkeleton.ts
7
7
  var u = ["classes", "rounded"];
8
8
  function d(d, f) {
9
- let p = i(), m = r(() => c({
9
+ let p = i(), m = r(() => s({
10
10
  props: {
11
11
  ...p,
12
12
  ...d
@@ -19,10 +19,10 @@ function d(d, f) {
19
19
  }), _ = n({
20
20
  entry: g,
21
21
  props: () => m.value.componentProps
22
- }), v = r(() => a(s(l, g.value?.tokens?.rounded), h.value.rounded));
22
+ }), v = r(() => c(o(l, g.value?.tokens?.rounded), h.value.rounded));
23
23
  return {
24
24
  merged: h,
25
- rootBind: r(() => e({}, m.value.inheritedAttrs, o({
25
+ rootBind: r(() => e({}, m.value.inheritedAttrs, a({
26
26
  "block animate-pulse bg-gray-200 dark:bg-gray-700": !0,
27
27
  [v.value ?? ""]: !0,
28
28
  [_.value.root ?? ""]: !0