@gopowerteam/modal-render 0.0.46 → 0.0.47

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/es/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { unref as me, isRef as ge, toRefs as ye, customRef as be, onMounted as Y, nextTick as we, getCurrentScope as _e, onScopeDispose as xe, getCurrentInstance as V, ref as H, computed as E, watch as ee, defineComponent as K, useCssVars as Ce, inject as te, shallowRef as T, onUnmounted as ke, openBlock as y, createElementBlock as C, normalizeStyle as D, withModifiers as Me, createElementVNode as m, normalizeClass as Se, toDisplayString as O, createCommentVNode as z, createBlock as P, resolveDynamicComponent as re, normalizeProps as $e, guardReactiveProps as Ee, triggerRef as F, pushScopeId as le, popScopeId as ae, Fragment as Z, provide as Le, renderSlot as oe, Teleport as ne, createVNode as Ae, TransitionGroup as Oe, withCtx as Re, renderList as Te, mergeProps as Be, defineAsyncComponent as He } from "vue";
1
+ import { unref as me, isRef as ge, toRefs as ye, customRef as be, onMounted as Y, nextTick as we, getCurrentScope as _e, onScopeDispose as xe, getCurrentInstance as V, ref as H, computed as E, watch as ee, defineComponent as K, useCssVars as Ce, inject as te, shallowRef as T, onUnmounted as ke, openBlock as y, createElementBlock as C, normalizeStyle as N, withModifiers as Me, createElementVNode as m, normalizeClass as Se, toDisplayString as O, createCommentVNode as z, createBlock as P, resolveDynamicComponent as re, normalizeProps as $e, guardReactiveProps as Ee, triggerRef as F, pushScopeId as le, popScopeId as ae, Fragment as Z, provide as Le, renderSlot as oe, Teleport as ne, createVNode as Ae, TransitionGroup as Oe, withCtx as Re, renderList as Te, mergeProps as Be, defineAsyncComponent as He } from "vue";
2
2
  const U = Symbol("__MODAL__");
3
3
  function de(t) {
4
4
  return _e() ? (xe(t), !0) : !1;
@@ -10,10 +10,10 @@ const ce = typeof window < "u" && typeof document < "u";
10
10
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
11
11
  const ze = Object.prototype.toString, Pe = (t) => ze.call(t) === "[object Object]", Ie = () => {
12
12
  };
13
- function Ne(t) {
13
+ function We(t) {
14
14
  return V();
15
15
  }
16
- function We(t, s = {}) {
16
+ function De(t, i = {}) {
17
17
  if (!ge(t))
18
18
  return ye(t);
19
19
  const o = Array.isArray(t.value) ? Array.from({ length: t.value.length }) : {};
@@ -23,8 +23,8 @@ function We(t, s = {}) {
23
23
  return t.value[e];
24
24
  },
25
25
  set(l) {
26
- var i;
27
- if ((i = w(s.replaceRef)) != null ? i : !0)
26
+ var s;
27
+ if ((s = w(i.replaceRef)) != null ? s : !0)
28
28
  if (Array.isArray(t.value)) {
29
29
  const h = [...t.value];
30
30
  h[e] = l, t.value = h;
@@ -38,29 +38,29 @@ function We(t, s = {}) {
38
38
  }));
39
39
  return o;
40
40
  }
41
- function De(t, s = !0, o) {
42
- Ne() ? Y(t, o) : s ? t() : we(t);
41
+ function Ne(t, i = !0, o) {
42
+ We() ? Y(t, o) : i ? t() : we(t);
43
43
  }
44
44
  function B(t) {
45
- var s;
45
+ var i;
46
46
  const o = w(t);
47
- return (s = o == null ? void 0 : o.$el) != null ? s : o;
47
+ return (i = o == null ? void 0 : o.$el) != null ? i : o;
48
48
  }
49
49
  const q = ce ? window : void 0;
50
50
  function Q(...t) {
51
- let s, o, e, l;
52
- if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([o, e, l] = t, s = q) : [s, o, e, l] = t, !s)
51
+ let i, o, e, l;
52
+ if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([o, e, l] = t, i = q) : [i, o, e, l] = t, !i)
53
53
  return Ie;
54
54
  Array.isArray(o) || (o = [o]), Array.isArray(e) || (e = [e]);
55
- const i = [], c = () => {
56
- i.forEach((v) => v()), i.length = 0;
55
+ const s = [], c = () => {
56
+ s.forEach((v) => v()), s.length = 0;
57
57
  }, h = (v, u, r, d) => (v.addEventListener(u, r, d), () => v.removeEventListener(u, r, d)), _ = ee(
58
- () => [B(s), w(l)],
58
+ () => [B(i), w(l)],
59
59
  ([v, u]) => {
60
60
  if (c(), !v)
61
61
  return;
62
62
  const r = Pe(u) ? { ...u } : u;
63
- i.push(
63
+ s.push(
64
64
  ...o.flatMap((d) => e.map((a) => h(v, d, a, r)))
65
65
  );
66
66
  },
@@ -71,20 +71,20 @@ function Q(...t) {
71
71
  return de(b), b;
72
72
  }
73
73
  function Fe() {
74
- const t = H(!1), s = V();
75
- return s && Y(() => {
74
+ const t = H(!1), i = V();
75
+ return i && Y(() => {
76
76
  t.value = !0;
77
- }, s), t;
77
+ }, i), t;
78
78
  }
79
79
  function Ve(t) {
80
- const s = Fe();
81
- return E(() => (s.value, !!t()));
80
+ const i = Fe();
81
+ return E(() => (i.value, !!t()));
82
82
  }
83
- function je(t, s = {}) {
83
+ function je(t, i = {}) {
84
84
  var o, e;
85
85
  const {
86
86
  pointerTypes: l,
87
- preventDefault: i,
87
+ preventDefault: s,
88
88
  stopPropagation: c,
89
89
  exact: h,
90
90
  onMove: _,
@@ -95,13 +95,13 @@ function je(t, s = {}) {
95
95
  draggingElement: d = q,
96
96
  containerElement: a,
97
97
  handle: g = t
98
- } = s, f = H(
98
+ } = i, f = H(
99
99
  (o = w(u)) != null ? o : { x: 0, y: 0 }
100
100
  ), k = H(), R = (p) => l ? l.includes(p.pointerType) : !0, $ = (p) => {
101
- w(i) && p.preventDefault(), w(c) && p.stopPropagation();
102
- }, N = (p) => {
101
+ w(s) && p.preventDefault(), w(c) && p.stopPropagation();
102
+ }, W = (p) => {
103
103
  var L;
104
- if (w(s.disabled) || !R(p) || w(h) && p.target !== w(t))
104
+ if (p.button !== 0 || w(i.disabled) || !R(p) || w(h) && p.target !== w(t))
105
105
  return;
106
106
  const x = w(a), A = (L = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : L.call(x), M = w(t).getBoundingClientRect(), G = {
107
107
  x: p.clientX - (x ? M.left - A.left + x.scrollLeft : M.left),
@@ -109,7 +109,7 @@ function je(t, s = {}) {
109
109
  };
110
110
  (v == null ? void 0 : v(G, p)) !== !1 && (k.value = G, $(p));
111
111
  }, J = (p) => {
112
- if (w(s.disabled) || !R(p) || !k.value)
112
+ if (w(i.disabled) || !R(p) || !k.value)
113
113
  return;
114
114
  const L = w(a), x = w(t).getBoundingClientRect();
115
115
  let { x: A, y: M } = f.value;
@@ -118,14 +118,14 @@ function je(t, s = {}) {
118
118
  y: M
119
119
  }, _ == null || _(f.value, p), $(p);
120
120
  }, j = (p) => {
121
- w(s.disabled) || !R(p) || k.value && (k.value = void 0, b == null || b(f.value, p), $(p));
121
+ w(i.disabled) || !R(p) || k.value && (k.value = void 0, b == null || b(f.value, p), $(p));
122
122
  };
123
123
  if (ce) {
124
- const p = { capture: (e = s.capture) != null ? e : !0 };
125
- Q(g, "pointerdown", N, p), Q(d, "pointermove", J, p), Q(d, "pointerup", j, p);
124
+ const p = { capture: (e = i.capture) != null ? e : !0 };
125
+ Q(g, "pointerdown", W, p), Q(d, "pointermove", J, p), Q(d, "pointerup", j, p);
126
126
  }
127
127
  return {
128
- ...We(f),
128
+ ...De(f),
129
129
  position: f,
130
130
  isDragging: E(() => !!k.value),
131
131
  style: E(
@@ -133,18 +133,18 @@ function je(t, s = {}) {
133
133
  )
134
134
  };
135
135
  }
136
- function Ge(t, s, o = {}) {
136
+ function Ge(t, i, o = {}) {
137
137
  const { window: e = q, ...l } = o;
138
- let i;
138
+ let s;
139
139
  const c = Ve(() => e && "ResizeObserver" in e), h = () => {
140
- i && (i.disconnect(), i = void 0);
140
+ s && (s.disconnect(), s = void 0);
141
141
  }, _ = E(() => Array.isArray(t) ? t.map((u) => B(u)) : [B(t)]), b = ee(
142
142
  _,
143
143
  (u) => {
144
144
  if (h(), c.value && e) {
145
- i = new ResizeObserver(s);
145
+ s = new ResizeObserver(i);
146
146
  for (const r of u)
147
- r && i.observe(r, l);
147
+ r && s.observe(r, l);
148
148
  }
149
149
  },
150
150
  { immediate: !0, flush: "post" }
@@ -156,19 +156,19 @@ function Ge(t, s, o = {}) {
156
156
  stop: v
157
157
  };
158
158
  }
159
- function W(t, s = { width: 0, height: 0 }, o = {}) {
160
- const { window: e = q, box: l = "content-box" } = o, i = E(() => {
159
+ function D(t, i = { width: 0, height: 0 }, o = {}) {
160
+ const { window: e = q, box: l = "content-box" } = o, s = E(() => {
161
161
  var u, r;
162
162
  return (r = (u = B(t)) == null ? void 0 : u.namespaceURI) == null ? void 0 : r.includes("svg");
163
- }), c = H(s.width), h = H(s.height), { stop: _ } = Ge(
163
+ }), c = H(i.width), h = H(i.height), { stop: _ } = Ge(
164
164
  t,
165
165
  ([u]) => {
166
166
  const r = l === "border-box" ? u.borderBoxSize : l === "content-box" ? u.contentBoxSize : u.devicePixelContentBoxSize;
167
- if (e && i.value) {
167
+ if (e && s.value) {
168
168
  const d = B(t);
169
169
  if (d) {
170
- const a = e.getComputedStyle(d);
171
- c.value = Number.parseFloat(a.width), h.value = Number.parseFloat(a.height);
170
+ const a = d.getBoundingClientRect();
171
+ c.value = a.width, h.value = a.height;
172
172
  }
173
173
  } else if (r) {
174
174
  const d = Array.isArray(r) ? r : [r];
@@ -178,14 +178,14 @@ function W(t, s = { width: 0, height: 0 }, o = {}) {
178
178
  },
179
179
  o
180
180
  );
181
- De(() => {
181
+ Ne(() => {
182
182
  const u = B(t);
183
- u && (c.value = "offsetWidth" in u ? u.offsetWidth : s.width, h.value = "offsetHeight" in u ? u.offsetHeight : s.height);
183
+ u && (c.value = "offsetWidth" in u ? u.offsetWidth : i.width, h.value = "offsetHeight" in u ? u.offsetHeight : i.height);
184
184
  });
185
185
  const b = ee(
186
186
  () => B(t),
187
187
  (u) => {
188
- c.value = u ? s.width : 0, h.value = u ? s.height : 0;
188
+ c.value = u ? i.width : 0, h.value = u ? i.height : 0;
189
189
  }
190
190
  );
191
191
  function v() {
@@ -197,7 +197,7 @@ function W(t, s = { width: 0, height: 0 }, o = {}) {
197
197
  stop: v
198
198
  };
199
199
  }
200
- const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "title text-16px font-bold" }, Ke = { class: "action" }, Ue = ["form"], qe = {
200
+ const Xe = (t) => (le("data-v-e065fedd"), t = t(), ae(), t), Ye = { class: "title text-16px font-bold" }, Ke = { class: "action" }, Ue = ["form"], qe = {
201
201
  key: 2,
202
202
  class: "modal-loading"
203
203
  }, Je = /* @__PURE__ */ Xe(() => /* @__PURE__ */ m("div", { class: "lds-ring" }, [
@@ -244,17 +244,17 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
244
244
  onCancel: {}
245
245
  },
246
246
  emits: ["submit"],
247
- setup(t, { expose: s, emit: o }) {
247
+ setup(t, { expose: i, emit: o }) {
248
248
  Ce((n) => ({
249
- "567c01bd": n.zIndex
249
+ "0b220c17": n.zIndex
250
250
  }));
251
- const e = t, l = o, i = te(U), c = H(!1);
251
+ const e = t, l = o, s = te(U), c = H(!1);
252
252
  let h = 0, _ = 0;
253
- const b = T(), v = T(), u = T(), r = T(), d = T(), a = T(), { height: g } = W(b), { height: f } = W(u, void 0, { box: "border-box" }), { height: k } = W(r, void 0, { box: "border-box" }), { height: R } = W(d), { height: $ } = W(a), { x: N, y: J } = je(u, {
253
+ const b = T(), v = T(), u = T(), r = T(), d = T(), a = T(), { height: g } = D(b), { height: f } = D(u, void 0, { box: "border-box" }), { height: k } = D(r, void 0, { box: "border-box" }), { height: R } = D(d), { height: $ } = D(a), { x: W, y: J } = je(u, {
254
254
  initialValue: { x: 0, y: 0 }
255
255
  });
256
256
  function j() {
257
- i == null || i.close(e.id);
257
+ s == null || s.close(e.id);
258
258
  }
259
259
  function p(n) {
260
260
  return typeof n == "number" ? `${n}px` : n;
@@ -274,13 +274,13 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
274
274
  }[e.position]), n;
275
275
  }), x = E(() => {
276
276
  const n = {};
277
- return e.mode === "drawer" && ["top", "bottom"].includes(e.position) ? n.maxHeight = p(e.maxHeight) : (n.width = p(e.sizes[e.size]), n.maxWidth = p(e.maxWidth)), e.width && (n.width = p(e.width)), e.height && (n.height = p(e.height)), e.fullscreen && (n.maxWidth = "unset", n.width = "100%", n.position = "fixed", n.top = 0, n.left = 0, n.bottom = 0, n.right = 0, n.borderRadius = 0), e.draggable && !e.fullscreen && e.mode === "dialog" && (n.transform = `translate3d(${N.value - h}px, ${J.value - _}px, 0px)`), e.mode === "drawer" && (n.borderRadius = 0, ["left", "right"].includes(e.position) ? n.height = "100%" : n.width = "100%"), e.offset && e.mode === "dialog" && (n.marginLeft = `${e.offset.x || 0}px`, n.marginTop = `${e.offset.y || 0}px`), e.backgroundColor && (n.backgroundColor = e.backgroundColor), n;
277
+ return e.mode === "drawer" && ["top", "bottom"].includes(e.position) ? n.maxHeight = p(e.maxHeight) : (n.width = p(e.sizes[e.size]), n.maxWidth = p(e.maxWidth)), e.width && (n.width = p(e.width)), e.height && (n.height = p(e.height)), e.fullscreen && (n.maxWidth = "unset", n.width = "100%", n.position = "fixed", n.top = 0, n.left = 0, n.bottom = 0, n.right = 0, n.borderRadius = 0), e.draggable && !e.fullscreen && e.mode === "dialog" && (n.transform = `translate3d(${W.value - h}px, ${J.value - _}px, 0px)`), e.mode === "drawer" && (n.borderRadius = 0, ["left", "right"].includes(e.position) ? n.height = "100%" : n.width = "100%"), e.offset && e.mode === "dialog" && (n.marginLeft = `${e.offset.x || 0}px`, n.marginTop = `${e.offset.y || 0}px`), e.backgroundColor && (n.backgroundColor = e.backgroundColor), n;
278
278
  }), A = E(() => {
279
279
  const n = {};
280
280
  return e.draggable && !e.fullscreen && e.mode === "dialog" && (n.cursor = "move"), n;
281
281
  }), M = E(() => {
282
- const n = {}, S = R.value + $.value + f.value + k.value, ie = Math.floor(g.value * (Number(p(e.maxHeight).replace("%", "")) / 100));
283
- return e.maxHeight && (n.maxHeight = `${ie - S}px`), e.mode === "drawer" && (n.maxHeight = "unset", ["left", "right"].includes(e.position) && (n.height = `${g.value - S}px`)), e.fullscreen && (n.maxHeight = "unset", n.height = `calc(100% - ${S}px)`), e.type !== "component" && (n.padding = "0"), e.bodyStyle && Object.assign(n, e.bodyStyle), n;
282
+ const n = {}, S = R.value + $.value + f.value + k.value, se = Math.floor(g.value * (Number(p(e.maxHeight).replace("%", "")) / 100));
283
+ return e.maxHeight && (n.maxHeight = `${se - S}px`), e.mode === "drawer" && (n.maxHeight = "unset", ["left", "right"].includes(e.position) && (n.height = `${g.value - S}px`)), e.fullscreen && (n.maxHeight = "unset", n.height = `calc(100% - ${S}px)`), e.type !== "component" && (n.padding = "0"), e.bodyStyle && Object.assign(n, e.bodyStyle), n;
284
284
  });
285
285
  function G() {
286
286
  const n = v.value;
@@ -289,11 +289,11 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
289
289
  S && S.dispatchEvent(new Event("submit"));
290
290
  }
291
291
  e.onOk && e.onOk({
292
- close: () => i == null ? void 0 : i.close(e.id)
292
+ close: () => s == null ? void 0 : s.close(e.id)
293
293
  }), l("submit");
294
294
  }
295
295
  function ue() {
296
- i == null || i.close(e.id), e != null && e.onCancel && e.onCancel();
296
+ s == null || s.close(e.id), e != null && e.onCancel && e.onCancel();
297
297
  }
298
298
  function fe() {
299
299
  window && window.addEventListener("resize", () => {
@@ -303,7 +303,7 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
303
303
  function pe() {
304
304
  if (e.closeable && e.esc) {
305
305
  const n = ({ key: S }) => {
306
- S === "Escape" && (i == null || i.close(e.id), window.removeEventListener("keydown", n));
306
+ S === "Escape" && (s == null || s.close(e.id), window.removeEventListener("keydown", n));
307
307
  };
308
308
  window.addEventListener("keydown", n);
309
309
  }
@@ -316,33 +316,33 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
316
316
  }), ke(() => {
317
317
  });
318
318
  function ve() {
319
- return c.value = !0, () => se();
319
+ return c.value = !0, () => ie();
320
320
  }
321
- function se() {
321
+ function ie() {
322
322
  c.value = !1;
323
323
  }
324
- return s({
324
+ return i({
325
325
  showLoading: ve,
326
- hideLoading: se
326
+ hideLoading: ie
327
327
  }), (n, S) => (y(), C("div", {
328
328
  ref_key: "wrapperRef",
329
329
  ref: b,
330
330
  class: "modal-wrapper",
331
- style: D(L.value),
332
- onClick: S[0] || (S[0] = Me((ie) => n.maskClosable && j(), ["self"]))
331
+ style: N(L.value),
332
+ onClick: S[0] || (S[0] = Me((se) => n.maskClosable && j(), ["self"]))
333
333
  }, [
334
334
  m("div", {
335
335
  ref_key: "contentRef",
336
336
  ref: v,
337
337
  class: Se(["modal-content", { [`${n.mode}-mode`]: !0, [`${n.position}-position`]: !0 }]),
338
- style: D(x.value)
338
+ style: N(x.value)
339
339
  }, [
340
340
  n.header ? (y(), C("div", {
341
341
  key: 0,
342
342
  ref_key: "headerRef",
343
343
  ref: u,
344
344
  class: "modal-header",
345
- style: D(A.value),
345
+ style: N(A.value),
346
346
  onMousedown: he
347
347
  }, [
348
348
  m("div", Ye, O(n.title), 1),
@@ -361,7 +361,7 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
361
361
  }, null, 512),
362
362
  m("div", {
363
363
  class: "modal-body",
364
- style: D(M.value)
364
+ style: N(M.value)
365
365
  }, [
366
366
  (y(), P(re(n.component), $e(Ee(n.componentProps)), null, 16))
367
367
  ], 4),
@@ -384,7 +384,7 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
384
384
  m("button", {
385
385
  class: "submit-button",
386
386
  form: n.form,
387
- type: "submit",
387
+ type: "button",
388
388
  onClick: G
389
389
  }, O(n.submitText), 9, Ue)
390
390
  ], 512)) : z("", !0),
@@ -392,12 +392,12 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
392
392
  ], 6)
393
393
  ], 4));
394
394
  }
395
- }), I = (t, s) => {
395
+ }), I = (t, i) => {
396
396
  const o = t.__vccOpts || t;
397
- for (const [e, l] of s)
397
+ for (const [e, l] of i)
398
398
  o[e] = l;
399
399
  return o;
400
- }, tt = /* @__PURE__ */ I(et, [["__scopeId", "data-v-bd04f7a9"]]), ot = { class: "modal-dialog" }, nt = { class: "dialog-body" }, st = { class: "dialog-title" }, it = { class: "dialog-content" }, rt = /* @__PURE__ */ K({
400
+ }, tt = /* @__PURE__ */ I(et, [["__scopeId", "data-v-e065fedd"]]), ot = { class: "modal-dialog" }, nt = { class: "dialog-body" }, it = { class: "dialog-title" }, st = { class: "dialog-content" }, rt = /* @__PURE__ */ K({
401
401
  __name: "modal-dialog",
402
402
  props: {
403
403
  type: {},
@@ -410,27 +410,27 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
410
410
  footer: {}
411
411
  },
412
412
  setup(t) {
413
- const s = t, o = Ct(), e = E(() => s.title ? s.title : {
413
+ const i = t, o = Ct(), e = E(() => i.title ? i.title : {
414
414
  confirm: "提示",
415
415
  info: "提示",
416
416
  warning: "警告",
417
417
  error: "错误",
418
418
  success: "成功"
419
- }[s.type]);
419
+ }[i.type]);
420
420
  async function l() {
421
- s.onOk && await s.onOk(), o.close();
421
+ i.onOk && await i.onOk(), o.close();
422
422
  }
423
- async function i() {
424
- s.onCancel && await s.onCancel(), o.close();
423
+ async function s() {
424
+ i.onCancel && await i.onCancel(), o.close();
425
425
  }
426
426
  return (c, h) => (y(), C("section", ot, [
427
427
  m("div", nt, [
428
- m("div", st, O(e.value), 1),
429
- m("div", it, O(c.content), 1)
428
+ m("div", it, O(e.value), 1),
429
+ m("div", st, O(c.content), 1)
430
430
  ]),
431
431
  m("div", {
432
432
  class: "dialog-footer space-x-2",
433
- style: D(c.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
433
+ style: N(c.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
434
434
  }, [
435
435
  c.footer ? (y(), P(re(c.footer), { key: 0 })) : (y(), C(Z, { key: 1 }, [
436
436
  m("button", {
@@ -442,7 +442,7 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
442
442
  key: 0,
443
443
  class: "cancel-button",
444
444
  type: "button",
445
- onClick: i
445
+ onClick: s
446
446
  }, O(c.cancelText), 1)) : z("", !0)
447
447
  ], 64))
448
448
  ], 4)
@@ -461,9 +461,9 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
461
461
  text: { default: "加载中" }
462
462
  },
463
463
  setup(t) {
464
- return (s, o) => (y(), C("section", dt, [
464
+ return (i, o) => (y(), C("section", dt, [
465
465
  ct,
466
- m("div", ut, O(s.text), 1)
466
+ m("div", ut, O(i.text), 1)
467
467
  ]));
468
468
  }
469
469
  }), pt = /* @__PURE__ */ I(ft, [["__scopeId", "data-v-559bdf2e"]]), ht = {
@@ -485,16 +485,16 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
485
485
  maxHeight: { default: "90%" },
486
486
  offset: { default: () => ({ x: 0, y: 0 }) }
487
487
  },
488
- setup(t, { expose: s }) {
488
+ setup(t, { expose: i }) {
489
489
  const o = T([]), e = H(!1), l = V();
490
- function i(r, d = {}, a = {}) {
490
+ function s(r, d = {}, a = {}) {
491
491
  const g = He(
492
492
  () => Promise.resolve(typeof r == "string" ? lt : r)
493
493
  );
494
494
  typeof r == "string" && (d.type = r, a.size = "small", a.fullscreen = !1, a.mode = "dialog", a.footer = !1, a.header = !1);
495
495
  const f = Math.random().toString(32).slice(2), k = Object.assign({
496
496
  zIndex: typeof r == "string" ? 1100 : 1e3
497
- }, a), R = new Promise(($, N) => {
497
+ }, a), R = new Promise(($, W) => {
498
498
  o.value.push({
499
499
  id: f,
500
500
  component: g,
@@ -504,7 +504,7 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
504
504
  type: typeof r == "string" ? r : "component"
505
505
  },
506
506
  resolve: $,
507
- reject: N,
507
+ reject: W,
508
508
  listeners: []
509
509
  }), F(o);
510
510
  }).catch(($) => $ === "CANCEL" ? new Promise(() => {
@@ -531,16 +531,16 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
531
531
  return;
532
532
  const g = a.listeners.find((f) => f.event === d);
533
533
  g && g.callback({
534
- open: i,
534
+ open: s,
535
535
  close: (f) => c(a.id, f),
536
536
  closeAll: h,
537
537
  showLoading: () => b(a.id),
538
538
  hideLoading: () => v(a.id),
539
- confirm: (f) => i("confirm", f),
540
- success: (f) => i("success", f),
541
- error: (f) => i("error", f),
542
- warning: (f) => i("warning", f),
543
- info: (f) => i("info", f)
539
+ confirm: (f) => s("confirm", f),
540
+ success: (f) => s("success", f),
541
+ error: (f) => s("error", f),
542
+ warning: (f) => s("warning", f),
543
+ info: (f) => s("info", f)
544
544
  });
545
545
  }
546
546
  function b(r, d) {
@@ -550,7 +550,7 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
550
550
  if (a)
551
551
  return a.showLoading();
552
552
  {
553
- const { close: g } = i(pt, {
553
+ const { close: g } = s(pt, {
554
554
  text: d == null ? void 0 : d.text
555
555
  }, {
556
556
  footer: !1,
@@ -581,15 +581,15 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
581
581
  });
582
582
  }
583
583
  return Le(U, {
584
- open: i,
584
+ open: s,
585
585
  close: c,
586
586
  closeAll: h,
587
587
  addEventListener: u,
588
588
  showLoading: b,
589
589
  hideLoading: v
590
- }), s({
590
+ }), i({
591
591
  elements: o,
592
- open: i,
592
+ open: s,
593
593
  close: c,
594
594
  closeAll: h
595
595
  }), Y(() => {
@@ -625,7 +625,7 @@ const Xe = (t) => (le("data-v-bd04f7a9"), t = t(), ae(), t), Ye = { class: "titl
625
625
  ], 64));
626
626
  }
627
627
  }), Mt = /* @__PURE__ */ I(mt, [["__scopeId", "data-v-448d3772"]]), gt = {}, yt = { class: "modal-footer" };
628
- function bt(t, s) {
628
+ function bt(t, i) {
629
629
  return y(), P(ne, { to: "#modal-footer-slot" }, [
630
630
  m("div", yt, [
631
631
  oe(t.$slots, "default", {}, void 0, !0)
@@ -633,7 +633,7 @@ function bt(t, s) {
633
633
  ]);
634
634
  }
635
635
  const St = /* @__PURE__ */ I(gt, [["render", bt], ["__scopeId", "data-v-46f8d703"]]), wt = {}, _t = { class: "modal-header" };
636
- function xt(t, s) {
636
+ function xt(t, i) {
637
637
  return y(), P(ne, { to: "#modal-header-slot" }, [
638
638
  m("div", _t, [
639
639
  oe(t.$slots, "default", {}, void 0, !0)
@@ -641,19 +641,19 @@ function xt(t, s) {
641
641
  ]);
642
642
  }
643
643
  const $t = /* @__PURE__ */ I(wt, [["render", xt], ["__scopeId", "data-v-d0247172"]]);
644
- function X(t, s) {
644
+ function X(t, i) {
645
645
  var e, l;
646
646
  let o = t == null ? void 0 : t.parent;
647
- for (; o && ((e = o == null ? void 0 : o.type) == null ? void 0 : e.name) !== s; )
647
+ for (; o && ((e = o == null ? void 0 : o.type) == null ? void 0 : e.name) !== i; )
648
648
  o = o.parent;
649
- return ((l = o == null ? void 0 : o.type) == null ? void 0 : l.name) === s ? o : null;
649
+ return ((l = o == null ? void 0 : o.type) == null ? void 0 : l.name) === i ? o : null;
650
650
  }
651
651
  function Ct() {
652
- const t = te(U), s = V();
653
- function o(e, l, i) {
652
+ const t = te(U), i = V();
653
+ function o(e, l, s) {
654
654
  if (!t)
655
655
  throw new Error("Not Found Modal Provider Component");
656
- return t.open(e, l, i);
656
+ return t.open(e, l, s);
657
657
  }
658
658
  return {
659
659
  open: o,
@@ -661,10 +661,10 @@ function Ct() {
661
661
  var c;
662
662
  if (!t)
663
663
  throw new Error("Not Found Modal Provider Component");
664
- const l = X(s, "ModalContainer"), i = (c = l == null ? void 0 : l.props) == null ? void 0 : c.id;
665
- if (!i)
664
+ const l = X(i, "ModalContainer"), s = (c = l == null ? void 0 : l.props) == null ? void 0 : c.id;
665
+ if (!s)
666
666
  throw new Error("Not Found Current Modal Container");
667
- t.close(i, e);
667
+ t.close(s, e);
668
668
  },
669
669
  closeAll() {
670
670
  if (!t)
@@ -675,14 +675,14 @@ function Ct() {
675
675
  var c;
676
676
  if (!t)
677
677
  throw new Error("Not Found Modal Provider Component");
678
- const l = X(s, "ModalContainer"), i = (c = l == null ? void 0 : l.props) == null ? void 0 : c.id;
679
- return t.showLoading(i, e);
678
+ const l = X(i, "ModalContainer"), s = (c = l == null ? void 0 : l.props) == null ? void 0 : c.id;
679
+ return t.showLoading(s, e);
680
680
  },
681
681
  hideLoading() {
682
- var i;
682
+ var s;
683
683
  if (!t)
684
684
  throw new Error("Not Found Modal Provider Component");
685
- const e = X(s, "ModalContainer"), l = (i = e == null ? void 0 : e.props) == null ? void 0 : i.id;
685
+ const e = X(i, "ModalContainer"), l = (s = e == null ? void 0 : e.props) == null ? void 0 : s.id;
686
686
  return t.hideLoading(l);
687
687
  },
688
688
  confirm(e) {
@@ -703,9 +703,9 @@ function Ct() {
703
703
  };
704
704
  }
705
705
  function Et(t) {
706
- var i;
707
- const s = te(U), o = V(), e = X(o, "ModalContainer"), l = (i = e == null ? void 0 : e.props) == null ? void 0 : i.id;
708
- s && l && s.addEventListener(l, "submit", t);
706
+ var s;
707
+ const i = te(U), o = V(), e = X(o, "ModalContainer"), l = (s = e == null ? void 0 : e.props) == null ? void 0 : s.id;
708
+ i && l && i.addEventListener(l, "submit", t);
709
709
  }
710
710
  export {
711
711
  tt as ModalContainer,
@@ -1,5 +1,5 @@
1
- import { useModal } from './hooks/use-modal';
2
1
  import { CSSProperties, Component } from 'vue';
2
+ import { useModal } from './hooks/use-modal';
3
3
 
4
4
  export interface SizeOptions {
5
5
  small: string | number;
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- *,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.i-icon-park-outline\:close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 48 48' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='m8 8l32 32M8 40L40 8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.cursor-pointer{cursor:pointer}.resize{resize:both}.space-x-2>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.5rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(.5rem * var(--un-space-x-reverse))}.border{border-width:1px}.px{padding-left:1rem;padding-right:1rem}.text-16px{font-size:16px}.font-bold{font-weight:700}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease{transition-timing-function:cubic-bezier(.4,0,.2,1)}.modal-wrapper[data-v-bd04f7a9]{z-index:var(--567c01bd);position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:#0000004d}.modal-content[data-v-bd04f7a9]{background:#fff;border-radius:5px;position:relative}.modal-header[data-v-bd04f7a9]{box-sizing:border-box;padding:10px;height:50px;display:flex;justify-content:space-between;align-items:center;border-bottom:solid 1px var(--color-border-1, #e8e8e8);color:var(--color-text-2, #4E5969)}.modal-body[data-v-bd04f7a9]{padding:10px;box-sizing:border-box;overflow:auto;position:relative}.modal-footer[data-v-bd04f7a9]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:flex-end;padding:10px}.modal-footer button[data-v-bd04f7a9]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0 10px;box-sizing:border-box}.modal-footer button.submit-button[data-v-bd04f7a9]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-bd04f7a9]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-bd04f7a9]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-bd04f7a9]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-bd04f7a9]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-bd04f7a9]:active{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading[data-v-bd04f7a9]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#0000001a}.modal-loading .lds-ring[data-v-bd04f7a9]{display:inline-block;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-bd04f7a9]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-bd04f7a9 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-bd04f7a9]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-bd04f7a9]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-bd04f7a9]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-bd04f7a9{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dialog-body[data-v-0c6b8db2]{padding:20px 10px 10px}.dialog-title[data-v-0c6b8db2]{padding:5px;font-weight:700;font-size:16px}.dialog-content[data-v-0c6b8db2]{padding:5px}.dialog-footer[data-v-0c6b8db2]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:center;align-items:center;padding:0 10px}.dialog-footer button[data-v-0c6b8db2]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.dialog-footer button.submit-button[data-v-0c6b8db2]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.dialog-footer button.submit-button[data-v-0c6b8db2]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.dialog-footer button.submit-button[data-v-0c6b8db2]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.dialog-footer button.cancel-button[data-v-0c6b8db2]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.dialog-footer button.cancel-button[data-v-0c6b8db2]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading .lds-ring[data-v-559bdf2e]{display:inline-flex;justify-content:center;align-items:center;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-559bdf2e]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-559bdf2e 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-559bdf2e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.modal-loading-text[data-v-559bdf2e]{color:#fff;font-weight:700}.modal-fade-enter-active[data-v-448d3772],.modal-fade-leave-active[data-v-448d3772]{transition:opacity .5s ease}.modal-fade-enter-active[data-v-448d3772] .modal-content.drawer-mode,.modal-fade-leave-active[data-v-448d3772] .modal-content.drawer-mode{transition:transform .5s ease}.modal-fade-enter-from[data-v-448d3772],.modal-fade-leave-to[data-v-448d3772]{opacity:0}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.left-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.left-position{transform:translate3d(-100%,0,0)}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.right-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.right-position{transform:translate3d(100%,0,0)}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.top-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.top-position{transform:translate3d(0,-100%,0)}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.bottom-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.bottom-position{transform:translate3d(0,100%,0)}.modal-footer[data-v-46f8d703]{box-sizing:border-box;min-height:50px;border-top:solid 1px var(--color-border-1, rgb(232, 232, 232));padding:10px}.modal-footer button[data-v-46f8d703]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.modal-footer button.submit-button[data-v-46f8d703]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-46f8d703]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-46f8d703]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-46f8d703]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-46f8d703]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-46f8d703]:active{background-color:var(--color-fill-4, #c9cdd4)}.modal-header[data-v-d0247172]{box-sizing:border-box;padding:10px;min-height:50px;border-bottom:solid 1px var(--color-border-1, rgb(232, 232, 232));color:var(--color-text-2, #4E5969)}
1
+ *,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.i-icon-park-outline\:close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 48 48' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='m8 8l32 32M8 40L40 8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.cursor-pointer{cursor:pointer}.resize{resize:both}.space-x-2>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.5rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(.5rem * var(--un-space-x-reverse))}.border{border-width:1px}.px{padding-left:1rem;padding-right:1rem}.text-16px{font-size:16px}.font-bold{font-weight:700}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease{transition-timing-function:cubic-bezier(.4,0,.2,1)}.modal-wrapper[data-v-e065fedd]{z-index:var(--0b220c17);position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:#0000004d}.modal-content[data-v-e065fedd]{background:#fff;border-radius:5px;position:relative}.modal-header[data-v-e065fedd]{box-sizing:border-box;padding:10px;height:50px;display:flex;justify-content:space-between;align-items:center;border-bottom:solid 1px var(--color-border-1, #e8e8e8);color:var(--color-text-2, #4E5969)}.modal-body[data-v-e065fedd]{padding:10px;box-sizing:border-box;overflow:auto;position:relative}.modal-footer[data-v-e065fedd]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:flex-end;padding:10px}.modal-footer button[data-v-e065fedd]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0 10px;box-sizing:border-box}.modal-footer button.submit-button[data-v-e065fedd]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-e065fedd]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-e065fedd]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-e065fedd]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-e065fedd]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-e065fedd]:active{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading[data-v-e065fedd]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#0000001a}.modal-loading .lds-ring[data-v-e065fedd]{display:inline-block;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-e065fedd]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-e065fedd 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-e065fedd]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-e065fedd]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-e065fedd]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-e065fedd{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dialog-body[data-v-0c6b8db2]{padding:20px 10px 10px}.dialog-title[data-v-0c6b8db2]{padding:5px;font-weight:700;font-size:16px}.dialog-content[data-v-0c6b8db2]{padding:5px}.dialog-footer[data-v-0c6b8db2]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:center;align-items:center;padding:0 10px}.dialog-footer button[data-v-0c6b8db2]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.dialog-footer button.submit-button[data-v-0c6b8db2]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.dialog-footer button.submit-button[data-v-0c6b8db2]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.dialog-footer button.submit-button[data-v-0c6b8db2]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.dialog-footer button.cancel-button[data-v-0c6b8db2]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.dialog-footer button.cancel-button[data-v-0c6b8db2]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading .lds-ring[data-v-559bdf2e]{display:inline-flex;justify-content:center;align-items:center;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-559bdf2e]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-559bdf2e 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-559bdf2e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.modal-loading-text[data-v-559bdf2e]{color:#fff;font-weight:700}.modal-fade-enter-active[data-v-448d3772],.modal-fade-leave-active[data-v-448d3772]{transition:opacity .5s ease}.modal-fade-enter-active[data-v-448d3772] .modal-content.drawer-mode,.modal-fade-leave-active[data-v-448d3772] .modal-content.drawer-mode{transition:transform .5s ease}.modal-fade-enter-from[data-v-448d3772],.modal-fade-leave-to[data-v-448d3772]{opacity:0}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.left-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.left-position{transform:translate3d(-100%,0,0)}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.right-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.right-position{transform:translate3d(100%,0,0)}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.top-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.top-position{transform:translate3d(0,-100%,0)}.modal-fade-enter-from[data-v-448d3772] .modal-content.drawer-mode.bottom-position,.modal-fade-leave-to[data-v-448d3772] .modal-content.drawer-mode.bottom-position{transform:translate3d(0,100%,0)}.modal-footer[data-v-46f8d703]{box-sizing:border-box;min-height:50px;border-top:solid 1px var(--color-border-1, rgb(232, 232, 232));padding:10px}.modal-footer button[data-v-46f8d703]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.modal-footer button.submit-button[data-v-46f8d703]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-46f8d703]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-46f8d703]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-46f8d703]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-46f8d703]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-46f8d703]:active{background-color:var(--color-fill-4, #c9cdd4)}.modal-header[data-v-d0247172]{box-sizing:border-box;padding:10px;min-height:50px;border-bottom:solid 1px var(--color-border-1, rgb(232, 232, 232));color:var(--color-text-2, #4E5969)}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gopowerteam/modal-render",
3
3
  "type": "module",
4
- "version": "0.0.46",
4
+ "version": "0.0.47",
5
5
  "author": {
6
6
  "name": "zhuchentong",
7
7
  "email": "2037630@gmail.com"