@kungal/ui-vue 2.3.1 → 2.5.0

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/index.js CHANGED
@@ -7,7 +7,7 @@ import { addMonths as Fe, addYears as Ie, eachDayOfInterval as Le, endOfMonth as
7
7
  import { enUS as Qe, ja as $e, zhCN as et } from "date-fns/locale";
8
8
  import { Cropper as tt } from "vue-advanced-cropper";
9
9
  //#region src/componentNames.ts
10
- var nt = /* @__PURE__ */ "KunAccordion.KunAccordionItem.KunAlertProvider.KunAutocomplete.KunAvatar.KunAvatarGroup.KunBadge.KunBrand.KunButton.KunCard.KunCarousel.KunCarouselItem.KunCheckBox.KunChip.KunContent.KunContextMenu.KunCopy.KunDatePicker.KunDivider.KunDrawer.KunDropdown.KunFadeCard.KunFileInput.KunHeader.KunIcon.KunImage.KunImageNative.KunInfo.KunInput.KunLightbox.KunLightboxGallery.KunLightboxGalleryItem.KunLink.KunLoading.KunLoli.KunLoliProvider.KunMarkdown.KunMessageProvider.KunModal.KunNull.KunNumberInput.KunPagination.KunPinInput.KunPopover.KunProgress.KunRadioGroup.KunRating.KunReaction.KunRipple.KunScrollShadow.KunSelect.KunSkeleton.KunSlider.KunSteps.KunSwitch.KunTab.KunTabPanel.KunTabPanels.KunTagInput.KunText.KunTextarea.KunTimeline.KunTimelineItem.KunTooltip.KunUpload.KunUserChip".split("."), rt = Symbol("kun-accordion"), it = /* @__PURE__ */ p({
10
+ var nt = /* @__PURE__ */ "KunAccordion.KunAccordionItem.KunAlertProvider.KunAutocomplete.KunAvatar.KunAvatarGroup.KunBadge.KunBrand.KunButton.KunCard.KunCarousel.KunCarouselItem.KunCheckBox.KunChip.KunContent.KunContextMenu.KunCopy.KunDatePicker.KunDivider.KunDrawer.KunDropdown.KunFadeCard.KunFileInput.KunHeader.KunIcon.KunImage.KunImageNative.KunInfo.KunInput.KunLightbox.KunLightboxGallery.KunLightboxGalleryItem.KunLink.KunLoading.KunLoli.KunLoliProvider.KunMarkdown.KunMessageProvider.KunModal.KunNull.KunNumberInput.KunPagination.KunPinInput.KunPopover.KunProgress.KunRadioGroup.KunRating.KunReaction.KunRipple.KunScrollShadow.KunSelect.KunShatter.KunSkeleton.KunSlider.KunSteps.KunSwitch.KunTab.KunTabPanel.KunTabPanels.KunTagInput.KunText.KunTextarea.KunTimeline.KunTimelineItem.KunTooltip.KunUpload.KunUserChip".split("."), rt = Symbol("kun-accordion"), it = /* @__PURE__ */ p({
11
11
  name: "KunAccordion",
12
12
  __name: "Accordion",
13
13
  props: /*@__PURE__*/ g({
@@ -5391,7 +5391,323 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5391
5391
  e.error ? (T(), l("p", js, M(e.error), 1)) : e.description ? (T(), l("p", Ms, M(e.description), 1)) : c("", !0)
5392
5392
  ], 2));
5393
5393
  }
5394
- }), Ps = { class: "relative" }, Fs = ["aria-label"], Is = /* @__PURE__ */ p({
5394
+ }), Ps = /* @__PURE__ */ p({
5395
+ name: "KunShatter",
5396
+ __name: "Shatter",
5397
+ props: /*@__PURE__*/ g({
5398
+ trigger: { default: "manual" },
5399
+ pieces: { default: 24 },
5400
+ duration: { default: 1100 },
5401
+ origin: { default: "center" },
5402
+ spread: { default: 1 },
5403
+ gravity: { default: 1 },
5404
+ rotation: { default: 140 },
5405
+ fade: {
5406
+ type: Boolean,
5407
+ default: !0
5408
+ },
5409
+ easing: { default: "linear" },
5410
+ seed: {},
5411
+ reassemble: {
5412
+ type: Boolean,
5413
+ default: !0
5414
+ },
5415
+ autoRestore: { default: 0 },
5416
+ keepSpace: {
5417
+ type: Boolean,
5418
+ default: !1
5419
+ },
5420
+ disabled: {
5421
+ type: Boolean,
5422
+ default: !1
5423
+ },
5424
+ disableAnimation: {
5425
+ type: Boolean,
5426
+ default: !1
5427
+ },
5428
+ zIndex: { default: 9999 },
5429
+ className: { default: "" }
5430
+ }, {
5431
+ shattered: {
5432
+ type: Boolean,
5433
+ default: !1
5434
+ },
5435
+ shatteredModifiers: {}
5436
+ }),
5437
+ emits: /*@__PURE__*/ g([
5438
+ "shatterStart",
5439
+ "shatterEnd",
5440
+ "restoreEnd"
5441
+ ], ["update:shattered"]),
5442
+ setup(e, { expose: t, emit: n }) {
5443
+ let r = e, i = z(e, "shattered"), a = n, o = O(null), s = Te("(prefers-reduced-motion: reduce)"), c = O("idle"), u = null, d = [], f = null, p = {
5444
+ x: 0,
5445
+ y: 0,
5446
+ set: !1
5447
+ }, m = null, h = (e) => {
5448
+ e.style.visibility = "", r.keepSpace ? e.style.visibility = "hidden" : e.style.display = "none";
5449
+ }, g = (e) => {
5450
+ e.style.visibility = "", e.style.display = "";
5451
+ }, _ = (e, t, n) => e < t ? t : e > n ? n : e;
5452
+ function v(e) {
5453
+ return () => {
5454
+ e |= 0, e = e + 1831565813 | 0;
5455
+ let t = Math.imul(e ^ e >>> 15, 1 | e);
5456
+ return t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t, ((t ^ t >>> 14) >>> 0) / 4294967296;
5457
+ };
5458
+ }
5459
+ function b(e, t, n, r, i, a) {
5460
+ let o = [], s = Math.hypot(e, t), c = Math.round(n * .68);
5461
+ for (let n = 0; n < c; n++) {
5462
+ let n = r() * Math.PI * 2, c = s * .55 * r() ** 1.7;
5463
+ o.push([_(i + Math.cos(n) * c, 0, e), _(a + Math.sin(n) * c, 0, t)]);
5464
+ }
5465
+ for (let i = c; i < n; i++) o.push([r() * e, r() * t]);
5466
+ return o.map(([e, t]) => [e + (r() - .5) * .5, t + (r() - .5) * .5]);
5467
+ }
5468
+ function C(e, t, n) {
5469
+ let r = (t[0] + n[0]) / 2, i = (t[1] + n[1]) / 2, a = n[0] - t[0], o = n[1] - t[1], s = (e) => (e[0] - r) * a + (e[1] - i) * o, c = [];
5470
+ for (let t = 0; t < e.length; t++) {
5471
+ let n = e[t], r = e[(t + 1) % e.length];
5472
+ if (!n || !r) continue;
5473
+ let i = s(n), a = s(r);
5474
+ if (i <= 0 && c.push(n), i < 0 && a > 0 || i > 0 && a < 0) {
5475
+ let e = i / (i - a);
5476
+ c.push([n[0] + e * (r[0] - n[0]), n[1] + e * (r[1] - n[1])]);
5477
+ }
5478
+ }
5479
+ return c;
5480
+ }
5481
+ function w(e, t, n) {
5482
+ let r = [];
5483
+ for (let i = 0; i < e.length; i++) {
5484
+ let a = e[i];
5485
+ if (!a) continue;
5486
+ let o = [
5487
+ [0, 0],
5488
+ [t, 0],
5489
+ [t, n],
5490
+ [0, n]
5491
+ ];
5492
+ for (let t = 0; t < e.length && o.length >= 3; t++) {
5493
+ let n = e[t];
5494
+ i !== t && n && (o = C(o, a, n));
5495
+ }
5496
+ o.length >= 3 && r.push(o);
5497
+ }
5498
+ return r;
5499
+ }
5500
+ function E(e, t) {
5501
+ let n = r.origin;
5502
+ return n === "top" ? [e / 2, 0] : n === "pointer" ? p.set ? [_(p.x, 0, e), _(p.y, 0, t)] : [e / 2, t / 2] : n && typeof n == "object" ? [_(n.x, 0, e), _(n.y, 0, t)] : [e / 2, t / 2];
5503
+ }
5504
+ function D(e, t, n, i, a, o) {
5505
+ let s = v(n || 1), c = w(b(e, t, _(Math.round(r.pieces), 2, 160), s, i, a), e, t), l = r.spread * Math.hypot(e, t) * .5, u = Math.max(1, Math.hypot(Math.max(i, e - i), Math.max(a, t - a))), d = [];
5506
+ for (let e of c) {
5507
+ let t = Infinity, n = Infinity, c = -Infinity, f = -Infinity, p = 0, m = 0;
5508
+ for (let [r, i] of e) r < t && (t = r), i < n && (n = i), r > c && (c = r), i > f && (f = i), p += r, m += i;
5509
+ p /= e.length, m /= e.length;
5510
+ let h = c - t, g = f - n;
5511
+ if (h < .5 || g < .5) continue;
5512
+ let _ = e.map(([e, r]) => `${(e - t).toFixed(2)}px ${(r - n).toFixed(2)}px`).join(","), v = p - i, y = m - a, b = Math.hypot(v, y);
5513
+ if (b < .01) {
5514
+ let e = s() * Math.PI * 2;
5515
+ v = Math.cos(e), y = Math.sin(e), b = 1;
5516
+ }
5517
+ v /= b, y /= b;
5518
+ let x = l * (.32 + s() * .55), S = v * x, C = y * x * .8, w = r.gravity * l * (.85 + s() * .5), T = (s() * 2 - 1) * r.rotation, E = .8 + s() * .16, D = .5 + s() * .18, O = b / u * Math.min(r.duration * .22, 120), k = S, A = C + w, j = [];
5519
+ for (let e = 0; e <= 16; e++) {
5520
+ let t = e / 16, n, i, a, s, c;
5521
+ if (o === "out") {
5522
+ let e = 1 - (1 - t) ** 1.7;
5523
+ n = S * e, i = C * e + w * t * t, a = T * t, s = 1 - (1 - E) * t, c = r.fade ? t < D ? 1 : Math.max(0, 1 - (t - D) / (1 - D)) : 1;
5524
+ } else {
5525
+ let e = 1 - (1 - t) ** 2, o = 1 - e;
5526
+ n = k * o, i = A * o, a = T * o, s = E + (1 - E) * e, c = r.fade ? Math.min(1, t / .4) : 1;
5527
+ }
5528
+ j.push({
5529
+ offset: +t.toFixed(4),
5530
+ transform: `translate3d(${n.toFixed(1)}px, ${i.toFixed(1)}px, 0) rotate(${a.toFixed(1)}deg) scale(${s.toFixed(3)})`,
5531
+ opacity: +c.toFixed(3),
5532
+ easing: "linear"
5533
+ });
5534
+ }
5535
+ d.push({
5536
+ minX: t,
5537
+ minY: n,
5538
+ bw: h,
5539
+ bh: g,
5540
+ clip: _,
5541
+ originX: p - t,
5542
+ originY: m - n,
5543
+ delay: O,
5544
+ kf: j
5545
+ });
5546
+ }
5547
+ return d;
5548
+ }
5549
+ function k(e, t) {
5550
+ let n = o.value;
5551
+ if (!n) return [];
5552
+ let i = e.width, a = e.height, s = n.cloneNode(!0);
5553
+ s.removeAttribute("id"), Object.assign(s.style, {
5554
+ margin: "0",
5555
+ inset: "auto",
5556
+ position: "static",
5557
+ transform: "none",
5558
+ display: "",
5559
+ visibility: "visible"
5560
+ });
5561
+ let c = document.createElement("div");
5562
+ Object.assign(c.style, {
5563
+ position: "absolute",
5564
+ left: `${e.left + window.scrollX}px`,
5565
+ top: `${e.top + window.scrollY}px`,
5566
+ width: `${i}px`,
5567
+ height: `${a}px`,
5568
+ pointerEvents: "none",
5569
+ overflow: "visible",
5570
+ contain: "layout",
5571
+ zIndex: String(r.zIndex)
5572
+ }), c.setAttribute("aria-hidden", "true");
5573
+ let l = document.createDocumentFragment(), d = [];
5574
+ for (let e of t) {
5575
+ let t = document.createElement("div");
5576
+ Object.assign(t.style, {
5577
+ position: "absolute",
5578
+ left: `${e.minX}px`,
5579
+ top: `${e.minY}px`,
5580
+ width: `${e.bw}px`,
5581
+ height: `${e.bh}px`,
5582
+ overflow: "hidden",
5583
+ clipPath: `polygon(${e.clip})`,
5584
+ transformOrigin: `${e.originX.toFixed(2)}px ${e.originY.toFixed(2)}px`,
5585
+ willChange: "transform, opacity",
5586
+ contain: "layout paint",
5587
+ backfaceVisibility: "hidden"
5588
+ });
5589
+ let n = s.cloneNode(!0);
5590
+ Object.assign(n.style, {
5591
+ position: "absolute",
5592
+ left: `${-e.minX}px`,
5593
+ top: `${-e.minY}px`,
5594
+ width: `${i}px`,
5595
+ height: `${a}px`,
5596
+ margin: "0"
5597
+ }), t.appendChild(n), l.appendChild(t), d.push({
5598
+ el: t,
5599
+ desc: e
5600
+ });
5601
+ }
5602
+ return c.appendChild(l), document.body.appendChild(c), u = c, d;
5603
+ }
5604
+ function j(e, t) {
5605
+ if (d = e.map(({ el: e, desc: t }) => e.animate(t.kf, {
5606
+ duration: r.duration,
5607
+ delay: t.delay,
5608
+ easing: r.easing,
5609
+ fill: "both"
5610
+ })), !d.length) {
5611
+ t();
5612
+ return;
5613
+ }
5614
+ Promise.allSettled(d.map((e) => e.finished)).then(t);
5615
+ }
5616
+ function M(e) {
5617
+ let t = o.value;
5618
+ if (!t || c.value !== "idle" || r.disabled) return;
5619
+ let n = t.getBoundingClientRect(), i = n.width, l = n.height;
5620
+ if (a("shatterStart"), c.value = "shattering", s.value || r.disableAnimation || i < 2 || l < 2 || typeof t.animate != "function") {
5621
+ m = null, N();
5622
+ return;
5623
+ }
5624
+ let [u, d] = e ?? E(i, l);
5625
+ m = {
5626
+ seed: (r.seed ?? Math.floor((typeof performance < "u" ? performance.now() : 0) * 1e3)) >>> 0 || 1,
5627
+ ox: u,
5628
+ oy: d
5629
+ };
5630
+ let f = k(n, D(i, l, m.seed, u, d, "out"));
5631
+ t.style.visibility = "hidden", requestAnimationFrame(() => {
5632
+ c.value === "shattering" && j(f, () => {
5633
+ c.value === "shattering" && N();
5634
+ });
5635
+ });
5636
+ }
5637
+ function N() {
5638
+ L();
5639
+ let e = o.value;
5640
+ e && h(e), c.value = "shattered", i.value = !0, a("shatterEnd"), r.autoRestore > 0 && (f = setTimeout(P, r.autoRestore));
5641
+ }
5642
+ function P() {
5643
+ if (f &&= (clearTimeout(f), null), c.value === "idle") {
5644
+ i.value = !1;
5645
+ return;
5646
+ }
5647
+ if (c.value === "restoring") return;
5648
+ L();
5649
+ let e = o.value, t = r.reassemble && !s.value && !r.disableAnimation && !!m && !!e && typeof e?.animate == "function";
5650
+ if (!e || !t || !m) {
5651
+ e && g(e), c.value = "idle", i.value = !1;
5652
+ return;
5653
+ }
5654
+ e.style.display = "", e.style.visibility = "hidden";
5655
+ let n = e.getBoundingClientRect(), a = n.width, l = n.height;
5656
+ if (a < 2 || l < 2) {
5657
+ g(e), c.value = "idle", i.value = !1;
5658
+ return;
5659
+ }
5660
+ c.value = "restoring";
5661
+ let u = k(n, D(a, l, m.seed, m.ox, m.oy, "in"));
5662
+ requestAnimationFrame(() => {
5663
+ c.value === "restoring" && j(u, () => {
5664
+ c.value === "restoring" && F();
5665
+ });
5666
+ });
5667
+ }
5668
+ function F() {
5669
+ L();
5670
+ let e = o.value;
5671
+ e && g(e), c.value = "idle", i.value = !1, a("restoreEnd");
5672
+ }
5673
+ function L() {
5674
+ for (let e of d) try {
5675
+ e.cancel();
5676
+ } catch {}
5677
+ d = [], u &&= (u.remove(), null);
5678
+ }
5679
+ function R(e) {
5680
+ if (r.trigger !== "click" || c.value !== "idle" || r.disabled) return;
5681
+ let t = o.value;
5682
+ if (!t) return;
5683
+ let n = t.getBoundingClientRect();
5684
+ M([e.clientX - n.left, e.clientY - n.top]);
5685
+ }
5686
+ function B(e) {
5687
+ if (r.origin !== "pointer") return;
5688
+ let t = o.value;
5689
+ if (!t) return;
5690
+ let n = t.getBoundingClientRect();
5691
+ p.x = e.clientX - n.left, p.y = e.clientY - n.top, p.set = !0;
5692
+ }
5693
+ return U(i, (e) => {
5694
+ e && c.value === "idle" ? M() : !e && c.value !== "idle" && P();
5695
+ }), S(() => {
5696
+ i.value && M();
5697
+ }), x(() => {
5698
+ f && clearTimeout(f), L();
5699
+ }), t({
5700
+ shatter: (e) => M(e),
5701
+ restore: P
5702
+ }), (t, n) => (T(), l("div", {
5703
+ ref_key: "rootRef",
5704
+ ref: o,
5705
+ class: y(I(Y)("kun-shatter inline-block", e.className)),
5706
+ onClick: R,
5707
+ onPointermovePassive: B
5708
+ }, [A(t.$slots, "default")], 34));
5709
+ }
5710
+ }), Fs = { class: "relative" }, Is = ["aria-label"], Ls = /*#__PURE__*/ pt(/* @__PURE__ */ p({
5395
5711
  name: "KunScrollShadow",
5396
5712
  __name: "ScrollShadow",
5397
5713
  props: {
@@ -5400,14 +5716,73 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5400
5716
  shadowSize: { default: "2rem" },
5401
5717
  className: { default: "" },
5402
5718
  contentClass: { default: "" },
5403
- ariaLabel: { default: "scrollable content" }
5719
+ ariaLabel: { default: "scrollable content" },
5720
+ wheel: {
5721
+ type: [Boolean, String],
5722
+ default: !1
5723
+ },
5724
+ draggable: {
5725
+ type: Boolean,
5726
+ default: !1
5727
+ },
5728
+ scrollbar: { default: "hide" }
5404
5729
  },
5405
5730
  setup(e) {
5406
- let t = e, n = O(null), r = O(null), { x: i, y: a } = Ee(n, { throttle: 50 }), { width: s, height: c } = Ce(r), { width: d, height: f } = Ce(n), p = O(!1), m = O(!1);
5731
+ let t = e, n = O(null), r = O(null), { x: i, y: a } = Ee(n, { throttle: 50 }), { width: s, height: c } = Ce(r), { width: d, height: f } = Ce(n), p = o(() => Math.max(0, s.value - d.value)), m = o(() => Math.max(0, c.value - f.value)), h = O(!1), g = O(!1);
5407
5732
  W(() => {
5408
- n.value && (t.axis === "horizontal" ? (p.value = i.value > 1, m.value = s.value - d.value - i.value > 1) : (p.value = a.value > 1, m.value = c.value - f.value - a.value > 1));
5733
+ n.value && (t.axis === "horizontal" ? (h.value = i.value > 1, g.value = p.value - i.value > 1) : (h.value = a.value > 1, g.value = m.value - a.value > 1));
5409
5734
  });
5410
- let h = o(() => t.axis === "horizontal" ? "left-0 top-0 bottom-0" : "top-0 left-0 right-0"), g = o(() => t.axis === "horizontal" ? "right-0 top-0 bottom-0" : "bottom-0 left-0 right-0"), _ = o(() => {
5735
+ let _ = o(() => t.wheel && t.axis === "horizontal" ? n.value : null);
5736
+ function v(e) {
5737
+ let r = n.value;
5738
+ if (!r) return;
5739
+ let i = p.value;
5740
+ if (i <= 0) return;
5741
+ let a = Math.abs(e.deltaX) >= Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
5742
+ if (!a) return;
5743
+ let o = r.scrollLeft;
5744
+ if (a < 0 && o <= 0 || a > 0 && o >= i - 1) {
5745
+ t.wheel === "contain" && e.preventDefault();
5746
+ return;
5747
+ }
5748
+ r.scrollLeft = o + a, e.preventDefault();
5749
+ }
5750
+ we(_, "wheel", v, { passive: !1 });
5751
+ let x = o(() => t.draggable ? n.value : null), S = !1, C = !1, w = 0, E = 0, D = -1;
5752
+ function k(e) {
5753
+ if (e.pointerType === "touch" || e.pointerType === "mouse" && e.button !== 0) return;
5754
+ let r = n.value;
5755
+ r && ((t.axis === "horizontal" ? p.value : m.value) <= 0 || (S = !0, C = !1, D = e.pointerId, w = t.axis === "horizontal" ? e.clientX : e.clientY, E = t.axis === "horizontal" ? r.scrollLeft : r.scrollTop));
5756
+ }
5757
+ function j(e) {
5758
+ if (!S || e.pointerId !== D) return;
5759
+ let r = n.value;
5760
+ if (!r) return;
5761
+ let i = (t.axis === "horizontal" ? e.clientX : e.clientY) - w;
5762
+ if (!C) {
5763
+ if (Math.abs(i) < 6) return;
5764
+ C = !0;
5765
+ try {
5766
+ r.setPointerCapture(e.pointerId);
5767
+ } catch {}
5768
+ r.style.userSelect = "none", r.style.cursor = "grabbing";
5769
+ }
5770
+ t.axis === "horizontal" ? r.scrollLeft = E - i : r.scrollTop = E - i;
5771
+ }
5772
+ function M(e) {
5773
+ if (!S) return;
5774
+ S = !1, D = -1;
5775
+ let t = n.value;
5776
+ t && (t.style.userSelect = "", t.style.cursor = "", t.hasPointerCapture?.(e.pointerId) && t.releasePointerCapture(e.pointerId));
5777
+ }
5778
+ function N(e) {
5779
+ C &&= (e.stopPropagation(), e.preventDefault(), !1);
5780
+ }
5781
+ function P(e) {
5782
+ S && e.preventDefault();
5783
+ }
5784
+ we(x, "pointerdown", k), we(x, "pointermove", j), we(x, "pointerup", M), we(x, "pointercancel", M), we(x, "dragstart", P), we(x, "click", N, { capture: !0 });
5785
+ let F = o(() => t.axis === "horizontal" ? "left-0 top-0 bottom-0" : "top-0 left-0 right-0"), L = o(() => t.axis === "horizontal" ? "right-0 top-0 bottom-0" : "bottom-0 left-0 right-0"), R = o(() => {
5411
5786
  let e = t.axis === "horizontal" ? "width" : "height", n = t.axis === "horizontal" ? `linear-gradient(to right, ${t.shadowColor}, transparent)` : `linear-gradient(to bottom, ${t.shadowColor}, transparent)`, r = t.axis === "horizontal" ? `linear-gradient(to left, ${t.shadowColor}, transparent)` : `linear-gradient(to top, ${t.shadowColor}, transparent)`;
5412
5787
  return {
5413
5788
  start: {
@@ -5420,11 +5795,11 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5420
5795
  }
5421
5796
  };
5422
5797
  });
5423
- return (i, a) => (T(), l("div", Ps, [
5798
+ return (i, a) => (T(), l("div", Fs, [
5424
5799
  u("div", {
5425
5800
  "aria-hidden": "true",
5426
- class: y(I(Y)("pointer-events-none absolute z-10 transition-opacity", h.value, p.value ? "opacity-100" : "opacity-0")),
5427
- style: b(_.value.start)
5801
+ class: y(I(Y)("pointer-events-none absolute z-10 transition-opacity", F.value, h.value ? "opacity-100" : "opacity-0")),
5802
+ style: b(R.value.start)
5428
5803
  }, null, 6),
5429
5804
  u("div", {
5430
5805
  ref_key: "scrollContainer",
@@ -5432,20 +5807,20 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5432
5807
  tabindex: "0",
5433
5808
  role: "region",
5434
5809
  "aria-label": e.ariaLabel,
5435
- class: y(I(Y)("scrollbar-hide", e.axis === "horizontal" ? "overflow-x-auto" : "overflow-y-auto", t.className))
5810
+ class: y(I(Y)(e.scrollbar === "thin" ? "kun-scroll-thin" : e.scrollbar === "auto" ? "" : "scrollbar-hide", e.axis === "horizontal" ? "overflow-x-auto" : "overflow-y-auto", e.draggable && "cursor-grab", t.className))
5436
5811
  }, [u("div", {
5437
5812
  ref_key: "contentWrapper",
5438
5813
  ref: r,
5439
5814
  class: y(I(Y)(e.axis === "horizontal" ? "flex w-max gap-3" : "flex w-full flex-col gap-3", t.contentClass))
5440
- }, [A(i.$slots, "default")], 2)], 10, Fs),
5815
+ }, [A(i.$slots, "default", {}, void 0, !0)], 2)], 10, Is),
5441
5816
  u("div", {
5442
5817
  "aria-hidden": "true",
5443
- class: y(I(Y)("pointer-events-none absolute z-10 transition-opacity", g.value, m.value ? "opacity-100" : "opacity-0")),
5444
- style: b(_.value.end)
5818
+ class: y(I(Y)("pointer-events-none absolute z-10 transition-opacity", L.value, g.value ? "opacity-100" : "opacity-0")),
5819
+ style: b(R.value.end)
5445
5820
  }, null, 6)
5446
5821
  ]));
5447
5822
  }
5448
- }), Ls = /* @__PURE__ */ p({
5823
+ }), [["__scopeId", "data-v-2609420b"]]), Rs = /* @__PURE__ */ p({
5449
5824
  name: "KunSkeleton",
5450
5825
  __name: "Skeleton",
5451
5826
  props: {
@@ -5475,16 +5850,16 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5475
5850
  style: b(i.value)
5476
5851
  }, null, 6));
5477
5852
  }
5478
- }), Rs = {
5853
+ }), zs = {
5479
5854
  key: 0,
5480
5855
  class: "mb-1.5 flex items-center justify-between gap-2"
5481
- }, zs = ["id"], Bs = {
5856
+ }, Bs = ["id"], Vs = {
5482
5857
  key: 1,
5483
5858
  class: "text-default-500 text-sm tabular-nums"
5484
- }, Vs = {
5859
+ }, Hs = {
5485
5860
  key: 0,
5486
5861
  class: "bg-content1 text-foreground border-kun pointer-events-none absolute bottom-full left-1/2 mb-2 -translate-x-1/2 rounded-kun-sm border px-2 py-0.5 text-xs font-medium tabular-nums shadow-kun-sm"
5487
- }, Hs = [
5862
+ }, Us = [
5488
5863
  "tabindex",
5489
5864
  "aria-label",
5490
5865
  "aria-labelledby",
@@ -5493,16 +5868,16 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5493
5868
  "aria-valuemax",
5494
5869
  "aria-valuetext",
5495
5870
  "aria-disabled"
5496
- ], Us = {
5871
+ ], Ws = {
5497
5872
  key: 0,
5498
5873
  class: "relative mt-1 h-4"
5499
- }, Ws = {
5874
+ }, Gs = {
5500
5875
  key: 1,
5501
5876
  class: "text-danger mt-1 text-sm"
5502
- }, Gs = {
5877
+ }, Ks = {
5503
5878
  key: 2,
5504
5879
  class: "text-default-500 mt-1 text-sm"
5505
- }, Ks = /* @__PURE__ */ p({
5880
+ }, qs = /* @__PURE__ */ p({
5506
5881
  name: "KunSlider",
5507
5882
  __name: "Slider",
5508
5883
  props: /*@__PURE__*/ g({
@@ -5652,11 +6027,11 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5652
6027
  return w(() => {
5653
6028
  R();
5654
6029
  }), (n, a) => (T(), l("div", { class: y(I(Y)("w-full", e.disabled && "opacity-50")) }, [
5655
- e.label || e.showValue ? (T(), l("div", Rs, [e.label ? (T(), l("label", {
6030
+ e.label || e.showValue ? (T(), l("div", zs, [e.label ? (T(), l("label", {
5656
6031
  key: 0,
5657
6032
  id: `${I(d)}-label`,
5658
6033
  class: "text-default-700 block text-sm font-medium"
5659
- }, M(e.label), 9, zs)) : c("", !0), e.showValue ? (T(), l("span", Bs, M(j.value), 1)) : c("", !0)])) : c("", !0),
6034
+ }, M(e.label), 9, Bs)) : c("", !0), e.showValue ? (T(), l("span", Vs, M(j.value), 1)) : c("", !0)])) : c("", !0),
5660
6035
  u("div", {
5661
6036
  class: y(["kun-slider relative py-2", e.disabled ? "cursor-not-allowed" : "cursor-pointer"]),
5662
6037
  ref_key: "sliderRef",
@@ -5684,7 +6059,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5684
6059
  "leave-active-class": "transition duration-kun-exit ease-kun-in",
5685
6060
  "leave-to-class": "opacity-0 translate-y-1"
5686
6061
  }, {
5687
- default: G(() => [V.value ? (T(), l("span", Vs, M(j.value), 1)) : c("", !0)]),
6062
+ default: G(() => [V.value ? (T(), l("span", Hs, M(j.value), 1)) : c("", !0)]),
5688
6063
  _: 1
5689
6064
  }), u("div", {
5690
6065
  class: y(["bg-content1 rounded-full border-2 transition-shadow duration-kun-fast hover:ring-4 focus-visible:ring-4 focus-visible:outline-none active:ring-4", [
@@ -5708,19 +6083,19 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5708
6083
  onKeydown: B,
5709
6084
  onFocus: a[0] ||= (e) => x.value = !0,
5710
6085
  onBlur: a[1] ||= (e) => !v.value && (x.value = !1)
5711
- }, null, 42, Hs)], 36)
5712
- ], 2), N.value.some((e) => e.label) ? (T(), l("div", Us, [(T(!0), l(t, null, k(N.value, (e, t) => K((T(), l("span", {
6086
+ }, null, 42, Us)], 36)
6087
+ ], 2), N.value.some((e) => e.label) ? (T(), l("div", Ws, [(T(!0), l(t, null, k(N.value, (e, t) => K((T(), l("span", {
5713
6088
  key: t,
5714
6089
  class: "text-default-500 absolute -translate-x-1/2 text-xs whitespace-nowrap",
5715
6090
  style: b({ left: e.percent + "%" })
5716
6091
  }, M(e.label), 5)), [[H, e.label]])), 128))])) : c("", !0)], 34),
5717
- e.error ? (T(), l("p", Ws, M(e.error), 1)) : e.description ? (T(), l("p", Gs, M(e.description), 1)) : c("", !0)
6092
+ e.error ? (T(), l("p", Gs, M(e.error), 1)) : e.description ? (T(), l("p", Ks, M(e.description), 1)) : c("", !0)
5718
6093
  ], 2));
5719
6094
  }
5720
- }), qs = ["aria-current"], Js = {
6095
+ }), Js = ["aria-current"], Ys = {
5721
6096
  key: 0,
5722
6097
  class: "text-default-500 mt-0.5 text-xs"
5723
- }, Ys = /* @__PURE__ */ p({
6098
+ }, Xs = /* @__PURE__ */ p({
5724
6099
  name: "KunSteps",
5725
6100
  __name: "Steps",
5726
6101
  props: {
@@ -5780,14 +6155,14 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5780
6155
  }, null, 8, ["name", "class"])) : (T(), l(t, { key: 2 }, [d(M(i + 1), 1)], 64))], 2), i < e.items.length - 1 ? (T(), l("span", {
5781
6156
  key: 0,
5782
6157
  class: y(I(Y)("transition-colors", r.value ? "mt-1 w-0.5 flex-1" : "mx-2 h-0.5 flex-1", h(i)))
5783
- }, null, 2)) : c("", !0)], 2), u("div", { class: y(r.value ? "pb-6" : I(Y)("mt-2", i < e.items.length - 1 ? "pr-2" : "")) }, [u("p", { class: y(I(Y)("font-medium", a.value.title, p(i) === "pending" ? "text-default-400" : p(i) === "active" ? I(_e)[e.color] : "text-foreground")) }, M(n.title), 3), n.description ? (T(), l("p", Js, M(n.description), 1)) : c("", !0)], 2)], 10, qs))), 128))], 2));
6158
+ }, null, 2)) : c("", !0)], 2), u("div", { class: y(r.value ? "pb-6" : I(Y)("mt-2", i < e.items.length - 1 ? "pr-2" : "")) }, [u("p", { class: y(I(Y)("font-medium", a.value.title, p(i) === "pending" ? "text-default-400" : p(i) === "active" ? I(_e)[e.color] : "text-foreground")) }, M(n.title), 3), n.description ? (T(), l("p", Ys, M(n.description), 1)) : c("", !0)], 2)], 10, Js))), 128))], 2));
5784
6159
  }
5785
- }), Xs = [
6160
+ }), Zs = [
5786
6161
  "id",
5787
6162
  "checked",
5788
6163
  "disabled",
5789
6164
  "aria-describedby"
5790
- ], Zs = { class: "relative" }, Qs = ["id"], $s = ["id"], ec = /* @__PURE__ */ p({
6165
+ ], Qs = { class: "relative" }, $s = ["id"], ec = ["id"], tc = /* @__PURE__ */ p({
5791
6166
  name: "KunSwitch",
5792
6167
  __name: "Switch",
5793
6168
  props: /*@__PURE__*/ g({
@@ -5856,8 +6231,8 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5856
6231
  disabled: e.disabled,
5857
6232
  "aria-describedby": e.error || e.description ? `${I(r)}-desc` : void 0,
5858
6233
  onChange: i[0] ||= (e) => n.value = e.target.checked
5859
- }, null, 40, Xs),
5860
- u("div", Zs, [u("div", { class: y(["rounded-full transition-colors duration-kun-fast ease-kun-standard peer-focus-visible:ring-2 peer-focus-visible:ring-primary/50", [
6234
+ }, null, 40, Zs),
6235
+ u("div", Qs, [u("div", { class: y(["rounded-full transition-colors duration-kun-fast ease-kun-standard peer-focus-visible:ring-2 peer-focus-visible:ring-primary/50", [
5861
6236
  a.value.track,
5862
6237
  n.value ? "bg-primary" : "bg-default-500",
5863
6238
  e.disabled ? "opacity-50" : "",
@@ -5871,13 +6246,13 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
5871
6246
  key: 0,
5872
6247
  id: `${I(r)}-desc`,
5873
6248
  class: "text-danger mt-1 text-sm"
5874
- }, M(e.error), 9, Qs)) : e.description ? (T(), l("p", {
6249
+ }, M(e.error), 9, $s)) : e.description ? (T(), l("p", {
5875
6250
  key: 1,
5876
6251
  id: `${I(r)}-desc`,
5877
6252
  class: "text-default-500 mt-1 text-sm"
5878
- }, M(e.description), 9, $s)) : c("", !0)]));
6253
+ }, M(e.description), 9, ec)) : c("", !0)]));
5879
6254
  }
5880
- }), tc = Symbol("kun-tab-panels"), nc = (e, t) => `${e ?? "kun"}-tab-${t}`, rc = (e, t) => `${e ?? "kun"}-tabpanel-${t}`, ic = ["aria-orientation"], ac = { key: 1 }, oc = /* @__PURE__ */ p({
6255
+ }), nc = Symbol("kun-tab-panels"), rc = (e, t) => `${e ?? "kun"}-tab-${t}`, ic = (e, t) => `${e ?? "kun"}-tabpanel-${t}`, ac = ["aria-orientation"], oc = { key: 1 }, sc = /* @__PURE__ */ p({
5881
6256
  name: "KunTab",
5882
6257
  __name: "Tab",
5883
6258
  props: /*@__PURE__*/ g({
@@ -6013,7 +6388,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6013
6388
  disabled: e.disabled || r.disabled
6014
6389
  }, V = (e, t, n) => {
6015
6390
  t.href && e.preventDefault(), L(t, n);
6016
- }, H = (e) => nc(r.name, e), W = (e) => rc(r.name, e), K = (e) => i.value === e.value, q = o(() => Y("relative", p.value ? "inline-flex flex-col" : "inline-flex", r.fullWidth && "w-full", r.disabled && "opacity-50 cursor-not-allowed", r.scrollable && (p.value ? "max-h-full overflow-y-auto scrollbar-hide" : "max-w-full overflow-x-auto scrollbar-hide"), r.className)), J = o(() => {
6391
+ }, H = (e) => rc(r.name, e), W = (e) => ic(r.name, e), K = (e) => i.value === e.value, q = o(() => Y("relative", p.value ? "inline-flex flex-col" : "inline-flex", r.fullWidth && "w-full", r.disabled && "opacity-50 cursor-not-allowed", r.scrollable && (p.value ? "max-h-full overflow-y-auto scrollbar-hide" : "max-w-full overflow-x-auto scrollbar-hide"), r.className)), J = o(() => {
6017
6392
  let e = p.value ? Y("relative flex flex-col items-stretch", h[r.size]) : Y("relative flex items-center", h[r.size]);
6018
6393
  switch (r.variant) {
6019
6394
  case "underlined": return Y(e, r.innerClassName);
@@ -6087,7 +6462,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6087
6462
  key: 0,
6088
6463
  class: "inline-flex shrink-0",
6089
6464
  style: b({ fontSize: e.iconSize })
6090
- }, [f(Q, { name: t.icon }, null, 8, ["name"])], 4)) : c("", !0), t.textValue ? (T(), l("span", ac, M(t.textValue), 1)) : c("", !0)]),
6465
+ }, [f(Q, { name: t.icon }, null, 8, ["name"])], 4)) : c("", !0), t.textValue ? (T(), l("span", oc, M(t.textValue), 1)) : c("", !0)]),
6091
6466
  _: 2
6092
6467
  }, 1040, [
6093
6468
  "id",
@@ -6099,14 +6474,14 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6099
6474
  "style",
6100
6475
  "onClick",
6101
6476
  "onKeydown"
6102
- ]))), 128))], 10, ic)], 2));
6477
+ ]))), 128))], 10, ac)], 2));
6103
6478
  }
6104
- }), sc = [
6479
+ }), cc = [
6105
6480
  "id",
6106
6481
  "aria-labelledby",
6107
6482
  "tabindex",
6108
6483
  "data-kun-tab-hidden"
6109
- ], cc = /*#__PURE__*/ pt(/* @__PURE__ */ p({
6484
+ ], lc = /*#__PURE__*/ pt(/* @__PURE__ */ p({
6110
6485
  name: "KunTabPanel",
6111
6486
  __name: "TabPanel",
6112
6487
  props: {
@@ -6123,7 +6498,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6123
6498
  },
6124
6499
  emits: ["activate"],
6125
6500
  setup(e, { emit: t }) {
6126
- let n = e, r = t, i = m(tc, null), a = o(() => n.active ?? i?.active.value), s = o(() => a.value === n.value), u = o(() => n.forceMount ? "eager" : n.mount ?? i?.mount.value ?? "eager"), d = o(() => n.hiddenStrategy ?? i?.hiddenStrategy.value ?? "until-found"), f = o(() => n.name ?? i?.name.value), p = o(() => rc(f.value, n.value)), h = o(() => nc(f.value, n.value)), g = O(s.value);
6501
+ let n = e, r = t, i = m(nc, null), a = o(() => n.active ?? i?.active.value), s = o(() => a.value === n.value), u = o(() => n.forceMount ? "eager" : n.mount ?? i?.mount.value ?? "eager"), d = o(() => n.hiddenStrategy ?? i?.hiddenStrategy.value ?? "until-found"), f = o(() => n.name ?? i?.name.value), p = o(() => ic(f.value, n.value)), h = o(() => rc(f.value, n.value)), g = O(s.value);
6127
6502
  U(s, (e) => {
6128
6503
  e && (g.value = !0);
6129
6504
  });
@@ -6158,9 +6533,9 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6158
6533
  "data-kun-tab-hidden": !b.value && x.value ? "" : void 0,
6159
6534
  class: y(I(Y)("focus:outline-none", e.className)),
6160
6535
  onBeforematch: w
6161
- }, [A(t.$slots, "default", {}, void 0, !0)], 42, sc)) : c("", !0);
6536
+ }, [A(t.$slots, "default", {}, void 0, !0)], 42, cc)) : c("", !0);
6162
6537
  }
6163
- }), [["__scopeId", "data-v-ccf67b4b"]]), lc = /* @__PURE__ */ p({
6538
+ }), [["__scopeId", "data-v-ccf67b4b"]]), uc = /* @__PURE__ */ p({
6164
6539
  name: "KunTabPanels",
6165
6540
  __name: "TabPanels",
6166
6541
  props: /*@__PURE__*/ g({
@@ -6174,7 +6549,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6174
6549
  emits: ["update:modelValue"],
6175
6550
  setup(e) {
6176
6551
  let t = e, n = z(e, "modelValue");
6177
- return E(tc, {
6552
+ return E(nc, {
6178
6553
  active: o(() => n.value),
6179
6554
  activate: (e) => {
6180
6555
  n.value = e;
@@ -6184,24 +6559,24 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6184
6559
  name: o(() => t.name)
6185
6560
  }), (e, t) => (T(), l("div", null, [A(e.$slots, "default")]));
6186
6561
  }
6187
- }), uc = { class: "w-full" }, dc = ["for"], fc = [
6562
+ }), dc = { class: "w-full" }, fc = ["for"], pc = [
6188
6563
  "aria-label",
6189
6564
  "aria-invalid",
6190
6565
  "aria-disabled"
6191
- ], pc = [
6566
+ ], mc = [
6192
6567
  "tabindex",
6193
6568
  "aria-label",
6194
6569
  "onKeydown"
6195
- ], mc = ["aria-label", "onClick"], hc = [
6570
+ ], hc = ["aria-label", "onClick"], gc = [
6196
6571
  "id",
6197
6572
  "placeholder",
6198
6573
  "disabled",
6199
6574
  "readonly",
6200
6575
  "aria-describedby"
6201
- ], gc = {
6576
+ ], _c = {
6202
6577
  key: 1,
6203
6578
  class: "text-default-400 ml-auto text-xs tabular-nums"
6204
- }, _c = ["id"], vc = ["id"], yc = /* @__PURE__ */ p({
6579
+ }, vc = ["id"], yc = ["id"], bc = /* @__PURE__ */ p({
6205
6580
  name: "KunTagInput",
6206
6581
  __name: "TagInput",
6207
6582
  props: /*@__PURE__*/ g({
@@ -6381,12 +6756,12 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6381
6756
  lg: "text-base",
6382
6757
  xl: "text-lg"
6383
6758
  }, ee = o(() => Y("flex flex-wrap items-center transition-shadow", a.value, W[r.size], G[r.size], q[r.size], "border border-transparent", !r.error && "border-kun", r.variant === "flat" && "bg-content1 shadow-kun-sm", r.error ? de.danger : de[r.color], r.error && "border-danger", r.disabled && "opacity-50 cursor-not-allowed bg-default-100", r.readonly && "cursor-default", r.className)), te = o(() => Y("inline-flex items-center gap-1 rounded-full font-medium whitespace-nowrap select-none", ve("flat", r.color), ce[r.size], X[r.color])), ne = o(() => d.value.length >= r.maxTags);
6384
- return (n, r) => (T(), l("div", uc, [
6759
+ return (n, r) => (T(), l("div", dc, [
6385
6760
  e.label ? (T(), l("label", {
6386
6761
  key: 0,
6387
6762
  for: I(S),
6388
6763
  class: "text-default-700 mb-1 block text-sm font-medium"
6389
- }, M(e.label), 9, dc)) : c("", !0),
6764
+ }, M(e.label), 9, fc)) : c("", !0),
6390
6765
  u("div", {
6391
6766
  role: "group",
6392
6767
  "aria-label": e.label || "tag input",
@@ -6418,7 +6793,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6418
6793
  }, [f(Q, {
6419
6794
  name: "lucide:x",
6420
6795
  class: "size-3.5"
6421
- })], 8, mc)) : c("", !0)])], 42, pc))), 128)),
6796
+ })], 8, hc)) : c("", !0)])], 42, mc))), 128)),
6422
6797
  e.readonly ? c("", !0) : K((T(), l("input", {
6423
6798
  key: 0,
6424
6799
  id: I(S),
@@ -6437,21 +6812,21 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6437
6812
  onCompositionend: R,
6438
6813
  onPaste: B,
6439
6814
  onBlur: H
6440
- }, null, 40, hc)), [[V, g.value]]),
6441
- e.showCounter && e.maxTags !== Infinity ? (T(), l("span", gc, M(d.value.length) + "/" + M(e.maxTags), 1)) : c("", !0)
6442
- ], 10, fc),
6815
+ }, null, 40, gc)), [[V, g.value]]),
6816
+ e.showCounter && e.maxTags !== Infinity ? (T(), l("span", _c, M(d.value.length) + "/" + M(e.maxTags), 1)) : c("", !0)
6817
+ ], 10, pc),
6443
6818
  e.error ? (T(), l("p", {
6444
6819
  key: 1,
6445
6820
  id: `${I(S)}-msg`,
6446
6821
  class: "text-danger mt-1 text-sm"
6447
- }, M(e.error), 9, _c)) : s.value ? (T(), l("p", {
6822
+ }, M(e.error), 9, vc)) : s.value ? (T(), l("p", {
6448
6823
  key: 2,
6449
6824
  id: `${I(S)}-msg`,
6450
6825
  class: "text-default-500 mt-1 text-sm"
6451
- }, M(s.value), 9, vc)) : c("", !0)
6826
+ }, M(s.value), 9, yc)) : c("", !0)
6452
6827
  ]));
6453
6828
  }
6454
- }), bc = /*#__PURE__*/ pt(/* @__PURE__ */ p({
6829
+ }), xc = /*#__PURE__*/ pt(/* @__PURE__ */ p({
6455
6830
  name: "KunText",
6456
6831
  __name: "Text",
6457
6832
  props: {
@@ -6462,10 +6837,10 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6462
6837
  let t = e, n = o(() => t.content.replace(/([_/])/g, "$1​"));
6463
6838
  return (e, r) => (T(), l("span", { class: y(I(Y)("kun-text-block", t.className)) }, M(n.value), 3));
6464
6839
  }
6465
- }), [["__scopeId", "data-v-e9ad81ae"]]), xc = { class: "w-full" }, Sc = ["for"], Cc = {
6840
+ }), [["__scopeId", "data-v-e9ad81ae"]]), Sc = { class: "w-full" }, Cc = ["for"], wc = {
6466
6841
  key: 0,
6467
6842
  class: "text-danger ml-1"
6468
- }, wc = { class: "relative" }, Tc = [
6843
+ }, Tc = { class: "relative" }, Ec = [
6469
6844
  "id",
6470
6845
  "name",
6471
6846
  "placeholder",
@@ -6476,16 +6851,16 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6476
6851
  "minlength",
6477
6852
  "rows",
6478
6853
  "autofocus"
6479
- ], Ec = {
6854
+ ], Dc = {
6480
6855
  key: 0,
6481
6856
  class: "text-default-500 absolute right-2 bottom-2 text-xs"
6482
- }, Dc = {
6857
+ }, Oc = {
6483
6858
  key: 1,
6484
6859
  class: "text-danger mt-1 text-sm"
6485
- }, Oc = {
6860
+ }, kc = {
6486
6861
  key: 2,
6487
6862
  class: "text-default-500 mt-1 text-sm"
6488
- }, kc = /* @__PURE__ */ p({
6863
+ }, Ac = /* @__PURE__ */ p({
6489
6864
  name: "KunTextarea",
6490
6865
  __name: "Textarea",
6491
6866
  props: /*@__PURE__*/ g({
@@ -6570,13 +6945,13 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6570
6945
  });
6571
6946
  },
6572
6947
  textareaRef: m
6573
- }), (t, n) => (T(), l("div", xc, [
6948
+ }), (t, n) => (T(), l("div", Sc, [
6574
6949
  e.label ? (T(), l("label", {
6575
6950
  key: 0,
6576
6951
  for: I(p),
6577
6952
  class: "text-default-700 mb-1 block text-sm font-medium"
6578
- }, [d(M(e.label) + " ", 1), e.required ? (T(), l("span", Cc, "*")) : c("", !0)], 8, Sc)) : c("", !0),
6579
- u("div", wc, [K(u("textarea", {
6953
+ }, [d(M(e.label) + " ", 1), e.required ? (T(), l("span", wc, "*")) : c("", !0)], 8, Cc)) : c("", !0),
6954
+ u("div", Tc, [K(u("textarea", {
6580
6955
  id: I(p),
6581
6956
  ref_key: "textareaRef",
6582
6957
  ref: m,
@@ -6594,30 +6969,30 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6594
6969
  onInput: g,
6595
6970
  onBlur: n[1] ||= (e) => h("blur", e),
6596
6971
  onFocus: n[2] ||= (e) => h("focus", e)
6597
- }, null, 42, Tc), [[V, f.value]]), e.maxlength && e.showCharCount ? (T(), l("div", Ec, M(f.value.length) + "/" + M(e.maxlength), 1)) : c("", !0)]),
6598
- e.error ? (T(), l("p", Dc, M(e.error), 1)) : s.value ? (T(), l("p", Oc, M(s.value), 1)) : c("", !0)
6972
+ }, null, 42, Ec), [[V, f.value]]), e.maxlength && e.showCharCount ? (T(), l("div", Dc, M(f.value.length) + "/" + M(e.maxlength), 1)) : c("", !0)]),
6973
+ e.error ? (T(), l("p", Oc, M(e.error), 1)) : s.value ? (T(), l("p", kc, M(s.value), 1)) : c("", !0)
6599
6974
  ]));
6600
6975
  }
6601
- }), Ac = /* @__PURE__ */ p({
6976
+ }), jc = /* @__PURE__ */ p({
6602
6977
  name: "KunTimeline",
6603
6978
  __name: "Timeline",
6604
6979
  props: { className: { default: "" } },
6605
6980
  setup(e) {
6606
6981
  return (t, n) => (T(), l("ol", { class: y(I(Y)("kun-timeline relative", e.className)) }, [A(t.$slots, "default")], 2));
6607
6982
  }
6608
- }), jc = { class: "flex flex-col items-center self-stretch" }, Mc = {
6983
+ }), Mc = { class: "flex flex-col items-center self-stretch" }, Nc = {
6609
6984
  key: 0,
6610
6985
  class: "flex flex-wrap items-center justify-between gap-x-3"
6611
- }, Nc = {
6986
+ }, Pc = {
6612
6987
  key: 0,
6613
6988
  class: "text-foreground font-medium"
6614
- }, Pc = {
6989
+ }, Fc = {
6615
6990
  key: 1,
6616
6991
  class: "text-default-400 text-xs"
6617
- }, Fc = {
6992
+ }, Ic = {
6618
6993
  key: 1,
6619
6994
  class: "text-default-600 mt-1 text-sm"
6620
- }, Ic = /* @__PURE__ */ p({
6995
+ }, Lc = /* @__PURE__ */ p({
6621
6996
  name: "KunTimelineItem",
6622
6997
  __name: "TimelineItem",
6623
6998
  props: {
@@ -6629,7 +7004,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6629
7004
  },
6630
7005
  setup(e) {
6631
7006
  let t = e, n = o(() => !!t.icon);
6632
- return (t, r) => (T(), l("li", { class: y(I(Y)("flex gap-3", e.className)) }, [u("div", jc, [n.value ? (T(), l("span", {
7007
+ return (t, r) => (T(), l("li", { class: y(I(Y)("flex gap-3", e.className)) }, [u("div", Mc, [n.value ? (T(), l("span", {
6633
7008
  key: 0,
6634
7009
  class: y(I(Y)("inline-flex size-7 shrink-0 items-center justify-center rounded-full", I(me)[e.color], I(ge)[e.color]))
6635
7010
  }, [f(Q, {
@@ -6638,9 +7013,9 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6638
7013
  }, null, 8, ["name"])], 2)) : (T(), l("span", {
6639
7014
  key: 1,
6640
7015
  class: y(I(Y)("mt-1.5 size-3 shrink-0 rounded-full", I(me)[e.color]))
6641
- }, null, 2)), r[0] ||= u("span", { class: "kun-tl-line bg-default-200 my-1.5 w-px flex-1" }, null, -1)]), u("div", { class: y(["kun-tl-content min-w-0 flex-1 pb-6", n.value ? "pt-0.5" : ""]) }, [e.title || e.time || t.$slots.title || t.$slots.time ? (T(), l("div", Mc, [e.title || t.$slots.title ? (T(), l("p", Nc, [A(t.$slots, "title", {}, () => [d(M(e.title), 1)])])) : c("", !0), e.time || t.$slots.time ? (T(), l("span", Pc, [A(t.$slots, "time", {}, () => [d(M(e.time), 1)])])) : c("", !0)])) : c("", !0), t.$slots.default ? (T(), l("div", Fc, [A(t.$slots, "default")])) : c("", !0)], 2)], 2));
7016
+ }, null, 2)), r[0] ||= u("span", { class: "kun-tl-line bg-default-200 my-1.5 w-px flex-1" }, null, -1)]), u("div", { class: y(["kun-tl-content min-w-0 flex-1 pb-6", n.value ? "pt-0.5" : ""]) }, [e.title || e.time || t.$slots.title || t.$slots.time ? (T(), l("div", Nc, [e.title || t.$slots.title ? (T(), l("p", Pc, [A(t.$slots, "title", {}, () => [d(M(e.title), 1)])])) : c("", !0), e.time || t.$slots.time ? (T(), l("span", Fc, [A(t.$slots, "time", {}, () => [d(M(e.time), 1)])])) : c("", !0)])) : c("", !0), t.$slots.default ? (T(), l("div", Ic, [A(t.$slots, "default")])) : c("", !0)], 2)], 2));
6642
7017
  }
6643
- }), Lc = ["aria-describedby"], Rc = ["id"], zc = /* @__PURE__ */ p({
7018
+ }), Rc = ["aria-describedby"], zc = ["id"], Bc = /* @__PURE__ */ p({
6644
7019
  name: "KunTooltip",
6645
7020
  __name: "Tooltip",
6646
7021
  props: {
@@ -6704,15 +7079,15 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6704
7079
  ref: x,
6705
7080
  class: "bg-content1 absolute size-2 rotate-45",
6706
7081
  style: b(I(S))
6707
- }, null, 4)) : c("", !0)], 14, Rc)) : c("", !0)]),
7082
+ }, null, 4)) : c("", !0)], 14, zc)) : c("", !0)]),
6708
7083
  _: 3
6709
- })]))], 42, Lc));
7084
+ })]))], 42, Rc));
6710
7085
  }
6711
- }), Bc = (e) => [
7086
+ }), Vc = (e) => [
6712
7087
  "image/jpeg",
6713
7088
  "image/png",
6714
7089
  "image/webp"
6715
- ].includes(e.type) ? !0 : (console.error("Invalid file type"), !1), Vc = async (e, t, n) => new Promise((r) => {
7090
+ ].includes(e.type) ? !0 : (console.error("Invalid file type"), !1), Hc = async (e, t, n) => new Promise((r) => {
6716
7091
  let i = new FileReader();
6717
7092
  i.onload = (e) => {
6718
7093
  let i = new Image();
@@ -6723,13 +7098,13 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6723
7098
  }, "image/webp", .77);
6724
7099
  }, i.src = e.target?.result;
6725
7100
  }, i.readAsDataURL(e);
6726
- }), Hc = {
7101
+ }), Uc = {
6727
7102
  key: 0,
6728
7103
  class: "absolute inset-0 flex flex-col items-center justify-center"
6729
- }, Uc = {
7104
+ }, Wc = {
6730
7105
  key: 0,
6731
7106
  class: "text-default-500 mt-2 text-sm"
6732
- }, Wc = ["src"], Gc = { class: "max-w-xl" }, Kc = { class: "mt-4 flex justify-end space-x-2" }, qc = /* @__PURE__ */ p({
7107
+ }, Gc = ["src"], Kc = { class: "max-w-xl" }, qc = { class: "mt-4 flex justify-end space-x-2" }, Jc = /* @__PURE__ */ p({
6733
7108
  name: "KunUpload",
6734
7109
  __name: "Upload",
6735
7110
  props: {
@@ -6744,13 +7119,13 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6744
7119
  emits: ["setImage"],
6745
7120
  setup(e, { emit: t }) {
6746
7121
  let n = e, r = Tt(() => n.rounded), i = o(() => Z[r.value]), a = o(() => n.description || n.hint), p = t, m = O(), h = O(), g = O(""), _ = O(!1), v = O(""), x = o(() => n.initialImage || ""), S = (e) => {
6747
- Bc(e) && (v.value = URL.createObjectURL(e), _.value = !0);
7122
+ Vc(e) && (v.value = URL.createObjectURL(e), _.value = !0);
6748
7123
  }, C = async (e) => {
6749
7124
  let t = e.canvas, r = await new Promise((e) => {
6750
7125
  t.toBlob((t) => {
6751
7126
  t && e(t);
6752
7127
  }, "image/webp", .77);
6753
- }), i = await Vc(new File([r], "cropped.webp", { type: "image/webp" }), n.size, n.size / n.aspect);
7128
+ }), i = await Hc(new File([r], "cropped.webp", { type: "image/webp" }), n.size, n.size / n.aspect);
6754
7129
  h.value = i, g.value = URL.createObjectURL(i);
6755
7130
  }, w = (e) => {
6756
7131
  let t = e.target;
@@ -6774,16 +7149,16 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6774
7149
  onDragover: D,
6775
7150
  onClick: k
6776
7151
  }, [
6777
- !g.value && !x.value ? (T(), l("div", Hc, [f(Q, {
7152
+ !g.value && !x.value ? (T(), l("div", Uc, [f(Q, {
6778
7153
  name: "lucide:plus",
6779
7154
  class: "text-default-500 text-3xl"
6780
- }), a.value ? (T(), l("span", Uc, M(a.value), 1)) : c("", !0)])) : c("", !0),
7155
+ }), a.value ? (T(), l("span", Wc, M(a.value), 1)) : c("", !0)])) : c("", !0),
6781
7156
  g.value || x.value ? (T(), l("img", {
6782
7157
  key: 1,
6783
7158
  src: g.value || x.value,
6784
7159
  alt: "上传图片",
6785
7160
  class: y(I(Y)("h-full w-full object-cover", i.value))
6786
- }, null, 10, Wc)) : c("", !0),
7161
+ }, null, 10, Gc)) : c("", !0),
6787
7162
  u("input", {
6788
7163
  ref_key: "input",
6789
7164
  ref: m,
@@ -6797,7 +7172,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6797
7172
  "is-dismissable": !1,
6798
7173
  "onUpdate:modelValue": r[1] ||= (e) => _.value = e
6799
7174
  }, {
6800
- default: G(() => [u("div", Gc, [
7175
+ default: G(() => [u("div", Kc, [
6801
7176
  r[4] ||= u("div", { class: "mb-4" }, [u("h3", { class: "text-lg font-semibold" }, "裁剪图片")], -1),
6802
7177
  v.value ? (T(), s(I(tt), {
6803
7178
  key: 0,
@@ -6805,7 +7180,7 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6805
7180
  "stencil-props": { aspectRatio: n.aspect },
6806
7181
  onChange: C
6807
7182
  }, null, 8, ["src", "stencil-props"])) : c("", !0),
6808
- u("div", Kc, [f($, {
7183
+ u("div", qc, [f($, {
6809
7184
  variant: "light",
6810
7185
  color: "danger",
6811
7186
  onClick: r[0] ||= (e) => _.value = !1
@@ -6824,10 +7199,10 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6824
7199
  _: 1
6825
7200
  }, 8, ["model-value"])]));
6826
7201
  }
6827
- }), Jc = { class: "flex min-w-0 flex-col text-sm" }, Yc = { class: "truncate" }, Xc = {
7202
+ }), Yc = { class: "flex min-w-0 flex-col text-sm" }, Xc = { class: "truncate" }, Zc = {
6828
7203
  key: 0,
6829
7204
  class: "text-default-500 truncate"
6830
- }, Zc = /* @__PURE__ */ p({
7205
+ }, Qc = /* @__PURE__ */ p({
6831
7206
  name: "KunUserChip",
6832
7207
  __name: "UserChip",
6833
7208
  props: {
@@ -6863,14 +7238,14 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
6863
7238
  "disable-floating",
6864
7239
  "user",
6865
7240
  "size"
6866
- ]), u("div", Jc, [u("span", Yc, M(e.user?.name || "未知用户"), 1), e.description ? (T(), l("span", Xc, M(e.description), 1)) : c("", !0)])]),
7241
+ ]), u("div", Yc, [u("span", Xc, M(e.user?.name || "未知用户"), 1), e.description ? (T(), l("span", Zc, M(e.description), 1)) : c("", !0)])]),
6867
7242
  _: 1
6868
7243
  }, 16, ["class"]));
6869
7244
  }
6870
7245
  });
6871
7246
  //#endregion
6872
7247
  //#region src/resolver.ts
6873
- function Qc(e = {}) {
7248
+ function $c(e = {}) {
6874
7249
  let t = new Set(nt), n = e.importStyle ?? !0;
6875
7250
  return {
6876
7251
  type: "component",
@@ -6885,7 +7260,7 @@ function Qc(e = {}) {
6885
7260
  }
6886
7261
  //#endregion
6887
7262
  //#region src/index.ts
6888
- var $c = {
7263
+ var el = {
6889
7264
  KunAccordion: it,
6890
7265
  KunAccordionItem: bt,
6891
7266
  KunAlertProvider: en,
@@ -6935,25 +7310,26 @@ var $c = {
6935
7310
  KunRating: ps,
6936
7311
  KunReaction: _s,
6937
7312
  KunRipple: Ot,
6938
- KunScrollShadow: Is,
7313
+ KunScrollShadow: Ls,
6939
7314
  KunSelect: Ns,
6940
- KunSkeleton: Ls,
6941
- KunSlider: Ks,
6942
- KunSteps: Ys,
6943
- KunSwitch: ec,
6944
- KunTab: oc,
6945
- KunTabPanel: cc,
6946
- KunTabPanels: lc,
6947
- KunTagInput: yc,
6948
- KunText: bc,
6949
- KunTextarea: kc,
6950
- KunTimeline: Ac,
6951
- KunTimelineItem: Ic,
6952
- KunTooltip: zc,
6953
- KunUpload: qc,
6954
- KunUserChip: Zc
6955
- }, el = { install(e) {
6956
- for (let [t, n] of Object.entries($c)) e.component(t, n);
7315
+ KunShatter: Ps,
7316
+ KunSkeleton: Rs,
7317
+ KunSlider: qs,
7318
+ KunSteps: Xs,
7319
+ KunSwitch: tc,
7320
+ KunTab: sc,
7321
+ KunTabPanel: lc,
7322
+ KunTabPanels: uc,
7323
+ KunTagInput: bc,
7324
+ KunText: xc,
7325
+ KunTextarea: Ac,
7326
+ KunTimeline: jc,
7327
+ KunTimelineItem: Lc,
7328
+ KunTooltip: Bc,
7329
+ KunUpload: Jc,
7330
+ KunUserChip: Qc
7331
+ }, tl = { install(e) {
7332
+ for (let [t, n] of Object.entries(el)) e.component(t, n);
6957
7333
  } };
6958
7334
  //#endregion
6959
- export { nt as KUN_COMPONENT_NAMES, st as KUN_UI_DEFAULT_CONFIG, it as KunAccordion, bt as KunAccordionItem, en as KunAlertProvider, gn as KunAutocomplete, bn as KunAvatar, Cn as KunAvatarGroup, On as KunBadge, jn as KunBrand, $ as KunButton, In as KunCard, Un as KunCarousel, Wn as KunCarouselItem, Zn as KunCheckBox, An as KunChip, $r as KunContent, ti as KunContextMenu, ki as KunCopy, xi as KunDatePicker, ji as KunDivider, Hi as KunDrawer, Fi as KunDropdown, Gi as KunFadeCard, Qi as KunFileInput, ia as KunHeader, Q as KunIcon, yn as KunImage, oa as KunImageNative, ua as KunInfo, xa as KunInput, Zr as KunLightbox, wa as KunLightboxGallery, Ta as KunLightboxGalleryItem, Ea as KunLink, qa as KunLoading, Pa as KunLoli, Ba as KunLoliProvider, Ja as KunMarkdown, no as KunMessageProvider, Jt as KunModal, oo as KunNull, _o as KunNumberInput, Do as KunPagination, jo as KunPinInput, Go as KunPopover, Qo as KunProgress, us as KunRadioGroup, ps as KunRating, _s as KunReaction, Ot as KunRipple, Is as KunScrollShadow, Ns as KunSelect, Ls as KunSkeleton, Ks as KunSlider, Ys as KunSteps, ec as KunSwitch, oc as KunTab, cc as KunTabPanel, lc as KunTabPanels, yc as KunTagInput, bc as KunText, kc as KunTextarea, Ac as KunTimeline, Ic as KunTimelineItem, zc as KunTooltip, el as KunUI, el as default, Qc as KunUIResolver, qc as KunUpload, Zc as KunUserChip, Bc as checkImageValid, te as decodeIfEncoded, Oa as getRandomLoli, ie as getRandomSticker, lt as installKunUIConfig, ct as provideKunUIConfig, Vc as resizeImage, Ft as useBodyScrollLock, Nr as useContentLightbox, Ki as useFilePicker, wt as useKunAlert, Ct as useKunAlertState, Kt as useKunBackgroundInert, Di as useKunCopy, an as useKunFloating, za as useKunLoliInfo, Ra as useKunLoliState, Ei as useKunMessage, Ti as useKunMessageState, Vt as useKunOverlayZIndex, Vo as useKunPointerMenu, ut as useKunUIConfig, at as useKunUniqueId, Tt as useResolvedRounded, Et as useRipple, Mr as useSpoilerContent };
7335
+ export { nt as KUN_COMPONENT_NAMES, st as KUN_UI_DEFAULT_CONFIG, it as KunAccordion, bt as KunAccordionItem, en as KunAlertProvider, gn as KunAutocomplete, bn as KunAvatar, Cn as KunAvatarGroup, On as KunBadge, jn as KunBrand, $ as KunButton, In as KunCard, Un as KunCarousel, Wn as KunCarouselItem, Zn as KunCheckBox, An as KunChip, $r as KunContent, ti as KunContextMenu, ki as KunCopy, xi as KunDatePicker, ji as KunDivider, Hi as KunDrawer, Fi as KunDropdown, Gi as KunFadeCard, Qi as KunFileInput, ia as KunHeader, Q as KunIcon, yn as KunImage, oa as KunImageNative, ua as KunInfo, xa as KunInput, Zr as KunLightbox, wa as KunLightboxGallery, Ta as KunLightboxGalleryItem, Ea as KunLink, qa as KunLoading, Pa as KunLoli, Ba as KunLoliProvider, Ja as KunMarkdown, no as KunMessageProvider, Jt as KunModal, oo as KunNull, _o as KunNumberInput, Do as KunPagination, jo as KunPinInput, Go as KunPopover, Qo as KunProgress, us as KunRadioGroup, ps as KunRating, _s as KunReaction, Ot as KunRipple, Ls as KunScrollShadow, Ns as KunSelect, Ps as KunShatter, Rs as KunSkeleton, qs as KunSlider, Xs as KunSteps, tc as KunSwitch, sc as KunTab, lc as KunTabPanel, uc as KunTabPanels, bc as KunTagInput, xc as KunText, Ac as KunTextarea, jc as KunTimeline, Lc as KunTimelineItem, Bc as KunTooltip, tl as KunUI, tl as default, $c as KunUIResolver, Jc as KunUpload, Qc as KunUserChip, Vc as checkImageValid, te as decodeIfEncoded, Oa as getRandomLoli, ie as getRandomSticker, lt as installKunUIConfig, ct as provideKunUIConfig, Hc as resizeImage, Ft as useBodyScrollLock, Nr as useContentLightbox, Ki as useFilePicker, wt as useKunAlert, Ct as useKunAlertState, Kt as useKunBackgroundInert, Di as useKunCopy, an as useKunFloating, za as useKunLoliInfo, Ra as useKunLoliState, Ei as useKunMessage, Ti as useKunMessageState, Vt as useKunOverlayZIndex, Vo as useKunPointerMenu, ut as useKunUIConfig, at as useKunUniqueId, Tt as useResolvedRounded, Et as useRipple, Mr as useSpoilerContent };