omui-lib 1.0.0 → 1.0.3
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/chunk-57QJO5RD.mjs +83 -0
- package/dist/chunk-5LA6VVEY.mjs +56 -0
- package/dist/chunk-EWRW432G.mjs +39 -0
- package/dist/chunk-FGTNFYFJ.mjs +114 -0
- package/dist/chunk-MQOZXOBV.mjs +93 -0
- package/dist/chunk-NJSJATQ6.mjs +128 -0
- package/dist/chunk-SJ4MEFAG.mjs +103 -0
- package/dist/chunk-UVOXBLXP.mjs +38 -0
- package/dist/chunk-VA6HDMVP.mjs +50 -0
- package/dist/chunk-XD6E2QQI.mjs +143 -0
- package/dist/chunk-XGVKPI3O.mjs +23 -0
- package/dist/components/AnimatedProgressBar/AnimatedProgressBar.js +83 -0
- package/dist/components/AnimatedProgressBar/AnimatedProgressBar.mjs +6 -0
- package/dist/components/Box/Box.js +71 -0
- package/dist/components/Box/Box.mjs +6 -0
- package/dist/components/Button/Button.js +89 -0
- package/dist/components/Button/Button.mjs +6 -0
- package/dist/components/CommentCard/CommentCard.js +72 -0
- package/dist/components/CommentCard/CommentCard.mjs +6 -0
- package/dist/components/Graph/Graph.js +136 -0
- package/dist/components/Graph/Graph.mjs +6 -0
- package/dist/components/HoverCard/HoverCard.js +126 -0
- package/dist/components/HoverCard/HoverCard.mjs +6 -0
- package/dist/components/Loader/Loader.js +56 -0
- package/dist/components/Loader/Loader.mjs +6 -0
- package/dist/components/PricingCard/PricingCard.js +147 -0
- package/dist/components/PricingCard/PricingCard.mjs +6 -0
- package/dist/components/SliderCard/SliderCard.js +161 -0
- package/dist/components/SliderCard/SliderCard.mjs +6 -0
- package/dist/components/SwipeCard/SwipeCard.js +176 -0
- package/dist/components/SwipeCard/SwipeCard.mjs +6 -0
- package/dist/components/ThumbnailCard/ThumbnailCard.js +116 -0
- package/dist/components/ThumbnailCard/ThumbnailCard.mjs +6 -0
- package/dist/components/ToggleButton/ToggleButton.js +100 -0
- package/dist/components/ToggleButton/ToggleButton.mjs +66 -0
- package/dist/components/Toolbox/Toolbox.js +102 -0
- package/dist/components/Toolbox/Toolbox.mjs +68 -0
- package/dist/index.js +820 -236
- package/dist/index.mjs +43 -271
- package/package.json +7 -4
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// src/components/AnimatedProgressBar/AnimatedProgressBar.jsx
|
|
2
|
+
import React, { useState, useEffect } from "react";
|
|
3
|
+
var AnimatedProgressBar = ({
|
|
4
|
+
progress = 75,
|
|
5
|
+
height = "12px",
|
|
6
|
+
width = "300px",
|
|
7
|
+
bg = "#1e293b",
|
|
8
|
+
color = "#6366f1",
|
|
9
|
+
showPercentage = true,
|
|
10
|
+
borderRadius = "20px",
|
|
11
|
+
animationDuration = "1s"
|
|
12
|
+
}) => {
|
|
13
|
+
const [animatedProgress, setAnimatedProgress] = useState(0);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const timer = setTimeout(() => {
|
|
16
|
+
setAnimatedProgress(progress);
|
|
17
|
+
}, 100);
|
|
18
|
+
return () => clearTimeout(timer);
|
|
19
|
+
}, [progress]);
|
|
20
|
+
const alpha = (hex, op) => {
|
|
21
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
22
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ React.createElement("div", { style: { width, fontFamily: "system-ui,sans-serif" } }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
25
|
+
width: "100%",
|
|
26
|
+
height,
|
|
27
|
+
background: bg,
|
|
28
|
+
borderRadius,
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
position: "relative",
|
|
31
|
+
boxShadow: "inset 0 1px 3px rgba(0,0,0,0.2)"
|
|
32
|
+
} }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
33
|
+
width: animatedProgress + "%",
|
|
34
|
+
height: "100%",
|
|
35
|
+
background: "linear-gradient(90deg, " + color + ", " + alpha(color, 0.7) + ")",
|
|
36
|
+
borderRadius,
|
|
37
|
+
transition: "width " + animationDuration + " cubic-bezier(0.65, 0, 0.35, 1)",
|
|
38
|
+
boxShadow: "0 2px 10px " + alpha(color, 0.4)
|
|
39
|
+
} })), showPercentage && /* @__PURE__ */ React.createElement("div", { style: {
|
|
40
|
+
display: "flex",
|
|
41
|
+
justifyContent: "space-between",
|
|
42
|
+
marginTop: "8px",
|
|
43
|
+
fontSize: "12px",
|
|
44
|
+
color: "rgba(255,255,255,0.6)"
|
|
45
|
+
} }, /* @__PURE__ */ React.createElement("span", null, "Progress"), /* @__PURE__ */ React.createElement("span", { style: { fontWeight: "700", color } }, animatedProgress, "%")));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
AnimatedProgressBar
|
|
50
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// src/components/SwipeCard/SwipeCard.jsx
|
|
2
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
3
|
+
var SwipeCard = ({
|
|
4
|
+
title = "Swipe to Unlock",
|
|
5
|
+
description = "Slide the button to confirm your action",
|
|
6
|
+
accent = "#6366f1",
|
|
7
|
+
bg = "#0f172a",
|
|
8
|
+
onSwipeComplete = () => {
|
|
9
|
+
},
|
|
10
|
+
successText = "Success!"
|
|
11
|
+
}) => {
|
|
12
|
+
const [position, setPosition] = useState(0);
|
|
13
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
14
|
+
const [isComplete, setIsComplete] = useState(false);
|
|
15
|
+
const containerRef = useRef(null);
|
|
16
|
+
const maxWidth = 300;
|
|
17
|
+
const threshold = maxWidth * 0.8;
|
|
18
|
+
const alpha = (hex, op) => {
|
|
19
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
20
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
21
|
+
};
|
|
22
|
+
const handleMouseDown = () => {
|
|
23
|
+
setIsDragging(true);
|
|
24
|
+
};
|
|
25
|
+
const handleMouseMove = (e) => {
|
|
26
|
+
if (!isDragging) return;
|
|
27
|
+
const containerRect = containerRef.current.getBoundingClientRect();
|
|
28
|
+
const newPosition = e.clientX - containerRect.left;
|
|
29
|
+
if (newPosition >= 0 && newPosition <= maxWidth) {
|
|
30
|
+
setPosition(newPosition);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const handleMouseUp = () => {
|
|
34
|
+
setIsDragging(false);
|
|
35
|
+
if (position >= threshold) {
|
|
36
|
+
setPosition(maxWidth);
|
|
37
|
+
setIsComplete(true);
|
|
38
|
+
onSwipeComplete();
|
|
39
|
+
} else {
|
|
40
|
+
setPosition(0);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (isDragging) {
|
|
45
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
46
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
47
|
+
} else {
|
|
48
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
49
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
50
|
+
}
|
|
51
|
+
return () => {
|
|
52
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
53
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
54
|
+
};
|
|
55
|
+
}, [isDragging, position]);
|
|
56
|
+
return /* @__PURE__ */ React.createElement("div", { style: {
|
|
57
|
+
background: bg,
|
|
58
|
+
borderRadius: "16px",
|
|
59
|
+
padding: "24px",
|
|
60
|
+
width: "340px",
|
|
61
|
+
fontFamily: "system-ui,sans-serif",
|
|
62
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)",
|
|
63
|
+
border: "1px solid rgba(255,255,255,0.08)"
|
|
64
|
+
} }, /* @__PURE__ */ React.createElement("h3", { style: {
|
|
65
|
+
fontSize: "18px",
|
|
66
|
+
fontWeight: "700",
|
|
67
|
+
color: "#fff",
|
|
68
|
+
margin: "0 0 8px"
|
|
69
|
+
} }, title), /* @__PURE__ */ React.createElement("p", { style: {
|
|
70
|
+
fontSize: "14px",
|
|
71
|
+
color: "rgba(255,255,255,0.5)",
|
|
72
|
+
margin: "0 0 24px",
|
|
73
|
+
lineHeight: 1.5
|
|
74
|
+
} }, description), /* @__PURE__ */ React.createElement(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
ref: containerRef,
|
|
78
|
+
style: {
|
|
79
|
+
width: "100%",
|
|
80
|
+
height: "50px",
|
|
81
|
+
borderRadius: "12px",
|
|
82
|
+
background: "rgba(255,255,255,0.05)",
|
|
83
|
+
position: "relative",
|
|
84
|
+
overflow: "hidden"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
/* @__PURE__ */ React.createElement(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
style: {
|
|
91
|
+
position: "absolute",
|
|
92
|
+
left: 0,
|
|
93
|
+
top: 0,
|
|
94
|
+
width: position + "px",
|
|
95
|
+
height: "100%",
|
|
96
|
+
background: "linear-gradient(90deg, " + accent + ", " + alpha(accent, 0.7) + ")",
|
|
97
|
+
borderRadius: "12px",
|
|
98
|
+
transition: isDragging ? "none" : "width 0.3s ease"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
isComplete ? /* @__PURE__ */ React.createElement("div", { style: {
|
|
103
|
+
position: "absolute",
|
|
104
|
+
top: 0,
|
|
105
|
+
left: 0,
|
|
106
|
+
right: 0,
|
|
107
|
+
bottom: 0,
|
|
108
|
+
display: "flex",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
justifyContent: "center",
|
|
111
|
+
color: "#fff",
|
|
112
|
+
fontWeight: "700",
|
|
113
|
+
fontSize: "14px"
|
|
114
|
+
} }, successText) : /* @__PURE__ */ React.createElement(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
onMouseDown: handleMouseDown,
|
|
118
|
+
style: {
|
|
119
|
+
position: "absolute",
|
|
120
|
+
left: position + "px",
|
|
121
|
+
top: "50%",
|
|
122
|
+
transform: "translate(-50%, -50%)",
|
|
123
|
+
width: "60px",
|
|
124
|
+
height: "60px",
|
|
125
|
+
borderRadius: "12px",
|
|
126
|
+
background: "#fff",
|
|
127
|
+
cursor: "grab",
|
|
128
|
+
display: "flex",
|
|
129
|
+
alignItems: "center",
|
|
130
|
+
justifyContent: "center",
|
|
131
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.2)",
|
|
132
|
+
userSelect: "none",
|
|
133
|
+
zIndex: 2
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
/* @__PURE__ */ React.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: accent, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("polyline", { points: "9 18 15 12 9 6" }))
|
|
137
|
+
)
|
|
138
|
+
));
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
SwipeCard
|
|
143
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/components/Loader/Loader.jsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
var Loader = ({
|
|
4
|
+
size = "48px",
|
|
5
|
+
color = "#6366f1",
|
|
6
|
+
bg = "rgba(255,255,255,0.1)",
|
|
7
|
+
speed = "1s",
|
|
8
|
+
thickness = "4px"
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", width: "100%", height: "100%" } }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
11
|
+
width: size,
|
|
12
|
+
height: size,
|
|
13
|
+
borderRadius: "50%",
|
|
14
|
+
border: thickness + " solid " + bg,
|
|
15
|
+
borderTop: thickness + " solid " + color,
|
|
16
|
+
animation: "spin " + speed + " linear infinite",
|
|
17
|
+
display: "inline-block"
|
|
18
|
+
} }), /* @__PURE__ */ React.createElement("style", null, "@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }"));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
Loader
|
|
23
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/AnimatedProgressBar/AnimatedProgressBar.jsx
|
|
30
|
+
var AnimatedProgressBar_exports = {};
|
|
31
|
+
__export(AnimatedProgressBar_exports, {
|
|
32
|
+
AnimatedProgressBar: () => AnimatedProgressBar
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(AnimatedProgressBar_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var AnimatedProgressBar = ({
|
|
37
|
+
progress = 75,
|
|
38
|
+
height = "12px",
|
|
39
|
+
width = "300px",
|
|
40
|
+
bg = "#1e293b",
|
|
41
|
+
color = "#6366f1",
|
|
42
|
+
showPercentage = true,
|
|
43
|
+
borderRadius = "20px",
|
|
44
|
+
animationDuration = "1s"
|
|
45
|
+
}) => {
|
|
46
|
+
const [animatedProgress, setAnimatedProgress] = (0, import_react.useState)(0);
|
|
47
|
+
(0, import_react.useEffect)(() => {
|
|
48
|
+
const timer = setTimeout(() => {
|
|
49
|
+
setAnimatedProgress(progress);
|
|
50
|
+
}, 100);
|
|
51
|
+
return () => clearTimeout(timer);
|
|
52
|
+
}, [progress]);
|
|
53
|
+
const alpha = (hex, op) => {
|
|
54
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
55
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
56
|
+
};
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { width, fontFamily: "system-ui,sans-serif" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
58
|
+
width: "100%",
|
|
59
|
+
height,
|
|
60
|
+
background: bg,
|
|
61
|
+
borderRadius,
|
|
62
|
+
overflow: "hidden",
|
|
63
|
+
position: "relative",
|
|
64
|
+
boxShadow: "inset 0 1px 3px rgba(0,0,0,0.2)"
|
|
65
|
+
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
66
|
+
width: animatedProgress + "%",
|
|
67
|
+
height: "100%",
|
|
68
|
+
background: "linear-gradient(90deg, " + color + ", " + alpha(color, 0.7) + ")",
|
|
69
|
+
borderRadius,
|
|
70
|
+
transition: "width " + animationDuration + " cubic-bezier(0.65, 0, 0.35, 1)",
|
|
71
|
+
boxShadow: "0 2px 10px " + alpha(color, 0.4)
|
|
72
|
+
} })), showPercentage && /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
73
|
+
display: "flex",
|
|
74
|
+
justifyContent: "space-between",
|
|
75
|
+
marginTop: "8px",
|
|
76
|
+
fontSize: "12px",
|
|
77
|
+
color: "rgba(255,255,255,0.6)"
|
|
78
|
+
} }, /* @__PURE__ */ import_react.default.createElement("span", null, "Progress"), /* @__PURE__ */ import_react.default.createElement("span", { style: { fontWeight: "700", color } }, animatedProgress, "%")));
|
|
79
|
+
};
|
|
80
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
+
0 && (module.exports = {
|
|
82
|
+
AnimatedProgressBar
|
|
83
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/Box/Box.jsx
|
|
30
|
+
var Box_exports = {};
|
|
31
|
+
__export(Box_exports, {
|
|
32
|
+
Box: () => Box
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Box_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var Box = ({
|
|
37
|
+
width = "300px",
|
|
38
|
+
height = "200px",
|
|
39
|
+
bg = "#1e293b",
|
|
40
|
+
color = "#fff",
|
|
41
|
+
borderRadius = "16px",
|
|
42
|
+
padding = "20px",
|
|
43
|
+
border = "1px solid rgba(255,255,255,0.08)",
|
|
44
|
+
shadow = "0 10px 40px rgba(0,0,0,0.4)",
|
|
45
|
+
children = "Box Content"
|
|
46
|
+
}) => {
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
style: {
|
|
51
|
+
width,
|
|
52
|
+
height,
|
|
53
|
+
background: bg,
|
|
54
|
+
color,
|
|
55
|
+
borderRadius,
|
|
56
|
+
padding,
|
|
57
|
+
border,
|
|
58
|
+
boxShadow: shadow,
|
|
59
|
+
fontFamily: "system-ui, sans-serif",
|
|
60
|
+
display: "flex",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyContent: "center"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
children
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
Box
|
|
71
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/Button/Button.jsx
|
|
30
|
+
var Button_exports = {};
|
|
31
|
+
__export(Button_exports, {
|
|
32
|
+
Button: () => Button
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Button_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var Button = ({
|
|
37
|
+
text = "Click me",
|
|
38
|
+
bg = "#6366f1",
|
|
39
|
+
color = "#ffffff",
|
|
40
|
+
size = "md",
|
|
41
|
+
radius = "10px",
|
|
42
|
+
disabled = false,
|
|
43
|
+
loading = false,
|
|
44
|
+
onClick = () => {
|
|
45
|
+
},
|
|
46
|
+
shadow = true
|
|
47
|
+
}) => {
|
|
48
|
+
const sizes = {
|
|
49
|
+
sm: { padding: "8px 16px", fontSize: "13px" },
|
|
50
|
+
md: { padding: "12px 24px", fontSize: "15px" },
|
|
51
|
+
lg: { padding: "16px 32px", fontSize: "17px" }
|
|
52
|
+
};
|
|
53
|
+
const alpha = (hex, op) => {
|
|
54
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
55
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
56
|
+
};
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
onClick,
|
|
61
|
+
disabled: disabled || loading,
|
|
62
|
+
style: {
|
|
63
|
+
background: bg,
|
|
64
|
+
color,
|
|
65
|
+
padding: sizes[size].padding,
|
|
66
|
+
borderRadius: radius,
|
|
67
|
+
border: "none",
|
|
68
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
69
|
+
fontWeight: "700",
|
|
70
|
+
fontSize: sizes[size].fontSize,
|
|
71
|
+
fontFamily: "system-ui, sans-serif",
|
|
72
|
+
boxShadow: shadow ? "0 4px 14px " + alpha(bg, 0.4) : "none",
|
|
73
|
+
opacity: disabled ? 0.7 : 1,
|
|
74
|
+
transition: "all 0.2s ease",
|
|
75
|
+
position: "relative",
|
|
76
|
+
overflow: "hidden",
|
|
77
|
+
transform: "translateY(0)",
|
|
78
|
+
"&:hover": {
|
|
79
|
+
transform: "translateY(-1px)"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
loading ? /* @__PURE__ */ import_react.default.createElement("span", { style: { display: "flex", alignItems: "center", justifyContent: "center", gap: "8px" } }, /* @__PURE__ */ import_react.default.createElement("span", { style: { width: "12px", height: "12px", borderRadius: "50%", border: "2px solid " + color, borderTopColor: "transparent", animation: "spin 0.8s linear infinite" } }), "Loading...") : text
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
+
0 && (module.exports = {
|
|
88
|
+
Button
|
|
89
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/CommentCard/CommentCard.jsx
|
|
30
|
+
var CommentCard_exports = {};
|
|
31
|
+
__export(CommentCard_exports, {
|
|
32
|
+
CommentCard: () => CommentCard
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(CommentCard_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var CommentCard = ({
|
|
37
|
+
avatar = "https://i.pravatar.cc/150?img=68",
|
|
38
|
+
name = "John Doe",
|
|
39
|
+
timestamp = "2 hours ago",
|
|
40
|
+
comment = "This is an insightful comment that adds value to the discussion.",
|
|
41
|
+
accent = "#6366f1",
|
|
42
|
+
bg = "#0f172a",
|
|
43
|
+
onReplyClick = () => {
|
|
44
|
+
}
|
|
45
|
+
}) => {
|
|
46
|
+
const alpha = (hex, op) => {
|
|
47
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
48
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
51
|
+
background: bg,
|
|
52
|
+
borderRadius: "16px",
|
|
53
|
+
padding: "16px",
|
|
54
|
+
border: "1px solid " + alpha(accent, 0.1),
|
|
55
|
+
fontFamily: "system-ui,sans-serif",
|
|
56
|
+
width: "320px"
|
|
57
|
+
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "12px" } }, /* @__PURE__ */ import_react.default.createElement("img", { src: avatar, alt: name, style: { width: "40px", height: "40px", borderRadius: "50%", objectFit: "cover" } }), /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: "14px", fontWeight: "700", color: "#fff" } }, name), /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.4)" } }, timestamp))), /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.7)", lineHeight: 1.5, marginBottom: "16px" } }, comment), /* @__PURE__ */ import_react.default.createElement("button", { onClick: onReplyClick, style: {
|
|
58
|
+
padding: "6px 12px",
|
|
59
|
+
borderRadius: "8px",
|
|
60
|
+
border: "1px solid " + alpha(accent, 0.2),
|
|
61
|
+
background: "transparent",
|
|
62
|
+
color: accent,
|
|
63
|
+
fontSize: "12px",
|
|
64
|
+
fontWeight: "600",
|
|
65
|
+
cursor: "pointer",
|
|
66
|
+
fontFamily: "inherit"
|
|
67
|
+
} }, "Reply"));
|
|
68
|
+
};
|
|
69
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
+
0 && (module.exports = {
|
|
71
|
+
CommentCard
|
|
72
|
+
});
|