morya-ui 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -2
- package/dist/Button-BaYLh91a.js +326 -0
- package/dist/{Checkbox-BKt8hdhV.js → Checkbox-LxCFF19I.js} +1 -1
- package/dist/{DatePicker-CSoMFEvh.js → DatePicker-DGPNukEW.js} +3 -3
- package/dist/{Empty-iNcc0G-q.js → Empty-2_f_FgyK.js} +1 -1
- package/dist/{FlyoutSubmenu-C1RfFRzH.js → FlyoutSubmenu-Da6AcoM4.js} +1 -1
- package/dist/{Input-DQHYqvNk.js → Input-NspPDc2R.js} +2 -2
- package/dist/{Loading-BPpR-jGa.js → Loading-BK4dQPCS.js} +10 -10
- package/dist/{Pagination-BkPBWEQq.js → Pagination-tdrlaZ3u.js} +2 -2
- package/dist/{Popover-B_2c9NWs.js → Popover-BumMfUpV.js} +2 -2
- package/dist/{ProgressSpinner-B_OJG_0l.js → ProgressSpinner-BQ1tLioO.js} +1 -1
- package/dist/{Radio-Bxd806ys.js → Radio-BCn2OVCF.js} +1 -1
- package/dist/{Segmented-BRMSmXCl.js → Segmented-ppmDmku5.js} +1 -1
- package/dist/{Select-DzfyO0FE.js → Select-CN1tM76U.js} +8 -6
- package/dist/{Textarea-BBvpgIQL.js → Textarea-Ch1KCXEv.js} +2 -2
- package/dist/{Tooltip-BJp-ZMqQ.js → Tooltip-DKsXxU_B.js} +2 -2
- package/dist/accordion/style.css +39 -20
- package/dist/affix/style.css +39 -20
- package/dist/alert/index.js +2 -2
- package/dist/alert/style.css +39 -20
- package/dist/anchor/style.css +39 -20
- package/dist/auto-complete/index.js +3 -3
- package/dist/auto-complete/style.css +42 -21
- package/dist/avatar/style.css +39 -20
- package/dist/badge/index.js +29 -28
- package/dist/badge/style.css +39 -20
- package/dist/block-ui/index.js +1 -1
- package/dist/block-ui/style.css +39 -20
- package/dist/breadcrumb/index.js +1 -1
- package/dist/breadcrumb/style.css +39 -20
- package/dist/button/index.js +9 -9
- package/dist/button/style.css +503 -795
- package/dist/button/style.js +1 -0
- package/dist/calendar/index.js +3 -3
- package/dist/calendar/style.css +49 -24
- package/dist/card/style.css +40 -21
- package/dist/carousel/index.js +311 -119
- package/dist/carousel/style.css +987 -117
- package/dist/carousel/style.js +1 -1
- package/dist/cascade-select/index.js +4 -4
- package/dist/cascade-select/style.css +54 -22
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/style.css +41 -21
- package/dist/chip/index.js +39 -36
- package/dist/chip/style.css +39 -20
- package/dist/command-menu/index.js +3 -3
- package/dist/command-menu/style.css +39 -20
- package/dist/component-registry.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/types.d.ts +3 -0
- 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 +67 -61
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/styles.css +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts +41 -11
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselItem.vue.d.ts +16 -0
- package/dist/components/Carousel/CarouselItem.vue.d.ts.map +1 -0
- package/dist/components/Carousel/context.d.ts +10 -0
- package/dist/components/Carousel/context.d.ts.map +1 -0
- package/dist/components/Carousel/index.d.ts +2 -1
- package/dist/components/Carousel/index.d.ts.map +1 -1
- package/dist/components/Carousel/styles.css +250 -49
- package/dist/components/Carousel/types.d.ts +64 -9
- package/dist/components/Carousel/types.d.ts.map +1 -1
- package/dist/components/CascadeSelect/styles.css +12 -1
- package/dist/components/Checkbox/styles.css +2 -1
- package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
- package/dist/components/Chip/types.d.ts +3 -0
- 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 +2 -2
- 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/DatePicker/styles.css +2 -1
- package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/components/Dialog/types.d.ts +3 -3
- 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/Divider/Divider.vue.d.ts.map +1 -1
- package/dist/components/Divider/types.d.ts +3 -0
- package/dist/components/Divider/types.d.ts.map +1 -1
- package/dist/components/IconField/styles.css +1 -1
- package/dist/components/Input/styles.css +20 -8
- package/dist/components/InputColor/styles.css +10 -0
- package/dist/components/InputNumber/styles.css +2 -1
- package/dist/components/InputOtp/styles.css +8 -0
- package/dist/components/InputPassword/styles.css +1 -1
- package/dist/components/InputTags/styles.css +9 -0
- package/dist/components/Layout/styles.css +1 -1
- package/dist/components/Listbox/styles.css +3 -0
- package/dist/components/Mentions/Mentions.vue.d.ts +1 -1
- package/dist/components/Mentions/styles.css +13 -4
- package/dist/components/Message/styles.css +4 -2
- package/dist/components/Page/PageFilters.vue.d.ts.map +1 -1
- package/dist/components/Pagination/styles.css +3 -2
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts.map +1 -1
- package/dist/components/ProgressBar/types.d.ts +3 -0
- package/dist/components/ProgressBar/types.d.ts.map +1 -1
- package/dist/components/QRCode/QRCode.vue.d.ts.map +1 -1
- package/dist/components/Radio/styles.css +2 -1
- package/dist/components/Result/styles.css +1 -1
- package/dist/components/Select/Select.vue.d.ts +1 -1
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Select/styles.css +8 -3
- package/dist/components/SelectButton/styles.css +2 -0
- 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/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 +1 -1
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Tag/styles.css +10 -8
- package/dist/components/Tag/types.d.ts +3 -0
- package/dist/components/Tag/types.d.ts.map +1 -1
- package/dist/components/Terminal/styles.css +1 -0
- package/dist/components/Textarea/styles.css +18 -7
- package/dist/components/ToggleButton/styles.css +2 -1
- package/dist/components/Tour/Tour.vue.d.ts.map +1 -1
- package/dist/components/Tree/Tree.vue.d.ts +1 -1
- package/dist/components/TreeSelect/styles.css +12 -1
- package/dist/{config-COgrsSV2.js → config-CB_TiIvg.js} +11 -4
- package/dist/config-provider/index.js +141 -120
- package/dist/config-provider/style.css +514 -801
- package/dist/confirm-dialog/index.js +45 -39
- package/dist/confirm-dialog/style.css +496 -795
- package/dist/confirm-popup/index.js +17 -14
- package/dist/confirm-popup/style.css +496 -795
- package/dist/context-menu/index.js +3 -3
- package/dist/context-menu/style.css +39 -20
- package/dist/data-view/index.js +3 -3
- package/dist/data-view/style.css +42 -22
- package/dist/date-picker/index.js +1 -1
- package/dist/date-picker/style.css +41 -21
- package/dist/descriptions/index.js +1 -1
- package/dist/descriptions/style.css +39 -20
- package/dist/dialog/index.js +68 -55
- package/dist/dialog/style.css +496 -795
- package/dist/divider/index.js +25 -22
- package/dist/divider/style.css +39 -20
- package/dist/dock/style.css +39 -20
- package/dist/drawer/index.js +3 -3
- package/dist/drawer/style.css +39 -20
- package/dist/dropdown/index.js +4 -4
- package/dist/dropdown/style.css +39 -20
- package/dist/empty/index.js +1 -1
- package/dist/empty/style.css +39 -20
- package/dist/fieldset/style.css +39 -20
- package/dist/file-upload/index.js +1 -1
- package/dist/file-upload/style.css +39 -20
- package/dist/flex/index.js +8 -8
- package/dist/flex/style.css +39 -20
- package/dist/float-label/style.css +39 -20
- package/dist/fluid/style.css +39 -20
- package/dist/form/index.js +1 -1
- package/dist/form/style.css +39 -20
- package/dist/gallery/index.js +1 -1
- package/dist/gallery/style.css +39 -20
- package/dist/grid/index.js +5 -5
- package/dist/grid/style.css +39 -20
- package/dist/icon/style.css +39 -20
- package/dist/icon-field/style.css +60 -29
- package/dist/image/index.js +1 -1
- package/dist/image/style.css +39 -20
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6500 -6163
- package/dist/inplace/style.css +39 -20
- package/dist/input/index.js +1 -1
- package/dist/input/style.css +59 -28
- package/dist/input-color/index.js +2 -2
- package/dist/input-color/style.css +49 -20
- package/dist/input-group/style.css +39 -20
- package/dist/input-number/index.js +2 -2
- package/dist/input-number/style.css +41 -21
- package/dist/input-otp/index.js +2 -2
- package/dist/input-otp/style.css +47 -20
- package/dist/input-password/index.js +2 -2
- package/dist/input-password/style.css +40 -21
- package/dist/input-tags/index.js +2 -2
- package/dist/input-tags/style.css +48 -20
- package/dist/knob/style.css +39 -20
- package/dist/label/style.css +39 -20
- package/dist/layout/index.js +1 -1
- package/dist/layout/style.css +40 -21
- package/dist/list/index.js +4 -4
- package/dist/list/style.css +42 -22
- package/dist/listbox/index.js +2 -2
- package/dist/listbox/style.css +42 -20
- package/dist/loading/index.js +1 -1
- package/dist/loading/style.css +39 -20
- package/dist/locale-CR2PIaxt.js +21 -0
- package/dist/mega-menu/index.js +3 -3
- package/dist/mega-menu/style.css +39 -20
- package/dist/mentions/index.js +3 -3
- package/dist/mentions/style.css +52 -24
- package/dist/menu/index.js +4 -4
- package/dist/menu/style.css +39 -20
- package/dist/menubar/index.js +3 -3
- package/dist/menubar/style.css +39 -20
- package/dist/message/index.js +3 -3
- package/dist/message/style.css +43 -22
- package/dist/meter-group/style.css +39 -20
- package/dist/order-list/index.js +1 -1
- package/dist/order-list/style.css +39 -20
- package/dist/page/index.js +4 -7
- package/dist/page/style.css +497 -796
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/style.css +50 -25
- package/dist/panel/index.js +1 -1
- package/dist/panel/style.css +39 -20
- package/dist/pick-list/index.js +1 -1
- package/dist/pick-list/style.css +39 -20
- package/dist/popover/index.js +1 -1
- package/dist/popover/style.css +39 -20
- package/dist/progress-bar/index.js +38 -35
- package/dist/progress-bar/style.css +39 -20
- package/dist/progress-spinner/index.js +1 -1
- package/dist/progress-spinner/style.css +39 -20
- package/dist/qr-code/index.js +3 -3
- package/dist/qr-code/style.css +496 -795
- package/dist/radio/index.js +1 -1
- package/dist/radio/style.css +41 -21
- package/dist/rating/index.js +2 -2
- package/dist/rating/style.css +39 -20
- package/dist/resolver-map.d.ts.map +1 -1
- package/dist/resolver.js +1 -0
- package/dist/result/index.js +1 -1
- package/dist/result/style.css +40 -21
- package/dist/scroll-top/index.js +2 -2
- package/dist/scroll-top/style.css +39 -20
- package/dist/scrollbar/style.css +39 -20
- package/dist/segmented/index.js +1 -1
- package/dist/segmented/style.css +39 -20
- package/dist/select/index.js +1 -1
- package/dist/select/style.css +50 -24
- package/dist/select-button/index.js +1 -1
- package/dist/select-button/style.css +41 -20
- package/dist/shared/componentDefaults.d.ts +6 -0
- package/dist/shared/componentDefaults.d.ts.map +1 -1
- package/dist/shared/styles/select-overlay.css +3 -1
- package/dist/sidebar/index.js +1 -1
- package/dist/sidebar/style.css +39 -20
- package/dist/skeleton/style.css +39 -20
- package/dist/slider/index.js +2 -2
- package/dist/slider/style.css +39 -20
- package/dist/space/index.js +8 -8
- package/dist/space/style.css +39 -20
- package/dist/speed-dial/index.js +3 -3
- package/dist/speed-dial/style.css +39 -20
- package/dist/split-button/index.js +7 -10
- package/dist/split-button/style.css +502 -801
- package/dist/splitter/index.js +1 -1
- package/dist/splitter/style.css +39 -20
- package/dist/statistic/style.css +39 -20
- package/dist/status/index.js +1 -1
- package/dist/status/style.css +39 -20
- package/dist/stepper/style.css +39 -20
- package/dist/styles/base.css +19 -7
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/switch/style.css +39 -20
- package/dist/table/index.js +1628 -1622
- package/dist/table/style.css +51 -22
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/style.css +39 -20
- package/dist/tag/index.js +57 -54
- package/dist/tag/style.css +49 -28
- package/dist/terminal/index.js +1 -1
- package/dist/terminal/style.css +40 -20
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/style.css +57 -27
- package/dist/theme/color.d.ts +5 -0
- package/dist/theme/color.d.ts.map +1 -1
- package/dist/theme/derive.d.ts.map +1 -1
- package/dist/theme/seed.d.ts +2 -2
- package/dist/theme/styles.css +20 -13
- package/dist/tiered-menu/index.js +3 -3
- package/dist/tiered-menu/style.css +39 -20
- package/dist/time-picker/index.js +1 -1
- package/dist/time-picker/style.css +41 -21
- package/dist/timeline/style.css +39 -20
- package/dist/toast/index.js +3 -3
- package/dist/toast/style.css +496 -795
- package/dist/toggle-button/index.js +1 -1
- package/dist/toggle-button/style.css +41 -21
- package/dist/toolbar/style.css +39 -20
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/style.css +39 -20
- package/dist/tour/index.js +7 -8
- package/dist/tour/style.css +496 -795
- package/dist/tree/index.js +2 -2
- package/dist/tree/style.css +41 -21
- package/dist/tree-select/index.js +4 -4
- package/dist/tree-select/style.css +56 -23
- package/dist/typography/index.js +2 -2
- package/dist/typography/style.css +57 -27
- package/dist/{useMotionTransition-S2rlviyZ.js → useMotionTransition-D8JOR3ih.js} +1 -1
- package/dist/virtual-scroller/style.css +39 -20
- package/dist/watermark/style.css +39 -20
- package/package.json +1 -1
- package/dist/Button-TaJ0LKtP.js +0 -234
- package/dist/locale-Dnk0UIie.js +0 -21
package/dist/dialog/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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-
|
|
3
|
+
import { t as n } from "../useMotionTransition-D8JOR3ih.js";
|
|
4
4
|
import { t as r } from "../Icon-od9Ob-Ay.js";
|
|
5
|
-
import { t as i } from "../Button-
|
|
5
|
+
import { t as i } from "../Button-BaYLh91a.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-CB_TiIvg.js";
|
|
11
|
+
import { n as u } from "../locale-CR2PIaxt.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 ne, useSlots as M, watch as N, withCtx as P, withModifiers as re } from "vue";
|
|
14
14
|
//#region src/components/Dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
15
15
|
var ie = ["aria-modal", "aria-label"], ae = {
|
|
16
16
|
key: 0,
|
|
@@ -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,7 +98,7 @@ 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 = ne(), { rootAttrs: O } = e(E, () => S.pt), F = 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
|
}), I = p(() => {
|
|
@@ -110,13 +110,13 @@ var ie = ["aria-modal", "aria-label"], ae = {
|
|
|
110
110
|
}
|
|
111
111
|
let { width: n, ...r } = t;
|
|
112
112
|
return Object.keys(r).length ? e.style = r : delete e.style, e;
|
|
113
|
-
}), L =
|
|
113
|
+
}), L = M(), R = l(), z = u(), B = D(null), V = D(!1), H = D(s()), U = D(null), { transitionName: pe, transitionCss: me } = n({
|
|
114
114
|
role: "dialog",
|
|
115
|
-
local: () =>
|
|
115
|
+
local: () => S.transition,
|
|
116
116
|
componentName: "Dialog",
|
|
117
117
|
fallback: "zoom"
|
|
118
|
-
}), W = p(() =>
|
|
119
|
-
let e =
|
|
118
|
+
}), W = p(() => S.header ?? S.title), G = p(() => t(S, R.value.appendTo)), K = p(() => {
|
|
119
|
+
let e = S.type;
|
|
120
120
|
return e === "warning" || e === "warn" ? "warn" : e;
|
|
121
121
|
}), q = p(() => {
|
|
122
122
|
switch (K.value) {
|
|
@@ -126,51 +126,60 @@ var ie = ["aria-modal", "aria-label"], ae = {
|
|
|
126
126
|
case "info": return "info";
|
|
127
127
|
default: return;
|
|
128
128
|
}
|
|
129
|
-
}), J = p(() => !L.footer && !!(
|
|
129
|
+
}), J = p(() => !L.footer && !!(S.positiveText || S.negativeText)), he = p(() => !!(L.footer || J.value)), ge = p(() => {
|
|
130
|
+
let e = S.positiveColor;
|
|
131
|
+
return !e || e === "primary" ? { type: "primary" } : e === "danger" ? {
|
|
132
|
+
type: "primary",
|
|
133
|
+
danger: !0
|
|
134
|
+
} : {
|
|
135
|
+
color: e,
|
|
136
|
+
variant: "solid"
|
|
137
|
+
};
|
|
138
|
+
}), Y = p(() => U.value != null), _e = p(() => S.ariaLabel ?? W.value), ve = p(() => ({
|
|
130
139
|
"--m-dialog-origin-x": `${H.value.x}px`,
|
|
131
140
|
"--m-dialog-origin-y": `${H.value.y}px`
|
|
132
|
-
})),
|
|
133
|
-
"m-dialog-backdrop--modal":
|
|
141
|
+
})), ye = p(() => S.centered === !0 ? "center" : S.centered === !1 ? "top" : S.position), X = p(() => [`m-dialog-backdrop--${ye.value}`, {
|
|
142
|
+
"m-dialog-backdrop--modal": S.modal,
|
|
134
143
|
"m-dialog-backdrop--maximized": V.value
|
|
135
|
-
}]),
|
|
144
|
+
}]), be = p(() => {
|
|
136
145
|
if (V.value) return;
|
|
137
|
-
let e =
|
|
146
|
+
let e = S.width ?? F.value;
|
|
138
147
|
return e ? { width: e } : void 0;
|
|
139
|
-
}),
|
|
148
|
+
}), xe = p(() => S.maskClosable === void 0 ? S.dismissableMask === void 0 ? S.closeOnOutsideClick === void 0 || S.closeOnOutsideClick : S.dismissableMask : S.maskClosable);
|
|
140
149
|
function Z() {
|
|
141
150
|
V.value = !1, U.value = null, w("update:modelValue", !1), w("close");
|
|
142
151
|
}
|
|
143
152
|
async function Q() {
|
|
144
153
|
if (!U.value) {
|
|
145
|
-
if (!
|
|
154
|
+
if (!S.beforeClose) {
|
|
146
155
|
Z();
|
|
147
156
|
return;
|
|
148
157
|
}
|
|
149
158
|
U.value = "close";
|
|
150
159
|
try {
|
|
151
|
-
if (!await o(
|
|
160
|
+
if (!await o(S.beforeClose)) return;
|
|
152
161
|
Z();
|
|
153
162
|
} finally {
|
|
154
163
|
U.value === "close" && (U.value = null);
|
|
155
164
|
}
|
|
156
165
|
}
|
|
157
166
|
}
|
|
158
|
-
async function
|
|
167
|
+
async function Se(e) {
|
|
159
168
|
if (!U.value) {
|
|
160
169
|
U.value = "positive";
|
|
161
170
|
try {
|
|
162
|
-
if (!await o(
|
|
171
|
+
if (!await o(S.onPositiveClick, e)) return;
|
|
163
172
|
Z();
|
|
164
173
|
} finally {
|
|
165
174
|
U.value === "positive" && (U.value = null);
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
|
-
async function
|
|
178
|
+
async function Ce(e) {
|
|
170
179
|
if (!U.value) {
|
|
171
180
|
U.value = "negative";
|
|
172
181
|
try {
|
|
173
|
-
if (!await o(
|
|
182
|
+
if (!await o(S.onNegativeClick, e)) return;
|
|
174
183
|
Z();
|
|
175
184
|
} finally {
|
|
176
185
|
U.value === "negative" && (U.value = null);
|
|
@@ -180,16 +189,16 @@ var ie = ["aria-modal", "aria-label"], ae = {
|
|
|
180
189
|
function $() {
|
|
181
190
|
V.value = !V.value, V.value ? w("maximize") : w("unmaximize");
|
|
182
191
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
192
|
+
function we() {
|
|
193
|
+
xe.value && Q();
|
|
185
194
|
}
|
|
186
|
-
return
|
|
195
|
+
return N(() => S.modelValue, (e) => {
|
|
187
196
|
e && (H.value = s());
|
|
188
197
|
}), a({
|
|
189
|
-
open: A(
|
|
198
|
+
open: A(S, "modelValue"),
|
|
190
199
|
container: B,
|
|
191
|
-
closeOnEsc: A(
|
|
192
|
-
blockScroll: () =>
|
|
200
|
+
closeOnEsc: A(S, "closeOnEsc"),
|
|
201
|
+
blockScroll: () => S.blockScroll && S.modal,
|
|
193
202
|
onEscape: () => {
|
|
194
203
|
Q();
|
|
195
204
|
},
|
|
@@ -212,23 +221,23 @@ var ie = ["aria-modal", "aria-label"], ae = {
|
|
|
212
221
|
name: j(pe),
|
|
213
222
|
css: j(me)
|
|
214
223
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
class: ["m-dialog-backdrop",
|
|
217
|
-
style:
|
|
224
|
+
default: P(() => [c.modelValue ? (T(), g("div", x({ key: 0 }, I.value, {
|
|
225
|
+
class: ["m-dialog-backdrop", X.value],
|
|
226
|
+
style: ve.value
|
|
218
227
|
}), [_("div", {
|
|
219
228
|
class: "m-dialog-zoom",
|
|
220
|
-
onClick: re(
|
|
229
|
+
onClick: re(we, ["self"])
|
|
221
230
|
}, [_("section", {
|
|
222
231
|
ref_key: "dialogElement",
|
|
223
232
|
ref: B,
|
|
224
|
-
class:
|
|
233
|
+
class: C(["m-dialog", {
|
|
225
234
|
"m-dialog--maximized": V.value,
|
|
226
235
|
[`m-dialog--${K.value}`]: K.value
|
|
227
236
|
}]),
|
|
228
|
-
style:
|
|
237
|
+
style: ee(be.value),
|
|
229
238
|
role: "dialog",
|
|
230
239
|
"aria-modal": c.modal || void 0,
|
|
231
|
-
"aria-label":
|
|
240
|
+
"aria-label": _e.value,
|
|
232
241
|
tabindex: "-1"
|
|
233
242
|
}, [
|
|
234
243
|
e.$slots.header || W.value || q.value || c.closable || c.maximizable ? (T(), g("header", ae, [_("div", oe, [q.value ? (T(), g("span", se, [v(r, {
|
|
@@ -258,28 +267,24 @@ var ie = ["aria-modal", "aria-label"], ae = {
|
|
|
258
267
|
_("div", fe, [k(e.$slots, "default")]),
|
|
259
268
|
he.value ? (T(), g("footer", {
|
|
260
269
|
key: 1,
|
|
261
|
-
class:
|
|
270
|
+
class: C(["m-dialog__footer", { "m-dialog__footer--preset": J.value }])
|
|
262
271
|
}, [k(e.$slots, "footer", {}, () => [c.negativeText ? (T(), m(i, {
|
|
263
272
|
key: 0,
|
|
264
273
|
label: c.negativeText,
|
|
265
|
-
severity: "secondary",
|
|
266
274
|
disabled: Y.value,
|
|
267
275
|
loading: U.value === "negative",
|
|
268
|
-
onClick:
|
|
276
|
+
onClick: Ce
|
|
269
277
|
}, null, 8, [
|
|
270
278
|
"label",
|
|
271
279
|
"disabled",
|
|
272
280
|
"loading"
|
|
273
|
-
])) : h("", !0), c.positiveText ? (T(), m(i, {
|
|
274
|
-
key: 1,
|
|
281
|
+
])) : h("", !0), c.positiveText ? (T(), m(i, x({ key: 1 }, ge.value, {
|
|
275
282
|
label: c.positiveText,
|
|
276
|
-
severity: c.positiveSeverity,
|
|
277
283
|
disabled: Y.value && U.value !== "positive",
|
|
278
284
|
loading: U.value === "positive",
|
|
279
|
-
onClick:
|
|
280
|
-
}, null,
|
|
285
|
+
onClick: Se
|
|
286
|
+
}), null, 16, [
|
|
281
287
|
"label",
|
|
282
|
-
"severity",
|
|
283
288
|
"disabled",
|
|
284
289
|
"loading"
|
|
285
290
|
])) : h("", !0)])], 2)) : h("", !0)
|
|
@@ -300,7 +305,7 @@ function R(e) {
|
|
|
300
305
|
document.body.appendChild(t);
|
|
301
306
|
let n = E(L(e)), r = D(!0), a = D(!1), o = !1;
|
|
302
307
|
function s() {
|
|
303
|
-
o || (o = !0, I.delete(h), t.remove(),
|
|
308
|
+
o || (o = !0, I.delete(h), t.remove(), S(() => O(null, t)));
|
|
304
309
|
}
|
|
305
310
|
function l() {
|
|
306
311
|
r.value = !1;
|
|
@@ -343,15 +348,23 @@ function R(e) {
|
|
|
343
348
|
onHide: p
|
|
344
349
|
}, {
|
|
345
350
|
default: () => n.content,
|
|
346
|
-
footer: () =>
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
351
|
+
footer: () => {
|
|
352
|
+
let t = n.okColor ?? "primary", r = t === "primary" ? { type: "primary" } : t === "danger" ? {
|
|
353
|
+
type: "primary",
|
|
354
|
+
danger: !0
|
|
355
|
+
} : {
|
|
356
|
+
color: t,
|
|
357
|
+
variant: "solid"
|
|
358
|
+
};
|
|
359
|
+
return [n.showCancel ? b(i, {
|
|
360
|
+
disabled: a.value,
|
|
361
|
+
onClick: f
|
|
362
|
+
}, { default: () => n.cancelText ?? e.value.reject ?? "Cancel" }) : null, b(i, {
|
|
363
|
+
...r,
|
|
364
|
+
loading: a.value,
|
|
365
|
+
onClick: () => void d()
|
|
366
|
+
}, { default: () => n.okText ?? e.value.confirm ?? "OK" })];
|
|
367
|
+
}
|
|
355
368
|
});
|
|
356
369
|
}
|
|
357
370
|
}), h = {
|