sakana-element 2.4.0 → 2.4.2

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 (57) hide show
  1. package/dist/es/{Alert-DfLsJvQD.js → Alert-DdAShH-x.js} +2 -2
  2. package/dist/es/{Avatar-Ci4OKsv7.js → Avatar-BGTH7x40.js} +1 -1
  3. package/dist/es/{Badge-B4wEToK6.js → Badge-CYZ55qNe.js} +2 -2
  4. package/dist/es/{Breadcrumb-BFzww8jd.js → Breadcrumb-BTWTtzrN.js} +2 -2
  5. package/dist/es/{Button-DbFviVWb.js → Button-GsSCWg5x.js} +3 -3
  6. package/dist/es/{Card-ClRqKkc_.js → Card-BhgzwQqo.js} +1 -1
  7. package/dist/es/{ChatBubble-DFEV_lVI.js → ChatBubble-4F481Agj.js} +1 -1
  8. package/dist/es/{Checkbox-l86YI3Fr.js → Checkbox-C7vZGSTh.js} +3 -3
  9. package/dist/es/{Collapse-B67v6RSE.js → Collapse-CbcSQig5.js} +2 -2
  10. package/dist/es/{ConfigProvider-BCoGbcS5.js → ConfigProvider-K1UzjlRm.js} +20 -19
  11. package/dist/es/{Diff-BLiniLom.js → Diff-B747pgwb.js} +1 -1
  12. package/dist/es/{Divider-DDSOHv8G.js → Divider-BSu_1-AU.js} +1 -1
  13. package/dist/es/{Drawer-apeXw6EO.js → Drawer-I2lCgyba.js} +2 -2
  14. package/dist/es/{Dropdown-By9qIErf.js → Dropdown-B0J_c8Wv.js} +6 -6
  15. package/dist/es/{FileInput-CZ5jTfB_.js → FileInput-CFg1wpsH.js} +3 -3
  16. package/dist/es/{Filter-B_1zU4Dq.js → Filter-nA8j-62U.js} +3 -3
  17. package/dist/es/{Form-B_XDnSjK.js → Form-C1b8Igns.js} +4 -4
  18. package/dist/es/{Icon-D6qRB3pq.js → Icon-BulvH9Wm.js} +1 -1
  19. package/dist/es/{Indicator-C6Ip4dpP.js → Indicator-BbW4iUkh.js} +1 -1
  20. package/dist/es/Input-BUHFulIW.js +42 -0
  21. package/dist/es/{Kbd-DXNjs7at.js → Kbd-CeP2wkdE.js} +2 -2
  22. package/dist/es/{Link-08Ee61Fv.js → Link-Dks2bXo8.js} +1 -1
  23. package/dist/es/{Loading-ByI9mjss.js → Loading-DoBtVGWo.js} +18 -18
  24. package/dist/es/{Message-CGG-lV5I.js → Message-Ba_P4Wvy.js} +7 -7
  25. package/dist/es/{Notification-B4clKY5h.js → Notification-DzG8dLuk.js} +4 -4
  26. package/dist/es/{Overlay-6iPenJB1.js → Overlay-DeyTycv0.js} +1 -1
  27. package/dist/es/{Pixelate-A8J7jxDW.js → Pixelate-B21HKbSE.js} +1 -1
  28. package/dist/es/{Popconfirm-gcHGcOTz.js → Popconfirm-BqN3JxJ_.js} +5 -5
  29. package/dist/es/{Progress-DFUBJQ4X.js → Progress--6EJjbbM.js} +1 -1
  30. package/dist/es/{Radio-CLBa1XIM.js → Radio-CrdrvrFH.js} +3 -3
  31. package/dist/es/{Resizable-BWrFr2oj.js → Resizable-By3ijQf0.js} +1 -1
  32. package/dist/es/{Select-BtLqds1d.js → Select-Cq1Ucs_U.js} +34 -34
  33. package/dist/es/{Skeleton-CGUQv3nQ.js → Skeleton-ChCVgMSk.js} +1 -1
  34. package/dist/es/{Switch-CZJ-S77_.js → Switch-DURmSH-T.js} +3 -3
  35. package/dist/es/{Table-lHbxiyGq.js → Table-BE2f9u65.js} +1 -1
  36. package/dist/es/{Tooltip-CdPqNYdn.js → Tooltip-DR4Mc5Fh.js} +23 -23
  37. package/dist/es/{Validator-7ZT_nXDZ.js → Validator-BYn72MYn.js} +2 -2
  38. package/dist/es/{hooks-pU4JmsO3.js → hooks-dJGu-5DG.js} +73 -74
  39. package/dist/es/index.js +119 -107
  40. package/dist/es/utils-CnCdZsHG.js +155 -0
  41. package/dist/es/{vendor-DrBJKLFW.js → vendor-eombfMkP.js} +51 -53
  42. package/dist/index.css +1 -1
  43. package/dist/theme/Button.css +20 -0
  44. package/dist/types/components/Icon/index.d.ts +1 -0
  45. package/dist/types/components/Input/types.d.ts +2 -0
  46. package/dist/types/components/Select/index.d.ts +2 -0
  47. package/dist/types/core/index.d.ts +1 -1
  48. package/dist/types/hooks/index.d.ts +3 -0
  49. package/dist/types/hooks/useFocusController.d.ts +1 -1
  50. package/dist/types/hooks/useLocale.d.ts +9 -1
  51. package/dist/umd/index.css +1 -1
  52. package/dist/umd/index.css.gz +0 -0
  53. package/dist/umd/index.umd.cjs +3 -3
  54. package/dist/umd/index.umd.cjs.gz +0 -0
  55. package/package.json +1 -1
  56. package/dist/es/Input-bThwBbNZ.js +0 -42
  57. package/dist/es/utils-BXICIEsD.js +0 -139
@@ -1,10 +1,10 @@
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";
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
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) {
@@ -20,7 +20,7 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
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
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 = 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((() => {
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
24
  if (!be.value) return {};
25
25
  const e3 = t(s2.color), l3 = s2.ghost ? "ghost" : "default";
26
26
  return a(e3, "px-select", ae[l3]);
@@ -32,13 +32,13 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
32
32
  return e3 = _e.value ? [...ce.value.values()][fe.highlightedIndex] : pe.value[fe.highlightedIndex], e3;
33
33
  })), Ie = n((() => _e.value ? E(ye.value, ((e3) => {
34
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
- })) : [])), 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
- let Be = H(Ne, Le.value);
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
38
  b((() => {
39
- Be.cancel(), Be = H(Ne, Le.value);
39
+ Le.cancel(), Le = H(Te, Be.value);
40
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 }) {
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
42
  const n2 = /* @__PURE__ */ new Map();
43
43
  return n2.set("Enter", (() => {
44
44
  e3.value && t2.highlightedIndex >= 0 && a2.value && o3(a2.value), l3(!e3.value);
@@ -47,7 +47,7 @@ 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: Me, lastIndex: Se });
50
+ })({ isDropdownVisible: he, controlVisible: Ee, selectStates: fe, highlightedLine: we, handleSelect: Ae, hasData: Me, lastIndex: Se });
51
51
  function Re(e3) {
52
52
  $e.value && x((() => je(new FocusEvent("focus", e3))));
53
53
  }
@@ -55,7 +55,7 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
55
55
  var _a;
56
56
  re2.value && ((_a = C(re2, ["value", e3 ? "show" : "hide"])) == null ? void 0 : _a(), s2.filterable && (function(e4) {
57
57
  var _a2;
58
- s2.filterable && (e4 ? (fe.selectedOption && (fe.inputValue = ""), Be()) : fe.inputValue = ((_a2 = fe.selectedOption) == null ? void 0 : _a2.label) || "");
58
+ s2.filterable && (e4 ? (fe.selectedOption && (fe.inputValue = ""), Le()) : fe.inputValue = ((_a2 = fe.selectedOption) == null ? void 0 : _a2.label) || "");
59
59
  })(e3), he.value = e3, p2("visible-change", e3), fe.highlightedIndex = -1);
60
60
  }
61
61
  function He() {
@@ -68,35 +68,35 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
68
68
  function We(e3) {
69
69
  return P(s2.options, ((l3) => l3.value === e3));
70
70
  }
71
- function qe(e3) {
71
+ function Ae(e3) {
72
72
  var _a;
73
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
74
  }
75
- function Ae(e3) {
75
+ function Ne(e3) {
76
76
  ce.value.clear(), W(e3, ((e4) => {
77
77
  ce.value.set(e4.props.value, e4.props);
78
78
  }));
79
79
  }
80
- function Ne() {
80
+ function Te() {
81
81
  const e3 = fe.inputValue;
82
82
  fe.highlightedIndex = -1, _e.value ? (async function(e4) {
83
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)) {
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
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))));
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
89
  }
90
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))));
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
92
  })(e3);
93
93
  }
94
- function Te(e3) {
94
+ function Ue(e3) {
95
95
  var _a;
96
96
  Fe.has(e3.key) && ((_a = Fe.get(e3.key)) == null ? void 0 : _a(e3));
97
97
  }
98
- async function Ue(e3, l3) {
99
- if (!e3 || !q(e3)) return;
98
+ async function qe(e3, l3) {
99
+ if (!e3 || !A(e3)) return;
100
100
  let t2;
101
101
  fe.loading = true;
102
102
  try {
@@ -106,26 +106,26 @@ const ee = Symbol("selectContext"), le = { modifiers: [{ name: "offset", options
106
106
  }
107
107
  return t2;
108
108
  }
109
- function Ge() {
109
+ function Ke() {
110
110
  const e3 = We(s2.modelValue);
111
111
  e3 && (fe.inputValue = e3.label, fe.selectedOption = e3);
112
112
  }
113
113
  return Q(oe2, ((e3) => Re(e3))), y((() => s2.options), ((e3) => {
114
114
  pe.value = e3 ?? [];
115
- })), y((() => Ie.value), ((e3) => Ae(e3)), { immediate: true }), y((() => s2.modelValue), (() => {
116
- Ge();
115
+ })), y((() => Ie.value), ((e3) => Ne(e3)), { immediate: true }), y((() => s2.modelValue), (() => {
116
+ Ke();
117
117
  })), _((() => {
118
- Ge();
118
+ Ke();
119
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;
120
+ Le.cancel();
121
+ })), w(ee, { handleSelect: Ae, selectStates: fe, renderLabel: function(e3) {
122
+ return A(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: 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));
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
129
  } }), [["__scopeId", "data-v-e33550e6"]])), de = o(ie);
130
130
  export {
131
131
  de as P,
@@ -1,4 +1,4 @@
1
- import { b as e, w as t } from "./utils-BXICIEsD.js";
1
+ import { b as e, w as t } from "./utils-CnCdZsHG.js";
2
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
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
4
  const a2 = t2, m2 = i((() => {
@@ -1,7 +1,7 @@
1
- import { c as e, w as c } from "./utils-BXICIEsD.js";
1
+ import { c as e, w as c } from "./utils-CnCdZsHG.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-pU4JmsO3.js";
4
- import { P as w } from "./Icon-D6qRB3pq.js";
3
+ import { u as f } from "./hooks-dJGu-5DG.js";
4
+ import { P as w } from "./Icon-BulvH9Wm.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 = {};
@@ -1,4 +1,4 @@
1
- import { w as e } from "./utils-BXICIEsD.js";
1
+ import { w as e } from "./utils-CnCdZsHG.js";
2
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
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
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 })));
@@ -1,10 +1,10 @@
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";
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
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) } : {}));
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
8
  let Q, S, U;
9
9
  function V() {
10
10
  S == null ? void 0 : S.cancel(), Q == null ? void 0 : Q();
@@ -13,35 +13,35 @@ const A = ["aria-describedby"], E = ["id"], L = { key: 0, class: "px-tooltip__ar
13
13
  Q == null ? void 0 : Q.cancel(), S == null ? void 0 : S();
14
14
  }
15
15
  function Y() {
16
- O.value ? X() : V();
16
+ E.value ? X() : V();
17
17
  }
18
18
  function Z(e2) {
19
- N2.disabled || (O.value = e2, R2("visible-change", e2));
19
+ R2.disabled || (E.value = e2, D2("visible-change", e2));
20
20
  }
21
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) => {
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
23
  e2.preventDefault(), V();
24
- }) : D.value.click = Y);
24
+ }) : P.value.click = Y);
25
25
  }
26
26
  function te() {
27
27
  U == null ? void 0 : U.destroy(), U = null;
28
28
  }
29
29
  function ae() {
30
- D.value = {}, H.value = {}, I.value = {}, ee();
30
+ P.value = {}, G.value = {}, I.value = {}, ee();
31
31
  }
32
32
  const oe = V, le = () => {
33
33
  Q == null ? void 0 : Q.cancel(), Z(false);
34
34
  };
35
- return l(O, ((e2) => {
35
+ return l(E, ((e2) => {
36
36
  e2 && C.value && q.value && (U = k(C.value, q.value, F.value));
37
- }), { flush: "post" }), l((() => N2.manual), ((e2) => {
37
+ }), { flush: "post" }), l((() => R2.manual), ((e2) => {
38
38
  e2 ? ae() : ee();
39
- })), l((() => N2.trigger), (() => {
40
- Q == null ? void 0 : Q.cancel(), O.value = false, R2("visible-change", false), ae();
39
+ })), l((() => R2.trigger), (() => {
40
+ Q == null ? void 0 : Q.cancel(), E.value = false, D2("visible-change", false), ae();
41
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);
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
43
  })), w(M, (() => {
44
- R2("click-outside"), "hover" === N2.trigger || N2.manual || O.value && X();
44
+ D2("click-outside"), "hover" === R2.trigger || R2.manual || E.value && X();
45
45
  })), (function(e2, t3, a3) {
46
46
  let r3, n2;
47
47
  const u2 = /* @__PURE__ */ new Map(), s2 = () => {
@@ -62,13 +62,13 @@ const A = ["aria-describedby"], E = ["id"], L = { key: 0, class: "px-tooltip__ar
62
62
  })), i((() => {
63
63
  r3 == null ? void 0 : r3(), n2 == null ? void 0 : n2();
64
64
  }));
65
- })(N2, C, D), i((() => {
65
+ })(R2, C, P), i((() => {
66
66
  te(), Q == null ? void 0 : Q.cancel(), S == null ? void 0 : S.cancel();
67
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);
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
71
  export {
72
- R as P,
73
- N as T
72
+ D as P,
73
+ R as T
74
74
  };
@@ -1,7 +1,7 @@
1
- import { _ as e, w as s } from "./utils-BXICIEsD.js";
1
+ import { _ as e, w as s } from "./utils-CnCdZsHG.js";
2
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
3
  import { z as g } from "zod";
4
- import { F as f } from "./Form-B_XDnSjK.js";
4
+ import { F as f } from "./Form-C1b8Igns.js";
5
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
6
  const _2 = e2, x = a2, V = t("init"), I = t("");
7
7
  function y(e3) {
@@ -1,36 +1,36 @@
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, I as h, J as g, a as E } from "./vendor-DrBJKLFW.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((() => {
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
7
  var e2;
8
- return null == (e2 = a(r2)) ? void 0 : e2.removeEventListener(l2, u2);
8
+ return null == (e2 = a(l2)) ? void 0 : e2.removeEventListener(r2, u2);
9
9
  }));
10
10
  }
11
- function w(e2, t2) {
12
- L(document, "click", ((n2) => {
11
+ function L(e2, t2) {
12
+ E(document, "click", ((n2) => {
13
13
  e2.value && n2.target && (e2.value.contains(n2.target) || t2(n2));
14
14
  }));
15
15
  }
16
- const y = (e2, t2) => m(e2, ((e3) => {
17
- v(t2) && t2(e3), e3.children && y(e3.children, t2);
16
+ const w = (e2, t2) => m(e2, ((e3) => {
17
+ v(t2) && t2(e3), e3.children && w(e3.children, t2);
18
18
  }));
19
- function x() {
19
+ function y() {
20
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);
21
+ const n2 = /* @__PURE__ */ new Map(), o2 = l(), a2 = null == (t2 = null == (e2 = r()) ? void 0 : e2.default) ? void 0 : t2.call(e2);
22
22
  u((() => {
23
- (null == o2 ? void 0 : o2.props.disabled) ? y(a2 ?? [], ((e3) => {
23
+ (null == o2 ? void 0 : o2.props.disabled) ? w(a2 ?? [], ((e3) => {
24
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) => {
25
+ })) : w(a2 ?? [], ((e3) => {
26
26
  n2.has(e3) && (e3.props = n2.get(e3));
27
27
  }));
28
28
  }));
29
29
  }
30
- function k(e2, n2, a2 = {}) {
31
- let r2 = 0, l2 = 0, u2 = 0, s2 = 0, i2 = false;
30
+ function x(e2, n2, a2 = {}) {
31
+ let l2 = 0, r2 = 0, u2 = 0, s2 = 0, i2 = false;
32
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());
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
34
  }
35
35
  function d2(t2) {
36
36
  if (!i2) return;
@@ -38,10 +38,10 @@ function k(e2, n2, a2 = {}) {
38
38
  if (!n3) return;
39
39
  let o2 = t2.clientX - u2, c3 = t2.clientY - s2;
40
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;
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
42
  o2 = Math.max(i3, Math.min(d3, o2)), c3 = Math.max(m3, Math.min(v3, c3));
43
43
  }
44
- r2 = o2, l2 = c3, n3.style.transform = `translate(${r2}px, ${l2}px)`;
44
+ l2 = o2, r2 = c3, n3.style.transform = `translate(${l2}px, ${r2}px)`;
45
45
  }
46
46
  function m2() {
47
47
  i2 = false, document.removeEventListener("mousemove", d2), document.removeEventListener("mouseup", m2);
@@ -56,67 +56,65 @@ function k(e2, n2, a2 = {}) {
56
56
  v2(n2.value), document.removeEventListener("mousemove", d2), document.removeEventListener("mouseup", m2);
57
57
  })), { reset: function() {
58
58
  const t2 = e2.value;
59
- r2 = 0, l2 = 0, t2 && (t2.style.transform = "");
59
+ l2 = 0, r2 = 0, t2 && (t2.style.transform = "");
60
60
  } };
61
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", (() => {
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
65
  var t3;
66
66
  null == (t3 = e2.value) || t3.focus();
67
67
  })), { wrapperRef: u2, isFocused: i2, handleFocus: (e3) => {
68
- i2.value || (i2.value = true, l2("focus", e3), null == o2 || o2());
68
+ i2.value || (i2.value = true, r2("focus", e3), null == o2 || o2());
69
69
  }, handleBlur: (e3) => {
70
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());
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
72
  } };
73
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) {
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
76
  let t2 = null, n2 = false;
77
77
  function a2(t3) {
78
78
  if (!n2 || "Tab" !== t3.key) return;
79
79
  const o2 = e2.value;
80
80
  if (!o2) return;
81
- const a3 = Array.from(o2.querySelectorAll(M)).filter(((e3) => null !== e3.offsetParent));
81
+ const a3 = Array.from(o2.querySelectorAll(b)).filter(((e3) => null !== e3.offsetParent));
82
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());
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
85
  }
86
- function r2() {
86
+ function l2() {
87
87
  n2 && (n2 = false, document.removeEventListener("keydown", a2), t2 && "function" == typeof t2.focus && t2.focus(), t2 = null);
88
88
  }
89
89
  return o((() => {
90
- r2();
90
+ l2();
91
91
  })), { activate: function() {
92
92
  n2 || (t2 = document.activeElement, n2 = true, document.addEventListener("keydown", a2));
93
- }, deactivate: r2 };
93
+ }, deactivate: l2 };
94
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++}`;
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
98
  return s(t2);
99
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
- }));
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))));
108
105
  }
106
+ return c((() => S(h({ locale: e2.value.name, messages: { en: B.el, [e2.value.name]: e2.value.el } }))));
109
107
  }
110
- function $(e2) {
108
+ function O(e2) {
111
109
  const t2 = c((() => e2.getLastBottomOffset())), n2 = c((() => e2.offset + t2.value)), o2 = c((() => n2.value + e2.boxHeight.value));
112
110
  return { topOffset: n2, bottomOffset: o2 };
113
111
  }
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) };
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) };
118
116
  }
119
- function C() {
117
+ function F() {
120
118
  const e2 = s(false);
121
119
  let t2 = null, o2 = null;
122
120
  return n((() => {
@@ -127,28 +125,28 @@ function C() {
127
125
  t2 && o2 && (t2.removeEventListener ? t2.removeEventListener("change", o2) : t2.removeListener(o2));
128
126
  })), { prefersDark: e2, prefers: c((() => e2.value ? "dark" : "light")) };
129
127
  }
130
- const F = "px-theme", N = "px-dark", Y = s("system"), A = s(false);
131
- function H(e2) {
128
+ const H = "px-theme", N = "px-dark", Y = s("system"), A = s(false);
129
+ function K(e2) {
132
130
  "undefined" != typeof document && (e2 ? document.documentElement.classList.add(N) : document.documentElement.classList.remove(N));
133
131
  }
134
- function K(e2) {
132
+ function R(e2) {
135
133
  return "system" === e2 ? "undefined" != typeof window && window.matchMedia("(prefers-color-scheme: dark)").matches : "dark" === e2;
136
134
  }
137
- let R = false;
138
- function V() {
139
- if (!R && "undefined" != typeof window) {
135
+ let V = false;
136
+ function X() {
137
+ if (!V && "undefined" != typeof window) {
140
138
  !(function() {
141
139
  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;
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;
145
143
  const e3 = window.matchMedia("(prefers-color-scheme: dark)"), t2 = (e4) => {
146
- "system" === Y.value && (A.value = e4.matches, H(A.value));
144
+ "system" === Y.value && (A.value = e4.matches, K(A.value));
147
145
  };
148
146
  e3.addEventListener ? e3.addEventListener("change", t2) : e3.addListener(t2);
149
147
  }
150
148
  const e2 = (e3) => {
151
- Y.value = e3, A.value = K(e3), H(A.value), "undefined" != typeof localStorage && localStorage.setItem(F, e3);
149
+ Y.value = e3, A.value = R(e3), K(A.value), "undefined" != typeof localStorage && localStorage.setItem(H, e3);
152
150
  };
153
151
  return { theme: c((() => Y.value)), isDark: c((() => A.value)), setTheme: e2, toggleTheme: () => {
154
152
  const t2 = A.value ? "light" : "dark";
@@ -156,16 +154,17 @@ function V() {
156
154
  } };
157
155
  }
158
156
  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
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
171
170
  };