@indielayer/ui 1.16.0 → 1.18.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 (156) hide show
  1. package/README.md +2 -2
  2. package/docs/assets/css/tailwind.css +6 -0
  3. package/docs/components/common/CodePreview.vue +14 -9
  4. package/docs/components/common/DocsFeatures.vue +41 -0
  5. package/docs/components/common/DocsHero.vue +216 -0
  6. package/docs/components/common/DocumentPage.vue +99 -112
  7. package/docs/components/common/ExampleBlocks.vue +157 -0
  8. package/docs/components/menu/DocsMenu.vue +3 -0
  9. package/docs/components/toolbar/Toolbar.vue +11 -2
  10. package/docs/components/toolbar/ToolbarColorToggle.vue +4 -4
  11. package/docs/components/toolbar/ToolbarSearch.vue +59 -62
  12. package/docs/composables/useDocMeta.ts +47 -0
  13. package/docs/icons.ts +28 -0
  14. package/docs/layouts/default.vue +1 -3
  15. package/docs/layouts/simple.vue +3 -1
  16. package/docs/main.ts +5 -0
  17. package/docs/pages/colors.vue +56 -47
  18. package/docs/pages/component/infiniteLoader/composable.vue +168 -0
  19. package/docs/pages/component/infiniteLoader/index.vue +36 -0
  20. package/docs/pages/component/infiniteLoader/usage.vue +161 -0
  21. package/docs/pages/component/select/size.vue +1 -1
  22. package/docs/pages/component/select/usage.vue +14 -7
  23. package/docs/pages/component/virtualGrid/index.vue +29 -0
  24. package/docs/pages/component/virtualGrid/usage.vue +20 -0
  25. package/docs/pages/component/virtualList/dynamicHeight.vue +75 -0
  26. package/docs/pages/component/virtualList/index.vue +36 -0
  27. package/docs/pages/component/virtualList/usage.vue +17 -0
  28. package/docs/pages/error.vue +5 -3
  29. package/docs/pages/icons.vue +64 -54
  30. package/docs/pages/index.vue +93 -82
  31. package/docs/pages/typography.vue +38 -28
  32. package/docs/router/index.ts +31 -3
  33. package/docs/search/components.json +1 -1
  34. package/docs/search/index.json +1 -0
  35. package/lib/components/container/theme/Container.base.theme.js +1 -1
  36. package/lib/components/divider/theme/Divider.base.theme.js +1 -1
  37. package/lib/components/input/Input.vue.js +23 -24
  38. package/lib/components/select/Select.vue.d.ts +16 -27
  39. package/lib/components/select/Select.vue.js +452 -345
  40. package/lib/components/table/Table.vue.js +1 -1
  41. package/lib/composables/useVirtualList.d.ts +1 -1
  42. package/lib/index.d.ts +1 -0
  43. package/lib/index.js +88 -76
  44. package/lib/index.umd.js +4 -4
  45. package/lib/install.js +15 -7
  46. package/lib/version.d.ts +1 -1
  47. package/lib/version.js +1 -1
  48. package/lib/virtual/components/infiniteLoader/InfiniteLoader.test.d.ts +1 -0
  49. package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue.d.ts +49 -0
  50. package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue.js +21 -0
  51. package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue2.js +4 -0
  52. package/lib/virtual/components/virtualGrid/VirtualGrid.vue.d.ts +185 -0
  53. package/lib/virtual/components/virtualGrid/VirtualGrid.vue.js +241 -0
  54. package/lib/virtual/components/virtualGrid/VirtualGrid.vue2.js +4 -0
  55. package/lib/virtual/components/virtualGrid/types.d.ts +138 -0
  56. package/lib/virtual/components/virtualList/VirtualList.test.d.ts +1 -0
  57. package/lib/virtual/components/virtualList/VirtualList.vue.d.ts +135 -0
  58. package/lib/virtual/components/virtualList/VirtualList.vue.js +159 -0
  59. package/lib/virtual/components/virtualList/VirtualList.vue2.js +4 -0
  60. package/lib/virtual/components/virtualList/isDynamicRowHeight.d.ts +2 -0
  61. package/lib/virtual/components/virtualList/isDynamicRowHeight.js +6 -0
  62. package/lib/virtual/components/virtualList/types.d.ts +115 -0
  63. package/lib/virtual/components/virtualList/useDynamicRowHeight.d.ts +7 -0
  64. package/lib/virtual/components/virtualList/useDynamicRowHeight.js +68 -0
  65. package/lib/virtual/components/virtualList/useDynamicRowHeight.test.d.ts +1 -0
  66. package/lib/virtual/composables/infinite-loader/scanForUnloadedIndices.d.ts +8 -0
  67. package/lib/virtual/composables/infinite-loader/scanForUnloadedIndices.js +41 -0
  68. package/lib/virtual/composables/infinite-loader/scanForUnloadedIndices.test.d.ts +1 -0
  69. package/lib/virtual/composables/infinite-loader/types.d.ts +30 -0
  70. package/lib/virtual/composables/infinite-loader/useInfiniteLoader.d.ts +6 -0
  71. package/lib/virtual/composables/infinite-loader/useInfiniteLoader.js +42 -0
  72. package/lib/virtual/composables/infinite-loader/useInfiniteLoader.test.d.ts +1 -0
  73. package/lib/virtual/core/createCachedBounds.d.ts +6 -0
  74. package/lib/virtual/core/createCachedBounds.js +55 -0
  75. package/lib/virtual/core/getEstimatedSize.d.ts +6 -0
  76. package/lib/virtual/core/getEstimatedSize.js +22 -0
  77. package/lib/virtual/core/getOffsetForIndex.d.ts +11 -0
  78. package/lib/virtual/core/getOffsetForIndex.js +40 -0
  79. package/lib/virtual/core/getStartStopIndices.d.ts +13 -0
  80. package/lib/virtual/core/getStartStopIndices.js +31 -0
  81. package/lib/virtual/core/getStartStopIndices.test.d.ts +1 -0
  82. package/lib/virtual/core/types.d.ts +11 -0
  83. package/lib/virtual/core/useCachedBounds.d.ts +7 -0
  84. package/lib/virtual/core/useCachedBounds.js +18 -0
  85. package/lib/virtual/core/useIsRtl.d.ts +2 -0
  86. package/lib/virtual/core/useIsRtl.js +15 -0
  87. package/lib/virtual/core/useItemSize.d.ts +5 -0
  88. package/lib/virtual/core/useItemSize.js +27 -0
  89. package/lib/virtual/core/useVirtualizer.d.ts +33 -0
  90. package/lib/virtual/core/useVirtualizer.js +171 -0
  91. package/lib/virtual/index.d.ts +9 -0
  92. package/lib/virtual/test-utils/mockResizeObserver.d.ts +15 -0
  93. package/lib/virtual/types.d.ts +2 -0
  94. package/lib/virtual/utils/adjustScrollOffsetForRtl.d.ts +7 -0
  95. package/lib/virtual/utils/adjustScrollOffsetForRtl.js +24 -0
  96. package/lib/virtual/utils/areArraysEqual.d.ts +1 -0
  97. package/lib/virtual/utils/assert.d.ts +1 -0
  98. package/lib/virtual/utils/assert.js +7 -0
  99. package/lib/virtual/utils/getRTLOffsetType.d.ts +2 -0
  100. package/lib/virtual/utils/getRTLOffsetType.js +13 -0
  101. package/lib/virtual/utils/getScrollbarSize.d.ts +2 -0
  102. package/lib/virtual/utils/getScrollbarSize.js +11 -0
  103. package/lib/virtual/utils/isRtl.d.ts +1 -0
  104. package/lib/virtual/utils/isRtl.js +12 -0
  105. package/lib/virtual/utils/parseNumericStyleValue.d.ts +2 -0
  106. package/lib/virtual/utils/parseNumericStyleValue.js +15 -0
  107. package/lib/virtual/utils/shallowCompare.d.ts +1 -0
  108. package/lib/virtual/utils/shallowCompare.js +14 -0
  109. package/package.json +8 -3
  110. package/src/components/container/theme/Container.base.theme.ts +1 -1
  111. package/src/components/divider/theme/Divider.base.theme.ts +1 -1
  112. package/src/components/input/Input.vue +1 -2
  113. package/src/components/select/Select.vue +97 -20
  114. package/src/components/table/Table.vue +1 -1
  115. package/src/composables/useVirtualList.ts +1 -1
  116. package/src/index.ts +1 -0
  117. package/src/install.ts +9 -3
  118. package/src/version.ts +1 -1
  119. package/src/virtual/README.md +285 -0
  120. package/src/virtual/components/infiniteLoader/InfiniteLoader.test.ts +96 -0
  121. package/src/virtual/components/infiniteLoader/InfiniteLoader.vue +18 -0
  122. package/src/virtual/components/virtualGrid/VirtualGrid.vue +322 -0
  123. package/src/virtual/components/virtualGrid/types.ts +160 -0
  124. package/src/virtual/components/virtualList/VirtualList.test.ts +164 -0
  125. package/src/virtual/components/virtualList/VirtualList.vue +227 -0
  126. package/src/virtual/components/virtualList/isDynamicRowHeight.ts +13 -0
  127. package/src/virtual/components/virtualList/types.ts +127 -0
  128. package/src/virtual/components/virtualList/useDynamicRowHeight.test.ts +197 -0
  129. package/src/virtual/components/virtualList/useDynamicRowHeight.ts +149 -0
  130. package/src/virtual/composables/infinite-loader/scanForUnloadedIndices.test.ts +141 -0
  131. package/src/virtual/composables/infinite-loader/scanForUnloadedIndices.ts +82 -0
  132. package/src/virtual/composables/infinite-loader/types.ts +36 -0
  133. package/src/virtual/composables/infinite-loader/useInfiniteLoader.test.ts +236 -0
  134. package/src/virtual/composables/infinite-loader/useInfiniteLoader.ts +88 -0
  135. package/src/virtual/core/createCachedBounds.ts +72 -0
  136. package/src/virtual/core/getEstimatedSize.ts +29 -0
  137. package/src/virtual/core/getOffsetForIndex.ts +90 -0
  138. package/src/virtual/core/getStartStopIndices.test.ts +45 -0
  139. package/src/virtual/core/getStartStopIndices.ts +71 -0
  140. package/src/virtual/core/types.ts +17 -0
  141. package/src/virtual/core/useCachedBounds.ts +21 -0
  142. package/src/virtual/core/useIsRtl.ts +25 -0
  143. package/src/virtual/core/useItemSize.ts +34 -0
  144. package/src/virtual/core/useVirtualizer.ts +294 -0
  145. package/src/virtual/index.ts +25 -0
  146. package/src/virtual/test-utils/mockResizeObserver.ts +162 -0
  147. package/src/virtual/types.ts +3 -0
  148. package/src/virtual/utils/adjustScrollOffsetForRtl.ts +37 -0
  149. package/src/virtual/utils/areArraysEqual.ts +13 -0
  150. package/src/virtual/utils/assert.ts +10 -0
  151. package/src/virtual/utils/getRTLOffsetType.ts +51 -0
  152. package/src/virtual/utils/getScrollbarSize.ts +24 -0
  153. package/src/virtual/utils/isRtl.ts +13 -0
  154. package/src/virtual/utils/parseNumericStyleValue.ts +21 -0
  155. package/src/virtual/utils/shallowCompare.ts +29 -0
  156. package/volar.d.ts +3 -0
@@ -1,37 +1,64 @@
1
- import { defineComponent as Fe, mergeModels as ce, computed as w, ref as b, useModel as Pe, watch as D, nextTick as Z, unref as n, onUnmounted as Ee, openBlock as s, createBlock as x, mergeProps as U, toHandlers as ve, withCtx as m, createElementVNode as F, createElementBlock as f, normalizeClass as k, Fragment as O, createTextVNode as S, toDisplayString as g, createVNode as B, renderSlot as $, createCommentVNode as L, renderList as j, createSlots as He, normalizeStyle as We, withModifiers as qe, withDirectives as Ue, vModelSelect as je } from "vue";
2
- import { useEventListener as Xe, useResizeObserver as Ke } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
- import { useColors as Ge } from "../../composables/useColors.js";
4
- import { useCommon as he } from "../../composables/useCommon.js";
5
- import { useInputtable as _ } from "../../composables/useInputtable.js";
6
- import { useInteractive as ke } from "../../composables/useInteractive.js";
7
- import { useTheme as Je } from "../../composables/useTheme.js";
8
- import { useVirtualList as Qe } from "../../composables/useVirtualList.js";
9
- import { checkIcon as Ye, closeIcon as Ze, selectIcon as _e } from "../../common/icons.js";
10
- import el from "../label/Label.vue.js";
11
- import pe from "../tag/Tag.vue.js";
12
- import me from "../icon/Icon.vue.js";
13
- import ll from "../menu/MenuItem.vue.js";
14
- import tl from "../spinner/Spinner.vue.js";
15
- import ye from "../popover/Popover.vue.js";
1
+ import { defineComponent as He, mergeModels as ve, computed as O, ref as x, useModel as We, watch as D, nextTick as Z, unref as u, onUnmounted as qe, openBlock as o, createBlock as B, mergeProps as j, toHandlers as me, withCtx as C, createElementVNode as I, createElementBlock as n, normalizeClass as S, Fragment as b, createTextVNode as k, toDisplayString as d, createVNode as M, renderSlot as h, createCommentVNode as y, renderList as X, createSlots as Ue, normalizeStyle as je, withModifiers as Xe, withDirectives as Ke, vModelSelect as Ge } from "vue";
2
+ import { useEventListener as Je, useResizeObserver as Qe } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
+ import { useColors as Ye } from "../../composables/useColors.js";
4
+ import { useCommon as ge } from "../../composables/useCommon.js";
5
+ import { useInputtable as ee } from "../../composables/useInputtable.js";
6
+ import { useInteractive as xe } from "../../composables/useInteractive.js";
7
+ import { useTheme as Ze } from "../../composables/useTheme.js";
8
+ import { useVirtualList as el } from "../../composables/useVirtualList.js";
9
+ import { checkIcon as ll, closeIcon as tl, selectIcon as sl } from "../../common/icons.js";
10
+ import il from "../label/Label.vue.js";
11
+ import ye from "../tag/Tag.vue.js";
12
+ import he from "../icon/Icon.vue.js";
13
+ import al from "../menu/MenuItem.vue.js";
14
+ import ol from "../spinner/Spinner.vue.js";
15
+ import be from "../popover/Popover.vue.js";
16
16
  import "../popover/Popover.vue2.js";
17
- import be from "../popover/PopoverContainer.vue.js";
18
- import al from "../inputFooter/InputFooter.vue.js";
19
- import il from "../input/Input.vue.js";
20
- import { useThrottleFn as ol } from "../../node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/shared/index.js";
21
- const sl = { class: "relative" }, rl = {
17
+ import ke from "../popover/PopoverContainer.vue.js";
18
+ import rl from "../inputFooter/InputFooter.vue.js";
19
+ import nl from "../input/Input.vue.js";
20
+ import { useThrottleFn as ul } from "../../node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/shared/index.js";
21
+ const fl = { class: "relative" }, dl = {
22
22
  key: 0,
23
23
  class: "text-secondary-400 dark:text-secondary-500"
24
- }, nl = { key: 1 }, ul = {
24
+ }, cl = { key: 1 }, pl = {
25
+ key: 0,
26
+ class: "flex items-center"
27
+ }, vl = {
28
+ key: 0,
29
+ class: "mr-2 shrink-0"
30
+ }, ml = { class: "flex-1 truncate" }, yl = {
31
+ key: 1,
32
+ class: "ml-1 shrink-0"
33
+ }, hl = {
34
+ key: 0,
35
+ class: "flex items-center"
36
+ }, bl = {
37
+ key: 0,
38
+ class: "mr-2 shrink-0"
39
+ }, kl = { class: "flex-1 truncate" }, gl = {
40
+ key: 1,
41
+ class: "ml-1 shrink-0"
42
+ }, xl = {
25
43
  key: 0,
26
44
  class: "text-secondary-400 dark:text-secondary-500"
27
- }, dl = { key: 1 }, fl = {
45
+ }, Cl = { key: 1 }, wl = {
28
46
  key: 0,
29
47
  class: "p-2 text-center text-secondary-400"
30
- }, cl = ["id", "name", "disabled", "multiple", "readonly"], vl = ["value", "disabled"], pl = {
31
- ...Ge.props("secondary"),
32
- ...he.props(),
33
- ...ke.props(),
34
- ..._.props(),
48
+ }, $l = {
49
+ key: 0,
50
+ class: "flex items-center"
51
+ }, Ol = {
52
+ key: 0,
53
+ class: "mr-2 shrink-0"
54
+ }, Sl = { class: "flex-1 truncate" }, Al = {
55
+ key: 1,
56
+ class: "ml-1 shrink-0"
57
+ }, Ll = ["id", "name", "disabled", "multiple", "readonly"], Rl = ["value", "disabled"], Il = {
58
+ ...Ye.props("secondary"),
59
+ ...ge.props(),
60
+ ...xe.props(),
61
+ ...ee.props(),
35
62
  placeholder: String,
36
63
  options: Array,
37
64
  multiple: Boolean,
@@ -45,6 +72,9 @@ const sl = { class: "relative" }, rl = {
45
72
  type: String,
46
73
  default: "Filter by..."
47
74
  },
75
+ filterablePrefix: Boolean,
76
+ filterableSuffix: Boolean,
77
+ hideSelectedOptionSlots: Boolean,
48
78
  virtualList: Boolean,
49
79
  virtualListOffsetTop: Number,
50
80
  virtualListOffsetBottom: Number,
@@ -54,321 +84,333 @@ const sl = { class: "relative" }, rl = {
54
84
  },
55
85
  virtualListOverscan: {
56
86
  type: Number,
57
- default: 5
87
+ default: 10
58
88
  },
59
89
  placement: String
60
- }, ml = {
90
+ }, Vl = {
61
91
  name: "XSelect",
62
92
  validators: {
63
- ...he.validators()
93
+ ...ge.validators()
64
94
  }
65
- }, Ml = /* @__PURE__ */ Fe({
66
- ...ml,
67
- props: /* @__PURE__ */ ce(pl, {
95
+ }, Yl = /* @__PURE__ */ He({
96
+ ...Vl,
97
+ props: /* @__PURE__ */ ve(Il, {
68
98
  filter: { default: "" },
69
99
  filterModifiers: {}
70
100
  }),
71
- emits: /* @__PURE__ */ ce([..._.emits(), "close"], ["update:filter"]),
72
- setup(ee, { expose: ge, emit: Ce }) {
73
- const i = ee, z = Ce, p = w(() => i.multiple || i.multipleCheckbox), X = b(null), K = b(null), P = b(null), C = b(null), G = b(null), c = b(), I = Pe(ee, "filter"), E = b(null), A = w(() => i.disabled || i.loading || i.readonly), we = w(() => !i.loading && !i.readonly && !i.disabled && i.clearable && !J(o.value)), o = w({
101
+ emits: /* @__PURE__ */ ve([...ee.emits(), "close", "open"], ["update:filter"]),
102
+ setup(le, { expose: Ce, emit: we }) {
103
+ const a = le, T = we, m = O(() => a.multiple || a.multipleCheckbox), K = x(null), G = x(null), E = x(null), A = x(null), J = x(null), p = x(), _ = We(le, "filter"), H = x(null), R = O(() => a.disabled || a.loading || a.readonly), $e = O(() => !a.loading && !a.readonly && !a.disabled && a.clearable && !Q(i.value)), i = O({
74
104
  get() {
75
- return p.value ? i.modelValue ? Array.isArray(i.modelValue) ? i.modelValue : [i.modelValue] : [] : i.modelValue;
105
+ return m.value ? a.modelValue ? Array.isArray(a.modelValue) ? a.modelValue : [a.modelValue] : [] : a.modelValue;
76
106
  },
77
107
  set(e) {
78
- z("update:modelValue", e);
108
+ T("update:modelValue", e);
109
+ }
110
+ }), Oe = O(() => a.options ? new Map(a.options.map((e) => [e.value, e])) : /* @__PURE__ */ new Map()), Se = O(() => a.options ? new Map(a.options.map((e) => [
111
+ e,
112
+ {
113
+ label: e.label.toLowerCase(),
114
+ prefix: a.filterablePrefix && e.prefix ? e.prefix.toLowerCase() : void 0,
115
+ suffix: a.filterableSuffix && e.suffix ? e.suffix.toLowerCase() : void 0
79
116
  }
80
- }), Oe = w(() => i.options ? new Map(i.options.map((e) => [e, e.label.toLowerCase()])) : /* @__PURE__ */ new Map()), h = w(() => {
81
- if (!i.options || i.options.length === 0)
117
+ ])) : /* @__PURE__ */ new Map());
118
+ function Ae(e, s) {
119
+ var r, t;
120
+ const l = Se.value.get(e);
121
+ return l ? l.label.includes(s) || ((r = l.prefix) == null ? void 0 : r.includes(s)) || ((t = l.suffix) == null ? void 0 : t.includes(s)) : !1;
122
+ }
123
+ const w = O(() => {
124
+ if (!a.options || a.options.length === 0)
82
125
  return [];
83
- const e = I.value.toLowerCase(), t = I.value !== "", l = new Set(
84
- p.value && Array.isArray(o.value) ? o.value : []
85
- ), a = p.value ? null : o.value, r = Oe.value;
86
- return i.options.filter((u) => {
87
- var d;
88
- return !t || ((d = r.get(u)) == null ? void 0 : d.includes(e));
89
- }).map((u) => {
90
- const d = p.value ? l.has(u.value) : u.value === a;
126
+ const e = _.value.toLowerCase(), s = _.value !== "", l = new Set(
127
+ m.value && Array.isArray(i.value) ? i.value : []
128
+ ), r = m.value ? null : i.value;
129
+ return a.options.filter((t) => !s || Ae(t, e)).map((t) => {
130
+ const c = m.value ? l.has(t.value) : t.value === r;
91
131
  return {
92
- value: u.value,
93
- label: u.label,
94
- active: d,
95
- prefix: u.prefix,
96
- suffix: u.suffix,
97
- disabled: u.disabled,
98
- iconRight: !i.multipleCheckbox && d ? Ye : void 0,
99
- keepOpenOnClick: u.keepOpenOnClick,
100
- onClick: () => ie(u.value)
132
+ value: t.value,
133
+ label: t.label,
134
+ active: c,
135
+ prefix: t.prefix,
136
+ suffix: t.suffix,
137
+ disabled: t.disabled,
138
+ iconRight: !a.multipleCheckbox && c ? ll : void 0,
139
+ keepOpenOnClick: t.keepOpenOnClick,
140
+ onClick: () => ae(t.value)
101
141
  };
102
142
  });
103
- }), le = w(() => h.value.filter((e) => !e.disabled)), { list: te, scrollTo: $e, containerProps: Ae, wrapperProps: Le } = Qe(
104
- h,
143
+ }), te = O(() => w.value.filter((e) => !e.disabled)), { list: se, scrollTo: Le, containerProps: Re, wrapperProps: Ie } = el(
144
+ w,
105
145
  {
106
- disabled: !i.virtualList,
107
- itemHeight: i.virtualListItemHeight,
108
- topOffset: i.virtualListOffsetTop || 0,
109
- bottomOffset: i.virtualListOffsetBottom || 0,
110
- overscan: i.virtualListOverscan
146
+ disabled: !a.virtualList,
147
+ itemHeight: a.virtualListItemHeight,
148
+ topOffset: a.virtualListOffsetTop || 0,
149
+ bottomOffset: a.virtualListOffsetBottom || 0,
150
+ overscan: a.virtualListOverscan
111
151
  }
112
- ), V = w(() => {
152
+ ), z = O(() => {
113
153
  var e;
114
- return (e = C.value) == null ? void 0 : e.isOpen;
154
+ return (e = A.value) == null ? void 0 : e.isOpen;
115
155
  });
116
- D(I, (e) => {
117
- e && (c.value = void 0, H(-1));
118
- }), D(V, (e) => {
119
- e ? (Re(), (p.value || typeof c.value > "u") && H(-1), setTimeout(() => {
156
+ D(_, (e) => {
157
+ e && (p.value = void 0, W(-1));
158
+ }), D(z, (e) => {
159
+ e ? (Ve(), (m.value || typeof p.value > "u") && W(-1), setTimeout(() => {
120
160
  requestAnimationFrame(() => {
121
- var t;
122
- ae(c.value || 0), i.filterable && ((t = E.value) == null || t.focus());
161
+ var s;
162
+ ie(p.value || 0), a.filterable && ((s = H.value) == null || s.focus());
123
163
  });
124
- }, 50)) : (i.filterable && (I.value = ""), z("close"));
164
+ }, 50), T("open")) : (a.filterable && (_.value = ""), T("close"));
125
165
  });
126
- function Re() {
127
- if (p.value) {
128
- if (Array.isArray(o.value) && o.value.length > 0) {
129
- const e = h.value.findIndex((t) => t.value === o.value[0]);
130
- e !== -1 && (c.value = e);
166
+ function Ve() {
167
+ if (m.value) {
168
+ if (Array.isArray(i.value) && i.value.length > 0) {
169
+ const e = w.value.findIndex((s) => s.value === i.value[0]);
170
+ e !== -1 && (p.value = e);
131
171
  }
132
172
  } else {
133
- const e = h.value.findIndex((t) => t.value === o.value);
134
- e !== -1 && (c.value = e);
173
+ const e = w.value.findIndex((s) => s.value === i.value);
174
+ e !== -1 && (p.value = e);
135
175
  }
136
176
  }
137
- function ae(e) {
138
- var t;
139
- i.virtualList ? $e(e) : P.value && ((t = P.value[e]) == null || t.$el.scrollIntoView({ block: "nearest", inline: "nearest" }));
177
+ function ie(e) {
178
+ var s;
179
+ a.virtualList ? Le(e) : E.value && ((s = E.value[e]) == null || s.$el.scrollIntoView({ block: "nearest", inline: "nearest" }));
140
180
  }
141
- D(c, (e) => {
142
- typeof e < "u" && P.value && ae(e);
181
+ D(p, (e) => {
182
+ typeof e < "u" && E.value && ie(e);
143
183
  });
144
- function H(e, t = "down") {
145
- if (!le.value || le.value.length === 0) {
146
- c.value = void 0;
184
+ function W(e, s = "down") {
185
+ if (!te.value || te.value.length === 0) {
186
+ p.value = void 0;
147
187
  return;
148
188
  }
149
- typeof e > "u" && (e = t === "down" ? -1 : 1);
150
- const l = h.value.length;
151
- let a = 0;
152
- if (t === "down") {
153
- let r = e + 1;
154
- for (r > l - 1 && (r = 0); h.value[r].disabled; )
155
- if (++r > l - 1 && (r = 0), ++a >= l) {
156
- c.value = void 0;
189
+ typeof e > "u" && (e = s === "down" ? -1 : 1);
190
+ const l = w.value.length;
191
+ let r = 0;
192
+ if (s === "down") {
193
+ let t = e + 1;
194
+ for (t > l - 1 && (t = 0); w.value[t].disabled; )
195
+ if (++t > l - 1 && (t = 0), ++r >= l) {
196
+ p.value = void 0;
157
197
  return;
158
198
  }
159
- c.value = r;
199
+ p.value = t;
160
200
  } else {
161
- let r = e - 1;
162
- for (r < 0 && (r = l - 1); h.value[r].disabled; )
163
- if (--r < 0 && (r = l - 1), ++a >= l) {
164
- c.value = void 0;
201
+ let t = e - 1;
202
+ for (t < 0 && (t = l - 1); w.value[t].disabled; )
203
+ if (--t < 0 && (t = l - 1), ++r >= l) {
204
+ p.value = void 0;
165
205
  return;
166
206
  }
167
- c.value = r;
207
+ p.value = t;
168
208
  }
169
209
  }
170
- function ie(e) {
171
- var l;
172
- const t = (l = i.options) == null ? void 0 : l.find((a) => a.value === e);
173
- if (!(!t || t.disabled))
174
- if (t.onClick)
175
- t.onClick();
210
+ function ae(e) {
211
+ const s = f(e);
212
+ if (!(!s || s.disabled))
213
+ if (s.onClick)
214
+ s.onClick();
176
215
  else {
177
- if (p.value) {
178
- if (Array.isArray(o.value)) {
179
- const a = o.value.indexOf(e);
180
- a !== -1 ? o.value.splice(a, 1) : o.value.push(e);
216
+ if (m.value) {
217
+ if (Array.isArray(i.value)) {
218
+ const l = i.value.indexOf(e);
219
+ l !== -1 ? i.value.splice(l, 1) : i.value.push(e);
181
220
  } else
182
- o.value = [e];
183
- z("update:modelValue", o.value), i.filterable && setTimeout(() => {
184
- var a;
185
- (a = E.value) == null || a.focus();
221
+ i.value = [e];
222
+ T("update:modelValue", i.value), a.filterable && setTimeout(() => {
223
+ var l;
224
+ (l = H.value) == null || l.focus();
186
225
  });
187
226
  } else
188
- o.value = e;
189
- i.native || Z(() => {
190
- var a;
191
- ue(), (a = K.value) == null || a.$el.focus();
227
+ i.value = e;
228
+ a.native || Z(() => {
229
+ var l;
230
+ fe(), (l = G.value) == null || l.$el.focus();
192
231
  });
193
232
  }
194
233
  }
195
- function J(e) {
234
+ function Q(e) {
196
235
  return !!(typeof e > "u" || e === null || e === "" || Array.isArray(e) && e.length === 0 || !Array.isArray(e) && typeof e == "object" && Object.keys(e).length === 0);
197
236
  }
198
- function oe(e, t) {
199
- if (e.stopPropagation(), A.value || !Array.isArray(o.value))
237
+ function oe(e, s) {
238
+ if (e.stopPropagation(), R.value || !Array.isArray(i.value))
200
239
  return;
201
- const l = o.value.indexOf(t);
202
- l !== -1 && (o.value.splice(l, 1), z("update:modelValue", o.value));
240
+ const l = i.value.indexOf(s);
241
+ l !== -1 && (i.value.splice(l, 1), T("update:modelValue", i.value));
242
+ }
243
+ function f(e) {
244
+ if (!Array.isArray(e))
245
+ return Oe.value.get(e);
203
246
  }
204
- function T(e) {
205
- var l;
206
- const t = (l = i.options) == null ? void 0 : l.find((a) => a.value === e);
207
- return t ? t.label : "";
247
+ function L(e) {
248
+ const s = f(e);
249
+ return s ? s.label : "";
208
250
  }
209
- const { focus: se, blur: xe } = ke(X), {
210
- errorInternal: re,
211
- hideFooterInternal: Ie,
212
- inputListeners: ne,
213
- reset: Q,
214
- validate: ue,
215
- setError: Ve,
216
- isFocused: Te,
217
- isInsideForm: Se
218
- } = _(i, { focus: se, emit: z, withListeners: !0 }), Be = w(() => {
219
- const { focus: e, blur: t } = n(ne);
251
+ const { focus: re, blur: Be } = xe(K), {
252
+ errorInternal: ne,
253
+ hideFooterInternal: Te,
254
+ inputListeners: ue,
255
+ reset: Y,
256
+ validate: fe,
257
+ setError: _e,
258
+ isFocused: ze,
259
+ isInsideForm: Me
260
+ } = ee(a, { focus: re, emit: T, withListeners: !0 }), Ne = O(() => {
261
+ const { focus: e, blur: s } = u(ue);
220
262
  return {
221
263
  focus: e,
222
- blur: t
264
+ blur: s
223
265
  };
224
266
  });
225
- let R = null;
226
- D([Te, V], ([e, t]) => {
227
- e || t ? R || (R = Xe(document, "keydown", ze)) : R && (R(), R = null);
267
+ let V = null;
268
+ D([ze, z], ([e, s]) => {
269
+ e || s ? V || (V = Je(document, "keydown", Pe)) : V && (V(), V = null);
228
270
  }, {
229
271
  immediate: !0
230
- }), Ee(() => {
231
- R && R();
272
+ }), qe(() => {
273
+ V && V();
232
274
  });
233
- function ze(e) {
234
- var t, l, a, r, u;
235
- if (h.value.length !== 0)
275
+ function Pe(e) {
276
+ var s, l, r, t, c;
277
+ if (w.value.length !== 0)
236
278
  if (e.code === "ArrowDown") {
237
- if (e.preventDefault(), !V.value) {
238
- (t = C.value) == null || t.show();
279
+ if (e.preventDefault(), !z.value) {
280
+ (s = A.value) == null || s.show();
239
281
  return;
240
282
  }
241
- H(c.value, "down");
283
+ W(p.value, "down");
242
284
  } else if (e.code === "ArrowUp") {
243
- if (e.preventDefault(), !V.value) {
244
- (l = C.value) == null || l.show();
285
+ if (e.preventDefault(), !z.value) {
286
+ (l = A.value) == null || l.show();
245
287
  return;
246
288
  }
247
- H(c.value, "up");
289
+ W(p.value, "up");
248
290
  } else if (e.code === "Enter" || e.code === "Space") {
249
- if (e.code === "Space" && i.filterable)
291
+ if (e.code === "Space" && a.filterable)
250
292
  return;
251
- if (e.preventDefault(), e.stopPropagation(), !V.value) {
252
- (a = C.value) == null || a.show();
293
+ if (e.preventDefault(), e.stopPropagation(), !z.value) {
294
+ (r = A.value) == null || r.show();
253
295
  return;
254
296
  }
255
- if (typeof c.value < "u" && h.value[c.value]) {
256
- const d = h.value[c.value];
257
- ie(d.value), !d.keepOpenOnClick && (!p.value || i.multipleCheckbox) && ((r = C.value) == null || r.hide());
297
+ if (typeof p.value < "u" && w.value[p.value]) {
298
+ const v = w.value[p.value];
299
+ ae(v.value), !v.keepOpenOnClick && (!m.value || a.multipleCheckbox) && ((t = A.value) == null || t.hide());
258
300
  }
259
301
  } else
260
- e.code === "Tab" && V.value && (e.preventDefault(), (u = C.value) == null || u.hide(), i.native || Z(() => {
261
- var d;
262
- (d = K.value) == null || d.$el.focus();
302
+ e.code === "Tab" && z.value && (e.preventDefault(), (c = A.value) == null || c.hide(), a.native || Z(() => {
303
+ var v;
304
+ (v = G.value) == null || v.$el.focus();
263
305
  }));
264
306
  }
265
- const N = b(null), de = b(null), W = b(!1), q = b(0), fe = ol(() => {
266
- p.value && i.truncate && Z(() => {
267
- const e = Ne();
268
- e < o.value.length ? (W.value = !0, q.value = o.value.length - e) : (W.value = !1, q.value = 0);
307
+ const N = x(null), de = x(null), q = x(!1), U = x(0), ce = ul(() => {
308
+ m.value && a.truncate && Z(() => {
309
+ const e = Fe();
310
+ e < i.value.length ? (q.value = !0, U.value = i.value.length - e) : (q.value = !1, U.value = 0);
269
311
  });
270
312
  }, 100, !0);
271
- Ke(N, () => {
272
- fe();
313
+ Qe(N, () => {
314
+ ce();
273
315
  });
274
- function Ne() {
316
+ function Fe() {
275
317
  if (!N.value)
276
318
  return 0;
277
- const e = N.value.querySelectorAll(".x-tag"), t = Array.from(e);
278
- let l = 0, a = 1;
279
- const r = N.value.offsetWidth - 30;
280
- for (let u = 0; u < t.length; u++) {
281
- const d = t[u];
282
- d.style.display = "flex", l += d.offsetWidth, u > 0 && (l < r ? a++ : d.style.display = "none");
319
+ const e = N.value.querySelectorAll(".x-tag"), s = Array.from(e);
320
+ let l = 0, r = 1;
321
+ const t = N.value.offsetWidth - 30;
322
+ for (let c = 0; c < s.length; c++) {
323
+ const v = s[c];
324
+ v.style.display = "flex", l += v.offsetWidth, c > 0 && (l < t ? r++ : v.style.display = "none");
283
325
  }
284
- return a;
326
+ return r;
285
327
  }
286
- D(o, (e) => {
287
- fe();
328
+ D(i, (e) => {
329
+ ce();
288
330
  }, { immediate: !0, deep: !0 });
289
- const { styles: Me, classes: y, className: De } = Je("Select", {}, i, { errorInternal: re });
290
- return ge({ focus: se, blur: xe, reset: Q, validate: ue, setError: Ve, filterRef: E }), (e, t) => (s(), x(el, U({
331
+ const { styles: De, classes: g, className: Ee } = Ze("Select", {}, a, { errorInternal: ne });
332
+ return Ce({ focus: re, blur: Be, reset: Y, validate: fe, setError: _e, filterRef: H }), (e, s) => (o(), B(il, j({
291
333
  ref_key: "labelRef",
292
- ref: K,
334
+ ref: G,
293
335
  tabindex: "0",
294
336
  class: ["group", [
295
- n(De),
296
- n(y).wrapper
337
+ u(Ee),
338
+ u(g).wrapper
297
339
  ]],
298
- style: n(Me),
299
- disabled: A.value,
340
+ style: u(De),
341
+ disabled: R.value,
300
342
  required: e.required,
301
- "is-inside-form": n(Se),
343
+ "is-inside-form": u(Me),
302
344
  label: e.label,
303
345
  tooltip: e.tooltip
304
- }, ve(Be.value)), {
305
- default: m(() => [
306
- F("div", sl, [
307
- e.native && !p.value ? (s(), f("div", {
346
+ }, me(Ne.value)), {
347
+ default: C(() => [
348
+ I("div", fl, [
349
+ e.native && !m.value ? (o(), n("div", {
308
350
  key: 0,
309
- class: k(n(y).box),
310
- onClick: t[0] || (t[0] = (l) => {
311
- var a;
312
- return (a = X.value) == null ? void 0 : a.click();
351
+ class: S(u(g).box),
352
+ onClick: s[0] || (s[0] = (l) => {
353
+ var r;
354
+ return (r = K.value) == null ? void 0 : r.click();
313
355
  })
314
356
  }, [
315
- J(o.value) ? (s(), f(O, { key: 1 }, [
316
- e.placeholder ? (s(), f("div", rl, g(e.placeholder), 1)) : (s(), f("div", nl, " "))
317
- ], 64)) : (s(), f(O, { key: 0 }, [
318
- S(g(T(o.value)), 1)
357
+ Q(i.value) ? (o(), n(b, { key: 1 }, [
358
+ e.placeholder ? (o(), n("div", dl, d(e.placeholder), 1)) : (o(), n("div", cl, " "))
359
+ ], 64)) : (o(), n(b, { key: 0 }, [
360
+ k(d(L(i.value)), 1)
319
361
  ], 64))
320
- ], 2)) : (s(), f(O, { key: 1 }, [
321
- B(ye, {
362
+ ], 2)) : (o(), n(b, { key: 1 }, [
363
+ M(be, {
322
364
  ref_key: "popoverRef",
323
- ref: C,
324
- disabled: A.value,
365
+ ref: A,
366
+ disabled: R.value,
325
367
  placement: e.placement
326
368
  }, {
327
- content: m(() => [
328
- B(be, {
329
- class: k(n(y).content)
369
+ content: C(() => [
370
+ M(ke, {
371
+ class: S(u(g).content)
330
372
  }, {
331
- default: m(() => [
332
- $(e.$slots, "content-header", {}, () => [
333
- e.filterable ? (s(), f("div", {
373
+ default: C(() => [
374
+ h(e.$slots, "content-header", {}, () => [
375
+ e.filterable ? (o(), n("div", {
334
376
  key: 0,
335
- class: k(n(y).search)
377
+ class: S(u(g).search)
336
378
  }, [
337
- B(il, {
379
+ M(nl, {
338
380
  ref_key: "filterRef",
339
- ref: E,
340
- modelValue: I.value,
341
- "onUpdate:modelValue": t[2] || (t[2] = (l) => I.value = l),
381
+ ref: H,
382
+ modelValue: _.value,
383
+ "onUpdate:modelValue": s[2] || (s[2] = (l) => _.value = l),
342
384
  placeholder: e.filterPlaceholder,
343
385
  "skip-form-registry": "",
344
386
  "data-1p-ignore": "",
345
387
  size: "sm"
346
388
  }, null, 8, ["modelValue", "placeholder"])
347
- ], 2)) : L("", !0)
389
+ ], 2)) : y("", !0)
348
390
  ]),
349
- F("div", U(n(Ae), {
350
- class: n(y).contentBody
391
+ I("div", j(u(Re), {
392
+ class: u(g).contentBody
351
393
  }), [
352
- F("div", U(n(Le), { class: "space-y-0.5" }), [
353
- (s(!0), f(O, null, j(n(te), (l) => (s(), x(ll, {
394
+ I("div", j(u(Ie), { class: "space-y-0.5" }), [
395
+ (o(!0), n(b, null, X(u(se), (l) => (o(), B(al, {
354
396
  key: l.index,
355
397
  ref_for: !0,
356
398
  ref_key: "itemsRef",
357
- ref: P,
399
+ ref: E,
358
400
  item: l.data,
359
401
  size: e.size,
360
402
  disabled: l.data.disabled,
361
- selected: l.index === c.value,
403
+ selected: l.index === p.value,
362
404
  checkbox: e.multipleCheckbox && !l.data.keepOpenOnClick,
363
405
  color: e.color,
364
406
  filled: "",
365
407
  onClick: () => {
366
- var a;
367
- return !l.data.keepOpenOnClick && (!p.value || e.multipleCheckbox) && ((a = C.value) == null ? void 0 : a.hide());
408
+ var r;
409
+ return !l.data.keepOpenOnClick && (!m.value || e.multipleCheckbox) && ((r = A.value) == null ? void 0 : r.hide());
368
410
  }
369
- }, He({
370
- default: m(() => [
371
- $(e.$slots, "label", {
411
+ }, Ue({
412
+ default: C(() => [
413
+ h(e.$slots, "label", {
372
414
  item: l.data
373
415
  })
374
416
  ]),
@@ -376,102 +418,148 @@ const sl = { class: "relative" }, rl = {
376
418
  }, [
377
419
  e.$slots.prefix || l.data.prefix ? {
378
420
  name: "prefix",
379
- fn: m(() => [
380
- $(e.$slots, "prefix", {
421
+ fn: C(() => [
422
+ h(e.$slots, "prefix", {
381
423
  item: l.data
382
424
  }, () => [
383
- S(g(l.data.prefix), 1)
425
+ k(d(l.data.prefix), 1)
384
426
  ])
385
427
  ]),
386
428
  key: "0"
387
429
  } : void 0,
388
430
  e.$slots.suffix || l.data.suffix ? {
389
431
  name: "suffix",
390
- fn: m(() => [
391
- $(e.$slots, "suffix", {
432
+ fn: C(() => [
433
+ h(e.$slots, "suffix", {
392
434
  item: l.data
393
435
  }, () => [
394
- S(g(l.data.suffix), 1)
436
+ k(d(l.data.suffix), 1)
395
437
  ])
396
438
  ]),
397
439
  key: "1"
398
440
  } : void 0
399
441
  ]), 1032, ["item", "size", "disabled", "selected", "checkbox", "color", "onClick"]))), 128))
400
442
  ], 16),
401
- n(te).length === 0 ? (s(), f("div", fl, " No options ")) : L("", !0)
443
+ u(se).length === 0 ? (o(), n("div", wl, " No options ")) : y("", !0)
402
444
  ], 16),
403
- $(e.$slots, "content-footer")
445
+ h(e.$slots, "content-footer")
404
446
  ]),
405
447
  _: 3
406
448
  }, 8, ["class"])
407
449
  ]),
408
- default: m(() => [
409
- $(e.$slots, "input", {
410
- popover: C.value,
411
- selected: o.value,
412
- disabled: A.value,
413
- label: T(o.value)
414
- }, () => [
415
- F("div", {
416
- class: k([n(y).box])
417
- }, [
418
- p.value && Array.isArray(o.value) && o.value.length > 0 ? (s(), f("div", {
419
- key: 0,
420
- ref_key: "tagsRef",
421
- ref: N,
422
- class: k(["flex gap-1 relative", {
423
- "flex-wrap": !e.truncate,
424
- "overflow-hidden": e.truncate
425
- }])
450
+ default: C(() => [
451
+ h(e.$slots, "input", {
452
+ popover: A.value,
453
+ selected: i.value,
454
+ disabled: R.value,
455
+ label: L(i.value)
456
+ }, () => {
457
+ var l, r;
458
+ return [
459
+ I("div", {
460
+ class: S([u(g).box])
426
461
  }, [
427
- (s(!0), f(O, null, j(o.value, (l, a) => {
428
- var r, u, d, M;
429
- return s(), x(pe, {
430
- key: l,
431
- size: "xs",
432
- removable: "",
433
- outlined: !(A.value || (u = (r = e.options) == null ? void 0 : r.find((v) => v.value === l)) != null && u.disabled),
434
- disabled: A.value || ((M = (d = e.options) == null ? void 0 : d.find((v) => v.value === l)) == null ? void 0 : M.disabled),
435
- style: We({ "max-width": a === 0 && G.value ? `calc(100% - ${G.value.offsetWidth + 6 + "px"})` : void 0 }),
436
- onRemove: (v) => {
437
- oe(v, l);
438
- }
439
- }, {
440
- prefix: m(() => {
441
- var v;
442
- return [
443
- $(e.$slots, "tag-prefix", {
444
- item: (v = e.options) == null ? void 0 : v.find((Y) => Y.value === l)
445
- })
446
- ];
447
- }),
448
- default: m(() => [
449
- S(" " + g(T(l)), 1)
450
- ]),
451
- _: 2
452
- }, 1032, ["outlined", "disabled", "style", "onRemove"]);
453
- }), 128)),
454
- W.value ? (s(), f("div", {
462
+ m.value && Array.isArray(i.value) && i.value.length > 0 ? (o(), n("div", {
455
463
  key: 0,
456
- ref_key: "hiddenTagsCounterRef",
457
- ref: G,
458
- class: k(n(y).truncateCounter),
459
- onClick: t[1] || (t[1] = qe((l) => {
460
- var a;
461
- return (a = de.value) == null ? void 0 : a.toggle();
462
- }, ["stop"]))
463
- }, "+" + g(q.value), 3)) : L("", !0)
464
- ], 2)) : !p.value && !J(o.value) && T(o.value) !== "" ? (s(), f(O, { key: 1 }, [
465
- S(g(T(o.value)), 1)
466
- ], 64)) : (s(), f(O, { key: 2 }, [
467
- e.placeholder ? (s(), f("div", ul, g(e.placeholder), 1)) : (s(), f("div", dl, " "))
468
- ], 64))
469
- ], 2)
470
- ])
464
+ ref_key: "tagsRef",
465
+ ref: N,
466
+ class: S(["flex gap-1 relative", {
467
+ "flex-wrap": !e.truncate,
468
+ "overflow-hidden": e.truncate
469
+ }])
470
+ }, [
471
+ (o(!0), n(b, null, X(i.value, (t, c) => {
472
+ var v, P;
473
+ return o(), B(ye, {
474
+ key: t,
475
+ size: "xs",
476
+ removable: "",
477
+ outlined: !(R.value || (v = f(t)) != null && v.disabled),
478
+ disabled: R.value || ((P = f(t)) == null ? void 0 : P.disabled),
479
+ style: je({ "max-width": c === 0 && J.value ? `calc(100% - ${J.value.offsetWidth + 6 + "px"})` : void 0 }),
480
+ onRemove: ($) => {
481
+ oe($, t);
482
+ }
483
+ }, {
484
+ default: C(() => {
485
+ var $, pe;
486
+ return [
487
+ e.hideSelectedOptionSlots ? (o(), n(b, { key: 1 }, [
488
+ k(d(L(t)), 1)
489
+ ], 64)) : (o(), n("div", pl, [
490
+ e.$slots.prefix || ($ = f(t)) != null && $.prefix ? (o(), n("span", vl, [
491
+ h(e.$slots, "prefix", {
492
+ item: f(t)
493
+ }, () => {
494
+ var F;
495
+ return [
496
+ k(d((F = f(t)) == null ? void 0 : F.prefix), 1)
497
+ ];
498
+ })
499
+ ])) : y("", !0),
500
+ I("span", ml, d(L(t)), 1),
501
+ e.$slots.suffix || (pe = f(t)) != null && pe.suffix ? (o(), n("span", yl, [
502
+ h(e.$slots, "suffix", {
503
+ item: f(t)
504
+ }, () => {
505
+ var F;
506
+ return [
507
+ k(d((F = f(t)) == null ? void 0 : F.suffix), 1)
508
+ ];
509
+ })
510
+ ])) : y("", !0)
511
+ ]))
512
+ ];
513
+ }),
514
+ _: 2
515
+ }, 1032, ["outlined", "disabled", "style", "onRemove"]);
516
+ }), 128)),
517
+ q.value ? (o(), n("div", {
518
+ key: 0,
519
+ ref_key: "hiddenTagsCounterRef",
520
+ ref: J,
521
+ class: S(u(g).truncateCounter),
522
+ onClick: s[1] || (s[1] = Xe((t) => {
523
+ var c;
524
+ return (c = de.value) == null ? void 0 : c.toggle();
525
+ }, ["stop"]))
526
+ }, "+" + d(U.value), 3)) : y("", !0)
527
+ ], 2)) : !m.value && !Q(i.value) && L(i.value) !== "" ? (o(), n(b, { key: 1 }, [
528
+ e.hideSelectedOptionSlots ? (o(), n(b, { key: 1 }, [
529
+ k(d(L(i.value)), 1)
530
+ ], 64)) : (o(), n("div", hl, [
531
+ e.$slots.prefix || (l = f(i.value)) != null && l.prefix ? (o(), n("span", bl, [
532
+ h(e.$slots, "prefix", {
533
+ item: f(i.value)
534
+ }, () => {
535
+ var t;
536
+ return [
537
+ k(d((t = f(i.value)) == null ? void 0 : t.prefix), 1)
538
+ ];
539
+ })
540
+ ])) : y("", !0),
541
+ I("span", kl, d(L(i.value)), 1),
542
+ e.$slots.suffix || (r = f(i.value)) != null && r.suffix ? (o(), n("span", gl, [
543
+ h(e.$slots, "suffix", {
544
+ item: f(i.value)
545
+ }, () => {
546
+ var t;
547
+ return [
548
+ k(d((t = f(i.value)) == null ? void 0 : t.suffix), 1)
549
+ ];
550
+ })
551
+ ])) : y("", !0)
552
+ ]))
553
+ ], 64)) : (o(), n(b, { key: 2 }, [
554
+ e.placeholder ? (o(), n("div", xl, d(e.placeholder), 1)) : (o(), n("div", Cl, " "))
555
+ ], 64))
556
+ ], 2)
557
+ ];
558
+ })
471
559
  ]),
472
560
  _: 3
473
561
  }, 8, ["disabled", "placement"]),
474
- p.value && e.truncate && W.value ? (s(), x(ye, {
562
+ m.value && e.truncate && q.value ? (o(), B(be, {
475
563
  key: 0,
476
564
  ref_key: "multipleHiddenRef",
477
565
  ref: de,
@@ -480,34 +568,53 @@ const sl = { class: "relative" }, rl = {
480
568
  class: "inline-block !absolute right-0",
481
569
  placement: "auto-start"
482
570
  }, {
483
- content: m(() => [
484
- B(be, { class: "p-2 flex gap-2 flex-wrap" }, {
485
- default: m(() => {
571
+ content: C(() => [
572
+ M(ke, { class: "p-2 flex gap-2 flex-wrap" }, {
573
+ default: C(() => {
486
574
  var l;
487
575
  return [
488
- (s(!0), f(O, null, j((l = o.value) == null ? void 0 : l.slice(o.value.length - q.value), (a) => {
489
- var r, u, d, M;
490
- return s(), x(pe, {
491
- key: a,
576
+ (o(!0), n(b, null, X((l = i.value) == null ? void 0 : l.slice(i.value.length - U.value), (r) => {
577
+ var t, c;
578
+ return o(), B(ye, {
579
+ key: r,
492
580
  size: "xs",
493
581
  removable: "",
494
- outlined: !(A.value || (u = (r = e.options) == null ? void 0 : r.find((v) => v.value === a)) != null && u.disabled),
495
- disabled: A.value || ((M = (d = e.options) == null ? void 0 : d.find((v) => v.value === a)) == null ? void 0 : M.disabled),
582
+ outlined: !(R.value || (t = f(r)) != null && t.disabled),
583
+ disabled: R.value || ((c = f(r)) == null ? void 0 : c.disabled),
496
584
  onRemove: (v) => {
497
- oe(v, a);
585
+ oe(v, r);
498
586
  }
499
587
  }, {
500
- prefix: m(() => {
501
- var v;
588
+ default: C(() => {
589
+ var v, P;
502
590
  return [
503
- $(e.$slots, "tag-prefix", {
504
- item: (v = e.options) == null ? void 0 : v.find((Y) => Y.value === a)
505
- })
591
+ e.hideSelectedOptionSlots ? (o(), n(b, { key: 1 }, [
592
+ k(d(L(r)), 1)
593
+ ], 64)) : (o(), n("div", $l, [
594
+ e.$slots.prefix || (v = f(r)) != null && v.prefix ? (o(), n("span", Ol, [
595
+ h(e.$slots, "prefix", {
596
+ item: f(r)
597
+ }, () => {
598
+ var $;
599
+ return [
600
+ k(d(($ = f(r)) == null ? void 0 : $.prefix), 1)
601
+ ];
602
+ })
603
+ ])) : y("", !0),
604
+ I("span", Sl, d(L(r)), 1),
605
+ e.$slots.suffix || (P = f(r)) != null && P.suffix ? (o(), n("span", Al, [
606
+ h(e.$slots, "suffix", {
607
+ item: f(r)
608
+ }, () => {
609
+ var $;
610
+ return [
611
+ k(d(($ = f(r)) == null ? void 0 : $.suffix), 1)
612
+ ];
613
+ })
614
+ ])) : y("", !0)
615
+ ]))
506
616
  ];
507
617
  }),
508
- default: m(() => [
509
- S(" " + g(T(a)), 1)
510
- ]),
511
618
  _: 2
512
619
  }, 1032, ["outlined", "disabled", "onRemove"]);
513
620
  }), 128))
@@ -517,59 +624,59 @@ const sl = { class: "relative" }, rl = {
517
624
  })
518
625
  ]),
519
626
  _: 3
520
- }, 512)) : L("", !0)
627
+ }, 512)) : y("", !0)
521
628
  ], 64)),
522
- Ue(F("select", U({
629
+ Ke(I("select", j({
523
630
  id: e.id,
524
631
  ref_key: "elRef",
525
- ref: X,
526
- "onUpdate:modelValue": t[3] || (t[3] = (l) => o.value = l),
632
+ ref: K,
633
+ "onUpdate:modelValue": s[3] || (s[3] = (l) => i.value = l),
527
634
  tabindex: "-1",
528
- class: e.native && !p.value ? "absolute inset-0 w-full h-full cursor-pointer opacity-0" : "hidden",
635
+ class: e.native && !m.value ? "absolute inset-0 w-full h-full cursor-pointer opacity-0" : "hidden",
529
636
  name: e.name,
530
637
  disabled: e.disabled || e.loading,
531
- multiple: p.value,
638
+ multiple: m.value,
532
639
  readonly: e.readonly
533
- }, ve(n(ne), !0)), [
534
- e.native ? (s(!0), f(O, { key: 0 }, j(e.options, (l, a) => (s(), f("option", {
535
- key: a,
640
+ }, me(u(ue), !0)), [
641
+ e.native ? (o(!0), n(b, { key: 0 }, X(e.options, (l, r) => (o(), n("option", {
642
+ key: r,
536
643
  value: l.value,
537
644
  disabled: l.disabled
538
- }, g(l.label), 9, vl))), 128)) : L("", !0)
539
- ], 16, cl), [
540
- [je, o.value]
645
+ }, d(l.label), 9, Rl))), 128)) : y("", !0)
646
+ ], 16, Ll), [
647
+ [Ge, i.value]
541
648
  ]),
542
- we.value ? (s(), f("button", {
649
+ $e.value ? (o(), n("button", {
543
650
  key: 2,
544
651
  type: "button",
545
652
  "aria-label": "Clean value",
546
- class: k(n(y).clearButton),
547
- onClick: t[4] || (t[4] = //@ts-ignore
548
- (...l) => n(Q) && n(Q)(...l))
653
+ class: S(u(g).clearButton),
654
+ onClick: s[4] || (s[4] = //@ts-ignore
655
+ (...l) => u(Y) && u(Y)(...l))
549
656
  }, [
550
- B(me, {
551
- icon: n(Ze),
552
- class: k([n(y).icon, "cursor-pointer"])
657
+ M(he, {
658
+ icon: u(tl),
659
+ class: S([u(g).icon, "cursor-pointer"])
553
660
  }, null, 8, ["icon", "class"])
554
- ], 2)) : L("", !0),
555
- e.$slots.input ? L("", !0) : (s(), f("div", {
661
+ ], 2)) : y("", !0),
662
+ e.$slots.input ? y("", !0) : (o(), n("div", {
556
663
  key: 3,
557
- class: k(n(y).iconWrapper)
664
+ class: S(u(g).iconWrapper)
558
665
  }, [
559
- e.loading ? (s(), x(tl, {
666
+ e.loading ? (o(), B(ol, {
560
667
  key: 0,
561
668
  size: e.size
562
- }, null, 8, ["size"])) : $(e.$slots, "icon", { key: 1 }, () => [
563
- B(me, {
564
- icon: n(_e),
565
- class: k(n(y).icon)
669
+ }, null, 8, ["size"])) : h(e.$slots, "icon", { key: 1 }, () => [
670
+ M(he, {
671
+ icon: u(sl),
672
+ class: S(u(g).icon)
566
673
  }, null, 8, ["icon", "class"])
567
674
  ])
568
675
  ], 2))
569
676
  ]),
570
- n(Ie) ? L("", !0) : (s(), x(al, {
677
+ u(Te) ? y("", !0) : (o(), B(rl, {
571
678
  key: 0,
572
- error: n(re),
679
+ error: u(ne),
573
680
  helper: e.helper
574
681
  }, null, 8, ["error", "helper"]))
575
682
  ]),
@@ -578,5 +685,5 @@ const sl = { class: "relative" }, rl = {
578
685
  }
579
686
  });
580
687
  export {
581
- Ml as default
688
+ Yl as default
582
689
  };