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
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sakana-element",
3
- "version": "2.4.2",
3
+ "version": "2.5.0",
4
4
  "description": "A pixel-style Vue 3 component library, built with TypeScript and Vitest",
5
5
  "type": "module",
6
6
  "main": "./dist/umd/index.umd.cjs",
@@ -47,7 +47,6 @@
47
47
  "@popperjs/core": "^2.11.8"
48
48
  },
49
49
  "devDependencies": {
50
- "@rollup/plugin-terser": "^0.4.4",
51
50
  "@sakana-element/components": "workspace:*",
52
51
  "terser": "^5.39.0",
53
52
  "vite-plugin-compression2": "^1.3.3"
@@ -1,19 +0,0 @@
1
- import { t as e, r as t, S as l, c as o, _ as s, w as a } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as c, useSlots as n, ref as i, computed as r, createBlock as p, openBlock as u, Transition as d, withCtx as f, withDirectives as _, createElementVNode as y, normalizeStyle as x, normalizeClass as v, createCommentVNode as m, createElementBlock as h, renderSlot as k, createTextVNode as w, toDisplayString as B, createVNode as I, withModifiers as b, vShow as $ } from "vue";
3
- import { P as g } from "./Icon-BulvH9Wm.js";
4
- const P = { class: "px-alert__content" }, j = { key: 0, class: "px-alert__description" }, A = { key: 1, class: "px-alert__close" }, C = a(s(c({ name: "PxAlert", __name: "Alert", props: { title: {}, type: { default: "info" }, description: {}, effect: { default: "light" }, closable: { type: Boolean, default: true }, center: { type: Boolean }, showIcon: { type: Boolean }, outline: { type: Boolean }, dash: { type: Boolean }, color: {} }, emits: ["close"], setup(s2, { expose: a2, emit: c2 }) {
5
- const C2 = s2, S = c2, q = n(), z = i(true), D = r((() => e.get(C2.type) ?? "circle-info")), E = r((() => C2.description || q.default)), F = r((() => {
6
- if (!C2.color) return {};
7
- const e2 = C2.outline ? "outline" : C2.dash ? "dash" : "default";
8
- return t(o(C2.color), "px-alert", l[e2]);
9
- }));
10
- function G() {
11
- z.value = false, S("close");
12
- }
13
- return a2({ open: function() {
14
- z.value = true;
15
- }, close: G }), (e2, t2) => (u(), p(d, { name: "px-alert-fade" }, { default: f((() => [_(y("div", { class: v(["px-alert", { [`px-alert__${e2.type}`]: e2.type, [`px-alert__${e2.effect}`]: e2.effect, "text-center": e2.center, "is-outline": e2.outline, "is-dash": e2.dash }]), role: "alert", style: x(F.value) }, [e2.showIcon ? (u(), p(g, { key: 0, class: v(["px-alert__icon", { "big-icon": E.value }]), icon: D.value }, null, 8, ["class", "icon"])) : m("", true), y("div", P, [y("span", { class: v(["px-alert__title", { "with-desc": E.value }]), style: x({ display: e2.center && !e2.showIcon ? "block" : "inline" }) }, [k(e2.$slots, "title", {}, (() => [w(B(e2.title), 1)]), true)], 6), E.value ? (u(), h("p", j, [k(e2.$slots, "default", {}, (() => [w(B(e2.description), 1)]), true)])) : m("", true), e2.closable ? (u(), h("div", A, [I(g, { onClick: b(G, ["stop"]), icon: "close" })])) : m("", true)])], 6), [[$, z.value]])])), _: 3 }));
16
- } }), [["__scopeId", "data-v-772da9f8"]]));
17
- export {
18
- C as P
19
- };
@@ -1,9 +0,0 @@
1
- import { r as a, c as e, S as s, _ as r, w as t } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as o, computed as l, createElementBlock as p, openBlock as u, normalizeStyle as d, normalizeClass as i, renderSlot as c } from "vue";
3
- const f = t(r(o({ name: "PxAvatar", __name: "Avatar", props: { size: { default: "default" }, shape: { default: "circle" }, border: { type: Boolean, default: true }, color: {} }, setup(r2) {
4
- const t2 = r2, o2 = l((() => t2.color ? a(e(t2.color), "px-avatar", s.default) : {}));
5
- return (a2, e2) => (u(), p("span", { class: i(["px-avatar", { [`px-avatar--${a2.size}`]: a2.size && "default" !== a2.size, "is-square": "square" === a2.shape, "is-border": a2.border }]), style: d(o2.value) }, [c(a2.$slots, "default", {}, void 0, true)], 6));
6
- } }), [["__scopeId", "data-v-be451b35"]]));
7
- export {
8
- f as P
9
- };
@@ -1,14 +0,0 @@
1
- import { r as e, S as s, c as o, _ as a, w as t } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as l, useSlots as i, computed as n, createElementBlock as u, openBlock as d, normalizeStyle as r, normalizeClass as p, createBlock as c, createCommentVNode as f, renderSlot as m } from "vue";
3
- import { P as y } from "./Icon-BulvH9Wm.js";
4
- const x = t(a(l({ name: "PxBadge", __name: "Badge", props: { type: { default: "primary" }, size: { default: "default" }, outline: { type: Boolean }, dash: { type: Boolean }, color: {}, round: { type: Boolean }, icon: {} }, setup(a2) {
5
- const t2 = a2, l2 = i(), x2 = n((() => !l2.default)), z = n((() => "small" === t2.size ? "xs" : "sm")), g = n((() => {
6
- if (!t2.color) return {};
7
- const a3 = t2.outline ? "outline" : t2.dash ? "dash" : "default";
8
- return e(o(t2.color), "px-badge", s[a3]);
9
- }));
10
- return (e2, s2) => (d(), u("span", { class: p(["px-badge", { [`px-badge--${e2.type}`]: e2.type, [`px-badge--${e2.size}`]: e2.size && "default" !== e2.size, "is-outline": e2.outline, "is-dash": e2.dash, "is-round": e2.round, "is-empty": x2.value }]), style: r(g.value) }, [e2.icon ? (d(), c(y, { key: 0, icon: e2.icon, size: z.value }, null, 8, ["icon", "size"])) : f("", true), m(e2.$slots, "default", {}, void 0, true)], 6));
11
- } }), [["__scopeId", "data-v-b16297ef"]]));
12
- export {
13
- x as P
14
- };
@@ -1,15 +0,0 @@
1
- import { _ as a, w as r } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as e, useSlots as s, provide as o, createElementBlock as t, openBlock as d, createElementVNode as l, renderSlot as c, inject as i, normalizeClass as p, createBlock as b, resolveDynamicComponent as n, mergeProps as u, withModifiers as m, withCtx as _, createCommentVNode as f, unref as x, Fragment as v, createTextVNode as B, toDisplayString as k } from "vue";
3
- import { P as y } from "./Icon-BulvH9Wm.js";
4
- const I = Symbol("breadcrumbContext"), P = { class: "px-breadcrumb", "aria-label": "Breadcrumb" }, S = { class: "px-breadcrumb__list" }, h = a(e({ name: "PxBreadcrumb", __name: "Breadcrumb", props: { separator: { default: "/" } }, setup(a2) {
5
- const r2 = a2, e2 = s();
6
- return o(I, { separator: r2.separator, separatorSlot: e2.separator }), (a3, r3) => (d(), t("nav", P, [l("ol", S, [c(a3.$slots, "default", {}, void 0, true)])]));
7
- } }), [["__scopeId", "data-v-a0927948"]]), j = { class: "px-breadcrumb__separator", "aria-hidden": "true" }, C = a(e({ name: "PxBreadcrumbItem", __name: "BreadcrumbItem", props: { to: {}, icon: {}, disabled: { type: Boolean } }, setup(a2) {
8
- const r2 = i(I, { separator: "/" });
9
- return (a3, e2) => (d(), t("li", { class: p(["px-breadcrumb__item", { "is-disabled": a3.disabled }]) }, [(d(), b(n(a3.to && !a3.disabled ? "a" : "span"), u({ class: ["px-breadcrumb__link", { "is-current": !a3.to, "is-disabled": a3.disabled }], "aria-current": a3.to || a3.disabled ? void 0 : "page" }, a3.to && !a3.disabled ? { href: a3.to } : {}, { onClick: e2[0] || (e2[0] = m((() => {
10
- }), ["prevent"])) }), { default: _((() => [a3.icon ? (d(), b(y, { key: 0, icon: a3.icon, class: "px-breadcrumb__icon" }, null, 8, ["icon"])) : f("", true), c(a3.$slots, "default", {}, void 0, true)])), _: 3 }, 16, ["class", "aria-current"])), l("span", j, [x(r2).separatorSlot ? (d(), b(n((() => x(r2).separatorSlot())), { key: 0 })) : (d(), t(v, { key: 1 }, [B(k(x(r2).separator), 1)], 64))])], 2));
11
- } }), [["__scopeId", "data-v-8be388ff"]]), $ = r(h), g = r(C);
12
- export {
13
- $ as P,
14
- g as a
15
- };
@@ -1,24 +0,0 @@
1
- import { d as o, l as t, c as r, r as e, _ as l, w as a } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as i, useSlots as s, inject as c, ref as n, computed as d, onBeforeUnmount as b, createBlock as p, openBlock as g, resolveDynamicComponent as u, unref as v, normalizeStyle as h, normalizeClass as y, withCtx as x, renderSlot as k, createCommentVNode as f, createVNode as B, provide as m, reactive as _, toRef as z, createElementBlock as w } from "vue";
3
- import { P as T } from "./Icon-BulvH9Wm.js";
4
- import { t as $ } from "./vendor-eombfMkP.js";
5
- const I = Symbol("BUTTON_GROUP_CTX_KEY"), P = { link: { "text-color": "color", "bg-color": "transparent", "border-color": "transparent", "shadow-color": "transparent", "hover-text-color": "dark", "hover-bg-color": "transparent", "hover-border-color": "transparent", "active-text-color": "dark", "active-bg-color": "transparent", "active-border-color": "transparent", "disabled-text-color": "light", "disabled-bg-color": "transparent", "disabled-border-color": "transparent" }, ghost: { "text-color": "color", "bg-color": "transparent", "border-color": "transparent", "shadow-color": "transparent", "hover-text-color": "dark", "hover-bg-color": "lighter", "hover-border-color": "transparent", "active-text-color": "dark", "active-bg-color": "light", "active-border-color": "transparent", "disabled-text-color": "light", "disabled-bg-color": "transparent", "disabled-border-color": "transparent" }, dash: { "text-color": "color", "bg-color": "lighter", "border-color": "color", "shadow-color": "transparent", "hover-text-color": "dark", "hover-bg-color": "light", "hover-border-color": "dark", "active-text-color": "dark", "active-bg-color": "color", "active-border-color": "dark", "disabled-text-color": "light", "disabled-bg-color": "lighter", "disabled-border-color": "light" }, plain: { "text-color": "color", "bg-color": "lighter", "border-color": "color", "hover-text-color": "contrast", "hover-bg-color": "color", "hover-border-color": "color", "active-text-color": "contrast", "active-bg-color": "dark", "active-border-color": "dark", "disabled-text-color": "light", "disabled-bg-color": "lighter", "disabled-border-color": "light" }, default: { "text-color": "contrast", "bg-color": "color", "border-color": "dark", "shadow-color": "dark", "hover-text-color": "contrast", "hover-bg-color": "light", "hover-border-color": "color", "active-text-color": "contrast", "active-bg-color": "dark", "active-border-color": "dark", "disabled-text-color": "contrast", "disabled-bg-color": "light", "disabled-border-color": "light" } }, j = l(i({ name: "PxButton", __name: "Button", props: { tag: { default: "button" }, type: {}, size: {}, nativeType: { default: "button" }, disabled: { type: Boolean }, loading: { type: Boolean }, icon: {}, circle: { type: Boolean }, plain: { type: Boolean }, round: { type: Boolean }, dash: { type: Boolean }, ghost: { type: Boolean }, link: { type: Boolean }, block: { type: Boolean }, responsive: { type: Boolean }, color: {}, loadingIcon: {}, ariaLabel: {}, autofocus: { type: Boolean }, useThrottle: { type: Boolean, default: true }, throttleDuration: { default: 500 } }, emits: ["click"], setup(l2, { expose: a2, emit: i2 }) {
6
- const m2 = /* @__PURE__ */ new Set(["button", "a", "div", "span", "router-link"]), _2 = l2;
7
- "string" != typeof _2.tag || m2.has(_2.tag) || o("PxButton", `Invalid tag "${_2.tag}". Allowed tags: ${[...m2].join(", ")}. Falling back to "button".`);
8
- const z2 = i2, w2 = s(), j2 = c(I, void 0), G2 = n(), C2 = d((() => "string" != typeof _2.tag || m2.has(_2.tag) ? _2.tag : "button")), D2 = d((() => (j2 == null ? void 0 : j2.size) ?? (_2 == null ? void 0 : _2.size) ?? "")), L2 = d((() => (j2 == null ? void 0 : j2.type) ?? (_2 == null ? void 0 : _2.type) ?? "")), O = d((() => (j2 == null ? void 0 : j2.disabled) || (_2 == null ? void 0 : _2.disabled) || false)), R = d((() => ({ marginRight: w2.default ? "6px" : "0px" }))), S = d((() => {
9
- if (!_2.color) return {};
10
- const o2 = { ...r(_2.color), light: t(_2.color, 20), lighter: t(_2.color, 35) }, l3 = _2.ghost ? "ghost" : _2.dash ? "dash" : _2.plain ? "plain" : _2.link ? "link" : "default";
11
- return e(o2, "px-button", P[l3]);
12
- })), U = (o2) => z2("click", o2), A = $(U, _2.throttleDuration, { trailing: false });
13
- return b((() => {
14
- A.cancel();
15
- })), a2({ ref: G2, disabled: O, size: D2, type: L2 }), (o2, t2) => (g(), p(u(C2.value), { ref_key: "_ref", ref: G2, autofocus: o2.autofocus, type: "button" === C2.value ? o2.nativeType : void 0, class: y(["px-button", { [`px-button--${L2.value}`]: L2.value, [`px-button--${D2.value}`]: D2.value, "is-plain": o2.plain, "is-round": o2.round, "is-circle": o2.circle, "is-dash": o2.dash, "is-ghost": o2.ghost, "is-link": o2.link, "is-block": o2.block, "is-responsive": o2.responsive, "is-disabled": O.value, "is-loading": o2.loading }]), "aria-label": o2.ariaLabel, "aria-busy": o2.loading || void 0, disabled: !(!O.value && !o2.loading) || void 0, style: h(S.value), onClick: t2[0] || (t2[0] = (t3) => o2.useThrottle ? v(A)(t3) : U(t3)) }, { default: x((() => [o2.loading ? k(o2.$slots, "loading", { key: 0 }, (() => [B(T, { class: "loading-icon", icon: o2.loadingIcon ?? "loader", style: h(R.value), size: "1x", spin: "" }, null, 8, ["icon", "style"])]), true) : f("", true), o2.icon && !o2.loading ? (g(), p(T, { key: 1, icon: o2.icon, style: h(R.value), size: "1x" }, null, 8, ["icon", "style"])) : f("", true), k(o2.$slots, "default", {}, void 0, true)])), _: 3 }, 8, ["autofocus", "type", "aria-label", "aria-busy", "disabled", "class", "style"]));
16
- } }), [["__scopeId", "data-v-0d682c9b"]]), G = { class: "px-button-group", role: "group" }, C = l(i({ name: "PxButtonGroup", __name: "ButtonGroup", props: { size: {}, type: {}, disabled: { type: Boolean } }, setup(o2) {
17
- const t2 = o2;
18
- return m(I, _({ size: z(t2, "size"), type: z(t2, "type"), disabled: z(t2, "disabled") })), (o3, t3) => (g(), w("div", G, [k(o3.$slots, "default", {}, void 0, true)]));
19
- } }), [["__scopeId", "data-v-87af5dc3"]]), D = a(j), L = a(C);
20
- export {
21
- L as P,
22
- D as a,
23
- j as b
24
- };
@@ -1,16 +0,0 @@
1
- import { r as o, S as a, c as e, _ as s, w as r } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as t, useSlots as d, computed as l, createElementBlock as c, openBlock as n, normalizeStyle as p, normalizeClass as i, createCommentVNode as h, createElementVNode as u, unref as v, renderSlot as y } from "vue";
3
- const x = { key: 0, class: "px-card__header" }, _ = { class: "px-card__body" }, f = { key: 1, class: "px-card__footer" }, w = r(s(t({ name: "PxCard", __name: "Card", props: { type: {}, color: {}, hoverable: { type: Boolean }, shadow: { type: [Boolean, String], default: "always" }, size: {}, outline: { type: Boolean }, dash: { type: Boolean }, ghost: { type: Boolean } }, setup(s2) {
4
- const r2 = { "text-color": "color", "bg-color": "transparent", "border-color": "transparent", "shadow-color": "transparent" }, t2 = s2, w2 = d(), g = l((() => {
5
- const o2 = t2.shadow;
6
- return true === o2 ? "px-card--shadow-always" : false === o2 ? "px-card--shadow-never" : `px-card--shadow-${o2}`;
7
- })), b = l((() => {
8
- if (!t2.color) return {};
9
- const s3 = t2.ghost ? "ghost" : t2.outline ? "outline" : t2.dash ? "dash" : "default", d2 = { ...a, ghost: r2 };
10
- return o(e(t2.color), "px-card", d2[s3]);
11
- }));
12
- return (o2, a2) => (n(), c("div", { class: i(["px-card", [g.value, { [`px-card--${o2.type}`]: o2.type, [`px-card--${o2.size}`]: o2.size, "is-hoverable": o2.hoverable, "is-outline": o2.outline, "is-dash": o2.dash, "is-ghost": o2.ghost }]]), style: p(b.value) }, [v(w2).header ? (n(), c("div", x, [y(o2.$slots, "header", {}, void 0, true)])) : h("", true), u("div", _, [y(o2.$slots, "default", {}, void 0, true)]), v(w2).footer ? (n(), c("div", f, [y(o2.$slots, "footer", {}, void 0, true)])) : h("", true)], 6));
13
- } }), [["__scopeId", "data-v-f3900769"]]));
14
- export {
15
- w as P
16
- };
@@ -1,9 +0,0 @@
1
- import { r as a, c as t, _ as e, w as s } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as l, useSlots as o, computed as c, createElementBlock as r, openBlock as p, normalizeStyle as n, normalizeClass as b, createCommentVNode as _, createElementVNode as d, unref as m, renderSlot as u, toDisplayString as h } from "vue";
3
- const i = { "bubble-text-color": "contrast", "bubble-bg-color": "color", "bubble-border-color": "dark", "bubble-shadow-color": "dark" }, x = { key: 0, class: "px-chat__avatar" }, v = { class: "px-chat__content" }, y = { key: 0, class: "px-chat__header" }, f = { key: 0, class: "px-chat__name" }, k = { key: 1, class: "px-chat__time" }, $ = { class: "px-chat__bubble" }, w = { key: 1, class: "px-chat__footer" }, B = s(e(l({ name: "PxChatBubble", __name: "ChatBubble", props: { placement: { default: "start" }, type: {}, color: {}, name: {}, time: {}, status: {} }, setup(e2) {
4
- const s2 = e2, l2 = o(), B2 = c((() => s2.color ? a(t(s2.color), "px-chat", i) : {}));
5
- return (a2, t2) => (p(), r("div", { class: b(["px-chat", { [`px-chat--${a2.placement}`]: a2.placement, [`px-chat--${a2.type}`]: a2.type }]), style: n(B2.value) }, [m(l2).avatar ? (p(), r("div", x, [u(a2.$slots, "avatar", {}, void 0, true)])) : _("", true), d("div", v, [m(l2).header || a2.name || a2.time ? (p(), r("div", y, [u(a2.$slots, "header", {}, (() => [a2.name ? (p(), r("span", f, h(a2.name), 1)) : _("", true), a2.time ? (p(), r("span", k, h(a2.time), 1)) : _("", true)]), true)])) : _("", true), d("div", $, [t2[0] || (t2[0] = d("span", { class: "px-chat__tail" }, null, -1)), u(a2.$slots, "default", {}, void 0, true)]), m(l2).footer || a2.status ? (p(), r("div", w, [u(a2.$slots, "footer", {}, (() => [d("span", null, h(a2.status), 1)]), true)])) : _("", true)])], 6));
6
- } }), [["__scopeId", "data-v-c022026d"]]));
7
- export {
8
- B as P
9
- };
@@ -1,51 +0,0 @@
1
- import { c as e, r as a, w as l } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as o, useSlots as c, inject as t, ref as u, computed as i, onMounted as n, watch as s, createElementBlock as d, openBlock as r, normalizeStyle as m, normalizeClass as p, createElementVNode as v, createCommentVNode as h, unref as x, renderSlot as b, createTextVNode as k, toDisplayString as f, provide as y } from "vue";
3
- import { u as _ } from "./hooks-dJGu-5DG.js";
4
- import { u as g } from "./Form-C1b8Igns.js";
5
- const V = Symbol("checkboxGroupContext"), z = { "checked-color": "color", "checked-border-color": "dark" }, C = { class: "px-checkbox__input" }, B = ["aria-checked", "id", "name", "disabled", "checked"], $ = { key: 0, class: "px-checkbox__label" }, j = o({ name: "PxCheckbox", inheritAttrs: false, __name: "Checkbox", props: { modelValue: { type: Boolean, default: false }, value: { type: [String, Number, Boolean] }, disabled: { type: Boolean, default: false }, indeterminate: { type: Boolean, default: false }, size: {}, type: {}, color: {}, label: {}, name: {}, id: {} }, emits: ["update:modelValue", "change"], setup(l2, { expose: o2, emit: y2 }) {
6
- const j2 = l2, G2 = y2, P2 = c(), E2 = t(V, void 0), I2 = !!E2, { formItem: S } = g(), w = u(), A = _().value, F = i((() => I2 ? E2.modelValue.value.includes(j2.value) : j2.modelValue)), N = i((() => {
7
- if (E2 == null ? void 0 : E2.disabled.value) return true;
8
- if (I2) {
9
- const e2 = E2.modelValue.value, a2 = E2.min.value, l3 = E2.max.value;
10
- if (F.value && void 0 !== a2 && e2.length <= a2) return true;
11
- if (!F.value && void 0 !== l3 && e2.length >= l3) return true;
12
- }
13
- return j2.disabled;
14
- })), O = i((() => j2.size ?? (E2 == null ? void 0 : E2.size.value))), R = i((() => j2.type ?? (E2 == null ? void 0 : E2.type.value))), q = i((() => j2.color ?? (E2 == null ? void 0 : E2.color.value))), D = i((() => {
15
- const l3 = q.value;
16
- if (!l3) return {};
17
- const o3 = e(l3);
18
- return a(o3, "px-checkbox", z);
19
- }));
20
- function H() {
21
- if (!N.value) {
22
- if (I2) {
23
- const e2 = [...E2.modelValue.value], a2 = j2.value, l3 = e2.indexOf(a2);
24
- l3 > -1 ? e2.splice(l3, 1) : e2.push(a2), E2.changeEvent(e2);
25
- } else {
26
- const e2 = !F.value;
27
- G2("update:modelValue", e2), G2("change", e2);
28
- }
29
- I2 || (S == null ? void 0 : S.validate("change").catch(((e2) => {
30
- })));
31
- }
32
- }
33
- return n((() => {
34
- w.value && (w.value.indeterminate = j2.indeterminate);
35
- })), s((() => j2.indeterminate), ((e2) => {
36
- w.value && (w.value.indeterminate = e2);
37
- })), o2({ checked: F, focus: () => {
38
- var _a;
39
- (_a = w.value) == null ? void 0 : _a.focus();
40
- } }), (e2, a2) => (r(), d("div", { class: p(["px-checkbox", { [`px-checkbox--${O.value}`]: O.value, [`px-checkbox--${R.value}`]: R.value, "is-disabled": N.value, "is-checked": F.value, "is-indeterminate": e2.indeterminate }]), style: m(D.value), onClick: H }, [v("span", C, [v("input", { ref_key: "inputRef", ref: w, class: "px-checkbox__original", type: "checkbox", "aria-checked": F.value, id: e2.id || x(A), name: e2.name, disabled: N.value, checked: F.value }, null, 8, B), a2[0] || (a2[0] = v("span", { class: "px-checkbox__inner" }, [v("span", { class: "px-checkbox__tick" })], -1))]), e2.label || x(P2).default ? (r(), d("span", $, [b(e2.$slots, "default", {}, (() => [k(f(e2.label), 1)]))])) : h("", true)], 6));
41
- } }), G = { class: "px-checkbox-group", role: "group" }, P = o({ name: "PxCheckboxGroup", __name: "CheckboxGroup", props: { modelValue: {}, disabled: { type: Boolean, default: false }, size: {}, type: {}, color: {}, min: {}, max: {} }, emits: ["update:modelValue", "change"], setup(e2, { emit: a2 }) {
42
- const l2 = e2, o2 = a2, { formItem: c2 } = g();
43
- return y(V, { modelValue: i((() => l2.modelValue)), disabled: i((() => l2.disabled)), size: i((() => l2.size)), type: i((() => l2.type)), color: i((() => l2.color)), min: i((() => l2.min)), max: i((() => l2.max)), changeEvent: (e3) => {
44
- o2("update:modelValue", e3), o2("change", e3), c2 == null ? void 0 : c2.validate("change").catch(((e4) => {
45
- }));
46
- } }), (e3, a3) => (r(), d("div", G, [b(e3.$slots, "default")]));
47
- } }), E = l(j), I = l(P);
48
- export {
49
- E as P,
50
- I as a
51
- };
@@ -1,53 +0,0 @@
1
- import { c as e, r as o, _ as a, w as l } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as t, ref as s, computed as n, watchEffect as c, watch as i, provide as r, createElementBlock as d, openBlock as p, normalizeStyle as u, normalizeClass as m, renderSlot as v, inject as h, createElementVNode as f, createVNode as g, unref as b, createBlock as x, createCommentVNode as _, createTextVNode as w, toDisplayString as y, Transition as C, mergeProps as I, toHandlers as P, withCtx as $, withDirectives as k, vShow as B } from "vue";
3
- import { P as O } from "./Icon-BulvH9Wm.js";
4
- const V = Symbol("collapseContext"), A = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), j = { default: { "border-color": "color", "shadow-color": "dark", "active-bg-color": "light" }, ghost: { "border-color": "transparent", "shadow-color": "transparent", "active-bg-color": "transparent" } }, E = a(t({ name: "PxCollapse", __name: "Collapse", props: { modelValue: {}, accordion: { type: Boolean }, color: {}, ghost: { type: Boolean }, trigger: {}, iconPlacement: {} }, emits: ["update:modelValue", "change"], setup(a2, { emit: l2 }) {
5
- const t2 = a2, h2 = l2, f2 = s(t2.modelValue);
6
- t2.accordion && f2.value.length > 1 && (f2.value = [f2.value[0]]);
7
- const g2 = n((() => A.has(t2.color ?? ""))), b2 = n((() => !!t2.color && !g2.value)), x2 = n((() => {
8
- if (!b2.value) return {};
9
- const a3 = e(t2.color), l3 = t2.ghost ? "ghost" : "default";
10
- return o(a3, "px-collapse", j[l3]);
11
- }));
12
- function _2(e2) {
13
- f2.value = e2, h2("update:modelValue", e2), h2("change", e2);
14
- }
15
- return c((() => {
16
- t2.accordion && f2.value.length;
17
- })), i((() => t2.modelValue), ((e2) => _2(e2))), r(V, { activeNames: f2, handleItemClick: function(e2) {
18
- let o2 = [...f2.value];
19
- if (t2.accordion) return o2 = [o2[0] === e2 ? "" : e2], void _2(o2);
20
- const a3 = o2.indexOf(e2);
21
- a3 > -1 ? o2.splice(a3, 1) : o2.push(e2), _2(o2);
22
- }, color: t2.color, ghost: t2.ghost, trigger: t2.trigger, iconPlacement: t2.iconPlacement }), (e2, o2) => (p(), d("div", { class: m(["px-collapse", { "is-ghost": e2.ghost, [`px-collapse--${e2.color}`]: g2.value }]), style: u(x2.value) }, [v(e2.$slots, "default", {}, void 0, true)], 6));
23
- } }), [["__scopeId", "data-v-7f3e3aa8"]]), F = (e2) => e2.style.height = "0px", L = (e2) => e2.style.height = `${e2.scrollHeight}px`, N = (e2) => e2.style.height = "", S = (e2) => e2.style.overflow = "hidden", H = (e2) => e2.style.overflow = "", q = { beforeEnter(e2) {
24
- F(e2), S(e2);
25
- }, enter: (e2) => L(e2), afterEnter(e2) {
26
- N(e2), H(e2);
27
- }, beforeLeave(e2) {
28
- L(e2), S(e2);
29
- }, leave: (e2) => F(e2), afterLeave(e2) {
30
- N(e2), H(e2);
31
- } }, z = ["id", "aria-expanded", "aria-controls", "tabindex"], D = { class: "px-collapse-item__title" }, G = { class: "px-collapse-item__wapper" }, J = ["id"], K = a(t({ name: "PxCollapseItem", __name: "CollapseItem", props: { name: {}, title: {}, disabled: { type: Boolean }, showArrow: { type: Boolean, default: true }, icon: {}, forceOpen: { type: Boolean }, forceClose: { type: Boolean } }, setup(e2) {
32
- const o2 = e2, a2 = h(V, void 0), l2 = n((() => {
33
- var _a;
34
- return !o2.forceClose && (!!o2.forceOpen || ((_a = a2 == null ? void 0 : a2.activeNames.value) == null ? void 0 : _a.includes(o2.name)));
35
- })), t2 = n((() => "focus" === (a2 == null ? void 0 : a2.trigger))), s2 = n((() => o2.icon ? "plus" === o2.icon ? l2.value ? "minus" : "plus" : o2.icon : "chevron-right"));
36
- function c2() {
37
- o2.disabled || o2.forceOpen || o2.forceClose || t2.value || (a2 == null ? void 0 : a2.handleItemClick(o2.name));
38
- }
39
- function i2() {
40
- o2.disabled || o2.forceOpen || o2.forceClose || t2.value && (l2.value || (a2 == null ? void 0 : a2.handleItemClick(o2.name)));
41
- }
42
- function r2(e3) {
43
- o2.disabled || o2.forceOpen || o2.forceClose || t2.value && l2.value && (a2 == null ? void 0 : a2.handleItemClick(o2.name));
44
- }
45
- return (e3, o3) => {
46
- var _a;
47
- return p(), d("div", { class: m(["px-collapse-item", { "is-disabled": e3.disabled }]) }, [f("div", { class: m(["px-collapse-item__header", { "is-disabled": e3.disabled, "is-active": l2.value, "is-hidden-arrow": false === e3.showArrow, "is-icon-start": "start" === ((_a = b(a2)) == null ? void 0 : _a.iconPlacement) }]), id: `item-header-${e3.name}`, role: "button", "aria-expanded": l2.value, "aria-controls": `item-content-${e3.name}`, tabindex: t2.value ? 0 : void 0, onClick: c2, onFocus: i2, onFocusout: r2 }, [f("span", D, [v(e3.$slots, "title", {}, (() => [w(y(e3.title), 1)]), true)]), false !== e3.showArrow ? (p(), x(O, { key: 0, icon: s2.value, class: m(["header-angle", { "is-toggle-icon": !!e3.icon }]) }, null, 8, ["icon", "class"])) : _("", true)], 42, z), g(C, I({ name: "slide" }, P(b(q))), { default: $((() => [k(f("div", G, [f("div", { class: "px-collapse-item__content", id: `item-content-${e3.name}` }, [v(e3.$slots, "default", {}, void 0, true)], 8, J)], 512), [[B, l2.value]])])), _: 3 }, 16)], 2);
48
- };
49
- } }), [["__scopeId", "data-v-f3406cbb"]]), M = l(E), Q = l(K);
50
- export {
51
- M as P,
52
- Q as a
53
- };
@@ -1,45 +0,0 @@
1
- import { w as e } from "./utils-CnCdZsHG.js";
2
- import { ref as o, getCurrentInstance as n, unref as t, watch as a, provide as l, inject as s, computed as r, defineComponent as c, renderSlot as i } from "vue";
3
- import { m as u, o as d } from "./vendor-eombfMkP.js";
4
- import { I as m } from "./hooks-dJGu-5DG.js";
5
- const p = { 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" } } }, g = Symbol(), v = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
6
- function f(e2, ...o2) {
7
- return u(e2, ...o2, ((e3, o3, n2) => {
8
- if (v.has(n2)) return e3;
9
- }));
10
- }
11
- const x = o();
12
- function h(e2, o2 = void 0) {
13
- const t2 = n() ? s(g, x) : x;
14
- return e2 ? r((() => {
15
- var _a;
16
- return ((_a = t2.value) == null ? void 0 : _a[e2]) ?? o2;
17
- })) : t2;
18
- }
19
- const _ = (e2) => {
20
- var _a, _b, _c;
21
- const o2 = (o3) => f(o3, (e2 == null ? void 0 : e2.extendsI18nMsg) ?? {});
22
- return d((e2 == null ? void 0 : e2.locale) ? { locale: ((_a = e2.locale) == null ? void 0 : _a.name) || "en", messages: o2({ en: p.el, [(_b = e2.locale) == null ? void 0 : _b.name]: ((_c = e2.locale) == null ? void 0 : _c.el) ?? {} }) } : { locale: "en", messages: o2({ en: p.el }) });
23
- };
24
- function w(e2 = { locale: p }, s2, r2 = false) {
25
- const c2 = n(), i2 = c2 ? h() : void 0, u2 = (s2 == null ? void 0 : s2.provide) ?? (c2 ? l : void 0);
26
- if (!u2) return;
27
- const d2 = o(t(e2));
28
- a((() => e2), ((e3) => {
29
- const o2 = t(e3);
30
- if (!(i2 == null ? void 0 : i2.value)) return o2;
31
- d2.value = f(i2.value, o2);
32
- }), { deep: true });
33
- const v2 = o(_(d2.value));
34
- return a((() => d2.value), ((e3) => v2.value = _(e3)), { deep: true }), u2(g, d2), u2(m, v2), !r2 && x.value || (x.value = d2.value), d2;
35
- }
36
- const C = e(c({ name: "PxConfigProvider", __name: "ConfigProvider", props: { locale: {}, extendsI18nMsg: {} }, setup(e2) {
37
- const o2 = w(e2);
38
- return (e3, n2) => i(e3.$slots, "default", { config: t(o2) });
39
- } }));
40
- export {
41
- p as E,
42
- C as P,
43
- w as p,
44
- h as u
45
- };
@@ -1,64 +0,0 @@
1
- import { a as e, b as n, p as t, w as o } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as i, ref as a, computed as r, watch as l, onBeforeUnmount as s, createElementBlock as u, openBlock as c, normalizeStyle as v, normalizeClass as d, createElementVNode as f, renderSlot as p, createCommentVNode as w, Fragment as m, withModifiers as h } from "vue";
3
- const g = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), y = ["src"], x = { class: "px-diff__after" }, _ = ["src"], L = ["aria-valuenow"], E = o(i({ name: "PxDiff", __name: "Diff", props: { src: {}, pixelSize: { default: 8 }, grayscale: { type: Boolean, default: false }, palette: {}, background: { default: "#FFFFFF" }, initialPosition: { default: 50 }, width: {}, height: {}, color: {} }, emits: ["change", "rendered", "error"], setup(o2, { expose: i2, emit: E2 }) {
4
- const k = o2, b = E2, P = a(), F = a(), R = a(), S = a(false), $ = a(false), z = a(e(k.initialPosition, 0, 100)), D = r((() => {
5
- const e2 = {};
6
- return null != k.width && (e2.width = n(k.width) ?? ""), null != k.height && (e2.height = n(k.height) ?? ""), e2;
7
- })), X = r((() => {
8
- const e2 = ["px-diff"];
9
- return k.color && g.has(k.color) && e2.push(`px-diff--${k.color}`), e2;
10
- })), B = r((() => ({ clipPath: `inset(0 ${100 - z.value}% 0 0)` }))), C = r((() => ({ left: `${z.value}%` })));
11
- function A() {
12
- const e2 = F.value, n2 = R.value;
13
- e2 && n2 && S.value && (t(e2, n2, { pixelSize: k.pixelSize, grayscale: k.grayscale, palette: k.palette, background: k.background }), b("rendered"));
14
- }
15
- function K() {
16
- S.value = true, A();
17
- }
18
- function M(e2) {
19
- b("error", e2);
20
- }
21
- l((() => [k.pixelSize, k.grayscale, k.palette, k.background]), (() => {
22
- S.value && A();
23
- })), l((() => k.src), (() => {
24
- S.value = false;
25
- }));
26
- let j = null;
27
- function T(n2) {
28
- var _a;
29
- const t2 = j ?? ((_a = P.value) == null ? void 0 : _a.getBoundingClientRect());
30
- if (!t2) return;
31
- const o3 = n2 - t2.left, i3 = e(o3 / t2.width * 100, 0, 100);
32
- z.value = Math.round(i3), b("change", z.value);
33
- }
34
- function q(e2) {
35
- var _a;
36
- $.value = true, j = ((_a = P.value) == null ? void 0 : _a.getBoundingClientRect()) ?? null, T("touches" in e2 ? e2.touches[0].clientX : e2.clientX), window.addEventListener("mousemove", G), window.addEventListener("mouseup", H), window.addEventListener("touchmove", G), window.addEventListener("touchend", H);
37
- }
38
- function G(e2) {
39
- $.value && T("touches" in e2 ? e2.touches[0].clientX : e2.clientX);
40
- }
41
- function H() {
42
- $.value = false, j = null, window.removeEventListener("mousemove", G), window.removeEventListener("mouseup", H), window.removeEventListener("touchmove", G), window.removeEventListener("touchend", H);
43
- }
44
- function I(n2) {
45
- const t2 = n2.shiftKey ? 10 : 1;
46
- let o3 = z.value;
47
- if ("ArrowLeft" === n2.key) o3 = e(z.value - t2, 0, 100), n2.preventDefault();
48
- else {
49
- if ("ArrowRight" !== n2.key) return;
50
- o3 = e(z.value + t2, 0, 100), n2.preventDefault();
51
- }
52
- z.value = o3, b("change", o3);
53
- }
54
- return i2({ setPosition: function(n2) {
55
- z.value = e(n2, 0, 100);
56
- }, getPosition: function() {
57
- return z.value;
58
- } }), s((() => {
59
- window.removeEventListener("mousemove", G), window.removeEventListener("mouseup", H), window.removeEventListener("touchmove", G), window.removeEventListener("touchend", H);
60
- })), (e2, n2) => (c(), u("div", { ref_key: "containerRef", ref: P, class: d(X.value), style: v(D.value) }, [f("div", { class: "px-diff__before", style: v(B.value) }, [p(e2.$slots, "before", {}, (() => [e2.src ? (c(), u("img", { key: 0, src: e2.src, class: "px-diff__img" }, null, 8, y)) : w("", true)]))], 4), f("div", x, [p(e2.$slots, "after", {}, (() => [e2.src ? (c(), u(m, { key: 0 }, [f("canvas", { ref_key: "canvasRef", ref: F, class: "px-diff__canvas" }, null, 512), f("img", { ref_key: "originRef", ref: R, src: e2.src, style: { display: "none" }, crossorigin: "anonymous", onLoad: K, onError: M }, null, 40, _)], 64)) : w("", true)]))]), f("div", { class: "px-diff__handle", style: v(C.value), role: "separator", tabindex: "0", "aria-valuenow": z.value, "aria-valuemin": "0", "aria-valuemax": "100", "aria-label": "Comparison slider", onKeydown: I }, [f("div", { class: "px-diff__handle-grip", onMousedown: h(q, ["prevent"]), onTouchstart: h(q, ["prevent"]) }, null, 32)], 44, L)], 6));
61
- } }));
62
- export {
63
- E as P
64
- };
@@ -1,9 +0,0 @@
1
- import { r as e, c as t, w as o } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as i, useSlots as r, computed as n, createElementBlock as a, openBlock as d, normalizeStyle as l, normalizeClass as s, createCommentVNode as c, renderSlot as p, createTextVNode as v, toDisplayString as u } from "vue";
3
- const x = ["aria-orientation"], y = { key: 0, class: "px-divider__text" }, f = o(i({ name: "PxDivider", __name: "Divider", props: { direction: { default: "horizontal" }, contentPosition: { default: "center" }, type: {}, color: {}, borderStyle: { default: "solid" }, content: {} }, setup(o2) {
4
- const i2 = o2, f2 = r(), m = { "line-color": "color" }, P = n((() => i2.color ? e(t(i2.color), "px-divider", m) : {})), $ = n((() => !("horizontal" !== i2.direction || !f2.default && !i2.content)));
5
- return (e2, t2) => (d(), a("div", { class: s(["px-divider", { "is-vertical": "vertical" === e2.direction, [`px-divider--${e2.contentPosition}`]: $.value, [`px-divider--${e2.type}`]: e2.type, [`px-divider--${e2.borderStyle}`]: "solid" !== e2.borderStyle }]), style: l(P.value), role: "separator", "aria-orientation": e2.direction }, [$.value ? (d(), a("span", y, [p(e2.$slots, "default", {}, (() => [v(u(e2.content), 1)]))])) : c("", true)], 14, x));
6
- } }));
7
- export {
8
- f as P
9
- };
@@ -1,40 +0,0 @@
1
- import { _ as e, w as l } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as a, ref as o, computed as t, watch as d, onUnmounted as s, createElementBlock as r, openBlock as i, unref as n, normalizeClass as u, createElementVNode as c, createBlock as p, renderSlot as v, Teleport as m, createCommentVNode as y, createVNode as f, normalizeStyle as w, Transition as x, withCtx as _, toDisplayString as b } from "vue";
3
- import { u as k, a as O, b as $ } from "./hooks-dJGu-5DG.js";
4
- const h = ["id"], V = { class: "px-drawer__content" }, B = ["aria-labelledby"], z = { key: 0, class: "px-drawer__header" }, I = ["id"], g = { class: "px-drawer__body" }, C = l(e(a({ name: "PxDrawer", __name: "Drawer", props: { modelValue: { type: Boolean }, placement: { default: "left" }, size: { default: "300px" }, showOverlay: { type: Boolean, default: true }, lockScroll: { type: Boolean, default: true }, closeOnClickOverlay: { type: Boolean, default: true }, closeOnEsc: { type: Boolean, default: true }, title: {} }, emits: ["update:modelValue", "open", "close"], setup(e2, { expose: l2, emit: a2 }) {
5
- const C2 = e2, E = a2, j = k("px-drawer"), { nextZIndex: D } = O(), P = o(0), S = o(C2.modelValue), Z = t((() => ({ width: C2.size, zIndex: P.value })));
6
- function q(e3) {
7
- C2.lockScroll && (document.body.style.overflow = e3 ? "hidden" : "");
8
- }
9
- function A() {
10
- P.value = D(), S.value = true, E("open"), q(true);
11
- }
12
- function F() {
13
- S.value = false, q(false);
14
- }
15
- function G() {
16
- A(), E("update:modelValue", true);
17
- }
18
- function H() {
19
- F(), E("update:modelValue", false), E("close");
20
- }
21
- function J() {
22
- C2.closeOnClickOverlay && H();
23
- }
24
- return d((() => C2.modelValue), ((e3) => {
25
- e3 && !S.value ? A() : e3 && S.value ? q(true) : !e3 && S.value && F();
26
- }), { immediate: true }), $(document, "keydown", ((e3) => {
27
- C2.closeOnEsc && S.value && "Escape" === e3.key && H();
28
- })), s((() => {
29
- S.value && q(false);
30
- })), l2({ open: () => {
31
- S.value || G();
32
- }, close: () => {
33
- S.value && H();
34
- }, toggle: () => {
35
- S.value ? H() : G();
36
- } }), (e3, l3) => (i(), r("div", { class: u(["px-drawer", [`px-drawer--${e3.placement}`]]), id: n(j) }, [c("div", V, [v(e3.$slots, "default", {}, void 0, true)]), (i(), p(m, { to: "body" }, [e3.showOverlay && S.value ? (i(), r("div", { key: 0, class: "px-drawer-overlay", style: w({ zIndex: P.value - 1 }), onClick: J }, null, 4)) : y("", true), f(x, { name: `px-drawer-slide-${e3.placement}` }, { default: _((() => [S.value ? (i(), r("div", { key: 0, class: u(["px-drawer__sidebar", [`px-drawer__sidebar--${e3.placement}`]]), style: w(Z.value), role: "dialog", "aria-labelledby": e3.title ? `${n(j)}-title` : void 0 }, [e3.title ? (i(), r("div", z, [c("span", { id: `${n(j)}-title`, class: "px-drawer__title" }, b(e3.title), 9, I)])) : y("", true), c("div", g, [v(e3.$slots, "sidebar", {}, void 0, true)])], 14, B)) : y("", true)])), _: 3 }, 8, ["name"])]))], 10, h));
37
- } }), [["__scopeId", "data-v-647267d6"]]));
38
- export {
39
- C as P
40
- };
@@ -1,104 +0,0 @@
1
- import { w as e } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as o, inject as t, computed as n, createElementBlock as i, openBlock as a, Fragment as l, createCommentVNode as s, createElementVNode as r, withKeys as d, normalizeClass as p, withModifiers as u, createBlock as m, renderSlot as c, createTextVNode as f, toDisplayString as v, watch as h, nextTick as y, onBeforeUnmount as w, useSlots as k, ref as b, provide as g, createVNode as x, mergeProps as _, withCtx as B, unref as C, normalizeStyle as O, renderList as D } from "vue";
3
- import { u as z, c as H, d as R } from "./hooks-dJGu-5DG.js";
4
- import { P as $, a as j } from "./Button-GsSCWg5x.js";
5
- import { T as A } from "./Tooltip-DR4Mc5Fh.js";
6
- import { P as E } from "./Icon-BulvH9Wm.js";
7
- import { a as I, i as T } from "./vendor-eombfMkP.js";
8
- const P = Symbol("dropdownContext"), L = { key: 0, role: "separator", class: "divided-placeholder" }, K = ["id", "onKeydown"], S = o({ name: "PxDropdownItem", __name: "DropdownItem", props: { command: { default: z().value }, label: {}, disabled: { type: Boolean, default: false }, divided: { type: Boolean, default: false }, icon: {} }, setup(e2) {
9
- const o2 = e2, h2 = t(P), y2 = n((() => h2 == null ? void 0 : h2.size.value));
10
- function w2() {
11
- o2.disabled || (h2 == null ? void 0 : h2.handleItemClick(o2));
12
- }
13
- return (e3, o3) => (a(), i(l, null, [e3.divided ? (a(), i("li", L)) : s("", true), r("li", { role: "menuitem", tabindex: "-1", id: `dropdown-item-${e3.command}`, class: p({ "px-dropdown__item": true, ["px-dropdown__item--" + y2.value]: y2.value, "is-disabled": e3.disabled, "is-divided": e3.divided }), onClick: w2, onKeydown: [d(u(w2, ["prevent"]), ["enter"]), d(u(w2, ["prevent"]), ["space"])] }, [e3.icon ? (a(), m(E, { key: 0, icon: e3.icon, class: "px-dropdown__item-icon" }, null, 8, ["icon"])) : s("", true), c(e3.$slots, "default", {}, (() => [f(v(e3.label), 1)]))], 42, K)], 64));
14
- } });
15
- function q(e2, o2) {
16
- var _a;
17
- (_a = e2[o2]) == null ? void 0 : _a.focus();
18
- }
19
- const U = ["aria-expanded"], V = e(o({ name: "PxDropdown", inheritAttrs: false, __name: "Dropdown", props: { type: {}, size: {}, items: { default: () => [] }, hideOnClick: { type: Boolean, default: true }, splitButton: { type: Boolean }, maxHeight: {}, hoverColor: {}, content: {}, trigger: {}, placement: {}, manual: { type: Boolean }, disabled: { type: Boolean }, popperOptions: {}, transition: {}, showTimeout: {}, hideTimeout: {}, virtualRef: {}, virtualTriggering: { type: Boolean }, effect: {}, enterable: { type: Boolean }, maxWidth: {}, showArrow: { type: Boolean } }, emits: ["visible-change", "command", "click"], setup(e2, { expose: o2, emit: t2 }) {
20
- const s2 = e2, d2 = t2;
21
- k();
22
- const u2 = b(), f2 = b(), v2 = b(), z2 = b(false), E2 = n((() => {
23
- var _a;
24
- return { ...I(s2, ["items", "hideOnClick", "size", "type", "splitButton", "maxHeight", "hoverColor"]), popperOptions: { ...s2.popperOptions, modifiers: [{ name: "offset", options: { offset: [0, s2.showArrow ? 9 : 0] } }, ...((_a = s2.popperOptions) == null ? void 0 : _a.modifiers) ?? []] } };
25
- })), L2 = n((() => {
26
- const e3 = {};
27
- if (s2.maxHeight) {
28
- const o3 = "number" == typeof s2.maxHeight ? `${s2.maxHeight}px` : s2.maxHeight;
29
- e3.maxHeight = o3, e3.overflowY = "auto";
30
- }
31
- return s2.hoverColor && (e3["--px-dropdown-menuItem-hover-fill"] = s2.hoverColor), Object.keys(e3).length ? e3 : void 0;
32
- }));
33
- function K2() {
34
- var _a;
35
- (_a = u2.value) == null ? void 0 : _a.toggle();
36
- }
37
- return H(f2, (() => {
38
- var _a;
39
- s2.splitButton && ((_a = u2.value) == null ? void 0 : _a.hide());
40
- })), (function(e3) {
41
- const { menuRef: o3, triggerRef: t3, isOpen: n2, close: i2 } = e3;
42
- function a2(e4) {
43
- const n3 = o3.value;
44
- if (!n3) return;
45
- const a3 = (function(e5) {
46
- return Array.from(e5.querySelectorAll(".px-dropdown__item:not(.is-disabled)"));
47
- })(n3);
48
- if (!a3.length) return;
49
- const l2 = (function(e5) {
50
- return e5.indexOf(document.activeElement);
51
- })(a3);
52
- switch (e4.key) {
53
- case "ArrowDown":
54
- e4.preventDefault(), q(a3, -1 === l2 ? 0 : l2 < a3.length - 1 ? l2 + 1 : 0);
55
- break;
56
- case "ArrowUp":
57
- e4.preventDefault(), q(a3, -1 === l2 ? a3.length - 1 : l2 > 0 ? l2 - 1 : a3.length - 1);
58
- break;
59
- case "Home":
60
- e4.preventDefault(), q(a3, 0);
61
- break;
62
- case "End":
63
- e4.preventDefault(), q(a3, a3.length - 1);
64
- break;
65
- case "Escape":
66
- e4.preventDefault(), i2(), y((() => {
67
- var _a;
68
- return (_a = t3.value) == null ? void 0 : _a.focus();
69
- }));
70
- break;
71
- case "Tab":
72
- i2();
73
- }
74
- }
75
- h(n2, ((e4) => {
76
- var _a;
77
- e4 ? y((() => {
78
- const e5 = o3.value;
79
- e5 && (e5.focus(), e5.addEventListener("keydown", a2));
80
- })) : (_a = o3.value) == null ? void 0 : _a.removeEventListener("keydown", a2);
81
- })), w((() => {
82
- var _a;
83
- (_a = o3.value) == null ? void 0 : _a.removeEventListener("keydown", a2);
84
- }));
85
- })({ menuRef: v2, triggerRef: f2, isOpen: z2, close: () => {
86
- var _a;
87
- return (_a = u2.value) == null ? void 0 : _a.hide();
88
- } }), R(), g(P, { handleItemClick: function(e3) {
89
- var _a;
90
- s2.hideOnClick && ((_a = u2.value) == null ? void 0 : _a.hide()), !T(e3.command) && d2("command", e3.command);
91
- }, size: n((() => s2.size)) }), o2({ open: () => {
92
- var _a;
93
- return (_a = u2.value) == null ? void 0 : _a.show();
94
- }, close: () => {
95
- var _a;
96
- return (_a = u2.value) == null ? void 0 : _a.hide();
97
- } }), (e3, o3) => (a(), i("div", { ref_key: "dropdownRef", ref: f2, class: p(["px-dropdown", { "is-disabled": s2.disabled }]), "aria-haspopup": "true", "aria-expanded": z2.value, tabindex: "0" }, [x(A, _({ ref_key: "tooltipRef", ref: u2 }, E2.value, { manual: e3.splitButton, onVisibleChange: o3[1] || (o3[1] = (o4) => {
98
- z2.value = o4, e3.$emit("visible-change", o4);
99
- }) }), { content: B((() => [r("div", { ref_key: "menuRef", ref: v2, class: "px-dropdown__menu", role: "menu", tabindex: "-1", style: O(L2.value) }, [c(e3.$slots, "dropdown", {}, (() => [(a(true), i(l, null, D(e3.items, ((e4) => (a(), m(S, _({ key: e4.command, ref_for: true }, e4), null, 16)))), 128))]))], 4)])), default: B((() => [e3.splitButton ? (a(), m(C($), { key: 0, type: e3.type, size: e3.size, disabled: e3.disabled }, { default: B((() => [x(C(j), { onClick: o3[0] || (o3[0] = (o4) => e3.$emit("click", o4)) }, { default: B((() => [c(e3.$slots, "default")])), _: 3 }), x(C(j), { icon: "chevron-down", onClick: K2 })])), _: 3 }, 8, ["type", "size", "disabled"])) : c(e3.$slots, "default", { key: 1 })])), _: 3 }, 16, ["manual"])], 10, U));
100
- } })), W = e(S);
101
- export {
102
- V as P,
103
- W as a
104
- };
@@ -1,33 +0,0 @@
1
- import { c as e, r as l, w as o } from "./utils-CnCdZsHG.js";
2
- import { defineComponent as a, shallowRef as t, ref as r, computed as i, createElementBlock as n, openBlock as s, normalizeStyle as c, normalizeClass as u, createElementVNode as p, createBlock as d, createCommentVNode as f, renderSlot as m, createTextVNode as h, toDisplayString as v, withModifiers as g } from "vue";
3
- import { u as b } from "./Form-C1b8Igns.js";
4
- import { P as x } from "./Icon-BulvH9Wm.js";
5
- const _ = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), k = { default: { "border-color": "color", "hover-border-color": "dark", "shadow-color": "dark" }, ghost: { "border-color": "transparent", "hover-border-color": "color", "shadow-color": "transparent", "hover-shadow-color": "dark" } }, y = { class: "px-file-input__wrapper" }, w = ["disabled", "accept", "multiple", "form"], B = { class: "px-file-input__name" }, V = o(a({ name: "PxFileInput", inheritAttrs: false, __name: "FileInput", props: { modelValue: {}, id: {}, size: {}, color: {}, ghost: { type: Boolean }, disabled: { type: Boolean }, accept: {}, multiple: { type: Boolean }, placeholder: { default: "No file chosen" }, clearable: { type: Boolean }, form: {} }, emits: ["update:modelValue", "change", "clear"], setup(o2, { expose: a2, emit: V2 }) {
6
- const I = o2, $ = V2, j = t(), { formItem: z } = b(), C = r(null), F = i((() => _.has(I.color ?? ""))), P = i((() => !!I.color && !F.value)), A = i((() => {
7
- if (!P.value) return {};
8
- const o3 = e(I.color), a3 = I.ghost ? "ghost" : "default";
9
- return l(o3, "px-file-input", k[a3]);
10
- })), N = i((() => {
11
- const e2 = C.value;
12
- return e2 && 0 !== e2.length ? 1 === e2.length ? e2[0].name : `${e2.length} files selected` : I.placeholder;
13
- })), R = i((() => I.clearable && C.value && C.value.length > 0));
14
- function S(e2) {
15
- const l2 = e2.target.files ?? null;
16
- C.value = l2, $("update:modelValue", l2), $("change", l2), z == null ? void 0 : z.validate("change").catch((() => {
17
- }));
18
- }
19
- function q() {
20
- var _a;
21
- I.disabled || ((_a = j.value) == null ? void 0 : _a.click());
22
- }
23
- function D() {
24
- C.value = null, j.value && (j.value.value = ""), $("update:modelValue", null), $("clear"), z == null ? void 0 : z.clearValidate();
25
- }
26
- return a2({ ref: j, open: function() {
27
- var _a;
28
- (_a = j.value) == null ? void 0 : _a.click();
29
- }, clear: D }), (e2, l2) => (s(), n("div", { class: u(["px-file-input", { [`px-file-input--${e2.size}`]: e2.size, [`px-file-input--${e2.color}`]: F.value, "is-ghost": e2.ghost, "is-disabled": e2.disabled }]), style: c(A.value) }, [p("div", y, [p("input", { ref_key: "inputRef", ref: j, type: "file", class: "px-file-input__native", disabled: e2.disabled, accept: e2.accept, multiple: e2.multiple, form: e2.form, onChange: S }, null, 40, w), p("div", { class: "px-file-input__trigger", onClick: q }, [m(e2.$slots, "trigger", {}, (() => [l2[0] || (l2[0] = h("Browse"))]))]), p("span", B, v(N.value), 1), R.value ? (s(), d(x, { key: 0, icon: "close-box", class: "px-file-input__clear", onClick: g(D, ["stop"]) })) : f("", true)])], 6));
30
- } }));
31
- export {
32
- V as P
33
- };