sakana-element 2.1.5 → 2.3.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 (157) hide show
  1. package/README.md +95 -19
  2. package/dist/es/{Alert-C76ZWSVk.js → Alert-BwTsp4X3.js} +2 -2
  3. package/dist/es/Avatar-CJu6JYV3.js +9 -0
  4. package/dist/es/Badge-BmxZXX8k.js +14 -0
  5. package/dist/es/Breadcrumb-BP8MSklj.js +15 -0
  6. package/dist/es/{Button-fW_ZOLmT.js → Button-BJHtN7gh.js} +5 -5
  7. package/dist/es/Card-DJHkCmsz.js +16 -0
  8. package/dist/es/Checkbox-DX8L3fyp.js +51 -0
  9. package/dist/es/Collapse-Ir3V9CuO.js +53 -0
  10. package/dist/es/ConfigProvider-CsbSqwwi.js +44 -0
  11. package/dist/es/Divider-C7PtODSK.js +9 -0
  12. package/dist/es/Drawer-C2eVmvUp.js +40 -0
  13. package/dist/es/Dropdown-CVg_c2fB.js +104 -0
  14. package/dist/es/FileInput-BE26BmXm.js +33 -0
  15. package/dist/es/Form-7lZt5ehf.js +122 -0
  16. package/dist/es/{Icon-DpJyuj7c.js → Icon-BLDDdSU-.js} +1 -1
  17. package/dist/es/Indicator-B-en-MgG.js +9 -0
  18. package/dist/es/{Input-DBPpvf0Y.js → Input-C5HuVehE.js} +4 -4
  19. package/dist/es/Link-Av9RdcFv.js +11 -0
  20. package/dist/es/Loading-CBNDUWQd.js +92 -0
  21. package/dist/es/Message-DgnyyuXn.js +152 -0
  22. package/dist/es/Notification-LYRXnVAf.js +69 -0
  23. package/dist/es/{Overlay-BRDSWspM.js → Overlay-CpvMhnuU.js} +1 -1
  24. package/dist/es/Pixelate-BPypBgJU.js +67 -0
  25. package/dist/es/Popconfirm-DvxFdLrw.js +23 -0
  26. package/dist/es/Progress-Bc5INMhJ.js +12 -0
  27. package/dist/es/Radio-263_rtRl.js +33 -0
  28. package/dist/es/Select-7ZxUCS8z.js +133 -0
  29. package/dist/es/Switch-DiCsMJT3.js +34 -0
  30. package/dist/es/Table-BvA_xzDe.js +10 -0
  31. package/dist/es/Tooltip-J3ji6weH.js +74 -0
  32. package/dist/es/hooks-BqobYUzS.js +171 -0
  33. package/dist/es/index.js +94 -64
  34. package/dist/{theme → es/theme}/Alert.css +1 -1
  35. package/dist/es/theme/Avatar.css +86 -0
  36. package/dist/{theme → es/theme}/Badge.css +36 -30
  37. package/dist/es/theme/Breadcrumb.css +192 -0
  38. package/dist/{theme → es/theme}/Button.css +216 -216
  39. package/dist/es/theme/Card.css +347 -0
  40. package/dist/es/theme/Checkbox.css +484 -0
  41. package/dist/{theme → es/theme}/Collapse.css +214 -54
  42. package/dist/es/theme/Divider.css +111 -0
  43. package/dist/es/theme/Drawer.css +206 -0
  44. package/dist/es/theme/Dropdown.css +471 -0
  45. package/dist/es/theme/FileInput.css +365 -0
  46. package/dist/es/theme/Form.css +83 -0
  47. package/dist/es/theme/Indicator.css +159 -0
  48. package/dist/{theme → es/theme}/Input.css +1 -0
  49. package/dist/es/theme/Link.css +69 -0
  50. package/dist/es/theme/Loading.css +266 -0
  51. package/dist/es/theme/Message.css +565 -0
  52. package/dist/es/theme/Notification.css +316 -0
  53. package/dist/es/theme/Popconfirm.css +46 -0
  54. package/dist/es/theme/Progress.css +278 -0
  55. package/dist/es/theme/Radio.css +426 -0
  56. package/dist/{theme → es/theme}/Select.css +78 -78
  57. package/dist/es/theme/Table.css +680 -0
  58. package/dist/es/theme/Tooltip.css +235 -0
  59. package/dist/es/utils-BS5vsvlM.js +101 -0
  60. package/dist/index.css +1 -1
  61. package/dist/types/components/Avatar/index.d.ts +30 -0
  62. package/dist/types/components/Avatar/types.d.ts +8 -0
  63. package/dist/types/components/Badge/types.d.ts +1 -0
  64. package/dist/types/components/Breadcrumb/constants.d.ts +3 -0
  65. package/dist/types/components/Breadcrumb/index.d.ts +45 -0
  66. package/dist/types/components/Breadcrumb/types.d.ts +13 -0
  67. package/dist/types/components/Card/types.d.ts +6 -0
  68. package/dist/types/components/Checkbox/constants.d.ts +5 -0
  69. package/dist/types/components/Checkbox/index.d.ts +94 -0
  70. package/dist/types/components/Checkbox/types.d.ts +46 -0
  71. package/dist/types/components/Collapse/constants.d.ts +3 -0
  72. package/dist/types/components/Collapse/index.d.ts +14 -8
  73. package/dist/types/components/Collapse/types.d.ts +12 -0
  74. package/dist/types/components/Divider/index.d.ts +30 -0
  75. package/dist/types/components/Divider/types.d.ts +10 -0
  76. package/dist/types/components/Drawer/constants.d.ts +1 -0
  77. package/dist/types/components/Drawer/index.d.ts +72 -0
  78. package/dist/types/components/Drawer/types.d.ts +20 -0
  79. package/dist/types/components/Dropdown/index.d.ts +11 -1
  80. package/dist/types/components/Dropdown/types.d.ts +3 -0
  81. package/dist/types/components/Dropdown/useDropdownKeyboard.d.ts +8 -0
  82. package/dist/types/components/FileInput/constants.d.ts +3 -0
  83. package/dist/types/components/FileInput/index.d.ts +58 -0
  84. package/dist/types/components/FileInput/types.d.ts +24 -0
  85. package/dist/types/components/Form/types.d.ts +17 -7
  86. package/dist/types/components/Indicator/constants.d.ts +2 -0
  87. package/dist/types/components/Indicator/index.d.ts +28 -0
  88. package/dist/types/components/Indicator/types.d.ts +10 -0
  89. package/dist/types/components/Input/index.d.ts +10 -10
  90. package/dist/types/components/Link/index.d.ts +34 -0
  91. package/dist/types/components/Link/types.d.ts +10 -0
  92. package/dist/types/components/Loading/index.d.ts +25 -0
  93. package/dist/types/components/Loading/types.d.ts +9 -0
  94. package/dist/types/components/Message/methods.d.ts +2 -0
  95. package/dist/types/components/Message/types.d.ts +9 -3
  96. package/dist/types/components/MessageBox/types.d.ts +16 -4
  97. package/dist/types/components/Notification/index.d.ts +1 -1
  98. package/dist/types/components/Notification/methods.d.ts +6 -1
  99. package/dist/types/components/Notification/types.d.ts +10 -4
  100. package/dist/types/components/Pixelate/constants.d.ts +2 -0
  101. package/dist/types/components/Pixelate/index.d.ts +71 -0
  102. package/dist/types/components/Pixelate/types.d.ts +23 -0
  103. package/dist/types/components/Popconfirm/index.d.ts +16 -7
  104. package/dist/types/components/Popconfirm/types.d.ts +2 -1
  105. package/dist/types/components/Progress/constants.d.ts +2 -0
  106. package/dist/types/components/Progress/index.d.ts +50 -0
  107. package/dist/types/components/Progress/types.d.ts +22 -0
  108. package/dist/types/components/Radio/constants.d.ts +5 -0
  109. package/dist/types/components/Radio/index.d.ts +88 -0
  110. package/dist/types/components/Radio/types.d.ts +43 -0
  111. package/dist/types/components/Select/constants.d.ts +2 -1
  112. package/dist/types/components/Select/index.d.ts +35 -26
  113. package/dist/types/components/Switch/index.d.ts +5 -5
  114. package/dist/types/components/Table/index.d.ts +27 -0
  115. package/dist/types/components/Table/types.d.ts +20 -0
  116. package/dist/types/components/Tooltip/index.d.ts +6 -0
  117. package/dist/types/components/Tooltip/types.d.ts +7 -0
  118. package/dist/types/components/index.d.ts +12 -0
  119. package/dist/types/hooks/index.d.ts +3 -1
  120. package/dist/types/hooks/useDraggable.d.ts +7 -0
  121. package/dist/types/hooks/useFocusTrap.d.ts +5 -0
  122. package/dist/types/hooks/vitest.setup.d.ts +4 -0
  123. package/dist/types/utils/index.d.ts +1 -0
  124. package/dist/types/utils/instance-management.d.ts +40 -0
  125. package/dist/umd/index.css +1 -1
  126. package/dist/umd/index.css.gz +0 -0
  127. package/dist/umd/index.umd.cjs +5 -14
  128. package/dist/umd/index.umd.cjs.gz +0 -0
  129. package/package.json +5 -6
  130. package/dist/es/Badge-BG-vYP8Y.js +0 -13
  131. package/dist/es/Card-BCBnlVi_.js +0 -12
  132. package/dist/es/Collapse-B08VhCVq.js +0 -38
  133. package/dist/es/ConfigProvider-DZO1d5Eq.js +0 -44
  134. package/dist/es/Dropdown-49nf6F8P.js +0 -40
  135. package/dist/es/Form-CGiTDSGI.js +0 -108
  136. package/dist/es/Loading-DlygqGOv.js +0 -88
  137. package/dist/es/Message-ganFfLeU.js +0 -123
  138. package/dist/es/Notification-D4RYHV9o.js +0 -58
  139. package/dist/es/Popconfirm-Cop44KwQ.js +0 -22
  140. package/dist/es/Select-Blw_iO2r.js +0 -133
  141. package/dist/es/Switch-CHjcLtHs.js +0 -34
  142. package/dist/es/Tooltip-HWx_i2FA.js +0 -74
  143. package/dist/es/hooks-CYdEHUVd.js +0 -105
  144. package/dist/es/utils-bsCscZfS.js +0 -84
  145. package/dist/theme/Card.css +0 -112
  146. package/dist/theme/Dropdown.css +0 -187
  147. package/dist/theme/Form.css +0 -52
  148. package/dist/theme/Loading.css +0 -78
  149. package/dist/theme/Message.css +0 -353
  150. package/dist/theme/Notification.css +0 -126
  151. package/dist/theme/Popconfirm.css +0 -30
  152. package/dist/theme/Tooltip.css +0 -111
  153. /package/dist/{theme → es/theme}/Icon.css +0 -0
  154. /package/dist/{theme → es/theme}/Overlay.css +0 -0
  155. /package/dist/{theme → es/theme}/Switch.css +0 -0
  156. /package/dist/{theme → es/theme}/fonts/zpix.woff2 +0 -0
  157. /package/dist/{theme → es/theme}/index.css +0 -0
@@ -0,0 +1,33 @@
1
+ import { c as e, r as a, w as l } from "./utils-BS5vsvlM.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-BqobYUzS.js";
4
+ import { u as _ } from "./Form-7lZt5ehf.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,133 @@
1
+ import { R as e, _ as l, c as t, r as a, w as o } from "./utils-BS5vsvlM.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 M, createCommentVNode as k, 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-DXmGx29U.js";
4
+ import { g as G, u as K, e as J, c as Q } from "./hooks-BqobYUzS.js";
5
+ import { P as X } from "./Icon-BLDDdSU-.js";
6
+ import { _ as Y } from "./Input-C5HuVehE.js";
7
+ import { T as Z } from "./Tooltip-J3ji6weH.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-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 }) {
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
+ 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) || !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));
37
+ let Be = H(Ne, Le.value);
38
+ b((() => {
39
+ Be.cancel(), Be = H(Ne, Le.value);
40
+ }));
41
+ const De = K().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: qe, hasData: ke, 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 = ""), Be()) : 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 qe(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 Ae(e3) {
76
+ ce.value.clear(), W(e3, ((e4) => {
77
+ ce.value.set(e4.props.value, e4.props);
78
+ }));
79
+ }
80
+ function Ne() {
81
+ const e3 = fe.inputValue;
82
+ fe.highlightedIndex = -1, _e.value ? (async function(e4) {
83
+ if (s2.filterable) {
84
+ if (s2.remote && s2.remoteMethod && q(s2.remoteMethod)) return await Ue(s2.remoteMethod, e4), void Ae(Ie.value);
85
+ if (s2.filterMethod && q(s2.filterMethod)) {
86
+ const l3 = E(s2.filterMethod(e4), "value");
87
+ Ae(F(Ie.value, ((e5) => U(l3, C(e5, ["props", "value"])))));
88
+ } else Ae(F(Ie.value, ((l3) => U(C(l3, ["props", "label"]), e4))));
89
+ }
90
+ })(e3) : (async function(e4) {
91
+ s2.filterable && (s2.remote && s2.remoteMethod && q(s2.remoteMethod) ? pe.value = await Ue(s2.remoteMethod, e4) : s2.filterMethod && q(s2.filterMethod) ? pe.value = s2.filterMethod(e4) : pe.value = F(s2.options, ((l3) => U(l3.label, e4))));
92
+ })(e3);
93
+ }
94
+ function Te(e3) {
95
+ var _a;
96
+ Fe.has(e3.key) && ((_a = Fe.get(e3.key)) == null ? void 0 : _a(e3));
97
+ }
98
+ async function Ue(e3, l3) {
99
+ if (!e3 || !q(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 Ge() {
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) => Ae(e3)), { immediate: true }), y((() => s2.modelValue), (() => {
116
+ Ge();
117
+ })), _((() => {
118
+ Ge();
119
+ })), V((() => {
120
+ Be.cancel();
121
+ })), w(ee, { handleSelect: qe, selectStates: fe, renderLabel: function(e3) {
122
+ return q(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: M((() => [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: M((() => [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: M((() => [fe.loading ? (r(), u("div", se, [h(X, { icon: "loader", spin: "" })])) : e3.filterable && Me.value ? (r(), u("div", ne, O(v(i2).t("select.noData")), 1)) : k("", 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-4d450d40"]])), de = o(ie);
130
+ export {
131
+ re as P,
132
+ de as a
133
+ };
@@ -0,0 +1,34 @@
1
+ import { c as e, w as c } from "./utils-BS5vsvlM.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-BqobYUzS.js";
4
+ import { P as w } from "./Icon-BLDDdSU-.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
+ };
@@ -0,0 +1,10 @@
1
+ import { w as e } from "./utils-BS5vsvlM.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 { e, _ as t, w as a } from "./utils-BS5vsvlM.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-BqobYUzS.js";
5
+ import { H as B, f as $, E as j, v as W } from "./vendor-DXmGx29U.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,171 @@
1
+ import { isRef as e, watch as t, onMounted as n, onBeforeUnmount as o, unref as a, getCurrentInstance as r, useSlots as l, watchEffect as u, ref as s, inject as i, computed as c, onUnmounted as d } from "vue";
2
+ import { f as m, y as v, k as f, z as p, n as h, o as g, a as E } from "./vendor-DXmGx29U.js";
3
+ function L(r2, l2, u2) {
4
+ e(r2) ? t(r2, ((e2, t2) => {
5
+ null == t2 || t2.removeEventListener(l2, u2), null == e2 || e2.addEventListener(l2, u2);
6
+ })) : n((() => null == r2 ? void 0 : r2.addEventListener(l2, u2))), o((() => {
7
+ var e2;
8
+ return null == (e2 = a(r2)) ? void 0 : e2.removeEventListener(l2, u2);
9
+ }));
10
+ }
11
+ function w(e2, t2) {
12
+ L(document, "click", ((n2) => {
13
+ e2.value && n2.target && (e2.value.contains(n2.target) || t2(n2));
14
+ }));
15
+ }
16
+ const y = (e2, t2) => m(e2, ((e3) => {
17
+ v(t2) && t2(e3), e3.children && y(e3.children, t2);
18
+ }));
19
+ function x() {
20
+ var e2, t2;
21
+ const n2 = /* @__PURE__ */ new Map(), o2 = r(), a2 = null == (t2 = null == (e2 = l()) ? void 0 : e2.default) ? void 0 : t2.call(e2);
22
+ u((() => {
23
+ (null == o2 ? void 0 : o2.props.disabled) ? y(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
+ })) : y(a2 ?? [], ((e3) => {
26
+ n2.has(e3) && (e3.props = n2.get(e3));
27
+ }));
28
+ }));
29
+ }
30
+ function k(e2, n2, a2 = {}) {
31
+ let r2 = 0, l2 = 0, u2 = 0, s2 = 0, i2 = false;
32
+ function c2(e3) {
33
+ 0 === e3.button && (i2 = true, u2 = e3.clientX - r2, s2 = e3.clientY - l2, 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 - r2, s3 = e3.top - l2, 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
+ r2 = o2, l2 = c3, n3.style.transform = `translate(${r2}px, ${l2}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
+ r2 = 0, l2 = 0, t2 && (t2.style.transform = "");
60
+ } };
61
+ }
62
+ function b(e2, { afterBlur: t2, beforeBlur: n2, afterFocus: o2 } = {}) {
63
+ const a2 = r(), { emit: l2 } = a2, u2 = s(), i2 = s(false);
64
+ return L(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, l2("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, l2("blur", e3), null == t2 || t2());
72
+ } };
73
+ }
74
+ const M = ["a[href]", "button:not([disabled])", "input:not([disabled])", "textarea:not([disabled])", "select:not([disabled])", '[tabindex]:not([tabindex="-1"])'].join(", ");
75
+ function D(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(M)).filter(((e3) => null !== e3.offsetParent));
82
+ if (0 === a3.length) return void t3.preventDefault();
83
+ const r3 = a3[0], l2 = a3[a3.length - 1];
84
+ t3.shiftKey ? document.activeElement !== r3 && o2.contains(document.activeElement) || (t3.preventDefault(), l2.focus()) : document.activeElement !== l2 && o2.contains(document.activeElement) || (t3.preventDefault(), r3.focus());
85
+ }
86
+ function r2() {
87
+ n2 && (n2 = false, document.removeEventListener("keydown", a2), t2 && "function" == typeof t2.focus && t2.focus(), t2 = null);
88
+ }
89
+ return o((() => {
90
+ r2();
91
+ })), { activate: function() {
92
+ n2 || (t2 = document.activeElement, n2 = true, document.addEventListener("keydown", a2));
93
+ }, deactivate: r2 };
94
+ }
95
+ const T = { prefix: Math.floor(1e4 * Math.random()), current: 0 };
96
+ function B(e2 = "er") {
97
+ const t2 = `${e2}-${T.prefix}-${T.current++}`;
98
+ return s(t2);
99
+ }
100
+ const I = { 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" } } };
101
+ function S(e2) {
102
+ {
103
+ const e3 = i(h, s(g({ locale: I.name, messages: { en: I.el } })));
104
+ return c((() => {
105
+ return t2 = a(e3), E(t2, "install");
106
+ var t2;
107
+ }));
108
+ }
109
+ }
110
+ function $(e2) {
111
+ const t2 = c((() => e2.getLastBottomOffset())), n2 = c((() => e2.offset + t2.value)), o2 = c((() => n2.value + e2.boxHeight.value));
112
+ return { topOffset: n2, bottomOffset: o2 };
113
+ }
114
+ const O = s(0);
115
+ function j(e2 = 2e3) {
116
+ const t2 = s(e2), n2 = c((() => O.value + t2.value));
117
+ return { initialValue: t2, currentZIndex: n2, nextZIndex: () => (O.value++, n2.value) };
118
+ }
119
+ function C() {
120
+ const e2 = s(false);
121
+ let t2 = null, o2 = null;
122
+ return n((() => {
123
+ "undefined" != typeof window && (t2 = window.matchMedia("(prefers-color-scheme: dark)"), e2.value = t2.matches, o2 = (t3) => {
124
+ e2.value = t3.matches;
125
+ }, t2.addEventListener ? t2.addEventListener("change", o2) : t2.addListener(o2));
126
+ })), d((() => {
127
+ t2 && o2 && (t2.removeEventListener ? t2.removeEventListener("change", o2) : t2.removeListener(o2));
128
+ })), { prefersDark: e2, prefers: c((() => e2.value ? "dark" : "light")) };
129
+ }
130
+ const F = "px-theme", N = "px-dark", Y = s("system"), A = s(false);
131
+ function H(e2) {
132
+ "undefined" != typeof document && (e2 ? document.documentElement.classList.add(N) : document.documentElement.classList.remove(N));
133
+ }
134
+ function K(e2) {
135
+ return "system" === e2 ? "undefined" != typeof window && window.matchMedia("(prefers-color-scheme: dark)").matches : "dark" === e2;
136
+ }
137
+ let R = false;
138
+ function V() {
139
+ if (!R && "undefined" != typeof window) {
140
+ !(function() {
141
+ if ("undefined" == typeof window) return;
142
+ const e4 = localStorage.getItem(F);
143
+ e4 && ["light", "dark", "system"].includes(e4) ? Y.value = e4 : Y.value = "system", A.value = K(Y.value), H(A.value);
144
+ })(), R = true;
145
+ const e3 = window.matchMedia("(prefers-color-scheme: dark)"), t2 = (e4) => {
146
+ "system" === Y.value && (A.value = e4.matches, H(A.value));
147
+ };
148
+ e3.addEventListener ? e3.addEventListener("change", t2) : e3.addListener(t2);
149
+ }
150
+ const e2 = (e3) => {
151
+ Y.value = e3, A.value = K(e3), H(A.value), "undefined" != typeof localStorage && localStorage.setItem(F, e3);
152
+ };
153
+ return { theme: c((() => Y.value)), isDark: c((() => A.value)), setTheme: e2, toggleTheme: () => {
154
+ const t2 = A.value ? "light" : "dark";
155
+ e2(t2);
156
+ } };
157
+ }
158
+ export {
159
+ j as a,
160
+ L as b,
161
+ w as c,
162
+ x as d,
163
+ b as e,
164
+ $ as f,
165
+ S as g,
166
+ D as h,
167
+ k as i,
168
+ C as j,
169
+ V as k,
170
+ B as u
171
+ };