sakana-element 2.4.2 → 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.
Files changed (137) hide show
  1. package/dist/es/Alert-Bh6HeGRU.js +57 -0
  2. package/dist/es/Avatar-NF4bQN7G.js +5 -0
  3. package/dist/es/Badge-CHgxCwjo.js +7 -0
  4. package/dist/es/Breadcrumb-lEWE4Gu6.js +6 -0
  5. package/dist/es/Button-BM129Q7H.js +28 -0
  6. package/dist/es/Card-DAAF5q-g.js +8 -0
  7. package/dist/es/Carousel-Cc98Eg3m.js +11 -0
  8. package/dist/es/ChatBubble-DvRSjkcV.js +5 -0
  9. package/dist/es/Checkbox-WwH8lZhh.js +228 -0
  10. package/dist/es/Collapse-CR_RWE5e.js +11 -0
  11. package/dist/es/Collapsible-BHg6BxmU.js +12 -0
  12. package/dist/es/Command-DM1kXZ6n.js +45 -0
  13. package/dist/es/ConfigProvider-Bfp86-Oj.js +35 -0
  14. package/dist/es/Diff-Cs62zIBX.js +17 -0
  15. package/dist/es/Divider-Yq-jZAD6.js +5 -0
  16. package/dist/es/Drawer-DTIUkiIQ.js +6 -0
  17. package/dist/es/Dropdown-uSRkAnxr.js +115 -0
  18. package/dist/es/FileInput-rT_BAYOK.js +113 -0
  19. package/dist/es/Filter-pj4lwoJ3.js +13 -0
  20. package/dist/es/Icon-DXRJjblp.js +3 -0
  21. package/dist/es/Indicator-BeFoSuXk.js +5 -0
  22. package/dist/es/Input-DL5clGaQ.js +8 -0
  23. package/dist/es/Kbd-BK_mWOUQ.js +5 -0
  24. package/dist/es/Link-t_r2AmyI.js +5 -0
  25. package/dist/es/Loading-CfMeogGy.js +27 -0
  26. package/dist/es/Message-DVd-37vE.js +51 -0
  27. package/dist/es/Notification-DzFscVIb.js +22 -0
  28. package/dist/es/Pixelate-CnY7ulip.js +12 -0
  29. package/dist/es/Popconfirm-BeIJD0c1.js +8 -0
  30. package/dist/es/Progress-DkjXY0in.js +6 -0
  31. package/dist/es/Radio-BEFq7s6x.js +11 -0
  32. package/dist/es/Resizable-CiWcvscr.js +59 -0
  33. package/dist/es/Select-_AakAT4E.js +31 -0
  34. package/dist/es/Skeleton-HaEvHu7t.js +7 -0
  35. package/dist/es/Switch-DTwoMkmG.js +11 -0
  36. package/dist/es/Table-CtnNz-I3.js +5 -0
  37. package/dist/es/Tooltip-C3XS2Ue8.js +4 -0
  38. package/dist/es/Validator-B_i9IpaG.js +16 -0
  39. package/dist/es/index.js +41 -140
  40. package/dist/index.css +2 -1
  41. package/dist/theme/Alert.css +1 -295
  42. package/dist/theme/Avatar.css +1 -86
  43. package/dist/theme/Badge.css +1 -214
  44. package/dist/theme/Breadcrumb.css +1 -192
  45. package/dist/theme/Button.css +1 -1570
  46. package/dist/theme/Card.css +1 -347
  47. package/dist/theme/Carousel.css +1 -0
  48. package/dist/theme/ChatBubble.css +1 -218
  49. package/dist/theme/Checkbox.css +1 -604
  50. package/dist/theme/Collapse.css +1 -764
  51. package/dist/theme/Collapsible.css +1 -0
  52. package/dist/theme/Command.css +1 -0
  53. package/dist/theme/Diff.css +1 -110
  54. package/dist/theme/Divider.css +1 -150
  55. package/dist/theme/Drawer.css +1 -206
  56. package/dist/theme/Dropdown.css +1 -471
  57. package/dist/theme/FileInput.css +1 -397
  58. package/dist/theme/Filter.css +1 -598
  59. package/dist/theme/Indicator.css +1 -159
  60. package/dist/theme/Input.css +1 -647
  61. package/dist/theme/Kbd.css +1 -104
  62. package/dist/theme/Link.css +1 -69
  63. package/dist/theme/Loading.css +1 -266
  64. package/dist/theme/Message.css +1 -565
  65. package/dist/theme/Notification.css +1 -316
  66. package/dist/theme/Popconfirm.css +1 -46
  67. package/dist/theme/Progress.css +1 -278
  68. package/dist/theme/Radio.css +1 -492
  69. package/dist/theme/Resizable.css +1 -95
  70. package/dist/theme/Select.css +1 -584
  71. package/dist/theme/Skeleton.css +1 -192
  72. package/dist/theme/Switch.css +1 -323
  73. package/dist/theme/Table.css +1 -680
  74. package/dist/theme/Validator.css +1 -25
  75. package/dist/theme/index.css +1 -341
  76. package/dist/types/components/Badge/types.d.ts +2 -0
  77. package/dist/types/components/Carousel/constants.d.ts +6 -0
  78. package/dist/types/components/Carousel/index.d.ts +77 -0
  79. package/dist/types/components/Carousel/types.d.ts +27 -0
  80. package/dist/types/components/Collapsible/constants.d.ts +6 -0
  81. package/dist/types/components/Collapsible/index.d.ts +85 -0
  82. package/dist/types/components/Collapsible/types.d.ts +22 -0
  83. package/dist/types/components/Command/constants.d.ts +4 -0
  84. package/dist/types/components/Command/index.d.ts +216 -0
  85. package/dist/types/components/Command/types.d.ts +59 -0
  86. package/dist/types/components/Validator/index.d.ts +1 -0
  87. package/dist/types/components/index.d.ts +3 -0
  88. package/dist/types/hooks/index.d.ts +1 -1
  89. package/dist/umd/index.css +2 -1
  90. package/dist/umd/index.css.gz +0 -0
  91. package/dist/umd/index.umd.cjs +1255 -5
  92. package/dist/umd/index.umd.cjs.gz +0 -0
  93. package/package.json +1 -2
  94. package/dist/es/Alert-DdAShH-x.js +0 -19
  95. package/dist/es/Avatar-BGTH7x40.js +0 -9
  96. package/dist/es/Badge-CYZ55qNe.js +0 -14
  97. package/dist/es/Breadcrumb-BTWTtzrN.js +0 -15
  98. package/dist/es/Button-GsSCWg5x.js +0 -24
  99. package/dist/es/Card-BhgzwQqo.js +0 -16
  100. package/dist/es/ChatBubble-4F481Agj.js +0 -9
  101. package/dist/es/Checkbox-C7vZGSTh.js +0 -51
  102. package/dist/es/Collapse-CbcSQig5.js +0 -53
  103. package/dist/es/ConfigProvider-K1UzjlRm.js +0 -45
  104. package/dist/es/Diff-B747pgwb.js +0 -64
  105. package/dist/es/Divider-BSu_1-AU.js +0 -9
  106. package/dist/es/Drawer-I2lCgyba.js +0 -40
  107. package/dist/es/Dropdown-B0J_c8Wv.js +0 -104
  108. package/dist/es/FileInput-CFg1wpsH.js +0 -33
  109. package/dist/es/Filter-nA8j-62U.js +0 -40
  110. package/dist/es/Form-C1b8Igns.js +0 -123
  111. package/dist/es/Icon-BulvH9Wm.js +0 -27
  112. package/dist/es/Indicator-BbW4iUkh.js +0 -9
  113. package/dist/es/Input-BUHFulIW.js +0 -42
  114. package/dist/es/Kbd-CeP2wkdE.js +0 -13
  115. package/dist/es/Link-Dks2bXo8.js +0 -11
  116. package/dist/es/Loading-DoBtVGWo.js +0 -92
  117. package/dist/es/Message-Ba_P4Wvy.js +0 -152
  118. package/dist/es/Notification-DzG8dLuk.js +0 -69
  119. package/dist/es/Overlay-DeyTycv0.js +0 -12
  120. package/dist/es/Pixelate-B21HKbSE.js +0 -39
  121. package/dist/es/Popconfirm-BqN3JxJ_.js +0 -23
  122. package/dist/es/Progress--6EJjbbM.js +0 -12
  123. package/dist/es/Radio-CrdrvrFH.js +0 -33
  124. package/dist/es/Resizable-By3ijQf0.js +0 -151
  125. package/dist/es/Select-Cq1Ucs_U.js +0 -133
  126. package/dist/es/Skeleton-ChCVgMSk.js +0 -15
  127. package/dist/es/Switch-DURmSH-T.js +0 -34
  128. package/dist/es/Table-BE2f9u65.js +0 -10
  129. package/dist/es/Tooltip-DR4Mc5Fh.js +0 -74
  130. package/dist/es/Validator-BYn72MYn.js +0 -40
  131. package/dist/es/hooks-dJGu-5DG.js +0 -170
  132. package/dist/es/utils-CnCdZsHG.js +0 -155
  133. package/dist/es/vendor-eombfMkP.js +0 -1351
  134. package/dist/theme/Form.css +0 -83
  135. package/dist/theme/Icon.css +0 -168
  136. package/dist/theme/Overlay.css +0 -12
  137. package/dist/theme/Tooltip.css +0 -235
@@ -1,133 +0,0 @@
1
- import { R as e, _ as l, c as t, r as a, w as o } from "./utils-CnCdZsHG.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 B, renderList as L, createBlock as D, mergeProps as z } from "vue";
3
- import { B as $, C as j, g as C, b as F, s as R, e as E, D as H, E as P, f as W, x as A, p as N, i as T, F as U, c as q } from "./vendor-eombfMkP.js";
4
- import { g as K, u as G, e as J, c as Q } from "./hooks-dJGu-5DG.js";
5
- import { P as X } from "./Icon-BulvH9Wm.js";
6
- import { _ as Y } from "./Input-BUHFulIW.js";
7
- import { T as Z } from "./Tooltip-DR4Mc5Fh.js";
8
- const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options: { offset: [0, 9] } }, { name: "sameWidth", enabled: true, fn: ({ state: e2 }) => {
9
- e2.styles.popper.width = `${e2.rects.reference.width}px`;
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) {
11
- const t2 = l2, a2 = s(ee), o2 = n((() => {
12
- var _a;
13
- return ((_a = a2 == null ? void 0 : a2.selectStates.selectedOption) == null ? void 0 : _a.value) === t2.value;
14
- })), i2 = n((() => $(["label", "value"], ((e2) => j(C(a2, ["highlightedLine", "value", e2]), C(t2, e2))))));
15
- function f2() {
16
- t2.disabled || (a2 == null ? void 0 : a2.handleSelect(t2));
17
- }
18
- return (l3, s2) => (r(), u("li", { role: "option", "aria-selected": o2.value, class: c(["px-select__menu-item", { "is-disabled": l3.disabled, "is-selected": o2.value, "is-highlighted": i2.value }]), id: `select-item-${l3.value}`, onClick: d(f2, ["stop"]) }, [p(l3.$slots, "default", {}, (() => {
19
- var _a, _b;
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
- }), true)], 10, oe));
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
- const i2 = K(), 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
- if (!be.value) return {};
25
- const e3 = t(s2.color), l3 = s2.ghost ? "ghost" : "default";
26
- return a(e3, "px-select", ae[l3]);
27
- })), ye = n((() => {
28
- var _a;
29
- return F((_a = $2 == null ? void 0 : $2.default) == null ? void 0 : _a.call($2), ((e3) => j(e3.type, ie)));
30
- })), _e = n((() => R(ye.value) > 0)), Ve = n((() => s2.clearable && fe.mouseHover && "" !== fe.inputValue)), we = n((() => {
31
- let e3;
32
- return e3 = _e.value ? [...ce.value.values()][fe.highlightedIndex] : pe.value[fe.highlightedIndex], e3;
33
- })), Ie = n((() => _e.value ? E(ye.value, ((e3) => {
34
- var _a, _b, _c;
35
- return { props: { ...e3.props, disabled: true === ((_a = e3.props) == null ? void 0 : _a.disabled) || !T((_b = e3.props) == null ? void 0 : _b.disabled) && !U((_c = e3.props) == null ? void 0 : _c.disabled) } };
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)), Be = n((() => s2.remote ? 300 : 100));
37
- let Le = H(Te, Be.value);
38
- b((() => {
39
- Le.cancel(), Le = H(Te, Be.value);
40
- }));
41
- const De = G().value, { wrapperRef: ze, isFocused: $e, handleBlur: je, handleFocus: Ce } = J(de2), Fe = (function({ isDropdownVisible: e3, controlVisible: l3, selectStates: t2, highlightedLine: a2, handleSelect: o3, hasData: i3, lastIndex: s3 }) {
42
- const n2 = /* @__PURE__ */ new Map();
43
- return n2.set("Enter", (() => {
44
- e3.value && t2.highlightedIndex >= 0 && a2.value && o3(a2.value), l3(!e3.value);
45
- })), n2.set("Escape", (() => e3.value && l3(!e3.value))), n2.set("ArrowUp", ((e4) => {
46
- e4.preventDefault(), i3.value && (-1 !== t2.highlightedIndex && 0 !== t2.highlightedIndex ? t2.highlightedIndex-- : t2.highlightedIndex = s3.value);
47
- })), n2.set("ArrowDown", ((e4) => {
48
- e4.preventDefault(), i3.value && (-1 !== t2.highlightedIndex && t2.highlightedIndex !== s3.value ? t2.highlightedIndex++ : t2.highlightedIndex = 0);
49
- })), n2;
50
- })({ isDropdownVisible: he, controlVisible: Ee, selectStates: fe, highlightedLine: we, handleSelect: Ae, hasData: Me, lastIndex: Se });
51
- function Re(e3) {
52
- $e.value && x((() => je(new FocusEvent("focus", e3))));
53
- }
54
- function Ee(e3) {
55
- var _a;
56
- re2.value && ((_a = C(re2, ["value", e3 ? "show" : "hide"])) == null ? void 0 : _a(), s2.filterable && (function(e4) {
57
- var _a2;
58
- s2.filterable && (e4 ? (fe.selectedOption && (fe.inputValue = ""), Le()) : fe.inputValue = ((_a2 = fe.selectedOption) == null ? void 0 : _a2.label) || "");
59
- })(e3), he.value = e3, p2("visible-change", e3), fe.highlightedIndex = -1);
60
- }
61
- function He() {
62
- me.value || Ee(!he.value);
63
- }
64
- function Pe() {
65
- var _a;
66
- (_a = de2.value) == null ? void 0 : _a.clear(), fe.inputValue = "", fe.selectedOption = null, p2("clear"), W(["change", "update:modelValue"], ((e3) => p2(e3, "")));
67
- }
68
- function We(e3) {
69
- return P(s2.options, ((l3) => l3.value === e3));
70
- }
71
- function Ae(e3) {
72
- var _a;
73
- e3.disabled || (fe.inputValue = e3.label, fe.selectedOption = e3, W(["change", "update:modelValue"], ((l3) => p2(l3, e3.value))), Ee(false), (_a = de2.value) == null ? void 0 : _a.focus());
74
- }
75
- function Ne(e3) {
76
- ce.value.clear(), W(e3, ((e4) => {
77
- ce.value.set(e4.props.value, e4.props);
78
- }));
79
- }
80
- function Te() {
81
- const e3 = fe.inputValue;
82
- fe.highlightedIndex = -1, _e.value ? (async function(e4) {
83
- if (s2.filterable) {
84
- if (s2.remote && s2.remoteMethod && A(s2.remoteMethod)) return await qe(s2.remoteMethod, e4), void Ne(Ie.value);
85
- if (s2.filterMethod && A(s2.filterMethod)) {
86
- const l3 = E(s2.filterMethod(e4), "value");
87
- Ne(F(Ie.value, ((e5) => q(l3, C(e5, ["props", "value"])))));
88
- } else Ne(F(Ie.value, ((l3) => q(C(l3, ["props", "label"]), e4))));
89
- }
90
- })(e3) : (async function(e4) {
91
- s2.filterable && (s2.remote && s2.remoteMethod && A(s2.remoteMethod) ? pe.value = await qe(s2.remoteMethod, e4) : s2.filterMethod && A(s2.filterMethod) ? pe.value = s2.filterMethod(e4) : pe.value = F(s2.options, ((l3) => q(l3.label, e4))));
92
- })(e3);
93
- }
94
- function Ue(e3) {
95
- var _a;
96
- Fe.has(e3.key) && ((_a = Fe.get(e3.key)) == null ? void 0 : _a(e3));
97
- }
98
- async function qe(e3, l3) {
99
- if (!e3 || !A(e3)) return;
100
- let t2;
101
- fe.loading = true;
102
- try {
103
- t2 = await e3(l3);
104
- } catch (e4) {
105
- t2 = [];
106
- }
107
- return t2;
108
- }
109
- function Ke() {
110
- const e3 = We(s2.modelValue);
111
- e3 && (fe.inputValue = e3.label, fe.selectedOption = e3);
112
- }
113
- return Q(oe2, ((e3) => Re(e3))), y((() => s2.options), ((e3) => {
114
- pe.value = e3 ?? [];
115
- })), y((() => Ie.value), ((e3) => Ne(e3)), { immediate: true }), y((() => s2.modelValue), (() => {
116
- Ke();
117
- })), _((() => {
118
- Ke();
119
- })), V((() => {
120
- Le.cancel();
121
- })), w(ee, { handleSelect: Ae, selectStates: fe, renderLabel: function(e3) {
122
- return A(s2.renderLabel) ? s2.renderLabel(e3) : e3.label;
123
- }, highlightedLine: we }), l2({ focus: () => {
124
- var _a;
125
- (_a = de2.value) == null ? void 0 : _a.focus();
126
- }, blur: () => {
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: 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(Le), onKeydown: Ue }, { suffix: k((() => [Ve.value ? (r(), D(X, { key: 0, icon: "close-box", class: "px-input__clear", onClick: d(Pe, ["stop"]), onMousedown: d(v(N), ["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(B, { key: 1 }, L(ce.value, (([e4, l4]) => (r(), D(ie, z({ key: e4, ref_for: true }, l4), null, 16)))), 128)) : (r(true), u(B, { key: 0 }, L(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
- export {
131
- de as P,
132
- re as a
133
- };
@@ -1,15 +0,0 @@
1
- import { b as e, w as t } from "./utils-CnCdZsHG.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,34 +0,0 @@
1
- import { c as e, w as c } from "./utils-CnCdZsHG.js";
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-dJGu-5DG.js";
4
- import { P as w } from "./Icon-BulvH9Wm.js";
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
- 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
- const c3 = {};
8
- if (T.activeColor) {
9
- const i3 = e(T.activeColor);
10
- c3["--px-switch-on-color"] = i3.color, c3["--px-switch-on-border-color"] = i3.dark;
11
- }
12
- if (T.inactiveColor) {
13
- const i3 = e(T.inactiveColor);
14
- c3["--px-switch-off-color"] = i3.color, c3["--px-switch-off-border-color"] = i3.dark;
15
- }
16
- return c3;
17
- }));
18
- function $() {
19
- if (I.value) return;
20
- const e2 = j.value ? T.inactiveValue : T.activeValue;
21
- S.value = e2, g("update:modelValue", e2), g("change", e2);
22
- }
23
- return o((() => {
24
- z.value.checked = j.value;
25
- })), l(j, ((e2) => {
26
- z.value.checked = e2;
27
- })), i2({ checked: j, focus: () => {
28
- var _a;
29
- (_a = z.value) == null ? void 0 : _a.focus();
30
- } }), (e2, c3) => (n(), s("div", { class: u(["px-switch", { [`px-switch--${e2.size}`]: e2.size, [`px-switch--${e2.type}`]: e2.type, "is-disabled": I.value, "is-checked": j.value }]), style: r(P.value), onClick: $ }, [v("input", { class: "px-switch__input", type: "checkbox", role: "switch", "aria-checked": j.value, ref_key: "inputRef", ref: z, id: p(B), name: e2.name, disabled: I.value, checked: j.value, onKeydown: d($, ["enter"]) }, null, 40, k), v("div", _, [v("div", y, [e2.activeText || e2.inactiveText ? (n(), s("span", b, x(j.value ? e2.activeText : e2.inactiveText), 1)) : h("", true)]), v("div", V, [N.value ? (n(), m(w, { key: 0, class: "px-switch__icon", icon: N.value, size: "xs" }, null, 8, ["icon"])) : h("", true)])])], 6));
31
- } }));
32
- export {
33
- C as P
34
- };
@@ -1,10 +0,0 @@
1
- import { w as e } from "./utils-CnCdZsHG.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
- };
@@ -1,74 +0,0 @@
1
- import { b as e, _ as t, w as a } from "./utils-CnCdZsHG.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 p, mergeProps as v, 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-dJGu-5DG.js";
5
- import { G as B, f as $, D as j, u as W } from "./vendor-eombfMkP.js";
6
- const A = ["aria-describedby"], L = ["id"], N = { key: 0, class: "px-tooltip__arrow", "data-popper-arrow": "" }, R = 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 R2 = t2, D2 = r2, E = n(false), O = T("px-tooltip"), P = n({}), G = n({}), I = n({}), M = n(), q = n(), z = n(), C = u((() => R2.virtualTriggering ? R2.virtualRef : z.value)), F = u((() => ({ placement: R2.placement, modifiers: [{ name: "offset", options: { offset: [0, 9] } }], ...R2.popperOptions }))), H = u((() => "hover" === R2.trigger ? R2.showTimeout : 0)), J = u((() => "hover" === R2.trigger ? R2.hideTimeout : 0)), K = u((() => R2.maxWidth ? { maxWidth: e(R2.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
- E.value ? X() : V();
17
- }
18
- function Z(e2) {
19
- R2.disabled || (E.value = e2, D2("visible-change", e2));
20
- }
21
- function ee() {
22
- if (!R2.disabled && !R2.manual) return "hover" === R2.trigger ? (P.value.mouseenter = V, G.value.mouseleave = X, void (R2.enterable && (I.value.mouseenter = V))) : void ("click" !== R2.trigger ? "contextmenu" !== R2.trigger || (P.value.contextmenu = (e2) => {
23
- e2.preventDefault(), V();
24
- }) : P.value.click = Y);
25
- }
26
- function te() {
27
- U == null ? void 0 : U.destroy(), U = null;
28
- }
29
- function ae() {
30
- P.value = {}, G.value = {}, I.value = {}, ee();
31
- }
32
- const oe = V, le = () => {
33
- Q == null ? void 0 : Q.cancel(), Z(false);
34
- };
35
- return l(E, ((e2) => {
36
- e2 && C.value && q.value && (U = k(C.value, q.value, F.value));
37
- }), { flush: "post" }), l((() => R2.manual), ((e2) => {
38
- e2 ? ae() : ee();
39
- })), l((() => R2.trigger), (() => {
40
- Q == null ? void 0 : Q.cancel(), E.value = false, D2("visible-change", false), ae();
41
- })), s((() => {
42
- R2.manual || ee(), Q == null ? void 0 : Q.cancel(), S == null ? void 0 : S.cancel(), Q = j(W(Z, null, true), H.value), S = j(W(Z, null, false), J.value);
43
- })), w(M, (() => {
44
- D2("click-outside"), "hover" === R2.trigger || R2.manual || E.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
- })(R2, C, P), i((() => {
66
- te(), Q == null ? void 0 : Q.cancel(), S == null ? void 0 : S.cancel();
67
- })), a2({ show: oe, hide: le, toggle: () => {
68
- E.value ? le() : oe();
69
- } }), (e2, t3) => (p(), c("div", v({ class: ["px-tooltip", [`px-tooltip--${e2.effect}`, e2.type && `px-tooltip--${e2.type}`]], ref_key: "containerNode", ref: M }, d(G.value, true)), [e2.virtualTriggering ? f(e2.$slots, "default", { key: 1 }, void 0, true) : (p(), c("div", v({ key: 0, class: "px-tooltip__trigger", ref_key: "_triggerNode", ref: z }, d(P.value, true), { "aria-describedby": E.value ? g(O) : void 0 }), [f(e2.$slots, "default", {}, void 0, true)], 16, A)), m(h, { name: e2.transition, onAfterLeave: te }, { default: y((() => [E.value ? (p(), c("div", v({ key: 0, class: "px-tooltip__popper", ref_key: "popperNode", ref: q }, d(I.value, true), { id: g(O), style: K.value, role: "tooltip" }), [f(e2.$slots, "content", {}, (() => [_(b(e2.content), 1)]), true), e2.showArrow ? (p(), c("div", N)) : x("", true)], 16, L)) : x("", true)])), _: 3 }, 8, ["name"])], 16));
70
- } }), [["__scopeId", "data-v-d982dfd2"]]), D = a(R);
71
- export {
72
- D as P,
73
- R as T
74
- };
@@ -1,40 +0,0 @@
1
- import { _ as e, w as s } from "./utils-CnCdZsHG.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-C1b8Igns.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
- };
@@ -1,170 +0,0 @@
1
- import { isRef as e, watch as t, onMounted as n, onBeforeUnmount as o, unref as a, getCurrentInstance as l, useSlots as r, watchEffect as u, ref as s, inject as i, computed as c, onUnmounted as d } from "vue";
2
- import { f as m, x as v, k as f, y as p, H as h, a as g } from "./vendor-eombfMkP.js";
3
- function E(l2, r2, u2) {
4
- e(l2) ? t(l2, ((e2, t2) => {
5
- null == t2 || t2.removeEventListener(r2, u2), null == e2 || e2.addEventListener(r2, u2);
6
- })) : n((() => null == l2 ? void 0 : l2.addEventListener(r2, u2))), o((() => {
7
- var e2;
8
- return null == (e2 = a(l2)) ? void 0 : e2.removeEventListener(r2, u2);
9
- }));
10
- }
11
- function L(e2, t2) {
12
- E(document, "click", ((n2) => {
13
- e2.value && n2.target && (e2.value.contains(n2.target) || t2(n2));
14
- }));
15
- }
16
- const w = (e2, t2) => m(e2, ((e3) => {
17
- v(t2) && t2(e3), e3.children && w(e3.children, t2);
18
- }));
19
- function y() {
20
- var e2, t2;
21
- const n2 = /* @__PURE__ */ new Map(), o2 = l(), a2 = null == (t2 = null == (e2 = r()) ? void 0 : e2.default) ? void 0 : t2.call(e2);
22
- u((() => {
23
- (null == o2 ? void 0 : o2.props.disabled) ? w(a2 ?? [], ((e3) => {
24
- (null == e3 ? void 0 : e3.props) && (n2.set(e3, f(e3.props)), e3.props = p(null == e3 ? void 0 : e3.props, { style: { cursor: "not-allowed", color: "var(--px-text-color-placeholder)" } }));
25
- })) : w(a2 ?? [], ((e3) => {
26
- n2.has(e3) && (e3.props = n2.get(e3));
27
- }));
28
- }));
29
- }
30
- function x(e2, n2, a2 = {}) {
31
- let l2 = 0, r2 = 0, u2 = 0, s2 = 0, i2 = false;
32
- function c2(e3) {
33
- 0 === e3.button && (i2 = true, u2 = e3.clientX - l2, s2 = e3.clientY - r2, document.addEventListener("mousemove", d2), document.addEventListener("mouseup", m2), e3.preventDefault());
34
- }
35
- function d2(t2) {
36
- if (!i2) return;
37
- const n3 = e2.value;
38
- if (!n3) return;
39
- let o2 = t2.clientX - u2, c3 = t2.clientY - s2;
40
- if (a2.constrainToViewport) {
41
- const e3 = n3.getBoundingClientRect(), t3 = document.documentElement.clientWidth, a3 = document.documentElement.clientHeight, u3 = e3.left - l2, s3 = e3.top - r2, i3 = -u3, d3 = t3 - u3 - e3.width, m3 = -s3, v3 = a3 - s3 - e3.height;
42
- o2 = Math.max(i3, Math.min(d3, o2)), c3 = Math.max(m3, Math.min(v3, c3));
43
- }
44
- l2 = o2, r2 = c3, n3.style.transform = `translate(${l2}px, ${r2}px)`;
45
- }
46
- function m2() {
47
- i2 = false, document.removeEventListener("mousemove", d2), document.removeEventListener("mouseup", m2);
48
- }
49
- function v2(e3) {
50
- null == e3 || e3.removeEventListener("mousedown", c2);
51
- }
52
- return t(n2, ((e3, t2) => {
53
- var n3;
54
- v2(t2), i2 && (i2 = false, document.removeEventListener("mousemove", d2), document.removeEventListener("mouseup", m2)), null == (n3 = e3) || n3.addEventListener("mousedown", c2);
55
- }), { immediate: true }), o((() => {
56
- v2(n2.value), document.removeEventListener("mousemove", d2), document.removeEventListener("mouseup", m2);
57
- })), { reset: function() {
58
- const t2 = e2.value;
59
- l2 = 0, r2 = 0, t2 && (t2.style.transform = "");
60
- } };
61
- }
62
- function k(e2, { afterBlur: t2, beforeBlur: n2, afterFocus: o2 } = {}) {
63
- const a2 = l(), { emit: r2 } = a2, u2 = s(), i2 = s(false);
64
- return E(u2, "click", (() => {
65
- var t3;
66
- null == (t3 = e2.value) || t3.focus();
67
- })), { wrapperRef: u2, isFocused: i2, handleFocus: (e3) => {
68
- i2.value || (i2.value = true, r2("focus", e3), null == o2 || o2());
69
- }, handleBlur: (e3) => {
70
- var o3;
71
- v(n2) && n2(e3) || e3.relatedTarget && (null == (o3 = u2.value) ? void 0 : o3.contains(e3.relatedTarget)) || (i2.value = false, r2("blur", e3), null == t2 || t2());
72
- } };
73
- }
74
- const b = ["a[href]", "button:not([disabled])", "input:not([disabled])", "textarea:not([disabled])", "select:not([disabled])", '[tabindex]:not([tabindex="-1"])'].join(", ");
75
- function M(e2) {
76
- let t2 = null, n2 = false;
77
- function a2(t3) {
78
- if (!n2 || "Tab" !== t3.key) return;
79
- const o2 = e2.value;
80
- if (!o2) return;
81
- const a3 = Array.from(o2.querySelectorAll(b)).filter(((e3) => null !== e3.offsetParent));
82
- if (0 === a3.length) return void t3.preventDefault();
83
- const l3 = a3[0], r2 = a3[a3.length - 1];
84
- t3.shiftKey ? document.activeElement !== l3 && o2.contains(document.activeElement) || (t3.preventDefault(), r2.focus()) : document.activeElement !== r2 && o2.contains(document.activeElement) || (t3.preventDefault(), l3.focus());
85
- }
86
- function l2() {
87
- n2 && (n2 = false, document.removeEventListener("keydown", a2), t2 && "function" == typeof t2.focus && t2.focus(), t2 = null);
88
- }
89
- return o((() => {
90
- l2();
91
- })), { activate: function() {
92
- n2 || (t2 = document.activeElement, n2 = true, document.addEventListener("keydown", a2));
93
- }, deactivate: l2 };
94
- }
95
- const D = { prefix: Math.floor(1e4 * Math.random()), current: 0 };
96
- function T(e2 = "er") {
97
- const t2 = `${e2}-${D.prefix}-${D.current++}`;
98
- return s(t2);
99
- }
100
- const B = { name: "en", el: { select: { loading: "Loading", noMatch: "No matching data", noData: "No data", placeholder: "Select" }, dropdown: { toggleDropdown: "Toggle Dropdown" }, messagebox: { title: "Message", confirm: "OK", cancel: "Cancel", error: "Illegal input", close: "Close this dialog" }, popconfirm: { confirmButtonText: "Yes", cancelButtonText: "No" } } }, I = Symbol.for("sakana-element-i18n"), S = (e2) => g(e2, "install");
101
- function $(e2) {
102
- if (!e2) {
103
- const e3 = i(I) ?? s(h({ locale: B.name, messages: { en: B.el } }));
104
- return c((() => S(a(e3))));
105
- }
106
- return c((() => S(h({ locale: e2.value.name, messages: { en: B.el, [e2.value.name]: e2.value.el } }))));
107
- }
108
- function O(e2) {
109
- const t2 = c((() => e2.getLastBottomOffset())), n2 = c((() => e2.offset + t2.value)), o2 = c((() => n2.value + e2.boxHeight.value));
110
- return { topOffset: n2, bottomOffset: o2 };
111
- }
112
- const j = s(0);
113
- function C(e2 = 2e3) {
114
- const t2 = s(e2), n2 = c((() => j.value + t2.value));
115
- return { initialValue: t2, currentZIndex: n2, nextZIndex: () => (j.value++, n2.value) };
116
- }
117
- function F() {
118
- const e2 = s(false);
119
- let t2 = null, o2 = null;
120
- return n((() => {
121
- "undefined" != typeof window && (t2 = window.matchMedia("(prefers-color-scheme: dark)"), e2.value = t2.matches, o2 = (t3) => {
122
- e2.value = t3.matches;
123
- }, t2.addEventListener ? t2.addEventListener("change", o2) : t2.addListener(o2));
124
- })), d((() => {
125
- t2 && o2 && (t2.removeEventListener ? t2.removeEventListener("change", o2) : t2.removeListener(o2));
126
- })), { prefersDark: e2, prefers: c((() => e2.value ? "dark" : "light")) };
127
- }
128
- const H = "px-theme", N = "px-dark", Y = s("system"), A = s(false);
129
- function K(e2) {
130
- "undefined" != typeof document && (e2 ? document.documentElement.classList.add(N) : document.documentElement.classList.remove(N));
131
- }
132
- function R(e2) {
133
- return "system" === e2 ? "undefined" != typeof window && window.matchMedia("(prefers-color-scheme: dark)").matches : "dark" === e2;
134
- }
135
- let V = false;
136
- function X() {
137
- if (!V && "undefined" != typeof window) {
138
- !(function() {
139
- if ("undefined" == typeof window) return;
140
- const e4 = localStorage.getItem(H);
141
- e4 && ["light", "dark", "system"].includes(e4) ? Y.value = e4 : Y.value = "system", A.value = R(Y.value), K(A.value);
142
- })(), V = true;
143
- const e3 = window.matchMedia("(prefers-color-scheme: dark)"), t2 = (e4) => {
144
- "system" === Y.value && (A.value = e4.matches, K(A.value));
145
- };
146
- e3.addEventListener ? e3.addEventListener("change", t2) : e3.addListener(t2);
147
- }
148
- const e2 = (e3) => {
149
- Y.value = e3, A.value = R(e3), K(A.value), "undefined" != typeof localStorage && localStorage.setItem(H, e3);
150
- };
151
- return { theme: c((() => Y.value)), isDark: c((() => A.value)), setTheme: e2, toggleTheme: () => {
152
- const t2 = A.value ? "light" : "dark";
153
- e2(t2);
154
- } };
155
- }
156
- export {
157
- I,
158
- C as a,
159
- E as b,
160
- L as c,
161
- y as d,
162
- k as e,
163
- O as f,
164
- $ as g,
165
- M as h,
166
- x as i,
167
- F as j,
168
- X as k,
169
- T as u
170
- };
@@ -1,155 +0,0 @@
1
- import { h as e, d as t, x as r } from "./vendor-eombfMkP.js";
2
- import { defineComponent as o } from "vue";
3
- function n(e2, t2) {
4
- const r2 = parseInt(e2.replace("#", ""), 16);
5
- return `#${(Math.max(0, (r2 >> 16) - Math.round(2.55 * t2)) << 16 | Math.max(0, (r2 >> 8 & 255) - Math.round(2.55 * t2)) << 8 | Math.max(0, (255 & r2) - Math.round(2.55 * t2))).toString(16).padStart(6, "0")}`;
6
- }
7
- function a(e2, t2) {
8
- const r2 = parseInt(e2.replace("#", ""), 16);
9
- return `#${(Math.min(255, (r2 >> 16) + Math.round(2.55 * t2)) << 16 | Math.min(255, (r2 >> 8 & 255) + Math.round(2.55 * t2)) << 8 | Math.min(255, (255 & r2) + Math.round(2.55 * t2))).toString(16).padStart(6, "0")}`;
10
- }
11
- function c(e2) {
12
- const t2 = parseInt(e2.replace("#", ""), 16);
13
- return (0.299 * (t2 >> 16) + 0.587 * (t2 >> 8 & 255) + 0.114 * (255 & t2)) / 255 > 0.6 ? "#1e1e2e" : "#ffffff";
14
- }
15
- function s(e2) {
16
- return { color: e2, dark: n(e2, 15), light: a(e2, 35), contrast: c(e2), transparent: "transparent" };
17
- }
18
- function i(e2, t2, r2) {
19
- const o2 = {};
20
- for (const [n2, a2] of Object.entries(r2)) o2[`--${t2}-${n2}`] = e2[a2];
21
- return o2;
22
- }
23
- const l = { outline: { "text-color": "color", "bg-color": "transparent", "border-color": "color", "shadow-color": "transparent" }, dash: { "text-color": "color", "bg-color": "light", "border-color": "color", "shadow-color": "transparent" }, default: { "text-color": "contrast", "bg-color": "color", "border-color": "dark", "shadow-color": "dark" } };
24
- function u(e2, t2) {
25
- }
26
- const f = { spinner: "loader", loading: "loader", "eye-slash": "eye-closed", "eye-off": "eye-closed", xmark: "close", x: "close", times: "close", "circle-xmark": "close-box", "x-circle": "close-box", "times-circle": "close-box", error: "close-box", "circle-info": "info-box", "info-circle": "info-box", info: "info-box", "check-circle": "check", "circle-check": "check", success: "check", "circle-exclamation": "warning-box", "exclamation-circle": "warning-box", warning: "warning-box", "angle-down": "chevron-down", "caret-down": "chevron-down", "angle-up": "chevron-up", "caret-up": "chevron-up", "angle-left": "chevron-left", "caret-left": "chevron-left", "angle-right": "chevron-right", "caret-right": "chevron-right", "question-circle": "info-box", "circle-question": "info-box", help: "info-box", question: "info-box", gear: "sliders", cog: "sliders", settings: "sliders", star: "bookmark", "star-solid": "bookmark" };
27
- function d(e2) {
28
- return e2 in f ? f[e2] : e2;
29
- }
30
- function h() {
31
- return { ...f };
32
- }
33
- const g = /* @__PURE__ */ new Set(["svg", "path", "rect", "circle", "ellipse", "line", "polyline", "polygon", "g", "defs", "clipPath", "mask", "title", "desc", "linearGradient", "radialGradient", "stop", "symbol", "use"]), p = /^on/i, m = /^\s*javascript\s*:/i;
34
- function b(e2) {
35
- if (!e2 || "string" != typeof e2) return "";
36
- if ("undefined" == typeof DOMParser) return "";
37
- const t2 = new DOMParser().parseFromString(e2, "image/svg+xml");
38
- return t2.querySelector("parsererror") ? "" : (x(t2.documentElement), t2.documentElement.outerHTML);
39
- }
40
- function x(e2) {
41
- const t2 = Array.from(e2.children);
42
- for (const e3 of t2) {
43
- const t3 = e3.tagName.toLowerCase();
44
- if (g.has(t3)) {
45
- for (const t4 of Array.from(e3.attributes)) (p.test(t4.name) || "href" === t4.name && m.test(t4.value) || "xlink:href" === t4.name && m.test(t4.value)) && e3.removeAttribute(t4.name);
46
- x(e3);
47
- } else e3.remove();
48
- }
49
- }
50
- const M = /* @__PURE__ */ new Map();
51
- function v(e2, t2) {
52
- M.set(e2, b(t2));
53
- }
54
- function w(e2) {
55
- for (const [t2, r2] of Object.entries(e2)) M.set(t2, b(r2));
56
- }
57
- function k(e2) {
58
- return M.get(e2);
59
- }
60
- function y(e2) {
61
- return M.has(e2);
62
- }
63
- function S() {
64
- return Array.from(M.keys());
65
- }
66
- const N = (e2) => (e2.install = (t2) => {
67
- const r2 = e2.name;
68
- t2.component(r2, e2);
69
- }, e2), $ = (e2, t2) => (e2.install = (r2) => {
70
- r2.config.globalProperties[t2] = e2;
71
- }, e2);
72
- function F(e2, t2) {
73
- for (; e2.length >= t2; ) e2[0].props.onDestroy();
74
- }
75
- function I(e2) {
76
- let t2 = false, r2 = 0;
77
- const o2 = (t3) => {
78
- var _a;
79
- "Escape" === t3.code && ((_a = e2()) == null ? void 0 : _a.handler.close());
80
- };
81
- return { register() {
82
- r2++, t2 || (document.addEventListener("keydown", o2), t2 = true);
83
- }, unregister() {
84
- r2--, r2 <= 0 && (document.removeEventListener("keydown", o2), t2 = false, r2 = 0);
85
- } };
86
- }
87
- function j(e2, t2, r2, o2) {
88
- if (0 === o2.length) return [e2, t2, r2];
89
- let n2 = 1 / 0, a2 = o2[0];
90
- for (const c2 of o2) {
91
- const o3 = (e2 - c2[0]) ** 2 + (t2 - c2[1]) ** 2 + (r2 - c2[2]) ** 2;
92
- if (0 === o3) return c2;
93
- o3 < n2 && (n2 = o3, a2 = c2);
94
- }
95
- return a2;
96
- }
97
- function O(e2, t2, r2) {
98
- const o2 = e2.getContext("2d");
99
- if (!o2) return;
100
- const { pixelSize: n2, grayscale: a2 = false, palette: c2, background: s2 = "#FFFFFF" } = r2, i2 = t2.naturalWidth, l2 = t2.naturalHeight;
101
- e2.width = i2, e2.height = l2, o2.drawImage(t2, 0, 0, i2, l2);
102
- const u2 = o2.getImageData(0, 0, i2, l2).data, f2 = Math.max(1, Math.round(n2)), d2 = c2 ? (function(e3) {
103
- return e3.map(((e4) => "string" == typeof e4 ? (function(e5) {
104
- const t3 = e5.replace("#", "");
105
- return [parseInt(t3.substring(0, 2), 16), parseInt(t3.substring(2, 4), 16), parseInt(t3.substring(4, 6), 16)];
106
- })(e4) : e4));
107
- })(c2) : null;
108
- o2.fillStyle = s2, o2.fillRect(0, 0, i2, l2);
109
- for (let e3 = 0; e3 < l2; e3 += f2) for (let t3 = 0; t3 < i2; t3 += f2) {
110
- const r3 = Math.min(f2, i2 - t3), n3 = Math.min(f2, l2 - e3);
111
- let c3 = 0, s3 = 0, h2 = 0, g2 = 0;
112
- for (let o3 = 0; o3 < n3; o3++) for (let n4 = 0; n4 < r3; n4++) {
113
- const r4 = 4 * ((e3 + o3) * i2 + (t3 + n4));
114
- c3 += u2[r4], s3 += u2[r4 + 1], h2 += u2[r4 + 2], g2++;
115
- }
116
- let p2 = Math.round(c3 / g2), m2 = Math.round(s3 / g2), b2 = Math.round(h2 / g2);
117
- a2 && (p2 = m2 = b2 = Math.round(0.299 * p2 + 0.587 * m2 + 0.114 * b2)), d2 && ([p2, m2, b2] = j(p2, m2, b2, d2)), o2.fillStyle = `rgb(${p2},${m2},${b2})`, o2.fillRect(t3, e3, r3, n3);
118
- }
119
- }
120
- function q(r2, o2 = "px") {
121
- return r2 ? e(r2) || ((e2) => !!t(e2) && !Number.isNaN(Number(e2)))(r2) ? `${r2}${o2}` : t(r2) ? r2 : void 0 : "";
122
- }
123
- function E(e2, t2, r2) {
124
- return Math.max(t2, Math.min(r2, e2));
125
- }
126
- const A = /* @__PURE__ */ new Map([["info", "info-box"], ["success", "check"], ["warning", "warning-box"], ["danger", "close-box"], ["error", "close-box"]]), D = o({ props: { vNode: { type: [String, Object, Function], required: true } }, setup: (e2) => () => r(e2.vNode) ? e2.vNode() : e2.vNode }), L = (e2, t2) => {
127
- const r2 = e2.__vccOpts || e2;
128
- for (const [e3, o2] of t2) r2[e3] = o2;
129
- return r2;
130
- };
131
- export {
132
- D as R,
133
- l as S,
134
- L as _,
135
- E as a,
136
- q as b,
137
- s as c,
138
- u as d,
139
- d as e,
140
- w as f,
141
- k as g,
142
- F as h,
143
- I as i,
144
- $ as j,
145
- h as k,
146
- a as l,
147
- S as m,
148
- y as n,
149
- v as o,
150
- O as p,
151
- i as r,
152
- b as s,
153
- A as t,
154
- N as w
155
- };