@bridge-ui/vue 0.5.1 → 0.7.0

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 (125) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +2 -2
  2. package/dist/Adapters/I18n/useI18nAdapter.d.ts +1 -1
  3. package/dist/Adapters/I18n/useI18nAdapter.js +4 -1
  4. package/dist/Components/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
  5. package/dist/Components/Accordion/accordion.types.d.ts +2 -2
  6. package/dist/Components/Alert/alertDefaultIcons.js +1 -0
  7. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +2 -2
  8. package/dist/Components/Autocomplete/composables/useAutocomplete.js +150 -145
  9. package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +33 -28
  10. package/dist/Components/BaseField/BaseFieldCorner.js +5 -0
  11. package/dist/Components/BaseField/BaseFieldCorner.vue.d.ts +17 -0
  12. package/dist/Components/BaseField/BaseFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
  13. package/dist/Components/BaseField/baseField.types.d.ts +4 -2
  14. package/dist/Components/BaseField/composables/useBaseField.d.ts +1 -1
  15. package/dist/Components/BaseField/composables/useBaseField.js +11 -8
  16. package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +1 -0
  17. package/dist/Components/Button/button.types.d.ts +6 -0
  18. package/dist/Components/Button/composables/useButton.d.ts +4 -1
  19. package/dist/Components/Button/composables/useButton.js +88 -69
  20. package/dist/Components/ButtonGroup/ButtonGroup.js +5 -0
  21. package/dist/Components/ButtonGroup/ButtonGroup.vue.d.ts +14 -0
  22. package/dist/Components/ButtonGroup/ButtonGroup.vue_vue_type_script_setup_true_lang.js +37 -0
  23. package/dist/Components/ButtonGroup/buttonGroup.types.d.ts +93 -0
  24. package/dist/Components/ButtonGroup/buttonGroupInjectionKey.d.ts +7 -0
  25. package/dist/Components/ButtonGroup/buttonGroupInjectionKey.js +4 -0
  26. package/dist/Components/ButtonGroup/composables/useButtonGroup.d.ts +16 -0
  27. package/dist/Components/ButtonGroup/composables/useButtonGroup.js +66 -0
  28. package/dist/Components/ButtonGroup/index.d.ts +4 -0
  29. package/dist/Components/ButtonGroup/index.js +4 -0
  30. package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +2 -2
  32. package/dist/Components/Checkbox/composables/useCheckbox.js +1 -1
  33. package/dist/Components/ColorField/composables/useColorField.d.ts +1 -1
  34. package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +180 -158
  35. package/dist/Components/DataTable/DataTableColumnsMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  37. package/dist/Components/DataTable/DataTableFilterOptions.vue_vue_type_script_setup_true_lang.js +1 -1
  38. package/dist/Components/DataTable/DataTablePagination.js +5 -0
  39. package/dist/Components/DataTable/DataTablePagination.vue.d.ts +24 -0
  40. package/dist/Components/DataTable/DataTablePagination.vue_vue_type_script_setup_true_lang.js +40 -0
  41. package/dist/Components/DataTable/DataTableSortButton.vue.d.ts +5 -11
  42. package/dist/Components/DataTable/DataTableSortButton.vue_vue_type_script_setup_true_lang.js +22 -26
  43. package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -6
  44. package/dist/Components/DataTable/composables/useDataTable.js +268 -263
  45. package/dist/Components/DataTable/composables/useDataTablePagination.d.ts +69 -0
  46. package/dist/Components/DataTable/composables/useDataTablePagination.js +130 -0
  47. package/dist/Components/DataTable/dataTable.types.d.ts +27 -12
  48. package/dist/Components/DataTable/dataTablePagination.types.d.ts +169 -0
  49. package/dist/Components/DataTable/index.d.ts +2 -1
  50. package/dist/Components/DateField/composables/useDateField.d.ts +1 -1
  51. package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +1 -1
  52. package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +1 -1
  53. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +1 -1
  54. package/dist/Components/FieldOverlay/composables/useFieldOverlay.js +4 -1
  55. package/dist/Components/FormField/FilledFormField.vue.d.ts +7 -7
  56. package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +32 -27
  57. package/dist/Components/FormField/FormFieldCorner.js +5 -0
  58. package/dist/Components/FormField/FormFieldCorner.vue.d.ts +17 -0
  59. package/dist/Components/FormField/FormFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
  60. package/dist/Components/FormField/NotchedFormField.vue.d.ts +7 -7
  61. package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +31 -26
  62. package/dist/Components/FormField/OutlinedFormField.vue.d.ts +7 -7
  63. package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
  64. package/dist/Components/FormField/StackedFormField.vue.d.ts +6 -6
  65. package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +34 -29
  66. package/dist/Components/FormField/UnderlinedFormField.vue.d.ts +7 -7
  67. package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
  68. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  69. package/dist/Components/FormField/composables/useFormField.js +15 -9
  70. package/dist/Components/FormField/formField.types.d.ts +4 -2
  71. package/dist/Components/List/composables/useList.js +1 -1
  72. package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
  73. package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
  74. package/dist/Components/ListItem/composables/useListItem.js +101 -86
  75. package/dist/Components/ListSection/composables/useListSection.js +34 -31
  76. package/dist/Components/ListSection/listSection.types.d.ts +2 -1
  77. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +82 -82
  78. package/dist/Components/Listbox/collectComposedListboxOptions.d.ts +5 -0
  79. package/dist/Components/Listbox/collectComposedListboxOptions.js +27 -0
  80. package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -1
  81. package/dist/Components/OtpField/composables/useOtpField.d.ts +1 -1
  82. package/dist/Components/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +6 -6
  83. package/dist/Components/Pagination/composables/usePagination.d.ts +4 -2
  84. package/dist/Components/Pagination/composables/usePagination.js +125 -127
  85. package/dist/Components/Pagination/pagination.types.d.ts +5 -5
  86. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +1 -1
  87. package/dist/Components/Radio/composables/useRadio.js +2 -1
  88. package/dist/Components/Select/composables/useSelect.d.ts +2 -2
  89. package/dist/Components/Select/composables/useSelect.js +104 -99
  90. package/dist/Components/Sidebar/composables/useSidebarListItem.js +29 -28
  91. package/dist/Components/Sidebar/composables/useSidebarTrigger.js +14 -14
  92. package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
  93. package/dist/Components/Slider/composables/useSlider.js +53 -53
  94. package/dist/Components/Snackbar/snackbarDefaultIcons.js +1 -0
  95. package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +13 -12
  96. package/dist/Components/Tabs/composables/useTabs.js +16 -10
  97. package/dist/Components/Tabs/tabs.types.d.ts +3 -3
  98. package/dist/Components/TextField/composables/useTextField.d.ts +1 -1
  99. package/dist/Components/Textarea/composables/useTextarea.d.ts +1 -1
  100. package/dist/Components/TimeField/composables/useTimeField.d.ts +1 -1
  101. package/dist/Components/TimePanel/composables/useTimePanel.js +106 -106
  102. package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +1 -1
  103. package/dist/augments.d.ts +5 -0
  104. package/dist/index.d.ts +3 -1
  105. package/dist/index.js +150 -147
  106. package/docs/README.md +1 -0
  107. package/docs/components/Accordion.md +1 -1
  108. package/docs/components/Badge.md +2 -0
  109. package/docs/components/Button.md +5 -1
  110. package/docs/components/ButtonGroup.md +124 -0
  111. package/docs/components/DataTable.md +9 -11
  112. package/docs/components/Divider.md +1 -0
  113. package/docs/components/I18n.md +65 -24
  114. package/docs/components/Pagination.md +5 -3
  115. package/docs/components/Table.md +2 -2
  116. package/docs/components/Tabs.md +24 -6
  117. package/docs/components/ToggleGroup.md +1 -1
  118. package/docs/examples/i18n-dictionary.ts +31 -10
  119. package/docs/examples/i18n-vue-i18n.ts +7 -6
  120. package/docs/examples/icon-fontawesome.ts +4 -0
  121. package/docs/examples/icon-heroicons.ts +5 -1
  122. package/docs/examples/icon-lucide.ts +4 -0
  123. package/docs/examples/icon-phosphor.ts +4 -0
  124. package/docs/examples/icon-tabler.ts +4 -0
  125. package/package.json +2 -2
@@ -3,14 +3,15 @@ import { hasNamedSlot as t } from "../../../Utils/slotOrProp.js";
3
3
  import { useBreakpoint as n } from "../../../Utils/useBreakpoint.js";
4
4
  import { mergePartBind as r, resolveFieldAdornmentIconSize as ee, useBridgeUIComponent as te, useBridgeUIMergedRegistryClasses as i, useFieldShowFooter as ne } from "../../../Utils/index.js";
5
5
  import { formFieldBridgeKeys as re, useFormField as ie } from "../../FormField/composables/useFormField.js";
6
- import { useListboxNavigation as ae } from "../../Listbox/composables/useListboxNavigation.js";
7
- import { Comment as oe, Text as se, computed as a, nextTick as o, onBeforeUnmount as ce, onMounted as le, ref as s, useAttrs as ue, useId as de, useSlots as fe, watch as c } from "vue";
8
- import { get as pe, isNil as me, omit as he } from "es-toolkit/compat";
9
- import { createSelectAsyncSearch as ge, filterListboxEntries as _e, flattenListboxOptions as l, normalizeListboxEntries as u, normalizeSelectOptions as ve, resolveFieldOverlay as ye, resolveSelectAsyncDebounce as be, resolveSelectAsyncOptions as xe, selectValuesEqual as d } from "@bridge-ui/core/Domain";
10
- import { listboxColorProps as Se } from "@bridge-ui/core/Tokens";
11
- import { adjustAutosizeTextareaHeight as Ce, cn as f, getColorToken as we, mergeBridgeUILayeredClasses as Te, splitComponentProps as Ee } from "@bridge-ui/core/Utils";
6
+ import { collectComposedListboxOptions as ae } from "../../Listbox/collectComposedListboxOptions.js";
7
+ import { useListboxNavigation as oe } from "../../Listbox/composables/useListboxNavigation.js";
8
+ import { Comment as se, Text as ce, computed as a, nextTick as o, onBeforeUnmount as le, onMounted as ue, ref as s, useAttrs as de, useId as fe, useSlots as pe, watch as c } from "vue";
9
+ import { get as me, isNil as he, isObjectLike as l, isSymbol as ge, omit as _e } from "es-toolkit/compat";
10
+ import { createSelectAsyncSearch as ve, filterListboxEntries as ye, flattenListboxOptions as u, mergeListboxOptionsByValue as be, normalizeListboxEntries as xe, normalizeSelectOptions as Se, resolveFieldOverlay as Ce, resolveSelectAsyncDebounce as we, resolveSelectAsyncOptions as Te, selectValuesEqual as d } from "@bridge-ui/core/Domain";
11
+ import { listboxColorProps as Ee } from "@bridge-ui/core/Tokens";
12
+ import { adjustAutosizeTextareaHeight as De, cn as f, getColorToken as Oe, mergeBridgeUILayeredClasses as ke, splitComponentProps as Ae } from "@bridge-ui/core/Utils";
12
13
  //#region src/Components/Select/composables/useSelect.ts
13
- var De = [
14
+ var je = [
14
15
  "classes",
15
16
  "loading",
16
17
  "options",
@@ -33,81 +34,81 @@ var De = [
33
34
  "minItemsForSearch",
34
35
  "optionDescription"
35
36
  ];
36
- function p(p, m, h, g, Oe) {
37
- let ke = ue(), _ = fe(), v = de(), Ae = n(), y = e(), b = s(!1), x = s(""), S = s(!1), C = s(-1), w = s([]), T = s([]), E = s([]), D = s(null), O = null, k = a(() => Ee({
38
- bridgeKeys: De,
37
+ function p(p, m, h, g, Me) {
38
+ let Ne = de(), _ = pe(), v = fe(), Pe = n(), y = e(), b = s(!1), x = s(""), S = s(!1), C = s(-1), w = s([]), T = s([]), E = s([]), D = s(null), O = null, k = a(() => Ae({
39
+ bridgeKeys: je,
39
40
  props: {
40
- ...ke,
41
+ ...Ne,
41
42
  ...p
42
43
  }
43
- })), A = a(() => k.value.componentProps), je = a(() => ({ classes: A.value.classes })), { components: Me, entry: Ne } = te({
44
+ })), A = a(() => k.value.componentProps), Fe = a(() => ({ classes: A.value.classes })), { components: Ie, entry: Le } = te({
44
45
  componentName: "Select",
45
- props: () => je.value
46
+ props: () => Fe.value
46
47
  }), j = i({
47
- entry: Ne,
48
- props: () => je.value
48
+ entry: Le,
49
+ props: () => Fe.value
49
50
  }), M = a(() => !!A.value.multiple), N = a(() => ({
50
51
  optionLabel: A.value.optionLabel ?? "label",
51
52
  optionValue: A.value.optionValue ?? "value",
52
53
  optionDescription: A.value.optionDescription ?? "description"
53
- })), P = a(() => Oe.value.length > 0 ? Oe.value.map((e) => ({
54
+ })), P = a(() => Me.value.length > 0 ? Me.value.map((e) => ({
54
55
  option: e,
55
56
  type: "option"
56
- })) : u(A.value.options, N.value)), Pe = a(() => l(P.value)), F = s([]);
57
- function Fe(e) {
58
- if (!e || typeof e != "object") return !1;
57
+ })) : xe(A.value.options, N.value)), Re = a(() => u(P.value)), F = s([]);
58
+ function ze(e) {
59
+ if (!l(e)) return !1;
59
60
  let t = e.type;
60
- if (!t || typeof t != "object") return !1;
61
+ if (!l(t)) return !1;
61
62
  let n = t.name, r = t.__name;
62
63
  return n === "SelectOption" || r === "SelectOption";
63
64
  }
64
- function Ie() {
65
+ function Be() {
65
66
  return t(_, "default") ? (_.default?.({}) ?? []).some((e) => {
66
- if (!e || typeof e != "object") return !1;
67
+ if (!l(e)) return !1;
67
68
  let t = e.type;
68
- return t === oe || t === se || t === void 0 || typeof t == "symbol" ? !1 : !Fe(e);
69
+ return t === se || t === ce || t === void 0 || ge(t) ? !1 : !ze(e);
69
70
  }) : !1;
70
71
  }
71
- let I = a(() => Ie() && !A.value.options?.length), L = a(() => {
72
+ let I = a(() => Be()), Ve = a(() => I.value ? ae(_.default?.({}) ?? []) : []), L = a(() => {
72
73
  if (I.value) return [];
73
74
  if (T.value.length > 0) {
74
- let e = u(T.value, N.value);
75
+ let e = xe(T.value, N.value);
75
76
  return A.value.flipOptions ? [...e].reverse() : e;
76
77
  }
77
78
  return A.value.flipOptions ? [...P.value].reverse().map((e) => e.type === "section" ? {
78
79
  ...e,
79
80
  options: [...e.options].reverse()
80
81
  } : e) : P.value;
81
- }), Le = a(() => I.value ? F.value : l(L.value)), R = a(() => {
82
+ }), He = a(() => I.value ? be(F.value, Ve.value) : u(L.value)), R = a(() => {
82
83
  let e = m.value;
83
- return M.value ? Array.isArray(e) ? e : [] : !me(e) && e !== "" ? [e] : [];
84
- }), Re = a(() => ye(A.value.overlay, Ae.mobile)), z = ne({
84
+ return M.value ? Array.isArray(e) ? e : [] : !he(e) && e !== "" ? [e] : [];
85
+ }), Ue = a(() => Ce(A.value.overlay, Pe.mobile)), z = ne({
85
86
  componentName: "Select",
86
- overlay: Re,
87
+ overlay: Ue,
87
88
  showFooter: () => A.value.showFooter
88
- }), ze = a(() => z.value ? w.value : R.value), B = a(() => {
89
+ }), We = a(() => z.value ? w.value : R.value), B = a(() => {
89
90
  let e = /* @__PURE__ */ new Map();
90
- for (let t of [...Le.value, ...E.value]) e.set(t.value, t);
91
+ for (let t of [...He.value, ...E.value]) e.set(t.value, t);
91
92
  return R.value.map((t) => e.get(t) ?? {
92
93
  value: t,
93
94
  label: String(t)
94
95
  });
95
- }), V = a(() => R.value.length > 0), Be = a(() => A.value.clearable !== !1), H = a(() => !!A.value.asyncData), U = a(() => {
96
+ }), V = a(() => R.value.length > 0), Ge = a(() => A.value.clearable !== !1), H = a(() => !!A.value.asyncData), U = a(() => {
96
97
  if (H.value || A.value.searchable) return !0;
97
98
  let e = A.value.minItemsForSearch ?? 11;
98
- return Pe.value.length >= e;
99
- }), W = a(() => b.value && U.value), Ve = a(() => !!A.value.loading || S.value), He = a(() => {
99
+ return Re.value.length >= e;
100
+ }), W = a(() => b.value && U.value), Ke = a(() => !!A.value.loading || S.value), qe = a(() => {
100
101
  if (I.value) return [];
101
102
  if (!W.value || !x.value.trim()) return L.value;
102
103
  let e = x.value.trim().toLowerCase();
103
- return _e(L.value, (t) => t.label.toLowerCase().includes(e));
104
- }), G = a(() => I.value ? F.value : l(He.value)), K = ae(() => G.value, C, v), Ue = a(() => p.readonly || p.disabled ? !0 : !W.value), We = a(() => W.value || M.value ? x.value : B.value[0]?.label ?? ""), Ge = (e) => {
104
+ return ye(L.value, (t) => t.label.toLowerCase().includes(e));
105
+ }), G = a(() => I.value ? F.value : u(qe.value)), K = oe(() => G.value, C, v), Je = a(() => p.readonly || p.disabled ? !0 : !W.value), Ye = a(() => W.value || M.value ? x.value : B.value[0]?.label ?? ""), Xe = (e) => {
105
106
  D.value = e instanceof HTMLElement ? e : null;
106
107
  };
107
- function Ke(e) {
108
+ function Ze(e) {
108
109
  e.preventDefault();
109
110
  }
110
- function qe(e) {
111
+ function Qe(e) {
111
112
  if (p.disabled || p.readonly) return;
112
113
  let t = e.target;
113
114
  if (!t.closest("[data-select-clear]") && !(t.closest(".wrapper-start-slot") || t.closest(".wrapper-end-slot"))) {
@@ -118,8 +119,8 @@ function p(p, m, h, g, Oe) {
118
119
  W.value || (Q(), h.value?.focus({ preventScroll: !0 }));
119
120
  }
120
121
  }
121
- let Je = a(() => {
122
- let e = he(k.value.inheritedAttrs, ["class"]), n = Ee({
122
+ let $e = a(() => {
123
+ let e = _e(k.value.inheritedAttrs, ["class"]), n = Ae({
123
124
  bridgeKeys: re,
124
125
  props: e
125
126
  }).componentProps, ee = n.endIcon ?? (t(_, "end") ? void 0 : "chevronUpDown"), { listbox: te, ...i } = n.customProps ?? {};
@@ -130,13 +131,13 @@ function p(p, m, h, g, Oe) {
130
131
  customProps: {
131
132
  ...i,
132
133
  container: r(i.container, {}, {
133
- ref: Ge,
134
- onClick: qe,
134
+ ref: Xe,
135
+ onClick: Qe,
135
136
  class: f({ "cursor-pointer": !p.disabled && !p.readonly && !W.value })
136
137
  })
137
138
  }
138
139
  };
139
- }), Ye = a(() => p.customProps?.listbox), q = ie(() => Je.value, {
140
+ }), et = a(() => p.customProps?.listbox), q = ie(() => $e.value, {
140
141
  size: "md",
141
142
  rounded: "md",
142
143
  color: "primary",
@@ -146,11 +147,11 @@ function p(p, m, h, g, Oe) {
146
147
  componentName: "Select",
147
148
  likeInput: () => M.value,
148
149
  control: () => M.value ? "textarea" : "input"
149
- }), Xe = a(() => V.value && Be.value && !p.readonly && !q.isDisabled.value), J = (e) => {
150
- !e || !M.value || Ce(e);
150
+ }), tt = a(() => V.value && Ge.value && !p.readonly && !q.isDisabled.value), J = (e) => {
151
+ !e || !M.value || De(e);
151
152
  };
152
- function Ze(e) {
153
- return ze.value.some((t) => d(t, e));
153
+ function nt(e) {
154
+ return We.value.some((t) => d(t, e));
154
155
  }
155
156
  function Y(e) {
156
157
  m.value = e;
@@ -170,7 +171,7 @@ function p(p, m, h, g, Oe) {
170
171
  function Q() {
171
172
  O?.cancel(), b.value && (b.value = !1, x.value = "", C.value = -1, g("close"));
172
173
  }
173
- function Qe(e) {
174
+ function rt(e) {
174
175
  if (!e.disabled) {
175
176
  if (z.value) {
176
177
  if (M.value) {
@@ -193,7 +194,7 @@ function p(p, m, h, g, Oe) {
193
194
  Y(e.value), X(e.value), g("select", e), Q();
194
195
  }
195
196
  }
196
- function $e() {
197
+ function it() {
197
198
  if (M.value) Y(w.value), X(w.value);
198
199
  else {
199
200
  let e = w.value[0] ?? null;
@@ -201,26 +202,26 @@ function p(p, m, h, g, Oe) {
201
202
  }
202
203
  Q(), g("apply");
203
204
  }
204
- function et() {
205
+ function at() {
205
206
  w.value = [...R.value], Q(), g("cancel");
206
207
  }
207
- function tt(e) {
208
+ function ot(e) {
208
209
  e?.preventDefault(), e?.stopPropagation(), !(p.disabled || p.readonly) && (M.value ? (Y([]), X([])) : (Y(null), X(null)), g("clear"), Q());
209
210
  }
210
- function nt(e, t) {
211
+ function st(e, t) {
211
212
  if (t.preventDefault(), t.stopPropagation(), !M.value) return;
212
213
  let n = R.value.filter((t) => !d(t, e.value));
213
214
  Y(n), X(n), g("deselect", e), o(() => J(h.value));
214
215
  }
215
- function rt() {
216
+ function ct() {
216
217
  let e = K.getHighlightedOption();
217
- e && Qe(e);
218
+ e && rt(e);
218
219
  }
219
- function it(e) {
220
+ function lt(e) {
220
221
  let t = e.target;
221
222
  x.value = t.value, g("search", x.value), b.value || Z(), K.resetHighlight(), H.value && O?.searchDebounced(x.value);
222
223
  }
223
- function at(e) {
224
+ function ut(e) {
224
225
  if (!(p.disabled || p.readonly)) switch (e.key) {
225
226
  case "ArrowDown":
226
227
  e.preventDefault(), b.value ? K.moveHighlight(1) : Z();
@@ -229,7 +230,7 @@ function p(p, m, h, g, Oe) {
229
230
  e.preventDefault(), b.value ? K.moveHighlight(-1) : Z();
230
231
  break;
231
232
  case "Enter":
232
- e.preventDefault(), b.value ? rt() : Z();
233
+ e.preventDefault(), b.value ? ct() : Z();
233
234
  break;
234
235
  case "Escape":
235
236
  e.preventDefault(), Q();
@@ -244,63 +245,63 @@ function p(p, m, h, g, Oe) {
244
245
  if (M.value && !x.value && B.value.length > 0) {
245
246
  e.preventDefault();
246
247
  let t = B.value.at(-1);
247
- t && nt(t, e);
248
+ t && st(t, e);
248
249
  }
249
250
  break;
250
251
  case "Tab": Q();
251
252
  }
252
253
  }
253
- async function ot(e) {
254
+ async function dt(e) {
254
255
  let t = A.value.asyncData;
255
256
  if (t) {
256
257
  S.value = !0;
257
258
  try {
258
- let { options: n, resolvedSelected: r } = await xe(t, e, R.value, (e) => ve(e, N.value));
259
+ let { options: n, resolvedSelected: r } = await Te(t, e, R.value, (e) => Se(e, N.value));
259
260
  r.length > 0 && (E.value = r), T.value = n;
260
261
  } finally {
261
262
  S.value = !1;
262
263
  }
263
264
  }
264
265
  }
265
- async function st() {
266
+ async function ft() {
266
267
  let e = A.value.asyncData;
267
- !e?.resolve || R.value.length === 0 || (E.value = ve(await e.resolve(R.value), N.value));
268
+ !e?.resolve || R.value.length === 0 || (E.value = Se(await e.resolve(R.value), N.value));
268
269
  }
269
270
  let $ = a(() => {
270
- let e = Te(Se, pe(Me.value, [
271
+ let e = ke(Ee, me(Ie.value, [
271
272
  "Select",
272
273
  "tokens",
273
274
  "listbox",
274
275
  "color"
275
276
  ]));
276
- return we({
277
+ return Oe({
277
278
  tokens: e,
278
279
  color: q.merged.value.color,
279
280
  invalid: q.invalidated.value
280
281
  });
281
- }), ct = a(() => $.value?.value), lt = a(() => {
282
+ }), pt = a(() => $.value?.value), mt = a(() => {
282
283
  let e = !p.disabled && !p.readonly && !W.value, t = !p.disabled && !p.readonly && W.value && U.value, n = V.value && !M.value && !W.value;
283
284
  return r({
284
285
  role: "combobox",
285
- value: We.value,
286
+ value: Ye.value,
286
287
  "aria-controls": v,
287
288
  "aria-expanded": b.value,
288
- readonly: Ue.value,
289
- onKeydown: at,
289
+ readonly: Je.value,
290
+ onKeydown: ut,
290
291
  placeholder: A.value.placeholder,
291
292
  "aria-autocomplete": U.value ? "list" : void 0,
292
293
  "aria-activedescendant": b.value ? K.activeDescendantId.value : void 0,
293
294
  ...M.value ? {
294
295
  rows: 1,
295
296
  onInput: (e) => {
296
- it(e), J(e.target);
297
+ lt(e), J(e.target);
297
298
  }
298
- } : { onInput: it }
299
+ } : { onInput: lt }
299
300
  }, q.inputBind.value, f({
300
301
  "cursor-text": t,
301
302
  "cursor-pointer": e,
302
303
  "resize-none overflow-hidden": M.value,
303
- [f(ct.value, j.value.value) ?? ""]: n
304
+ [f(pt.value, j.value.value) ?? ""]: n
304
305
  }));
305
306
  });
306
307
  c(() => [
@@ -310,38 +311,38 @@ function p(p, m, h, g, Oe) {
310
311
  ], () => {
311
312
  J(h.value);
312
313
  }, { immediate: !0 }), c(() => m.value, () => {
313
- st();
314
+ ft();
314
315
  }, { immediate: !0 }), c(() => A.value.asyncData, (e) => {
315
- if (O?.cancel(), T.value = [], st(), !e) {
316
+ if (O?.cancel(), T.value = [], ft(), !e) {
316
317
  O = null;
317
318
  return;
318
319
  }
319
- O = ge((e) => void ot(e), be(e));
320
- }, { immediate: !0 }), ce(() => {
320
+ O = ve((e) => void dt(e), we(e));
321
+ }, { immediate: !0 }), le(() => {
321
322
  O?.cancel();
322
- }), le(() => {
323
+ }), ue(() => {
323
324
  J(h.value);
324
325
  });
325
- let ut = a(() => ee(q.merged.value.size)), dt = a(() => r({}, {}, {
326
+ let ht = a(() => ee(q.merged.value.size)), gt = a(() => r({}, {}, {
326
327
  tabindex: 0,
327
328
  role: "button",
328
329
  "data-select-clear": !0,
329
- onMousedown: Ke,
330
+ onMousedown: Ze,
330
331
  class: f({
331
332
  "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition-colors duration-150": !0,
332
333
  [$.value?.clear ?? ""]: !0,
333
334
  [j.value.clear ?? ""]: !0
334
335
  })
335
- })), ft = a(() => ({
336
+ })), _t = a(() => ({
336
337
  listboxId: v,
337
- isSelected: Ze,
338
+ isSelected: nt,
338
339
  disableAutoFocus: !0,
339
340
  overlay: p.overlay,
340
- loading: Ve.value,
341
+ loading: Ke.value,
341
342
  multiple: M.value,
342
343
  maxHeight: p.maxHeight,
343
344
  showFooter: z.value,
344
- entries: He.value,
345
+ entries: qe.value,
345
346
  options: G.value,
346
347
  size: q.merged.value.size,
347
348
  error: q.invalidated.value,
@@ -353,11 +354,15 @@ function p(p, m, h, g, Oe) {
353
354
  hideEmptyMessage: A.value.hideEmptyMessage === !0,
354
355
  emptyMessage: A.value.emptyMessage ?? y("No options"),
355
356
  loadingMessage: A.value.loadingMessage ?? y("Loading..."),
356
- ...Ye.value
357
+ ...et.value
357
358
  }));
358
- function pt(e) {
359
+ function vt(e) {
360
+ if (e.length === 0) return;
359
361
  let t = F.value;
360
- t.length === e.length && t.every((t, n) => String(t.value) === String(e[n]?.value)) || (F.value = e);
362
+ t.length === e.length && t.every((t, n) => {
363
+ let r = e[n];
364
+ return t.label === r?.label && t.description === r?.description && String(t.value) === String(r?.value) && !!t.disabled == !!r?.disabled;
365
+ }) || (F.value = e);
361
366
  }
362
367
  return {
363
368
  open: b,
@@ -366,27 +371,27 @@ function p(p, m, h, g, Oe) {
366
371
  multiple: M,
367
372
  listboxId: v,
368
373
  formField: q,
369
- isLoading: Ve,
370
- clearable: Be,
371
- clearBind: dt,
372
- isSelected: Ze,
373
- clearValue: tt,
374
- removeChip: nt,
375
- triggerBind: lt,
376
- handleApply: $e,
377
- selectOption: Qe,
378
- handleCancel: et,
374
+ isLoading: Ke,
375
+ clearable: Ge,
376
+ clearBind: gt,
377
+ isSelected: nt,
378
+ clearValue: ot,
379
+ removeChip: st,
380
+ triggerBind: mt,
381
+ handleApply: it,
382
+ selectOption: rt,
383
+ handleCancel: at,
379
384
  containerRef: D,
380
- listboxProps: ft,
381
- clearIconSize: ut,
385
+ listboxProps: _t,
386
+ clearIconSize: ht,
382
387
  mergedClasses: j,
383
- showClearIcon: Xe,
388
+ showClearIcon: tt,
384
389
  visibleOptions: G,
385
390
  isSearchActive: W,
386
391
  selectedOptions: B,
387
392
  hasComposedList: I,
388
393
  highlightedIndex: C,
389
- handleRegisteredOptionsChange: pt,
394
+ handleRegisteredOptionsChange: vt,
390
395
  hideEmptyMessage: a(() => A.value.hideEmptyMessage === !0),
391
396
  emptyMessage: a(() => A.value.emptyMessage ?? y("No options")),
392
397
  loadingMessage: a(() => A.value.loadingMessage ?? y("Loading..."))
@@ -2,43 +2,44 @@ import { isPropPresent as e } from "../../../Utils/slotOrProp.js";
2
2
  import { useSidebar as t } from "./useSidebar.js";
3
3
  import { SIDEBAR_LIST_INJECTION_KEY as n } from "../sidebarListInjectionKey.js";
4
4
  import { computed as r, inject as i } from "vue";
5
- import { isSidebarIconOnly as a, resolveSidebarListTooltipPlacement as o } from "@bridge-ui/core/Domain";
6
- import { cn as s } from "@bridge-ui/core/Utils";
5
+ import { isString as a } from "es-toolkit/compat";
6
+ import { isSidebarIconOnly as o, resolveSidebarListTooltipPlacement as s } from "@bridge-ui/core/Domain";
7
+ import { cn as c } from "@bridge-ui/core/Utils";
7
8
  //#region src/Components/Sidebar/composables/useSidebarListItem.ts
8
- function c(c) {
9
- let l = t(), u = i(n, null), d = r(() => u ? u.value.iconOnly : a({
10
- state: l.value.state,
11
- isMobile: l.value.isMobile,
12
- collapsible: l.value.collapsible
13
- })), f = r(() => {
14
- if (d.value) {
15
- if (c.tooltip !== void 0) return c.tooltip || void 0;
16
- if (typeof c.primary == "string") return c.primary;
9
+ function l(l) {
10
+ let u = t(), d = i(n, null), f = r(() => d ? d.value.iconOnly : o({
11
+ state: u.value.state,
12
+ isMobile: u.value.isMobile,
13
+ collapsible: u.value.collapsible
14
+ })), p = r(() => {
15
+ if (f.value) {
16
+ if (l.tooltip !== void 0) return l.tooltip || void 0;
17
+ if (a(l.primary)) return l.primary;
17
18
  }
18
- }), p = r(() => c.tooltipPlacement === void 0 ? o(l.value.side) : c.tooltipPlacement), m = r(() => {
19
- if (!(!d.value || typeof c.primary != "string")) return c.primary;
19
+ }), m = r(() => l.tooltipPlacement === void 0 ? s(u.value.side) : l.tooltipPlacement), h = r(() => {
20
+ if (!(!f.value || !a(l.primary))) return l.primary;
20
21
  });
21
22
  return {
22
- tooltip: f,
23
+ tooltip: p,
23
24
  itemClasses: r(() => {
24
- let t = e(c.secondary);
25
+ let t = e(l.secondary);
25
26
  return {
26
- end: s({ hidden: d.value }),
27
- content: s({ hidden: d.value }),
28
- start: s({ "items-center justify-center": !0 }),
29
- interactive: s({
30
- "gap-x-2 overflow-hidden rounded-lg px-2 transition-[width,height,padding] duration-200 ease-linear": !d.value,
31
- "min-h-12 py-2": !d.value && t,
32
- "min-h-8 py-0": !d.value && !t,
33
- "gap-0 overflow-hidden rounded-lg p-0": d.value,
34
- "size-8 justify-center": d.value && t,
35
- "h-8 w-full px-2": d.value && !t
27
+ end: c({ hidden: f.value }),
28
+ content: c({ hidden: f.value }),
29
+ start: c({ "items-center justify-center": !0 }),
30
+ interactive: c({
31
+ "gap-x-2 overflow-hidden rounded-lg px-2 transition-[width,height,padding] duration-200 ease-linear": !f.value,
32
+ "min-h-12 py-2": !f.value && t,
33
+ "min-h-8 py-0": !f.value && !t,
34
+ "gap-0 overflow-hidden rounded-lg p-0": f.value,
35
+ "size-8 justify-center": f.value && t,
36
+ "h-8 w-full px-2": f.value && !t
36
37
  })
37
38
  };
38
39
  }),
39
- accessibleName: m,
40
- tooltipPlacement: p
40
+ accessibleName: h,
41
+ tooltipPlacement: m
41
42
  };
42
43
  }
43
44
  //#endregion
44
- export { c as useSidebarListItem };
45
+ export { l as useSidebarListItem };
@@ -1,28 +1,28 @@
1
1
  import { hasNamedSlot as e } from "../../../Utils/slotOrProp.js";
2
2
  import { useSidebar as t } from "./useSidebar.js";
3
3
  import { computed as n, useAttrs as r } from "vue";
4
- import { omit as i } from "es-toolkit/compat";
4
+ import { isFunction as i, isString as a, omit as o } from "es-toolkit/compat";
5
5
  //#region src/Components/Sidebar/composables/useSidebarTrigger.ts
6
- function a(a) {
7
- let o = t(), s = r(), c = n(() => e(a, "default"));
6
+ function s(s) {
7
+ let c = t(), l = r(), u = n(() => e(s, "default"));
8
8
  return {
9
9
  icon: n(() => {
10
- if (!c.value) return "panelLeft";
10
+ if (!u.value) return "panelLeft";
11
11
  }),
12
- expanded: n(() => o.value.isMobile ? o.value.openMobile : o.value.open),
13
- iconClass: n(() => o.value.side === "right" ? "rotate-180 rtl:rotate-0" : "rtl:rotate-180"),
12
+ expanded: n(() => c.value.isMobile ? c.value.openMobile : c.value.open),
13
+ iconClass: n(() => c.value.side === "right" ? "rotate-180 rtl:rotate-0" : "rtl:rotate-180"),
14
14
  ariaLabel: n(() => {
15
- let e = s["aria-label"];
16
- return typeof e == "string" ? e : "Toggle sidebar";
15
+ let e = l["aria-label"];
16
+ return a(e) ? e : "Toggle sidebar";
17
17
  }),
18
18
  handleClick: (e) => {
19
- let t = s.onClick;
20
- typeof t == "function" && t(e), !e.defaultPrevented && o.value.toggleSidebar();
19
+ let t = l.onClick;
20
+ i(t) && t(e), !e.defaultPrevented && c.value.toggleSidebar();
21
21
  },
22
- hasDefaultSlot: c,
23
- attrs: n(() => i(s, ["onClick", "aria-label"])),
24
- panelId: n(() => o.value.panelId)
22
+ hasDefaultSlot: u,
23
+ attrs: n(() => o(l, ["onClick", "aria-label"])),
24
+ panelId: n(() => c.value.panelId)
25
25
  };
26
26
  }
27
27
  //#endregion
28
- export { a as useSidebarTrigger };
28
+ export { s as useSidebarTrigger };
@@ -49,7 +49,6 @@ export declare function useSlider(props: MaybeRefOrGetter<SliderOwnProps>, libDe
49
49
  }>>;
50
50
  controlId: import('vue').ComputedRef<string>;
51
51
  headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
52
- cornerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
53
52
  isDisabled: import('vue').ComputedRef<boolean>;
54
53
  isReadonly: import('vue').ComputedRef<boolean>;
55
54
  sizeClasses: import('vue').ComputedRef<import('@bridge-ui/core/Tokens').BaseFieldSizeItem | undefined>;
@@ -60,6 +59,7 @@ export declare function useSlider(props: MaybeRefOrGetter<SliderOwnProps>, libDe
60
59
  ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
61
60
  fieldLabelProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
62
61
  descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
62
+ fieldCornerProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
63
63
  showErrorMessageContent: import('vue').ComputedRef<boolean>;
64
64
  };
65
65
  trackBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {