@leaflink/stash 48.16.1 → 48.16.2

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 (270) hide show
  1. package/dist/Accordion.js +1 -1
  2. package/dist/Accordion.js.map +1 -1
  3. package/dist/Accordion.vue.d.ts +8 -9
  4. package/dist/ActionsDropdown.js.map +1 -1
  5. package/dist/ActionsDropdown.vue.d.ts +7 -8
  6. package/dist/AddressSelect.js +42 -38
  7. package/dist/AddressSelect.js.map +1 -1
  8. package/dist/AddressSelect.vue.d.ts +10 -11
  9. package/dist/Alert.js.map +1 -1
  10. package/dist/Alert.vue.d.ts +6 -7
  11. package/dist/AppNavigationItem.js +2 -2
  12. package/dist/AppNavigationItem.js.map +1 -1
  13. package/dist/AppNavigationItem.vue.d.ts +7 -8
  14. package/dist/AppSidebar.js +42 -42
  15. package/dist/AppSidebar.js.map +1 -1
  16. package/dist/AppSidebar.vue.d.ts +8 -9
  17. package/dist/AppTopbar.js +16 -16
  18. package/dist/AppTopbar.js.map +1 -1
  19. package/dist/AppTopbar.vue.d.ts +8 -9
  20. package/dist/Avatar.js.map +1 -1
  21. package/dist/Avatar.vue.d.ts +7 -8
  22. package/dist/Backdrop.vue.d.ts +3 -5
  23. package/dist/Badge.js +1 -1
  24. package/dist/Badge.js.map +1 -1
  25. package/dist/Badge.vue.d.ts +7 -8
  26. package/dist/Box.vue.d.ts +6 -7
  27. package/dist/Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map +1 -1
  28. package/dist/Button.js.map +1 -1
  29. package/dist/Button.vue.d.ts +7 -8
  30. package/dist/ButtonGroup.js +29 -29
  31. package/dist/ButtonGroup.js.map +1 -1
  32. package/dist/ButtonGroup.vue.d.ts +8 -9
  33. package/dist/Card.js.map +1 -1
  34. package/dist/Card.vue.d.ts +6 -7
  35. package/dist/CardContent.vue.d.ts +3 -5
  36. package/dist/CardFooter.vue.d.ts +3 -5
  37. package/dist/CardHeader.js.map +1 -1
  38. package/dist/CardHeader.vue.d.ts +3 -4
  39. package/dist/CardMedia.js +6 -6
  40. package/dist/CardMedia.js.map +1 -1
  41. package/dist/CardMedia.vue.d.ts +3 -4
  42. package/dist/Carousel.js +249 -249
  43. package/dist/Carousel.js.map +1 -1
  44. package/dist/Carousel.vue.d.ts +9 -9
  45. package/dist/Checkbox.js +27 -27
  46. package/dist/Checkbox.js.map +1 -1
  47. package/dist/Checkbox.vue.d.ts +11 -12
  48. package/dist/ChevronToggle.js +1 -1
  49. package/dist/ChevronToggle.vue.d.ts +8 -9
  50. package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js} +11 -11
  51. package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js.map → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map} +1 -1
  52. package/dist/Chip.js +30 -30
  53. package/dist/Chip.js.map +1 -1
  54. package/dist/Chip.vue.d.ts +9 -10
  55. package/dist/ConfirmationCodeInput.js +25 -25
  56. package/dist/ConfirmationCodeInput.js.map +1 -1
  57. package/dist/ConfirmationCodeInput.vue.d.ts +8 -9
  58. package/dist/ContextSwitcher.js +18 -18
  59. package/dist/ContextSwitcher.js.map +1 -1
  60. package/dist/ContextSwitcher.vue.d.ts +9 -10
  61. package/dist/Copy.js.map +1 -1
  62. package/dist/Copy.vue.d.ts +6 -7
  63. package/dist/CurrencyInput.js +93 -93
  64. package/dist/CurrencyInput.js.map +1 -1
  65. package/dist/CurrencyInput.vue.d.ts +10 -11
  66. package/dist/CustomRender.vue.d.ts +3 -15
  67. package/dist/DataView.js +97 -97
  68. package/dist/DataView.js.map +1 -1
  69. package/dist/DataView.vue.d.ts +9 -10
  70. package/dist/DataViewFilters.js +153 -150
  71. package/dist/DataViewFilters.js.map +1 -1
  72. package/dist/DataViewFilters.vue.d.ts +9 -10
  73. package/dist/DataViewSortButton.js.map +1 -1
  74. package/dist/DataViewSortButton.vue.d.ts +6 -7
  75. package/dist/DataViewToolbar.js +27 -27
  76. package/dist/DataViewToolbar.js.map +1 -1
  77. package/dist/DataViewToolbar.vue.d.ts +8 -9
  78. package/dist/DatePicker.js +738 -738
  79. package/dist/DatePicker.js.map +1 -1
  80. package/dist/DatePicker.vue.d.ts +11 -12
  81. package/dist/DescriptionList.js.map +1 -1
  82. package/dist/DescriptionList.vue.d.ts +6 -7
  83. package/dist/DescriptionListDetail.vue.d.ts +3 -5
  84. package/dist/DescriptionListGroup.vue.d.ts +3 -5
  85. package/dist/DescriptionListTerm.vue.d.ts +3 -5
  86. package/dist/Dialog.js +44 -44
  87. package/dist/Dialog.js.map +1 -1
  88. package/dist/Dialog.vue.d.ts +10 -11
  89. package/dist/Divider.vue.d.ts +3 -5
  90. package/dist/Dropdown.js +38 -38
  91. package/dist/Dropdown.js.map +1 -1
  92. package/dist/Dropdown.vue.d.ts +9 -10
  93. package/dist/EmptyState.js +20 -20
  94. package/dist/EmptyState.js.map +1 -1
  95. package/dist/EmptyState.vue.d.ts +6 -7
  96. package/dist/Expand.js +1 -1
  97. package/dist/Expand.vue.d.ts +8 -9
  98. package/dist/{Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js → Expand.vue_vue_type_script_setup_true_lang-0f236267.js} +19 -19
  99. package/dist/Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map +1 -0
  100. package/dist/Field.vue.d.ts +6 -7
  101. package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -1
  102. package/dist/FileUpload.js +65 -65
  103. package/dist/FileUpload.js.map +1 -1
  104. package/dist/FileUpload.vue.d.ts +10 -11
  105. package/dist/FilterChip.js +27 -27
  106. package/dist/FilterChip.js.map +1 -1
  107. package/dist/FilterChip.vue.d.ts +8 -9
  108. package/dist/FilterDrawerItem.js +26 -26
  109. package/dist/FilterDrawerItem.js.map +1 -1
  110. package/dist/FilterDrawerItem.vue.d.ts +5 -6
  111. package/dist/FilterDropdown.js +49 -49
  112. package/dist/FilterDropdown.js.map +1 -1
  113. package/dist/FilterDropdown.vue.d.ts +8 -9
  114. package/dist/FilterSelect.js +23 -23
  115. package/dist/FilterSelect.js.map +1 -1
  116. package/dist/FilterSelect.vue.d.ts +8 -9
  117. package/dist/Filters.js +112 -104
  118. package/dist/Filters.js.map +1 -1
  119. package/dist/Filters.vue.d.ts +2204 -65
  120. package/dist/HttpError.js +42 -42
  121. package/dist/HttpError.js.map +1 -1
  122. package/dist/HttpError.vue.d.ts +6 -7
  123. package/dist/Icon.js.map +1 -1
  124. package/dist/Icon.vue.d.ts +7 -8
  125. package/dist/IconLabel.js.map +1 -1
  126. package/dist/IconLabel.vue.d.ts +8 -9
  127. package/dist/Illustration.vue.d.ts +6 -7
  128. package/dist/Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map +1 -1
  129. package/dist/Image.js +47 -47
  130. package/dist/Image.js.map +1 -1
  131. package/dist/Image.vue.d.ts +6 -7
  132. package/dist/InlineEdit.js +34 -34
  133. package/dist/InlineEdit.js.map +1 -1
  134. package/dist/InlineEdit.vue.d.ts +9 -10
  135. package/dist/Input.js +35 -35
  136. package/dist/Input.js.map +1 -1
  137. package/dist/Input.vue.d.ts +13 -14
  138. package/dist/InputOptions.js +33 -33
  139. package/dist/InputOptions.js.map +1 -1
  140. package/dist/InputOptions.vue.d.ts +8 -9
  141. package/dist/IntegrationIcon.js.map +1 -1
  142. package/dist/IntegrationIcon.vue.d.ts +7 -8
  143. package/dist/Label.vue.d.ts +6 -7
  144. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -1
  145. package/dist/LicenseChip.js.map +1 -1
  146. package/dist/LicenseChip.vue.d.ts +6 -7
  147. package/dist/ListItem.vue.d.ts +225 -95
  148. package/dist/ListItemCell.vue.d.ts +4 -16
  149. package/dist/ListView.js +1 -1
  150. package/dist/ListView.vue.d.ts +5072 -470
  151. package/dist/Loading.js +16 -16
  152. package/dist/Loading.js.map +1 -1
  153. package/dist/Loading.vue.d.ts +3 -5
  154. package/dist/Logo.js +1 -1
  155. package/dist/Logo.vue.d.ts +9 -10
  156. package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js +196 -0
  157. package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map +1 -0
  158. package/dist/Menu.vue.d.ts +3 -5
  159. package/dist/MenuItem.vue.d.ts +3 -5
  160. package/dist/Metric.js.map +1 -1
  161. package/dist/Metric.vue.d.ts +6 -7
  162. package/dist/Modal.js +29 -29
  163. package/dist/Modal.js.map +1 -1
  164. package/dist/Modal.vue.d.ts +8 -9
  165. package/dist/Modals.js +8 -7
  166. package/dist/Modals.js.map +1 -1
  167. package/dist/Modals.vue.d.ts +3 -5
  168. package/dist/Module.js.map +1 -1
  169. package/dist/Module.vue.d.ts +7 -8
  170. package/dist/ModuleContent.vue.d.ts +3 -5
  171. package/dist/ModuleFooter.vue.d.ts +3 -5
  172. package/dist/ModuleHeader.js.map +1 -1
  173. package/dist/ModuleHeader.vue.d.ts +6 -7
  174. package/dist/ObfuscateText.js +1 -1
  175. package/dist/ObfuscateText.js.map +1 -1
  176. package/dist/ObfuscateText.vue.d.ts +6 -7
  177. package/dist/PageContent.vue.d.ts +3 -5
  178. package/dist/PageHeader.js.map +1 -1
  179. package/dist/PageHeader.vue.d.ts +6 -7
  180. package/dist/PageNavigation.js +30 -27
  181. package/dist/PageNavigation.js.map +1 -1
  182. package/dist/PageNavigation.vue.d.ts +8 -9
  183. package/dist/Paginate.js +32 -32
  184. package/dist/Paginate.js.map +1 -1
  185. package/dist/Paginate.vue.d.ts +8 -9
  186. package/dist/PlaidLink.js +29 -29
  187. package/dist/PlaidLink.js.map +1 -1
  188. package/dist/PlaidLink.vue.d.ts +11 -12
  189. package/dist/QuickAction.js.map +1 -1
  190. package/dist/QuickAction.vue.d.ts +4 -5
  191. package/dist/Radio.vue.d.ts +20 -1
  192. package/dist/RadioGroup.js +123 -123
  193. package/dist/RadioGroup.js.map +1 -1
  194. package/dist/RadioGroup.vue.d.ts +10 -11
  195. package/dist/RadioNew.js +102 -102
  196. package/dist/RadioNew.js.map +1 -1
  197. package/dist/RadioNew.vue.d.ts +10 -11
  198. package/dist/RangeInput.vue.d.ts +3 -5
  199. package/dist/SearchBar.js +36 -36
  200. package/dist/SearchBar.js.map +1 -1
  201. package/dist/SearchBar.vue.d.ts +9 -10
  202. package/dist/Select.js +792 -774
  203. package/dist/Select.js.map +1 -1
  204. package/dist/Select.vue.d.ts +14 -15
  205. package/dist/SelectStatus.js +27 -27
  206. package/dist/SelectStatus.js.map +1 -1
  207. package/dist/SelectStatus.vue.d.ts +12 -13
  208. package/dist/Skeleton.js.map +1 -1
  209. package/dist/Skeleton.vue.d.ts +7 -8
  210. package/dist/Step.js.map +1 -1
  211. package/dist/Step.vue.d.ts +7 -8
  212. package/dist/Stepper.js +19 -19
  213. package/dist/Stepper.js.map +1 -1
  214. package/dist/Stepper.vue.d.ts +9 -10
  215. package/dist/Switch.js +25 -25
  216. package/dist/Switch.js.map +1 -1
  217. package/dist/Switch.vue.d.ts +11 -12
  218. package/dist/Tab.js +2 -2
  219. package/dist/Tab.vue.d.ts +3 -4
  220. package/dist/{Tab.vue_vue_type_script_setup_true_lang-69d1b046.js → Tab.vue_vue_type_script_setup_true_lang-9aa53203.js} +5 -3
  221. package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +1 -0
  222. package/dist/Table.js +3 -3
  223. package/dist/Table.js.map +1 -1
  224. package/dist/{Table.keys-cf93df19.js → Table.keys-83e4f09b.js} +11 -11
  225. package/dist/{Table.keys-cf93df19.js.map → Table.keys-83e4f09b.js.map} +1 -1
  226. package/dist/Table.vue.d.ts +6 -7
  227. package/dist/TableCell.js +1 -1
  228. package/dist/TableCell.js.map +1 -1
  229. package/dist/TableCell.vue.d.ts +6 -7
  230. package/dist/TableHeaderCell.js +12 -12
  231. package/dist/TableHeaderCell.js.map +1 -1
  232. package/dist/TableHeaderCell.vue.d.ts +6 -7
  233. package/dist/TableHeaderRow.js +21 -21
  234. package/dist/TableHeaderRow.js.map +1 -1
  235. package/dist/TableHeaderRow.vue.d.ts +8 -9
  236. package/dist/TableRow.js +42 -42
  237. package/dist/TableRow.js.map +1 -1
  238. package/dist/TableRow.vue.d.ts +8 -9
  239. package/dist/Tabs.js +2 -2
  240. package/dist/Tabs.vue.d.ts +8 -9
  241. package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js → Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js} +37 -37
  242. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map +1 -0
  243. package/dist/TextEditor.js +565 -565
  244. package/dist/TextEditor.js.map +1 -1
  245. package/dist/TextEditor.vue.d.ts +12 -13
  246. package/dist/Textarea.js +28 -28
  247. package/dist/Textarea.js.map +1 -1
  248. package/dist/Textarea.vue.d.ts +10 -11
  249. package/dist/Timeline.js.map +1 -1
  250. package/dist/Timeline.vue.d.ts +6 -7
  251. package/dist/TimelineItem.js +21 -21
  252. package/dist/TimelineItem.js.map +1 -1
  253. package/dist/TimelineItem.vue.d.ts +13 -6
  254. package/dist/Toast.js +134 -134
  255. package/dist/Toast.js.map +1 -1
  256. package/dist/Toast.vue.d.ts +6 -7
  257. package/dist/Toasts.vue.d.ts +3 -5
  258. package/dist/components.css +1 -1
  259. package/dist/index.js.map +1 -1
  260. package/dist/tailwind-base.js.map +1 -1
  261. package/dist/usePlaidLink.d.ts +1 -6
  262. package/dist/useScriptTag.d.ts +3 -8
  263. package/dist/useStepper.d.ts +7 -2
  264. package/package.json +1 -1
  265. package/tailwind-base.ts +13 -6
  266. package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +0 -1
  267. package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +0 -196
  268. package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +0 -1
  269. package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +0 -1
  270. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +0 -1
package/dist/Dropdown.js CHANGED
@@ -1,10 +1,10 @@
1
- import { defineComponent as P, ref as u, useCssModule as I, watch as C, onMounted as q, onBeforeUnmount as K, computed as R, withDirectives as _, openBlock as p, createElementBlock as k, renderSlot as x, createElementVNode as E, normalizeClass as b, createTextVNode as U, toDisplayString as V, createVNode as S, createBlock as W, Transition as Y, withCtx as F, unref as M, normalizeStyle as j, vShow as G, nextTick as A } from "vue";
1
+ import { defineComponent as I, ref as u, useCssModule as q, watch as C, onMounted as K, onBeforeUnmount as R, computed as U, withDirectives as _, openBlock as p, createElementBlock as k, renderSlot as x, createElementVNode as E, normalizeClass as b, createTextVNode as V, toDisplayString as W, createVNode as S, createBlock as Y, Transition as F, withCtx as j, unref as M, normalizeStyle as G, vShow as H, nextTick as A } from "vue";
2
2
  import { KEY_CODES as d } from "./constants.js";
3
- import H from "./clickoutside.js";
4
- import J from "./utils/calculateElementOverflow.js";
5
- import { getMountPoint as Q } from "./utils/helpers.js";
3
+ import J from "./clickoutside.js";
4
+ import Q from "./utils/calculateElementOverflow.js";
5
+ import { getMountPoint as X } from "./utils/helpers.js";
6
6
  import B from "./Icon.js";
7
- import { _ as X } from "./_plugin-vue_export-helper-dad06003.js";
7
+ import { _ as Z } from "./_plugin-vue_export-helper-dad06003.js";
8
8
  import "lodash-es/camelCase";
9
9
  import "lodash-es/get";
10
10
  import "lodash-es/isFinite";
@@ -12,10 +12,10 @@ import "lodash-es/isPlainObject";
12
12
  import "lodash-es/uniqueId";
13
13
  import "./index-9e1095ef.js";
14
14
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
15
- const Z = ["aria-expanded"], ee = {
15
+ const ee = ["aria-expanded"], te = {
16
16
  key: 0,
17
17
  class: "tw-flex tw-items-center tw-font-medium tw-text-blue-500 hover:tw-text-blue-700"
18
- }, te = /* @__PURE__ */ P({
18
+ }, le = /* @__PURE__ */ I({
19
19
  name: "ll-dropdown",
20
20
  __name: "Dropdown",
21
21
  props: {
@@ -28,20 +28,20 @@ const Z = ["aria-expanded"], ee = {
28
28
  fluidContent: { type: Boolean, default: !1 }
29
29
  },
30
30
  emits: ["toggle", "dismiss"],
31
- setup(D, { expose: $, emit: v }) {
32
- const a = D, t = u(null), w = u(null), f = [], s = u(f), i = u(-1), l = u(!1), g = u({}), L = I();
31
+ setup(D, { expose: $, emit: L }) {
32
+ const a = D, v = L, t = u(null), w = u(null), f = [], s = u(f), i = u(-1), l = u(!1), g = u({}), T = q();
33
33
  C(l, (e) => {
34
34
  e || (i.value = -1), v("toggle", e);
35
35
  }), C(i, (e, o) => {
36
36
  e in s.value && s.value[e].classList.add("tw-bg-ice-200"), o in s.value && s.value[o].classList.remove("tw-bg-ice-200");
37
- }), q(() => {
37
+ }), K(() => {
38
38
  var e, o, n;
39
39
  if (a.reattach) {
40
- const c = Q();
40
+ const c = X();
41
41
  t.value && c.appendChild(t.value);
42
42
  }
43
43
  (e = t.value) != null && e.querySelector(".stash-menu") ? s.value = ((o = t.value) == null ? void 0 : o.querySelectorAll(".stash-menu-item")) ?? f : s.value = ((n = t.value) == null ? void 0 : n.querySelectorAll(".dropdown__item")) ?? f, window.addEventListener("resize", () => r());
44
- }), K(() => {
44
+ }), R(() => {
45
45
  var e, o;
46
46
  window.removeEventListener("resize", () => r()), (o = (e = t == null ? void 0 : t.value) == null ? void 0 : e.parentNode) == null || o.removeChild(t.value);
47
47
  });
@@ -54,9 +54,9 @@ const Z = ["aria-expanded"], ee = {
54
54
  }
55
55
  async function m() {
56
56
  var e;
57
- l.value ? l.value = !1 : (l.value = !0, await O(), (e = t.value) == null || e.focus());
57
+ l.value ? l.value = !1 : (l.value = !0, await z(), (e = t.value) == null || e.focus());
58
58
  }
59
- function T(e) {
59
+ function N(e) {
60
60
  if (e.keyCode === d.ESCAPE)
61
61
  r();
62
62
  else if (e.keyCode === d.DOWN && i.value < s.value.length - 1)
@@ -69,11 +69,11 @@ const Z = ["aria-expanded"], ee = {
69
69
  return;
70
70
  e.preventDefault();
71
71
  }
72
- function N() {
72
+ function O() {
73
73
  var e;
74
74
  (e = t.value) == null || e.style.setProperty("--offset", "0");
75
75
  }
76
- async function O() {
76
+ async function z() {
77
77
  var y, h;
78
78
  await A();
79
79
  const e = ((y = w.value) == null ? void 0 : y.getBoundingClientRect()) || {}, o = e.top + e.height, n = {
@@ -86,14 +86,14 @@ const Z = ["aria-expanded"], ee = {
86
86
  right: a.align === "right" ? `${document.documentElement.clientWidth - Math.round(e.right) + n.x}px` : void 0,
87
87
  top: `${window.scrollY + o + n.y}px`
88
88
  }, await A());
89
- const c = J(t == null ? void 0 : t.value);
89
+ const c = Q(t == null ? void 0 : t.value);
90
90
  if (c) {
91
- const z = a.align === "left" ? "-" : "";
92
- (h = t.value) == null || h.style.setProperty("--offset", `${z}${c.value}`);
91
+ const P = a.align === "left" ? "-" : "";
92
+ (h = t.value) == null || h.style.setProperty("--offset", `${P}${c.value}`);
93
93
  }
94
94
  }
95
95
  return $({
96
- isActive: R(() => l.value),
96
+ isActive: U(() => l.value),
97
97
  toggle: m,
98
98
  dismiss: r
99
99
  }), (e, o) => _((p(), k("div", {
@@ -101,7 +101,7 @@ const Z = ["aria-expanded"], ee = {
101
101
  ref: w,
102
102
  class: "tw-relative tw-inline-block",
103
103
  "data-test": "ll-dropdown",
104
- onKeydown: T
104
+ onKeydown: N
105
105
  }, [
106
106
  x(e.$slots, "toggle", {
107
107
  isActive: l.value,
@@ -113,26 +113,26 @@ const Z = ["aria-expanded"], ee = {
113
113
  class: b([e.label ? "tw-min-w-auto tw-outline-none" : "tw-rounded tw-p-3"]),
114
114
  onClick: m
115
115
  }, [
116
- e.label ? (p(), k("span", ee, [
117
- U(V(e.label) + " ", 1),
116
+ e.label ? (p(), k("span", te, [
117
+ V(W(e.label) + " ", 1),
118
118
  S(B, { name: "caret-down" })
119
- ])) : (p(), W(B, {
119
+ ])) : (p(), Y(B, {
120
120
  key: 1,
121
121
  name: "ellipsis"
122
122
  }))
123
- ], 10, Z)
123
+ ], 10, ee)
124
124
  ]),
125
- S(Y, {
125
+ S(F, {
126
126
  name: "fade",
127
- onAfterLeave: N
127
+ onAfterLeave: O
128
128
  }, {
129
- default: F(() => [
129
+ default: j(() => [
130
130
  _(E("div", {
131
131
  ref_key: "contentRef",
132
132
  ref: t,
133
133
  "data-test": "ll-dropdown-content",
134
134
  class: b([
135
- M(L).content,
135
+ M(T).content,
136
136
  e.contentClass,
137
137
  {
138
138
  "tw-left-0 after:tw-left-6": a.align === "left",
@@ -140,28 +140,28 @@ const Z = ["aria-expanded"], ee = {
140
140
  "tw-max-w-[360px]": !a.fluidContent
141
141
  }
142
142
  ]),
143
- style: j(g.value)
143
+ style: G(g.value)
144
144
  }, [
145
145
  x(e.$slots, "default", {
146
146
  dismiss: r,
147
147
  isActive: l.value
148
148
  })
149
149
  ], 6), [
150
- [G, l.value]
150
+ [H, l.value]
151
151
  ])
152
152
  ]),
153
153
  _: 3
154
154
  })
155
155
  ], 32)), [
156
- [M(H), r]
156
+ [M(J), r]
157
157
  ]);
158
158
  }
159
- }), le = "_content_zbxyu_2", oe = {
160
- content: le
161
- }, ae = {
162
- $style: oe
163
- }, he = /* @__PURE__ */ X(te, [["__cssModules", ae]]);
159
+ }), oe = "_content_zbxyu_2", ae = {
160
+ content: oe
161
+ }, ne = {
162
+ $style: ae
163
+ }, Ce = /* @__PURE__ */ Z(le, [["__cssModules", ne]]);
164
164
  export {
165
- he as default
165
+ Ce as default
166
166
  };
167
167
  //# sourceMappingURL=Dropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../src/components/Dropdown/Dropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, nextTick, onBeforeUnmount, onMounted, ref, useCssModule, watch } from 'vue';\n\n import { KEY_CODES } from '../../constants';\n import vClickoutside from '../../directives/clickoutside/clickoutside';\n import calculateElementOverflow from '../../utils/calculateElementOverflow';\n import { getMountPoint } from '../../utils/helpers';\n import Icon from '../Icon/Icon.vue';\n\n export type DropdownOffset = {\n x?: number;\n y?: number;\n };\n\n export interface DropdownProps {\n /**\n * Used to position the dropdown relative to target\n * Options: left, right\n */\n align?: 'left' | 'right';\n /**\n * When passed, text with caret is displayed instead of default kebab menu.\n */\n label?: string;\n /**\n * If true, dropdown will remain open when clicking on its content. Otherwise, it'll close automatically on click.\n */\n closeManually?: boolean;\n /**\n * Used to horizontally and vertically offset the dropdown in pixels\n * Keep in mind, `x` value is relative to `align` value.\n */\n offset?: DropdownOffset;\n /**\n * If `reattach` is true, the contents will be mounted in the mount point container,\n * so as to circumvent clipping issues from a parent's overflow property.\n */\n reattach?: boolean;\n /**\n * Custom class to apply to the default dropdown content element\n */\n contentClass?: string | string[];\n /**\n * Removes content container's max width\n */\n fluidContent?: boolean;\n }\n\n type DropdownStyles = {\n left?: string;\n right?: string;\n top?: string;\n };\n\n defineOptions({\n name: 'll-dropdown',\n });\n\n const props = withDefaults(defineProps<DropdownProps>(), {\n align: 'right',\n label: '',\n closeManually: false,\n offset: () => ({}),\n reattach: true,\n contentClass: '',\n fluidContent: false,\n });\n\n const emit =\n defineEmits<{\n toggle: [isActive: boolean];\n dismiss: [];\n }>();\n\n const contentRef = ref<HTMLElement | null>(null);\n const dropdownRef = ref<HTMLDivElement | null>(null);\n\n const DEFAULT_ITEMS_LIST = [] as unknown as NodeListOf<Element>;\n\n const items = ref<NodeListOf<Element>>(DEFAULT_ITEMS_LIST);\n const itemIndex = ref(-1);\n const isActive = ref(false);\n\n const styles = ref<DropdownStyles>({});\n const classes = useCssModule();\n\n watch(isActive, (val) => {\n if (!val) {\n itemIndex.value = -1;\n }\n\n emit('toggle', val);\n });\n\n watch(itemIndex, (next, prev) => {\n next in items.value && items.value[next].classList.add('tw-bg-ice-200');\n prev in items.value && items.value[prev].classList.remove('tw-bg-ice-200');\n });\n\n onMounted(() => {\n if (props.reattach) {\n const target = getMountPoint();\n\n contentRef.value && target.appendChild(contentRef.value);\n }\n\n // if stash-menu exists, use it's items\n if (contentRef.value?.querySelector('.stash-menu')) {\n items.value = contentRef.value?.querySelectorAll('.stash-menu-item') ?? DEFAULT_ITEMS_LIST;\n } else {\n items.value = contentRef.value?.querySelectorAll('.dropdown__item') ?? DEFAULT_ITEMS_LIST;\n }\n\n // avoid calling dismiss with ResizeEvent because it's target is the Window element and it's not a valid Node element to be passed to dismiss\n window.addEventListener('resize', () => dismiss());\n });\n\n onBeforeUnmount(() => {\n window.removeEventListener('resize', () => dismiss());\n contentRef?.value?.parentNode?.removeChild(contentRef.value);\n });\n\n /**\n * Dismisses the Dropdown.\n */\n function dismiss(event?: Event) {\n if (\n props.closeManually &&\n (contentRef.value?.contains(event?.target as HTMLElement) || contentRef.value === event?.target)\n ) {\n return;\n }\n\n const wasOpen = isActive.value;\n\n isActive.value = false;\n\n if (wasOpen) {\n emit('dismiss');\n }\n }\n\n /**\n * Opens or closes the Dropdown. If opening, positions and focuses its content.\n */\n async function toggle() {\n if (isActive.value) {\n isActive.value = false;\n } else {\n isActive.value = true;\n await calculateOffset();\n contentRef.value?.focus();\n }\n }\n\n /**\n * Handles all user keyboard input on the Dropdown.\n * @param {KeyboardEvent} e The native keydown event.\n */\n function onKeyDown(e: KeyboardEvent) {\n if (e.keyCode === KEY_CODES.ESCAPE) {\n dismiss();\n } else if (e.keyCode === KEY_CODES.DOWN && itemIndex.value < items.value.length - 1) {\n isActive.value && itemIndex.value++;\n } else if (e.keyCode === KEY_CODES.UP && itemIndex.value > -1) {\n isActive.value && itemIndex.value--;\n } else if (e.keyCode === KEY_CODES.ENTER && itemIndex.value !== -1) {\n isActive.value && items[itemIndex.value].click();\n } else {\n return;\n }\n\n e.preventDefault(); // if keyDown did something / we didn't return\n }\n\n /**\n * Reset any page overflow offset\n */\n function resetOffset() {\n contentRef.value?.style.setProperty('--offset', '0');\n }\n\n /**\n * Calculate the position for the Dropdown content element,\n * relative to the viewport.\n * Repositions the dropdown content element (& arrow)\n * if it overflows the page (including gutter).\n */\n async function calculateOffset() {\n await nextTick();\n\n const toggleBCR = dropdownRef.value?.getBoundingClientRect() || ({} as DOMRect);\n const top = toggleBCR.top + toggleBCR.height;\n const offset = {\n x: 0,\n y: 0,\n ...props.offset,\n };\n\n if (props.reattach) {\n styles.value = {\n left: props.align === 'left' ? `${Math.round(toggleBCR.left) + offset.x}px` : undefined,\n right:\n props.align === 'right'\n ? `${document.documentElement.clientWidth - Math.round(toggleBCR.right) + offset.x}px`\n : undefined,\n top: `${window.scrollY + top + offset.y}px`,\n };\n await nextTick(); // wait for style updates to sync in the DOM\n }\n\n const overflow = calculateElementOverflow(contentRef?.value);\n\n if (overflow) {\n const direction = props.align === 'left' ? '-' : '';\n contentRef.value?.style.setProperty('--offset', `${direction}${overflow.value}`);\n }\n }\n\n defineExpose({\n isActive: computed(() => isActive.value),\n toggle,\n dismiss,\n });\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n v-clickoutside=\"dismiss\"\n class=\"tw-relative tw-inline-block\"\n data-test=\"ll-dropdown\"\n @keydown=\"onKeyDown\"\n >\n <!-- @slot Toggle component slot, receives `toggle` method to trigger Dropdown display -->\n <slot name=\"toggle\" :is-active=\"isActive\" :toggle=\"toggle\">\n <button\n data-test=\"button|toggle\"\n :aria-expanded=\"isActive\"\n :class=\"[label ? 'tw-min-w-auto tw-outline-none' : 'tw-rounded tw-p-3']\"\n @click=\"toggle\"\n >\n <span v-if=\"label\" class=\"tw-flex tw-items-center tw-font-medium tw-text-blue-500 hover:tw-text-blue-700\">\n {{ label }}\n <Icon name=\"caret-down\" />\n </span>\n <Icon v-else name=\"ellipsis\" />\n </button>\n </slot>\n\n <transition name=\"fade\" @after-leave=\"resetOffset\">\n <div\n v-show=\"isActive\"\n ref=\"contentRef\"\n data-test=\"ll-dropdown-content\"\n :class=\"[\n classes.content,\n contentClass,\n {\n 'tw-left-0 after:tw-left-6': props.align === 'left',\n 'tw-right-0': props.align === 'right',\n 'tw-max-w-[360px]': !props.fluidContent,\n },\n ]\"\n :style=\"styles\"\n >\n <!-- @slot Dropdown content slot. Receives `dismiss` method, to trigger manual close. You must call dismiss with parentheses. Receives `is-active` prop. -->\n <slot :dismiss=\"dismiss\" :is-active=\"isActive\"></slot>\n </div>\n </transition>\n </div>\n</template>\n\n<style module>\n .content {\n --offset: 0;\n\n @apply tw-shadow-2xl\n tw-bg-white\n tw-border\n tw-border-solid\n tw-border-blue-500\n tw-rounded\n tw-absolute\n tw-z-[301]\n tw-min-w-[200px];\n\n transform: translateX(calc(var(--offset) * 1px));\n }\n\n /**\n * TODO: these global styles should be componentized in https://leaflink.atlassian.net/browse/STASH-566\n */\n :global(.dropdown__list) {\n @apply tw-bg-white tw-list-none tw-m-1.5 tw-p-0;\n }\n\n :global(.dropdown__item) {\n @apply tw-block tw-mx-0 tw-mt-0 tw-mb-1.5 tw-w-full first:tw-mt-0 last:tw-mb-0;\n }\n\n :global(.dropdown__item) button {\n @apply tw-border-none tw-text-left tw-p-1.5;\n }\n\n :global(.dropdown__item) :where(a, button) {\n @apply tw-rounded\n tw-text-ice-700\n tw-block\n tw-py-[10px]\n tw-px-1.5\n tw-w-full\n disabled:tw-text-ice-500\n disabled:tw-cursor-default\n hover:tw-bg-ice-200\n hover:tw-text-ice-700\n hover:tw-no-underline\n tw-transition-all\n tw-duration-fast\n tw-ease-swing;\n }\n</style>\n"],"names":["contentRef","ref","dropdownRef","DEFAULT_ITEMS_LIST","items","itemIndex","isActive","styles","classes","useCssModule","watch","val","emit","next","prev","onMounted","props","target","getMountPoint","_a","_b","_c","dismiss","onBeforeUnmount","event","wasOpen","toggle","calculateOffset","onKeyDown","KEY_CODES","resetOffset","nextTick","toggleBCR","top","offset","overflow","calculateElementOverflow","direction","__expose","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0EQA,IAAaC,EAAwB,IAAI,GACzCC,IAAcD,EAA2B,IAAI,GAE7CE,IAAqB,CAAA,GAErBC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AO,UAAUD,IAAMC,EAAO;AAAA,MAAA,GAExC,MAAMH,EAAS;AAGX,YAAAI,IAAWC,EAAyBpC,KAAA,gBAAAA,EAAY,KAAK;AAE3D,UAAImC,GAAU;AACZ,cAAME,IAAYrB,EAAM,UAAU,SAAS,MAAM;AACjD,SAAAI,IAAApB,EAAW,UAAX,QAAAoB,EAAkB,MAAM,YAAY,YAAY,GAAGiB,IAAYF,EAAS;AAAA;AAAA,IAE5E;AAEa,WAAAG,EAAA;AAAA,MACX,UAAUC,EAAS,MAAMjC,EAAS,KAAK;AAAA,MACvC,QAAAoB;AAAA,MACA,SAAAJ;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../src/components/Dropdown/Dropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, nextTick, onBeforeUnmount, onMounted, ref, useCssModule, watch } from 'vue';\n\n import { KEY_CODES } from '../../constants';\n import vClickoutside from '../../directives/clickoutside/clickoutside';\n import calculateElementOverflow from '../../utils/calculateElementOverflow';\n import { getMountPoint } from '../../utils/helpers';\n import Icon from '../Icon/Icon.vue';\n\n export type DropdownOffset = {\n x?: number;\n y?: number;\n };\n\n export interface DropdownProps {\n /**\n * Used to position the dropdown relative to target\n * Options: left, right\n */\n align?: 'left' | 'right';\n /**\n * When passed, text with caret is displayed instead of default kebab menu.\n */\n label?: string;\n /**\n * If true, dropdown will remain open when clicking on its content. Otherwise, it'll close automatically on click.\n */\n closeManually?: boolean;\n /**\n * Used to horizontally and vertically offset the dropdown in pixels\n * Keep in mind, `x` value is relative to `align` value.\n */\n offset?: DropdownOffset;\n /**\n * If `reattach` is true, the contents will be mounted in the mount point container,\n * so as to circumvent clipping issues from a parent's overflow property.\n */\n reattach?: boolean;\n /**\n * Custom class to apply to the default dropdown content element\n */\n contentClass?: string | string[];\n /**\n * Removes content container's max width\n */\n fluidContent?: boolean;\n }\n\n type DropdownStyles = {\n left?: string;\n right?: string;\n top?: string;\n };\n\n defineOptions({\n name: 'll-dropdown',\n });\n\n const props = withDefaults(defineProps<DropdownProps>(), {\n align: 'right',\n label: '',\n closeManually: false,\n offset: () => ({}),\n reattach: true,\n contentClass: '',\n fluidContent: false,\n });\n\n const emit = defineEmits<{\n toggle: [isActive: boolean];\n dismiss: [];\n }>();\n\n const contentRef = ref<HTMLElement | null>(null);\n const dropdownRef = ref<HTMLDivElement | null>(null);\n\n const DEFAULT_ITEMS_LIST = [] as unknown as NodeListOf<Element>;\n\n const items = ref<NodeListOf<Element>>(DEFAULT_ITEMS_LIST);\n const itemIndex = ref(-1);\n const isActive = ref(false);\n\n const styles = ref<DropdownStyles>({});\n const classes = useCssModule();\n\n watch(isActive, (val) => {\n if (!val) {\n itemIndex.value = -1;\n }\n\n emit('toggle', val);\n });\n\n watch(itemIndex, (next, prev) => {\n next in items.value && items.value[next].classList.add('tw-bg-ice-200');\n prev in items.value && items.value[prev].classList.remove('tw-bg-ice-200');\n });\n\n onMounted(() => {\n if (props.reattach) {\n const target = getMountPoint();\n\n contentRef.value && target.appendChild(contentRef.value);\n }\n\n // if stash-menu exists, use it's items\n if (contentRef.value?.querySelector('.stash-menu')) {\n items.value = contentRef.value?.querySelectorAll('.stash-menu-item') ?? DEFAULT_ITEMS_LIST;\n } else {\n items.value = contentRef.value?.querySelectorAll('.dropdown__item') ?? DEFAULT_ITEMS_LIST;\n }\n\n // avoid calling dismiss with ResizeEvent because it's target is the Window element and it's not a valid Node element to be passed to dismiss\n window.addEventListener('resize', () => dismiss());\n });\n\n onBeforeUnmount(() => {\n window.removeEventListener('resize', () => dismiss());\n contentRef?.value?.parentNode?.removeChild(contentRef.value);\n });\n\n /**\n * Dismisses the Dropdown.\n */\n function dismiss(event?: Event) {\n if (\n props.closeManually &&\n (contentRef.value?.contains(event?.target as HTMLElement) || contentRef.value === event?.target)\n ) {\n return;\n }\n\n const wasOpen = isActive.value;\n\n isActive.value = false;\n\n if (wasOpen) {\n emit('dismiss');\n }\n }\n\n /**\n * Opens or closes the Dropdown. If opening, positions and focuses its content.\n */\n async function toggle() {\n if (isActive.value) {\n isActive.value = false;\n } else {\n isActive.value = true;\n await calculateOffset();\n contentRef.value?.focus();\n }\n }\n\n /**\n * Handles all user keyboard input on the Dropdown.\n * @param {KeyboardEvent} e The native keydown event.\n */\n function onKeyDown(e: KeyboardEvent) {\n if (e.keyCode === KEY_CODES.ESCAPE) {\n dismiss();\n } else if (e.keyCode === KEY_CODES.DOWN && itemIndex.value < items.value.length - 1) {\n isActive.value && itemIndex.value++;\n } else if (e.keyCode === KEY_CODES.UP && itemIndex.value > -1) {\n isActive.value && itemIndex.value--;\n } else if (e.keyCode === KEY_CODES.ENTER && itemIndex.value !== -1) {\n isActive.value && items[itemIndex.value].click();\n } else {\n return;\n }\n\n e.preventDefault(); // if keyDown did something / we didn't return\n }\n\n /**\n * Reset any page overflow offset\n */\n function resetOffset() {\n contentRef.value?.style.setProperty('--offset', '0');\n }\n\n /**\n * Calculate the position for the Dropdown content element,\n * relative to the viewport.\n * Repositions the dropdown content element (& arrow)\n * if it overflows the page (including gutter).\n */\n async function calculateOffset() {\n await nextTick();\n\n const toggleBCR = dropdownRef.value?.getBoundingClientRect() || ({} as DOMRect);\n const top = toggleBCR.top + toggleBCR.height;\n const offset = {\n x: 0,\n y: 0,\n ...props.offset,\n };\n\n if (props.reattach) {\n styles.value = {\n left: props.align === 'left' ? `${Math.round(toggleBCR.left) + offset.x}px` : undefined,\n right:\n props.align === 'right'\n ? `${document.documentElement.clientWidth - Math.round(toggleBCR.right) + offset.x}px`\n : undefined,\n top: `${window.scrollY + top + offset.y}px`,\n };\n await nextTick(); // wait for style updates to sync in the DOM\n }\n\n const overflow = calculateElementOverflow(contentRef?.value);\n\n if (overflow) {\n const direction = props.align === 'left' ? '-' : '';\n contentRef.value?.style.setProperty('--offset', `${direction}${overflow.value}`);\n }\n }\n\n defineExpose({\n isActive: computed(() => isActive.value),\n toggle,\n dismiss,\n });\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n v-clickoutside=\"dismiss\"\n class=\"tw-relative tw-inline-block\"\n data-test=\"ll-dropdown\"\n @keydown=\"onKeyDown\"\n >\n <!-- @slot Toggle component slot, receives `toggle` method to trigger Dropdown display -->\n <slot name=\"toggle\" :is-active=\"isActive\" :toggle=\"toggle\">\n <button\n data-test=\"button|toggle\"\n :aria-expanded=\"isActive\"\n :class=\"[label ? 'tw-min-w-auto tw-outline-none' : 'tw-rounded tw-p-3']\"\n @click=\"toggle\"\n >\n <span v-if=\"label\" class=\"tw-flex tw-items-center tw-font-medium tw-text-blue-500 hover:tw-text-blue-700\">\n {{ label }}\n <Icon name=\"caret-down\" />\n </span>\n <Icon v-else name=\"ellipsis\" />\n </button>\n </slot>\n\n <transition name=\"fade\" @after-leave=\"resetOffset\">\n <div\n v-show=\"isActive\"\n ref=\"contentRef\"\n data-test=\"ll-dropdown-content\"\n :class=\"[\n classes.content,\n contentClass,\n {\n 'tw-left-0 after:tw-left-6': props.align === 'left',\n 'tw-right-0': props.align === 'right',\n 'tw-max-w-[360px]': !props.fluidContent,\n },\n ]\"\n :style=\"styles\"\n >\n <!-- @slot Dropdown content slot. Receives `dismiss` method, to trigger manual close. You must call dismiss with parentheses. Receives `is-active` prop. -->\n <slot :dismiss=\"dismiss\" :is-active=\"isActive\"></slot>\n </div>\n </transition>\n </div>\n</template>\n\n<style module>\n .content {\n --offset: 0;\n\n @apply tw-shadow-2xl\n tw-bg-white\n tw-border\n tw-border-solid\n tw-border-blue-500\n tw-rounded\n tw-absolute\n tw-z-[301]\n tw-min-w-[200px];\n\n transform: translateX(calc(var(--offset) * 1px));\n }\n\n /**\n * TODO: these global styles should be componentized in https://leaflink.atlassian.net/browse/STASH-566\n */\n :global(.dropdown__list) {\n @apply tw-bg-white tw-list-none tw-m-1.5 tw-p-0;\n }\n\n :global(.dropdown__item) {\n @apply tw-block tw-mx-0 tw-mt-0 tw-mb-1.5 tw-w-full first:tw-mt-0 last:tw-mb-0;\n }\n\n :global(.dropdown__item) button {\n @apply tw-border-none tw-text-left tw-p-1.5;\n }\n\n :global(.dropdown__item) :where(a, button) {\n @apply tw-rounded\n tw-text-ice-700\n tw-block\n tw-py-[10px]\n tw-px-1.5\n tw-w-full\n disabled:tw-text-ice-500\n disabled:tw-cursor-default\n hover:tw-bg-ice-200\n hover:tw-text-ice-700\n hover:tw-no-underline\n tw-transition-all\n tw-duration-fast\n tw-ease-swing;\n }\n</style>\n"],"names":["props","__props","emit","__emit","contentRef","ref","dropdownRef","DEFAULT_ITEMS_LIST","items","itemIndex","isActive","styles","classes","useCssModule","watch","val","next","prev","onMounted","target","getMountPoint","_a","_b","_c","dismiss","onBeforeUnmount","event","wasOpen","toggle","calculateOffset","onKeyDown","KEY_CODES","resetOffset","nextTick","toggleBCR","top","offset","overflow","calculateElementOverflow","direction","__expose","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DE,UAAMA,IAAQC,GAURC,IAAOC,GAKPC,IAAaC,EAAwB,IAAI,GACzCC,IAAcD,EAA2B,IAAI,GAE7CE,IAAqB,CAAA,GAErBC,IAAQH,EAAyBE,CAAkB,GACnDE,IAAYJ,EAAI,EAAE,GAClBK,IAAWL,EAAI,EAAK,GAEpBM,IAASN,EAAoB,CAAA,CAAE,GAC/BO,IAAUC;AAEV,IAAAC,EAAAJ,GAAU,CAACK,MAAQ;AACvB,MAAKA,MACHN,EAAU,QAAQ,KAGpBP,EAAK,UAAUa,CAAG;AAAA,IAAA,CACnB,GAEKD,EAAAL,GAAW,CAACO,GAAMC,MAAS;AACvB,MAAAD,KAAAR,EAAM,SAASA,EAAM,MAAMQ,CAAI,EAAE,UAAU,IAAI,eAAe,GAC9DC,KAAAT,EAAM,SAASA,EAAM,MAAMS,CAAI,EAAE,UAAU,OAAO,eAAe;AAAA,IAAA,CAC1E,GAEDC,EAAU,MAAM;;AACd,UAAIl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;;;;"}
@@ -1,11 +1,10 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { ComponentCustomProps } from 'vue';
3
1
  import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import { ComputedRef } from 'vue';
5
4
  import { DefineComponent } from 'vue';
6
5
  import { ExtractPropTypes } from 'vue';
7
6
  import { PropType } from 'vue';
8
- import { VNodeProps } from 'vue';
7
+ import { PublicProps } from 'vue';
9
8
 
10
9
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
10
 
@@ -34,7 +33,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
34
33
  };
35
34
  };
36
35
 
37
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DropdownProps>, {
36
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DropdownProps>, {
38
37
  align: string;
39
38
  label: string;
40
39
  closeManually: boolean;
@@ -42,14 +41,14 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
42
41
  reattach: boolean;
43
42
  contentClass: string;
44
43
  fluidContent: boolean;
45
- }>, {
44
+ }>>, {
46
45
  isActive: ComputedRef<boolean>;
47
46
  toggle: typeof toggle;
48
47
  dismiss: typeof dismiss;
49
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
48
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
50
49
  toggle: (isActive: boolean) => void;
51
50
  dismiss: () => void;
52
- }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DropdownProps>, {
51
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DropdownProps>, {
53
52
  align: string;
54
53
  label: string;
55
54
  closeManually: boolean;
@@ -57,10 +56,10 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
57
56
  reattach: boolean;
58
57
  contentClass: string;
59
58
  fluidContent: boolean;
60
- }>>> & {
59
+ }>>> & Readonly<{
61
60
  onToggle?: ((isActive: boolean) => any) | undefined;
62
61
  onDismiss?: (() => any) | undefined;
63
- }, {
62
+ }>, {
64
63
  label: string;
65
64
  align: "left" | "right";
66
65
  closeManually: boolean;
@@ -68,7 +67,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
68
67
  reattach: boolean;
69
68
  contentClass: string | string[];
70
69
  fluidContent: boolean;
71
- }, {}>, {
70
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
72
71
  toggle?(_: {
73
72
  isActive: boolean;
74
73
  toggle: typeof toggle;
@@ -1,4 +1,4 @@
1
- import { defineComponent as d, useCssModule as f, useSlots as y, openBlock as l, createElementBlock as a, unref as e, createBlock as _, createCommentVNode as m, createElementVNode as u, renderSlot as i, toDisplayString as r, normalizeClass as n, createTextVNode as w } from "vue";
1
+ import { defineComponent as d, useCssModule as f, useSlots as y, openBlock as s, createElementBlock as l, createBlock as _, createCommentVNode as i, createElementVNode as u, renderSlot as o, toDisplayString as m, normalizeClass as r, unref as n, createTextVNode as w } from "vue";
2
2
  import { t as g } from "./locale.js";
3
3
  import { _ as b } from "./Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js";
4
4
  import { s as x } from "./EmptyState.vue_used_vue_type_style_index_0_lang.module-f5d89366.js";
@@ -27,43 +27,43 @@ const k = {
27
27
  vignette: { default: void 0 }
28
28
  },
29
29
  setup(p) {
30
- const t = p, c = f(), s = y();
31
- return (o, B) => (l(), a("div", k, [
32
- t.title || e(s).title || t.subtitle || e(s).subtitle || t.vignette ? (l(), a("div", v, [
33
- t.vignette ? (l(), _(b, {
30
+ const t = p, c = f(), e = y();
31
+ return (a, B) => (s(), l("div", k, [
32
+ t.title || e.title || t.subtitle || e.subtitle || t.vignette ? (s(), l("div", v, [
33
+ t.vignette ? (s(), _(b, {
34
34
  key: 0,
35
35
  "data-test": "stash-empty-state|illustration",
36
36
  type: "vignette",
37
37
  class: "tw-mx-3",
38
38
  name: t.vignette,
39
39
  size: 300
40
- }, null, 8, ["name"])) : m("", !0),
40
+ }, null, 8, ["name"])) : i("", !0),
41
41
  u("section", null, [
42
- i(o.$slots, "title", {}, () => [
43
- u("h3", S, r(t.title), 1)
42
+ o(a.$slots, "title", {}, () => [
43
+ u("h3", S, m(t.title), 1)
44
44
  ]),
45
- i(o.$slots, "subtitle", {}, () => [
46
- t.subtitle || e(s).subtitle ? (l(), a("p", {
45
+ o(a.$slots, "subtitle", {}, () => [
46
+ t.subtitle || e.subtitle ? (s(), l("p", {
47
47
  key: 0,
48
- class: n({ " tw-mb-8": e(s).button, "tw-mb-0": !e(s).button })
49
- }, r(t.subtitle), 3)) : m("", !0)
48
+ class: r({ " tw-mb-8": e.button, "tw-mb-0": !e.button })
49
+ }, m(t.subtitle), 3)) : i("", !0)
50
50
  ]),
51
- i(o.$slots, "button")
51
+ o(a.$slots, "button")
52
52
  ])
53
- ])) : (l(), a("div", {
53
+ ])) : (s(), l("div", {
54
54
  key: 1,
55
- class: n(["tw-mx-auto tw-my-0 tw-flex tw-items-center tw-justify-center tw-py-12", [e(c).root, { "tw-text-center": !t.image.src && !e(s).image }]])
55
+ class: r(["tw-mx-auto tw-my-0 tw-flex tw-items-center tw-justify-center tw-py-12", [n(c).root, { "tw-text-center": !t.image.src && !e.image }]])
56
56
  }, [
57
- i(o.$slots, "image", {}, () => [
58
- t.image.src ? (l(), a("img", {
57
+ o(a.$slots, "image", {}, () => [
58
+ t.image.src ? (s(), l("img", {
59
59
  key: 0,
60
- class: n(["tw-mr-6", e(c).image]),
60
+ class: r(["tw-mr-6", n(c).image]),
61
61
  alt: t.image.alt,
62
62
  src: t.image.src,
63
63
  "data-test": "stash-empty-state__img"
64
- }, null, 10, $)) : m("", !0)
64
+ }, null, 10, $)) : i("", !0)
65
65
  ]),
66
- w(" " + r(t.text || e(g)("ll.emptyState.noResults")), 1)
66
+ w(" " + m(t.text || n(g)("ll.emptyState.noResults")), 1)
67
67
  ], 2))
68
68
  ]));
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.js","sources":["../src/components/EmptyState/EmptyState.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import { VignetteNames } from '../Illustration/Illustration.models';\n import Illustration from '../Illustration/Illustration.vue';\n\n export interface EmptyStateProps {\n /**\n * @deprecated Use illustration instead.\n */\n image?: {\n alt?: string;\n src: string;\n };\n\n /**\n * @deprecated Use title instead.\n */\n text?: string;\n\n /**\n * the title text of the empty state\n */\n title?: string;\n\n /**\n * the subtitle text of the empty state\n */\n subtitle?: string;\n\n /**\n * The name of the vignette illustration to render\n */\n vignette?: VignetteNames;\n }\n\n export interface EmptyStateSlots {\n title?: void;\n subtitle?: void;\n button?: void;\n image?: void;\n }\n\n defineOptions({\n name: 'll-empty-state',\n });\n\n const props = withDefaults(defineProps<EmptyStateProps>(), {\n /**\n * An optional image to render\n */\n image: () => ({\n alt: '',\n src: '',\n }),\n\n /**\n * The custom message to render\n */\n text: '',\n\n title: '',\n subtitle: '',\n vignette: undefined,\n });\n\n const classes = useCssModule();\n const slots = defineSlots<EmptyStateSlots>();\n</script>\n\n<template>\n <div key=\"empty\" class=\"stash-empty-state\" data-test=\"stash-empty-state\">\n <template v-if=\"props.title || slots.title || props.subtitle || slots.subtitle || props.vignette\">\n <div class=\"tw-flex tw-flex-col tw-items-center tw-text-center md:tw-flex-row md:tw-text-left\">\n <Illustration\n v-if=\"props.vignette\"\n data-test=\"stash-empty-state|illustration\"\n type=\"vignette\"\n class=\"tw-mx-3\"\n :name=\"props.vignette\"\n :size=\"300\"\n />\n <section>\n <slot name=\"title\">\n <h3 class=\"tw-mb-1.5\">\n {{ props.title }}\n </h3>\n </slot>\n\n <slot name=\"subtitle\">\n <p v-if=\"props.subtitle || slots.subtitle\" :class=\"{ ' tw-mb-8': slots.button, 'tw-mb-0': !slots.button }\">\n {{ props.subtitle }}\n </p>\n </slot>\n\n <slot name=\"button\"></slot>\n </section>\n </div>\n </template>\n\n <template v-else>\n <div\n class=\"tw-mx-auto tw-my-0 tw-flex tw-items-center tw-justify-center tw-py-12\"\n :class=\"[classes.root, { 'tw-text-center': !props.image.src && !slots.image }]\"\n >\n <slot name=\"image\">\n <img\n v-if=\"props.image.src\"\n class=\"tw-mr-6\"\n :alt=\"props.image.alt\"\n :class=\"classes.image\"\n :src=\"props.image.src\"\n data-test=\"stash-empty-state__img\"\n />\n </slot>\n\n {{ props.text || t('ll.emptyState.noResults') }}\n </div>\n </template>\n </div>\n</template>\n\n<style module>\n .root {\n max-width: 600px;\n }\n\n .image {\n max-width: 60px;\n }\n</style>\n"],"names":["classes","useCssModule","slots","_useSlots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmEQA,IAAUC,KACVC,IAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"EmptyState.js","sources":["../src/components/EmptyState/EmptyState.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import { VignetteNames } from '../Illustration/Illustration.models';\n import Illustration from '../Illustration/Illustration.vue';\n\n export interface EmptyStateProps {\n /**\n * @deprecated Use illustration instead.\n */\n image?: {\n alt?: string;\n src: string;\n };\n\n /**\n * @deprecated Use title instead.\n */\n text?: string;\n\n /**\n * the title text of the empty state\n */\n title?: string;\n\n /**\n * the subtitle text of the empty state\n */\n subtitle?: string;\n\n /**\n * The name of the vignette illustration to render\n */\n vignette?: VignetteNames;\n }\n\n export interface EmptyStateSlots {\n title?: void;\n subtitle?: void;\n button?: void;\n image?: void;\n }\n\n defineOptions({\n name: 'll-empty-state',\n });\n\n const props = withDefaults(defineProps<EmptyStateProps>(), {\n /**\n * An optional image to render\n */\n image: () => ({\n alt: '',\n src: '',\n }),\n\n /**\n * The custom message to render\n */\n text: '',\n\n title: '',\n subtitle: '',\n vignette: undefined,\n });\n\n const classes = useCssModule();\n const slots = defineSlots<EmptyStateSlots>();\n</script>\n\n<template>\n <div key=\"empty\" class=\"stash-empty-state\" data-test=\"stash-empty-state\">\n <template v-if=\"props.title || slots.title || props.subtitle || slots.subtitle || props.vignette\">\n <div class=\"tw-flex tw-flex-col tw-items-center tw-text-center md:tw-flex-row md:tw-text-left\">\n <Illustration\n v-if=\"props.vignette\"\n data-test=\"stash-empty-state|illustration\"\n type=\"vignette\"\n class=\"tw-mx-3\"\n :name=\"props.vignette\"\n :size=\"300\"\n />\n <section>\n <slot name=\"title\">\n <h3 class=\"tw-mb-1.5\">\n {{ props.title }}\n </h3>\n </slot>\n\n <slot name=\"subtitle\">\n <p v-if=\"props.subtitle || slots.subtitle\" :class=\"{ ' tw-mb-8': slots.button, 'tw-mb-0': !slots.button }\">\n {{ props.subtitle }}\n </p>\n </slot>\n\n <slot name=\"button\"></slot>\n </section>\n </div>\n </template>\n\n <template v-else>\n <div\n class=\"tw-mx-auto tw-my-0 tw-flex tw-items-center tw-justify-center tw-py-12\"\n :class=\"[classes.root, { 'tw-text-center': !props.image.src && !slots.image }]\"\n >\n <slot name=\"image\">\n <img\n v-if=\"props.image.src\"\n class=\"tw-mr-6\"\n :alt=\"props.image.alt\"\n :class=\"classes.image\"\n :src=\"props.image.src\"\n data-test=\"stash-empty-state__img\"\n />\n </slot>\n\n {{ props.text || t('ll.emptyState.noResults') }}\n </div>\n </template>\n </div>\n</template>\n\n<style module>\n .root {\n max-width: 600px;\n }\n\n .image {\n max-width: 60px;\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","slots","_useSlots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDE,UAAMA,IAAQC,GAmBRC,IAAUC,KACVC,IAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,9 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { ComponentCustomProps } from 'vue';
3
1
  import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import { DefineComponent } from 'vue';
5
4
  import { ExtractPropTypes } from 'vue';
6
5
  import { PropType } from 'vue';
7
- import { VNodeProps } from 'vue';
6
+ import { PublicProps } from 'vue';
8
7
 
9
8
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
9
 
@@ -33,7 +32,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
33
32
  };
34
33
  };
35
34
 
36
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EmptyStateProps>, {
35
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EmptyStateProps>, {
37
36
  /**
38
37
  * An optional image to render
39
38
  */
@@ -48,7 +47,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
48
47
  title: string;
49
48
  subtitle: string;
50
49
  vignette: undefined;
51
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EmptyStateProps>, {
50
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EmptyStateProps>, {
52
51
  /**
53
52
  * An optional image to render
54
53
  */
@@ -63,7 +62,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
63
62
  title: string;
64
63
  subtitle: string;
65
64
  vignette: undefined;
66
- }>>>, {
65
+ }>>> & Readonly<{}>, {
67
66
  title: string;
68
67
  image: {
69
68
  alt?: string | undefined;
@@ -72,7 +71,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
72
71
  text: string;
73
72
  subtitle: string;
74
73
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "messages" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
75
- }, {}>, Readonly<EmptyStateSlots>>;
74
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, Readonly<EmptyStateSlots> & EmptyStateSlots>;
76
75
  export default _default;
77
76
 
78
77
  export declare interface EmptyStateProps {
package/dist/Expand.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as m } from "./Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js";
1
+ import { _ as m } from "./Expand.vue_vue_type_script_setup_true_lang-0f236267.js";
2
2
  import "vue";
3
3
  export {
4
4
  m as default
@@ -1,10 +1,9 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { ComponentCustomProps } from 'vue';
3
1
  import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import { DefineComponent } from 'vue';
5
4
  import { ExtractPropTypes } from 'vue';
6
5
  import { PropType } from 'vue';
7
- import { VNodeProps } from 'vue';
6
+ import { PublicProps } from 'vue';
8
7
 
9
8
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
9
 
@@ -33,26 +32,26 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
33
32
  };
34
33
  };
35
34
 
36
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExpandProps>, {
35
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExpandProps>, {
37
36
  is: string;
38
37
  isExpanded: boolean;
39
38
  isLazy: boolean;
40
39
  transitionName: string;
41
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
40
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
42
41
  "after-expand": () => void;
43
- }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExpandProps>, {
42
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExpandProps>, {
44
43
  is: string;
45
44
  isExpanded: boolean;
46
45
  isLazy: boolean;
47
46
  transitionName: string;
48
- }>>> & {
47
+ }>>> & Readonly<{
49
48
  "onAfter-expand"?: (() => any) | undefined;
50
- }, {
49
+ }>, {
51
50
  is: ExpandOuterElement;
52
51
  isExpanded: boolean;
53
52
  isLazy: boolean;
54
53
  transitionName: string;
55
- }, {}>, {
54
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
56
55
  default?(_: {}): any;
57
56
  }>;
58
57
  export default _default;
@@ -1,5 +1,5 @@
1
- import { defineComponent as y, ref as c, onMounted as u, openBlock as s, createBlock as x, resolveDynamicComponent as v, normalizeClass as m, withCtx as i, createVNode as E, Transition as g, createElementBlock as n, Fragment as k, renderSlot as d, createCommentVNode as w, withDirectives as C, vShow as B } from "vue";
2
- const $ = /* @__PURE__ */ y({
1
+ import { defineComponent as c, ref as u, onMounted as x, openBlock as s, createBlock as m, resolveDynamicComponent as v, normalizeClass as E, withCtx as i, createVNode as g, Transition as k, createElementBlock as n, Fragment as w, renderSlot as d, createCommentVNode as C, withDirectives as B, vShow as N } from "vue";
2
+ const z = /* @__PURE__ */ c({
3
3
  name: "ll-expand",
4
4
  __name: "Expand",
5
5
  props: {
@@ -10,55 +10,55 @@ const $ = /* @__PURE__ */ y({
10
10
  },
11
11
  emits: ["after-expand"],
12
12
  setup(l, { emit: r }) {
13
- const o = l, t = c(null);
14
- u(() => {
13
+ const o = l, p = r, t = u(null);
14
+ x(() => {
15
15
  !o.isExpanded && t.value && (t.value.style.overflow = "hidden");
16
16
  });
17
- const p = (e) => {
17
+ const f = (e) => {
18
18
  e.style.visibility = "hidden", e.style.height = "auto";
19
19
  const a = e.offsetHeight;
20
20
  e.style.visibility = "", e.style.display = "", e.style.height = 0, requestAnimationFrame(() => {
21
21
  e.style.height = `${a}px`;
22
22
  });
23
- }, f = (e) => {
24
- e.style.height = "", e.style.overflow = "", r("after-expand");
25
23
  }, h = (e) => {
24
+ e.style.height = "", e.style.overflow = "", p("after-expand");
25
+ }, y = (e) => {
26
26
  const a = e.offsetHeight;
27
27
  e.style.height = `${a}px`, e.style.overflow = "hidden", requestAnimationFrame(() => {
28
28
  e.style.height = 0;
29
29
  });
30
30
  };
31
- return (e, a) => (s(), x(v(o.is), {
32
- class: m(["stash-expand", {
31
+ return (e, a) => (s(), m(v(o.is), {
32
+ class: E(["stash-expand", {
33
33
  "stash-expand--expanded": e.isExpanded,
34
34
  "stash-expand--collapsed": !e.isExpanded
35
35
  }]),
36
36
  "data-test": "stash-expand"
37
37
  }, {
38
38
  default: i(() => [
39
- E(g, {
39
+ g(k, {
40
40
  name: e.transitionName,
41
- onAfterEnter: f,
42
- onEnter: p,
43
- onLeave: h
41
+ onAfterEnter: h,
42
+ onEnter: f,
43
+ onLeave: y
44
44
  }, {
45
45
  default: i(() => [
46
- e.isLazy ? (s(), n(k, { key: 0 }, [
46
+ e.isLazy ? (s(), n(w, { key: 0 }, [
47
47
  e.isExpanded ? (s(), n("div", {
48
48
  key: 0,
49
49
  ref_key: "contentRef",
50
50
  ref: t
51
51
  }, [
52
52
  d(e.$slots, "default")
53
- ], 512)) : w("", !0)
54
- ], 64)) : C((s(), n("div", {
53
+ ], 512)) : C("", !0)
54
+ ], 64)) : B((s(), n("div", {
55
55
  key: 1,
56
56
  ref_key: "contentRef",
57
57
  ref: t
58
58
  }, [
59
59
  d(e.$slots, "default")
60
60
  ], 512)), [
61
- [B, e.isExpanded]
61
+ [N, e.isExpanded]
62
62
  ])
63
63
  ]),
64
64
  _: 3
@@ -69,6 +69,6 @@ const $ = /* @__PURE__ */ y({
69
69
  }
70
70
  });
71
71
  export {
72
- $ as _
72
+ z as _
73
73
  };
74
- //# sourceMappingURL=Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map
74
+ //# sourceMappingURL=Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Expand.vue_vue_type_script_setup_true_lang-0f236267.js","sources":["../src/components/Expand/Expand.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { onMounted, ref } from 'vue';\n\n defineOptions({\n name: 'll-expand',\n });\n\n export type ExpandOuterElement = 'div' | 'td' | 'li';\n\n export interface ExpandProps {\n /**\n * The root element to use as the root element the expand transition gets applied to\n */\n is?: ExpandOuterElement;\n\n /**\n * Dictates whether the content is expanded or collapsed\n */\n isExpanded?: boolean;\n\n /**\n * Whether to only render content on expand\n */\n isLazy?: boolean;\n\n /**\n * The name of the transition to pass to the transition component\n * @see: https://vuejs.org/guide/built-ins/transition.html#css-based-transitions\n */\n transitionName?: string;\n }\n\n const props = withDefaults(defineProps<ExpandProps>(), {\n is: 'div',\n isExpanded: false,\n isLazy: false,\n transitionName: 'expand',\n });\n\n const emit = defineEmits<{\n (e: 'after-expand'): void;\n }>();\n\n const contentRef = ref<HTMLElement | null>(null);\n\n onMounted(() => {\n if (!props.isExpanded && contentRef.value) {\n contentRef.value.style.overflow = 'hidden';\n }\n });\n\n /**\n * Expands the element\n * @param {object} element - the element being expanded\n * @returns {void}\n */\n const onExpand = (element) => {\n // Trick to calculate the height of the hidden element\n element.style.visibility = 'hidden';\n element.style.height = 'auto';\n\n const height = element.offsetHeight;\n\n // Restore default styling\n element.style.visibility = '';\n element.style.display = '';\n\n // Set height on the element to zero\n element.style.height = 0;\n\n // Set expanded height after the other height change takes affect\n requestAnimationFrame(() => {\n element.style.height = `${height}px`;\n });\n };\n\n /**\n * Resores default styling after the expand animation is completed\n * @param {object} element - the element being expanded\n * @returns {void}\n */\n const afterExpand = (element) => {\n element.style.height = '';\n element.style.overflow = '';\n emit('after-expand');\n };\n\n /**\n * Collapses the element\n * @param {object} element - the element being expanded\n * @returns {void}\n */\n const onCollapse = (element) => {\n const height = element.offsetHeight;\n\n // Set height to the expanded height\n element.style.height = `${height}px`;\n element.style.overflow = 'hidden';\n\n // Set height to zero after the other height change takes affect\n requestAnimationFrame(() => {\n element.style.height = 0;\n });\n };\n</script>\n\n<template>\n <component\n :is=\"props.is\"\n class=\"stash-expand\"\n data-test=\"stash-expand\"\n :class=\"{\n 'stash-expand--expanded': isExpanded,\n 'stash-expand--collapsed': !isExpanded,\n }\"\n >\n <transition :name=\"transitionName\" @after-enter=\"afterExpand\" @enter=\"onExpand\" @leave=\"onCollapse\">\n <template v-if=\"isLazy\">\n <div v-if=\"isExpanded\" ref=\"contentRef\">\n <slot></slot>\n </div>\n </template>\n <template v-else>\n <div v-show=\"isExpanded\" ref=\"contentRef\">\n <slot></slot>\n </div>\n </template>\n </transition>\n </component>\n</template>\n"],"names":["props","__props","emit","__emit","contentRef","ref","onMounted","onExpand","element","height","afterExpand","onCollapse"],"mappings":";;;;;;;;;;;;AAgCE,UAAMA,IAAQC,GAORC,IAAOC,GAIPC,IAAaC,EAAwB,IAAI;AAE/C,IAAAC,EAAU,MAAM;AACd,MAAI,CAACN,EAAM,cAAcI,EAAW,UACvBA,EAAA,MAAM,MAAM,WAAW;AAAA,IACpC,CACD;AAOK,UAAAG,IAAW,CAACC,MAAY;AAE5B,MAAAA,EAAQ,MAAM,aAAa,UAC3BA,EAAQ,MAAM,SAAS;AAEvB,YAAMC,IAASD,EAAQ;AAGvB,MAAAA,EAAQ,MAAM,aAAa,IAC3BA,EAAQ,MAAM,UAAU,IAGxBA,EAAQ,MAAM,SAAS,GAGvB,sBAAsB,MAAM;AAClB,QAAAA,EAAA,MAAM,SAAS,GAAGC;AAAA,MAAA,CAC3B;AAAA,IAAA,GAQGC,IAAc,CAACF,MAAY;AAC/B,MAAAA,EAAQ,MAAM,SAAS,IACvBA,EAAQ,MAAM,WAAW,IACzBN,EAAK,cAAc;AAAA,IAAA,GAQfS,IAAa,CAACH,MAAY;AAC9B,YAAMC,IAASD,EAAQ;AAGf,MAAAA,EAAA,MAAM,SAAS,GAAGC,OAC1BD,EAAQ,MAAM,WAAW,UAGzB,sBAAsB,MAAM;AAC1B,QAAAA,EAAQ,MAAM,SAAS;AAAA,MAAA,CACxB;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}