morya-ui 0.4.1 → 0.4.3
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/CHANGELOG.md +60 -1
- package/dist/Button-Bjsth0ct.js +326 -0
- package/dist/{Card-B1CB9Trm.js → Card-Ct5vJmoV.js} +1 -1
- package/dist/{Checkbox-BKt8hdhV.js → Checkbox-Bo26OGHP.js} +1 -1
- package/dist/{DatePicker-CSoMFEvh.js → DatePicker-CsMGzCqY.js} +4 -4
- package/dist/{Empty-iNcc0G-q.js → Empty-rMhOPi79.js} +2 -2
- package/dist/{FlyoutSubmenu-C1RfFRzH.js → FlyoutSubmenu-C0id6-Sb.js} +1 -1
- package/dist/{Icon-od9Ob-Ay.js → Icon-CmHjx7W8.js} +1 -1
- package/dist/{Input-DQHYqvNk.js → Input-CxSTVp9E.js} +3 -3
- package/dist/{Loading-BPpR-jGa.js → Loading-D_qRwfKv.js} +11 -11
- package/dist/{Pagination-DLphD6LC.js → Pagination-CnGOpp0m.js} +3 -3
- package/dist/{Popover-B_2c9NWs.js → Popover-D1uZ1N9Z.js} +2 -2
- package/dist/{ProgressSpinner-B_OJG_0l.js → ProgressSpinner-hmR23xpi.js} +2 -2
- package/dist/{Radio-Bxd806ys.js → Radio-CZAyelC_.js} +1 -1
- package/dist/{Segmented-BRMSmXCl.js → Segmented-BpdO7arR.js} +2 -2
- package/dist/{Select-DxMlpgc5.js → Select-CySmusHs.js} +5 -5
- package/dist/{Textarea-BBvpgIQL.js → Textarea-DskjTCcz.js} +3 -3
- package/dist/{Tooltip-BJp-ZMqQ.js → Tooltip-DSfkflHp.js} +2 -2
- package/dist/alert/index.js +15 -15
- package/dist/alert/style.css +1 -1
- package/dist/auto-complete/index.js +4 -4
- package/dist/avatar/index.js +1 -1
- package/dist/badge/index.js +24 -24
- package/dist/badge/style.css +0 -1
- package/dist/block-ui/index.js +1 -1
- package/dist/breadcrumb/index.js +1 -1
- package/dist/button/index.js +9 -9
- package/dist/button/style.css +464 -775
- package/dist/button/style.js +1 -0
- package/dist/calendar/index.js +3 -3
- package/dist/card/index.js +1 -1
- package/dist/carousel/index.js +2 -4
- package/dist/carousel/style.css +457 -775
- package/dist/cascade-select/index.js +5 -5
- package/dist/checkbox/index.js +1 -1
- package/dist/chip/index.js +35 -35
- package/dist/chip/style.css +1 -1
- package/dist/command-menu/index.js +5 -5
- package/dist/components/Alert/Alert.vue.d.ts +2 -2
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Alert/styles.css +1 -1
- package/dist/components/Alert/types.d.ts +3 -3
- package/dist/components/Alert/types.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.d.ts +2 -2
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/styles.css +0 -1
- package/dist/components/Badge/types.d.ts +3 -4
- package/dist/components/Badge/types.d.ts.map +1 -1
- package/dist/components/Button/Button.vue.d.ts +15 -22
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/Button/ButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Button/buttonHelpers.d.ts +25 -0
- package/dist/components/Button/buttonHelpers.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/styles.css +463 -781
- package/dist/components/Button/types.d.ts +63 -61
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Chip/styles.css +1 -1
- package/dist/components/Chip/types.d.ts +3 -3
- package/dist/components/Chip/types.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts +2 -2
- package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/types.d.ts +3 -3
- package/dist/components/ConfirmDialog/types.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/useConfirm.d.ts +1 -1
- package/dist/components/ConfirmDialog/useConfirm.d.ts.map +1 -1
- package/dist/components/ConfirmPopup/ConfirmPopup.vue.d.ts.map +1 -1
- package/dist/components/ConfirmPopup/types.d.ts +3 -3
- package/dist/components/ConfirmPopup/types.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/components/Dialog/styles.css +2 -3
- package/dist/components/Dialog/types.d.ts +4 -5
- package/dist/components/Dialog/types.d.ts.map +1 -1
- package/dist/components/Dialog/useModal.d.ts +2 -2
- package/dist/components/Dialog/useModal.d.ts.map +1 -1
- package/dist/components/Divider/Divider.vue.d.ts +1 -1
- package/dist/components/Mentions/Mentions.vue.d.ts +1 -1
- package/dist/components/Message/Message.vue.d.ts.map +1 -1
- package/dist/components/Message/index.d.ts +1 -1
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/message.d.ts +4 -0
- package/dist/components/Message/message.d.ts.map +1 -1
- package/dist/components/Message/styles.css +7 -9
- package/dist/components/Message/types.d.ts +4 -4
- package/dist/components/Message/types.d.ts.map +1 -1
- package/dist/components/Page/PageFilters.vue.d.ts.map +1 -1
- package/dist/components/Page/PageStat.vue.d.ts +2 -2
- package/dist/components/Page/index.d.ts +1 -1
- package/dist/components/Page/index.d.ts.map +1 -1
- package/dist/components/Page/styles.css +2 -2
- package/dist/components/Page/types.d.ts +2 -2
- package/dist/components/Page/types.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts.map +1 -1
- package/dist/components/ProgressBar/styles.css +1 -1
- package/dist/components/ProgressBar/types.d.ts +2 -7
- package/dist/components/ProgressBar/types.d.ts.map +1 -1
- package/dist/components/QRCode/QRCode.vue.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts +0 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
- package/dist/components/SplitButton/types.d.ts +3 -3
- package/dist/components/SplitButton/types.d.ts.map +1 -1
- package/dist/components/Status/Status.vue.d.ts +2 -2
- package/dist/components/Status/Status.vue.d.ts.map +1 -1
- package/dist/components/Status/index.d.ts +1 -1
- package/dist/components/Status/index.d.ts.map +1 -1
- package/dist/components/Status/styles.css +0 -1
- package/dist/components/Status/types.d.ts +4 -5
- package/dist/components/Status/types.d.ts.map +1 -1
- package/dist/components/Table/Table.vue.d.ts +4 -4
- package/dist/components/Table/Table.vue.d.ts.map +1 -1
- package/dist/components/Table/render/TableThead.vue.d.ts +2 -0
- package/dist/components/Table/render/TableThead.vue.d.ts.map +1 -1
- package/dist/components/Table/state/internal.d.ts +1 -0
- package/dist/components/Table/state/internal.d.ts.map +1 -1
- package/dist/components/Table/styles.css +9 -0
- package/dist/components/Tag/Tag.vue.d.ts +3 -3
- package/dist/components/Tag/index.d.ts +1 -1
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/styles.css +0 -1
- package/dist/components/Tag/types.d.ts +4 -5
- package/dist/components/Tag/types.d.ts.map +1 -1
- package/dist/components/Timeline/Timeline.vue.d.ts.map +1 -1
- package/dist/components/Timeline/index.d.ts +1 -1
- package/dist/components/Timeline/index.d.ts.map +1 -1
- package/dist/components/Timeline/styles.css +2 -4
- package/dist/components/Timeline/types.d.ts +3 -3
- package/dist/components/Timeline/types.d.ts.map +1 -1
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/styles.css +1 -3
- package/dist/components/Toast/toast.d.ts +4 -0
- package/dist/components/Toast/toast.d.ts.map +1 -1
- package/dist/components/Toast/types.d.ts +5 -5
- package/dist/components/Toast/types.d.ts.map +1 -1
- package/dist/components/Toast/useNotification.d.ts +3 -2
- package/dist/components/Toast/useNotification.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts.map +1 -1
- package/dist/{config-COgrsSV2.js → config-BEpyhJi3.js} +12 -5
- package/dist/config-provider/index.js +1 -1
- package/dist/config-provider/style.css +457 -775
- package/dist/confirm-dialog/index.js +62 -59
- package/dist/confirm-dialog/style.css +459 -778
- package/dist/confirm-popup/index.js +18 -15
- package/dist/confirm-popup/style.css +457 -775
- package/dist/context-menu/index.js +5 -5
- package/dist/data-view/index.js +3 -3
- package/dist/date-picker/index.js +1 -1
- package/dist/descriptions/index.js +1 -1
- package/dist/dialog/index.js +126 -116
- package/dist/dialog/style.css +459 -778
- package/dist/dock/index.js +2 -2
- package/dist/drawer/index.js +4 -4
- package/dist/dropdown/index.js +6 -6
- package/dist/empty/index.js +1 -1
- package/dist/fieldset/index.js +1 -1
- package/dist/file-upload/index.js +2 -2
- package/dist/flex/index.js +1 -1
- package/dist/form/index.js +2 -2
- package/dist/gallery/index.js +2 -2
- package/dist/icon/index.js +1 -1
- package/dist/{icon-COrt_N8A.js → icon-H8prbteT.js} +1 -1
- package/dist/image/index.js +2 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4478 -4380
- package/dist/input/index.js +1 -1
- package/dist/input-color/index.js +2 -2
- package/dist/input-number/index.js +3 -3
- package/dist/input-otp/index.js +2 -2
- package/dist/input-password/index.js +4 -4
- package/dist/input-tags/index.js +3 -3
- package/dist/layout/index.js +2 -2
- package/dist/list/index.js +4 -4
- package/dist/listbox/index.js +2 -2
- package/dist/loading/index.js +1 -1
- package/dist/locale-CZddM-tH.js +21 -0
- package/dist/mega-menu/index.js +5 -5
- package/dist/mentions/index.js +4 -4
- package/dist/menu/index.js +6 -6
- package/dist/menubar/index.js +5 -5
- package/dist/message/index.js +116 -117
- package/dist/message/style.css +7 -9
- package/dist/order-list/index.js +2 -2
- package/dist/page/index.js +9 -11
- package/dist/page/style.css +459 -777
- package/dist/pagination/index.js +1 -1
- package/dist/panel/index.js +3 -3
- package/dist/pick-list/index.js +2 -2
- package/dist/popover/index.js +1 -1
- package/dist/progress-bar/index.js +33 -34
- package/dist/progress-bar/style.css +1 -1
- package/dist/progress-spinner/index.js +1 -1
- package/dist/qr-code/index.js +4 -4
- package/dist/qr-code/style.css +457 -775
- package/dist/radio/index.js +1 -1
- package/dist/rating/index.js +3 -3
- package/dist/result/index.js +2 -2
- package/dist/scroll-top/index.js +3 -3
- package/dist/segmented/index.js +1 -1
- package/dist/select/index.js +1 -1
- package/dist/select-button/index.js +1 -1
- package/dist/shared/componentDefaults.d.ts +6 -0
- package/dist/shared/componentDefaults.d.ts.map +1 -1
- package/dist/shared/types.d.ts +7 -20
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/sidebar/index.js +3 -3
- package/dist/slider/index.js +2 -2
- package/dist/space/index.js +1 -1
- package/dist/speed-dial/index.js +5 -5
- package/dist/split-button/index.js +9 -12
- package/dist/split-button/style.css +463 -781
- package/dist/splitter/index.js +1 -1
- package/dist/status/index.js +30 -31
- package/dist/status/style.css +0 -1
- package/dist/stepper/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/table/index.js +1629 -1623
- package/dist/table/style.css +9 -0
- package/dist/tabs/index.js +2 -2
- package/dist/tag/index.js +52 -52
- package/dist/tag/style.css +0 -1
- package/dist/terminal/index.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/tiered-menu/index.js +4 -4
- package/dist/time-picker/index.js +1 -1
- package/dist/timeline/index.js +67 -72
- package/dist/timeline/style.css +2 -4
- package/dist/toast/index.js +135 -136
- package/dist/toast/style.css +458 -778
- package/dist/toggle-button/index.js +3 -3
- package/dist/tooltip/index.js +1 -1
- package/dist/tour/index.js +8 -9
- package/dist/tour/style.css +457 -775
- package/dist/tree/index.js +3 -3
- package/dist/tree-select/index.js +5 -5
- package/dist/{types-DGuu4Eg4.js → types-DBQfGctj.js} +1 -4
- package/dist/typography/index.js +3 -3
- package/dist/{useMotionTransition-S2rlviyZ.js → useMotionTransition-DqL_SEML.js} +1 -1
- package/package.json +1 -1
- package/dist/Button-TaJ0LKtP.js +0 -234
- package/dist/locale-Dnk0UIie.js +0 -21
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
2
|
import { n as t, t as n } from "../overlay-oR-5MDuE.js";
|
|
3
3
|
import { t as r } from "../useFloatingViewportSync-wLLKIGUA.js";
|
|
4
|
-
import { t as i } from "../useMotionTransition-
|
|
5
|
-
import { t as a } from "../Icon-
|
|
4
|
+
import { t as i } from "../useMotionTransition-DqL_SEML.js";
|
|
5
|
+
import { t as a } from "../Icon-CmHjx7W8.js";
|
|
6
6
|
import { t as o } from "../Scrollbar-DTeJ8P5b.js";
|
|
7
|
-
import { t as s } from "../icon-
|
|
7
|
+
import { t as s } from "../icon-H8prbteT.js";
|
|
8
8
|
import { t as c } from "../key-CaQYVkjh.js";
|
|
9
|
-
import { t as l } from "../FlyoutSubmenu-
|
|
10
|
-
import {
|
|
9
|
+
import { t as l } from "../FlyoutSubmenu-C0id6-Sb.js";
|
|
10
|
+
import { l as u } from "../config-BEpyhJi3.js";
|
|
11
11
|
import "./style.js";
|
|
12
12
|
import { Fragment as d, Teleport as f, Transition as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createVNode as y, defineComponent as b, mergeModels as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as E, openBlock as D, ref as O, renderList as k, renderSlot as A, toDisplayString as j, unref as M, useAttrs as N, useModel as P, watch as F, withCtx as I, withModifiers as L } from "vue";
|
|
13
13
|
//#region src/components/ContextMenu/ContextMenuNodes.vue?vue&type=script&setup=true&lang.ts
|
package/dist/data-view/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { t } from "../Loading-
|
|
3
|
-
import { t as n } from "../Pagination-
|
|
4
|
-
import { n as r } from "../locale-
|
|
2
|
+
import { t } from "../Loading-D_qRwfKv.js";
|
|
3
|
+
import { t as n } from "../Pagination-CnGOpp0m.js";
|
|
4
|
+
import { n as r } from "../locale-CZddM-tH.js";
|
|
5
5
|
import "./style.js";
|
|
6
6
|
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useAttrs as b, useSlots as x, watch as S, withCtx as C } from "vue";
|
|
7
7
|
//#region src/components/DataView/DataView.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { o as t } from "../config-
|
|
2
|
+
import { o as t } from "../config-BEpyhJi3.js";
|
|
3
3
|
import "./style.js";
|
|
4
4
|
import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, inject as c, mergeProps as l, normalizeClass as u, normalizeStyle as d, openBlock as f, provide as p, renderSlot as m, toDisplayString as h, toRef as g, unref as _, useAttrs as v, useSlots as y } from "vue";
|
|
5
5
|
//#region src/components/Descriptions/types.ts
|
package/dist/dialog/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
2
|
import { n as t } from "../overlay-oR-5MDuE.js";
|
|
3
|
-
import { t as n } from "../useMotionTransition-
|
|
4
|
-
import { t as r } from "../Icon-
|
|
5
|
-
import { t as i } from "../Button-
|
|
3
|
+
import { t as n } from "../useMotionTransition-DqL_SEML.js";
|
|
4
|
+
import { t as r } from "../Icon-CmHjx7W8.js";
|
|
5
|
+
import { t as i } from "../Button-Bjsth0ct.js";
|
|
6
6
|
import { t as a } from "../useModalOverlay-Beo3CEAt.js";
|
|
7
7
|
import { t as o } from "../asyncGuard-CPGT_TKu.js";
|
|
8
8
|
import { t as s } from "../lastPointer-CRxcUqdd.js";
|
|
9
9
|
import { t as c } from "../overlayHost-78CGtMgR.js";
|
|
10
|
-
import {
|
|
11
|
-
import { n as u } from "../locale-
|
|
10
|
+
import { l } from "../config-BEpyhJi3.js";
|
|
11
|
+
import { n as u } from "../locale-CZddM-tH.js";
|
|
12
12
|
import "./style.js";
|
|
13
|
-
import { Teleport as d, Transition as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createVNode as v, defineComponent as y, h as b, mergeProps as
|
|
13
|
+
import { Teleport as d, Transition as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createVNode as v, defineComponent as y, h as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as ee, onBeforeUnmount as w, openBlock as T, reactive as E, ref as D, render as O, renderSlot as k, toDisplayString as te, toRef as A, unref as j, useAttrs as M, useSlots as N, watch as P, withCtx as F, withModifiers as ne } from "vue";
|
|
14
14
|
//#region src/components/Dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
-
var
|
|
15
|
+
var re = ["aria-modal", "aria-label"], ie = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "m-dialog__header"
|
|
18
|
-
},
|
|
18
|
+
}, ae = { class: "m-dialog__heading" }, oe = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "m-dialog__type-icon",
|
|
21
21
|
"aria-hidden": "true"
|
|
22
|
-
},
|
|
22
|
+
}, se = { key: 0 }, ce = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "m-dialog__actions"
|
|
25
|
-
},
|
|
25
|
+
}, le = ["aria-label", "disabled"], ue = ["aria-label", "disabled"], de = { class: "m-dialog__body" }, I = /* @__PURE__ */ y({
|
|
26
26
|
inheritAttrs: !1,
|
|
27
27
|
__name: "Dialog",
|
|
28
28
|
props: {
|
|
@@ -79,7 +79,7 @@ var ie = ["aria-modal", "aria-label"], ae = {
|
|
|
79
79
|
type: {},
|
|
80
80
|
positiveText: {},
|
|
81
81
|
negativeText: {},
|
|
82
|
-
|
|
82
|
+
positiveColor: {},
|
|
83
83
|
onPositiveClick: {},
|
|
84
84
|
onNegativeClick: {},
|
|
85
85
|
beforeClose: {},
|
|
@@ -98,209 +98,211 @@ var ie = ["aria-modal", "aria-label"], ae = {
|
|
|
98
98
|
"unmaximize"
|
|
99
99
|
],
|
|
100
100
|
setup(c, { expose: y, emit: b }) {
|
|
101
|
-
let
|
|
101
|
+
let S = c, w = b, E = M(), { rootAttrs: O } = e(E, () => S.pt), I = p(() => {
|
|
102
102
|
let e = O.value.style;
|
|
103
103
|
if (e) return typeof e == "string" ? e.match(/(?:^|;)\s*width\s*:\s*([^;]+)/i)?.[1]?.trim() : typeof e.width == "string" ? e.width : void 0;
|
|
104
|
-
}),
|
|
104
|
+
}), L = p(() => {
|
|
105
105
|
let e = { ...O.value }, t = e.style;
|
|
106
|
-
if (!t || !
|
|
106
|
+
if (!t || !I.value) return e;
|
|
107
107
|
if (typeof t == "string") {
|
|
108
108
|
let n = t.replace(/(?:^|;)\s*width\s*:\s*[^;]+/i, "").replace(/^;|;$/g, "").trim();
|
|
109
109
|
return n ? e.style = n : delete e.style, e;
|
|
110
110
|
}
|
|
111
111
|
let { width: n, ...r } = t;
|
|
112
112
|
return Object.keys(r).length ? e.style = r : delete e.style, e;
|
|
113
|
-
}),
|
|
113
|
+
}), R = N(), z = l(), B = u(), V = D(null), H = D(!1), U = D(s()), W = D(null), { transitionName: fe, transitionCss: pe } = n({
|
|
114
114
|
role: "dialog",
|
|
115
|
-
local: () =>
|
|
115
|
+
local: () => S.transition,
|
|
116
116
|
componentName: "Dialog",
|
|
117
117
|
fallback: "zoom"
|
|
118
|
-
}),
|
|
119
|
-
|
|
120
|
-
return e === "warning" || e === "warn" ? "warn" : e;
|
|
121
|
-
}), q = p(() => {
|
|
122
|
-
switch (K.value) {
|
|
118
|
+
}), G = p(() => S.header ?? S.title), K = p(() => t(S, z.value.appendTo)), q = p(() => {
|
|
119
|
+
switch (S.type) {
|
|
123
120
|
case "success": return "check-circle";
|
|
124
|
-
case "
|
|
125
|
-
case "
|
|
121
|
+
case "warning": return "warning";
|
|
122
|
+
case "danger": return "x-circle";
|
|
126
123
|
case "info": return "info";
|
|
127
124
|
default: return;
|
|
128
125
|
}
|
|
129
|
-
}), J = p(() => !
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
126
|
+
}), J = p(() => !R.footer && !!(S.positiveText || S.negativeText)), me = p(() => !!(R.footer || J.value)), he = p(() => {
|
|
127
|
+
let e = S.positiveColor;
|
|
128
|
+
return !e || e === "primary" ? { type: "primary" } : e === "danger" ? {
|
|
129
|
+
type: "primary",
|
|
130
|
+
danger: !0
|
|
131
|
+
} : {
|
|
132
|
+
color: e,
|
|
133
|
+
variant: "solid"
|
|
134
|
+
};
|
|
135
|
+
}), Y = p(() => W.value != null), ge = p(() => S.ariaLabel ?? G.value), X = p(() => ({
|
|
136
|
+
"--m-dialog-origin-x": `${U.value.x}px`,
|
|
137
|
+
"--m-dialog-origin-y": `${U.value.y}px`
|
|
138
|
+
})), _e = p(() => S.centered === !0 ? "center" : S.centered === !1 ? "top" : S.position), ve = p(() => [`m-dialog-backdrop--${_e.value}`, {
|
|
139
|
+
"m-dialog-backdrop--modal": S.modal,
|
|
140
|
+
"m-dialog-backdrop--maximized": H.value
|
|
141
|
+
}]), ye = p(() => {
|
|
142
|
+
if (H.value) return;
|
|
143
|
+
let e = S.width ?? I.value;
|
|
138
144
|
return e ? { width: e } : void 0;
|
|
139
|
-
}), be = p(() =>
|
|
145
|
+
}), be = p(() => S.maskClosable === void 0 ? S.dismissableMask === void 0 ? S.closeOnOutsideClick === void 0 || S.closeOnOutsideClick : S.dismissableMask : S.maskClosable);
|
|
140
146
|
function Z() {
|
|
141
|
-
|
|
147
|
+
H.value = !1, W.value = null, w("update:modelValue", !1), w("close");
|
|
142
148
|
}
|
|
143
149
|
async function Q() {
|
|
144
|
-
if (!
|
|
145
|
-
if (!
|
|
150
|
+
if (!W.value) {
|
|
151
|
+
if (!S.beforeClose) {
|
|
146
152
|
Z();
|
|
147
153
|
return;
|
|
148
154
|
}
|
|
149
|
-
|
|
155
|
+
W.value = "close";
|
|
150
156
|
try {
|
|
151
|
-
if (!await o(
|
|
157
|
+
if (!await o(S.beforeClose)) return;
|
|
152
158
|
Z();
|
|
153
159
|
} finally {
|
|
154
|
-
|
|
160
|
+
W.value === "close" && (W.value = null);
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
163
|
}
|
|
158
164
|
async function xe(e) {
|
|
159
|
-
if (!
|
|
160
|
-
|
|
165
|
+
if (!W.value) {
|
|
166
|
+
W.value = "positive";
|
|
161
167
|
try {
|
|
162
|
-
if (!await o(
|
|
168
|
+
if (!await o(S.onPositiveClick, e)) return;
|
|
163
169
|
Z();
|
|
164
170
|
} finally {
|
|
165
|
-
|
|
171
|
+
W.value === "positive" && (W.value = null);
|
|
166
172
|
}
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
async function Se(e) {
|
|
170
|
-
if (!
|
|
171
|
-
|
|
176
|
+
if (!W.value) {
|
|
177
|
+
W.value = "negative";
|
|
172
178
|
try {
|
|
173
|
-
if (!await o(
|
|
179
|
+
if (!await o(S.onNegativeClick, e)) return;
|
|
174
180
|
Z();
|
|
175
181
|
} finally {
|
|
176
|
-
|
|
182
|
+
W.value === "negative" && (W.value = null);
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
185
|
}
|
|
180
186
|
function $() {
|
|
181
|
-
|
|
187
|
+
H.value = !H.value, H.value ? w("maximize") : w("unmaximize");
|
|
182
188
|
}
|
|
183
189
|
function Ce() {
|
|
184
190
|
be.value && Q();
|
|
185
191
|
}
|
|
186
|
-
return P(() =>
|
|
187
|
-
e && (
|
|
192
|
+
return P(() => S.modelValue, (e) => {
|
|
193
|
+
e && (U.value = s());
|
|
188
194
|
}), a({
|
|
189
|
-
open: A(
|
|
190
|
-
container:
|
|
191
|
-
closeOnEsc: A(
|
|
192
|
-
blockScroll: () =>
|
|
195
|
+
open: A(S, "modelValue"),
|
|
196
|
+
container: V,
|
|
197
|
+
closeOnEsc: A(S, "closeOnEsc"),
|
|
198
|
+
blockScroll: () => S.blockScroll && S.modal,
|
|
193
199
|
onEscape: () => {
|
|
194
200
|
Q();
|
|
195
201
|
},
|
|
196
202
|
onOpen: () => w("show"),
|
|
197
203
|
onClose: () => {
|
|
198
|
-
|
|
204
|
+
H.value = !1, w("hide");
|
|
199
205
|
}
|
|
200
206
|
}), y({
|
|
201
207
|
close: Q,
|
|
202
208
|
maximize: () => {
|
|
203
|
-
|
|
209
|
+
H.value || $();
|
|
204
210
|
},
|
|
205
211
|
unmaximize: () => {
|
|
206
|
-
|
|
212
|
+
H.value && $();
|
|
207
213
|
}
|
|
208
214
|
}), (e, t) => (T(), m(d, {
|
|
209
|
-
to:
|
|
210
|
-
disabled:
|
|
215
|
+
to: K.value.to,
|
|
216
|
+
disabled: K.value.disabled
|
|
211
217
|
}, [v(f, {
|
|
212
|
-
name: j(
|
|
213
|
-
css: j(
|
|
218
|
+
name: j(fe),
|
|
219
|
+
css: j(pe)
|
|
214
220
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
class: ["m-dialog-backdrop",
|
|
217
|
-
style:
|
|
221
|
+
default: F(() => [c.modelValue ? (T(), g("div", x({ key: 0 }, L.value, {
|
|
222
|
+
class: ["m-dialog-backdrop", ve.value],
|
|
223
|
+
style: X.value
|
|
218
224
|
}), [_("div", {
|
|
219
225
|
class: "m-dialog-zoom",
|
|
220
|
-
onClick:
|
|
226
|
+
onClick: ne(Ce, ["self"])
|
|
221
227
|
}, [_("section", {
|
|
222
228
|
ref_key: "dialogElement",
|
|
223
|
-
ref:
|
|
224
|
-
class:
|
|
225
|
-
"m-dialog--maximized":
|
|
226
|
-
[`m-dialog--${
|
|
229
|
+
ref: V,
|
|
230
|
+
class: C(["m-dialog", {
|
|
231
|
+
"m-dialog--maximized": H.value,
|
|
232
|
+
[`m-dialog--${S.type}`]: S.type
|
|
227
233
|
}]),
|
|
228
|
-
style:
|
|
234
|
+
style: ee(ye.value),
|
|
229
235
|
role: "dialog",
|
|
230
236
|
"aria-modal": c.modal || void 0,
|
|
231
237
|
"aria-label": ge.value,
|
|
232
238
|
tabindex: "-1"
|
|
233
239
|
}, [
|
|
234
|
-
e.$slots.header ||
|
|
240
|
+
e.$slots.header || G.value || q.value || c.closable || c.maximizable ? (T(), g("header", ie, [_("div", ae, [q.value ? (T(), g("span", oe, [v(r, {
|
|
235
241
|
name: q.value,
|
|
236
242
|
size: "sm"
|
|
237
|
-
}, null, 8, ["name"])])) : h("", !0), k(e.$slots, "header", {}, () => [
|
|
243
|
+
}, null, 8, ["name"])])) : h("", !0), k(e.$slots, "header", {}, () => [G.value ? (T(), g("h2", se, te(G.value), 1)) : h("", !0)])]), c.maximizable || c.closable ? (T(), g("div", ce, [c.maximizable ? (T(), g("button", {
|
|
238
244
|
key: 0,
|
|
239
245
|
type: "button",
|
|
240
246
|
class: "m-dialog__action",
|
|
241
|
-
"aria-label":
|
|
247
|
+
"aria-label": H.value ? j(B).restore : j(B).maximize,
|
|
242
248
|
disabled: Y.value,
|
|
243
249
|
onClick: $
|
|
244
250
|
}, [v(r, {
|
|
245
|
-
name:
|
|
251
|
+
name: H.value ? "restore" : "maximize",
|
|
246
252
|
size: "sm"
|
|
247
|
-
}, null, 8, ["name"])], 8,
|
|
253
|
+
}, null, 8, ["name"])], 8, le)) : h("", !0), c.closable ? (T(), g("button", {
|
|
248
254
|
key: 1,
|
|
249
255
|
type: "button",
|
|
250
256
|
class: "m-dialog__action",
|
|
251
|
-
"aria-label": j(
|
|
257
|
+
"aria-label": j(B).close,
|
|
252
258
|
disabled: Y.value,
|
|
253
259
|
onClick: Q
|
|
254
260
|
}, [v(r, {
|
|
255
261
|
name: "close",
|
|
256
262
|
size: "sm"
|
|
257
|
-
})], 8,
|
|
258
|
-
_("div",
|
|
259
|
-
|
|
263
|
+
})], 8, ue)) : h("", !0)])) : h("", !0)])) : h("", !0),
|
|
264
|
+
_("div", de, [k(e.$slots, "default")]),
|
|
265
|
+
me.value ? (T(), g("footer", {
|
|
260
266
|
key: 1,
|
|
261
|
-
class:
|
|
267
|
+
class: C(["m-dialog__footer", { "m-dialog__footer--preset": J.value }])
|
|
262
268
|
}, [k(e.$slots, "footer", {}, () => [c.negativeText ? (T(), m(i, {
|
|
263
269
|
key: 0,
|
|
264
270
|
label: c.negativeText,
|
|
265
|
-
severity: "secondary",
|
|
266
271
|
disabled: Y.value,
|
|
267
|
-
loading:
|
|
272
|
+
loading: W.value === "negative",
|
|
268
273
|
onClick: Se
|
|
269
274
|
}, null, 8, [
|
|
270
275
|
"label",
|
|
271
276
|
"disabled",
|
|
272
277
|
"loading"
|
|
273
|
-
])) : h("", !0), c.positiveText ? (T(), m(i, {
|
|
274
|
-
key: 1,
|
|
278
|
+
])) : h("", !0), c.positiveText ? (T(), m(i, x({ key: 1 }, he.value, {
|
|
275
279
|
label: c.positiveText,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
loading: U.value === "positive",
|
|
280
|
+
disabled: Y.value && W.value !== "positive",
|
|
281
|
+
loading: W.value === "positive",
|
|
279
282
|
onClick: xe
|
|
280
|
-
}, null,
|
|
283
|
+
}), null, 16, [
|
|
281
284
|
"label",
|
|
282
|
-
"severity",
|
|
283
285
|
"disabled",
|
|
284
286
|
"loading"
|
|
285
287
|
])) : h("", !0)])], 2)) : h("", !0)
|
|
286
|
-
], 14,
|
|
288
|
+
], 14, re)])], 16)) : h("", !0)]),
|
|
287
289
|
_: 3
|
|
288
290
|
}, 8, ["name", "css"])], 8, ["to", "disabled"]));
|
|
289
291
|
}
|
|
290
|
-
}),
|
|
291
|
-
function
|
|
292
|
+
}), L = /* @__PURE__ */ new Set();
|
|
293
|
+
function R(e) {
|
|
292
294
|
return typeof e == "string" ? { content: e } : { ...e };
|
|
293
295
|
}
|
|
294
|
-
function
|
|
296
|
+
function z(e) {
|
|
295
297
|
if (typeof document > "u") return {
|
|
296
298
|
destroy: () => {},
|
|
297
299
|
update: () => {}
|
|
298
300
|
};
|
|
299
301
|
let t = document.createElement("div");
|
|
300
302
|
document.body.appendChild(t);
|
|
301
|
-
let n = E(
|
|
303
|
+
let n = E(R(e)), r = D(!0), a = D(!1), o = !1;
|
|
302
304
|
function s() {
|
|
303
|
-
o || (o = !0,
|
|
305
|
+
o || (o = !0, L.delete(h), t.remove(), S(() => O(null, t)));
|
|
304
306
|
}
|
|
305
307
|
function l() {
|
|
306
308
|
r.value = !1;
|
|
@@ -327,7 +329,7 @@ function R(e) {
|
|
|
327
329
|
name: "MModalHost",
|
|
328
330
|
setup() {
|
|
329
331
|
let e = u();
|
|
330
|
-
return () => b(
|
|
332
|
+
return () => b(I, {
|
|
331
333
|
modelValue: r.value,
|
|
332
334
|
"onUpdate:modelValue": (e) => {
|
|
333
335
|
r.value = e;
|
|
@@ -343,15 +345,23 @@ function R(e) {
|
|
|
343
345
|
onHide: p
|
|
344
346
|
}, {
|
|
345
347
|
default: () => n.content,
|
|
346
|
-
footer: () =>
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
348
|
+
footer: () => {
|
|
349
|
+
let t = n.okColor ?? "primary", r = t === "primary" ? { type: "primary" } : t === "danger" ? {
|
|
350
|
+
type: "primary",
|
|
351
|
+
danger: !0
|
|
352
|
+
} : {
|
|
353
|
+
color: t,
|
|
354
|
+
variant: "solid"
|
|
355
|
+
};
|
|
356
|
+
return [n.showCancel ? b(i, {
|
|
357
|
+
disabled: a.value,
|
|
358
|
+
onClick: f
|
|
359
|
+
}, { default: () => n.cancelText ?? e.value.reject ?? "Cancel" }) : null, b(i, {
|
|
360
|
+
...r,
|
|
361
|
+
loading: a.value,
|
|
362
|
+
onClick: () => void d()
|
|
363
|
+
}, { default: () => n.okText ?? e.value.confirm ?? "OK" })];
|
|
364
|
+
}
|
|
355
365
|
});
|
|
356
366
|
}
|
|
357
367
|
}), h = {
|
|
@@ -359,16 +369,16 @@ function R(e) {
|
|
|
359
369
|
r.value = !1, s();
|
|
360
370
|
},
|
|
361
371
|
update: (e) => {
|
|
362
|
-
Object.assign(n,
|
|
372
|
+
Object.assign(n, R(e));
|
|
363
373
|
}
|
|
364
374
|
}, g = v(m), _ = c();
|
|
365
|
-
return _ && (g.appContext = _), O(g, t),
|
|
375
|
+
return _ && (g.appContext = _), O(g, t), L.add(h), h;
|
|
366
376
|
}
|
|
367
|
-
function
|
|
377
|
+
function B() {
|
|
368
378
|
function e(e) {
|
|
369
|
-
return (t) =>
|
|
379
|
+
return (t) => z({
|
|
370
380
|
...e,
|
|
371
|
-
...
|
|
381
|
+
...R(t)
|
|
372
382
|
});
|
|
373
383
|
}
|
|
374
384
|
return {
|
|
@@ -385,20 +395,20 @@ function z() {
|
|
|
385
395
|
showCancel: !1
|
|
386
396
|
}),
|
|
387
397
|
error: e({
|
|
388
|
-
type: "
|
|
398
|
+
type: "danger",
|
|
389
399
|
showCancel: !1
|
|
390
400
|
}),
|
|
391
401
|
confirm: e({ showCancel: !0 }),
|
|
392
402
|
destroyAll: () => {
|
|
393
|
-
for (let e of [...
|
|
403
|
+
for (let e of [...L]) e.destroy();
|
|
394
404
|
}
|
|
395
405
|
};
|
|
396
406
|
}
|
|
397
|
-
var
|
|
398
|
-
function
|
|
407
|
+
var V = B();
|
|
408
|
+
function H() {
|
|
399
409
|
w(() => {
|
|
400
|
-
for (let e of [...
|
|
410
|
+
for (let e of [...L]) e.destroy();
|
|
401
411
|
});
|
|
402
412
|
}
|
|
403
413
|
//#endregion
|
|
404
|
-
export {
|
|
414
|
+
export { I as MDialog, V as modal, B as useModal, H as useModalCleanup };
|