@leaflink/stash 52.0.3 → 53.1.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 (273) hide show
  1. package/README.md +51 -52
  2. package/dist/Accordion.js +16 -16
  3. package/dist/Accordion.js.map +1 -1
  4. package/dist/AccordionGroup.js +7 -7
  5. package/dist/AccordionGroup.js.map +1 -1
  6. package/dist/ActionsDropdown.js +16 -16
  7. package/dist/ActionsDropdown.js.map +1 -1
  8. package/dist/AddressSelect.js.map +1 -1
  9. package/dist/AddressSelect.vue.d.ts +1 -1
  10. package/dist/Alert.js +34 -34
  11. package/dist/Alert.js.map +1 -1
  12. package/dist/AppNavigationItem.js +31 -31
  13. package/dist/AppNavigationItem.js.map +1 -1
  14. package/dist/AppSidebar.js +19 -19
  15. package/dist/AppSidebar.js.map +1 -1
  16. package/dist/AppTopbar.js +32 -32
  17. package/dist/AppTopbar.js.map +1 -1
  18. package/dist/Avatar.js +18 -18
  19. package/dist/Avatar.js.map +1 -1
  20. package/dist/Backdrop.js +5 -5
  21. package/dist/Backdrop.js.map +1 -1
  22. package/dist/Badge.js +38 -38
  23. package/dist/Badge.js.map +1 -1
  24. package/dist/Box.js +1 -1
  25. package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js} +6 -6
  26. package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js.map → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js.map} +1 -1
  27. package/dist/Button.js +21 -21
  28. package/dist/Button.js.map +1 -1
  29. package/dist/ButtonGroup.js +26 -26
  30. package/dist/ButtonGroup.js.map +1 -1
  31. package/dist/Card.js +14 -14
  32. package/dist/Card.js.map +1 -1
  33. package/dist/CardContent.js +1 -1
  34. package/dist/CardContent.js.map +1 -1
  35. package/dist/CardFooter.js +1 -1
  36. package/dist/CardFooter.js.map +1 -1
  37. package/dist/CardHeader.js +4 -4
  38. package/dist/CardHeader.js.map +1 -1
  39. package/dist/CardMedia.js +20 -20
  40. package/dist/CardMedia.js.map +1 -1
  41. package/dist/Carousel.js +60 -60
  42. package/dist/Carousel.js.map +1 -1
  43. package/dist/Checkbox.js +30 -30
  44. package/dist/Checkbox.js.map +1 -1
  45. package/dist/Checkbox.vue.d.ts +0 -3
  46. package/dist/Chip.js +33 -33
  47. package/dist/Chip.js.map +1 -1
  48. package/dist/ConfirmationCodeInput.js +72 -72
  49. package/dist/ConfirmationCodeInput.js.map +1 -1
  50. package/dist/ContextSwitcher.js +27 -27
  51. package/dist/ContextSwitcher.js.map +1 -1
  52. package/dist/Copy.js +47 -48
  53. package/dist/Copy.js.map +1 -1
  54. package/dist/CurrencyInput.js +1 -1
  55. package/dist/CurrencyInput.js.map +1 -1
  56. package/dist/CurrencyInput.vue.d.ts +5 -5
  57. package/dist/DataView.js +23 -23
  58. package/dist/DataView.js.map +1 -1
  59. package/dist/DataViewFilters.js +26 -26
  60. package/dist/DataViewFilters.js.map +1 -1
  61. package/dist/DataViewSortButton.js +22 -22
  62. package/dist/DataViewSortButton.js.map +1 -1
  63. package/dist/DataViewToolbar.js +52 -52
  64. package/dist/DataViewToolbar.js.map +1 -1
  65. package/dist/DatePicker.js +10 -10
  66. package/dist/DatePicker.js.map +1 -1
  67. package/dist/DescriptionList.js +2 -2
  68. package/dist/DescriptionList.js.map +1 -1
  69. package/dist/DescriptionListDetail.js +2 -2
  70. package/dist/DescriptionListDetail.js.map +1 -1
  71. package/dist/DescriptionListGroup.js +9 -9
  72. package/dist/DescriptionListGroup.js.map +1 -1
  73. package/dist/DescriptionListTerm.js +8 -8
  74. package/dist/DescriptionListTerm.js.map +1 -1
  75. package/dist/Dialog.js +47 -47
  76. package/dist/Dialog.js.map +1 -1
  77. package/dist/Divider.js +6 -6
  78. package/dist/Divider.js.map +1 -1
  79. package/dist/Dropdown.js +20 -20
  80. package/dist/Dropdown.js.map +1 -1
  81. package/dist/EmptyState.js +26 -26
  82. package/dist/EmptyState.js.map +1 -1
  83. package/dist/Field.js +1 -1
  84. package/dist/{Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js → Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js} +17 -17
  85. package/dist/Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js.map +1 -0
  86. package/dist/FileUpload.js +47 -49
  87. package/dist/FileUpload.js.map +1 -1
  88. package/dist/FilterChip.js +20 -20
  89. package/dist/FilterChip.js.map +1 -1
  90. package/dist/FilterDrawerItem.js +13 -13
  91. package/dist/FilterDrawerItem.js.map +1 -1
  92. package/dist/FilterDropdown.js +27 -27
  93. package/dist/FilterDropdown.js.map +1 -1
  94. package/dist/FilterSelect.js +33 -33
  95. package/dist/FilterSelect.js.map +1 -1
  96. package/dist/Filters.js +29 -29
  97. package/dist/Filters.js.map +1 -1
  98. package/dist/Filters.vue.d.ts +2 -8
  99. package/dist/HttpError.js +29 -29
  100. package/dist/HttpError.js.map +1 -1
  101. package/dist/HttpError.vue.d.ts +0 -3
  102. package/dist/Icon.js +12 -12
  103. package/dist/Icon.js.map +1 -1
  104. package/dist/IconLabel.js +19 -19
  105. package/dist/IconLabel.js.map +1 -1
  106. package/dist/IconLabel.vue.d.ts +1 -1
  107. package/dist/Illustration.js +2 -2
  108. package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js} +4 -4
  109. package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js.map → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js.map} +1 -1
  110. package/dist/Image.js +2 -2
  111. package/dist/Image.vue.d.ts +0 -3
  112. package/dist/{Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js → Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js} +11 -11
  113. package/dist/Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js.map +1 -0
  114. package/dist/InlineEdit.js +8 -8
  115. package/dist/InlineEdit.js.map +1 -1
  116. package/dist/Input.js +29 -29
  117. package/dist/Input.js.map +1 -1
  118. package/dist/InputOptions.js +87 -84
  119. package/dist/InputOptions.js.map +1 -1
  120. package/dist/InputOptions.vue.d.ts +2 -2
  121. package/dist/IntegrationIcon.js +11 -11
  122. package/dist/IntegrationIcon.js.map +1 -1
  123. package/dist/Label.js +1 -1
  124. package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js} +16 -16
  125. package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js.map} +1 -1
  126. package/dist/ListItem.js +14 -14
  127. package/dist/ListItem.js.map +1 -1
  128. package/dist/ListItem.vue.d.ts +0 -6
  129. package/dist/ListItemCell.js +9 -9
  130. package/dist/ListItemCell.js.map +1 -1
  131. package/dist/ListView.js +138 -141
  132. package/dist/ListView.js.map +1 -1
  133. package/dist/ListView.vue.d.ts +6 -40
  134. package/dist/Loading.js +8 -8
  135. package/dist/Loading.js.map +1 -1
  136. package/dist/Logo.js +1 -1
  137. package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js} +3 -3
  138. package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js.map → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js.map} +1 -1
  139. package/dist/Menu.js +5 -5
  140. package/dist/Menu.js.map +1 -1
  141. package/dist/MenuItem.js +12 -12
  142. package/dist/MenuItem.js.map +1 -1
  143. package/dist/Metric.js +24 -24
  144. package/dist/Metric.js.map +1 -1
  145. package/dist/Modal.js +60 -60
  146. package/dist/Modal.js.map +1 -1
  147. package/dist/Modals.js +1 -1
  148. package/dist/Modals.js.map +1 -1
  149. package/dist/Module.js +6 -6
  150. package/dist/Module.js.map +1 -1
  151. package/dist/ModuleContent.js +16 -16
  152. package/dist/ModuleContent.js.map +1 -1
  153. package/dist/ModuleFooter.js +13 -13
  154. package/dist/ModuleFooter.js.map +1 -1
  155. package/dist/ModuleHeader.js +29 -29
  156. package/dist/ModuleHeader.js.map +1 -1
  157. package/dist/MoreActions.js +81 -84
  158. package/dist/MoreActions.js.map +1 -1
  159. package/dist/ObfuscateText.js +4 -4
  160. package/dist/ObfuscateText.js.map +1 -1
  161. package/dist/PageContent.js +13 -13
  162. package/dist/PageContent.js.map +1 -1
  163. package/dist/PageHeader.js +28 -28
  164. package/dist/PageHeader.js.map +1 -1
  165. package/dist/PageNavigation.js +1 -1
  166. package/dist/Paginate.js +45 -45
  167. package/dist/Paginate.js.map +1 -1
  168. package/dist/QuickAction.js +18 -18
  169. package/dist/QuickAction.js.map +1 -1
  170. package/dist/Radio.js +17 -17
  171. package/dist/Radio.js.map +1 -1
  172. package/dist/RadioGroup.js +121 -121
  173. package/dist/RadioGroup.js.map +1 -1
  174. package/dist/RadioNew.js +80 -80
  175. package/dist/RadioNew.js.map +1 -1
  176. package/dist/RadioNew.vue.d.ts +0 -3
  177. package/dist/RangeInput.js +2 -2
  178. package/dist/RangeInput.js.map +1 -1
  179. package/dist/SearchBar.js +9 -9
  180. package/dist/SearchBar.js.map +1 -1
  181. package/dist/SectionHeader.js +14 -14
  182. package/dist/SectionHeader.js.map +1 -1
  183. package/dist/Select.js +369 -366
  184. package/dist/Select.js.map +1 -1
  185. package/dist/SelectStatus.js +26 -26
  186. package/dist/SelectStatus.js.map +1 -1
  187. package/dist/Skeleton.js +20 -20
  188. package/dist/Skeleton.js.map +1 -1
  189. package/dist/Step.js +37 -40
  190. package/dist/Step.js.map +1 -1
  191. package/dist/Stepper.js +17 -17
  192. package/dist/Stepper.js.map +1 -1
  193. package/dist/Switch.js +57 -57
  194. package/dist/Switch.js.map +1 -1
  195. package/dist/Tab.js +17 -19
  196. package/dist/Tab.js.map +1 -1
  197. package/dist/TabPanel.js +1 -1
  198. package/dist/TabPanel.js.map +1 -1
  199. package/dist/Table.js +22 -22
  200. package/dist/Table.js.map +1 -1
  201. package/dist/TableCell.js +32 -32
  202. package/dist/TableCell.js.map +1 -1
  203. package/dist/TableHeaderCell.js +35 -35
  204. package/dist/TableHeaderCell.js.map +1 -1
  205. package/dist/TableHeaderRow.js +10 -10
  206. package/dist/TableHeaderRow.js.map +1 -1
  207. package/dist/TableRow.js +51 -51
  208. package/dist/TableRow.js.map +1 -1
  209. package/dist/Tabs.js +2 -2
  210. package/dist/{Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js → Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js} +33 -33
  211. package/dist/Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js.map +1 -0
  212. package/dist/TextEditor.js +8 -8
  213. package/dist/TextEditor.js.map +1 -1
  214. package/dist/Textarea.js +15 -15
  215. package/dist/Textarea.js.map +1 -1
  216. package/dist/Thumbnail.js +41 -41
  217. package/dist/Thumbnail.js.map +1 -1
  218. package/dist/ThumbnailEmpty.js +3 -3
  219. package/dist/ThumbnailEmpty.js.map +1 -1
  220. package/dist/ThumbnailGroup.js +22 -22
  221. package/dist/ThumbnailGroup.js.map +1 -1
  222. package/dist/Timeline.js +6 -6
  223. package/dist/Timeline.js.map +1 -1
  224. package/dist/Timeline.vue.d.ts +2 -2
  225. package/dist/TimelineItem.js +22 -22
  226. package/dist/TimelineItem.js.map +1 -1
  227. package/dist/Toast.js +29 -29
  228. package/dist/Toast.js.map +1 -1
  229. package/dist/Toast.vue.d.ts +3 -0
  230. package/dist/Toasts.js +11 -11
  231. package/dist/Toasts.js.map +1 -1
  232. package/dist/Tooltip.js +2 -81
  233. package/dist/Tooltip.js.map +1 -1
  234. package/dist/Tooltip.vue.d.ts +1 -1
  235. package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js +84 -0
  236. package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js.map +1 -0
  237. package/dist/components.css +2 -2
  238. package/dist/constants.d.ts +9 -9
  239. package/dist/constants.js +17 -17
  240. package/dist/constants.js.map +1 -1
  241. package/dist/directives/tooltip.js +2 -2
  242. package/dist/directives/tooltip.js.map +1 -1
  243. package/dist/floating-ui.vue-CuGrC-z8.js.map +1 -1
  244. package/dist/formatDateTime-Dz8bXV0R.js.map +1 -1
  245. package/dist/index-D6bxWkZ1.js.map +1 -1
  246. package/dist/{index-C14LhAwV.js → index-DBV9Uz0C.js} +3 -3
  247. package/dist/index-DBV9Uz0C.js.map +1 -0
  248. package/dist/index.js.map +1 -1
  249. package/dist/isValid-DN-HkCoi.js.map +1 -1
  250. package/dist/parseISO-wlfIB_QJ.js.map +1 -1
  251. package/dist/searchFuzzy-B3TsUO-V.js.map +1 -1
  252. package/dist/tailwind-base.js +4 -4
  253. package/dist/tailwind-base.js.d.ts +12 -0
  254. package/dist/tailwind-base.js.map +1 -1
  255. package/dist/toTimeZone-Coq1oPTt.js.map +1 -1
  256. package/dist/useGoogleMaps.js.map +1 -1
  257. package/dist/useSortable.js +1 -1
  258. package/dist/useValidation.js.map +1 -1
  259. package/dist/utils/helpers.js +15 -15
  260. package/dist/utils/helpers.js.map +1 -1
  261. package/package.json +12 -82
  262. package/styles/backwards-compat.css +375 -2854
  263. package/styles/main.css +8 -0
  264. package/styles/sofia-font.css +23 -27
  265. package/styles/theme.css +1033 -0
  266. package/LICENSE +0 -21
  267. package/dist/Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js.map +0 -1
  268. package/dist/Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js.map +0 -1
  269. package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js.map +0 -1
  270. package/dist/index-C14LhAwV.js.map +0 -1
  271. package/dist/tailwind-base.d.ts +0 -333
  272. package/styles/base.css +0 -902
  273. package/tailwind-base.ts +0 -455
package/dist/Select.js CHANGED
@@ -1,32 +1,32 @@
1
- import { defineComponent as $e, useAttrs as ze, useSlots as He, ref as c, computed as h, watch as M, nextTick as Y, onMounted as Pe, onUnmounted as Ne, createBlock as J, openBlock as r, mergeProps as Ae, unref as g, createSlots as De, withCtx as T, createElementVNode as f, toDisplayString as b, withDirectives as $, createElementBlock as d, Fragment as G, renderList as q, withKeys as ue, normalizeClass as z, createCommentVNode as H, renderSlot as P, createTextVNode as N, withModifiers as A, createVNode as B, Teleport as Ue, Transition as Le, normalizeStyle as Ve, vModelText as Ke, vShow as Q } from "vue";
2
- import { u as Ge, a as qe, f as je, o as We, c as Xe } from "./floating-ui.vue-CuGrC-z8.js";
3
- import Ye from "@leaflink/snitch";
4
- import Z from "lodash-es/debounce";
5
- import Je from "lodash-es/isEmpty";
6
- import de from "lodash-es/isEqual";
7
- import Qe from "lodash-es/isPlainObject";
8
- import Ze from "lodash-es/uniqueId";
9
- import et from "./useSearch.js";
10
- import { DEBOUNCE as tt, KEY_CODES as x } from "./constants.js";
11
- import lt from "./directives/clickoutside.js";
12
- import { D as st } from "./MenusPlugin-Bk6UW6o9.js";
13
- import fe from "./Chip.js";
14
- import { _ as at } from "./Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js";
15
- import D from "./Icon.js";
16
- import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- const ot = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, rt = ["id", "aria-labelledby"], it = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], ct = ["selected", "value", "disabled"], ut = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled"], dt = ["id"], ft = ["onKeypress", "onMousedown"], pt = {
1
+ import { defineComponent as ze, useAttrs as He, useSlots as Pe, ref as c, computed as h, watch as $, nextTick as Q, onMounted as Ne, onUnmounted as Ae, createBlock as Z, openBlock as i, mergeProps as De, unref as B, createSlots as Ue, withCtx as x, createElementVNode as f, toDisplayString as k, withDirectives as z, createElementBlock as d, Fragment as q, renderList as j, withKeys as fe, normalizeClass as H, createCommentVNode as P, renderSlot as N, createTextVNode as A, withModifiers as D, createVNode as S, Teleport as Le, Transition as Ve, normalizeStyle as Ke, vModelText as Ge, vShow as ee } from "vue";
2
+ import { u as qe, a as je, f as We, o as Xe, c as Ye } from "./floating-ui.vue-CuGrC-z8.js";
3
+ import Je from "@leaflink/snitch";
4
+ import te from "lodash-es/debounce";
5
+ import Qe from "lodash-es/isEmpty";
6
+ import pe from "lodash-es/isEqual";
7
+ import Ze from "lodash-es/isPlainObject";
8
+ import et from "lodash-es/uniqueId";
9
+ import tt from "./useSearch.js";
10
+ import { DEBOUNCE as lt, KEY_CODES as C } from "./constants.js";
11
+ import st from "./directives/clickoutside.js";
12
+ import { D as at } from "./MenusPlugin-Bk6UW6o9.js";
13
+ import he from "./Chip.js";
14
+ import { _ as nt } from "./Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js";
15
+ import U from "./Icon.js";
16
+ import { _ as ot } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
+ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-labelledby"], ct = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], ut = ["selected", "value", "disabled"], dt = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled"], ft = ["id"], pt = ["onKeypress", "onMousedown"], ht = {
18
18
  key: 0,
19
19
  class: "stash-select__total"
20
- }, ht = {
20
+ }, vt = {
21
21
  key: 0,
22
- class: "tw-flex tw-items-center tw-border-b tw-border-blue-500 tw-pr-1.5"
23
- }, vt = ["data-test", "placeholder"], mt = { class: "stash-select__options options tw-my-1.5 tw-w-full tw-border-white tw-bg-white" }, yt = ["data-test", "onClick", "onMouseenter"], _t = {
22
+ class: "flex items-center border-b border-blue-500 pr-1.5"
23
+ }, mt = ["data-test", "placeholder"], yt = { class: "stash-select__options options my-1.5 w-full border-white bg-white" }, _t = ["data-test", "onClick", "onMouseenter"], gt = {
24
24
  key: 0,
25
- class: "tw-ml-auto tw-pl-1.5"
26
- }, wt = { class: "tw-m-1.5 tw-cursor-default tw-p-1.5" }, gt = {
27
- class: "tw-m-1.5 tw-cursor-default tw-p-1.5",
25
+ class: "ml-auto pl-1.5"
26
+ }, bt = { class: "m-1.5 cursor-default p-1.5" }, Bt = {
27
+ class: "m-1.5 cursor-default p-1.5",
28
28
  "data-test": "stash-select|no-options"
29
- }, bt = /* @__PURE__ */ $e({
29
+ }, kt = /* @__PURE__ */ ze({
30
30
  name: "ll-select",
31
31
  __name: "Select",
32
32
  props: {
@@ -59,7 +59,7 @@ const ot = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, rt = ["id
59
59
  useFuzzySearch: { type: Boolean, default: !1 },
60
60
  menuPlacement: { default: "bottom-start" },
61
61
  enableTeleport: { type: Boolean, default: !1 },
62
- teleportTo: { default: `#${st}` },
62
+ teleportTo: { default: `#${at}` },
63
63
  addBottomSpace: { type: Boolean },
64
64
  errorText: {},
65
65
  hintText: {},
@@ -75,426 +75,429 @@ const ot = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, rt = ["id
75
75
  disabled: { type: Boolean }
76
76
  },
77
77
  emits: ["update:model-value", "clear", "add", "remove", "opened", "closed"],
78
- setup(pe, { emit: he }) {
79
- const t = pe, v = he, U = ze(), ve = He(), ee = c(null), m = c(null), C = c(null), O = c(null), te = c(null), I = c(0), R = c(0), n = c([]), le = c(() => []), y = c(""), p = c(-1), u = c(!1), j = c({}), se = c(!1), { floatingStyles: me, update: ye } = Ge(ee, C, {
80
- whileElementsMounted: qe,
78
+ setup(ve, { emit: me }) {
79
+ const t = ve, v = me, L = He(), W = Pe(), le = c(null), m = c(null), O = c(null), I = c(null), se = c(null), R = c(0), F = c(0), a = c([]), ae = c(() => []), y = c(""), p = c(-1), u = c(!1), X = c({}), ne = c(!1), { floatingStyles: ye, update: _e } = qe(le, O, {
80
+ whileElementsMounted: je,
81
81
  placement: t.menuPlacement,
82
82
  middleware: [
83
- je(),
84
- We(({ rects: e, placement: l }) => l.split("-")[0] === "bottom" && I.value > R.value ? I.value - e.reference.height + 6 : 6),
85
- Xe({
86
- apply({ availableHeight: e, elements: l, rects: a }) {
83
+ We(),
84
+ Xe(({ rects: e, placement: l }) => l.split("-")[0] === "bottom" && R.value > F.value ? R.value - e.reference.height + 6 : 6),
85
+ Ye({
86
+ apply({ availableHeight: e, elements: l, rects: n }) {
87
87
  t.enableTeleport && Object.assign(l.floating.style, {
88
- maxWidth: `${a.reference.width}px`,
88
+ maxWidth: `${n.reference.width}px`,
89
89
  maxHeight: `${Math.min(e, 300)}px`
90
90
  });
91
91
  }
92
92
  })
93
93
  ]
94
- }), ae = new ResizeObserver(() => k()), W = h(() => !t.hideSearch && t.searchable !== "false" && t.searchable !== !1), L = h(() => {
95
- let e = (se.value && t.lazy ? t.lazy() : t.options).filter(Boolean);
96
- return Qe(e[0]) || (e = e.map((l, a) => ({ name: l, id: a }))), e;
97
- }), _e = h(() => n.value.length ? n.value.map((e) => e[t.displayBy] || e).join(", ") : ""), ne = h(() => t.searchLoading || Object.keys(j.value).length > 0), F = h(() => t.disableFiltering || !(y.value || "").trim() ? L.value : le.value(y.value)), we = h(() => I.value <= R.value), ge = h(
98
- () => !u.value && !t.single && !we.value && n.value.length
99
- ), be = h(() => [n.value.length, t.selectItemType, "selected"].filter(Boolean).join(" ")), Be = h(() => t.preventEmpty || t.allowEmpty === "false" || t.allowEmpty === !1);
100
- M(y, (e, l) => l !== e && K(-1)), M(n, () => k(), { deep: !0 }), M(
94
+ }), oe = new ResizeObserver(() => w()), Y = h(() => !t.hideSearch && t.searchable !== "false" && t.searchable !== !1), V = h(() => {
95
+ let e = (ne.value && t.lazy ? t.lazy() : t.options).filter(Boolean);
96
+ return Ze(e[0]) || (e = e.map((l, n) => ({ name: l, id: n }))), e;
97
+ }), ge = h(() => a.value.length ? a.value.map((e) => e[t.displayBy] || e).join(", ") : ""), re = h(() => t.searchLoading || Object.keys(X.value).length > 0), M = h(() => t.disableFiltering || !(y.value || "").trim() ? V.value : ae.value(y.value)), be = h(() => R.value <= F.value), Be = h(
98
+ () => !u.value && !t.single && !be.value && a.value.length
99
+ ), ke = h(() => [a.value.length, t.selectItemType, "selected"].filter(Boolean).join(" ")), Se = h(() => t.preventEmpty || t.allowEmpty === "false" || t.allowEmpty === !1);
100
+ $(y, (e, l) => l !== e && G(-1)), $(a, () => w(), { deep: !0 }), $(
101
101
  () => t.modelValue,
102
102
  (e) => {
103
103
  if (Array.isArray(e)) {
104
104
  const l = e.filter(Boolean);
105
- de(l, n.value) || (n.value = l);
105
+ pe(l, a.value) || (a.value = l);
106
106
  return;
107
107
  }
108
- if (!Je(e)) {
109
- de(e, n.value[0]) || (n.value[0] = e);
108
+ if (!Qe(e)) {
109
+ pe(e, a.value[0]) || (a.value[0] = e);
110
110
  return;
111
111
  }
112
- n.value = [];
112
+ a.value = [];
113
113
  },
114
114
  { immediate: !0 }
115
- ), M(
115
+ ), $(
116
116
  () => t.options,
117
117
  () => {
118
- const { searchFor: e } = et({
119
- items: h(() => L.value),
118
+ const { searchFor: e } = tt({
119
+ items: h(() => V.value),
120
120
  fieldNames: t.searchBy.length ? t.searchBy : [t.displayBy],
121
121
  trackBy: t.trackBy
122
122
  });
123
- le.value = (l) => e(l, { fuzzy: t.useFuzzySearch });
123
+ ae.value = (l) => e(l, { fuzzy: t.useFuzzySearch });
124
124
  },
125
125
  { immediate: !0 }
126
- ), M(I, () => ke());
127
- const ke = Z(() => ye(), 50), k = Z(() => ce(), 50), X = (e) => e && typeof e == "object" && "disabled" in e && (e == null ? void 0 : e.disabled), Se = () => {
128
- n.value = [], v("update:model-value", t.single ? void 0 : n.value), v("clear");
129
- }, V = (e) => {
130
- t.disabled || !e || X(e) || (E(e) ? _(e) : (t.single && (n.value = []), n.value.push(e), v("update:model-value", t.single ? n.value[0] : n.value), v("add", e)), t.single && S());
131
- }, Ee = (e) => {
126
+ ), $(R, () => we());
127
+ const we = te(() => _e(), 50), w = te(() => de(), 50), J = (e) => e && typeof e == "object" && "disabled" in e && (e == null ? void 0 : e.disabled), Ee = () => {
128
+ a.value = [], v("update:model-value", t.single ? void 0 : a.value), v("clear");
129
+ }, K = (e) => {
130
+ t.disabled || !e || J(e) || (T(e) ? _(e) : (t.single && (a.value = []), a.value.push(e), v("update:model-value", t.single ? a.value[0] : a.value), v("add", e)), t.single && E());
131
+ }, Te = (e) => {
132
132
  if (t.single) {
133
- const a = L.value.find((o) => {
134
- var i;
135
- return ((i = o[t.trackBy]) == null ? void 0 : i.toString()) === e.target.value;
133
+ const n = V.value.find((o) => {
134
+ var r;
135
+ return ((r = o[t.trackBy]) == null ? void 0 : r.toString()) === e.target.value;
136
136
  });
137
- V(a);
137
+ K(n);
138
138
  return;
139
139
  }
140
140
  const l = [...e.target.selectedOptions];
141
- for (const a of [...n.value])
142
- l.find((i) => {
143
- var s;
144
- return i.value === ((s = a[t.trackBy]) == null ? void 0 : s.toString());
145
- }) || _(a);
146
- for (const a of l) {
147
- const o = L.value.find(
148
- (i) => {
149
- var s;
150
- return ((s = i[t.trackBy]) == null ? void 0 : s.toString()) === a.value;
141
+ for (const n of [...a.value])
142
+ l.find((r) => {
143
+ var g;
144
+ return r.value === ((g = n[t.trackBy]) == null ? void 0 : g.toString());
145
+ }) || _(n);
146
+ for (const n of l) {
147
+ const o = V.value.find(
148
+ (r) => {
149
+ var g;
150
+ return ((g = r[t.trackBy]) == null ? void 0 : g.toString()) === n.value;
151
151
  }
152
152
  );
153
- E(o) || V(o);
153
+ T(o) || K(o);
154
154
  }
155
155
  }, _ = (e) => {
156
- if (t.disabled || Be.value && n.value.length === 1)
156
+ if (t.disabled || Se.value && a.value.length === 1)
157
157
  return;
158
- const l = n.value.findIndex((a) => a[t.trackBy] === e[t.trackBy]);
158
+ const l = a.value.findIndex((n) => n[t.trackBy] === e[t.trackBy]);
159
159
  if (l === -1) {
160
- Ye.warn("ll-select: could not find option to remove", e);
160
+ Je.warn("ll-select: could not find option to remove", e);
161
161
  return;
162
162
  }
163
- n.value.splice(l, 1), v("update:model-value", t.single ? n.value[0] : n.value), v("remove", e, l);
164
- }, oe = () => {
165
- u.value || (k(), u.value = !0, v("opened"), W.value && Y(() => {
163
+ a.value.splice(l, 1), v("update:model-value", t.single ? a.value[0] : a.value), v("remove", e, l);
164
+ }, ie = () => {
165
+ u.value || (w(), u.value = !0, v("opened"), Y.value && Q(() => {
166
166
  var e;
167
- (e = te.value) == null || e.focus({ preventScroll: !0 });
167
+ (e = se.value) == null || e.focus({ preventScroll: !0 });
168
168
  }));
169
- }, S = () => {
169
+ }, E = () => {
170
170
  var e;
171
- u.value && v("closed", n.value), K(-1), u.value = !1, t.preserveSearchTerm || (y.value = ""), (e = m.value) == null || e.blur();
172
- }, Te = async (e) => {
173
- if (await Y(), !m.value)
171
+ u.value && v("closed", a.value), G(-1), u.value = !1, t.preserveSearchTerm || (y.value = ""), (e = m.value) == null || e.blur();
172
+ }, xe = async (e) => {
173
+ if (await Q(), !m.value)
174
174
  return;
175
- if (![x.ENTER, x.ESCAPE].includes(e.keyCode)) {
176
- const a = m.value.querySelector(".stash-select__option--highlighted"), o = a == null ? void 0 : a.getBoundingClientRect(), i = m.value.getBoundingClientRect();
177
- if (!o || !i)
175
+ if (![C.ENTER, C.ESCAPE].includes(e.keyCode)) {
176
+ const n = m.value.querySelector(".stash-select__option--highlighted"), o = n == null ? void 0 : n.getBoundingClientRect(), r = m.value.getBoundingClientRect();
177
+ if (!o || !r)
178
178
  return;
179
- (o.bottom >= i.bottom || o.top <= i.top + o.height) && (a == null || a.scrollIntoView({ block: "nearest", inline: "nearest" }));
179
+ (o.bottom >= r.bottom || o.top <= r.top + o.height) && (n == null || n.scrollIntoView({ block: "nearest", inline: "nearest" }));
180
180
  }
181
- }, K = (e) => {
181
+ }, G = (e) => {
182
182
  p.value = e;
183
- }, xe = (e) => {
184
- if (e.keyCode === x.ESCAPE)
185
- S();
186
- else if (e.keyCode === x.DOWN && p.value < F.value.length - 1 && u.value)
183
+ }, Ce = (e) => {
184
+ if (e.keyCode === C.ESCAPE)
185
+ E();
186
+ else if (e.keyCode === C.DOWN && p.value < M.value.length - 1 && u.value)
187
187
  p.value++;
188
- else if (e.keyCode === x.UP && p.value > 0)
189
- u.value && p.value--, C.value && W.value && p.value === 0 && (C.value.scrollTop -= 100);
190
- else if (e.keyCode === x.ENTER && p.value !== -1 && u.value)
191
- V(F.value[p.value]);
188
+ else if (e.keyCode === C.UP && p.value > 0)
189
+ u.value && p.value--, O.value && Y.value && p.value === 0 && (O.value.scrollTop -= 100);
190
+ else if (e.keyCode === C.ENTER && p.value !== -1 && u.value)
191
+ K(M.value[p.value]);
192
192
  else
193
193
  return;
194
- e.preventDefault(), Te(e);
195
- }, re = Z(function() {
196
- Ce();
197
- }, tt.FAST), Ce = async function() {
194
+ e.preventDefault(), xe(e);
195
+ }, ce = te(function() {
196
+ Oe();
197
+ }, lt.FAST), Oe = async function() {
198
198
  if (!t.onSearch)
199
199
  return;
200
- const e = Ze("search-request-");
200
+ const e = et("search-request-");
201
201
  try {
202
- j.value[e] = !0, await t.onSearch(y.value);
202
+ X.value[e] = !0, await t.onSearch(y.value);
203
203
  } finally {
204
- delete j.value[e];
204
+ delete X.value[e];
205
205
  }
206
- }, Oe = (e, l) => [
206
+ }, Ie = (e, l) => [
207
207
  {
208
208
  "stash-select__option": !0,
209
- "stash-select__option--disabled": X(e),
209
+ "stash-select__option--disabled": J(e),
210
210
  "stash-select__option--highlighted": p.value === l,
211
- "stash-select__option--selected": E(e)
211
+ "stash-select__option--selected": T(e)
212
212
  },
213
213
  // @deprecated
214
214
  // backwards compatibility
215
215
  {
216
216
  "is-selected": p.value === l,
217
- "tw-bg-ice-200": p.value === l,
218
- "tw-bg-blue-100 tw-text-ice-700": E(e)
217
+ "bg-ice-200": p.value === l,
218
+ "bg-blue-100 text-ice-700": T(e)
219
219
  }
220
- ], E = (e) => e == null ? !1 : n.value.some((l) => (l == null ? void 0 : l[t.trackBy]) === e[t.trackBy]);
221
- function ie(e) {
222
- var o, i;
220
+ ], T = (e) => e == null ? !1 : a.value.some((l) => (l == null ? void 0 : l[t.trackBy]) === e[t.trackBy]);
221
+ function ue(e) {
222
+ var o, r;
223
223
  if (!e)
224
224
  return !1;
225
- const l = (o = m.value) == null ? void 0 : o.contains(e), a = (i = C.value) == null ? void 0 : i.contains(e);
226
- return l || a;
225
+ const l = (o = m.value) == null ? void 0 : o.contains(e), n = (r = O.value) == null ? void 0 : r.contains(e);
226
+ return l || n;
227
227
  }
228
- function Ie(e) {
228
+ function Re(e) {
229
229
  const l = e.relatedTarget;
230
- !ie(l) && l && S();
230
+ !ue(l) && l && E();
231
231
  }
232
- function Re(e) {
232
+ function Fe(e) {
233
233
  const l = e.target;
234
- ie(l) || S();
234
+ ue(l) || E();
235
235
  }
236
- const Fe = () => {
237
- K(-1);
238
- }, ce = async () => {
239
- await Y(), O.value && m.value && (R.value = R.value === 0 ? m.value.clientHeight : R.value, I.value = O.value.clientHeight);
236
+ const Me = () => {
237
+ G(-1);
238
+ }, de = async () => {
239
+ await Q(), I.value && m.value && (F.value = F.value === 0 ? m.value.clientHeight : F.value, R.value = I.value.clientHeight);
240
240
  };
241
- return Pe(() => {
242
- if (U.onInput)
241
+ return Ne(() => {
242
+ if (L.onInput)
243
243
  throw new Error("ll-select: use the @update:model-value event instead of @input.");
244
- O.value && ae.observe(O.value), window.addEventListener("resize", k), k();
245
- }), Ne(() => {
246
- window.removeEventListener("resize", ce), ae.disconnect(), k.cancel();
247
- }), (e, l) => (r(), J(at, Ae(t, {
248
- class: ["input ll-select stash-select", g(U).class],
249
- "data-test": "stash-select",
250
- "error-text": t.errorText || t.error,
251
- "hint-text": t.hintText || t.hint
252
- }), De({ _: 2 }, [
253
- t.isReadOnly ? {
254
- name: "default",
255
- fn: T(({ fieldId: a, labelId: o }) => [
256
- f("div", ot, [
257
- f("span", {
258
- id: a,
259
- "aria-labelledby": o,
260
- class: "show-empty tw-h-min"
261
- }, b(_e.value), 9, rt)
262
- ])
263
- ]),
264
- key: "0"
265
- } : {
266
- name: "default",
267
- fn: T(({ fieldId: a, fieldErrorId: o, hasError: i }) => [
268
- f("select", {
269
- id: a,
270
- "aria-errormessage": o,
271
- "aria-invalid": i,
272
- class: "tw-sr-only",
273
- disabled: t.disabled,
274
- multiple: !t.single,
275
- name: t.name,
276
- onChange: Ee
277
- }, [
278
- (r(!0), d(G, null, q(F.value, (s, w) => (r(), d("option", {
279
- key: `srOnlyOption-${w}`,
280
- selected: E(s),
281
- value: s[t.trackBy],
282
- disabled: X(s)
283
- }, b(s[t.displayBy] || ""), 9, ct))), 128)),
284
- l[5] || (l[5] = f("option", { value: "" }, null, -1))
285
- ], 40, it),
286
- $((r(), d("div", {
287
- ref_key: "selectRef",
288
- ref: ee,
289
- role: "listbox",
290
- "aria-hidden": "true",
291
- class: z(["stash-select__content-wrapper", [
292
- {
293
- "stash-select--disabled": !!t.disabled,
294
- "stash-select--error": !!(t.errorText || t.error),
295
- "stash-select--active": u.value,
296
- "stash-select--single": t.single
297
- },
298
- // @deprecated
299
- // backwards compatibility
300
- {
301
- "is-active": u.value,
302
- "is-single": t.single,
303
- "is-disabled": t.disabled
304
- }
305
- ]]),
306
- "aria-controls": "listbox-" + a,
307
- "aria-expanded": u.value,
308
- "aria-label": t.placeholder,
309
- "aria-disabled": t.disabled || void 0,
310
- onKeydown: xe,
311
- onKeyup: ue(S, ["esc"])
312
- }, [
313
- f("div", {
314
- id: "listbox-" + a,
315
- ref_key: "contentRef",
316
- ref: m,
317
- class: "input-field stash-select__content",
318
- tabindex: "0",
319
- "data-test": "stash-select|dropdown-trigger",
320
- onFocusin: oe,
321
- onFocusinOnce: l[4] || (l[4] = (s) => se.value = !0),
322
- onFocusout: Ie,
323
- onKeydown: oe,
324
- onMouseleave: Fe
244
+ I.value && oe.observe(I.value), window.addEventListener("resize", w), w();
245
+ }), Ae(() => {
246
+ window.removeEventListener("resize", de), oe.disconnect(), w.cancel();
247
+ }), (e, l) => {
248
+ var n;
249
+ return i(), Z(nt, De(t, {
250
+ class: ["input ll-select stash-select", B(L).class],
251
+ "data-test": "stash-select",
252
+ "error-text": t.errorText || t.error,
253
+ "hint-text": t.hintText || t.hint
254
+ }), Ue({ _: 2 }, [
255
+ t.isReadOnly ? {
256
+ name: "default",
257
+ fn: x(({ fieldId: o, labelId: r }) => [
258
+ f("div", rt, [
259
+ f("span", {
260
+ id: o,
261
+ "aria-labelledby": r,
262
+ class: "show-empty h-min"
263
+ }, k(ge.value), 9, it)
264
+ ])
265
+ ]),
266
+ key: "0"
267
+ } : {
268
+ name: "default",
269
+ fn: x(({ fieldId: o, fieldErrorId: r, hasError: g }) => [
270
+ f("select", {
271
+ id: o,
272
+ "aria-errormessage": r,
273
+ "aria-invalid": g,
274
+ class: "sr-only",
275
+ disabled: t.disabled,
276
+ multiple: !t.single,
277
+ name: t.name,
278
+ onChange: Te
325
279
  }, [
326
- f("ul", {
327
- ref_key: "chipsRef",
328
- ref: O,
329
- class: "stash-select__chips"
280
+ (i(!0), d(q, null, j(M.value, (s, b) => (i(), d("option", {
281
+ key: `srOnlyOption-${b}`,
282
+ selected: T(s),
283
+ value: s[t.trackBy],
284
+ disabled: J(s)
285
+ }, k(s[t.displayBy] || ""), 9, ut))), 128)),
286
+ l[5] || (l[5] = f("option", { value: "" }, null, -1))
287
+ ], 40, ct),
288
+ z((i(), d("div", {
289
+ ref_key: "selectRef",
290
+ ref: le,
291
+ role: "listbox",
292
+ "aria-hidden": "true",
293
+ class: H(["stash-select__content-wrapper", [
294
+ {
295
+ "stash-select--disabled": !!t.disabled,
296
+ "stash-select--error": !!(t.errorText || t.error),
297
+ "stash-select--active": u.value,
298
+ "stash-select--single": t.single
299
+ },
300
+ // @deprecated
301
+ // backwards compatibility
302
+ {
303
+ "is-active": u.value,
304
+ "is-single": t.single,
305
+ "is-disabled": t.disabled
306
+ }
307
+ ]]),
308
+ "aria-controls": "listbox-" + o,
309
+ "aria-expanded": u.value,
310
+ "aria-label": t.placeholder,
311
+ "aria-disabled": t.disabled || void 0,
312
+ onKeydown: Ce,
313
+ onKeyup: fe(E, ["esc"])
314
+ }, [
315
+ f("div", {
316
+ id: "listbox-" + o,
317
+ ref_key: "contentRef",
318
+ ref: m,
319
+ class: "input-field stash-select__content",
320
+ tabindex: "0",
321
+ "data-test": "stash-select|dropdown-trigger",
322
+ onFocusin: ie,
323
+ onFocusinOnce: l[4] || (l[4] = (s) => ne.value = !0),
324
+ onFocusout: Re,
325
+ onKeydown: ie,
326
+ onMouseleave: Me
330
327
  }, [
331
- n.value.length ? H("", !0) : (r(), d("li", {
332
- key: 0,
333
- class: z(["stash-select__placeholder tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
334
- }, b(t.placeholder), 3)),
335
- t.single ? (r(!0), d(G, { key: 1 }, q(n.value, (s) => (r(), d("li", {
336
- key: `chip-${s[t.trackBy]}`,
337
- class: z(["stash-select__selected tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
338
- }, [
339
- P(e.$slots, "selected", {
340
- option: s,
341
- onRemove: () => _(s),
342
- chipSelectedClass: "stash-select__chip"
343
- }, () => [
344
- N(b(s[t.displayBy] || s) + " ", 1),
345
- f("button", {
346
- tabindex: "-1",
347
- class: "stash-select__remove",
348
- onKeypress: ue(A((w) => _(s), ["prevent"]), ["enter"]),
349
- onMousedown: A((w) => _(s), ["prevent", "stop"])
350
- }, [
351
- B(D, {
352
- icon: "close",
353
- name: "close",
354
- size: "small"
355
- })
356
- ], 40, ft)
357
- ], !0)
358
- ], 2))), 128)) : (r(!0), d(G, { key: 2 }, q(n.value, (s) => (r(), d("li", {
359
- key: `chip-${s[t.trackBy]}`,
360
- class: "tw-inline-block"
328
+ f("ul", {
329
+ ref_key: "chipsRef",
330
+ ref: I,
331
+ class: "stash-select__chips"
361
332
  }, [
362
- P(e.$slots, "selected", {
363
- option: s,
364
- onRemove: () => _(s),
365
- chipSelectedClass: "stash-select__chip"
366
- }, () => [
367
- B(fe, {
368
- "bg-color": "blue-500",
369
- "is-removable": "",
370
- "text-color": "white",
371
- class: "stash-select__chip",
372
- onRemove: (w) => _(s)
373
- }, {
374
- default: T(() => [
375
- N(b(s[t.displayBy] || s), 1)
376
- ]),
377
- _: 2
378
- }, 1032, ["onRemove"])
379
- ], !0)
380
- ]))), 128))
381
- ], 512),
382
- ge.value ? (r(), d("div", pt, [
383
- B(fe, {
384
- "bg-color": "blue-500",
385
- "is-removable": "",
386
- "text-color": "white",
387
- class: "stash-select__chip",
388
- onRemove: Se
389
- }, {
390
- default: T(() => [
391
- N(b(be.value), 1)
392
- ]),
393
- _: 1
394
- })
395
- ])) : H("", !0),
396
- t.icon ? (r(), J(D, {
397
- key: 1,
398
- class: z(["stash-select__icon", { "tw-text-ice-500": t.disabled }]),
399
- "data-test": "stash-select|toggle-icon",
400
- name: t.icon,
401
- onMousedown: l[0] || (l[0] = A((s) => u.value && S(), ["prevent"]))
402
- }, null, 8, ["name", "class"])) : H("", !0),
403
- (r(), J(Ue, {
404
- to: t.teleportTo,
405
- disabled: !t.enableTeleport
406
- }, [
407
- B(Le, { name: "fade" }, {
408
- default: T(() => [
409
- $(f("div", {
410
- ref_key: "optionsWrapperRef",
411
- ref: C,
412
- class: "stash-select__border-selector tw-w-full tw-shadow-2xl",
413
- style: Ve(g(me)),
414
- onClick: l[3] || (l[3] = A(() => {
415
- }, ["stop"]))
416
- }, [
417
- W.value ? (r(), d("div", ht, [
418
- $(f("input", {
419
- ref_key: "searchRef",
420
- ref: te,
421
- "onUpdate:modelValue": l[1] || (l[1] = (s) => y.value = s),
422
- type: "text",
423
- autocomplete: "off",
424
- class: "stash-select__search",
425
- "data-test": g(U)["data-test"] ? g(U)["data-test"] + "-search" : "stash-select|search",
426
- placeholder: t.searchPlaceholder,
427
- spellcheck: !1,
428
- onInput: l[2] || (l[2] = //@ts-ignore
429
- (...s) => g(re) && g(re)(...s))
430
- }, null, 40, vt), [
431
- [Ke, y.value]
432
- ]),
433
- B(D, {
434
- name: "search",
435
- class: "tw-text-ice-500"
333
+ a.value.length ? P("", !0) : (i(), d("li", {
334
+ key: 0,
335
+ class: H(["stash-select__placeholder mr-0 pl-1.5", { truncate: !t.noTruncate }])
336
+ }, k(t.placeholder), 3)),
337
+ t.single ? (i(!0), d(q, { key: 1 }, j(a.value, (s) => (i(), d("li", {
338
+ key: `chip-${s[t.trackBy]}`,
339
+ class: H(["stash-select__selected mr-0 pl-1.5", { truncate: !t.noTruncate }])
340
+ }, [
341
+ N(e.$slots, "selected", {
342
+ option: s,
343
+ onRemove: () => _(s),
344
+ chipSelectedClass: "stash-select__chip"
345
+ }, () => [
346
+ A(k(s[t.displayBy] || s) + " ", 1),
347
+ f("button", {
348
+ tabindex: "-1",
349
+ class: "stash-select__remove",
350
+ onKeypress: fe(D((b) => _(s), ["prevent"]), ["enter"]),
351
+ onMousedown: D((b) => _(s), ["prevent", "stop"])
352
+ }, [
353
+ S(U, {
354
+ icon: "close",
355
+ name: "close",
356
+ size: "small"
436
357
  })
437
- ])) : H("", !0),
438
- f("ul", mt, [
439
- (r(!0), d(G, null, q(F.value, (s, w) => (r(), d("li", {
440
- key: `option-${s[t.trackBy]}`,
441
- "data-test": s[t.trackBy],
442
- class: z(Oe(s, w)),
443
- onClick: (Me) => V(s),
444
- onMouseenter: A((Me) => K(w), ["self"])
445
- }, [
446
- P(e.$slots, "option", { option: s }, () => [
447
- N(b(s[t.displayBy] || s), 1)
448
- ], !0),
449
- E(s) && !t.hideCheck ? (r(), d("span", _t, [
450
- B(D, {
451
- class: "tw-text-blue-500",
452
- name: "check"
453
- })
454
- ])) : H("", !0)
455
- ], 42, yt))), 128)),
456
- $(f("li", wt, [
457
- B(D, {
458
- "data-test": "stash-select|options-loading",
459
- name: "working",
460
- class: "tw-animate-spin tw-text-ice-500"
461
- })
462
- ], 512), [
463
- [Q, t.loading || ne.value]
358
+ ], 40, pt)
359
+ ], !0)
360
+ ], 2))), 128)) : (i(!0), d(q, { key: 2 }, j(a.value, (s) => (i(), d("li", {
361
+ key: `chip-${s[t.trackBy]}`,
362
+ class: "inline-block"
363
+ }, [
364
+ N(e.$slots, "selected", {
365
+ option: s,
366
+ onRemove: () => _(s),
367
+ chipSelectedClass: "stash-select__chip"
368
+ }, () => [
369
+ S(he, {
370
+ "bg-color": "blue-500",
371
+ "is-removable": "",
372
+ "text-color": "white",
373
+ class: "stash-select__chip",
374
+ onRemove: (b) => _(s)
375
+ }, {
376
+ default: x(() => [
377
+ A(k(s[t.displayBy] || s), 1)
464
378
  ]),
465
- $(f("li", gt, [
466
- P(e.$slots, "no-options", {}, () => [
467
- l[6] || (l[6] = N(" No options "))
468
- ], !0)
469
- ], 512), [
470
- [Q, !t.loading && !ne.value && !F.value.length]
379
+ _: 2
380
+ }, 1032, ["onRemove"])
381
+ ], !0)
382
+ ]))), 128))
383
+ ], 512),
384
+ Be.value ? (i(), d("div", ht, [
385
+ S(he, {
386
+ "bg-color": "blue-500",
387
+ "is-removable": "",
388
+ "text-color": "white",
389
+ class: "stash-select__chip",
390
+ onRemove: Ee
391
+ }, {
392
+ default: x(() => [
393
+ A(k(ke.value), 1)
394
+ ]),
395
+ _: 1
396
+ })
397
+ ])) : P("", !0),
398
+ t.icon ? (i(), Z(U, {
399
+ key: 1,
400
+ class: H(["stash-select__icon", { "text-ice-500": t.disabled }]),
401
+ "data-test": "stash-select|toggle-icon",
402
+ name: t.icon,
403
+ onMousedown: l[0] || (l[0] = D((s) => u.value && E(), ["prevent"]))
404
+ }, null, 8, ["name", "class"])) : P("", !0),
405
+ (i(), Z(Le, {
406
+ to: t.teleportTo,
407
+ disabled: !t.enableTeleport
408
+ }, [
409
+ S(Ve, { name: "fade" }, {
410
+ default: x(() => [
411
+ z(f("div", {
412
+ ref_key: "optionsWrapperRef",
413
+ ref: O,
414
+ class: "stash-select__border-selector w-full shadow-2xl",
415
+ style: Ke(B(ye)),
416
+ onClick: l[3] || (l[3] = D(() => {
417
+ }, ["stop"]))
418
+ }, [
419
+ Y.value ? (i(), d("div", vt, [
420
+ z(f("input", {
421
+ ref_key: "searchRef",
422
+ ref: se,
423
+ "onUpdate:modelValue": l[1] || (l[1] = (s) => y.value = s),
424
+ type: "text",
425
+ autocomplete: "off",
426
+ class: "stash-select__search",
427
+ "data-test": B(L)["data-test"] ? B(L)["data-test"] + "-search" : "stash-select|search",
428
+ placeholder: t.searchPlaceholder,
429
+ spellcheck: !1,
430
+ onInput: l[2] || (l[2] = //@ts-ignore
431
+ (...s) => B(ce) && B(ce)(...s))
432
+ }, null, 40, mt), [
433
+ [Ge, y.value]
434
+ ]),
435
+ S(U, {
436
+ name: "search",
437
+ class: "text-ice-500"
438
+ })
439
+ ])) : P("", !0),
440
+ f("ul", yt, [
441
+ (i(!0), d(q, null, j(M.value, (s, b) => (i(), d("li", {
442
+ key: `option-${s[t.trackBy]}`,
443
+ "data-test": s[t.trackBy],
444
+ class: H(Ie(s, b)),
445
+ onClick: ($e) => K(s),
446
+ onMouseenter: D(($e) => G(b), ["self"])
447
+ }, [
448
+ N(e.$slots, "option", { option: s }, () => [
449
+ A(k(s[t.displayBy] || s), 1)
450
+ ], !0),
451
+ T(s) && !t.hideCheck ? (i(), d("span", gt, [
452
+ S(U, {
453
+ class: "text-blue-500",
454
+ name: "check"
455
+ })
456
+ ])) : P("", !0)
457
+ ], 42, _t))), 128)),
458
+ z(f("li", bt, [
459
+ S(U, {
460
+ "data-test": "stash-select|options-loading",
461
+ name: "working",
462
+ class: "animate-spin text-ice-500"
463
+ })
464
+ ], 512), [
465
+ [ee, t.loading || re.value]
466
+ ]),
467
+ z(f("li", Bt, [
468
+ N(e.$slots, "no-options", {}, () => [
469
+ l[6] || (l[6] = A(" No options "))
470
+ ], !0)
471
+ ], 512), [
472
+ [ee, !t.loading && !re.value && !M.value.length]
473
+ ])
471
474
  ])
475
+ ], 4), [
476
+ [ee, u.value && !t.disabled]
472
477
  ])
473
- ], 4), [
474
- [Q, u.value && !t.disabled]
475
- ])
476
- ]),
477
- _: 3
478
- })
479
- ], 8, ["to", "disabled"]))
480
- ], 40, dt)
481
- ], 42, ut)), [
482
- [g(lt), Re]
483
- ])
484
- ]),
485
- key: "1"
486
- },
487
- ve.hint ? {
488
- name: "hint",
489
- fn: T(() => [
490
- P(e.$slots, "hint", {}, void 0, !0)
491
- ]),
492
- key: "2"
493
- } : void 0
494
- ]), 1040, ["class", "error-text", "hint-text"]));
478
+ ]),
479
+ _: 3
480
+ })
481
+ ], 8, ["to", "disabled"]))
482
+ ], 40, ft)
483
+ ], 42, dt)), [
484
+ [B(st), Fe]
485
+ ])
486
+ ]),
487
+ key: "1"
488
+ },
489
+ (n = W.hint) != null && n.call(W) ? {
490
+ name: "hint",
491
+ fn: x(() => [
492
+ N(e.$slots, "hint", {}, void 0, !0)
493
+ ]),
494
+ key: "2"
495
+ } : void 0
496
+ ]), 1040, ["class", "error-text", "hint-text"]);
497
+ };
495
498
  }
496
- }), Dt = /* @__PURE__ */ nt(bt, [["__scopeId", "data-v-f71e0e77"]]);
499
+ }), Ut = /* @__PURE__ */ ot(kt, [["__scopeId", "data-v-7aa12005"]]);
497
500
  export {
498
- Dt as default
501
+ Ut as default
499
502
  };
500
503
  //# sourceMappingURL=Select.js.map