sakana-element 2.3.0 → 2.4.1

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 (119) hide show
  1. package/README.md +5 -5
  2. package/dist/es/{Alert-BwTsp4X3.js → Alert-DRIDwear.js} +2 -2
  3. package/dist/es/{Avatar-CJu6JYV3.js → Avatar-Dkvvhw_D.js} +1 -1
  4. package/dist/es/{Badge-BmxZXX8k.js → Badge-CLNacHVq.js} +2 -2
  5. package/dist/es/{Breadcrumb-BP8MSklj.js → Breadcrumb-CfJA9NZz.js} +2 -2
  6. package/dist/es/{Button-BJHtN7gh.js → Button-Dj1DIvXh.js} +3 -3
  7. package/dist/es/{Card-DJHkCmsz.js → Card-meh7F1e2.js} +1 -1
  8. package/dist/es/ChatBubble-Ccr3wzoK.js +9 -0
  9. package/dist/es/{Checkbox-DX8L3fyp.js → Checkbox-vOcwl1OX.js} +3 -3
  10. package/dist/es/{Collapse-Ir3V9CuO.js → Collapse-BG58s0uJ.js} +4 -4
  11. package/dist/es/{ConfigProvider-CsbSqwwi.js → ConfigProvider-Cr8Hpzf2.js} +2 -2
  12. package/dist/es/Diff-KQ44cDcY.js +64 -0
  13. package/dist/es/{Divider-C7PtODSK.js → Divider-CYYeUqYc.js} +1 -1
  14. package/dist/es/{Drawer-C2eVmvUp.js → Drawer-CDXFDfrf.js} +2 -2
  15. package/dist/es/{Dropdown-CVg_c2fB.js → Dropdown-CPZtzHPx.js} +9 -9
  16. package/dist/es/{FileInput-BE26BmXm.js → FileInput-Ram4-wy2.js} +3 -3
  17. package/dist/es/Filter-CLLkrn-W.js +40 -0
  18. package/dist/es/{Form-7lZt5ehf.js → Form-po3aIrSN.js} +62 -61
  19. package/dist/es/{Icon-BLDDdSU-.js → Icon-XJfGGAMY.js} +1 -1
  20. package/dist/es/{Indicator-B-en-MgG.js → Indicator-vsSp5r5K.js} +1 -1
  21. package/dist/es/{Input-C5HuVehE.js → Input-KrNqNZMe.js} +5 -5
  22. package/dist/es/Kbd-CtCGx7_s.js +13 -0
  23. package/dist/es/{Link-Av9RdcFv.js → Link-Bbwdgs74.js} +1 -1
  24. package/dist/es/{Loading-CBNDUWQd.js → Loading-DiyIiKxO.js} +3 -3
  25. package/dist/es/{Message-DgnyyuXn.js → Message-BoNCtMo7.js} +14 -14
  26. package/dist/es/{Notification-LYRXnVAf.js → Notification-CFY-yvRf.js} +13 -13
  27. package/dist/es/{Overlay-CpvMhnuU.js → Overlay-DoFA2lgP.js} +1 -1
  28. package/dist/es/Pixelate-dqwHc6nX.js +39 -0
  29. package/dist/es/{Popconfirm-DvxFdLrw.js → Popconfirm-DPOujyiA.js} +12 -12
  30. package/dist/es/{Progress-Bc5INMhJ.js → Progress-B0oYE8Z3.js} +1 -1
  31. package/dist/es/{Radio-263_rtRl.js → Radio-C-Ot7pLA.js} +3 -3
  32. package/dist/es/Resizable-G5KVHayx.js +151 -0
  33. package/dist/es/{Select-7ZxUCS8z.js → Select-DqxPeAKK.js} +14 -14
  34. package/dist/es/Skeleton-4SeKRKn9.js +15 -0
  35. package/dist/es/{Switch-DiCsMJT3.js → Switch-C_tBxZtT.js} +3 -3
  36. package/dist/es/{Table-BvA_xzDe.js → Table-Cr6HFL4_.js} +1 -1
  37. package/dist/es/{Tooltip-J3ji6weH.js → Tooltip-rak4BryQ.js} +3 -3
  38. package/dist/es/Validator-DKVfknvI.js +40 -0
  39. package/dist/es/{hooks-BqobYUzS.js → hooks-pTjI-j9o.js} +51 -53
  40. package/dist/es/index.js +119 -90
  41. package/dist/es/utils-DzOow9K9.js +155 -0
  42. package/dist/es/{vendor-DXmGx29U.js → vendor-DrBJKLFW.js} +254 -210
  43. package/dist/index.css +1 -1
  44. package/dist/{es/theme → theme}/Badge.css +151 -151
  45. package/dist/{es/theme → theme}/Button.css +92 -8
  46. package/dist/theme/ChatBubble.css +218 -0
  47. package/dist/{es/theme → theme}/Checkbox.css +138 -18
  48. package/dist/{es/theme → theme}/Collapse.css +96 -96
  49. package/dist/theme/Diff.css +110 -0
  50. package/dist/{es/theme → theme}/Divider.css +42 -3
  51. package/dist/{es/theme → theme}/Dropdown.css +2 -2
  52. package/dist/{es/theme → theme}/FileInput.css +32 -0
  53. package/dist/theme/Filter.css +598 -0
  54. package/dist/{es/theme → theme}/Input.css +414 -407
  55. package/dist/theme/Kbd.css +104 -0
  56. package/dist/{es/theme → theme}/Message.css +1 -1
  57. package/dist/{es/theme → theme}/Notification.css +44 -44
  58. package/dist/{es/theme → theme}/Radio.css +114 -48
  59. package/dist/theme/Resizable.css +95 -0
  60. package/dist/{es/theme → theme}/Select.css +198 -88
  61. package/dist/theme/Skeleton.css +192 -0
  62. package/dist/{es/theme → theme}/Switch.css +22 -3
  63. package/dist/theme/Validator.css +25 -0
  64. package/dist/types/components/ChatBubble/constants.d.ts +2 -0
  65. package/dist/types/components/ChatBubble/index.d.ts +27 -0
  66. package/dist/types/components/ChatBubble/types.d.ts +10 -0
  67. package/dist/types/components/Diff/constants.d.ts +4 -0
  68. package/dist/types/components/Diff/index.d.ts +67 -0
  69. package/dist/types/components/Diff/types.d.ts +29 -0
  70. package/dist/types/components/Dropdown/index.d.ts +3 -3
  71. package/dist/types/components/Filter/constants.d.ts +5 -0
  72. package/dist/types/components/Filter/index.d.ts +59 -0
  73. package/dist/types/components/Filter/types.d.ts +38 -0
  74. package/dist/types/components/Icon/index.d.ts +1 -0
  75. package/dist/types/components/Kbd/constants.d.ts +3 -0
  76. package/dist/types/components/Kbd/index.d.ts +24 -0
  77. package/dist/types/components/Kbd/types.d.ts +10 -0
  78. package/dist/types/components/Pixelate/index.d.ts +3 -3
  79. package/dist/types/components/Popconfirm/index.d.ts +3 -3
  80. package/dist/types/components/Resizable/constants.d.ts +3 -0
  81. package/dist/types/components/Resizable/index.d.ts +135 -0
  82. package/dist/types/components/Resizable/types.d.ts +52 -0
  83. package/dist/types/components/Select/index.d.ts +3 -3
  84. package/dist/types/components/Skeleton/index.d.ts +36 -0
  85. package/dist/types/components/Skeleton/types.d.ts +12 -0
  86. package/dist/types/components/Tooltip/index.d.ts +3 -3
  87. package/dist/types/components/Validator/index.d.ts +52 -0
  88. package/dist/types/components/Validator/types.d.ts +13 -0
  89. package/dist/types/components/index.d.ts +8 -1
  90. package/dist/types/core/index.d.ts +1 -1
  91. package/dist/types/hooks/index.d.ts +2 -0
  92. package/dist/types/hooks/useFocusController.d.ts +1 -1
  93. package/dist/types/utils/index.d.ts +1 -0
  94. package/dist/types/utils/pixelate.d.ts +10 -0
  95. package/dist/types/utils/style.d.ts +1 -0
  96. package/dist/umd/index.css +1 -1
  97. package/dist/umd/index.css.gz +0 -0
  98. package/dist/umd/index.umd.cjs +3 -3
  99. package/dist/umd/index.umd.cjs.gz +0 -0
  100. package/package.json +4 -4
  101. package/dist/es/Pixelate-BPypBgJU.js +0 -67
  102. package/dist/es/utils-BS5vsvlM.js +0 -101
  103. /package/dist/{es/theme → theme}/Alert.css +0 -0
  104. /package/dist/{es/theme → theme}/Avatar.css +0 -0
  105. /package/dist/{es/theme → theme}/Breadcrumb.css +0 -0
  106. /package/dist/{es/theme → theme}/Card.css +0 -0
  107. /package/dist/{es/theme → theme}/Drawer.css +0 -0
  108. /package/dist/{es/theme → theme}/Form.css +0 -0
  109. /package/dist/{es/theme → theme}/Icon.css +0 -0
  110. /package/dist/{es/theme → theme}/Indicator.css +0 -0
  111. /package/dist/{es/theme → theme}/Link.css +0 -0
  112. /package/dist/{es/theme → theme}/Loading.css +0 -0
  113. /package/dist/{es/theme → theme}/Overlay.css +0 -0
  114. /package/dist/{es/theme → theme}/Popconfirm.css +0 -0
  115. /package/dist/{es/theme → theme}/Progress.css +0 -0
  116. /package/dist/{es/theme → theme}/Table.css +0 -0
  117. /package/dist/{es/theme → theme}/Tooltip.css +0 -0
  118. /package/dist/{es/theme → theme}/fonts/zpix.woff2 +0 -0
  119. /package/dist/{es/theme → theme}/index.css +0 -0
@@ -0,0 +1,155 @@
1
+ import { h as e, d as t, y as r } from "./vendor-DrBJKLFW.js";
2
+ import { defineComponent as o } from "vue";
3
+ function n(e2, t2) {
4
+ const r2 = parseInt(e2.replace("#", ""), 16);
5
+ return `#${(Math.max(0, (r2 >> 16) - Math.round(2.55 * t2)) << 16 | Math.max(0, (r2 >> 8 & 255) - Math.round(2.55 * t2)) << 8 | Math.max(0, (255 & r2) - Math.round(2.55 * t2))).toString(16).padStart(6, "0")}`;
6
+ }
7
+ function a(e2, t2) {
8
+ const r2 = parseInt(e2.replace("#", ""), 16);
9
+ return `#${(Math.min(255, (r2 >> 16) + Math.round(2.55 * t2)) << 16 | Math.min(255, (r2 >> 8 & 255) + Math.round(2.55 * t2)) << 8 | Math.min(255, (255 & r2) + Math.round(2.55 * t2))).toString(16).padStart(6, "0")}`;
10
+ }
11
+ function c(e2) {
12
+ const t2 = parseInt(e2.replace("#", ""), 16);
13
+ return (0.299 * (t2 >> 16) + 0.587 * (t2 >> 8 & 255) + 0.114 * (255 & t2)) / 255 > 0.6 ? "#1e1e2e" : "#ffffff";
14
+ }
15
+ function s(e2) {
16
+ return { color: e2, dark: n(e2, 15), light: a(e2, 35), contrast: c(e2), transparent: "transparent" };
17
+ }
18
+ function i(e2, t2, r2) {
19
+ const o2 = {};
20
+ for (const [n2, a2] of Object.entries(r2)) o2[`--${t2}-${n2}`] = e2[a2];
21
+ return o2;
22
+ }
23
+ const l = { outline: { "text-color": "color", "bg-color": "transparent", "border-color": "color", "shadow-color": "transparent" }, dash: { "text-color": "color", "bg-color": "light", "border-color": "color", "shadow-color": "transparent" }, default: { "text-color": "contrast", "bg-color": "color", "border-color": "dark", "shadow-color": "dark" } };
24
+ function u(e2, t2) {
25
+ }
26
+ const f = { spinner: "loader", loading: "loader", "eye-slash": "eye-closed", "eye-off": "eye-closed", xmark: "close", x: "close", times: "close", "circle-xmark": "close-box", "x-circle": "close-box", "times-circle": "close-box", error: "close-box", "circle-info": "info-box", "info-circle": "info-box", info: "info-box", "check-circle": "check", "circle-check": "check", success: "check", "circle-exclamation": "warning-box", "exclamation-circle": "warning-box", warning: "warning-box", "angle-down": "chevron-down", "caret-down": "chevron-down", "angle-up": "chevron-up", "caret-up": "chevron-up", "angle-left": "chevron-left", "caret-left": "chevron-left", "angle-right": "chevron-right", "caret-right": "chevron-right", "question-circle": "info-box", "circle-question": "info-box", help: "info-box", question: "info-box", gear: "sliders", cog: "sliders", settings: "sliders", star: "bookmark", "star-solid": "bookmark" };
27
+ function d(e2) {
28
+ return e2 in f ? f[e2] : e2;
29
+ }
30
+ function h() {
31
+ return { ...f };
32
+ }
33
+ const g = /* @__PURE__ */ new Set(["svg", "path", "rect", "circle", "ellipse", "line", "polyline", "polygon", "g", "defs", "clipPath", "mask", "title", "desc", "linearGradient", "radialGradient", "stop", "symbol", "use"]), p = /^on/i, m = /^\s*javascript\s*:/i;
34
+ function b(e2) {
35
+ if (!e2 || "string" != typeof e2) return "";
36
+ if ("undefined" == typeof DOMParser) return "";
37
+ const t2 = new DOMParser().parseFromString(e2, "image/svg+xml");
38
+ return t2.querySelector("parsererror") ? "" : (x(t2.documentElement), t2.documentElement.outerHTML);
39
+ }
40
+ function x(e2) {
41
+ const t2 = Array.from(e2.children);
42
+ for (const e3 of t2) {
43
+ const t3 = e3.tagName.toLowerCase();
44
+ if (g.has(t3)) {
45
+ for (const t4 of Array.from(e3.attributes)) (p.test(t4.name) || "href" === t4.name && m.test(t4.value) || "xlink:href" === t4.name && m.test(t4.value)) && e3.removeAttribute(t4.name);
46
+ x(e3);
47
+ } else e3.remove();
48
+ }
49
+ }
50
+ const M = /* @__PURE__ */ new Map();
51
+ function v(e2, t2) {
52
+ M.set(e2, b(t2));
53
+ }
54
+ function w(e2) {
55
+ for (const [t2, r2] of Object.entries(e2)) M.set(t2, b(r2));
56
+ }
57
+ function y(e2) {
58
+ return M.get(e2);
59
+ }
60
+ function k(e2) {
61
+ return M.has(e2);
62
+ }
63
+ function S() {
64
+ return Array.from(M.keys());
65
+ }
66
+ const N = (e2) => (e2.install = (t2) => {
67
+ const r2 = e2.name;
68
+ t2.component(r2, e2);
69
+ }, e2), $ = (e2, t2) => (e2.install = (r2) => {
70
+ r2.config.globalProperties[t2] = e2;
71
+ }, e2);
72
+ function F(e2, t2) {
73
+ for (; e2.length >= t2; ) e2[0].props.onDestroy();
74
+ }
75
+ function I(e2) {
76
+ let t2 = false, r2 = 0;
77
+ const o2 = (t3) => {
78
+ var _a;
79
+ "Escape" === t3.code && ((_a = e2()) == null ? void 0 : _a.handler.close());
80
+ };
81
+ return { register() {
82
+ r2++, t2 || (document.addEventListener("keydown", o2), t2 = true);
83
+ }, unregister() {
84
+ r2--, r2 <= 0 && (document.removeEventListener("keydown", o2), t2 = false, r2 = 0);
85
+ } };
86
+ }
87
+ function j(e2, t2, r2, o2) {
88
+ if (0 === o2.length) return [e2, t2, r2];
89
+ let n2 = 1 / 0, a2 = o2[0];
90
+ for (const c2 of o2) {
91
+ const o3 = (e2 - c2[0]) ** 2 + (t2 - c2[1]) ** 2 + (r2 - c2[2]) ** 2;
92
+ if (0 === o3) return c2;
93
+ o3 < n2 && (n2 = o3, a2 = c2);
94
+ }
95
+ return a2;
96
+ }
97
+ function O(e2, t2, r2) {
98
+ const o2 = e2.getContext("2d");
99
+ if (!o2) return;
100
+ const { pixelSize: n2, grayscale: a2 = false, palette: c2, background: s2 = "#FFFFFF" } = r2, i2 = t2.naturalWidth, l2 = t2.naturalHeight;
101
+ e2.width = i2, e2.height = l2, o2.drawImage(t2, 0, 0, i2, l2);
102
+ const u2 = o2.getImageData(0, 0, i2, l2).data, f2 = Math.max(1, Math.round(n2)), d2 = c2 ? (function(e3) {
103
+ return e3.map(((e4) => "string" == typeof e4 ? (function(e5) {
104
+ const t3 = e5.replace("#", "");
105
+ return [parseInt(t3.substring(0, 2), 16), parseInt(t3.substring(2, 4), 16), parseInt(t3.substring(4, 6), 16)];
106
+ })(e4) : e4));
107
+ })(c2) : null;
108
+ o2.fillStyle = s2, o2.fillRect(0, 0, i2, l2);
109
+ for (let e3 = 0; e3 < l2; e3 += f2) for (let t3 = 0; t3 < i2; t3 += f2) {
110
+ const r3 = Math.min(f2, i2 - t3), n3 = Math.min(f2, l2 - e3);
111
+ let c3 = 0, s3 = 0, h2 = 0, g2 = 0;
112
+ for (let o3 = 0; o3 < n3; o3++) for (let n4 = 0; n4 < r3; n4++) {
113
+ const r4 = 4 * ((e3 + o3) * i2 + (t3 + n4));
114
+ c3 += u2[r4], s3 += u2[r4 + 1], h2 += u2[r4 + 2], g2++;
115
+ }
116
+ let p2 = Math.round(c3 / g2), m2 = Math.round(s3 / g2), b2 = Math.round(h2 / g2);
117
+ a2 && (p2 = m2 = b2 = Math.round(0.299 * p2 + 0.587 * m2 + 0.114 * b2)), d2 && ([p2, m2, b2] = j(p2, m2, b2, d2)), o2.fillStyle = `rgb(${p2},${m2},${b2})`, o2.fillRect(t3, e3, r3, n3);
118
+ }
119
+ }
120
+ function q(r2, o2 = "px") {
121
+ return r2 ? e(r2) || ((e2) => !!t(e2) && !Number.isNaN(Number(e2)))(r2) ? `${r2}${o2}` : t(r2) ? r2 : void 0 : "";
122
+ }
123
+ function E(e2, t2, r2) {
124
+ return Math.max(t2, Math.min(r2, e2));
125
+ }
126
+ const A = /* @__PURE__ */ new Map([["info", "info-box"], ["success", "check"], ["warning", "warning-box"], ["danger", "close-box"], ["error", "close-box"]]), D = o({ props: { vNode: { type: [String, Object, Function], required: true } }, setup: (e2) => () => r(e2.vNode) ? e2.vNode() : e2.vNode }), L = (e2, t2) => {
127
+ const r2 = e2.__vccOpts || e2;
128
+ for (const [e3, o2] of t2) r2[e3] = o2;
129
+ return r2;
130
+ };
131
+ export {
132
+ D as R,
133
+ l as S,
134
+ L as _,
135
+ E as a,
136
+ q as b,
137
+ s as c,
138
+ u as d,
139
+ d as e,
140
+ w as f,
141
+ y as g,
142
+ F as h,
143
+ I as i,
144
+ $ as j,
145
+ v as k,
146
+ a as l,
147
+ k as m,
148
+ S as n,
149
+ h as o,
150
+ O as p,
151
+ i as r,
152
+ b as s,
153
+ A as t,
154
+ N as w
155
+ };