@oneb/ui-vue 0.3.32 → 0.4.1

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 (229) 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/LogoOneb-b6ac382e.cjs +1 -0
  8. package/dist/LogoOneb-ddb388a4.js +16 -0
  9. package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
  10. package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
  11. package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js +79 -0
  12. package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +1 -0
  13. package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-b89117e7.js +521 -0
  14. package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-f6f7cd96.cjs +1 -0
  15. package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-2a2051d7.js} +120 -214
  16. package/dist/OneHelpMenu-78d9348a.cjs +1 -0
  17. package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-05266fc3.cjs +1 -0
  18. package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-bb2219c7.js +18 -0
  19. package/dist/OneModal-02a9a173.js +189 -0
  20. package/dist/OneModal-0e92c039.cjs +1 -0
  21. package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-c492c128.js +25 -0
  22. package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-e83a81ea.cjs +1 -0
  23. package/dist/SpinnerIcon-01be39fe.cjs +1 -0
  24. package/dist/{SpinnerIcon-74648c98.js → SpinnerIcon-516264ba.js} +5 -6
  25. package/dist/button/index.cjs +1 -1
  26. package/dist/button/index.d.ts +1 -1
  27. package/dist/button/index.js +3 -4
  28. package/dist/checkbox/checkbox.d.ts +5 -0
  29. package/dist/checkbox/index.cjs +1 -1
  30. package/dist/checkbox/index.js +40 -34
  31. package/dist/chips/OneChips.vue.d.ts +2 -0
  32. package/dist/chips/chips.d.ts +25 -0
  33. package/dist/chips/index.cjs +1 -0
  34. package/dist/chips/index.d.ts +3 -0
  35. package/dist/chips/index.js +62 -0
  36. package/dist/clipboard-494e1513.cjs +1 -0
  37. package/dist/clipboard-733b79a1.js +22 -0
  38. package/dist/common/OneDetailsList.vue.d.ts +2 -0
  39. package/dist/common/OneDetailsRow.vue.d.ts +2 -0
  40. package/dist/common/index.cjs +1 -1
  41. package/dist/common/index.d.ts +2 -0
  42. package/dist/common/index.js +68 -16
  43. package/dist/composables/index.cjs +1 -0
  44. package/dist/composables/index.d.ts +18 -0
  45. package/dist/composables/index.js +91 -0
  46. package/dist/composables/useAsyncMethod.d.ts +17 -0
  47. package/dist/composables/useAsyncSelect.d.ts +26 -0
  48. package/dist/composables/useConfirm.d.ts +27 -0
  49. package/dist/composables/useCursorList.d.ts +42 -0
  50. package/dist/composables/useDebouncedRef.d.ts +6 -0
  51. package/dist/composables/useFileUpload.d.ts +21 -0
  52. package/dist/composables/useFormSubmit.d.ts +23 -0
  53. package/dist/composables/useIsMobile.d.ts +8 -0
  54. package/dist/confirm/OneConfirmHost.vue.d.ts +2 -0
  55. package/dist/confirm/confirm.d.ts +10 -0
  56. package/dist/confirm/index.cjs +1 -0
  57. package/dist/confirm/index.d.ts +5 -0
  58. package/dist/confirm/index.js +59 -0
  59. package/dist/cursorList/OneCursorList.vue.d.ts +2 -0
  60. package/dist/cursorList/index.cjs +1 -0
  61. package/dist/cursorList/index.d.ts +3 -0
  62. package/dist/cursorList/index.js +78 -0
  63. package/dist/dataTable/index.cjs +1 -1
  64. package/dist/dataTable/index.js +256 -301
  65. package/dist/dateTime/OneDateTime.vue.d.ts +2 -0
  66. package/dist/dateTime/dateTime.d.ts +43 -0
  67. package/dist/dateTime/index.cjs +1 -0
  68. package/dist/dateTime/index.d.ts +3 -0
  69. package/dist/dateTime/index.js +66 -0
  70. package/dist/dropdown/index.cjs +1 -1
  71. package/dist/dropdown/index.js +302 -376
  72. package/dist/dropdown-5cb64ab7.cjs +1 -0
  73. package/dist/dropdown-c81fb945.js +101 -0
  74. package/dist/entityPicker/index.cjs +1 -1
  75. package/dist/entityPicker/index.js +57 -57
  76. package/dist/entityPicker/useEntityModal.d.ts +7 -3
  77. package/dist/errorsPage/OneCrashScreen.vue.d.ts +2 -0
  78. package/dist/errorsPage/OneErrorHero.vue.d.ts +2 -0
  79. package/dist/errorsPage/OneNotFoundPage.vue.d.ts +2 -0
  80. package/dist/errorsPage/OneServerErrorPage.vue.d.ts +2 -0
  81. package/dist/errorsPage/OneSnakeGame.vue.d.ts +2 -0
  82. package/dist/errorsPage/createAppErrorHandler.d.ts +24 -0
  83. package/dist/errorsPage/errorsType.d.ts +5 -0
  84. package/dist/errorsPage/index.cjs +1 -1
  85. package/dist/errorsPage/index.d.ts +8 -0
  86. package/dist/errorsPage/index.js +543 -28
  87. package/dist/errorsPage/useCrashState.d.ts +10 -0
  88. package/dist/fileUpload/OneDropzone.vue.d.ts +2 -0
  89. package/dist/fileUpload/OneFileUpload.vue.d.ts +2 -0
  90. package/dist/fileUpload/fileUpload.d.ts +17 -0
  91. package/dist/fileUpload/index.cjs +1 -0
  92. package/dist/fileUpload/index.d.ts +6 -0
  93. package/dist/fileUpload/index.js +228 -0
  94. package/dist/filterBuilder/OneFilterBuilder.vue.d.ts +2 -0
  95. package/dist/filterBuilder/OneFilterGroup.vue.d.ts +2 -0
  96. package/dist/filterBuilder/OneFilterRule.vue.d.ts +2 -0
  97. package/dist/filterBuilder/filterBuilder.d.ts +17 -0
  98. package/dist/filterBuilder/index.cjs +1 -0
  99. package/dist/filterBuilder/index.d.ts +5 -0
  100. package/dist/filterBuilder/index.js +268 -0
  101. package/dist/form/form.d.ts +1 -1
  102. package/dist/form/index.cjs +1 -1
  103. package/dist/form/index.js +66 -574
  104. package/dist/i18n/index.cjs +1 -1
  105. package/dist/i18n/index.js +101 -15
  106. package/dist/index.cjs +1 -1
  107. package/dist/index.d.ts +18 -0
  108. package/dist/index.js +244 -104
  109. package/dist/indicators/OneStatCard.vue.d.ts +2 -0
  110. package/dist/indicators/index.cjs +1 -1
  111. package/dist/indicators/index.d.ts +1 -0
  112. package/dist/indicators/index.js +66 -29
  113. package/dist/label/index.cjs +1 -1
  114. package/dist/label/index.js +5 -5
  115. package/dist/layout/LogoOneb.vue.d.ts +2 -0
  116. package/dist/layout/OneAuthLayout.vue.d.ts +2 -0
  117. package/dist/layout/OneBackButton.vue.d.ts +2 -0
  118. package/dist/layout/OneBreadcrumbs.vue.d.ts +2 -0
  119. package/dist/layout/OneEmptyLayout.vue.d.ts +6 -0
  120. package/dist/layout/OneGridLayout.vue.d.ts +2 -0
  121. package/dist/layout/index.cjs +1 -1
  122. package/dist/layout/index.d.ts +7 -1
  123. package/dist/layout/index.js +1059 -765
  124. package/dist/layout/layout.d.ts +11 -0
  125. package/dist/modal/OneModalHost.vue.d.ts +2 -0
  126. package/dist/modal/index.cjs +1 -1
  127. package/dist/modal/index.d.ts +3 -0
  128. package/dist/modal/index.js +84 -27
  129. package/dist/modal/modal.d.ts +9 -0
  130. package/dist/modal/useModalStack.d.ts +20 -0
  131. package/dist/notifications/OneNotificationItem.vue.d.ts +2 -0
  132. package/dist/notifications/OneNotificationsBell.vue.d.ts +2 -0
  133. package/dist/notifications/OneNotificationsPanel.vue.d.ts +2 -0
  134. package/dist/notifications/index.cjs +1 -0
  135. package/dist/notifications/index.d.ts +7 -0
  136. package/dist/notifications/index.js +477 -0
  137. package/dist/notifications/notifications.d.ts +53 -0
  138. package/dist/notifications/useNotifyfeed.d.ts +32 -0
  139. package/dist/periodPicker/index.cjs +1 -1
  140. package/dist/periodPicker/index.js +126 -139
  141. package/dist/popover/OnePopover.vue.d.ts +2 -0
  142. package/dist/popover/index.cjs +1 -0
  143. package/dist/popover/index.d.ts +3 -0
  144. package/dist/popover/index.js +104 -0
  145. package/dist/popover/popover.d.ts +31 -0
  146. package/dist/progress/OneProgress.vue.d.ts +2 -0
  147. package/dist/progress/index.cjs +1 -0
  148. package/dist/progress/index.d.ts +3 -0
  149. package/dist/progress/index.js +74 -0
  150. package/dist/progress/progress.d.ts +32 -0
  151. package/dist/searchInput/OneSearchInput.vue.d.ts +2 -0
  152. package/dist/searchInput/index.cjs +1 -0
  153. package/dist/searchInput/index.d.ts +3 -0
  154. package/dist/searchInput/index.js +103 -0
  155. package/dist/searchInput/searchInput.d.ts +39 -0
  156. package/dist/settings/OneSettingsLayout.vue.d.ts +2 -0
  157. package/dist/settings/OneSettingsRow.vue.d.ts +2 -0
  158. package/dist/settings/OneSettingsSection.vue.d.ts +2 -0
  159. package/dist/settings/index.cjs +1 -0
  160. package/dist/settings/index.d.ts +4 -0
  161. package/dist/settings/index.js +116 -0
  162. package/dist/spinner/OneSpinner.vue.d.ts +2 -0
  163. package/dist/spinner/index.cjs +1 -0
  164. package/dist/spinner/index.d.ts +3 -0
  165. package/dist/spinner/index.js +30 -0
  166. package/dist/spinner/spinner.d.ts +10 -0
  167. package/dist/stageBadge/index.cjs +1 -1
  168. package/dist/stageBadge/index.js +18 -16
  169. package/dist/stepper/OneStepper.vue.d.ts +2 -0
  170. package/dist/stepper/index.cjs +1 -0
  171. package/dist/stepper/index.d.ts +3 -0
  172. package/dist/stepper/index.js +53 -0
  173. package/dist/stepper/stepper.d.ts +24 -0
  174. package/dist/style.css +1 -1
  175. package/dist/switch/index.cjs +1 -1
  176. package/dist/switch/index.js +3 -4
  177. package/dist/tabs/OneTab.vue.d.ts +2 -0
  178. package/dist/tabs/OneTabs.vue.d.ts +2 -0
  179. package/dist/tabs/index.cjs +1 -0
  180. package/dist/tabs/index.d.ts +4 -0
  181. package/dist/tabs/index.js +64 -0
  182. package/dist/tabs/tabs.d.ts +7 -0
  183. package/dist/toast/OneMascotToast.vue.d.ts +2 -0
  184. package/dist/toast/RabbitIcon.vue.d.ts +2 -0
  185. package/dist/toast/index.cjs +1 -1
  186. package/dist/toast/index.d.ts +4 -0
  187. package/dist/toast/index.js +139 -74
  188. package/dist/toast/useMascotToast.d.ts +12 -0
  189. package/dist/tooltip/OneTooltip.vue.d.ts +2 -0
  190. package/dist/tooltip/index.cjs +2 -2
  191. package/dist/tooltip/index.d.ts +1 -0
  192. package/dist/tooltip/index.js +33 -30
  193. package/dist/useConfirm-6344b49d.cjs +1 -0
  194. package/dist/useConfirm-74e99a5c.js +23 -0
  195. package/dist/useCursorList-5c1b57aa.js +62 -0
  196. package/dist/useCursorList-e1cb41e7.cjs +1 -0
  197. package/dist/useElementWidth-b36a7ce9.js +40 -0
  198. package/dist/useElementWidth-b3e53f48.cjs +1 -0
  199. package/dist/useFileUpload-228dbc07.js +24 -0
  200. package/dist/useFileUpload-f47622bb.cjs +1 -0
  201. package/dist/useIsMobile-7b1f08cf.cjs +1 -0
  202. package/dist/useIsMobile-98fc0cf9.js +7 -0
  203. package/dist/useMediaQuery-1d87df02.cjs +1 -0
  204. package/dist/useMediaQuery-77a19b18.js +37 -0
  205. package/dist/useModal-6a5d870b.js +30 -0
  206. package/dist/useModal-aa6f4a57.cjs +1 -0
  207. package/dist/userList/OneUserInviteModal.vue.d.ts +2 -0
  208. package/dist/userList/OneUserList.vue.d.ts +2 -0
  209. package/dist/userList/OneUserListItem.vue.d.ts +2 -0
  210. package/dist/userList/index.cjs +1 -0
  211. package/dist/userList/index.d.ts +4 -0
  212. package/dist/userList/index.js +559 -0
  213. package/dist/utils/clipboard.d.ts +6 -0
  214. package/dist/utils/format.d.ts +17 -0
  215. package/dist/utils/index.cjs +1 -0
  216. package/dist/utils/index.d.ts +4 -0
  217. package/dist/utils/index.js +125 -0
  218. package/dist/utils/string.d.ts +25 -0
  219. package/dist/utils/versionChecker.d.ts +26 -0
  220. package/package.json +215 -24
  221. package/dist/ChevronRightIcon-7a2f0c20.cjs +0 -1
  222. package/dist/OneHelpMenu-c6e88d8f.cjs +0 -1
  223. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
  224. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
  225. package/dist/SpinnerIcon-ccb6f3fc.cjs +0 -1
  226. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
  227. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
  228. package/dist/useModal-0c73777f.cjs +0 -1
  229. package/dist/useModal-7fe9444b.js +0 -194
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),y=require("./_plugin-vue_export-helper-f246444f.cjs"),v={useModal:{required:!0,type:Object},title:{required:!1,type:String},subtitle:{required:!1,type:String,default:""},size:{type:String,default:"medium"},onClose:{type:Function},classModal:{type:Boolean,default:!1},titleCenter:{type:Boolean,default:!1},classTitle:{type:String,default:""},canClose:{type:Function,default:()=>!0},customWidth:{type:String,default:""}},g={"3xs":["max-w-xs"],xs:["max-w-sm"],sm:["max-w-md"],small:["max-w-lg"],md:["max-w-xl"],medium:["max-w-xl"],large:["max-w-2xl"],xl:["max-w-3xl"],"2xl":["max-w-4xl"],"3xl":["max-w-4xl"],"4xl":["max-w-5xl"],"5xl":["max-w-5xl"],"7xl":["max-w-7xl"]},C=(r="medium")=>{const n=[];return n.push(...g[r]??[]),n},h={class:"relative bg-white rounded-lg shadow h-full"},b=e.defineComponent({__name:"OneModal",props:v,emits:["isOpen","closed"],setup(r,{expose:n,emit:i}){const l=r,a=i,m=e.computed(()=>{var s,u;const t=l.useModal;return((s=t==null?void 0:t.isOpened)==null?void 0:s.value)??((u=t==null?void 0:t.isOpen)==null?void 0:u.value)??!1}),p=e.computed(()=>C(l.size)),d=e.computed(()=>l.customWidth?{width:l.customWidth}:{}),o=e.ref(null),f=e.ref(!1);function x(t){f.value=!1,o.value&&!o.value.contains(t.target)&&(f.value=!0)}function w(t){f.value&&o.value&&!o.value.contains(t.target)&&c()}const c=()=>{var s,u;if(l.canClose&&!l.canClose())return;const t=l.useModal;(s=t==null?void 0:t.close)==null||s.call(t),(u=l.onClose)==null||u.call(l),a("closed"),a("isOpen")};return n({open:()=>{var s;const t=l.useModal;(s=t==null?void 0:t.open)==null||s.call(t),a("isOpen")},close:c}),(t,s)=>m.value?(e.openBlock(),e.createElementBlock("div",{key:0,tabindex:"-1",onMousedown:x,onMouseup:w,class:e.normalizeClass(["modal backdrop !m-0",{"modal-mobile":t.classModal}])},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full max-h-full",p.value,{"fixed bottom-0 left-0 right-0 w-full bg-white rounded-t-xl mobile-modal":t.classModal}]),style:e.normalizeStyle(d.value),ref_key:"modalContent",ref:o},[e.createElementVNode("div",h,[t.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([t.titleCenter?"grid grid-cols-4":"flex items-start justify-between","p-3 border-b rounded-t",t.classTitle])},[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col min-w-0",t.titleCenter?"col-span-2 col-start-2 items-center":""])},[e.createElementVNode("h3",{class:e.normalizeClass(["text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis max-w-full",t.titleCenter?"text-center":""])},e.toDisplayString(t.title),3),t.$slots.subtitle||t.subtitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm text-gray-500 mt-0.5 max-w-full",t.titleCenter?"text-center":""])},[e.renderSlot(t.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subtitle),1)],!0)],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("button",{type:"button",class:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center",onClick:c},[...s[0]||(s[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])],2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"header",{},void 0,!0),e.renderSlot(t.$slots,"body",{},void 0,!0),e.renderSlot(t.$slots,"default",{},void 0,!0),e.renderSlot(t.$slots,"footer",{close:c},void 0,!0)])],6)],34)):e.createCommentVNode("",!0)}});const M=y._export_sfc(b,[["__scopeId","data-v-83c666bc"]]);function k(r=!1){const n=e.ref(r),i=e.ref(void 0);let l=null;const a=()=>{l&&(clearTimeout(l),l=null),n.value=!1,i.value=void 0},m=o=>{i.value=o,n.value=!0},p=o=>{l&&clearTimeout(l),l=setTimeout(a,o*1e3)},d=o=>{o.key==="Escape"&&n.value&&a()};return e.onMounted(()=>{document.addEventListener("keydown",d)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",d),l&&clearTimeout(l)}),{isOpened:n,isOpen:n,data:i,open:m,close:a,closeWithDelay:p}}exports.OneModal=M;exports.modalProps=v;exports.useModal=k;
@@ -1,194 +0,0 @@
1
- import { defineComponent as O, computed as y, ref as p, openBlock as g, createElementBlock as h, normalizeClass as i, createElementVNode as a, normalizeStyle as S, toDisplayString as C, renderSlot as c, createTextVNode as T, createCommentVNode as b, onMounted as z, onBeforeUnmount as B } from "vue";
2
- import { _ as $ } from "./_plugin-vue_export-helper-dad06003.js";
3
- const E = {
4
- useModal: {
5
- required: !0,
6
- type: Object
7
- },
8
- title: {
9
- required: !1,
10
- type: String
11
- },
12
- subtitle: {
13
- required: !1,
14
- type: String,
15
- default: ""
16
- },
17
- size: {
18
- type: String,
19
- default: "medium"
20
- },
21
- onClose: {
22
- type: Function
23
- },
24
- classModal: {
25
- type: Boolean,
26
- default: !1
27
- },
28
- titleCenter: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- classTitle: {
33
- type: String,
34
- default: ""
35
- },
36
- canClose: {
37
- type: Function,
38
- default: () => !0
39
- },
40
- customWidth: {
41
- type: String,
42
- default: ""
43
- }
44
- }, L = {
45
- "3xs": ["max-w-xs"],
46
- xs: ["max-w-sm"],
47
- sm: ["max-w-md"],
48
- small: ["max-w-lg"],
49
- md: ["max-w-xl"],
50
- medium: ["max-w-xl"],
51
- large: ["max-w-2xl"],
52
- xl: ["max-w-3xl"],
53
- "2xl": ["max-w-4xl"],
54
- "3xl": ["max-w-4xl"],
55
- "4xl": ["max-w-5xl"],
56
- "5xl": ["max-w-5xl"],
57
- "7xl": ["max-w-7xl"]
58
- }, W = (r = "medium") => {
59
- const o = [];
60
- return o.push(...L[r] ?? []), o;
61
- }, D = { class: "relative bg-white rounded-lg shadow h-full" }, _ = /* @__PURE__ */ O({
62
- __name: "OneModal",
63
- props: E,
64
- emits: ["isOpen", "closed"],
65
- setup(r, { expose: o, emit: u }) {
66
- const t = r, n = u, v = y(() => {
67
- var s, d;
68
- const e = t.useModal;
69
- return ((s = e == null ? void 0 : e.isOpened) == null ? void 0 : s.value) ?? ((d = e == null ? void 0 : e.isOpen) == null ? void 0 : d.value) ?? !1;
70
- }), x = y(() => W(t.size)), m = y(() => t.customWidth ? { width: t.customWidth } : {}), l = p(null), w = p(!1);
71
- function M(e) {
72
- w.value = !1, l.value && !l.value.contains(e.target) && (w.value = !0);
73
- }
74
- function k(e) {
75
- w.value && l.value && !l.value.contains(e.target) && f();
76
- }
77
- const f = () => {
78
- var s, d;
79
- if (t.canClose && !t.canClose())
80
- return;
81
- const e = t.useModal;
82
- (s = e == null ? void 0 : e.close) == null || s.call(e), (d = t.onClose) == null || d.call(t), n("closed"), n("isOpen");
83
- };
84
- return o({
85
- open: () => {
86
- var s;
87
- const e = t.useModal;
88
- (s = e == null ? void 0 : e.open) == null || s.call(e), n("isOpen");
89
- },
90
- close: f
91
- }), (e, s) => v.value ? (g(), h("div", {
92
- key: 0,
93
- tabindex: "-1",
94
- onMousedown: M,
95
- onMouseup: k,
96
- class: i(["modal backdrop !m-0", { "modal-mobile": e.classModal }])
97
- }, [
98
- a("div", {
99
- class: i([
100
- "relative w-full max-h-full",
101
- x.value,
102
- { "fixed bottom-0 left-0 right-0 w-full bg-white rounded-t-xl mobile-modal": e.classModal }
103
- ]),
104
- style: S(m.value),
105
- ref_key: "modalContent",
106
- ref: l
107
- }, [
108
- a("div", D, [
109
- e.title ? (g(), h("div", {
110
- key: 0,
111
- class: i([
112
- e.titleCenter ? "grid grid-cols-4" : "flex items-start justify-between",
113
- "p-3 border-b rounded-t",
114
- e.classTitle
115
- ])
116
- }, [
117
- a("div", {
118
- class: i(["flex flex-col min-w-0", e.titleCenter ? "col-span-2 col-start-2 items-center" : ""])
119
- }, [
120
- a("h3", {
121
- class: i(["text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis max-w-full", e.titleCenter ? "text-center" : ""])
122
- }, C(e.title), 3),
123
- e.$slots.subtitle || e.subtitle ? (g(), h("div", {
124
- key: 0,
125
- class: i(["text-sm text-gray-500 mt-0.5 max-w-full", e.titleCenter ? "text-center" : ""])
126
- }, [
127
- c(e.$slots, "subtitle", {}, () => [
128
- T(C(e.subtitle), 1)
129
- ], !0)
130
- ], 2)) : b("", !0)
131
- ], 2),
132
- a("button", {
133
- type: "button",
134
- class: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center",
135
- onClick: f
136
- }, [...s[0] || (s[0] = [
137
- a("svg", {
138
- xmlns: "http://www.w3.org/2000/svg",
139
- fill: "none",
140
- viewBox: "0 0 24 24",
141
- "stroke-width": "1.8",
142
- stroke: "currentColor",
143
- "aria-hidden": "true",
144
- class: "w-5 h-5"
145
- }, [
146
- a("path", {
147
- "stroke-linecap": "round",
148
- "stroke-linejoin": "round",
149
- d: "M6 18L18 6M6 6l12 12"
150
- })
151
- ], -1)
152
- ])])
153
- ], 2)) : b("", !0),
154
- c(e.$slots, "header", {}, void 0, !0),
155
- c(e.$slots, "body", {}, void 0, !0),
156
- c(e.$slots, "default", {}, void 0, !0),
157
- c(e.$slots, "footer", { close: f }, void 0, !0)
158
- ])
159
- ], 6)
160
- ], 34)) : b("", !0);
161
- }
162
- });
163
- const V = /* @__PURE__ */ $(_, [["__scopeId", "data-v-83c666bc"]]);
164
- function F(r = !1) {
165
- const o = p(r), u = p(void 0);
166
- let t = null;
167
- const n = () => {
168
- t && (clearTimeout(t), t = null), o.value = !1, u.value = void 0;
169
- }, v = (l) => {
170
- u.value = l, o.value = !0;
171
- }, x = (l) => {
172
- t && clearTimeout(t), t = setTimeout(n, l * 1e3);
173
- }, m = (l) => {
174
- l.key === "Escape" && o.value && n();
175
- };
176
- return z(() => {
177
- document.addEventListener("keydown", m);
178
- }), B(() => {
179
- document.removeEventListener("keydown", m), t && clearTimeout(t);
180
- }), {
181
- isOpened: o,
182
- isOpen: o,
183
- // alias for backward compatibility
184
- data: u,
185
- open: v,
186
- close: n,
187
- closeWithDelay: x
188
- };
189
- }
190
- export {
191
- V as O,
192
- E as m,
193
- F as u
194
- };