@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.
- package/dist/ChevronLeftIcon-7505e081.cjs +1 -0
- package/dist/ChevronLeftIcon-bb9adb5b.js +20 -0
- package/dist/ChevronRightIcon-2992cf0d.cjs +1 -0
- package/dist/ChevronRightIcon-b0585768.js +20 -0
- package/dist/ChevronUpIcon-64a673e1.cjs +1 -0
- package/dist/{ChevronRightIcon-4549a26b.js → ChevronUpIcon-c43f27a9.js} +2 -19
- package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
- package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js +79 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +1 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-b89117e7.js +521 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-f6f7cd96.cjs +1 -0
- package/dist/OneHelpMenu-6ec63535.cjs +1 -0
- package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-d5182c78.js} +118 -213
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-05266fc3.cjs +1 -0
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-bb2219c7.js +18 -0
- package/dist/OneModal-02a9a173.js +189 -0
- package/dist/OneModal-0e92c039.cjs +1 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-c492c128.js +25 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-e83a81ea.cjs +1 -0
- package/dist/SpinnerIcon-01be39fe.cjs +1 -0
- package/dist/{SpinnerIcon-74648c98.js → SpinnerIcon-516264ba.js} +5 -6
- package/dist/button/index.cjs +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +3 -4
- package/dist/checkbox/checkbox.d.ts +5 -0
- package/dist/checkbox/index.cjs +1 -1
- package/dist/checkbox/index.js +40 -34
- package/dist/chips/OneChips.vue.d.ts +2 -0
- package/dist/chips/chips.d.ts +25 -0
- package/dist/chips/index.cjs +1 -0
- package/dist/chips/index.d.ts +3 -0
- package/dist/chips/index.js +62 -0
- package/dist/clipboard-494e1513.cjs +1 -0
- package/dist/clipboard-733b79a1.js +22 -0
- package/dist/common/OneDetailsList.vue.d.ts +2 -0
- package/dist/common/OneDetailsRow.vue.d.ts +2 -0
- package/dist/common/index.cjs +1 -1
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +68 -16
- package/dist/composables/index.cjs +1 -0
- package/dist/composables/index.d.ts +18 -0
- package/dist/composables/index.js +91 -0
- package/dist/composables/useAsyncMethod.d.ts +17 -0
- package/dist/composables/useAsyncSelect.d.ts +26 -0
- package/dist/composables/useConfirm.d.ts +27 -0
- package/dist/composables/useCursorList.d.ts +42 -0
- package/dist/composables/useDebouncedRef.d.ts +6 -0
- package/dist/composables/useFileUpload.d.ts +21 -0
- package/dist/composables/useFormSubmit.d.ts +23 -0
- package/dist/composables/useIsMobile.d.ts +8 -0
- package/dist/confirm/OneConfirmHost.vue.d.ts +2 -0
- package/dist/confirm/confirm.d.ts +10 -0
- package/dist/confirm/index.cjs +1 -0
- package/dist/confirm/index.d.ts +5 -0
- package/dist/confirm/index.js +59 -0
- package/dist/cursorList/OneCursorList.vue.d.ts +2 -0
- package/dist/cursorList/index.cjs +1 -0
- package/dist/cursorList/index.d.ts +3 -0
- package/dist/cursorList/index.js +78 -0
- package/dist/dataTable/index.cjs +1 -1
- package/dist/dataTable/index.js +256 -301
- package/dist/dateTime/OneDateTime.vue.d.ts +2 -0
- package/dist/dateTime/dateTime.d.ts +43 -0
- package/dist/dateTime/index.cjs +1 -0
- package/dist/dateTime/index.d.ts +3 -0
- package/dist/dateTime/index.js +66 -0
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +302 -376
- package/dist/dropdown-5cb64ab7.cjs +1 -0
- package/dist/dropdown-c81fb945.js +101 -0
- package/dist/entityPicker/index.cjs +1 -1
- package/dist/entityPicker/index.js +57 -57
- package/dist/entityPicker/useEntityModal.d.ts +7 -3
- package/dist/errorsPage/OneCrashScreen.vue.d.ts +2 -0
- package/dist/errorsPage/OneErrorHero.vue.d.ts +2 -0
- package/dist/errorsPage/OneNotFoundPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneServerErrorPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneSnakeGame.vue.d.ts +2 -0
- package/dist/errorsPage/createAppErrorHandler.d.ts +24 -0
- package/dist/errorsPage/errorsType.d.ts +5 -0
- package/dist/errorsPage/index.cjs +1 -1
- package/dist/errorsPage/index.d.ts +8 -0
- package/dist/errorsPage/index.js +557 -28
- package/dist/errorsPage/useCrashState.d.ts +10 -0
- package/dist/fileUpload/OneDropzone.vue.d.ts +2 -0
- package/dist/fileUpload/OneFileUpload.vue.d.ts +2 -0
- package/dist/fileUpload/fileUpload.d.ts +17 -0
- package/dist/fileUpload/index.cjs +1 -0
- package/dist/fileUpload/index.d.ts +6 -0
- package/dist/fileUpload/index.js +228 -0
- package/dist/filterBuilder/OneFilterBuilder.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterGroup.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterRule.vue.d.ts +2 -0
- package/dist/filterBuilder/filterBuilder.d.ts +17 -0
- package/dist/filterBuilder/index.cjs +1 -0
- package/dist/filterBuilder/index.d.ts +5 -0
- package/dist/filterBuilder/index.js +257 -0
- package/dist/form/form.d.ts +1 -1
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.js +66 -574
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +99 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +242 -104
- package/dist/indicators/OneStatCard.vue.d.ts +2 -0
- package/dist/indicators/index.cjs +1 -1
- package/dist/indicators/index.d.ts +1 -0
- package/dist/indicators/index.js +66 -29
- package/dist/label/index.cjs +1 -1
- package/dist/label/index.js +5 -5
- package/dist/layout/OneAuthLayout.vue.d.ts +2 -0
- package/dist/layout/OneBackButton.vue.d.ts +2 -0
- package/dist/layout/OneBreadcrumbs.vue.d.ts +2 -0
- package/dist/layout/OneEmptyLayout.vue.d.ts +6 -0
- package/dist/layout/OneGridLayout.vue.d.ts +2 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.d.ts +6 -1
- package/dist/layout/index.js +1057 -765
- package/dist/layout/layout.d.ts +11 -0
- package/dist/modal/OneModalHost.vue.d.ts +2 -0
- package/dist/modal/index.cjs +1 -1
- package/dist/modal/index.d.ts +3 -0
- package/dist/modal/index.js +84 -27
- package/dist/modal/modal.d.ts +9 -0
- package/dist/modal/useModalStack.d.ts +20 -0
- package/dist/notifications/OneNotificationItem.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsBell.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsPanel.vue.d.ts +2 -0
- package/dist/notifications/index.cjs +1 -0
- package/dist/notifications/index.d.ts +7 -0
- package/dist/notifications/index.js +477 -0
- package/dist/notifications/notifications.d.ts +53 -0
- package/dist/notifications/useNotifyfeed.d.ts +32 -0
- package/dist/periodPicker/index.cjs +1 -1
- package/dist/periodPicker/index.js +126 -139
- package/dist/popover/OnePopover.vue.d.ts +2 -0
- package/dist/popover/index.cjs +1 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +102 -0
- package/dist/popover/popover.d.ts +31 -0
- package/dist/progress/OneProgress.vue.d.ts +2 -0
- package/dist/progress/index.cjs +1 -0
- package/dist/progress/index.d.ts +3 -0
- package/dist/progress/index.js +74 -0
- package/dist/progress/progress.d.ts +32 -0
- package/dist/searchInput/OneSearchInput.vue.d.ts +2 -0
- package/dist/searchInput/index.cjs +1 -0
- package/dist/searchInput/index.d.ts +3 -0
- package/dist/searchInput/index.js +103 -0
- package/dist/searchInput/searchInput.d.ts +39 -0
- package/dist/settings/OneSettingsLayout.vue.d.ts +2 -0
- package/dist/settings/OneSettingsRow.vue.d.ts +2 -0
- package/dist/settings/OneSettingsSection.vue.d.ts +2 -0
- package/dist/settings/index.cjs +1 -0
- package/dist/settings/index.d.ts +4 -0
- package/dist/settings/index.js +116 -0
- package/dist/spinner/OneSpinner.vue.d.ts +2 -0
- package/dist/spinner/index.cjs +1 -0
- package/dist/spinner/index.d.ts +3 -0
- package/dist/spinner/index.js +30 -0
- package/dist/spinner/spinner.d.ts +10 -0
- package/dist/stageBadge/index.cjs +1 -1
- package/dist/stageBadge/index.js +18 -16
- package/dist/stepper/OneStepper.vue.d.ts +2 -0
- package/dist/stepper/index.cjs +1 -0
- package/dist/stepper/index.d.ts +3 -0
- package/dist/stepper/index.js +53 -0
- package/dist/stepper/stepper.d.ts +24 -0
- package/dist/style.css +1 -1
- package/dist/switch/index.cjs +1 -1
- package/dist/switch/index.js +3 -4
- package/dist/tabs/OneTab.vue.d.ts +2 -0
- package/dist/tabs/OneTabs.vue.d.ts +2 -0
- package/dist/tabs/index.cjs +1 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +64 -0
- package/dist/tabs/tabs.d.ts +7 -0
- package/dist/toast/OneMascotToast.vue.d.ts +2 -0
- package/dist/toast/RabbitIcon.vue.d.ts +2 -0
- package/dist/toast/index.cjs +1 -1
- package/dist/toast/index.d.ts +4 -0
- package/dist/toast/index.js +139 -74
- package/dist/toast/useMascotToast.d.ts +12 -0
- package/dist/tooltip/OneTooltip.vue.d.ts +2 -0
- package/dist/tooltip/index.cjs +2 -2
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +33 -30
- package/dist/useConfirm-6344b49d.cjs +1 -0
- package/dist/useConfirm-74e99a5c.js +23 -0
- package/dist/useCursorList-5c1b57aa.js +62 -0
- package/dist/useCursorList-e1cb41e7.cjs +1 -0
- package/dist/useElementWidth-b36a7ce9.js +40 -0
- package/dist/useElementWidth-b3e53f48.cjs +1 -0
- package/dist/useFileUpload-228dbc07.js +24 -0
- package/dist/useFileUpload-f47622bb.cjs +1 -0
- package/dist/useIsMobile-7b1f08cf.cjs +1 -0
- package/dist/useIsMobile-98fc0cf9.js +7 -0
- package/dist/useMediaQuery-1d87df02.cjs +1 -0
- package/dist/useMediaQuery-77a19b18.js +37 -0
- package/dist/useModal-6a5d870b.js +30 -0
- package/dist/useModal-aa6f4a57.cjs +1 -0
- package/dist/userList/OneUserInviteModal.vue.d.ts +2 -0
- package/dist/userList/OneUserList.vue.d.ts +2 -0
- package/dist/userList/OneUserListItem.vue.d.ts +2 -0
- package/dist/userList/index.cjs +1 -0
- package/dist/userList/index.d.ts +4 -0
- package/dist/userList/index.js +559 -0
- package/dist/utils/clipboard.d.ts +6 -0
- package/dist/utils/format.d.ts +17 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +125 -0
- package/dist/utils/string.d.ts +25 -0
- package/dist/utils/versionChecker.d.ts +26 -0
- package/package.json +215 -24
- package/dist/ChevronRightIcon-7a2f0c20.cjs +0 -1
- package/dist/OneHelpMenu-c6e88d8f.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/SpinnerIcon-ccb6f3fc.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/useModal-0c73777f.cjs +0 -1
- 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: "
|
|
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
|
|
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;
|