omui-lib 1.0.1 → 1.0.4

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 (40) hide show
  1. package/dist/chunk-57QJO5RD.mjs +83 -0
  2. package/dist/chunk-5LA6VVEY.mjs +56 -0
  3. package/dist/chunk-EWRW432G.mjs +39 -0
  4. package/dist/chunk-FGTNFYFJ.mjs +114 -0
  5. package/dist/chunk-MQOZXOBV.mjs +93 -0
  6. package/dist/chunk-NJSJATQ6.mjs +128 -0
  7. package/dist/chunk-SJ4MEFAG.mjs +103 -0
  8. package/dist/chunk-VA6HDMVP.mjs +50 -0
  9. package/dist/chunk-WFKB25KN.mjs +99 -0
  10. package/dist/chunk-XD6E2QQI.mjs +143 -0
  11. package/dist/chunk-XGVKPI3O.mjs +23 -0
  12. package/dist/components/AnimatedProgressBar/AnimatedProgressBar.js +83 -0
  13. package/dist/components/AnimatedProgressBar/AnimatedProgressBar.mjs +6 -0
  14. package/dist/components/Button/Button.js +89 -0
  15. package/dist/components/Button/Button.mjs +6 -0
  16. package/dist/components/CommentCard/CommentCard.js +72 -0
  17. package/dist/components/CommentCard/CommentCard.mjs +6 -0
  18. package/dist/components/Graph/Graph.js +136 -0
  19. package/dist/components/Graph/Graph.mjs +6 -0
  20. package/dist/components/HoverCard/HoverCard.js +126 -0
  21. package/dist/components/HoverCard/HoverCard.mjs +6 -0
  22. package/dist/components/Loader/Loader.js +56 -0
  23. package/dist/components/Loader/Loader.mjs +6 -0
  24. package/dist/components/PricingCard/PricingCard.js +147 -0
  25. package/dist/components/PricingCard/PricingCard.mjs +6 -0
  26. package/dist/components/ProfileCard/ProfileCard.js +132 -0
  27. package/dist/components/ProfileCard/ProfileCard.mjs +6 -0
  28. package/dist/components/SliderCard/SliderCard.js +161 -0
  29. package/dist/components/SliderCard/SliderCard.mjs +6 -0
  30. package/dist/components/SwipeCard/SwipeCard.js +176 -0
  31. package/dist/components/SwipeCard/SwipeCard.mjs +6 -0
  32. package/dist/components/ThumbnailCard/ThumbnailCard.js +116 -0
  33. package/dist/components/ThumbnailCard/ThumbnailCard.mjs +6 -0
  34. package/dist/components/ToggleButton/ToggleButton.js +100 -0
  35. package/dist/components/ToggleButton/ToggleButton.mjs +66 -0
  36. package/dist/components/Toolbox/Toolbox.js +102 -0
  37. package/dist/components/Toolbox/Toolbox.mjs +68 -0
  38. package/dist/index.js +872 -405
  39. package/dist/index.mjs +43 -448
  40. package/package.json +4 -3
@@ -0,0 +1,99 @@
1
+ // src/components/ProfileCard/ProfileCard.jsx
2
+ import React from "react";
3
+ var ProfileCard = ({
4
+ image = "https://i.pravatar.cc/150",
5
+ name = "John Doe",
6
+ role = "Frontend Developer",
7
+ bio = "Passionate developer who loves building beautiful and interactive web experiences.",
8
+ buttonText = "View Profile",
9
+ color = "#6366f1"
10
+ }) => {
11
+ return /* @__PURE__ */ React.createElement(
12
+ "div",
13
+ {
14
+ style: {
15
+ width: "320px",
16
+ padding: "24px",
17
+ borderRadius: "20px",
18
+ background: "rgba(255,255,255,0.08)",
19
+ border: "1px solid rgba(255,255,255,0.12)",
20
+ backdropFilter: "blur(12px)",
21
+ WebkitBackdropFilter: "blur(12px)",
22
+ textAlign: "center",
23
+ color: "#fff",
24
+ boxShadow: "0 10px 30px rgba(0,0,0,0.2)"
25
+ }
26
+ },
27
+ /* @__PURE__ */ React.createElement(
28
+ "img",
29
+ {
30
+ src: image,
31
+ alt: name,
32
+ style: {
33
+ width: "90px",
34
+ height: "90px",
35
+ borderRadius: "50%",
36
+ objectFit: "cover",
37
+ border: `3px solid ${color}`,
38
+ marginBottom: "16px"
39
+ }
40
+ }
41
+ ),
42
+ /* @__PURE__ */ React.createElement(
43
+ "h2",
44
+ {
45
+ style: {
46
+ margin: "0 0 6px",
47
+ fontSize: "22px",
48
+ fontWeight: "600"
49
+ }
50
+ },
51
+ name
52
+ ),
53
+ /* @__PURE__ */ React.createElement(
54
+ "p",
55
+ {
56
+ style: {
57
+ margin: "0 0 14px",
58
+ color,
59
+ fontSize: "14px",
60
+ fontWeight: "500"
61
+ }
62
+ },
63
+ role
64
+ ),
65
+ /* @__PURE__ */ React.createElement(
66
+ "p",
67
+ {
68
+ style: {
69
+ margin: "0 0 20px",
70
+ color: "rgba(255,255,255,0.65)",
71
+ fontSize: "14px",
72
+ lineHeight: "1.6"
73
+ }
74
+ },
75
+ bio
76
+ ),
77
+ /* @__PURE__ */ React.createElement(
78
+ "button",
79
+ {
80
+ style: {
81
+ width: "100%",
82
+ padding: "12px 18px",
83
+ border: "none",
84
+ borderRadius: "10px",
85
+ background: color,
86
+ color: "#fff",
87
+ fontSize: "14px",
88
+ fontWeight: "600",
89
+ cursor: "pointer"
90
+ }
91
+ },
92
+ buttonText
93
+ )
94
+ );
95
+ };
96
+
97
+ export {
98
+ ProfileCard
99
+ };
@@ -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,6 @@
1
+ import {
2
+ AnimatedProgressBar
3
+ } from "../../chunk-VA6HDMVP.mjs";
4
+ export {
5
+ AnimatedProgressBar
6
+ };
@@ -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,6 @@
1
+ import {
2
+ Button
3
+ } from "../../chunk-5LA6VVEY.mjs";
4
+ export {
5
+ Button
6
+ };
@@ -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
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ CommentCard
3
+ } from "../../chunk-EWRW432G.mjs";
4
+ export {
5
+ CommentCard
6
+ };
@@ -0,0 +1,136 @@
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/Graph/Graph.jsx
30
+ var Graph_exports = {};
31
+ __export(Graph_exports, {
32
+ Graph: () => Graph
33
+ });
34
+ module.exports = __toCommonJS(Graph_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var Graph = ({
37
+ data = [25, 50, 75, 100, 75, 50, 25],
38
+ labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
39
+ width = 600,
40
+ height = 300,
41
+ bg = "#0f172a",
42
+ accent = "#6366f1",
43
+ gridColor = "rgba(255,255,255,0.05)",
44
+ textColor = "rgba(255,255,255,0.5)",
45
+ showDots = true,
46
+ showArea = true
47
+ }) => {
48
+ const canvasRef = (0, import_react.useRef)(null);
49
+ const alpha = (hex, op) => {
50
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
51
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
52
+ };
53
+ (0, import_react.useEffect)(() => {
54
+ const canvas = canvasRef.current;
55
+ const ctx = canvas.getContext("2d");
56
+ ctx.clearRect(0, 0, width, height);
57
+ ctx.strokeStyle = gridColor;
58
+ ctx.lineWidth = 1;
59
+ const gridLines = 5;
60
+ for (let i = 0; i <= gridLines; i++) {
61
+ const y = (height - 40) * (i / gridLines) + 20;
62
+ ctx.beginPath();
63
+ ctx.moveTo(40, y);
64
+ ctx.lineTo(width - 20, y);
65
+ ctx.stroke();
66
+ ctx.fillStyle = textColor;
67
+ ctx.font = "10px system-ui, sans-serif";
68
+ ctx.textAlign = "right";
69
+ ctx.fillText(String(100 - i * 20), 35, y + 4);
70
+ }
71
+ const step = (width - 60) / (data.length - 1);
72
+ for (let i = 0; i < data.length; i++) {
73
+ const x = 40 + i * step;
74
+ ctx.beginPath();
75
+ ctx.moveTo(x, 20);
76
+ ctx.lineTo(x, height - 20);
77
+ ctx.stroke();
78
+ ctx.fillStyle = textColor;
79
+ ctx.font = "11px system-ui, sans-serif";
80
+ ctx.textAlign = "center";
81
+ ctx.fillText(labels[i], x, height - 5);
82
+ }
83
+ const points = data.map((value, i) => {
84
+ const x = 40 + i * step;
85
+ const y = height - 20 - value / 100 * (height - 40);
86
+ return { x, y };
87
+ });
88
+ if (showArea) {
89
+ ctx.fillStyle = alpha(accent, 0.15);
90
+ ctx.beginPath();
91
+ ctx.moveTo(40, height - 20);
92
+ points.forEach((point) => ctx.lineTo(point.x, point.y));
93
+ ctx.lineTo(width - 20, height - 20);
94
+ ctx.closePath();
95
+ ctx.fill();
96
+ }
97
+ ctx.strokeStyle = accent;
98
+ ctx.lineWidth = 2;
99
+ ctx.beginPath();
100
+ ctx.moveTo(points[0].x, points[0].y);
101
+ points.slice(1).forEach((point) => ctx.lineTo(point.x, point.y));
102
+ ctx.stroke();
103
+ if (showDots) {
104
+ points.forEach((point) => {
105
+ ctx.fillStyle = accent;
106
+ ctx.beginPath();
107
+ ctx.arc(point.x, point.y, 4, 0, Math.PI * 2);
108
+ ctx.fill();
109
+ ctx.fillStyle = bg;
110
+ ctx.beginPath();
111
+ ctx.arc(point.x, point.y, 2, 0, Math.PI * 2);
112
+ ctx.fill();
113
+ });
114
+ }
115
+ }, [data, labels, width, height, bg, accent, gridColor, textColor, showDots, showArea]);
116
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: {
117
+ background: bg,
118
+ borderRadius: "16px",
119
+ padding: "20px",
120
+ width: width + "px",
121
+ border: "1px solid rgba(255,255,255,0.08)",
122
+ boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
123
+ } }, /* @__PURE__ */ import_react.default.createElement(
124
+ "canvas",
125
+ {
126
+ ref: canvasRef,
127
+ width,
128
+ height,
129
+ style: { display: "block" }
130
+ }
131
+ ));
132
+ };
133
+ // Annotate the CommonJS export names for ESM import in node:
134
+ 0 && (module.exports = {
135
+ Graph
136
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ Graph
3
+ } from "../../chunk-SJ4MEFAG.mjs";
4
+ export {
5
+ Graph
6
+ };