yuyeon 0.2.2-rc.2 → 0.2.2-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/yuyeon.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var tr = Object.defineProperty;
2
2
  var nr = (e, t, n) => t in e ? tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var he = (e, t, n) => nr(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { getCurrentInstance as ae, capitalize as ar, inject as oe, computed as x, shallowRef as re, watchEffect as Ye, ref as M, provide as ue, h as ce, watch as V, onScopeDispose as _e, effectScope as At, toRaw as ka, toRef as le, onBeforeUnmount as rt, reactive as Ee, onMounted as bn, nextTick as me, resolveDynamicComponent as ir, createVNode as d, withDirectives as He, mergeProps as W, resolveDirective as Dt, unref as de, readonly as Jt, onBeforeMount as Aa, Fragment as Z, createTextVNode as Tt, withKeys as rr, toRefs as lr, Transition as Et, withModifiers as pn, Teleport as or, vShow as Sn, watchPostEffect as ur, defineComponent as Ot, resolveComponent as cr, onBeforeUpdate as sr, isVNode as It } from "vue";
4
+ import { getCurrentInstance as ne, capitalize as ar, inject as oe, computed as x, shallowRef as re, watchEffect as Ye, ref as M, provide as ue, h as ce, watch as V, onScopeDispose as _e, effectScope as At, toRaw as ka, toRef as le, onBeforeUnmount as rt, reactive as Ee, onMounted as bn, nextTick as me, resolveDynamicComponent as ir, createVNode as d, withDirectives as He, mergeProps as W, resolveDirective as Dt, unref as de, readonly as Jt, onBeforeMount as Aa, Fragment as Z, createTextVNode as Tt, withKeys as rr, toRefs as lr, Transition as Et, withModifiers as pn, Teleport as or, vShow as Sn, watchPostEffect as ur, defineComponent as Ot, resolveComponent as cr, onBeforeUpdate as sr, isVNode as It } from "vue";
5
5
  function qe(e, t) {
6
6
  return e ? Object.prototype.hasOwnProperty.call(e, t) : !1;
7
7
  }
@@ -70,7 +70,7 @@ function Oe(e, t) {
70
70
  const n = { ...e };
71
71
  return t.forEach((a) => delete n[a]), n;
72
72
  }
73
- function fr(e, t = ae()) {
73
+ function fr(e, t = ne()) {
74
74
  const n = t == null ? void 0 : t.provides;
75
75
  if (n && e in n)
76
76
  return n[e];
@@ -148,7 +148,7 @@ function Ea() {
148
148
  }
149
149
  function gr(e = {}, t, n = Ea()) {
150
150
  var u, s;
151
- const a = ae();
151
+ const a = ne();
152
152
  if (t = t || ((u = a == null ? void 0 : a.type) == null ? void 0 : u.name) || ((s = a == null ? void 0 : a.type) == null ? void 0 : s.__name), !t) throw new Error("Missing component name");
153
153
  const i = x(() => {
154
154
  var c;
@@ -193,7 +193,7 @@ function N(e) {
193
193
  }), e;
194
194
  }
195
195
  function lt() {
196
- const e = ae();
196
+ const e = ne();
197
197
  return e == null ? void 0 : e.uid;
198
198
  }
199
199
  function Ie(e) {
@@ -263,7 +263,7 @@ function xn(e, t) {
263
263
  });
264
264
  }
265
265
  function G(e, t = "modelValue", n, a = (r) => r, i = (r) => r) {
266
- const r = ae(), l = Mt(t), o = l === t ? Ta(t) : t, u = M(
266
+ const r = ne(), l = Mt(t), o = l === t ? Ta(t) : t, u = M(
267
267
  e[o] !== void 0 ? e[o] : n
268
268
  );
269
269
  function s() {
@@ -327,7 +327,7 @@ const pr = L(
327
327
  "choice-item"
328
328
  );
329
329
  function xr(e, t, n = !0) {
330
- const a = ae();
330
+ const a = ne();
331
331
  if (!a)
332
332
  throw new Error(
333
333
  '"useChoiceItem" must be used inside a component setup function'
@@ -382,7 +382,7 @@ function wr(e, t) {
382
382
  const w = _r(a, y);
383
383
  return e.multiple ? w : w[0];
384
384
  }
385
- ), r = ae();
385
+ ), r = ne();
386
386
  function l(y, w) {
387
387
  const _ = y, p = Symbol.for(`${t.description}:id`), f = ht(p, r == null ? void 0 : r.vnode).indexOf(w);
388
388
  f > -1 ? a.splice(f, 0, _) : a.push(_);
@@ -480,7 +480,7 @@ function kr(e, t) {
480
480
  );
481
481
  }
482
482
  function j(e) {
483
- const t = ae();
483
+ const t = ne();
484
484
  t && (t.render = e);
485
485
  }
486
486
  const Ar = L(
@@ -649,7 +649,7 @@ const Ir = "YSpinnerRing", Va = /* @__PURE__ */ N({
649
649
  },
650
650
  ...Ar(),
651
651
  ...Sr()
652
- }, "YButton"), ne = /* @__PURE__ */ N({
652
+ }, "YButton"), ae = /* @__PURE__ */ N({
653
653
  name: "YButton",
654
654
  directives: {
655
655
  PlateWave: Na
@@ -1103,7 +1103,7 @@ function Fr(e) {
1103
1103
  };
1104
1104
  }
1105
1105
  function Ke(e) {
1106
- ae();
1106
+ ne();
1107
1107
  const t = oe(
1108
1108
  St,
1109
1109
  null
@@ -1131,7 +1131,7 @@ function Ke(e) {
1131
1131
  return ue(St, i), i;
1132
1132
  }
1133
1133
  function Xu() {
1134
- ae();
1134
+ ne();
1135
1135
  const e = oe(St, null);
1136
1136
  if (!e) throw new Error('【yuyeon】 Not found provided "ThemeModule"');
1137
1137
  return e;
@@ -1239,7 +1239,7 @@ const Kr = L(
1239
1239
  function zr(e, t, n = lt()) {
1240
1240
  const a = x(() => e.name ?? n), i = G(e, "modelValue"), r = x(
1241
1241
  () => e.validationValue === void 0 ? i.value : e.validationValue
1242
- ), l = ae(), o = Wr(), u = M(!1), s = x(() => {
1242
+ ), l = ne(), o = Wr(), u = M(!1), s = x(() => {
1243
1243
  let C = e.validateOn || "input";
1244
1244
  C === "lazy" && (C = "input,lazy");
1245
1245
  const h = new Set((C == null ? void 0 : C.split(",")) ?? []);
@@ -1630,7 +1630,7 @@ const ge = "y-input", ot = L({
1630
1630
  c.value = "", v.value = "", a("update:modelValue", c.value), a("change", c.value);
1631
1631
  }
1632
1632
  function Y() {
1633
- const k = ae(), {
1633
+ const k = ne(), {
1634
1634
  displayText: O
1635
1635
  } = e;
1636
1636
  if (O !== void 0) {
@@ -1793,7 +1793,7 @@ const ge = "y-input", ot = L({
1793
1793
  n("update:modelValue", A);
1794
1794
  }
1795
1795
  function _() {
1796
- const A = ae(), {
1796
+ const A = ne(), {
1797
1797
  displayText: T
1798
1798
  } = e;
1799
1799
  if (T !== void 0) {
@@ -3628,7 +3628,7 @@ function Bl(e) {
3628
3628
  }
3629
3629
  const ca = "y-layer-group", be = /* @__PURE__ */ new WeakMap();
3630
3630
  function Pl(e) {
3631
- const t = ae(), n = Uu(), a = x(() => {
3631
+ const t = ne(), n = Uu(), a = x(() => {
3632
3632
  let l = document.body;
3633
3633
  const o = n.root;
3634
3634
  o && (l = o);
@@ -3729,7 +3729,7 @@ const Vl = {
3729
3729
  "YLayer.base"
3730
3730
  );
3731
3731
  function Rl(e) {
3732
- const t = ae(), n = M(), a = M(), i = M(), r = x(() => {
3732
+ const t = ne(), n = M(), a = M(), i = M(), r = x(() => {
3733
3733
  var u, s;
3734
3734
  const o = (s = (u = a.value) == null ? void 0 : u[0]) == null ? void 0 : s.el;
3735
3735
  if (o && o.nodeType === Node.ELEMENT_NODE)
@@ -3974,7 +3974,7 @@ const ze = L({
3974
3974
  attrs: a,
3975
3975
  slots: i
3976
3976
  }) {
3977
- const r = ae(), l = M(), o = M(), u = M(), {
3977
+ const r = ne(), l = M(), o = M(), u = M(), {
3978
3978
  base: s,
3979
3979
  base$: c,
3980
3980
  baseEl: v,
@@ -4154,7 +4154,7 @@ const ze = L({
4154
4154
  }
4155
4155
  }), va = Symbol.for("yuyeon.active-stack");
4156
4156
  function Za(e, t, n) {
4157
- const a = oe(va, null), i = re([]), r = ae();
4157
+ const a = oe(va, null), i = re([]), r = ne();
4158
4158
  function l(s) {
4159
4159
  i.value.push(s);
4160
4160
  }
@@ -4169,6 +4169,8 @@ function Za(e, t, n) {
4169
4169
  i.value.pop();
4170
4170
  }
4171
4171
  function u() {
4172
+ var c;
4173
+ if ((c = e.value) != null && c.modal) return;
4172
4174
  t.value = !1;
4173
4175
  const s = () => {
4174
4176
  i.value.length === 0 && (a == null || a.clear());
@@ -4220,7 +4222,7 @@ const Ja = L({
4220
4222
  emit: t,
4221
4223
  slots: n
4222
4224
  }) {
4223
- const a = ae(), i = a == null ? void 0 : a.appContext.config.globalProperties.$yuyeon, r = G(e), l = x(() => ({
4225
+ const a = ne(), i = a == null ? void 0 : a.appContext.config.globalProperties.$yuyeon, r = G(e), l = x(() => ({
4224
4226
  ...Ie(e.dialogClasses),
4225
4227
  "y-dialog": !0,
4226
4228
  "y-dialog--maximized": e.maximized
@@ -4285,7 +4287,7 @@ const Ja = L({
4285
4287
  var T;
4286
4288
  return !((T = u.value) != null && T.isMe(A)) && A.ctx.modal;
4287
4289
  });
4288
- h && !h.length && (g.classList.remove("y-dialog--virtual-scroll"), document.documentElement.classList.remove("y-dialog--prevent-scroll"), g.style.top = "", g.style.left = "", requestAnimationFrame(() => {
4290
+ h && !h.length && (g.classList.remove("y-dialog--virtual-scroll"), document.documentElement.classList.remove("y-dialog--prevent-scroll"), g.style.top = "", g.style.left = "", console.log(w.value), requestAnimationFrame(() => {
4289
4291
  document.documentElement.scrollTop = w.value, document.documentElement.scrollLeft = _.value;
4290
4292
  }));
4291
4293
  }
@@ -4304,7 +4306,7 @@ const Ja = L({
4304
4306
  }, {
4305
4307
  immediate: !0
4306
4308
  }), rt(() => {
4307
- p(!1);
4309
+ r.value && (r.value = !1);
4308
4310
  }), j(() => d(Z, null, [d(ye, W({
4309
4311
  modelValue: r.value,
4310
4312
  "onUpdate:modelValue": (f) => r.value = f,
@@ -5459,7 +5461,7 @@ const yi = vi(!1), Ho = vi(!0), Wo = /* @__PURE__ */ Ot({
5459
5461
  }, "YTreeViewNode"), hi = /* @__PURE__ */ N({
5460
5462
  name: "YTreeNode",
5461
5463
  components: {
5462
- YButton: ne,
5464
+ YButton: ae,
5463
5465
  YIconExpand: it,
5464
5466
  YPlate: je,
5465
5467
  YIconCheckbox: Ce
@@ -5479,7 +5481,7 @@ const yi = vi(!1), Ho = vi(!0), Wo = /* @__PURE__ */ Ot({
5479
5481
  slots: t,
5480
5482
  expose: n
5481
5483
  }) {
5482
- const a = cr("YTreeViewNode", !0), i = ae(), r = oe("tree-view"), l = M(), o = M(!1), u = M(!1), s = M(!1), c = M(!1), v = x(() => (X(e.item, e.itemChildren) ?? []).slice()), y = x(() => v.value.length < 1), w = x(() => ({
5484
+ const a = cr("YTreeViewNode", !0), i = ne(), r = oe("tree-view"), l = M(), o = M(!1), u = M(!1), s = M(!1), c = M(!1), v = x(() => (X(e.item, e.itemChildren) ?? []).slice()), y = x(() => v.value.length < 1), w = x(() => ({
5483
5485
  "y-tree-view-node": !0,
5484
5486
  "y-tree-view-node--leaf": y.value,
5485
5487
  "y-tree-view-node--expanded": o.value,
@@ -5546,7 +5548,7 @@ const yi = vi(!1), Ho = vi(!0), Wo = /* @__PURE__ */ Ot({
5546
5548
  onMousemove: e.onMousemoveContainer && B
5547
5549
  }, [d(je, null, null), d("div", {
5548
5550
  class: "y-tree-view-node__indents"
5549
- }, [Y]), !y.value && g.value.length > 0 ? d(ne, {
5551
+ }, [Y]), !y.value && g.value.length > 0 ? d(ae, {
5550
5552
  class: "y-tree-view-node__expand-icon",
5551
5553
  variation: "icon",
5552
5554
  onClick: C
@@ -6557,7 +6559,7 @@ const ki = L({
6557
6559
  }, "YPagination"), Ai = /* @__PURE__ */ N({
6558
6560
  name: "YPagination",
6559
6561
  components: {
6560
- YButton: ne
6562
+ YButton: ae
6561
6563
  },
6562
6564
  props: {
6563
6565
  ...ki()
@@ -6708,14 +6710,14 @@ const ki = L({
6708
6710
  }, [e.showEndButton && d("li", {
6709
6711
  key: "first",
6710
6712
  class: "y-pagination__first"
6711
- }, [t.first ? t.first(c.value.first) : d(ne, c.value.first, {
6713
+ }, [t.first ? t.first(c.value.first) : d(ae, c.value.first, {
6712
6714
  default: () => [t["first-icon"] ? t["first-icon"]() : d(Se, {
6713
6715
  type: "first"
6714
6716
  }, null)]
6715
6717
  })]), d("li", {
6716
6718
  key: "prev",
6717
6719
  class: "y-pagination__prev"
6718
- }, [t.prev ? t.prev(c.value.prev) : d(ne, c.value.prev, {
6720
+ }, [t.prev ? t.prev(c.value.prev) : d(ae, c.value.prev, {
6719
6721
  default: () => [t["prev-icon"] ? t["prev-icon"]() : d(Se, {
6720
6722
  type: "prev"
6721
6723
  }, null)]
@@ -6724,19 +6726,19 @@ const ki = L({
6724
6726
  class: ["y-pagination__item", {
6725
6727
  "y-pagination__item--active": f.active
6726
6728
  }]
6727
- }, [d(ne, f.props, {
6729
+ }, [d(ae, f.props, {
6728
6730
  default: () => [f.props.ellipsis ? t.ellipsis ? t.ellipsis() : "..." : f.page]
6729
6731
  })])), d("li", {
6730
6732
  key: "next",
6731
6733
  class: "y-pagination__next"
6732
- }, [t.next ? t.next(c.value.next) : d(ne, c.value.next, {
6734
+ }, [t.next ? t.next(c.value.next) : d(ae, c.value.next, {
6733
6735
  default: () => [t["next-icon"] ? t["next-icon"]() : d(Se, {
6734
6736
  type: "next"
6735
6737
  }, null)]
6736
6738
  })]), e.showEndButton && d("li", {
6737
6739
  key: "last",
6738
6740
  class: "y-pagination__last"
6739
- }, [t.last ? t.last(c.value.last) : d(ne, c.value.last, {
6741
+ }, [t.last ? t.last(c.value.last) : d(ae, c.value.last, {
6740
6742
  default: () => [t["last-icon"] ? t["last-icon"]() : d(Se, {
6741
6743
  type: "last"
6742
6744
  }, null)]
@@ -6816,7 +6818,7 @@ const ru = L({
6816
6818
  }, "YDataTableControl"), vn = /* @__PURE__ */ N({
6817
6819
  name: "YDataTableControl",
6818
6820
  components: {
6819
- YButton: ne,
6821
+ YButton: ae,
6820
6822
  YIconExpand: it,
6821
6823
  YFieldInput: xt,
6822
6824
  YIconPageControl: Se
@@ -7445,6 +7447,7 @@ const jn = {
7445
7447
  emit: n,
7446
7448
  expose: a
7447
7449
  }) {
7450
+ ne();
7448
7451
  const i = M(), r = x(() => ({
7449
7452
  ...Ie(e.menuClasses),
7450
7453
  "y-menu": !0
@@ -7477,7 +7480,7 @@ const jn = {
7477
7480
  return;
7478
7481
  const A = l.value;
7479
7482
  if (!e.disabled) {
7480
- if (e.openOnHover && u.value && l.value)
7483
+ if (e.openOnHover && u.value && A)
7481
7484
  return;
7482
7485
  l.value = !A;
7483
7486
  }
@@ -7490,7 +7493,7 @@ const jn = {
7490
7493
  return;
7491
7494
  }
7492
7495
  if (l.value) {
7493
- (!c && s.value.length === 0 || c) && (l.value = !1);
7496
+ s.value.length === 0 && (l.value = !1);
7494
7497
  const B = (A = c == null ? void 0 : c.$el.value) == null ? void 0 : A.content$, F = (T = c == null ? void 0 : c.$el.value) == null ? void 0 : T.modal;
7495
7498
  !(B && !Qr(h, B)) && !F && !e.preventCloseBubble && (c == null || c.clear());
7496
7499
  }
@@ -7979,7 +7982,7 @@ const Ri = L({
7979
7982
  }), {
7980
7983
  base: (...u) => {
7981
7984
  var s;
7982
- return t.base ? (s = t.base) == null ? void 0 : s.call(t, ...u) : d(ne, W({
7985
+ return t.base ? (s = t.base) == null ? void 0 : s.call(t, ...u) : d(ae, W({
7983
7986
  variation: e.variation,
7984
7987
  color: e.color,
7985
7988
  class: ["y-dropdown", {
@@ -8367,8 +8370,8 @@ const Hi = L({
8367
8370
  a.value = u;
8368
8371
  }
8369
8372
  return j(() => {
8370
- const u = te(e, ne.props);
8371
- return d(ne, W({
8373
+ const u = te(e, ae.props);
8374
+ return d(ae, W({
8372
8375
  class: ["y-tab"],
8373
8376
  active: !1
8374
8377
  }, l.value, n, u, {
@@ -8656,7 +8659,7 @@ const Hi = L({
8656
8659
  "y-date-calendar__day--range-end": h.rangeEnd
8657
8660
  }],
8658
8661
  "data-date": h.disabled ? void 0 : h.isoDate
8659
- }, [(e.showAdjacentMonthDates || !h.adjacent) && d(Z, null, [((B = t.day) == null ? void 0 : B.call(t, T)) ?? d(ne, W({
8662
+ }, [(e.showAdjacentMonthDates || !h.adjacent) && d(Z, null, [((B = t.day) == null ? void 0 : B.call(t, T)) ?? d(ae, W({
8660
8663
  color: (h.selected || h.today) && !h.disabled ? e.color : void 0,
8661
8664
  disabled: h.disabled,
8662
8665
  variation: ["rounded", h.selected ? "filled" : h.today ? "outlined" : "text"].join(",")
@@ -8707,7 +8710,7 @@ const Hi = L({
8707
8710
  };
8708
8711
  return d("div", {
8709
8712
  class: ["y-month-picker__cell", "y-month-picker__month"]
8710
- }, [d(ne, {
8713
+ }, [d(ae, {
8711
8714
  variation: ["rounded", "text"].join(","),
8712
8715
  active: u.active,
8713
8716
  color: e.color,
@@ -8766,14 +8769,14 @@ const Hi = L({
8766
8769
  }
8767
8770
  j(() => d("div", {
8768
8771
  class: ["y-date-picker-control"]
8769
- }, [d(ne, {
8772
+ }, [d(ae, {
8770
8773
  variation: "text",
8771
8774
  class: "y-date-picker-control__display",
8772
8775
  disabled: n.value,
8773
8776
  onClick: u
8774
8777
  }, {
8775
8778
  default: () => [e.yearText]
8776
- }), d(ne, {
8779
+ }), d(ae, {
8777
8780
  variation: "text",
8778
8781
  class: "y-date-picker-control__display",
8779
8782
  disabled: a.value,
@@ -8782,7 +8785,7 @@ const Hi = L({
8782
8785
  default: () => [e.monthText]
8783
8786
  }), d("div", {
8784
8787
  class: "flex-spacer"
8785
- }, null), d(ne, {
8788
+ }, null), d(ae, {
8786
8789
  class: "y-date-picker-control__page-button",
8787
8790
  variation: "text",
8788
8791
  disabled: i.value,
@@ -8791,7 +8794,7 @@ const Hi = L({
8791
8794
  default: () => [d(Me, {
8792
8795
  icon: e.prevIcon
8793
8796
  }, null)]
8794
- }), d(ne, {
8797
+ }), d(ae, {
8795
8798
  class: "y-date-picker-control__page-button",
8796
8799
  variation: "text",
8797
8800
  disabled: r.value,
@@ -8837,7 +8840,7 @@ const Hi = L({
8837
8840
  class: ["y-year-picker"]
8838
8841
  }, [o.value.map((c) => d("div", {
8839
8842
  class: ["y-year-picker__cell"]
8840
- }, [d(ne, {
8843
+ }, [d(ae, {
8841
8844
  variation: ["rounded", "text"].join(","),
8842
8845
  active: c.active,
8843
8846
  color: e.color,
@@ -9277,7 +9280,7 @@ function Fu(e, t) {
9277
9280
  }
9278
9281
  function ju(e) {
9279
9282
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "modelValue", n = arguments.length > 2 ? arguments[2] : void 0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : (y) => y, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : (y) => y;
9280
- const r = ae(), l = Lu(t), o = l === t ? Ru(t) : t, u = M(e[o] !== void 0 ? e[o] : n);
9283
+ const r = ne(), l = Lu(t), o = l === t ? Ru(t) : t, u = M(e[o] !== void 0 ? e[o] : n);
9281
9284
  function s() {
9282
9285
  return e[o];
9283
9286
  }
@@ -9389,7 +9392,7 @@ const er = L({
9389
9392
  YAlert: Eu,
9390
9393
  YApp: br,
9391
9394
  YBadge: $u,
9392
- YButton: ne,
9395
+ YButton: ae,
9393
9396
  YCard: Pt,
9394
9397
  YCardBody: wl,
9395
9398
  YCardFooter: Cl,
@@ -9509,7 +9512,7 @@ function Zu(e = zu) {
9509
9512
  };
9510
9513
  }
9511
9514
  function Uu() {
9512
- const e = ae();
9515
+ const e = ne();
9513
9516
  if (!e) throw new Error("[yuyeon] Called outside of setup context");
9514
9517
  return e.appContext.config.globalProperties.$yuyeon;
9515
9518
  }