sakana-element 2.2.0 → 2.4.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.
Files changed (155) hide show
  1. package/README.md +98 -25
  2. package/dist/es/{Alert-C76ZWSVk.js → Alert-DfLsJvQD.js} +2 -2
  3. package/dist/es/Avatar-Ci4OKsv7.js +9 -0
  4. package/dist/es/{Badge-CoFWwBwv.js → Badge-B4wEToK6.js} +2 -2
  5. package/dist/es/{Breadcrumb-BtrwTVKW.js → Breadcrumb-BFzww8jd.js} +2 -2
  6. package/dist/es/{Button-S_31-UWJ.js → Button-DbFviVWb.js} +3 -3
  7. package/dist/es/{Card-DcW6nHYD.js → Card-ClRqKkc_.js} +2 -2
  8. package/dist/es/ChatBubble-DFEV_lVI.js +9 -0
  9. package/dist/es/Checkbox-l86YI3Fr.js +51 -0
  10. package/dist/es/{Collapse-DsS7M-m3.js → Collapse-B67v6RSE.js} +4 -4
  11. package/dist/es/{ConfigProvider-BgIewHXP.js → ConfigProvider-BCoGbcS5.js} +2 -2
  12. package/dist/es/Diff-BLiniLom.js +64 -0
  13. package/dist/es/Divider-DDSOHv8G.js +9 -0
  14. package/dist/es/Drawer-apeXw6EO.js +40 -0
  15. package/dist/es/Dropdown-By9qIErf.js +104 -0
  16. package/dist/es/{FileInput-BQ59woas.js → FileInput-CZ5jTfB_.js} +3 -3
  17. package/dist/es/Filter-B_1zU4Dq.js +40 -0
  18. package/dist/es/Form-B_XDnSjK.js +123 -0
  19. package/dist/es/{Icon-DpJyuj7c.js → Icon-D6qRB3pq.js} +1 -1
  20. package/dist/es/Indicator-C6Ip4dpP.js +9 -0
  21. package/dist/es/{Input-CiE4bPJN.js → Input-bThwBbNZ.js} +7 -7
  22. package/dist/es/Kbd-DXNjs7at.js +13 -0
  23. package/dist/es/{Link-B9B2APZq.js → Link-08Ee61Fv.js} +1 -1
  24. package/dist/es/{Loading-BW99pE5N.js → Loading-ByI9mjss.js} +13 -13
  25. package/dist/es/Message-CGG-lV5I.js +152 -0
  26. package/dist/es/Notification-B4clKY5h.js +69 -0
  27. package/dist/es/{Overlay-BRDSWspM.js → Overlay-6iPenJB1.js} +1 -1
  28. package/dist/es/Pixelate-A8J7jxDW.js +39 -0
  29. package/dist/es/Popconfirm-gcHGcOTz.js +23 -0
  30. package/dist/es/Progress-DFUBJQ4X.js +12 -0
  31. package/dist/es/Radio-CLBa1XIM.js +33 -0
  32. package/dist/es/Resizable-BWrFr2oj.js +151 -0
  33. package/dist/es/{Select-Dwqv8isB.js → Select-BtLqds1d.js} +20 -20
  34. package/dist/es/Skeleton-CGUQv3nQ.js +15 -0
  35. package/dist/es/{Switch-B1Gnv1tB.js → Switch-CZJ-S77_.js} +3 -3
  36. package/dist/es/Table-lHbxiyGq.js +10 -0
  37. package/dist/es/Tooltip-CdPqNYdn.js +74 -0
  38. package/dist/es/Validator-7ZT_nXDZ.js +40 -0
  39. package/dist/es/hooks-pU4JmsO3.js +171 -0
  40. package/dist/es/index.js +107 -70
  41. package/dist/es/utils-BXICIEsD.js +139 -0
  42. package/dist/es/{vendor-DXmGx29U.js → vendor-DrBJKLFW.js} +254 -210
  43. package/dist/index.css +1 -1
  44. package/dist/theme/Avatar.css +13 -43
  45. package/dist/theme/Badge.css +151 -151
  46. package/dist/theme/Breadcrumb.css +46 -4
  47. package/dist/theme/Button.css +72 -8
  48. package/dist/theme/Card.css +177 -93
  49. package/dist/theme/ChatBubble.css +218 -0
  50. package/dist/theme/Checkbox.css +604 -0
  51. package/dist/theme/Collapse.css +96 -96
  52. package/dist/theme/Diff.css +110 -0
  53. package/dist/theme/Divider.css +150 -0
  54. package/dist/theme/Drawer.css +206 -0
  55. package/dist/theme/Dropdown.css +359 -75
  56. package/dist/theme/FileInput.css +32 -0
  57. package/dist/theme/Filter.css +598 -0
  58. package/dist/theme/Indicator.css +159 -0
  59. package/dist/theme/Input.css +414 -406
  60. package/dist/theme/Kbd.css +104 -0
  61. package/dist/theme/Link.css +22 -3
  62. package/dist/theme/Loading.css +50 -12
  63. package/dist/theme/Message.css +250 -41
  64. package/dist/theme/Notification.css +232 -42
  65. package/dist/theme/Popconfirm.css +23 -7
  66. package/dist/theme/Progress.css +278 -0
  67. package/dist/theme/Radio.css +492 -0
  68. package/dist/theme/Resizable.css +95 -0
  69. package/dist/theme/Select.css +198 -88
  70. package/dist/theme/Skeleton.css +192 -0
  71. package/dist/theme/Switch.css +22 -3
  72. package/dist/theme/Table.css +680 -0
  73. package/dist/theme/Tooltip.css +150 -26
  74. package/dist/theme/Validator.css +25 -0
  75. package/dist/types/components/Avatar/types.d.ts +0 -2
  76. package/dist/types/components/ChatBubble/constants.d.ts +2 -0
  77. package/dist/types/components/ChatBubble/index.d.ts +27 -0
  78. package/dist/types/components/ChatBubble/types.d.ts +10 -0
  79. package/dist/types/components/Checkbox/constants.d.ts +5 -0
  80. package/dist/types/components/Checkbox/index.d.ts +94 -0
  81. package/dist/types/components/Checkbox/types.d.ts +46 -0
  82. package/dist/types/components/Collapse/index.d.ts +5 -5
  83. package/dist/types/components/Diff/constants.d.ts +4 -0
  84. package/dist/types/components/Diff/index.d.ts +67 -0
  85. package/dist/types/components/Diff/types.d.ts +29 -0
  86. package/dist/types/components/Divider/index.d.ts +30 -0
  87. package/dist/types/components/Divider/types.d.ts +10 -0
  88. package/dist/types/components/Drawer/constants.d.ts +1 -0
  89. package/dist/types/components/Drawer/index.d.ts +72 -0
  90. package/dist/types/components/Drawer/types.d.ts +20 -0
  91. package/dist/types/components/Dropdown/index.d.ts +13 -3
  92. package/dist/types/components/Dropdown/types.d.ts +3 -0
  93. package/dist/types/components/Dropdown/useDropdownKeyboard.d.ts +8 -0
  94. package/dist/types/components/FileInput/index.d.ts +5 -5
  95. package/dist/types/components/Filter/constants.d.ts +5 -0
  96. package/dist/types/components/Filter/index.d.ts +59 -0
  97. package/dist/types/components/Filter/types.d.ts +38 -0
  98. package/dist/types/components/Indicator/constants.d.ts +2 -0
  99. package/dist/types/components/Indicator/index.d.ts +28 -0
  100. package/dist/types/components/Indicator/types.d.ts +10 -0
  101. package/dist/types/components/Input/index.d.ts +10 -10
  102. package/dist/types/components/Kbd/constants.d.ts +3 -0
  103. package/dist/types/components/Kbd/index.d.ts +24 -0
  104. package/dist/types/components/Kbd/types.d.ts +10 -0
  105. package/dist/types/components/Message/methods.d.ts +2 -0
  106. package/dist/types/components/Message/types.d.ts +7 -1
  107. package/dist/types/components/MessageBox/types.d.ts +14 -2
  108. package/dist/types/components/Notification/methods.d.ts +3 -0
  109. package/dist/types/components/Notification/types.d.ts +8 -2
  110. package/dist/types/components/Pixelate/constants.d.ts +2 -0
  111. package/dist/types/components/Pixelate/index.d.ts +71 -0
  112. package/dist/types/components/Pixelate/types.d.ts +23 -0
  113. package/dist/types/components/Popconfirm/index.d.ts +18 -9
  114. package/dist/types/components/Popconfirm/types.d.ts +2 -1
  115. package/dist/types/components/Progress/constants.d.ts +2 -0
  116. package/dist/types/components/Progress/index.d.ts +50 -0
  117. package/dist/types/components/Progress/types.d.ts +22 -0
  118. package/dist/types/components/Radio/constants.d.ts +5 -0
  119. package/dist/types/components/Radio/index.d.ts +88 -0
  120. package/dist/types/components/Radio/types.d.ts +43 -0
  121. package/dist/types/components/Resizable/constants.d.ts +3 -0
  122. package/dist/types/components/Resizable/index.d.ts +135 -0
  123. package/dist/types/components/Resizable/types.d.ts +52 -0
  124. package/dist/types/components/Select/index.d.ts +32 -23
  125. package/dist/types/components/Skeleton/index.d.ts +36 -0
  126. package/dist/types/components/Skeleton/types.d.ts +12 -0
  127. package/dist/types/components/Switch/index.d.ts +5 -5
  128. package/dist/types/components/Table/index.d.ts +27 -0
  129. package/dist/types/components/Table/types.d.ts +20 -0
  130. package/dist/types/components/Tooltip/index.d.ts +9 -3
  131. package/dist/types/components/Tooltip/types.d.ts +7 -0
  132. package/dist/types/components/Validator/index.d.ts +52 -0
  133. package/dist/types/components/Validator/types.d.ts +13 -0
  134. package/dist/types/components/index.d.ts +15 -0
  135. package/dist/types/hooks/index.d.ts +3 -1
  136. package/dist/types/hooks/useDraggable.d.ts +7 -0
  137. package/dist/types/hooks/useFocusTrap.d.ts +5 -0
  138. package/dist/types/utils/index.d.ts +2 -0
  139. package/dist/types/utils/instance-management.d.ts +40 -0
  140. package/dist/types/utils/pixelate.d.ts +10 -0
  141. package/dist/types/utils/style.d.ts +1 -0
  142. package/dist/umd/index.css +1 -1
  143. package/dist/umd/index.css.gz +0 -0
  144. package/dist/umd/index.umd.cjs +4 -4
  145. package/dist/umd/index.umd.cjs.gz +0 -0
  146. package/package.json +59 -59
  147. package/dist/es/Avatar-CxsRW-wl.js +0 -9
  148. package/dist/es/Dropdown-GcomGMAI.js +0 -40
  149. package/dist/es/Form-j90EzLXU.js +0 -122
  150. package/dist/es/Message-DCNnTUje.js +0 -123
  151. package/dist/es/Notification-CBzY5904.js +0 -58
  152. package/dist/es/Popconfirm-DF6d2ORS.js +0 -23
  153. package/dist/es/Tooltip-k6gKnMyt.js +0 -74
  154. package/dist/es/hooks-BaG7l8K5.js +0 -116
  155. package/dist/es/utils-bsCscZfS.js +0 -84
@@ -0,0 +1,23 @@
1
+ import { b as o, _ as e, w as t } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as c, ref as n, computed as i, createBlock as l, openBlock as r, withCtx as a, renderSlot as f, createElementVNode as p, normalizeStyle as s, createCommentVNode as m, createTextVNode as d, toDisplayString as u, createVNode as _, unref as h } from "vue";
3
+ import { g as y } from "./hooks-pU4JmsO3.js";
4
+ import { b as B } from "./Button-DbFviVWb.js";
5
+ import { P as x } from "./Icon-D6qRB3pq.js";
6
+ import { T as w } from "./Tooltip-CdPqNYdn.js";
7
+ const T = { class: "px-popconfirm__main" }, v = { class: "px-popconfirm__action" }, k = t(e(c({ name: "PxPopconfirm", __name: "Popconfirm", props: { title: { default: "" }, confirmButtonText: {}, cancelButtonText: {}, confirmButtonType: { default: "primary" }, cancelButtonType: {}, icon: { default: "question-circle" }, iconColor: { default: "#f90" }, hideIcon: { type: Boolean }, hideAfter: { default: 200 }, width: { default: 150 }, disabled: { type: Boolean }, placement: {}, showArrow: { type: Boolean }, effect: {} }, emits: ["confirm", "cancel"], setup(e2, { emit: t2 }) {
8
+ const c2 = e2, k2 = t2, b = y(), j = n(), P = i((() => ({ width: o(c2.width) })));
9
+ function g() {
10
+ var _a;
11
+ (_a = j.value) == null ? void 0 : _a.hide();
12
+ }
13
+ function A(o2) {
14
+ k2("confirm", o2), g();
15
+ }
16
+ function C(o2) {
17
+ k2("cancel", o2), g();
18
+ }
19
+ return (o2, e3) => (r(), l(w, { ref_key: "tooltipRef", ref: j, trigger: "click", "hide-timeout": o2.hideAfter, disabled: o2.disabled, placement: o2.placement, "show-arrow": o2.showArrow, effect: o2.effect }, { content: a((() => [p("div", { class: "px-popconfirm", role: "alertdialog", style: s(P.value) }, [p("div", T, [!o2.hideIcon && o2.icon ? (r(), l(x, { key: 0, icon: o2.icon, color: o2.iconColor }, null, 8, ["icon", "color"])) : m("", true), d(" " + u(o2.title), 1)]), p("div", v, [_(B, { class: "px-popconfirm__cancel", size: "small", type: o2.cancelButtonType, onClick: C }, { default: a((() => [d(u(o2.cancelButtonText || h(b).t("popconfirm.cancelButtonText")), 1)])), _: 1 }, 8, ["type"]), _(B, { class: "px-popconfirm__confirm", size: "small", type: o2.confirmButtonType, onClick: A }, { default: a((() => [d(u(o2.confirmButtonText || h(b).t("popconfirm.confirmButtonText")), 1)])), _: 1 }, 8, ["type"])])], 4)])), default: a((() => [f(o2.$slots, "reference", {}, (() => [f(o2.$slots, "default", {}, void 0, true)]), true)])), _: 3 }, 8, ["hide-timeout", "disabled", "placement", "show-arrow", "effect"]));
20
+ } }), [["__scopeId", "data-v-68772965"]]));
21
+ export {
22
+ k as P
23
+ };
@@ -0,0 +1,12 @@
1
+ import { r as e, c as t, w as r } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as a, computed as s, createElementBlock as o, openBlock as l, normalizeClass as i, createElementVNode as p, createCommentVNode as n, normalizeStyle as d, toDisplayString as u } from "vue";
3
+ const x = { "fill-color": "color", "fill-border-color": "dark", "track-border-color": "dark", "text-color": "dark", "shadow-color": "dark" }, c = ["aria-valuenow"], v = { class: "px-progress__track" }, m = { key: 0, class: "px-progress__inner-text" }, f = { key: 0, class: "px-progress__text" }, g = r(a({ name: "PxProgress", __name: "Progress", props: { percentage: { default: 0 }, type: { default: "primary" }, size: { default: "default" }, status: {}, variant: { default: "solid" }, stripedFlow: { type: Boolean, default: false }, indeterminate: { type: Boolean, default: false }, strokeWidth: { default: 0 }, showText: { type: Boolean, default: true }, textInside: { type: Boolean, default: false }, color: {}, format: {} }, setup(r2, { expose: a2 }) {
4
+ const g2 = r2, h = s((() => Math.max(0, Math.min(100, g2.percentage)))), k = s((() => g2.color ? "function" == typeof g2.color ? g2.color(h.value) : g2.color : "")), w = s((() => k.value ? e(t(k.value), "px-progress", x) : {})), y = s((() => {
5
+ const e2 = { ...w.value };
6
+ return g2.indeterminate || (e2.width = `${h.value}%`), g2.strokeWidth && (e2["--px-progress-height"] = `${g2.strokeWidth}px`), e2;
7
+ })), _ = s((() => g2.format ? g2.format(h.value) : `${h.value}%`)), $ = s((() => g2.status ? `px-progress--${g2.status}` : ""));
8
+ return a2({ clampedPercentage: h }), (e2, t2) => (l(), o("div", { class: i(["px-progress", [`px-progress--${e2.type}`, `px-progress--${e2.size}`, $.value, { [`px-progress--${e2.variant}`]: "solid" !== e2.variant, "is-striped-flow": e2.stripedFlow && "striped" === e2.variant, "is-indeterminate": e2.indeterminate, "is-text-inside": e2.textInside }]]), role: "progressbar", "aria-valuenow": e2.indeterminate ? void 0 : h.value, "aria-valuemin": 0, "aria-valuemax": 100 }, [p("div", v, [p("div", { class: "px-progress__fill", style: d(y.value) }, [e2.showText && e2.textInside && !e2.indeterminate ? (l(), o("span", m, u(_.value), 1)) : n("", true)], 4)]), !e2.showText || e2.textInside || e2.indeterminate ? n("", true) : (l(), o("span", f, u(_.value), 1))], 10, c));
9
+ } }));
10
+ export {
11
+ g as P
12
+ };
@@ -0,0 +1,33 @@
1
+ import { c as e, r as a, w as l } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as o, useSlots as d, inject as r, ref as u, computed as i, createElementBlock as t, openBlock as s, normalizeStyle as n, normalizeClass as c, createElementVNode as p, createCommentVNode as m, unref as v, renderSlot as f, createTextVNode as h, toDisplayString as b, provide as y } from "vue";
3
+ import { u as x } from "./hooks-pU4JmsO3.js";
4
+ import { u as _ } from "./Form-B_XDnSjK.js";
5
+ const g = Symbol("radioGroupContext"), k = { "checked-color": "color", "checked-border-color": "dark" }, V = { class: "px-radio__input" }, z = ["aria-checked", "id", "name", "disabled", "checked"], B = { key: 0, class: "px-radio__label" }, R = o({ name: "PxRadio", inheritAttrs: false, __name: "Radio", props: { modelValue: { type: [String, Number, Boolean] }, value: { type: [String, Number, Boolean] }, disabled: { type: Boolean, default: false }, size: {}, type: {}, color: {}, label: {}, name: {}, id: {} }, emits: ["update:modelValue", "change"], setup(l2, { expose: o2, emit: y2 }) {
6
+ const R2 = l2, S2 = y2, $2 = d(), j2 = r(g, void 0), G2 = !!j2, { formItem: N } = _(), P = u(), C = x().value, E = i((() => G2 ? j2.modelValue.value === R2.value : R2.modelValue === R2.value)), I = i((() => !!(j2 == null ? void 0 : j2.disabled.value) || R2.disabled)), w = i((() => R2.size ?? (j2 == null ? void 0 : j2.size.value))), A = i((() => R2.type ?? (j2 == null ? void 0 : j2.type.value))), F = i((() => R2.color ?? (j2 == null ? void 0 : j2.color.value))), q = i((() => R2.name ?? (j2 == null ? void 0 : j2.name.value))), D = i((() => {
7
+ const l3 = F.value;
8
+ if (!l3) return {};
9
+ const o3 = e(l3);
10
+ return a(o3, "px-radio", k);
11
+ }));
12
+ function H() {
13
+ if (I.value) return;
14
+ if (E.value) return;
15
+ const e2 = R2.value;
16
+ G2 ? j2.changeEvent(e2) : (S2("update:modelValue", e2), S2("change", e2)), G2 || (N == null ? void 0 : N.validate("change").catch(((e3) => {
17
+ })));
18
+ }
19
+ return o2({ checked: E, focus: () => {
20
+ var _a;
21
+ (_a = P.value) == null ? void 0 : _a.focus();
22
+ } }), (e2, a2) => (s(), t("div", { class: c(["px-radio", { [`px-radio--${w.value}`]: w.value, [`px-radio--${A.value}`]: A.value, "is-disabled": I.value, "is-checked": E.value }]), style: n(D.value), onClick: H }, [p("span", V, [p("input", { ref_key: "inputRef", ref: P, class: "px-radio__original", type: "radio", "aria-checked": E.value, id: e2.id || v(C), name: q.value, disabled: I.value, checked: E.value }, null, 8, z), a2[0] || (a2[0] = p("span", { class: "px-radio__inner" }, [p("span", { class: "px-radio__dot" })], -1))]), e2.label || v($2).default ? (s(), t("span", B, [f(e2.$slots, "default", {}, (() => [h(b(e2.label), 1)]))])) : m("", true)], 6));
23
+ } }), S = { class: "px-radio-group", role: "radiogroup" }, $ = o({ name: "PxRadioGroup", __name: "RadioGroup", props: { modelValue: { type: [String, Number, Boolean] }, disabled: { type: Boolean, default: false }, size: {}, type: {}, color: {}, name: {} }, emits: ["update:modelValue", "change"], setup(e2, { emit: a2 }) {
24
+ const l2 = e2, o2 = a2, { formItem: d2 } = _();
25
+ return y(g, { modelValue: i((() => l2.modelValue)), disabled: i((() => l2.disabled)), size: i((() => l2.size)), type: i((() => l2.type)), color: i((() => l2.color)), name: i((() => l2.name)), changeEvent: (e3) => {
26
+ o2("update:modelValue", e3), o2("change", e3), d2 == null ? void 0 : d2.validate("change").catch(((e4) => {
27
+ }));
28
+ } }), (e3, a3) => (s(), t("div", S, [f(e3.$slots, "default")]));
29
+ } }), j = l(R), G = l($);
30
+ export {
31
+ j as P,
32
+ G as a
33
+ };
@@ -0,0 +1,151 @@
1
+ import { a as e, w as i } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as t, ref as n, reactive as a, shallowRef as l, onMounted as o, onBeforeUnmount as s, computed as r, provide as u, createElementBlock as d, openBlock as c, normalizeClass as v, renderSlot as f, triggerRef as z, inject as p, normalizeStyle as m, watch as g } from "vue";
3
+ const S = Symbol("resizableGroupContext"), w = t({ name: "PxResizableGroup", __name: "ResizableGroup", props: { direction: {}, autoSaveId: {}, keyboardResizeBy: { default: 10 } }, emits: ["layout"], setup(i2, { emit: t2 }) {
4
+ const p2 = i2, m2 = t2, g2 = n(), w2 = a([]), x2 = l(/* @__PURE__ */ new Map()), b2 = a([]);
5
+ let h2 = 0, y2 = 0;
6
+ function P2(i3, t3, n2) {
7
+ const a2 = (x2.value.get(i3.id) ?? 0) + (x2.value.get(t3.id) ?? 0);
8
+ let l2 = a2 - (n2 = e(n2, i3.minSize, i3.maxSize));
9
+ l2 = e(l2, t3.minSize, t3.maxSize), n2 = a2 - l2, x2.value.set(i3.id, n2), x2.value.set(t3.id, l2), z(x2);
10
+ }
11
+ o((() => {
12
+ !(function() {
13
+ if (p2.autoSaveId) try {
14
+ const e3 = localStorage.getItem(`px-resizable-${p2.autoSaveId}`);
15
+ if (e3) {
16
+ const i4 = JSON.parse(e3);
17
+ if (i4.length === w2.length) {
18
+ const e4 = /* @__PURE__ */ new Map();
19
+ return w2.forEach(((t4, n3) => {
20
+ e4.set(t4.id, i4[n3]);
21
+ })), void (x2.value = e4);
22
+ }
23
+ }
24
+ } catch {
25
+ }
26
+ const e2 = /* @__PURE__ */ new Map();
27
+ let i3 = 0, t3 = 0;
28
+ for (const n3 of w2) null != n3.defaultSize ? (e2.set(n3.id, n3.defaultSize), i3 += n3.defaultSize) : t3++;
29
+ const n2 = t3 > 0 ? (100 - i3) / t3 : 0;
30
+ for (const i4 of w2) null == i4.defaultSize && e2.set(i4.id, n2);
31
+ x2.value = e2;
32
+ })();
33
+ }));
34
+ let R = null, E = -1, L = null;
35
+ function k(e2) {
36
+ if (E < 0 || !R) return;
37
+ const i3 = "touches" in e2 ? e2.touches[0].clientX : e2.clientX, t3 = "touches" in e2 ? e2.touches[0].clientY : e2.clientY, n2 = "horizontal" === p2.direction, a2 = n2 ? i3 : t3, l2 = n2 ? R.left : R.top, o2 = n2 ? R.width : R.height;
38
+ if (0 === o2) return;
39
+ const s2 = (a2 - l2) / o2 * 100, r2 = w2[E], u2 = w2[E + 1];
40
+ if (!r2 || !u2) return;
41
+ let d2 = 0;
42
+ for (let e3 = 0; e3 < E; e3++) d2 += x2.value.get(w2[e3].id) ?? 0;
43
+ P2(r2, u2, s2 - d2), H();
44
+ }
45
+ function I() {
46
+ E = -1, R = null, window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", I), A(), L && (L(), L = null);
47
+ }
48
+ function H() {
49
+ const e2 = w2.map(((e3) => x2.value.get(e3.id) ?? 0));
50
+ m2("layout", e2);
51
+ }
52
+ function A() {
53
+ if (p2.autoSaveId) try {
54
+ const e2 = w2.map(((e3) => x2.value.get(e3.id) ?? 0));
55
+ localStorage.setItem(`px-resizable-${p2.autoSaveId}`, JSON.stringify(e2));
56
+ } catch {
57
+ }
58
+ }
59
+ s((() => {
60
+ window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", I);
61
+ }));
62
+ const B = r((() => p2.direction)), M = r((() => p2.keyboardResizeBy));
63
+ return u(S, { direction: B, keyboardResizeBy: M, registerPanel: function(e2) {
64
+ e2.id = h2++, w2.push(e2);
65
+ }, unregisterPanel: function(e2) {
66
+ const i3 = w2.findIndex(((i4) => i4.id === e2));
67
+ i3 > -1 && w2.splice(i3, 1), x2.value.delete(e2), z(x2);
68
+ }, getPanelSize: function(e2) {
69
+ return x2.value.get(e2) ?? 0;
70
+ }, setPanelSize: function(i3, t3, n2 = false) {
71
+ const a2 = w2.find(((e2) => e2.id === i3));
72
+ if (!a2) return;
73
+ const l2 = n2 ? t3 : e(t3, a2.minSize, a2.maxSize), o2 = l2 - (x2.value.get(i3) ?? 0);
74
+ if (0 === o2) return;
75
+ const s2 = w2.indexOf(a2), r2 = w2[s2 + 1] ?? w2[s2 - 1];
76
+ if (!r2) return;
77
+ const u2 = (x2.value.get(r2.id) ?? 0) - o2;
78
+ !n2 && (u2 < r2.minSize || u2 > r2.maxSize) || (x2.value.set(i3, l2), x2.value.set(r2.id, u2), z(x2), H());
79
+ }, startResize: function(e2, i3) {
80
+ var _a;
81
+ const t3 = b2.indexOf(e2);
82
+ t3 < 0 || (E = t3, R = ((_a = g2.value) == null ? void 0 : _a.getBoundingClientRect()) ?? null, L = i3 ?? null, window.addEventListener("mousemove", k), window.addEventListener("mouseup", I), window.addEventListener("touchmove", k, { passive: true }), window.addEventListener("touchend", I));
83
+ }, keyboardResize: function(e2, i3) {
84
+ const t3 = b2.indexOf(e2);
85
+ if (t3 < 0) return;
86
+ const n2 = w2[t3], a2 = w2[t3 + 1];
87
+ n2 && a2 && (P2(n2, a2, (x2.value.get(n2.id) ?? 0) + i3), H(), A());
88
+ }, getNextHandleId: function() {
89
+ return y2++;
90
+ }, registerHandle: function(e2) {
91
+ b2.push(e2);
92
+ }, unregisterHandle: function(e2) {
93
+ const i3 = b2.indexOf(e2);
94
+ i3 > -1 && b2.splice(i3, 1);
95
+ }, panelSizes: x2 }), (e2, i3) => (c(), d("div", { ref_key: "groupRef", ref: g2, class: v(["px-resizable-group", { "is-horizontal": "horizontal" === B.value, "is-vertical": "vertical" === B.value }]) }, [f(e2.$slots, "default")], 2));
96
+ } }), x = t({ name: "PxResizableHandle", __name: "ResizableHandle", props: { disabled: { type: Boolean, default: false }, hitAreaMargins: { default: 0 } }, emits: ["dragging"], setup(e2, { emit: i2 }) {
97
+ const t2 = e2, a2 = i2, l2 = p(S);
98
+ if (!l2) throw new Error("PxResizableHandle must be used inside PxResizableGroup");
99
+ let u2 = -1;
100
+ const f2 = n(false);
101
+ o((() => {
102
+ u2 = l2.getNextHandleId(), l2.registerHandle(u2);
103
+ })), s((() => {
104
+ l2.unregisterHandle(u2);
105
+ }));
106
+ const z2 = r((() => "vertical" === l2.direction.value));
107
+ function g2() {
108
+ t2.disabled || (f2.value = true, a2("dragging", true), l2.startResize(u2, (() => {
109
+ f2.value = false, a2("dragging", false);
110
+ })));
111
+ }
112
+ function w2(e3) {
113
+ if (t2.disabled) return;
114
+ const i3 = "horizontal" === l2.direction.value ? "ArrowRight" === e3.key ? 1 : "ArrowLeft" === e3.key ? -1 : 0 : "ArrowDown" === e3.key ? 1 : "ArrowUp" === e3.key ? -1 : 0;
115
+ 0 !== i3 && (e3.preventDefault(), l2.keyboardResize(u2, i3 * l2.keyboardResizeBy.value));
116
+ }
117
+ const x2 = r((() => t2.hitAreaMargins ? { "--px-handle-hit-area": `${t2.hitAreaMargins}px` } : {}));
118
+ return (e3, i3) => (c(), d("div", { class: v(["px-resizable-handle", { "is-disabled": t2.disabled, "is-vertical": z2.value, "is-dragging": f2.value, "has-hit-area": !!t2.hitAreaMargins }]), style: m(x2.value), role: "separator", tabindex: "0", onMousedown: g2, onTouchstartPassive: g2, onKeydown: w2 }, null, 38));
119
+ } }), b = t({ name: "PxResizablePanel", __name: "ResizablePanel", props: { defaultSize: {}, minSize: { default: 10 }, maxSize: { default: 100 }, collapsible: { type: Boolean, default: false }, collapsedSize: { default: 0 } }, emits: ["resize", "collapse", "expand"], setup(e2, { expose: i2, emit: t2 }) {
120
+ const a2 = e2, l2 = t2, u2 = p(S);
121
+ if (!u2) throw new Error("PxResizablePanel must be used inside PxResizableGroup");
122
+ const z2 = n(-1), w2 = n(false);
123
+ let x2 = 0;
124
+ const b2 = { id: 0, minSize: a2.minSize, maxSize: a2.maxSize, collapsible: a2.collapsible, collapsedSize: a2.collapsedSize, defaultSize: a2.defaultSize };
125
+ g((() => [a2.minSize, a2.maxSize, a2.collapsible, a2.collapsedSize]), (([e3, i3, t3, n2]) => {
126
+ b2.minSize = e3, b2.maxSize = i3, b2.collapsible = t3, b2.collapsedSize = n2;
127
+ })), o((() => {
128
+ u2.registerPanel(b2), z2.value = b2.id;
129
+ })), s((() => {
130
+ u2.unregisterPanel(z2.value);
131
+ }));
132
+ const h2 = r((() => u2.panelSizes.value.get(z2.value) ?? 0));
133
+ g(h2, ((e3, i3) => {
134
+ void 0 !== i3 && e3 !== i3 && l2("resize", e3);
135
+ }));
136
+ const y2 = r((() => ({ flexBasis: `${h2.value}%`, flexGrow: 0, flexShrink: 0 })));
137
+ return i2({ collapse: function() {
138
+ a2.collapsible && !w2.value && (x2 = h2.value, w2.value = true, u2.setPanelSize(z2.value, a2.collapsedSize, true), l2("collapse"));
139
+ }, expand: function() {
140
+ w2.value && (w2.value = false, u2.setPanelSize(z2.value, x2, true), l2("expand"));
141
+ }, getSize: function() {
142
+ return h2.value;
143
+ }, resize: function(e3) {
144
+ u2.setPanelSize(z2.value, e3);
145
+ } }), (e3, i3) => (c(), d("div", { class: v(["px-resizable-panel", { "is-collapsed": w2.value }]), style: m(y2.value) }, [f(e3.$slots, "default")], 6));
146
+ } }), h = i(w), y = i(b), P = i(x);
147
+ export {
148
+ h as P,
149
+ P as a,
150
+ y as b
151
+ };
@@ -1,10 +1,10 @@
1
- import { R as e, _ as l, c as t, r as a, w as o } from "./utils-bsCscZfS.js";
2
- import { defineComponent as i, inject as s, computed as n, createElementBlock as u, openBlock as r, withModifiers as d, normalizeClass as c, renderSlot as p, createVNode as h, unref as v, useSlots as f, ref as m, reactive as g, watchEffect as b, watch as x, onMounted as y, onBeforeUnmount as _, provide as V, normalizeStyle as w, withCtx as I, createCommentVNode as M, createElementVNode as k, toDisplayString as S, Fragment as O, renderList as L, createBlock as B, mergeProps as D, nextTick as z } from "vue";
3
- import { C as $, D as j, g as C, b as F, s as R, e as E, E as H, F as P, f as W, y as q, q as A, i as N, G as T, c as U } from "./vendor-DXmGx29U.js";
4
- import { g as G, u as K, c as J, a as Q } from "./hooks-BaG7l8K5.js";
5
- import { P as X } from "./Icon-DpJyuj7c.js";
6
- import { _ as Y } from "./Input-CiE4bPJN.js";
7
- import { T as Z } from "./Tooltip-k6gKnMyt.js";
1
+ import { R as e, _ as l, c as t, r as a, w as o } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as i, inject as s, computed as n, createElementBlock as u, openBlock as r, withModifiers as d, normalizeClass as c, renderSlot as p, createVNode as h, unref as v, useSlots as f, ref as m, reactive as g, watchEffect as b, nextTick as x, watch as y, onMounted as _, onBeforeUnmount as V, provide as w, normalizeStyle as I, withCtx as k, createCommentVNode as M, createElementVNode as S, toDisplayString as O, Fragment as L, renderList as B, createBlock as D, mergeProps as z } from "vue";
3
+ import { C as $, D as j, g as C, b as F, s as R, e as E, E as H, F as P, f as W, y as q, q as A, i as N, G as T, c as U } from "./vendor-DrBJKLFW.js";
4
+ import { g as G, u as K, e as J, c as Q } from "./hooks-pU4JmsO3.js";
5
+ import { P as X } from "./Icon-D6qRB3pq.js";
6
+ import { _ as Y } from "./Input-bThwBbNZ.js";
7
+ import { T as Z } from "./Tooltip-CdPqNYdn.js";
8
8
  const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options: { offset: [0, 9] } }, { name: "sameWidth", enabled: true, fn: ({ state: e2 }) => {
9
9
  e2.styles.popper.width = `${e2.rects.reference.width}px`;
10
10
  }, phase: "beforeWrite", requires: ["computeStyles"] }] }, te = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), ae = { default: { "item-selected-font-color": "color", "item-selected-bg-color": "light", "item-indicator-color": "color", "item-highlighted-border-color": "color" }, ghost: { "item-selected-font-color": "color", "item-selected-bg-color": "light", "item-indicator-color": "color", "item-highlighted-border-color": "color" } }, oe = ["aria-selected", "id"], ie = l(i({ name: "PxOption", __name: "Option", props: { value: {}, label: {}, disabled: { type: Boolean, default: false } }, setup(l2) {
@@ -19,7 +19,7 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
19
19
  var _a, _b;
20
20
  return [h(v(e), { vNode: ((_a = v(a2)) == null ? void 0 : _a.renderLabel) ? (_b = v(a2)) == null ? void 0 : _b.renderLabel(t2) : l3.label }, null, 8, ["vNode"])];
21
21
  }), true)], 10, oe));
22
- } }), [["__scopeId", "data-v-d9852f9a"]]), se = { key: 0, class: "px-select__loading" }, ne = { key: 1, class: "px-select__nodata" }, ue = ["id"], re = o(l(i({ name: "PxSelect", __name: "Select", props: { modelValue: {}, id: {}, options: { default: () => [] }, placeholder: {}, disabled: { type: Boolean }, clearable: { type: Boolean }, ghost: { type: Boolean }, color: {}, size: {}, renderLabel: {}, filterable: { type: Boolean }, filterMethod: {}, remote: { type: Boolean }, remoteMethod: {} }, emits: ["update:modelValue", "change", "visible-change", "clear", "focus", "blur"], setup(e2, { expose: l2, emit: o2 }) {
22
+ } }), [["__scopeId", "data-v-1ab275ee"]]), se = { key: 0, class: "px-select__loading" }, ne = { key: 1, class: "px-select__nodata" }, ue = ["id"], re = o(l(i({ name: "PxSelect", __name: "Select", props: { modelValue: {}, id: {}, options: { default: () => [] }, placeholder: {}, disabled: { type: Boolean }, clearable: { type: Boolean }, ghost: { type: Boolean }, color: {}, size: {}, renderLabel: {}, filterable: { type: Boolean }, filterMethod: {}, remote: { type: Boolean }, remoteMethod: {} }, emits: ["update:modelValue", "change", "visible-change", "clear", "focus", "blur"], setup(e2, { expose: l2, emit: o2 }) {
23
23
  const i2 = G(), s2 = e2, p2 = o2, $2 = f(), oe2 = m(), re2 = m(), de2 = m(), ce = m(/* @__PURE__ */ new Map()), pe = m(s2.options ?? []), he = m(false), ve = We(s2.modelValue), fe = g({ inputValue: (ve == null ? void 0 : ve.label) ?? "", selectedOption: ve, mouseHover: false, loading: false, highlightedIndex: -1 }), me = n((() => s2.disabled)), ge = n((() => te.has(s2.color ?? ""))), be = n((() => !!s2.color && !ge.value)), xe = n((() => {
24
24
  if (!be.value) return {};
25
25
  const e3 = t(s2.color), l3 = s2.ghost ? "ghost" : "default";
@@ -33,7 +33,7 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
33
33
  })), Ie = n((() => _e.value ? E(ye.value, ((e3) => {
34
34
  var _a, _b, _c;
35
35
  return { props: { ...e3.props, disabled: true === ((_a = e3.props) == null ? void 0 : _a.disabled) || !N((_b = e3.props) == null ? void 0 : _b.disabled) && !T((_c = e3.props) == null ? void 0 : _c.disabled) } };
36
- })) : [])), Me = n((() => !!s2.filterable && !ke.value)), ke = n((() => _e.value && ce.value.size > 0 || !_e.value && R(pe.value) > 0)), Se = n((() => _e.value ? ce.value.size - 1 : R(pe.value) - 1)), Oe = n((() => s2.filterable && fe.selectedOption && he.value ? fe.selectedOption.label : s2.placeholder)), Le = n((() => s2.remote ? 300 : 100));
36
+ })) : [])), ke = n((() => !!s2.filterable && !Me.value)), Me = n((() => _e.value && ce.value.size > 0 || !_e.value && R(pe.value) > 0)), Se = n((() => _e.value ? ce.value.size - 1 : R(pe.value) - 1)), Oe = n((() => s2.filterable && fe.selectedOption && he.value ? fe.selectedOption.label : s2.placeholder)), Le = n((() => s2.remote ? 300 : 100));
37
37
  let Be = H(Ne, Le.value);
38
38
  b((() => {
39
39
  Be.cancel(), Be = H(Ne, Le.value);
@@ -47,9 +47,9 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
47
47
  })), n2.set("ArrowDown", ((e4) => {
48
48
  e4.preventDefault(), i3.value && (-1 !== t2.highlightedIndex && t2.highlightedIndex !== s3.value ? t2.highlightedIndex++ : t2.highlightedIndex = 0);
49
49
  })), n2;
50
- })({ isDropdownVisible: he, controlVisible: Ee, selectStates: fe, highlightedLine: we, handleSelect: qe, hasData: ke, lastIndex: Se });
50
+ })({ isDropdownVisible: he, controlVisible: Ee, selectStates: fe, highlightedLine: we, handleSelect: qe, hasData: Me, lastIndex: Se });
51
51
  function Re(e3) {
52
- $e.value && z((() => je(new FocusEvent("focus", e3))));
52
+ $e.value && x((() => je(new FocusEvent("focus", e3))));
53
53
  }
54
54
  function Ee(e3) {
55
55
  var _a;
@@ -110,24 +110,24 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
110
110
  const e3 = We(s2.modelValue);
111
111
  e3 && (fe.inputValue = e3.label, fe.selectedOption = e3);
112
112
  }
113
- return Q(oe2, ((e3) => Re(e3))), x((() => s2.options), ((e3) => {
113
+ return Q(oe2, ((e3) => Re(e3))), y((() => s2.options), ((e3) => {
114
114
  pe.value = e3 ?? [];
115
- })), x((() => Ie.value), ((e3) => Ae(e3)), { immediate: true }), x((() => s2.modelValue), (() => {
116
- Ge();
117
- })), y((() => {
115
+ })), y((() => Ie.value), ((e3) => Ae(e3)), { immediate: true }), y((() => s2.modelValue), (() => {
118
116
  Ge();
119
117
  })), _((() => {
118
+ Ge();
119
+ })), V((() => {
120
120
  Be.cancel();
121
- })), V(ee, { handleSelect: qe, selectStates: fe, renderLabel: function(e3) {
121
+ })), w(ee, { handleSelect: qe, selectStates: fe, renderLabel: function(e3) {
122
122
  return q(s2.renderLabel) ? s2.renderLabel(e3) : e3.label;
123
123
  }, highlightedLine: we }), l2({ focus: () => {
124
124
  var _a;
125
125
  (_a = de2.value) == null ? void 0 : _a.focus();
126
126
  }, blur: () => {
127
127
  Re();
128
- } }), (e3, l3) => (r(), u("div", { ref_key: "selectRef", ref: oe2, class: c(["px-select", { "is-disabled": me.value, "is-ghost": e3.ghost, [`px-select--${e3.size}`]: e3.size, [`px-select--${e3.color}`]: ge.value }]), style: w(xe.value), onClick: d(He, ["stop"]), onMouseenter: l3[2] || (l3[2] = (e4) => fe.mouseHover = true), onMouseleave: l3[3] || (l3[3] = (e4) => fe.mouseHover = false) }, [h(Z, { ref_key: "tooltipRef", ref: re2, placement: "bottom-start", "popper-options": v(le), onClickOutside: l3[1] || (l3[1] = (e4) => Ee(false)), manual: "" }, { default: I((() => [k("div", { ref_key: "inputWrapperRef", ref: ze }, [h(Y, { ref_key: "inputRef", ref: de2, modelValue: fe.inputValue, "onUpdate:modelValue": l3[0] || (l3[0] = (e4) => fe.inputValue = e4), id: v(De), disabled: me.value, ghost: e3.ghost, color: e3.color, size: e3.size, placeholder: e3.filterable ? Oe.value : e3.placeholder, readonly: !e3.filterable || !he.value, "aria-controls": `px-select-menu-${v(De)}`, "aria-activedescendant": we.value ? `select-item-${we.value.value}` : void 0, onFocus: v(Ce), onBlur: v(je), onInput: v(Be), onKeydown: Te }, { suffix: I((() => [Ve.value ? (r(), B(X, { key: 0, icon: "close-box", class: "px-input__clear", onClick: d(Pe, ["stop"]), onMousedown: d(v(A), ["prevent"]) }, null, 8, ["onMousedown"])) : (r(), B(X, { key: 1, class: c(["header-angle", { "is-active": he.value }]), icon: "chevron-down" }, null, 8, ["class"]))])), _: 1 }, 8, ["modelValue", "id", "disabled", "ghost", "color", "size", "placeholder", "readonly", "aria-controls", "aria-activedescendant", "onFocus", "onBlur", "onInput"])], 512)])), content: I((() => [fe.loading ? (r(), u("div", se, [h(X, { icon: "loader", spin: "" })])) : e3.filterable && Me.value ? (r(), u("div", ne, S(v(i2).t("select.noData")), 1)) : M("", true), k("ul", { class: "px-select__menu", role: "listbox", id: `px-select-menu-${v(De)}` }, [_e.value ? (r(true), u(O, { key: 1 }, L(ce.value, (([e4, l4]) => (r(), B(ie, D({ key: e4, ref_for: true }, l4), null, 16)))), 128)) : (r(true), u(O, { key: 0 }, L(pe.value, ((e4) => (r(), B(ie, D({ key: e4.value, ref_for: true }, e4), null, 16)))), 128))], 8, ue)])), _: 1 }, 8, ["popper-options"])], 38));
129
- } }), [["__scopeId", "data-v-4d450d40"]])), de = o(ie);
128
+ } }), (e3, l3) => (r(), u("div", { ref_key: "selectRef", ref: oe2, class: c(["px-select", { "is-disabled": me.value, "is-ghost": e3.ghost, [`px-select--${e3.size}`]: e3.size, [`px-select--${e3.color}`]: ge.value }]), style: I(xe.value), onClick: d(He, ["stop"]), onMouseenter: l3[2] || (l3[2] = (e4) => fe.mouseHover = true), onMouseleave: l3[3] || (l3[3] = (e4) => fe.mouseHover = false) }, [h(Z, { ref_key: "tooltipRef", ref: re2, placement: "bottom-start", "popper-options": v(le), onClickOutside: l3[1] || (l3[1] = (e4) => Ee(false)), manual: "" }, { default: k((() => [S("div", { ref_key: "inputWrapperRef", ref: ze }, [h(Y, { ref_key: "inputRef", ref: de2, modelValue: fe.inputValue, "onUpdate:modelValue": l3[0] || (l3[0] = (e4) => fe.inputValue = e4), id: v(De), disabled: me.value, ghost: e3.ghost, color: e3.color, size: e3.size, placeholder: e3.filterable ? Oe.value : e3.placeholder, readonly: !e3.filterable || !he.value, "aria-controls": `px-select-menu-${v(De)}`, "aria-activedescendant": we.value ? `select-item-${we.value.value}` : void 0, onFocus: v(Ce), onBlur: v(je), onInput: v(Be), onKeydown: Te }, { suffix: k((() => [Ve.value ? (r(), D(X, { key: 0, icon: "close-box", class: "px-input__clear", onClick: d(Pe, ["stop"]), onMousedown: d(v(A), ["prevent"]) }, null, 8, ["onMousedown"])) : (r(), D(X, { key: 1, class: c(["header-angle", { "is-active": he.value }]), icon: "chevron-down" }, null, 8, ["class"]))])), _: 1 }, 8, ["modelValue", "id", "disabled", "ghost", "color", "size", "placeholder", "readonly", "aria-controls", "aria-activedescendant", "onFocus", "onBlur", "onInput"])], 512)])), content: k((() => [fe.loading ? (r(), u("div", se, [h(X, { icon: "loader", spin: "" })])) : e3.filterable && ke.value ? (r(), u("div", ne, O(v(i2).t("select.noData")), 1)) : M("", true), S("ul", { class: "px-select__menu", role: "listbox", id: `px-select-menu-${v(De)}` }, [_e.value ? (r(true), u(L, { key: 1 }, B(ce.value, (([e4, l4]) => (r(), D(ie, z({ key: e4, ref_for: true }, l4), null, 16)))), 128)) : (r(true), u(L, { key: 0 }, B(pe.value, ((e4) => (r(), D(ie, z({ key: e4.value, ref_for: true }, e4), null, 16)))), 128))], 8, ue)])), _: 1 }, 8, ["popper-options"])], 38));
129
+ } }), [["__scopeId", "data-v-e33550e6"]])), de = o(ie);
130
130
  export {
131
- re as P,
132
- de as a
131
+ de as P,
132
+ re as a
133
133
  };
@@ -0,0 +1,15 @@
1
+ import { b as e, w as t } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as a, computed as i, createElementBlock as n, renderSlot as l, openBlock as s, normalizeClass as o, Fragment as r, renderList as d, normalizeStyle as u } from "vue";
3
+ const m = t(a({ name: "PxSkeleton", __name: "Skeleton", props: { loading: { type: Boolean, default: true }, animated: { type: Boolean, default: true }, animation: { default: "shimmer" }, variant: { default: "rectangular" }, width: {}, height: {}, rows: { default: 1 }, size: {} }, setup(t2) {
4
+ const a2 = t2, m2 = i((() => {
5
+ const t3 = {}, i2 = e(a2.width), n2 = e(a2.height);
6
+ return i2 && (t3.width = i2), n2 && (t3.height = n2), t3;
7
+ })), p = i((() => "text" === a2.variant && a2.rows > 1));
8
+ return (e2, t3) => e2.loading ? (s(), n("div", { key: 0, class: o(["px-skeleton", [`px-skeleton--${e2.variant}`, { [`px-skeleton--${e2.size}`]: e2.size && "default" !== e2.size, "is-loading": e2.loading, "is-animated": e2.animated, [`is-animation-${e2.animation}`]: e2.animated }]]) }, [p.value ? (s(true), n(r, { key: 0 }, d(e2.rows, ((e3) => {
9
+ return s(), n("div", { key: e3, class: "px-skeleton__row", style: u((t4 = e3, t4 === a2.rows ? { ...m2.value, width: m2.value.width ?? "60%" } : m2.value)) }, null, 4);
10
+ var t4;
11
+ })), 128)) : (s(), n("div", { key: 1, class: "px-skeleton__bone", style: u(m2.value) }, null, 4))], 2)) : l(e2.$slots, "default", { key: 1 });
12
+ } }));
13
+ export {
14
+ m as P
15
+ };
@@ -1,7 +1,7 @@
1
- import { c as e, w as c } from "./utils-bsCscZfS.js";
1
+ import { c as e, w as c } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as i, computed as a, ref as t, onMounted as o, watch as l, createElementBlock as s, openBlock as n, normalizeStyle as r, normalizeClass as u, createElementVNode as v, withKeys as d, unref as p, createCommentVNode as h, toDisplayString as x, createBlock as m } from "vue";
3
- import { u as f } from "./hooks-BaG7l8K5.js";
4
- import { P as w } from "./Icon-DpJyuj7c.js";
3
+ import { u as f } from "./hooks-pU4JmsO3.js";
4
+ import { P as w } from "./Icon-D6qRB3pq.js";
5
5
  const k = ["aria-checked", "id", "name", "disabled", "checked"], _ = { class: "px-switch__core" }, y = { class: "px-switch__core-inner" }, b = { key: 0, class: "px-switch__core-inner-text" }, V = { class: "px-switch__core-action" }, C = c(i({ name: "PxSwitch", inheritAttrs: false, __name: "Switch", props: { modelValue: { type: [Boolean, String, Number] }, disabled: { type: Boolean }, activeText: {}, inactiveText: {}, activeValue: { type: [Boolean, String, Number], default: true }, inactiveValue: { type: [Boolean, String, Number], default: false }, name: {}, id: {}, size: {}, type: {}, activeColor: {}, inactiveColor: {}, activeIcon: {}, inactiveIcon: {} }, emits: ["update:modelValue", "change"], setup(c2, { expose: i2, emit: C2 }) {
6
6
  const T = c2, g = C2, I = a((() => T.disabled)), S = t(T.modelValue), z = t(), B = f().value, j = a((() => S.value === T.activeValue)), N = a((() => j.value ? T.activeIcon : T.inactiveIcon)), P = a((() => {
7
7
  const c3 = {};
@@ -0,0 +1,10 @@
1
+ import { w as e } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as o, computed as s, createElementBlock as t, openBlock as a, normalizeClass as l, createElementVNode as p, renderSlot as i } from "vue";
3
+ const r = { class: "px-table__inner" }, n = ["xs", "sm", "md", "lg", "xl"], b = e(o({ name: "PxTable", __name: "Table", props: { type: {}, zebra: { type: Boolean }, hover: { type: Boolean }, border: { type: Boolean }, stripe: { type: Boolean }, pinRows: { type: Boolean }, pinCols: { type: Boolean }, size: { default: "md" }, showHeader: { type: Boolean, default: true }, outline: { type: Boolean }, ghost: { type: Boolean }, hoverable: { type: Boolean } }, setup(e2) {
4
+ const o2 = e2, n2 = s((() => o2.zebra || o2.stripe)), b2 = s((() => ({ "px-table": true, [`px-table--${o2.size}`]: o2.size, [`px-table--${o2.type}`]: o2.type, "is-zebra": n2.value, "is-hover": o2.hover, "is-border": o2.border, "is-pin-rows": o2.pinRows, "is-pin-cols": o2.pinCols, "is-hide-header": !o2.showHeader, "is-outline": o2.outline, "is-ghost": o2.ghost, "is-hoverable": o2.hoverable })));
5
+ return (e3, o3) => (a(), t("div", { class: l(b2.value) }, [p("div", r, [i(e3.$slots, "default")])], 2));
6
+ } }));
7
+ export {
8
+ b as P,
9
+ n as t
10
+ };
@@ -0,0 +1,74 @@
1
+ import { b as e, _ as t, w as a } from "./utils-BXICIEsD.js";
2
+ import { onMounted as o, watch as l, onUnmounted as i, defineComponent as r, ref as n, computed as u, watchEffect as s, createElementBlock as c, openBlock as v, mergeProps as p, toHandlers as d, renderSlot as f, createVNode as m, unref as g, Transition as h, withCtx as y, createCommentVNode as x, createTextVNode as _, toDisplayString as b } from "vue";
3
+ import { createPopper as k } from "@popperjs/core";
4
+ import { u as T, c as w } from "./hooks-pU4JmsO3.js";
5
+ import { H as B, f as $, E as j, v as W } from "./vendor-DrBJKLFW.js";
6
+ const A = ["aria-describedby"], E = ["id"], L = { key: 0, class: "px-tooltip__arrow", "data-popper-arrow": "" }, N = t(r({ name: "PxTooltip", __name: "Tooltip", props: { content: {}, trigger: { default: "hover" }, placement: { default: "bottom" }, manual: { type: Boolean }, disabled: { type: Boolean }, popperOptions: {}, transition: { default: "fade" }, showTimeout: { default: 0 }, hideTimeout: { default: 200 }, virtualRef: {}, virtualTriggering: { type: Boolean }, effect: { default: "dark" }, type: {}, enterable: { type: Boolean, default: true }, maxWidth: {}, showArrow: { type: Boolean } }, emits: ["visible-change", "click-outside"], setup(t2, { expose: a2, emit: r2 }) {
7
+ const N2 = t2, R2 = r2, O = n(false), P = T("px-tooltip"), D = n({}), H = n({}), I = n({}), M = n(), q = n(), z = n(), C = u((() => N2.virtualTriggering ? N2.virtualRef : z.value)), F = u((() => ({ placement: N2.placement, modifiers: [{ name: "offset", options: { offset: [0, 9] } }], ...N2.popperOptions }))), G = u((() => "hover" === N2.trigger ? N2.showTimeout : 0)), J = u((() => "hover" === N2.trigger ? N2.hideTimeout : 0)), K = u((() => N2.maxWidth ? { maxWidth: e(N2.maxWidth) } : {}));
8
+ let Q, S, U;
9
+ function V() {
10
+ S == null ? void 0 : S.cancel(), Q == null ? void 0 : Q();
11
+ }
12
+ function X() {
13
+ Q == null ? void 0 : Q.cancel(), S == null ? void 0 : S();
14
+ }
15
+ function Y() {
16
+ O.value ? X() : V();
17
+ }
18
+ function Z(e2) {
19
+ N2.disabled || (O.value = e2, R2("visible-change", e2));
20
+ }
21
+ function ee() {
22
+ if (!N2.disabled && !N2.manual) return "hover" === N2.trigger ? (D.value.mouseenter = V, H.value.mouseleave = X, void (N2.enterable && (I.value.mouseenter = V))) : void ("click" !== N2.trigger ? "contextmenu" !== N2.trigger || (D.value.contextmenu = (e2) => {
23
+ e2.preventDefault(), V();
24
+ }) : D.value.click = Y);
25
+ }
26
+ function te() {
27
+ U == null ? void 0 : U.destroy(), U = null;
28
+ }
29
+ function ae() {
30
+ D.value = {}, H.value = {}, I.value = {}, ee();
31
+ }
32
+ const oe = V, le = () => {
33
+ Q == null ? void 0 : Q.cancel(), Z(false);
34
+ };
35
+ return l(O, ((e2) => {
36
+ e2 && C.value && q.value && (U = k(C.value, q.value, F.value));
37
+ }), { flush: "post" }), l((() => N2.manual), ((e2) => {
38
+ e2 ? ae() : ee();
39
+ })), l((() => N2.trigger), (() => {
40
+ Q == null ? void 0 : Q.cancel(), O.value = false, R2("visible-change", false), ae();
41
+ })), s((() => {
42
+ N2.manual || ee(), Q == null ? void 0 : Q.cancel(), S == null ? void 0 : S.cancel(), Q = j(W(Z, null, true), G.value), S = j(W(Z, null, false), J.value);
43
+ })), w(M, (() => {
44
+ R2("click-outside"), "hover" === N2.trigger || N2.manual || O.value && X();
45
+ })), (function(e2, t3, a3) {
46
+ let r3, n2;
47
+ const u2 = /* @__PURE__ */ new Map(), s2 = () => {
48
+ const e3 = t3.value;
49
+ e3 && B(e3) && $(a3.value, ((t4, a4) => {
50
+ u2.set(a4, t4), e3.addEventListener(a4, t4);
51
+ }));
52
+ }, c2 = (e3) => {
53
+ const a4 = e3 ?? t3.value;
54
+ a4 && B(a4) && $(["mouseenter", "click", "contextmenu"], ((e4) => u2.has(e4) && a4.removeEventListener(e4, u2.get(e4))));
55
+ };
56
+ o((() => {
57
+ n2 = l((() => e2.virtualRef), ((t4, a4) => {
58
+ e2.virtualTriggering && (B(a4) && c2(a4), B(t4) && s2());
59
+ }), { immediate: true }), r3 = l(a3, (() => {
60
+ e2.virtualTriggering && (c2(), s2(), Q == null ? void 0 : Q.cancel(), Z(false));
61
+ }), { deep: true });
62
+ })), i((() => {
63
+ r3 == null ? void 0 : r3(), n2 == null ? void 0 : n2();
64
+ }));
65
+ })(N2, C, D), i((() => {
66
+ te(), Q == null ? void 0 : Q.cancel(), S == null ? void 0 : S.cancel();
67
+ })), a2({ show: oe, hide: le, toggle: () => {
68
+ O.value ? le() : oe();
69
+ } }), (e2, t3) => (v(), c("div", p({ class: ["px-tooltip", [`px-tooltip--${e2.effect}`, e2.type && `px-tooltip--${e2.type}`]], ref_key: "containerNode", ref: M }, d(H.value, true)), [e2.virtualTriggering ? f(e2.$slots, "default", { key: 1 }, void 0, true) : (v(), c("div", p({ key: 0, class: "px-tooltip__trigger", ref_key: "_triggerNode", ref: z }, d(D.value, true), { "aria-describedby": O.value ? g(P) : void 0 }), [f(e2.$slots, "default", {}, void 0, true)], 16, A)), m(h, { name: e2.transition, onAfterLeave: te }, { default: y((() => [O.value ? (v(), c("div", p({ key: 0, class: "px-tooltip__popper", ref_key: "popperNode", ref: q }, d(I.value, true), { id: g(P), style: K.value, role: "tooltip" }), [f(e2.$slots, "content", {}, (() => [_(b(e2.content), 1)]), true), e2.showArrow ? (v(), c("div", L)) : x("", true)], 16, E)) : x("", true)])), _: 3 }, 8, ["name"])], 16));
70
+ } }), [["__scopeId", "data-v-d982dfd2"]]), R = a(N);
71
+ export {
72
+ R as P,
73
+ N as T
74
+ };
@@ -0,0 +1,40 @@
1
+ import { _ as e, w as s } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as a, ref as t, watch as r, provide as i, reactive as l, toRefs as o, createElementBlock as n, openBlock as d, normalizeClass as u, createElementVNode as c, renderSlot as v, toDisplayString as m } from "vue";
3
+ import { z as g } from "zod";
4
+ import { F as f } from "./Form-B_XDnSjK.js";
5
+ const p = { class: "px-validator__content" }, h = { class: "px-validator__hint-text" }, _ = s(e(a({ name: "PxValidator", __name: "Validator", props: { modelValue: {}, rules: { default: () => [] } }, emits: ["validate"], setup(e2, { expose: s2, emit: a2 }) {
6
+ const _2 = e2, x = a2, V = t("init"), I = t("");
7
+ function y(e3) {
8
+ const s3 = _2.rules ?? [];
9
+ return e3 ? s3.filter(((s4) => !s4.trigger || (Array.isArray(s4.trigger) ? s4.trigger.includes(e3) : s4.trigger === e3))) : s3;
10
+ }
11
+ async function P(e3) {
12
+ var _a;
13
+ for (const s3 of e3) {
14
+ let e4 = s3.schema ?? null;
15
+ if (!e4 && s3.required && (e4 = g.string({ message: s3.message ?? "This field is required" }).min(1, s3.message ?? "This field is required")), !e4) continue;
16
+ const a3 = e4.safeParse(_2.modelValue);
17
+ if (!a3.success) {
18
+ const e5 = s3.message ?? ((_a = a3.error.issues[0]) == null ? void 0 : _a.message) ?? "Validation failed";
19
+ return V.value = "error", I.value = e5, x("validate", false, e5), Promise.reject(e5);
20
+ }
21
+ }
22
+ return V.value = "success", I.value = "", x("validate", true, ""), true;
23
+ }
24
+ const j = async (e3) => {
25
+ const s3 = y(e3);
26
+ return !s3.length || P(s3);
27
+ }, q = () => {
28
+ V.value = "init", I.value = "";
29
+ };
30
+ return r((() => _2.modelValue), (() => {
31
+ const e3 = y("change");
32
+ e3.length && P(e3).catch((() => {
33
+ }));
34
+ })), s2({ validate: j, reset: q, validateStatus: V, validateMessage: I }), i(f, l({ ...o(_2), validate: (e3) => j(e3).catch((() => false)), resetField: q, clearValidate: q, addInputId: () => {
35
+ }, removeInputId: () => {
36
+ } })), (e3, s3) => (d(), n("div", { class: u(["px-validator", { "is-error": "error" === V.value, "is-success": "success" === V.value }]) }, [c("div", p, [v(e3.$slots, "default", {}, void 0, true)]), c("div", { class: u(["px-validator__hint", { "is-hidden": "error" !== V.value }]) }, [v(e3.$slots, "hint", { message: I.value }, (() => [c("span", h, m(I.value), 1)]), true)], 2)], 2));
37
+ } }), [["__scopeId", "data-v-9c099378"]]));
38
+ export {
39
+ _ as P
40
+ };