@aristobyte-ui/utils 1.0.21
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.
- package/dist/index.d.mts +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +189 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +162 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +79 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type RippleParamsRef = HTMLButtonElement | HTMLAnchorElement;
|
|
4
|
+
type RippleParams<HTMLElementType extends RippleParamsRef> = {
|
|
5
|
+
ref: React.RefObject<HTMLElementType | null>;
|
|
6
|
+
clientX: number;
|
|
7
|
+
clientY: number;
|
|
8
|
+
};
|
|
9
|
+
declare const renderRipple: <HTMLElementType extends RippleParamsRef>({ ref, clientX, clientY, }: RippleParams<HTMLElementType>) => void;
|
|
10
|
+
|
|
11
|
+
type IconProps = {
|
|
12
|
+
size?: number;
|
|
13
|
+
color?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const Icons: {
|
|
17
|
+
Copy: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
Error: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
Info: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
20
|
+
Success: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
+
Warning: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Icons, type RippleParams, renderRipple };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type RippleParamsRef = HTMLButtonElement | HTMLAnchorElement;
|
|
4
|
+
type RippleParams<HTMLElementType extends RippleParamsRef> = {
|
|
5
|
+
ref: React.RefObject<HTMLElementType | null>;
|
|
6
|
+
clientX: number;
|
|
7
|
+
clientY: number;
|
|
8
|
+
};
|
|
9
|
+
declare const renderRipple: <HTMLElementType extends RippleParamsRef>({ ref, clientX, clientY, }: RippleParams<HTMLElementType>) => void;
|
|
10
|
+
|
|
11
|
+
type IconProps = {
|
|
12
|
+
size?: number;
|
|
13
|
+
color?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const Icons: {
|
|
17
|
+
Copy: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
Error: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
Info: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
20
|
+
Success: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
+
Warning: ({ size, color }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Icons, type RippleParams, renderRipple };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// index.ts
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
Icons: () => Icons,
|
|
26
|
+
renderRipple: () => renderRipple
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
29
|
+
|
|
30
|
+
// ripple.tsx
|
|
31
|
+
var renderRipple = ({
|
|
32
|
+
ref,
|
|
33
|
+
clientX,
|
|
34
|
+
clientY
|
|
35
|
+
}) => {
|
|
36
|
+
const button = ref.current;
|
|
37
|
+
if (!button) return;
|
|
38
|
+
const circle = document.createElement("span");
|
|
39
|
+
const diameter = Math.max(button.clientWidth, button.clientHeight);
|
|
40
|
+
const radius = diameter / 2;
|
|
41
|
+
circle.id = "ripple";
|
|
42
|
+
const style = document.createElement("style");
|
|
43
|
+
style.innerHTML = `
|
|
44
|
+
#ripple {
|
|
45
|
+
animation: ripple 300ms linear;
|
|
46
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
47
|
+
border-radius: 50%;
|
|
48
|
+
height: ${diameter}px;
|
|
49
|
+
left: ${clientX - button.getBoundingClientRect().left - radius}px;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: ${clientY - button.getBoundingClientRect().top - radius}px;
|
|
53
|
+
transform: scale(0);
|
|
54
|
+
width: ${diameter}px;
|
|
55
|
+
z-index: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes ripple {
|
|
59
|
+
to {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transform: scale(2);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
button.appendChild(style);
|
|
66
|
+
button.appendChild(circle);
|
|
67
|
+
circle.addEventListener("animationend", () => {
|
|
68
|
+
circle.remove();
|
|
69
|
+
style.remove();
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// icons/Copy.tsx
|
|
74
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
75
|
+
var Copy = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
76
|
+
"svg",
|
|
77
|
+
{
|
|
78
|
+
width: size,
|
|
79
|
+
height: size,
|
|
80
|
+
viewBox: "0 0 24 24",
|
|
81
|
+
fill: "none",
|
|
82
|
+
stroke: color,
|
|
83
|
+
strokeWidth: "2",
|
|
84
|
+
strokeLinecap: "round",
|
|
85
|
+
strokeLinejoin: "round",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
// icons/Error.tsx
|
|
94
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
95
|
+
var Error2 = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
96
|
+
"svg",
|
|
97
|
+
{
|
|
98
|
+
width: size,
|
|
99
|
+
height: size,
|
|
100
|
+
viewBox: "0 0 24 24",
|
|
101
|
+
fill: "none",
|
|
102
|
+
stroke: color,
|
|
103
|
+
strokeWidth: "2",
|
|
104
|
+
strokeLinecap: "round",
|
|
105
|
+
strokeLinejoin: "round",
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m15 9-6 6" }),
|
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9 9 6 6" })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
// icons/Info.tsx
|
|
115
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
116
|
+
var Info = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
117
|
+
"svg",
|
|
118
|
+
{
|
|
119
|
+
width: size,
|
|
120
|
+
height: size,
|
|
121
|
+
viewBox: "0 0 24 24",
|
|
122
|
+
fill: "none",
|
|
123
|
+
stroke: color,
|
|
124
|
+
strokeWidth: "2",
|
|
125
|
+
strokeLinecap: "round",
|
|
126
|
+
strokeLinejoin: "round",
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 16v-4" }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 8h.01" })
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
// icons/Success.tsx
|
|
136
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
137
|
+
var Success = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
138
|
+
"svg",
|
|
139
|
+
{
|
|
140
|
+
width: size,
|
|
141
|
+
height: size,
|
|
142
|
+
viewBox: "0 0 24 24",
|
|
143
|
+
fill: "none",
|
|
144
|
+
stroke: color,
|
|
145
|
+
strokeWidth: "2",
|
|
146
|
+
strokeLinecap: "round",
|
|
147
|
+
strokeLinejoin: "round",
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
150
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m9 12 2 2 4-4" })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
// icons/Warning.tsx
|
|
156
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
157
|
+
var Warning = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
158
|
+
"svg",
|
|
159
|
+
{
|
|
160
|
+
width: size,
|
|
161
|
+
height: size,
|
|
162
|
+
viewBox: "0 0 24 24",
|
|
163
|
+
fill: "none",
|
|
164
|
+
stroke: color,
|
|
165
|
+
strokeWidth: "2",
|
|
166
|
+
strokeLinecap: "round",
|
|
167
|
+
strokeLinejoin: "round",
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 16h.01" }),
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 8v4" }),
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z" })
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
// icons/index.ts
|
|
177
|
+
var Icons = {
|
|
178
|
+
Copy,
|
|
179
|
+
Error: Error2,
|
|
180
|
+
Info,
|
|
181
|
+
Success,
|
|
182
|
+
Warning
|
|
183
|
+
};
|
|
184
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
+
0 && (module.exports = {
|
|
186
|
+
Icons,
|
|
187
|
+
renderRipple
|
|
188
|
+
});
|
|
189
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../index.ts","../ripple.tsx","../icons/Copy.tsx","../icons/Error.tsx","../icons/Info.tsx","../icons/Success.tsx","../icons/Warning.tsx","../icons/index.ts"],"sourcesContent":["export * from \"./ripple\";\nexport * from \"./icons\";\n","type RippleParamsRef = HTMLButtonElement | HTMLAnchorElement;\n\nexport type RippleParams<HTMLElementType extends RippleParamsRef> = {\n ref: React.RefObject<HTMLElementType | null>;\n clientX: number;\n clientY: number;\n};\n\nexport const renderRipple = <HTMLElementType extends RippleParamsRef>({\n ref,\n clientX,\n clientY,\n}: RippleParams<HTMLElementType>) => {\n const button = ref.current;\n if (!button) return;\n\n const circle = document.createElement(\"span\");\n const diameter = Math.max(button.clientWidth, button.clientHeight);\n const radius = diameter / 2;\n\n circle.id = \"ripple\";\n\n const style = document.createElement(\"style\");\n style.innerHTML = `\n #ripple {\n animation: ripple 300ms linear;\n background-color: rgba(255, 255, 255, 0.3);\n border-radius: 50%;\n height: ${diameter}px;\n left: ${clientX - button.getBoundingClientRect().left - radius}px;\n pointer-events: none;\n position: absolute;\n top: ${clientY - button.getBoundingClientRect().top - radius}px;\n transform: scale(0);\n width: ${diameter}px;\n z-index: 0;\n }\n \n @keyframes ripple {\n to {\n opacity: 0;\n transform: scale(2);\n }\n }\n `;\n\n button.appendChild(style);\n button.appendChild(circle);\n\n circle.addEventListener(\"animationend\", () => {\n circle.remove();\n style.remove();\n });\n};\n","import { IconProps } from \"./type\";\n\nexport const Copy = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Error = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m15 9-6 6\" />\n <path d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Info = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Success = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Warning = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 16h.01\" />\n <path d=\"M12 8v4\" />\n <path d=\"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z\" />\n </svg>\n);\n","import { Copy } from \"./Copy\";\nimport { Error } from \"./Error\";\nimport { Info } from \"./Info\";\nimport { Success } from \"./Success\";\nimport { Warning } from \"./Warning\";\n\nexport const Icons = {\n Copy,\n Error,\n Info,\n Success,\n Warning,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACQO,IAAM,eAAe,CAA0C;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AACF,MAAqC;AACnC,QAAM,SAAS,IAAI;AACnB,MAAI,CAAC,OAAQ;AAEb,QAAM,SAAS,SAAS,cAAc,MAAM;AAC5C,QAAM,WAAW,KAAK,IAAI,OAAO,aAAa,OAAO,YAAY;AACjE,QAAM,SAAS,WAAW;AAE1B,SAAO,KAAK;AAEZ,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKF,QAAQ;AAAA,gBACV,UAAU,OAAO,sBAAsB,EAAE,OAAO,MAAM;AAAA;AAAA;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ACL,QAAQ;AAAA,IACR,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IAEf;AAAA,mDAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,MAC/B,6CAAC,UAAK,GAAE,aAAY;AAAA,MACpB,6CAAC,UAAK,GAAE,aAAY;AAAA;AAAA;AACtB;;;ACbA,IAAAC,sBAAA;AADK,IAAM,UAAU,CAAC,EAAE,OAAO,IAAI,QAAQ,eAAe,MAC1D;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAQ;AAAA,IACR,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IAEf;AAAA,mDAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,MAC/B,6CAAC,UAAK,GAAE,iBAAgB;AAAA;AAAA;AAC1B;;;ACZA,IAAAC,sBAAA;AADK,IAAM,UAAU,CAAC,EAAE,OAAO,IAAI,QAAQ,eAAe,MAC1D;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAQ;AAAA,IACR,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IAEf;AAAA,mDAAC,UAAK,GAAE,cAAa;AAAA,MACrB,6CAAC,UAAK,GAAE,WAAU;AAAA,MAClB,6CAAC,UAAK,GAAE,iPAAgP;AAAA;AAAA;AAC1P;;;ACVK,IAAM,QAAQ;AAAA,EACnB;AAAA,EACA,OAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":["import_jsx_runtime","Error","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","Error"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
|
|
4
|
+
// ripple.tsx
|
|
5
|
+
var renderRipple = ({
|
|
6
|
+
ref,
|
|
7
|
+
clientX,
|
|
8
|
+
clientY
|
|
9
|
+
}) => {
|
|
10
|
+
const button = ref.current;
|
|
11
|
+
if (!button) return;
|
|
12
|
+
const circle = document.createElement("span");
|
|
13
|
+
const diameter = Math.max(button.clientWidth, button.clientHeight);
|
|
14
|
+
const radius = diameter / 2;
|
|
15
|
+
circle.id = "ripple";
|
|
16
|
+
const style = document.createElement("style");
|
|
17
|
+
style.innerHTML = `
|
|
18
|
+
#ripple {
|
|
19
|
+
animation: ripple 300ms linear;
|
|
20
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
height: ${diameter}px;
|
|
23
|
+
left: ${clientX - button.getBoundingClientRect().left - radius}px;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: ${clientY - button.getBoundingClientRect().top - radius}px;
|
|
27
|
+
transform: scale(0);
|
|
28
|
+
width: ${diameter}px;
|
|
29
|
+
z-index: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes ripple {
|
|
33
|
+
to {
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transform: scale(2);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
button.appendChild(style);
|
|
40
|
+
button.appendChild(circle);
|
|
41
|
+
circle.addEventListener("animationend", () => {
|
|
42
|
+
circle.remove();
|
|
43
|
+
style.remove();
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// icons/Copy.tsx
|
|
48
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
49
|
+
var Copy = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ jsxs(
|
|
50
|
+
"svg",
|
|
51
|
+
{
|
|
52
|
+
width: size,
|
|
53
|
+
height: size,
|
|
54
|
+
viewBox: "0 0 24 24",
|
|
55
|
+
fill: "none",
|
|
56
|
+
stroke: color,
|
|
57
|
+
strokeWidth: "2",
|
|
58
|
+
strokeLinecap: "round",
|
|
59
|
+
strokeLinejoin: "round",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
62
|
+
/* @__PURE__ */ jsx("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
// icons/Error.tsx
|
|
68
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
69
|
+
var Error = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ jsxs2(
|
|
70
|
+
"svg",
|
|
71
|
+
{
|
|
72
|
+
width: size,
|
|
73
|
+
height: size,
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
fill: "none",
|
|
76
|
+
stroke: color,
|
|
77
|
+
strokeWidth: "2",
|
|
78
|
+
strokeLinecap: "round",
|
|
79
|
+
strokeLinejoin: "round",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx2("path", { d: "m15 9-6 6" }),
|
|
82
|
+
/* @__PURE__ */ jsx2("path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }),
|
|
83
|
+
/* @__PURE__ */ jsx2("path", { d: "m9 9 6 6" })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
// icons/Info.tsx
|
|
89
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
90
|
+
var Info = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ jsxs3(
|
|
91
|
+
"svg",
|
|
92
|
+
{
|
|
93
|
+
width: size,
|
|
94
|
+
height: size,
|
|
95
|
+
viewBox: "0 0 24 24",
|
|
96
|
+
fill: "none",
|
|
97
|
+
stroke: color,
|
|
98
|
+
strokeWidth: "2",
|
|
99
|
+
strokeLinecap: "round",
|
|
100
|
+
strokeLinejoin: "round",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "10" }),
|
|
103
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 16v-4" }),
|
|
104
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 8h.01" })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
// icons/Success.tsx
|
|
110
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
111
|
+
var Success = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ jsxs4(
|
|
112
|
+
"svg",
|
|
113
|
+
{
|
|
114
|
+
width: size,
|
|
115
|
+
height: size,
|
|
116
|
+
viewBox: "0 0 24 24",
|
|
117
|
+
fill: "none",
|
|
118
|
+
stroke: color,
|
|
119
|
+
strokeWidth: "2",
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeLinejoin: "round",
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" }),
|
|
124
|
+
/* @__PURE__ */ jsx4("path", { d: "m9 12 2 2 4-4" })
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
// icons/Warning.tsx
|
|
130
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
131
|
+
var Warning = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ jsxs5(
|
|
132
|
+
"svg",
|
|
133
|
+
{
|
|
134
|
+
width: size,
|
|
135
|
+
height: size,
|
|
136
|
+
viewBox: "0 0 24 24",
|
|
137
|
+
fill: "none",
|
|
138
|
+
stroke: color,
|
|
139
|
+
strokeWidth: "2",
|
|
140
|
+
strokeLinecap: "round",
|
|
141
|
+
strokeLinejoin: "round",
|
|
142
|
+
children: [
|
|
143
|
+
/* @__PURE__ */ jsx5("path", { d: "M12 16h.01" }),
|
|
144
|
+
/* @__PURE__ */ jsx5("path", { d: "M12 8v4" }),
|
|
145
|
+
/* @__PURE__ */ jsx5("path", { d: "M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z" })
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
// icons/index.ts
|
|
151
|
+
var Icons = {
|
|
152
|
+
Copy,
|
|
153
|
+
Error,
|
|
154
|
+
Info,
|
|
155
|
+
Success,
|
|
156
|
+
Warning
|
|
157
|
+
};
|
|
158
|
+
export {
|
|
159
|
+
Icons,
|
|
160
|
+
renderRipple
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../ripple.tsx","../icons/Copy.tsx","../icons/Error.tsx","../icons/Info.tsx","../icons/Success.tsx","../icons/Warning.tsx","../icons/index.ts"],"sourcesContent":["type RippleParamsRef = HTMLButtonElement | HTMLAnchorElement;\n\nexport type RippleParams<HTMLElementType extends RippleParamsRef> = {\n ref: React.RefObject<HTMLElementType | null>;\n clientX: number;\n clientY: number;\n};\n\nexport const renderRipple = <HTMLElementType extends RippleParamsRef>({\n ref,\n clientX,\n clientY,\n}: RippleParams<HTMLElementType>) => {\n const button = ref.current;\n if (!button) return;\n\n const circle = document.createElement(\"span\");\n const diameter = Math.max(button.clientWidth, button.clientHeight);\n const radius = diameter / 2;\n\n circle.id = \"ripple\";\n\n const style = document.createElement(\"style\");\n style.innerHTML = `\n #ripple {\n animation: ripple 300ms linear;\n background-color: rgba(255, 255, 255, 0.3);\n border-radius: 50%;\n height: ${diameter}px;\n left: ${clientX - button.getBoundingClientRect().left - radius}px;\n pointer-events: none;\n position: absolute;\n top: ${clientY - button.getBoundingClientRect().top - radius}px;\n transform: scale(0);\n width: ${diameter}px;\n z-index: 0;\n }\n \n @keyframes ripple {\n to {\n opacity: 0;\n transform: scale(2);\n }\n }\n `;\n\n button.appendChild(style);\n button.appendChild(circle);\n\n circle.addEventListener(\"animationend\", () => {\n circle.remove();\n style.remove();\n });\n};\n","import { IconProps } from \"./type\";\n\nexport const Copy = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Error = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m15 9-6 6\" />\n <path d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Info = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Success = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n);\n","import { IconProps } from \"./type\";\n\nexport const Warning = ({ size = 24, color = \"currentColor\" }: IconProps) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 16h.01\" />\n <path d=\"M12 8v4\" />\n <path d=\"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z\" />\n </svg>\n);\n","import { Copy } from \"./Copy\";\nimport { Error } from \"./Error\";\nimport { Info } from \"./Info\";\nimport { Success } from \"./Success\";\nimport { Warning } from \"./Warning\";\n\nexport const Icons = {\n Copy,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VF,QAAAC,aAAA;AADK,IAAM,UAAU,CAAC,EAAE,OAAO,IAAI,QAAQ,eAAe,MAC1D,gBAAAA;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAQ;AAAA,IACR,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IAEf;AAAA,sBAAAD,KAAC,UAAK,GAAE,cAAa;AAAA,MACrB,gBAAAA,KAAC,UAAK,GAAE,WAAU;AAAA,MAClB,gBAAAA,KAAC,UAAK,GAAE,iPAAgP;AAAA;AAAA;AAC1P;;;ACVK,IAAM,QAAQ;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":["jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aristobyte-ui/utils",
|
|
3
|
+
"description": "A collection of shared utility functions for AristoByte projects, designed to provide reusable helpers, streamline common operations, and ensure consistency across applications and packages.",
|
|
4
|
+
"version": "1.0.21",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.mjs",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"author": "AristoByte <info@aristobyte.com>",
|
|
11
|
+
"homepage": "https://www.npmjs.com/package/@aristobyte-ui/utils",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/aristobyte-team/aristobyte-ui.git",
|
|
15
|
+
"directory": "packages/utils"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/aristobyte-team/aristobyte-ui.git/issues"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20.17.0",
|
|
22
|
+
"npm": ">=10.8.2",
|
|
23
|
+
"yarn": ">=1.22.22"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"utils",
|
|
27
|
+
"utilities",
|
|
28
|
+
"helpers",
|
|
29
|
+
"typescript",
|
|
30
|
+
"javascript",
|
|
31
|
+
"shared",
|
|
32
|
+
"common",
|
|
33
|
+
"core",
|
|
34
|
+
"functions",
|
|
35
|
+
"aristobyte"
|
|
36
|
+
],
|
|
37
|
+
"files": [
|
|
38
|
+
"dist"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"exports": {
|
|
44
|
+
".": {
|
|
45
|
+
"import": "./dist/index.mjs",
|
|
46
|
+
"require": "./dist/index.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsup",
|
|
51
|
+
"lint": "eslint . --max-warnings 0",
|
|
52
|
+
"generate:component": "turbo gen react-component",
|
|
53
|
+
"check-types": "tsc --noEmit"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"esbuild-sass-plugin": "^3.3.1",
|
|
57
|
+
"framer-motion": "^12.23.9",
|
|
58
|
+
"react": "^19.1.0",
|
|
59
|
+
"react-dom": "^19.1.0",
|
|
60
|
+
"sass": "^1.89.0",
|
|
61
|
+
"shiki": "^3.7.0",
|
|
62
|
+
"tsup": "^8.5.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@aristobyte-ui/eslint-config": "^1.0.21",
|
|
66
|
+
"@aristobyte-ui/typescript-config": "^1.0.21",
|
|
67
|
+
"@turbo/gen": "^2.5.0",
|
|
68
|
+
"@types/node": "^24.3.0",
|
|
69
|
+
"@types/react": "19.1.0",
|
|
70
|
+
"@types/react-dom": "19.1.1",
|
|
71
|
+
"autoprefixer": "^10.4.21",
|
|
72
|
+
"eslint": "^9.27.0",
|
|
73
|
+
"postcss": "^8.5.3",
|
|
74
|
+
"sass-embedded": "^1.91.0",
|
|
75
|
+
"tailwindcss": "^4.1.7",
|
|
76
|
+
"tsup": "^8.5.0",
|
|
77
|
+
"typescript": "^5.8.3"
|
|
78
|
+
}
|
|
79
|
+
}
|