@oneb/ui-vue 0.3.32 → 0.4.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 (226) hide show
  1. package/dist/ChevronLeftIcon-7505e081.cjs +1 -0
  2. package/dist/ChevronLeftIcon-bb9adb5b.js +20 -0
  3. package/dist/ChevronRightIcon-2992cf0d.cjs +1 -0
  4. package/dist/ChevronRightIcon-b0585768.js +20 -0
  5. package/dist/ChevronUpIcon-64a673e1.cjs +1 -0
  6. package/dist/{ChevronRightIcon-4549a26b.js → ChevronUpIcon-c43f27a9.js} +2 -19
  7. package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
  8. package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
  9. package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js +79 -0
  10. package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +1 -0
  11. package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-b89117e7.js +521 -0
  12. package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-f6f7cd96.cjs +1 -0
  13. package/dist/OneHelpMenu-6ec63535.cjs +1 -0
  14. package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-d5182c78.js} +118 -213
  15. package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-05266fc3.cjs +1 -0
  16. package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-bb2219c7.js +18 -0
  17. package/dist/OneModal-02a9a173.js +189 -0
  18. package/dist/OneModal-0e92c039.cjs +1 -0
  19. package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-c492c128.js +25 -0
  20. package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-e83a81ea.cjs +1 -0
  21. package/dist/SpinnerIcon-01be39fe.cjs +1 -0
  22. package/dist/{SpinnerIcon-74648c98.js → SpinnerIcon-516264ba.js} +5 -6
  23. package/dist/button/index.cjs +1 -1
  24. package/dist/button/index.d.ts +1 -1
  25. package/dist/button/index.js +3 -4
  26. package/dist/checkbox/checkbox.d.ts +5 -0
  27. package/dist/checkbox/index.cjs +1 -1
  28. package/dist/checkbox/index.js +40 -34
  29. package/dist/chips/OneChips.vue.d.ts +2 -0
  30. package/dist/chips/chips.d.ts +25 -0
  31. package/dist/chips/index.cjs +1 -0
  32. package/dist/chips/index.d.ts +3 -0
  33. package/dist/chips/index.js +62 -0
  34. package/dist/clipboard-494e1513.cjs +1 -0
  35. package/dist/clipboard-733b79a1.js +22 -0
  36. package/dist/common/OneDetailsList.vue.d.ts +2 -0
  37. package/dist/common/OneDetailsRow.vue.d.ts +2 -0
  38. package/dist/common/index.cjs +1 -1
  39. package/dist/common/index.d.ts +2 -0
  40. package/dist/common/index.js +68 -16
  41. package/dist/composables/index.cjs +1 -0
  42. package/dist/composables/index.d.ts +18 -0
  43. package/dist/composables/index.js +91 -0
  44. package/dist/composables/useAsyncMethod.d.ts +17 -0
  45. package/dist/composables/useAsyncSelect.d.ts +26 -0
  46. package/dist/composables/useConfirm.d.ts +27 -0
  47. package/dist/composables/useCursorList.d.ts +42 -0
  48. package/dist/composables/useDebouncedRef.d.ts +6 -0
  49. package/dist/composables/useFileUpload.d.ts +21 -0
  50. package/dist/composables/useFormSubmit.d.ts +23 -0
  51. package/dist/composables/useIsMobile.d.ts +8 -0
  52. package/dist/confirm/OneConfirmHost.vue.d.ts +2 -0
  53. package/dist/confirm/confirm.d.ts +10 -0
  54. package/dist/confirm/index.cjs +1 -0
  55. package/dist/confirm/index.d.ts +5 -0
  56. package/dist/confirm/index.js +59 -0
  57. package/dist/cursorList/OneCursorList.vue.d.ts +2 -0
  58. package/dist/cursorList/index.cjs +1 -0
  59. package/dist/cursorList/index.d.ts +3 -0
  60. package/dist/cursorList/index.js +78 -0
  61. package/dist/dataTable/index.cjs +1 -1
  62. package/dist/dataTable/index.js +256 -301
  63. package/dist/dateTime/OneDateTime.vue.d.ts +2 -0
  64. package/dist/dateTime/dateTime.d.ts +43 -0
  65. package/dist/dateTime/index.cjs +1 -0
  66. package/dist/dateTime/index.d.ts +3 -0
  67. package/dist/dateTime/index.js +66 -0
  68. package/dist/dropdown/index.cjs +1 -1
  69. package/dist/dropdown/index.js +302 -376
  70. package/dist/dropdown-5cb64ab7.cjs +1 -0
  71. package/dist/dropdown-c81fb945.js +101 -0
  72. package/dist/entityPicker/index.cjs +1 -1
  73. package/dist/entityPicker/index.js +57 -57
  74. package/dist/entityPicker/useEntityModal.d.ts +7 -3
  75. package/dist/errorsPage/OneCrashScreen.vue.d.ts +2 -0
  76. package/dist/errorsPage/OneErrorHero.vue.d.ts +2 -0
  77. package/dist/errorsPage/OneNotFoundPage.vue.d.ts +2 -0
  78. package/dist/errorsPage/OneServerErrorPage.vue.d.ts +2 -0
  79. package/dist/errorsPage/OneSnakeGame.vue.d.ts +2 -0
  80. package/dist/errorsPage/createAppErrorHandler.d.ts +24 -0
  81. package/dist/errorsPage/errorsType.d.ts +5 -0
  82. package/dist/errorsPage/index.cjs +1 -1
  83. package/dist/errorsPage/index.d.ts +8 -0
  84. package/dist/errorsPage/index.js +557 -28
  85. package/dist/errorsPage/useCrashState.d.ts +10 -0
  86. package/dist/fileUpload/OneDropzone.vue.d.ts +2 -0
  87. package/dist/fileUpload/OneFileUpload.vue.d.ts +2 -0
  88. package/dist/fileUpload/fileUpload.d.ts +17 -0
  89. package/dist/fileUpload/index.cjs +1 -0
  90. package/dist/fileUpload/index.d.ts +6 -0
  91. package/dist/fileUpload/index.js +228 -0
  92. package/dist/filterBuilder/OneFilterBuilder.vue.d.ts +2 -0
  93. package/dist/filterBuilder/OneFilterGroup.vue.d.ts +2 -0
  94. package/dist/filterBuilder/OneFilterRule.vue.d.ts +2 -0
  95. package/dist/filterBuilder/filterBuilder.d.ts +17 -0
  96. package/dist/filterBuilder/index.cjs +1 -0
  97. package/dist/filterBuilder/index.d.ts +5 -0
  98. package/dist/filterBuilder/index.js +257 -0
  99. package/dist/form/form.d.ts +1 -1
  100. package/dist/form/index.cjs +1 -1
  101. package/dist/form/index.js +66 -574
  102. package/dist/i18n/index.cjs +1 -1
  103. package/dist/i18n/index.js +99 -15
  104. package/dist/index.cjs +1 -1
  105. package/dist/index.d.ts +18 -0
  106. package/dist/index.js +242 -104
  107. package/dist/indicators/OneStatCard.vue.d.ts +2 -0
  108. package/dist/indicators/index.cjs +1 -1
  109. package/dist/indicators/index.d.ts +1 -0
  110. package/dist/indicators/index.js +66 -29
  111. package/dist/label/index.cjs +1 -1
  112. package/dist/label/index.js +5 -5
  113. package/dist/layout/OneAuthLayout.vue.d.ts +2 -0
  114. package/dist/layout/OneBackButton.vue.d.ts +2 -0
  115. package/dist/layout/OneBreadcrumbs.vue.d.ts +2 -0
  116. package/dist/layout/OneEmptyLayout.vue.d.ts +6 -0
  117. package/dist/layout/OneGridLayout.vue.d.ts +2 -0
  118. package/dist/layout/index.cjs +1 -1
  119. package/dist/layout/index.d.ts +6 -1
  120. package/dist/layout/index.js +1057 -765
  121. package/dist/layout/layout.d.ts +11 -0
  122. package/dist/modal/OneModalHost.vue.d.ts +2 -0
  123. package/dist/modal/index.cjs +1 -1
  124. package/dist/modal/index.d.ts +3 -0
  125. package/dist/modal/index.js +84 -27
  126. package/dist/modal/modal.d.ts +9 -0
  127. package/dist/modal/useModalStack.d.ts +20 -0
  128. package/dist/notifications/OneNotificationItem.vue.d.ts +2 -0
  129. package/dist/notifications/OneNotificationsBell.vue.d.ts +2 -0
  130. package/dist/notifications/OneNotificationsPanel.vue.d.ts +2 -0
  131. package/dist/notifications/index.cjs +1 -0
  132. package/dist/notifications/index.d.ts +7 -0
  133. package/dist/notifications/index.js +477 -0
  134. package/dist/notifications/notifications.d.ts +53 -0
  135. package/dist/notifications/useNotifyfeed.d.ts +32 -0
  136. package/dist/periodPicker/index.cjs +1 -1
  137. package/dist/periodPicker/index.js +126 -139
  138. package/dist/popover/OnePopover.vue.d.ts +2 -0
  139. package/dist/popover/index.cjs +1 -0
  140. package/dist/popover/index.d.ts +3 -0
  141. package/dist/popover/index.js +102 -0
  142. package/dist/popover/popover.d.ts +31 -0
  143. package/dist/progress/OneProgress.vue.d.ts +2 -0
  144. package/dist/progress/index.cjs +1 -0
  145. package/dist/progress/index.d.ts +3 -0
  146. package/dist/progress/index.js +74 -0
  147. package/dist/progress/progress.d.ts +32 -0
  148. package/dist/searchInput/OneSearchInput.vue.d.ts +2 -0
  149. package/dist/searchInput/index.cjs +1 -0
  150. package/dist/searchInput/index.d.ts +3 -0
  151. package/dist/searchInput/index.js +103 -0
  152. package/dist/searchInput/searchInput.d.ts +39 -0
  153. package/dist/settings/OneSettingsLayout.vue.d.ts +2 -0
  154. package/dist/settings/OneSettingsRow.vue.d.ts +2 -0
  155. package/dist/settings/OneSettingsSection.vue.d.ts +2 -0
  156. package/dist/settings/index.cjs +1 -0
  157. package/dist/settings/index.d.ts +4 -0
  158. package/dist/settings/index.js +116 -0
  159. package/dist/spinner/OneSpinner.vue.d.ts +2 -0
  160. package/dist/spinner/index.cjs +1 -0
  161. package/dist/spinner/index.d.ts +3 -0
  162. package/dist/spinner/index.js +30 -0
  163. package/dist/spinner/spinner.d.ts +10 -0
  164. package/dist/stageBadge/index.cjs +1 -1
  165. package/dist/stageBadge/index.js +18 -16
  166. package/dist/stepper/OneStepper.vue.d.ts +2 -0
  167. package/dist/stepper/index.cjs +1 -0
  168. package/dist/stepper/index.d.ts +3 -0
  169. package/dist/stepper/index.js +53 -0
  170. package/dist/stepper/stepper.d.ts +24 -0
  171. package/dist/style.css +1 -1
  172. package/dist/switch/index.cjs +1 -1
  173. package/dist/switch/index.js +3 -4
  174. package/dist/tabs/OneTab.vue.d.ts +2 -0
  175. package/dist/tabs/OneTabs.vue.d.ts +2 -0
  176. package/dist/tabs/index.cjs +1 -0
  177. package/dist/tabs/index.d.ts +4 -0
  178. package/dist/tabs/index.js +64 -0
  179. package/dist/tabs/tabs.d.ts +7 -0
  180. package/dist/toast/OneMascotToast.vue.d.ts +2 -0
  181. package/dist/toast/RabbitIcon.vue.d.ts +2 -0
  182. package/dist/toast/index.cjs +1 -1
  183. package/dist/toast/index.d.ts +4 -0
  184. package/dist/toast/index.js +139 -74
  185. package/dist/toast/useMascotToast.d.ts +12 -0
  186. package/dist/tooltip/OneTooltip.vue.d.ts +2 -0
  187. package/dist/tooltip/index.cjs +2 -2
  188. package/dist/tooltip/index.d.ts +1 -0
  189. package/dist/tooltip/index.js +33 -30
  190. package/dist/useConfirm-6344b49d.cjs +1 -0
  191. package/dist/useConfirm-74e99a5c.js +23 -0
  192. package/dist/useCursorList-5c1b57aa.js +62 -0
  193. package/dist/useCursorList-e1cb41e7.cjs +1 -0
  194. package/dist/useElementWidth-b36a7ce9.js +40 -0
  195. package/dist/useElementWidth-b3e53f48.cjs +1 -0
  196. package/dist/useFileUpload-228dbc07.js +24 -0
  197. package/dist/useFileUpload-f47622bb.cjs +1 -0
  198. package/dist/useIsMobile-7b1f08cf.cjs +1 -0
  199. package/dist/useIsMobile-98fc0cf9.js +7 -0
  200. package/dist/useMediaQuery-1d87df02.cjs +1 -0
  201. package/dist/useMediaQuery-77a19b18.js +37 -0
  202. package/dist/useModal-6a5d870b.js +30 -0
  203. package/dist/useModal-aa6f4a57.cjs +1 -0
  204. package/dist/userList/OneUserInviteModal.vue.d.ts +2 -0
  205. package/dist/userList/OneUserList.vue.d.ts +2 -0
  206. package/dist/userList/OneUserListItem.vue.d.ts +2 -0
  207. package/dist/userList/index.cjs +1 -0
  208. package/dist/userList/index.d.ts +4 -0
  209. package/dist/userList/index.js +559 -0
  210. package/dist/utils/clipboard.d.ts +6 -0
  211. package/dist/utils/format.d.ts +17 -0
  212. package/dist/utils/index.cjs +1 -0
  213. package/dist/utils/index.d.ts +4 -0
  214. package/dist/utils/index.js +125 -0
  215. package/dist/utils/string.d.ts +25 -0
  216. package/dist/utils/versionChecker.d.ts +26 -0
  217. package/package.json +215 -24
  218. package/dist/ChevronRightIcon-7a2f0c20.cjs +0 -1
  219. package/dist/OneHelpMenu-c6e88d8f.cjs +0 -1
  220. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
  221. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
  222. package/dist/SpinnerIcon-ccb6f3fc.cjs +0 -1
  223. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
  224. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
  225. package/dist/useModal-0c73777f.cjs +0 -1
  226. package/dist/useModal-7fe9444b.js +0 -194
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");function r(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})])}exports.render=r;
@@ -0,0 +1,20 @@
1
+ import { openBlock as e, createElementBlock as r, createElementVNode as o } from "vue";
2
+ function c(t, n) {
3
+ return e(), r("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ fill: "none",
6
+ viewBox: "0 0 24 24",
7
+ "stroke-width": "1.8",
8
+ stroke: "currentColor",
9
+ "aria-hidden": "true"
10
+ }, [
11
+ o("path", {
12
+ "stroke-linecap": "round",
13
+ "stroke-linejoin": "round",
14
+ d: "M15.75 19.5L8.25 12l7.5-7.5"
15
+ })
16
+ ]);
17
+ }
18
+ export {
19
+ c as r
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");function r(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})])}exports.render=r;
@@ -0,0 +1,20 @@
1
+ import { openBlock as e, createElementBlock as r, createElementVNode as o } from "vue";
2
+ function c(t, n) {
3
+ return e(), r("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ fill: "none",
6
+ viewBox: "0 0 24 24",
7
+ "stroke-width": "1.8",
8
+ stroke: "currentColor",
9
+ "aria-hidden": "true"
10
+ }, [
11
+ o("path", {
12
+ "stroke-linecap": "round",
13
+ "stroke-linejoin": "round",
14
+ d: "M8.25 4.5l7.5 7.5-7.5 7.5"
15
+ })
16
+ ]);
17
+ }
18
+ export {
19
+ c as r
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");function r(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 15.75l7.5-7.5 7.5 7.5"})])}exports.render=r;
@@ -1,20 +1,4 @@
1
1
  import { openBlock as e, createElementBlock as r, createElementVNode as o } from "vue";
2
- function l(t, n) {
3
- return e(), r("svg", {
4
- xmlns: "http://www.w3.org/2000/svg",
5
- fill: "none",
6
- viewBox: "0 0 24 24",
7
- "stroke-width": "1.8",
8
- stroke: "currentColor",
9
- "aria-hidden": "true"
10
- }, [
11
- o("path", {
12
- "stroke-linecap": "round",
13
- "stroke-linejoin": "round",
14
- d: "M4.5 15.75l7.5-7.5 7.5 7.5"
15
- })
16
- ]);
17
- }
18
2
  function c(t, n) {
19
3
  return e(), r("svg", {
20
4
  xmlns: "http://www.w3.org/2000/svg",
@@ -27,11 +11,10 @@ function c(t, n) {
27
11
  o("path", {
28
12
  "stroke-linecap": "round",
29
13
  "stroke-linejoin": "round",
30
- d: "M8.25 4.5l7.5 7.5-7.5 7.5"
14
+ d: "M4.5 15.75l7.5-7.5 7.5 7.5"
31
15
  })
32
16
  ]);
33
17
  }
34
18
  export {
35
- c as a,
36
- l as r
19
+ c as r
37
20
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");function r(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})])}exports.render=r;
@@ -0,0 +1,20 @@
1
+ import { openBlock as e, createElementBlock as r, createElementVNode as o } from "vue";
2
+ function c(t, n) {
3
+ return e(), r("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ fill: "none",
6
+ viewBox: "0 0 24 24",
7
+ "stroke-width": "1.8",
8
+ stroke: "currentColor",
9
+ "aria-hidden": "true"
10
+ }, [
11
+ o("path", {
12
+ "stroke-linecap": "round",
13
+ "stroke-linejoin": "round",
14
+ d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
15
+ })
16
+ ]);
17
+ }
18
+ export {
19
+ c as r
20
+ };
@@ -0,0 +1,79 @@
1
+ import { defineComponent as g, ref as i, watch as b, onBeforeUnmount as _, provide as C, computed as R, openBlock as a, createElementBlock as r, createElementVNode as m, renderSlot as f, normalizeProps as v, guardReactiveProps as x, createBlock as z, Teleport as B, createCommentVNode as w, withDirectives as D, normalizeClass as E, toDisplayString as P, vShow as $ } from "vue";
2
+ import { d as O } from "./dropdown-c81fb945.js";
3
+ import { autoUpdate as S, computePosition as U, offset as A, shift as L } from "@floating-ui/dom";
4
+ import { flip as N } from "@floating-ui/vue";
5
+ const T = ["data-opened"], V = {
6
+ key: 0,
7
+ class: "text-sm text-secondary-content px-3 py-2 text-left"
8
+ }, G = /* @__PURE__ */ g({
9
+ __name: "OneDropdownAuto",
10
+ props: O,
11
+ emits: ["open", "close"],
12
+ setup(y, { emit: h }) {
13
+ const u = y, t = i(!1), o = i(null), l = i(null);
14
+ let n = null;
15
+ const p = () => {
16
+ !l.value || !o.value || U(l.value, o.value, {
17
+ placement: u.stick ? u.stick : "bottom-start",
18
+ strategy: "fixed",
19
+ middleware: [A(5), N(), L({ padding: 8 })]
20
+ }).then(({ x: e, y: d }) => {
21
+ o.value && Object.assign(o.value.style, {
22
+ left: `${e}px`,
23
+ top: `${d}px`
24
+ });
25
+ });
26
+ };
27
+ b(t, (e) => {
28
+ e && l.value && o.value ? (p(), n = S(l.value, o.value, p)) : n && (n(), n = null);
29
+ }), _(() => {
30
+ n && n();
31
+ });
32
+ const c = h, s = () => {
33
+ t.value = !t.value, t.value ? c("open") : c("close");
34
+ };
35
+ C("OneDropdown", {
36
+ onToggle: s
37
+ });
38
+ const k = R(() => [
39
+ "fixed z-[10000] w-fit rounded-md bg-white",
40
+ "py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none",
41
+ "overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
42
+ ]);
43
+ return (e, d) => (a(), r("div", {
44
+ class: "relative inline-block",
45
+ "data-opened": t.value
46
+ }, [
47
+ m("div", {
48
+ ref_key: "buttonRef",
49
+ ref: l
50
+ }, [
51
+ f(e.$slots, "button", v(x({ onToggle: s, isExpanded: t.value })))
52
+ ], 512),
53
+ (a(), z(B, { to: "body" }, [
54
+ t.value ? (a(), r("div", {
55
+ key: 0,
56
+ class: "fixed top-0 left-0 w-screen h-screen z-[9999]",
57
+ onClick: s
58
+ })) : w("", !0),
59
+ D(m("div", {
60
+ ref_key: "menuRef",
61
+ ref: o,
62
+ class: E(["menu", k.value]),
63
+ role: "menu",
64
+ "aria-orientation": "vertical",
65
+ tabindex: "-1",
66
+ style: { display: "none" }
67
+ }, [
68
+ e.title ? (a(), r("div", V, P(e.title), 1)) : w("", !0),
69
+ f(e.$slots, "menu", v(x({ onToggle: s })))
70
+ ], 2), [
71
+ [$, t.value]
72
+ ])
73
+ ]))
74
+ ], 8, T));
75
+ }
76
+ });
77
+ export {
78
+ G as _
79
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),v=require("./dropdown-5cb64ab7.cjs"),r=require("@floating-ui/dom"),k=require("@floating-ui/vue"),w=["data-opened"],x={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},y=e.defineComponent({__name:"OneDropdownAuto",props:v.dropdownProps,emits:["open","close"],setup(p,{emit:m}){const i=p,o=e.ref(!1),n=e.ref(null),s=e.ref(null);let l=null;const c=()=>{!s.value||!n.value||r.computePosition(s.value,n.value,{placement:i.stick?i.stick:"bottom-start",strategy:"fixed",middleware:[r.offset(5),k.flip(),r.shift({padding:8})]}).then(({x:t,y:d})=>{n.value&&Object.assign(n.value.style,{left:`${t}px`,top:`${d}px`})})};e.watch(o,t=>{t&&s.value&&n.value?(c(),l=r.autoUpdate(s.value,n.value,c)):l&&(l(),l=null)}),e.onBeforeUnmount(()=>{l&&l()});const u=m,a=()=>{o.value=!o.value,o.value?u("open"):u("close")};e.provide("OneDropdown",{onToggle:a});const f=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block","data-opened":o.value},[e.createElementVNode("div",{ref_key:"buttonRef",ref:s},[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:a,isExpanded:o.value})))],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:a})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{ref_key:"menuRef",ref:n,class:e.normalizeClass(["menu",f.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",style:{display:"none"}},[t.title?(e.openBlock(),e.createElementBlock("div",x,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],2),[[e.vShow,o.value]])]))],8,w))}});exports._sfc_main=y;