@weni/unnnic-system 3.36.0 → 3.36.1-alpha.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 (36) hide show
  1. package/dist/components/MultiSelect/MultiSelectOption.css +1 -1
  2. package/dist/components/MultiSelect/MultiSelectOption.vue.mjs +2 -2
  3. package/dist/components/MultiSelect/MultiSelectOption.vue2.mjs +41 -15
  4. package/dist/components/MultiSelect/MultiSelectTreeOptions.css +1 -0
  5. package/dist/components/MultiSelect/MultiSelectTreeOptions.vue.mjs +7 -0
  6. package/dist/components/MultiSelect/MultiSelectTreeOptions.vue2.mjs +50 -0
  7. package/dist/components/MultiSelect/index.css +1 -1
  8. package/dist/components/MultiSelect/index.vue.mjs +2 -2
  9. package/dist/components/MultiSelect/index.vue2.mjs +126 -114
  10. package/dist/composables/useMultiSelectRows.mjs +74 -0
  11. package/dist/composables/useMultiSelectSelection.mjs +44 -0
  12. package/dist/composables/useSelectBase.mjs +44 -39
  13. package/dist/composables/useSelectKeyboard.mjs +70 -35
  14. package/dist/composables/useTreeExpansion.mjs +24 -0
  15. package/dist/lib/tree-selection.mjs +66 -0
  16. package/dist/locales/en.json.mjs +9 -5
  17. package/dist/style.css +4 -2
  18. package/dist/unnnic.umd.js +19 -19
  19. package/package.json +2 -2
  20. package/src/components/MultiSelect/MultiSelectOption.vue +66 -3
  21. package/src/components/MultiSelect/MultiSelectTreeOptions.vue +73 -0
  22. package/src/components/MultiSelect/__tests__/MultiSelect.spec.js +556 -0
  23. package/src/components/MultiSelect/__tests__/MultiSelectOption.spec.js +55 -1
  24. package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +5 -0
  25. package/src/components/MultiSelect/index.vue +57 -50
  26. package/src/components/Select/_select-shared.scss +8 -0
  27. package/src/components/Select/types.ts +1 -0
  28. package/src/composables/useMultiSelectRows.ts +121 -0
  29. package/src/composables/useMultiSelectSelection.ts +97 -0
  30. package/src/composables/useSelectBase.ts +40 -16
  31. package/src/composables/useSelectKeyboard.ts +92 -18
  32. package/src/composables/useTreeExpansion.ts +44 -0
  33. package/src/lib/__tests__/tree-selection.spec.ts +141 -0
  34. package/src/lib/tree-selection.ts +156 -0
  35. package/src/locales/en.json +3 -1
  36. package/src/stories/MultiSelect.stories.js +62 -1
@@ -1,21 +1,28 @@
1
- import { defineComponent as K, useTemplateRef as w, computed as b, ref as W, watch as A, nextTick as V, openBlock as r, createElementBlock as c, createVNode as d, unref as n, withCtx as g, normalizeStyle as q, createElementVNode as C, createBlock as L, createCommentVNode as B, toDisplayString as G, Fragment as R, renderList as J } from "vue";
2
- import { useInfiniteScroll as Q } from "../../node_modules/@vueuse/core/dist/index.mjs";
3
- import x from "../Input/Input.vue.mjs";
4
- import X from "../IconLoading/IconLoading.vue.mjs";
5
- import Y from "./MultiSelectOption.vue.mjs";
6
- import { useSelectBase as Z } from "../../composables/useSelectBase.mjs";
7
- import { useSelectKeyboard as ee } from "../../composables/useSelectKeyboard.mjs";
8
- import te from "../ui/popover/Popover.vue.mjs";
9
- import le from "../ui/popover/PopoverTrigger.vue.mjs";
10
- import ne from "../ui/popover/PopoverContent.vue.mjs";
1
+ import { defineComponent as Q, useTemplateRef as P, computed as R, ref as X, watch as Y, nextTick as S, openBlock as n, createElementBlock as r, createVNode as s, unref as o, withCtx as v, normalizeStyle as Z, createElementVNode as ee, createBlock as g, createCommentVNode as C, toDisplayString as te, Fragment as w, renderList as oe } from "vue";
2
+ import { useInfiniteScroll as le } from "../../node_modules/@vueuse/core/dist/index.mjs";
3
+ import B from "../Input/Input.vue.mjs";
4
+ import ne from "../IconLoading/IconLoading.vue.mjs";
5
+ import ie from "./MultiSelectOption.vue.mjs";
6
+ import ae from "./MultiSelectTreeOptions.vue.mjs";
7
+ import { useSelectBase as re } from "../../composables/useSelectBase.mjs";
8
+ import { useSelectKeyboard as se } from "../../composables/useSelectKeyboard.mjs";
9
+ import { useMultiSelectSelection as ce } from "../../composables/useMultiSelectSelection.mjs";
10
+ import { useMultiSelectRows as ue } from "../../composables/useMultiSelectRows.mjs";
11
+ import { filterTreeOptions as de } from "../../lib/tree-selection.mjs";
12
+ import pe from "../ui/popover/Popover.vue.mjs";
13
+ import fe from "../ui/popover/PopoverTrigger.vue.mjs";
14
+ import me from "../ui/popover/PopoverContent.vue.mjs";
11
15
  import '../ui/popover/PopoverContent.css';/* empty css */
12
- const oe = { class: "unnnic-multi-select" }, ae = {
16
+ const he = { class: "unnnic-multi-select" }, Se = {
13
17
  key: 1,
14
18
  class: "unnnic-multi-select__content-no-results"
15
- }, ie = { class: "unnnic-multi-select__options" }, re = {
16
- key: 0,
19
+ }, ve = {
20
+ key: 1,
21
+ class: "unnnic-multi-select__options"
22
+ }, ge = {
23
+ key: 2,
17
24
  class: "unnnic-multi-select__infinite-loading"
18
- }, be = /* @__PURE__ */ K({
25
+ }, Ee = /* @__PURE__ */ Q({
19
26
  name: "UnnnicMultiSelect",
20
27
  __name: "index",
21
28
  props: {
@@ -41,162 +48,167 @@ const oe = { class: "unnnic-multi-select" }, ae = {
41
48
  returnObject: { type: Boolean, default: !1 }
42
49
  },
43
50
  emits: ["update:modelValue", "update:search", "scroll-end"],
44
- setup(j, { expose: z, emit: M }) {
45
- const e = j, u = M, y = w("multiSelectInputRef"), f = w("contentRef"), l = Z(e, "multi", y, f), p = l.openPopover, U = l.popoverContentCustomStyles, $ = l.inputWidthString, m = l.filteredOptions;
46
- function v(t) {
51
+ setup(M, { expose: E, emit: U }) {
52
+ const e = M, c = U, _ = P("multiSelectInputRef"), u = P("contentRef"), l = re(e, "multi", _, u, {
53
+ filterOptions: de
54
+ }), d = l.openPopover, z = l.popoverContentCustomStyles, A = l.inputWidthString, b = l.filteredOptions, {
55
+ isTreeMode: y,
56
+ getCheckState: T,
57
+ toggleOption: V,
58
+ toggle: $,
59
+ displayItems: p
60
+ } = ce(e, c), {
61
+ optionGroups: H,
62
+ visibleRows: k,
63
+ toggleExpanded: j,
64
+ resetExpanded: D,
65
+ handleArrowRight: F,
66
+ handleArrowLeft: N
67
+ } = ue(e, {
68
+ filteredOptions: l.filteredOptions,
69
+ isSearchActive: l.isSearchActive,
70
+ matchesSearch: l.matchesSearch,
71
+ getCheckState: T
72
+ });
73
+ function f(t) {
47
74
  l.openPopover.value = t;
48
75
  }
49
- const h = b(() => {
50
- if (e.returnObject) return e.modelValue;
51
- const t = e.modelValue.slice();
52
- return e.options.filter(
53
- (o) => t.includes(o[e.itemValue])
54
- );
55
- }), O = b(
56
- () => h.value.map((t) => t[e.itemLabel]).join(", ")
76
+ const x = R(
77
+ () => p.value.map((t) => t[e.itemLabel]).join(", ")
57
78
  );
58
- function k(t) {
59
- u("update:search", t);
60
- }
61
- function P(t) {
62
- return e.returnObject ? e.modelValue.some(
63
- (o) => o[e.itemValue] === t[e.itemValue]
64
- ) : e.modelValue.includes(t[e.itemValue]);
79
+ function L(t) {
80
+ c("update:search", t);
65
81
  }
66
- function I(t, o) {
67
- if (o) {
68
- const a = e.returnObject ? [...e.modelValue, t] : [...e.modelValue, t[e.itemValue]];
69
- u("update:modelValue", a);
70
- } else {
71
- const a = e.returnObject ? e.modelValue.filter(
72
- (s) => s[e.itemValue] !== t[e.itemValue]
73
- ) : e.modelValue.filter((s) => s !== t[e.itemValue]);
74
- u("update:modelValue", a);
75
- }
76
- }
77
- const S = ee(
78
- () => l.filteredOptions.value,
79
- (t) => {
80
- if (t.disabled) return;
81
- const o = P(t);
82
- I(t, !o);
83
- },
82
+ const m = se(
83
+ () => k.value.map((t) => t.option),
84
+ $,
84
85
  {
85
86
  closeOnSelect: !1,
86
- closePopover: () => v(!1),
87
- openPopoverRef: l.openPopover
87
+ closePopover: () => f(!1),
88
+ openPopoverRef: l.openPopover,
89
+ toggleOnSpace: y,
90
+ onArrowRight: F,
91
+ onArrowLeft: N
88
92
  }
89
93
  );
90
- S.setupKeydownBinding();
91
- const H = S.focusedOptionIndex, i = W(!1);
92
- function D(t) {
94
+ m.setupKeydownBinding();
95
+ const O = m.focusedOptionIndex, i = X(!1);
96
+ function K(t) {
93
97
  return !e.infiniteScroll || !l.openPopover.value || i.value || !e.infiniteScrollCanLoadMore() || !t || typeof t != "object" || !("clientHeight" in t) ? !1 : t.clientHeight > 0;
94
98
  }
95
- const E = b(
99
+ const W = R(
96
100
  () => {
97
101
  var t;
98
- return ((t = f.value) == null ? void 0 : t.closest(".unnnic-popover")) ?? f.value;
102
+ return ((t = u.value) == null ? void 0 : t.closest(".unnnic-popover")) ?? u.value;
99
103
  }
100
- ), { reset: _ } = Q(
101
- E,
104
+ ), { reset: h } = le(
105
+ W,
102
106
  () => {
103
- i.value || (i.value = !0, u("scroll-end"));
107
+ i.value || (i.value = !0, c("scroll-end"));
104
108
  },
105
109
  {
106
110
  distance: e.infiniteScrollDistance,
107
- canLoadMore: D
111
+ canLoadMore: K
108
112
  }
109
113
  );
110
- A(l.openPopover, (t) => {
114
+ Y(l.openPopover, (t) => {
111
115
  if (!t) {
112
- k(""), i.value = !1;
116
+ L(""), i.value = !1, D();
113
117
  return;
114
118
  }
115
- S.focusedOptionIndex.value = -1, e.infiniteScroll && V(() => _());
119
+ m.focusedOptionIndex.value = -1, e.infiniteScroll && S(() => h());
116
120
  });
117
- function F() {
118
- i.value = !1, l.openPopover.value && e.infiniteScroll && V(() => _());
121
+ function G() {
122
+ i.value = !1, l.openPopover.value && e.infiniteScroll && S(() => h());
119
123
  }
120
- function N() {
121
- i.value = !1, V(() => _());
124
+ function q() {
125
+ i.value = !1, S(() => h());
122
126
  }
123
- return z({
124
- openPopover: p,
125
- setOpenPopover: v,
126
- filteredOptions: m,
127
+ return E({
128
+ openPopover: d,
129
+ setOpenPopover: f,
130
+ filteredOptions: b,
127
131
  calculatedPopoverHeight: l.calculatedPopoverHeight,
128
- selectedItems: h,
129
- inputValue: O,
132
+ selectedItems: p,
133
+ inputValue: x,
130
134
  infiniteScrollLoading: i,
131
- finishInfiniteScroll: F,
132
- resetInfiniteScroll: N
133
- }), (t, o) => (r(), c("div", oe, [
134
- d(n(te), {
135
- open: n(p),
136
- "onUpdate:open": v
135
+ finishInfiniteScroll: G,
136
+ resetInfiniteScroll: q
137
+ }), (t, I) => (n(), r("div", he, [
138
+ s(o(pe), {
139
+ open: o(d),
140
+ "onUpdate:open": f
137
141
  }, {
138
- default: g(() => [
139
- d(n(le), { class: "w-full" }, {
140
- default: g(() => [
141
- d(x, {
142
+ default: v(() => [
143
+ s(o(fe), { class: "w-full" }, {
144
+ default: v(() => [
145
+ s(B, {
142
146
  ref_key: "multiSelectInputRef",
143
- ref: y,
144
- modelValue: O.value,
147
+ ref: _,
148
+ modelValue: x.value,
145
149
  class: "unnnic-multi-select__input",
146
150
  readonly: "",
147
151
  useFocusProp: "",
148
- focus: n(p),
152
+ focus: o(d),
149
153
  size: e.size,
150
154
  placeholder: e.placeholder,
151
155
  label: e.label,
152
156
  errors: e.errors,
153
157
  message: e.message,
154
- iconRight: n(p) ? "keyboard_arrow_up" : "keyboard_arrow_down",
158
+ iconRight: o(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
155
159
  disabled: e.disabled,
156
- showClear: !!h.value.length && e.clearable,
157
- onClear: o[0] || (o[0] = (a) => u("update:modelValue", []))
160
+ showClear: !!o(p).length && e.clearable,
161
+ onClear: I[0] || (I[0] = (a) => c("update:modelValue", []))
158
162
  }, null, 8, ["modelValue", "focus", "size", "placeholder", "label", "errors", "message", "iconRight", "disabled", "showClear"])
159
163
  ]),
160
164
  _: 1
161
165
  }),
162
- d(n(ne), {
166
+ s(o(me), {
163
167
  align: "start",
164
168
  class: "h-full",
165
- style: q(n(U)),
166
- width: n($)
169
+ style: Z(o(z)),
170
+ width: o(A)
167
171
  }, {
168
- default: g(() => [
169
- C("div", {
172
+ default: v(() => [
173
+ ee("div", {
170
174
  ref_key: "contentRef",
171
- ref: f,
175
+ ref: u,
172
176
  class: "unnnic-multi-select__content"
173
177
  }, [
174
- e.enableSearch ? (r(), L(x, {
178
+ e.enableSearch ? (n(), g(B, {
175
179
  key: 0,
176
180
  class: "unnnic-multi-select__input-search",
177
181
  modelValue: e.search,
178
182
  placeholder: t.$t("search"),
179
183
  iconLeft: "search",
180
- "onUpdate:modelValue": k
181
- }, null, 8, ["modelValue", "placeholder"])) : B("", !0),
182
- n(m).length === 0 ? (r(), c("p", ae, G(t.$t("without_results")), 1)) : (r(), c(R, { key: 2 }, [
183
- C("div", ie, [
184
- (r(!0), c(R, null, J(n(m), (a, s) => (r(), L(Y, {
185
- key: String(a[e.itemValue]),
186
- "data-option-index": s,
187
- label: String(a[e.itemLabel] ?? ""),
188
- active: P(a),
189
- focused: n(H) === s,
190
- disabled: a.disabled,
191
- "onUpdate:modelValue": (T) => I(a, T)
184
+ "onUpdate:modelValue": L
185
+ }, null, 8, ["modelValue", "placeholder"])) : C("", !0),
186
+ o(b).length === 0 ? (n(), r("p", Se, te(t.$t("without_results")), 1)) : (n(), r(w, { key: 2 }, [
187
+ o(y) ? (n(), g(ae, {
188
+ key: 0,
189
+ groups: o(H),
190
+ itemLabel: e.itemLabel,
191
+ itemValue: e.itemValue,
192
+ focusedIndex: o(O),
193
+ onSelect: o(V),
194
+ onExpand: o(j)
195
+ }, null, 8, ["groups", "itemLabel", "itemValue", "focusedIndex", "onSelect", "onExpand"])) : (n(), r("div", ve, [
196
+ (n(!0), r(w, null, oe(o(k), (a) => (n(), g(ie, {
197
+ key: String(a.option[e.itemValue]),
198
+ "data-option-index": a.index,
199
+ label: String(a.option[e.itemLabel] ?? ""),
200
+ active: a.checkState,
201
+ focused: o(O) === a.index,
202
+ disabled: a.option.disabled,
203
+ "onUpdate:modelValue": (J) => o(V)(a.option, J)
192
204
  }, null, 8, ["data-option-index", "label", "active", "focused", "disabled", "onUpdate:modelValue"]))), 128))
193
- ]),
194
- e.infiniteScroll && i.value ? (r(), c("div", re, [
195
- d(X, {
205
+ ])),
206
+ e.infiniteScroll && i.value ? (n(), r("div", ge, [
207
+ s(ne, {
196
208
  scheme: "fg-base",
197
209
  size: "sm"
198
210
  })
199
- ])) : B("", !0)
211
+ ])) : C("", !0)
200
212
  ], 64))
201
213
  ], 512)
202
214
  ]),
@@ -209,5 +221,5 @@ const oe = { class: "unnnic-multi-select" }, ae = {
209
221
  }
210
222
  });
211
223
  export {
212
- be as default
224
+ Ee as default
213
225
  };
@@ -0,0 +1,74 @@
1
+ import { computed as c, toValue as w } from "vue";
2
+ import { getVisibleChildren as V } from "../lib/tree-selection.mjs";
3
+ import { useTreeExpansion as C } from "./useTreeExpansion.mjs";
4
+ function S(x, {
5
+ filteredOptions: h,
6
+ isSearchActive: m,
7
+ matchesSearch: E,
8
+ getCheckState: a
9
+ }) {
10
+ const i = C(m);
11
+ function s(n) {
12
+ return n[x.itemValue];
13
+ }
14
+ const l = c(() => {
15
+ let n = 0;
16
+ return w(h).map((e) => {
17
+ const r = V(e, E), u = r.length > 0, d = u && i.isExpanded(s(e)), p = {
18
+ option: e,
19
+ parent: null,
20
+ level: 1,
21
+ hasChildren: u,
22
+ isExpanded: d,
23
+ checkState: a(e),
24
+ index: n++
25
+ };
26
+ return d ? [
27
+ p,
28
+ ...r.map(
29
+ (f) => ({
30
+ option: f,
31
+ parent: e,
32
+ level: 2,
33
+ hasChildren: !1,
34
+ isExpanded: !1,
35
+ checkState: a(f),
36
+ index: n++
37
+ })
38
+ )
39
+ ] : [p];
40
+ });
41
+ }), t = c(() => l.value.flat());
42
+ function o(n, e) {
43
+ i.setExpanded(s(n), e);
44
+ }
45
+ function v(n) {
46
+ const e = t.value[n];
47
+ if (e != null && e.hasChildren) {
48
+ if (e.isExpanded) return n + 1;
49
+ o(e.option, !0);
50
+ }
51
+ }
52
+ function g(n) {
53
+ const e = t.value[n];
54
+ if (e) {
55
+ if (e.isExpanded) {
56
+ o(e.option, !1);
57
+ return;
58
+ }
59
+ if (e.parent)
60
+ return t.value.findIndex((r) => r.option === e.parent);
61
+ }
62
+ }
63
+ return {
64
+ optionGroups: l,
65
+ visibleRows: t,
66
+ toggleExpanded: o,
67
+ resetExpanded: i.reset,
68
+ handleArrowRight: v,
69
+ handleArrowLeft: g
70
+ };
71
+ }
72
+ export {
73
+ S as useMultiSelectRows
74
+ };
@@ -0,0 +1,44 @@
1
+ import { computed as l } from "vue";
2
+ import { isTreeOptions as S, withImpliedChildren as h, getDisplayOptions as y, toggleOptionValue as b, getCheckState as C, flattenTreeOptions as I } from "../lib/tree-selection.mjs";
3
+ function k(e, f) {
4
+ const c = l(() => S(e.options));
5
+ function n(t) {
6
+ return t[e.itemValue];
7
+ }
8
+ const a = l(
9
+ () => Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue]
10
+ ), g = l(
11
+ () => e.returnObject ? a.value.map(n) : a.value
12
+ ), r = l(
13
+ () => h(e.options, g.value, n)
14
+ ), m = l(() => new Set(r.value));
15
+ function V(t) {
16
+ if (!e.returnObject) return t;
17
+ const o = [
18
+ ...I(e.options),
19
+ ...a.value
20
+ ], i = new Map(o.map((u) => [n(u), u]));
21
+ return t.map((u) => i.get(u));
22
+ }
23
+ function s(t) {
24
+ return C(t, m.value, n);
25
+ }
26
+ function d(t, o) {
27
+ const i = b(
28
+ e.options,
29
+ r.value,
30
+ t,
31
+ o,
32
+ n
33
+ );
34
+ f("update:modelValue", V(i));
35
+ }
36
+ function v(t) {
37
+ t.disabled || d(t, s(t) !== !0);
38
+ }
39
+ const O = l(() => e.returnObject && !c.value ? e.modelValue : y(e.options, m.value, n));
40
+ return { isTreeMode: c, getCheckState: s, toggleOption: d, toggle: v, displayItems: O };
41
+ }
42
+ export {
43
+ k as useMultiSelectSelection
44
+ };
@@ -1,63 +1,68 @@
1
- import { ref as b, computed as s } from "vue";
2
- import { useElementSize as w } from "../node_modules/@vueuse/core/dist/index.mjs";
3
- function V(n, g, c, d) {
4
- const v = b(!1), { width: f } = w(c), m = s(() => `${f.value}px`), l = s(() => {
5
- var t;
6
- const e = n.options;
7
- if (!n.enableSearch || !n.search) return e;
8
- const o = ((t = n.search) == null ? void 0 : t.toLowerCase()) ?? "";
9
- return e.filter((i) => {
10
- const a = String(i[n.itemLabel] ?? "").toLowerCase().includes(o), r = String(i[n.itemValue] ?? "").toLowerCase().includes(o);
11
- return a || r;
12
- });
13
- });
14
- function L(e) {
1
+ import { ref as G, computed as s } from "vue";
2
+ import { useElementSize as P } from "../node_modules/@vueuse/core/dist/index.mjs";
3
+ function A(e, d, l, f, {
4
+ filterOptions: m = (a, c) => a.filter(c)
5
+ } = {}) {
6
+ const a = G(!1), { width: c } = P(l), S = s(() => `${c.value}px`), r = s(
7
+ () => e.enableSearch && !!e.search
8
+ );
9
+ function u(t) {
10
+ if (!r.value) return !0;
11
+ const o = e.search.toLowerCase(), n = String(t[e.itemLabel] ?? "").toLowerCase().includes(o), i = String(t[e.itemValue] ?? "").toLowerCase().includes(o);
12
+ return n || i;
13
+ }
14
+ const h = s(
15
+ () => r.value ? m(e.options, u) : e.options
16
+ );
17
+ function L(t) {
15
18
  const {
16
19
  optionsLength: o,
17
- optionsLines: t,
20
+ optionsLines: n,
18
21
  enableSearch: i,
19
- variant: a
20
- } = e;
22
+ variant: H
23
+ } = t;
21
24
  if (o === 0) return "unset";
22
- if (a === "single") {
23
- const x = 37 * t, H = i ? 1 : 2, h = x + 32 + (4 * t - H);
24
- return `${i ? h + 45 + 1 : h}px`;
25
+ if (H === "single") {
26
+ const w = 37 * n, C = i ? 1 : 2, g = w + 32 + (4 * n - C);
27
+ return `${i ? g + 45 + 1 : g}px`;
25
28
  }
26
- const r = i ? 16 : 0, u = 22 * t + (24 * t - 2);
27
- return `${i ? u + 51 + r : u}px`;
29
+ const b = i ? 16 : 0, v = 22 * n + (24 * n - 2);
30
+ return `${i ? v + 51 + b : v}px`;
28
31
  }
29
32
  const p = s(
30
33
  () => {
31
- var e;
34
+ var t;
32
35
  return L({
33
- optionsLength: ((e = n.options) == null ? void 0 : e.length) ?? 0,
34
- optionsLines: n.optionsLines,
35
- enableSearch: n.enableSearch,
36
- variant: g
36
+ optionsLength: ((t = e.options) == null ? void 0 : t.length) ?? 0,
37
+ optionsLines: e.optionsLines,
38
+ enableSearch: e.enableSearch,
39
+ variant: d
37
40
  });
38
41
  }
39
- ), S = s(() => {
40
- var t;
41
- const e = ((t = l.value) == null ? void 0 : t.length) === 0, o = p.value;
42
+ ), x = s(() => {
43
+ var n;
44
+ const t = ((n = h.value) == null ? void 0 : n.length) === 0, o = p.value;
42
45
  return {
43
46
  overflow: "auto",
44
47
  display: "flex",
45
48
  flexDirection: "column",
46
49
  minHeight: o,
47
- maxHeight: e ? "unset" : o,
48
- height: e ? o : "unset"
50
+ maxHeight: t ? "unset" : o,
51
+ height: t ? o : "unset"
49
52
  };
50
53
  });
51
54
  return {
52
- openPopover: v,
53
- triggerRef: c,
54
- contentRef: d,
55
- inputWidthString: m,
55
+ openPopover: a,
56
+ triggerRef: l,
57
+ contentRef: f,
58
+ inputWidthString: S,
56
59
  calculatedPopoverHeight: p,
57
- popoverContentCustomStyles: S,
58
- filteredOptions: l
60
+ popoverContentCustomStyles: x,
61
+ isSearchActive: r,
62
+ matchesSearch: u,
63
+ filteredOptions: h
59
64
  };
60
65
  }
61
66
  export {
62
- V as useSelectBase
67
+ A as useSelectBase
63
68
  };