mediacube-ui-v2 0.0.347 → 0.0.348
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.mc-modal{position:relative;--mc-modal-padding: 2rem;--mc-modal-padding-small: .75rem;--mc-modal-header-line-height: 1.5rem;--mc-modal-button-height: 3rem;--mc-modal-button-height-small: 2.5rem;--mc-modal-max-width: 510px;--mc-modal-min-width: 768px;--mc-modal-state-number: 0;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;opacity:var(--mc-modal-state-number)}@media (min-width: 480px){.mc-modal{--modal-scale: calc(var(--mc-modal-state-number) * .1 + .9);padding:12px 0;height:auto;max-height:80%;max-width:var(--mc-modal-max-width);min-width:var(--mc-modal-min-width)}}.mc-modal__overlay{position:absolute;inset:0;background-color:#20242780;display:flex;justify-content:flex-start}.mc-modal__overlay--hidden{background:transparent}.mc-modal__wrapper{position:absolute;inset:0;z-index:1;overflow:hidden;display:flex;justify-content:center;align-items:center}.mc-modal__btn-close,.mc-modal__btn-back{transition:.15s all;box-sizing:border-box;display:block;margin:0;padding:0;white-space:nowrap;vertical-align:middle;user-select:none;text-align:center;text-decoration:none;text-transform:none;border-radius:0;border:none;background-color:transparent;background-image:none;cursor:pointer;outline:0;font-size:0;line-height:0;font-family:inherit;-webkit-appearance:none;-webkit-text-fill-color:currentColor}.mc-modal__btn-close:focus,.mc-modal__btn-back:focus{outline:0}.mc-modal__btn-close,.mc-modal__btn-back{color:#8f99a3}.mc-modal__btn-close:hover,.mc-modal__btn-close:focus,.mc-modal__btn-back:hover,.mc-modal__btn-back:focus{color:#202427}.mc-modal__btn-close:active,.mc-modal__btn-back:active{color:#202427!important}.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem;padding:0!important}@media (min-width: 480px){.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem}}.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}@media (min-width: 480px){.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}}.mc-modal__icon-close{height:1.5rem;width:1.5rem;min-height:1.5rem;min-width:1.5rem;max-height:1.5rem;max-width:1.5rem;transition:color .15s}.mc-modal.overlay-fade-enter-active .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transition:all .15s;transform:translateZ(0)}.mc-modal.overlay-fade-enter .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transform:translate3d(0,-20px,0)}.mc-modal.mc-modal--secondary .mc-modal__inner{border-radius:2rem;box-shadow:0 15px 30px #20008c28;padding:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-close,.mc-modal.mc-modal--secondary .mc-modal__btn-back{top:27px}.mc-modal.mc-modal--secondary .mc-modal__btn-close{inset-inline-end:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-back{inset-inline-start:2rem}.mc-modal.mc-modal--secondary .mc-modal__header{padding-bottom:9px;border-bottom:2px solid #EDF0F3;margin-bottom:var(--mc-modal-padding)}.mc-modal.mc-modal--secondary .mc-modal__control{display:flex;justify-content:space-between;align-items:center}.mc-modal.mc-modal--secondary .mc-modal__control .mc-button{border-radius:.75rem}.mc-modal__header{flex-shrink:0;transition:.15s all;padding:var(--mc-modal-padding) 1rem 1.75rem;border-color:#edf0f3}@media (min-width: 480px){.mc-modal__header{padding:1.75rem}.mc-modal__header .mc-title{transition:.15s all;line-height:var(--mc-modal-header-line-height)}}.mc-modal__header:has(.mc-modal__title:empty){display:none}.mc-modal__header:has(.mc-modal__title:empty)+.mc-modal__body{padding-top:2rem}.mc-modal__title{margin-top:0;margin-bottom:0;color:#212121;font-family:Inter,sans-serif;overflow-x:hidden;text-overflow:ellipsis}.mc-modal__body{padding:.25rem 1rem 1rem;flex-grow:1;min-height:0;overflow-x:hidden}.mc-modal__body>*:only-child{min-height:100%}@media (min-width: 480px){.mc-modal__body{padding:.25rem 2rem 1rem;overflow:visible}}.mc-modal__inner{position:relative;box-shadow:0 4px 12px #00000029;background-color:#fff;display:flex;flex-direction:column;overflow:hidden;height:100%!important}.mc-modal__inner>*:first-child{padding-top:var(--mc-modal-padding)}.mc-modal__inner>*:last-child{padding-bottom:var(--mc-modal-padding)}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-close{position:absolute;top:var(--mc-modal-padding);inset-inline-end:2rem}}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-back{position:absolute;top:var(--mc-modal-padding);inset-inline-start:2rem}}@media (min-width: 480px){.mc-modal__inner{overflow:visible;-ms-overflow-style:none;scrollbar-width:none;border-radius:.5rem;margin:0 .75rem}.mc-modal__inner::-webkit-scrollbar{display:none}}.mc-modal--scrollable{overflow:hidden!important}.mc-modal--scrollable .mc-modal__body{overflow-y:auto;overflow-x:hidden}.mc-modal--scrollable .mc-modal__inner{overflow-x:hidden}@media (min-width: 480px){.mc-modal--scrollable .mc-modal__inner{max-height:80vh}}.mc-modal--header-align-center .mc-modal__header{padding-inline:2.5rem;text-align:center}@media (min-width: 480px){.mc-modal--header-align-center .mc-modal__header{padding-inline:3.5rem}}.mc-modal--header-align-left .mc-modal__header{padding-bottom:.75rem}@media (min-width: 480px){.mc-modal--small-indents .mc-modal__control{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__control .mc-button{height:var(--mc-modal-button-height-small)}.mc-modal--small-indents .mc-modal__header{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__header .mc-title{align-items:center}.mc-modal--small-indents .mc-modal__body{padding-bottom:.25rem}}.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-back,.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-close{top:var(--mc-modal-padding-small)!important}.mc-modal--scrolled-top .mc-modal__header{border-bottom:1px solid #EDF0F3}.mc-modal--scrolled-bottom .mc-modal__control:not(:empty){border-top:1px solid #EDF0F3}.mc-modal--top-padding .mc-modal__inner:before{content:"";height:2rem;min-height:2rem}.mc-modal__control{flex-shrink:0;display:flex;justify-content:center;padding:1rem 1rem 2rem;transition:.15s all}@media (min-width: 480px){.mc-modal__control{padding:1rem 1.5rem 2rem}}.mc-modal__control .mc-button{width:100%}@media (min-width: 480px){.mc-modal__control .mc-button{min-width:100px;height:var(--mc-modal-button-height);transition:.15s all;width:unset}}.mc-modal__control:empty{position:relative;padding:1.75rem 0 0}.mc-modal__control:not(:empty){border-color:#edf0f3}.mc-modal:has(.mc-modal__control:empty) .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__header{padding:1.5rem 1.5rem .75rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__btn-close{top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:first-child{padding-top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:last-child{padding-bottom:1.5rem}}.mc-modal--variation-info .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__body{padding-inline:1.5rem}}.mc-modal--variation-info .mc-modal__control{padding-top:1.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__control{padding-top:.75rem}}html[dir=rtl] .mc-modal__btn-back{transform:rotate(180deg)}
|
|
1
|
+
@charset "UTF-8";.mc-modal{position:relative;--mc-modal-padding: 2rem;--mc-modal-padding-small: .75rem;--mc-modal-header-line-height: 1.5rem;--mc-modal-button-height: 3rem;--mc-modal-button-height-small: 2.5rem;--mc-modal-max-width: 510px;--mc-modal-min-width: 768px;--mc-modal-state-number: 0;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;opacity:var(--mc-modal-state-number)}@media (min-width: 480px){.mc-modal{--modal-scale: calc(var(--mc-modal-state-number) * .1 + .9);padding:12px 0;height:auto;max-height:80%;max-width:var(--mc-modal-max-width);min-width:var(--mc-modal-min-width)}}.mc-modal__overlay{position:absolute;inset:0;background-color:#20242780;display:flex;justify-content:flex-start}.mc-modal__overlay--hidden{background:transparent}.mc-modal__wrapper{position:absolute;inset:0;z-index:1;overflow:hidden;display:flex;justify-content:center;align-items:center}.mc-modal__btn-close,.mc-modal__btn-back{transition:.15s all;box-sizing:border-box;display:block;margin:0;padding:0;white-space:nowrap;vertical-align:middle;user-select:none;text-align:center;text-decoration:none;text-transform:none;border-radius:0;border:none;background-color:transparent;background-image:none;cursor:pointer;outline:0;font-size:0;line-height:0;font-family:inherit;-webkit-appearance:none;-webkit-text-fill-color:currentColor}.mc-modal__btn-close:focus,.mc-modal__btn-back:focus{outline:0}.mc-modal__btn-close,.mc-modal__btn-back{color:#8f99a3}.mc-modal__btn-close:hover,.mc-modal__btn-close:focus,.mc-modal__btn-back:hover,.mc-modal__btn-back:focus{color:#202427}.mc-modal__btn-close:active,.mc-modal__btn-back:active{color:#202427!important}.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem;padding:0!important}@media (min-width: 480px){.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem}}.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}@media (min-width: 480px){.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}}.mc-modal__icon-close{height:1.5rem;width:1.5rem;min-height:1.5rem;min-width:1.5rem;max-height:1.5rem;max-width:1.5rem;transition:color .15s}.mc-modal.overlay-fade-enter-active .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transition:all .15s;transform:translateZ(0)}.mc-modal.overlay-fade-enter .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transform:translate3d(0,-20px,0)}.mc-modal.mc-modal--secondary .mc-modal__inner{border-radius:2rem;box-shadow:0 15px 30px #20008c28;padding:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-close,.mc-modal.mc-modal--secondary .mc-modal__btn-back{top:27px}.mc-modal.mc-modal--secondary .mc-modal__btn-close{inset-inline-end:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-back{inset-inline-start:2rem}.mc-modal.mc-modal--secondary .mc-modal__header{padding-bottom:9px;border-bottom:2px solid #EDF0F3;margin-bottom:var(--mc-modal-padding)}.mc-modal.mc-modal--secondary .mc-modal__control{display:flex;justify-content:space-between;align-items:center}.mc-modal.mc-modal--secondary .mc-modal__control .mc-button{border-radius:.75rem}.mc-modal__header{flex-shrink:0;transition:.15s all;padding:var(--mc-modal-padding) 1rem 1.75rem;border-color:#edf0f3}@media (min-width: 480px){.mc-modal__header{padding:1.75rem}.mc-modal__header .mc-title{transition:.15s all;line-height:var(--mc-modal-header-line-height)}}.mc-modal__header:has(.mc-modal__title:empty){display:none}.mc-modal__header:has(.mc-modal__title:empty)+.mc-modal__body{padding-top:2rem}.mc-modal__title{margin-top:0;margin-bottom:0;color:#212121;font-family:Inter,sans-serif;overflow-x:hidden;text-overflow:ellipsis}.mc-modal__body{padding:.25rem 1rem 1rem;flex-grow:1;min-height:0;overflow-x:hidden}.mc-modal__body>*:only-child{min-height:100%}@media (min-width: 480px){.mc-modal__body{padding:.25rem 2rem 1rem;overflow:visible}}.mc-modal__inner{position:relative;box-shadow:0 4px 12px #00000029;background-color:#fff;display:flex;flex-direction:column;overflow:hidden;height:100%!important}.mc-modal__inner>*:first-child{padding-top:var(--mc-modal-padding)}.mc-modal__inner>*:last-child{padding-bottom:var(--mc-modal-padding)}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-close{position:absolute;top:var(--mc-modal-padding);inset-inline-end:2rem}}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-back{position:absolute;top:var(--mc-modal-padding);inset-inline-start:2rem}}@media (min-width: 480px){.mc-modal__inner{overflow:visible;-ms-overflow-style:none;scrollbar-width:none;border-radius:.5rem;margin:0 .75rem}.mc-modal__inner::-webkit-scrollbar{display:none}}.mc-modal--scrollable{overflow:hidden!important}.mc-modal--scrollable .mc-modal__body{overflow-y:auto;overflow-x:hidden}.mc-modal--scrollable .mc-modal__inner{overflow-x:hidden}@media (min-width: 480px){.mc-modal--scrollable .mc-modal__inner{max-height:80vh}}.mc-modal--header-align-center .mc-modal__header{padding-inline:2.5rem;text-align:center}@media (min-width: 480px){.mc-modal--header-align-center .mc-modal__header{padding-inline:3.5rem}}.mc-modal--header-align-left .mc-modal__header{padding-bottom:.75rem}.mc-modal--measuring,.mc-modal--measuring *{transition:none!important}@media (min-width: 480px){.mc-modal--small-indents .mc-modal__control{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__control .mc-button{height:var(--mc-modal-button-height-small)}.mc-modal--small-indents .mc-modal__header{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__header .mc-title{align-items:center}.mc-modal--small-indents .mc-modal__body{padding-bottom:.25rem}}.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-back,.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-close{top:var(--mc-modal-padding-small)!important}.mc-modal--scrolled-top .mc-modal__header{border-bottom:1px solid #EDF0F3}.mc-modal--scrolled-bottom .mc-modal__control:not(:empty){border-top:1px solid #EDF0F3}.mc-modal--top-padding .mc-modal__inner:before{content:"";height:2rem;min-height:2rem}.mc-modal__control{flex-shrink:0;display:flex;justify-content:center;padding:1rem 1rem 2rem;transition:.15s all}@media (min-width: 480px){.mc-modal__control{padding:1rem 1.5rem 2rem}}.mc-modal__control .mc-button{width:100%}@media (min-width: 480px){.mc-modal__control .mc-button{min-width:100px;height:var(--mc-modal-button-height);transition:.15s all;width:unset}}.mc-modal__control:empty{position:relative;padding:1.75rem 0 0}.mc-modal__control:not(:empty){border-color:#edf0f3}.mc-modal:has(.mc-modal__control:empty) .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__header{padding:1.5rem 1.5rem .75rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__btn-close{top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:first-child{padding-top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:last-child{padding-bottom:1.5rem}}.mc-modal--variation-info .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__body{padding-inline:1.5rem}}.mc-modal--variation-info .mc-modal__control{padding-top:1.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__control{padding-top:.75rem}}html[dir=rtl] .mc-modal__btn-back{transform:rotate(180deg)}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { LineHeights as
|
|
3
|
-
import { Sizes as
|
|
4
|
-
import { Spaces as
|
|
5
|
-
import { useTransition as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as J, defineAsyncComponent as K, useSlots as X, ref as u, reactive as Y, computed as y, watch as C, openBlock as n, createElementBlock as r, withModifiers as g, createCommentVNode as c, createElementVNode as f, normalizeStyle as Z, normalizeClass as T, renderSlot as S, createVNode as M, unref as L } from "vue";
|
|
2
|
+
import { LineHeights as ee } from "../../../types/styles/LineHeights.js";
|
|
3
|
+
import { Sizes as A } from "../../../types/styles/Sizes.js";
|
|
4
|
+
import { Spaces as $ } from "../../../types/styles/Spaces.js";
|
|
5
|
+
import { useTransition as le, TransitionPresets as oe, useEventListener as te } from "@vueuse/core";
|
|
6
|
+
const ae = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "mc-modal__wrapper"
|
|
9
|
-
},
|
|
9
|
+
}, se = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "mc-modal__header"
|
|
12
|
-
},
|
|
12
|
+
}, ne = { class: "mc-modal__title" }, re = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "mc-modal__control",
|
|
15
15
|
id: "mcModalFooter"
|
|
16
|
-
},
|
|
16
|
+
}, k = "mc-modal--small-indents", N = "mc-modal--measuring", pe = /* @__PURE__ */ J({
|
|
17
17
|
__name: "McModal",
|
|
18
18
|
props: {
|
|
19
19
|
modelValue: {
|
|
@@ -119,16 +119,15 @@ const de = {
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
emits: ["before-open", "before-close", "opened", "closed", "back", "update:modelValue"],
|
|
122
|
-
setup(
|
|
123
|
-
const
|
|
124
|
-
duration:
|
|
125
|
-
transition:
|
|
126
|
-
}),
|
|
122
|
+
setup(p, { emit: z }) {
|
|
123
|
+
const w = K(() => import("../../elements/McSvgIcon/McSvgIcon.vue.js")), E = X(), s = z, l = p, _ = u(0), O = le(_, {
|
|
124
|
+
duration: l.duration || 300,
|
|
125
|
+
transition: oe.easeOutQuart
|
|
126
|
+
}), t = u(null), B = u(null), d = u(null), o = Y({
|
|
127
127
|
scrolled_top: !1,
|
|
128
128
|
scrolled_bottom: !1,
|
|
129
129
|
small_indents: !1,
|
|
130
130
|
can_shorten_modal: !1,
|
|
131
|
-
modal_params: {},
|
|
132
131
|
indent: {
|
|
133
132
|
regular: "400",
|
|
134
133
|
small: "150"
|
|
@@ -147,163 +146,144 @@ const de = {
|
|
|
147
146
|
}
|
|
148
147
|
}
|
|
149
148
|
});
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
"mc-modal--arrow-visible":
|
|
153
|
-
"mc-modal--scrolled-top":
|
|
154
|
-
"mc-modal--scrolled-bottom":
|
|
155
|
-
"mc-modal--scrollable":
|
|
156
|
-
"mc-modal--top-padding":
|
|
157
|
-
"mc-modal--small-indents":
|
|
158
|
-
[`mc-modal--variation-${
|
|
159
|
-
[`mc-modal--header-align-${
|
|
160
|
-
})),
|
|
161
|
-
"--mc-modal-padding":
|
|
162
|
-
"--mc-modal-padding-small":
|
|
163
|
-
"--mc-modal-header-line-height":
|
|
164
|
-
"--mc-modal-button-height":
|
|
165
|
-
"--mc-modal-button-height-small":
|
|
166
|
-
"--mc-modal-max-width": `${
|
|
167
|
-
"--mc-modal-min-width": `${
|
|
168
|
-
"--mc-modal-state-number":
|
|
169
|
-
})),
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
const
|
|
173
|
-
if (!
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
v(), g();
|
|
149
|
+
y(() => !!E.title);
|
|
150
|
+
const H = y(() => ({
|
|
151
|
+
"mc-modal--arrow-visible": l.arrowVisible,
|
|
152
|
+
"mc-modal--scrolled-top": o.scrolled_top,
|
|
153
|
+
"mc-modal--scrolled-bottom": o.scrolled_bottom,
|
|
154
|
+
"mc-modal--scrollable": l.scrollableContent,
|
|
155
|
+
"mc-modal--top-padding": l.topPadding,
|
|
156
|
+
"mc-modal--small-indents": o.small_indents,
|
|
157
|
+
[`mc-modal--variation-${l.variation}`]: !!l.variation,
|
|
158
|
+
[`mc-modal--header-align-${l.headerAlign}`]: (l.closeVisible || l.arrowVisible) && !!l.headerAlign
|
|
159
|
+
})), I = y(() => ({
|
|
160
|
+
"--mc-modal-padding": $[o.indent.regular],
|
|
161
|
+
"--mc-modal-padding-small": $[o.indent.small],
|
|
162
|
+
"--mc-modal-header-line-height": ee[o.header.title.line_height.regular],
|
|
163
|
+
"--mc-modal-button-height": A[o.footer.button.regular],
|
|
164
|
+
"--mc-modal-button-height-small": A[o.footer.button.small],
|
|
165
|
+
"--mc-modal-max-width": `${l.maxWidth + 24}px`,
|
|
166
|
+
"--mc-modal-min-width": `${l.minWidth - 24}px`,
|
|
167
|
+
"--mc-modal-state-number": O.value
|
|
168
|
+
})), R = () => {
|
|
169
|
+
o.scrolled_top = !1, o.scrolled_bottom = !1, o.small_indents = !1, o.can_shorten_modal = !1;
|
|
170
|
+
}, W = () => B.value?.parentElement ?? null, F = () => {
|
|
171
|
+
const e = W(), a = t.value;
|
|
172
|
+
if (!e || !a) return 0;
|
|
173
|
+
const m = e.classList.contains(k), i = a.scrollTop;
|
|
174
|
+
e.classList.add(N), m || e.classList.add(k);
|
|
175
|
+
const j = a.scrollHeight - a.clientHeight;
|
|
176
|
+
return m || (e.classList.remove(k), a.scrollTop = i), e.classList.remove(N), j;
|
|
177
|
+
}, h = () => {
|
|
178
|
+
if (!t.value) return;
|
|
179
|
+
const { scrollTop: e, scrollHeight: a, clientHeight: m } = t.value, i = 2;
|
|
180
|
+
o.scrolled_top = e > i, o.small_indents ? o.small_indents = e > 0 : o.small_indents = e > i && o.can_shorten_modal, o.scrolled_bottom = e + m < a - i;
|
|
181
|
+
}, P = () => {
|
|
182
|
+
v(), h();
|
|
185
183
|
};
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
te(t, "scroll", () => {
|
|
185
|
+
l.separators && P();
|
|
188
186
|
}, { passive: !0 });
|
|
189
|
-
const
|
|
190
|
-
|
|
187
|
+
const V = () => {
|
|
188
|
+
d.value?.disconnect(), d.value = null;
|
|
189
|
+
}, q = () => {
|
|
190
|
+
!t.value || !l.separators || (V(), d.value = new ResizeObserver(Q), d.value.observe(t.value));
|
|
191
191
|
}, x = () => {
|
|
192
|
-
!s.value || !o.separators || (C(), m.value = new ResizeObserver(j), m.value.observe(s.value));
|
|
193
|
-
}, L = () => {
|
|
194
192
|
requestAnimationFrame(() => {
|
|
195
193
|
requestAnimationFrame(() => {
|
|
196
|
-
|
|
194
|
+
D();
|
|
197
195
|
});
|
|
198
196
|
});
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
}, Q = () => {
|
|
204
|
-
try {
|
|
205
|
-
const t = N();
|
|
206
|
-
if (!t) return;
|
|
207
|
-
[
|
|
208
|
-
"--mc-modal-padding",
|
|
209
|
-
"--mc-modal-padding-small",
|
|
210
|
-
"--mc-modal-button-height",
|
|
211
|
-
"--mc-modal-button-height-small"
|
|
212
|
-
].forEach((n) => {
|
|
213
|
-
const a = I(t, n);
|
|
214
|
-
a && (e.modal_params[n] = a);
|
|
215
|
-
});
|
|
216
|
-
} catch (t) {
|
|
217
|
-
console.error(t);
|
|
218
|
-
}
|
|
197
|
+
}, D = () => {
|
|
198
|
+
t.value && (t.value.scrollTop = 0, v(), h());
|
|
199
|
+
}, G = (e) => {
|
|
200
|
+
s("back", e);
|
|
219
201
|
}, v = () => {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
(
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
}, G = () => {
|
|
228
|
-
o.clickBackdropToClose && y();
|
|
202
|
+
t.value && (!o.small_indents || t.value.scrollTop === 0) && (o.can_shorten_modal = F() > 0);
|
|
203
|
+
}, Q = () => {
|
|
204
|
+
v(), h();
|
|
205
|
+
}, b = () => {
|
|
206
|
+
s("before-close"), s("closed"), s("update:modelValue", !1);
|
|
207
|
+
}, U = () => {
|
|
208
|
+
l.clickBackdropToClose && b();
|
|
229
209
|
};
|
|
230
|
-
return
|
|
231
|
-
() =>
|
|
232
|
-
(
|
|
233
|
-
if (
|
|
234
|
-
if (
|
|
235
|
-
|
|
210
|
+
return C(
|
|
211
|
+
() => l.modelValue,
|
|
212
|
+
(e, a) => {
|
|
213
|
+
if (e !== a) {
|
|
214
|
+
if (e) {
|
|
215
|
+
_.value = 1, s("before-open");
|
|
236
216
|
return;
|
|
237
217
|
}
|
|
238
|
-
|
|
218
|
+
V(), R(), _.value = 0, b();
|
|
239
219
|
}
|
|
240
220
|
},
|
|
241
221
|
{ immediate: !0 }
|
|
242
|
-
),
|
|
243
|
-
|
|
244
|
-
(
|
|
245
|
-
!
|
|
222
|
+
), C(
|
|
223
|
+
t,
|
|
224
|
+
(e, a) => {
|
|
225
|
+
!l.modelValue || !e || !l.separators || (q(), a || (x(), s("opened")));
|
|
246
226
|
},
|
|
247
227
|
{ flush: "post" }
|
|
248
|
-
), (
|
|
249
|
-
|
|
228
|
+
), (e, a) => l.modelValue ? (n(), r("div", ae, [
|
|
229
|
+
l.showOverlay ? (n(), r("div", {
|
|
250
230
|
key: 0,
|
|
251
231
|
class: "mc-modal__overlay",
|
|
252
|
-
onClick:
|
|
253
|
-
})) :
|
|
254
|
-
|
|
255
|
-
class:
|
|
256
|
-
style:
|
|
232
|
+
onClick: g(U, ["stop"])
|
|
233
|
+
})) : c("", !0),
|
|
234
|
+
f("div", {
|
|
235
|
+
class: T(["mc-modal", H.value]),
|
|
236
|
+
style: Z(I.value)
|
|
257
237
|
}, [
|
|
258
|
-
|
|
238
|
+
f("div", {
|
|
259
239
|
ref_key: "modalInner",
|
|
260
|
-
ref:
|
|
261
|
-
class:
|
|
240
|
+
ref: B,
|
|
241
|
+
class: T(["mc-modal__inner", { "mc-modal__inner--with-title": e.$slots.title }])
|
|
262
242
|
}, [
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
243
|
+
e.$slots.title ? (n(), r("div", se, [
|
|
244
|
+
f("div", ne, [
|
|
245
|
+
S(e.$slots, "title")
|
|
266
246
|
])
|
|
267
|
-
])) :
|
|
268
|
-
|
|
247
|
+
])) : c("", !0),
|
|
248
|
+
f("div", {
|
|
269
249
|
ref_key: "mcModalBody",
|
|
270
|
-
ref:
|
|
250
|
+
ref: t,
|
|
271
251
|
class: "mc-modal__body"
|
|
272
252
|
}, [
|
|
273
|
-
|
|
253
|
+
S(e.$slots, "default")
|
|
274
254
|
], 512),
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
])) :
|
|
278
|
-
|
|
255
|
+
e.$slots.footer ? (n(), r("div", re, [
|
|
256
|
+
S(e.$slots, "footer")
|
|
257
|
+
])) : c("", !0),
|
|
258
|
+
p.arrowVisible ? (n(), r("button", {
|
|
279
259
|
key: 2,
|
|
280
260
|
type: "button",
|
|
281
261
|
class: "mc-modal__btn-back",
|
|
282
|
-
onClick:
|
|
262
|
+
onClick: g(G, ["prevent"])
|
|
283
263
|
}, [
|
|
284
|
-
|
|
264
|
+
M(L(w), {
|
|
285
265
|
name: "arrow_leftward",
|
|
286
266
|
class: "mc-modal__icon-back"
|
|
287
267
|
})
|
|
288
|
-
])) :
|
|
289
|
-
|
|
268
|
+
])) : c("", !0),
|
|
269
|
+
p.closeVisible ? (n(), r("button", {
|
|
290
270
|
key: 3,
|
|
291
271
|
type: "button",
|
|
292
272
|
class: "mc-modal__btn-close",
|
|
293
|
-
onClick:
|
|
273
|
+
onClick: g(b, ["prevent"])
|
|
294
274
|
}, [
|
|
295
|
-
|
|
275
|
+
M(L(w), {
|
|
296
276
|
class: "mc-modal__icon-close",
|
|
297
277
|
width: "24",
|
|
298
278
|
height: "24",
|
|
299
279
|
name: "close"
|
|
300
280
|
})
|
|
301
|
-
])) :
|
|
281
|
+
])) : c("", !0)
|
|
302
282
|
], 2)
|
|
303
283
|
], 6)
|
|
304
|
-
])) :
|
|
284
|
+
])) : c("", !0);
|
|
305
285
|
}
|
|
306
286
|
});
|
|
307
287
|
export {
|
|
308
|
-
|
|
288
|
+
pe as default
|
|
309
289
|
};
|