omui-lib 1.0.1 → 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.
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-UVOXBLXP.mjs +38 -0
  9. package/dist/chunk-VA6HDMVP.mjs +50 -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/Box/Box.js +71 -0
  15. package/dist/components/Box/Box.mjs +6 -0
  16. package/dist/components/Button/Button.js +89 -0
  17. package/dist/components/Button/Button.mjs +6 -0
  18. package/dist/components/CommentCard/CommentCard.js +72 -0
  19. package/dist/components/CommentCard/CommentCard.mjs +6 -0
  20. package/dist/components/Graph/Graph.js +136 -0
  21. package/dist/components/Graph/Graph.mjs +6 -0
  22. package/dist/components/HoverCard/HoverCard.js +126 -0
  23. package/dist/components/HoverCard/HoverCard.mjs +6 -0
  24. package/dist/components/Loader/Loader.js +56 -0
  25. package/dist/components/Loader/Loader.mjs +6 -0
  26. package/dist/components/PricingCard/PricingCard.js +147 -0
  27. package/dist/components/PricingCard/PricingCard.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 +811 -405
  39. package/dist/index.mjs +43 -448
  40. package/package.json +4 -3
@@ -0,0 +1,176 @@
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/SwipeCard/SwipeCard.jsx
30
+ var SwipeCard_exports = {};
31
+ __export(SwipeCard_exports, {
32
+ SwipeCard: () => SwipeCard
33
+ });
34
+ module.exports = __toCommonJS(SwipeCard_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var SwipeCard = ({
37
+ title = "Swipe to Unlock",
38
+ description = "Slide the button to confirm your action",
39
+ accent = "#6366f1",
40
+ bg = "#0f172a",
41
+ onSwipeComplete = () => {
42
+ },
43
+ successText = "Success!"
44
+ }) => {
45
+ const [position, setPosition] = (0, import_react.useState)(0);
46
+ const [isDragging, setIsDragging] = (0, import_react.useState)(false);
47
+ const [isComplete, setIsComplete] = (0, import_react.useState)(false);
48
+ const containerRef = (0, import_react.useRef)(null);
49
+ const maxWidth = 300;
50
+ const threshold = maxWidth * 0.8;
51
+ const alpha = (hex, op) => {
52
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
53
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
54
+ };
55
+ const handleMouseDown = () => {
56
+ setIsDragging(true);
57
+ };
58
+ const handleMouseMove = (e) => {
59
+ if (!isDragging) return;
60
+ const containerRect = containerRef.current.getBoundingClientRect();
61
+ const newPosition = e.clientX - containerRect.left;
62
+ if (newPosition >= 0 && newPosition <= maxWidth) {
63
+ setPosition(newPosition);
64
+ }
65
+ };
66
+ const handleMouseUp = () => {
67
+ setIsDragging(false);
68
+ if (position >= threshold) {
69
+ setPosition(maxWidth);
70
+ setIsComplete(true);
71
+ onSwipeComplete();
72
+ } else {
73
+ setPosition(0);
74
+ }
75
+ };
76
+ (0, import_react.useEffect)(() => {
77
+ if (isDragging) {
78
+ document.addEventListener("mousemove", handleMouseMove);
79
+ document.addEventListener("mouseup", handleMouseUp);
80
+ } else {
81
+ document.removeEventListener("mousemove", handleMouseMove);
82
+ document.removeEventListener("mouseup", handleMouseUp);
83
+ }
84
+ return () => {
85
+ document.removeEventListener("mousemove", handleMouseMove);
86
+ document.removeEventListener("mouseup", handleMouseUp);
87
+ };
88
+ }, [isDragging, position]);
89
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: {
90
+ background: bg,
91
+ borderRadius: "16px",
92
+ padding: "24px",
93
+ width: "340px",
94
+ fontFamily: "system-ui,sans-serif",
95
+ boxShadow: "0 10px 40px rgba(0,0,0,0.4)",
96
+ border: "1px solid rgba(255,255,255,0.08)"
97
+ } }, /* @__PURE__ */ import_react.default.createElement("h3", { style: {
98
+ fontSize: "18px",
99
+ fontWeight: "700",
100
+ color: "#fff",
101
+ margin: "0 0 8px"
102
+ } }, title), /* @__PURE__ */ import_react.default.createElement("p", { style: {
103
+ fontSize: "14px",
104
+ color: "rgba(255,255,255,0.5)",
105
+ margin: "0 0 24px",
106
+ lineHeight: 1.5
107
+ } }, description), /* @__PURE__ */ import_react.default.createElement(
108
+ "div",
109
+ {
110
+ ref: containerRef,
111
+ style: {
112
+ width: "100%",
113
+ height: "50px",
114
+ borderRadius: "12px",
115
+ background: "rgba(255,255,255,0.05)",
116
+ position: "relative",
117
+ overflow: "hidden"
118
+ }
119
+ },
120
+ /* @__PURE__ */ import_react.default.createElement(
121
+ "div",
122
+ {
123
+ style: {
124
+ position: "absolute",
125
+ left: 0,
126
+ top: 0,
127
+ width: position + "px",
128
+ height: "100%",
129
+ background: "linear-gradient(90deg, " + accent + ", " + alpha(accent, 0.7) + ")",
130
+ borderRadius: "12px",
131
+ transition: isDragging ? "none" : "width 0.3s ease"
132
+ }
133
+ }
134
+ ),
135
+ isComplete ? /* @__PURE__ */ import_react.default.createElement("div", { style: {
136
+ position: "absolute",
137
+ top: 0,
138
+ left: 0,
139
+ right: 0,
140
+ bottom: 0,
141
+ display: "flex",
142
+ alignItems: "center",
143
+ justifyContent: "center",
144
+ color: "#fff",
145
+ fontWeight: "700",
146
+ fontSize: "14px"
147
+ } }, successText) : /* @__PURE__ */ import_react.default.createElement(
148
+ "div",
149
+ {
150
+ onMouseDown: handleMouseDown,
151
+ style: {
152
+ position: "absolute",
153
+ left: position + "px",
154
+ top: "50%",
155
+ transform: "translate(-50%, -50%)",
156
+ width: "60px",
157
+ height: "60px",
158
+ borderRadius: "12px",
159
+ background: "#fff",
160
+ cursor: "grab",
161
+ display: "flex",
162
+ alignItems: "center",
163
+ justifyContent: "center",
164
+ boxShadow: "0 4px 12px rgba(0,0,0,0.2)",
165
+ userSelect: "none",
166
+ zIndex: 2
167
+ }
168
+ },
169
+ /* @__PURE__ */ import_react.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: accent, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react.default.createElement("polyline", { points: "9 18 15 12 9 6" }))
170
+ )
171
+ ));
172
+ };
173
+ // Annotate the CommonJS export names for ESM import in node:
174
+ 0 && (module.exports = {
175
+ SwipeCard
176
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ SwipeCard
3
+ } from "../../chunk-XD6E2QQI.mjs";
4
+ export {
5
+ SwipeCard
6
+ };
@@ -0,0 +1,116 @@
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/ThumbnailCard/ThumbnailCard.jsx
30
+ var ThumbnailCard_exports = {};
31
+ __export(ThumbnailCard_exports, {
32
+ ThumbnailCard: () => ThumbnailCard
33
+ });
34
+ module.exports = __toCommonJS(ThumbnailCard_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var ThumbnailCard = ({
37
+ image = "https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=600&q=80",
38
+ title = "Modern UI Design",
39
+ views = 1243,
40
+ duration = "2:45",
41
+ channel = "Design Mastery",
42
+ accent = "#6366f1",
43
+ bg = "#0f172a",
44
+ onClick = () => {
45
+ }
46
+ }) => {
47
+ const [hovered, setHovered] = (0, import_react.useState)(false);
48
+ const alpha = (hex, op) => {
49
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
50
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
51
+ };
52
+ return /* @__PURE__ */ import_react.default.createElement(
53
+ "div",
54
+ {
55
+ onClick,
56
+ onMouseEnter: () => setHovered(true),
57
+ onMouseLeave: () => setHovered(false),
58
+ style: {
59
+ background: bg,
60
+ borderRadius: "12px",
61
+ overflow: "hidden",
62
+ width: "280px",
63
+ cursor: "pointer",
64
+ transition: "transform 0.2s",
65
+ transform: hovered ? "scale(1.02)" : "scale(1)",
66
+ fontFamily: "system-ui,sans-serif"
67
+ }
68
+ },
69
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { position: "relative", width: "100%", height: "160px" } }, /* @__PURE__ */ import_react.default.createElement(
70
+ "img",
71
+ {
72
+ src: image,
73
+ alt: title,
74
+ style: {
75
+ width: "100%",
76
+ height: "100%",
77
+ objectFit: "cover",
78
+ transition: "transform 0.3s",
79
+ transform: hovered ? "scale(1.05)" : "scale(1)"
80
+ }
81
+ }
82
+ ), /* @__PURE__ */ import_react.default.createElement("div", { style: {
83
+ position: "absolute",
84
+ bottom: "8px",
85
+ right: "8px",
86
+ padding: "3px 6px",
87
+ borderRadius: "4px",
88
+ background: "rgba(0,0,0,0.8)",
89
+ color: "#fff",
90
+ fontSize: "10px",
91
+ fontWeight: "600"
92
+ } }, duration)),
93
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "12px" } }, /* @__PURE__ */ import_react.default.createElement("h3", { style: {
94
+ fontSize: "14px",
95
+ fontWeight: "700",
96
+ color: "#fff",
97
+ margin: "0 0 6px",
98
+ lineHeight: 1.4,
99
+ whiteSpace: "nowrap",
100
+ overflow: "hidden",
101
+ textOverflow: "ellipsis"
102
+ } }, title), /* @__PURE__ */ import_react.default.createElement("p", { style: {
103
+ fontSize: "12px",
104
+ color: "rgba(255,255,255,0.5)",
105
+ margin: "0 0 4px"
106
+ } }, channel), /* @__PURE__ */ import_react.default.createElement("p", { style: {
107
+ fontSize: "11px",
108
+ color: "rgba(255,255,255,0.35)",
109
+ margin: 0
110
+ } }, views.toLocaleString(), " views"))
111
+ );
112
+ };
113
+ // Annotate the CommonJS export names for ESM import in node:
114
+ 0 && (module.exports = {
115
+ ThumbnailCard
116
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ ThumbnailCard
3
+ } from "../../chunk-57QJO5RD.mjs";
4
+ export {
5
+ ThumbnailCard
6
+ };
@@ -0,0 +1,100 @@
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/ToggleButton/ToggleButton.jsx
30
+ var ToggleButton_exports = {};
31
+ __export(ToggleButton_exports, {
32
+ ToggleButton: () => ToggleButton
33
+ });
34
+ module.exports = __toCommonJS(ToggleButton_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var ToggleButton = ({
37
+ initialActive = false,
38
+ activeText = "ON",
39
+ inactiveText = "OFF",
40
+ activeBg = "#7c3aed",
41
+ inactiveBg = "#1e293b",
42
+ thumbColor = "#fff",
43
+ width = "120px",
44
+ height = "40px",
45
+ onChange = () => {
46
+ }
47
+ }) => {
48
+ const [active, setActive] = (0, import_react.useState)(initialActive);
49
+ const toggle = () => {
50
+ setActive(!active);
51
+ onChange(!active);
52
+ };
53
+ return /* @__PURE__ */ import_react.default.createElement(
54
+ "div",
55
+ {
56
+ onClick: toggle,
57
+ style: {
58
+ position: "relative",
59
+ width,
60
+ height,
61
+ borderRadius: "100px",
62
+ background: active ? activeBg : inactiveBg,
63
+ cursor: "pointer",
64
+ transition: "background 0.3s ease",
65
+ boxShadow: "0 4px 12px rgba(0,0,0,0.2)",
66
+ display: "flex",
67
+ alignItems: "center",
68
+ justifyContent: "space-between",
69
+ padding: "0 12px",
70
+ boxSizing: "border-box",
71
+ fontFamily: "system-ui,sans-serif",
72
+ fontWeight: "700",
73
+ fontSize: "12px",
74
+ color: thumbColor,
75
+ overflow: "hidden"
76
+ }
77
+ },
78
+ /* @__PURE__ */ import_react.default.createElement("span", { style: { opacity: active ? 0 : 1, transition: "opacity 0.2s", zIndex: 1 } }, inactiveText),
79
+ /* @__PURE__ */ import_react.default.createElement("span", { style: { opacity: active ? 1 : 0, transition: "opacity 0.2s", zIndex: 1 } }, activeText),
80
+ /* @__PURE__ */ import_react.default.createElement(
81
+ "div",
82
+ {
83
+ style: {
84
+ position: "absolute",
85
+ left: active ? "calc(100% - 32px)" : "4px",
86
+ width: "calc(" + height + " - 8px)",
87
+ height: "calc(" + height + " - 8px)",
88
+ background: thumbColor,
89
+ borderRadius: "50%",
90
+ transition: "left 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55)",
91
+ boxShadow: "0 2px 8px rgba(0,0,0,0.2)"
92
+ }
93
+ }
94
+ )
95
+ );
96
+ };
97
+ // Annotate the CommonJS export names for ESM import in node:
98
+ 0 && (module.exports = {
99
+ ToggleButton
100
+ });
@@ -0,0 +1,66 @@
1
+ // src/components/ToggleButton/ToggleButton.jsx
2
+ import React, { useState } from "react";
3
+ var ToggleButton = ({
4
+ initialActive = false,
5
+ activeText = "ON",
6
+ inactiveText = "OFF",
7
+ activeBg = "#7c3aed",
8
+ inactiveBg = "#1e293b",
9
+ thumbColor = "#fff",
10
+ width = "120px",
11
+ height = "40px",
12
+ onChange = () => {
13
+ }
14
+ }) => {
15
+ const [active, setActive] = useState(initialActive);
16
+ const toggle = () => {
17
+ setActive(!active);
18
+ onChange(!active);
19
+ };
20
+ return /* @__PURE__ */ React.createElement(
21
+ "div",
22
+ {
23
+ onClick: toggle,
24
+ style: {
25
+ position: "relative",
26
+ width,
27
+ height,
28
+ borderRadius: "100px",
29
+ background: active ? activeBg : inactiveBg,
30
+ cursor: "pointer",
31
+ transition: "background 0.3s ease",
32
+ boxShadow: "0 4px 12px rgba(0,0,0,0.2)",
33
+ display: "flex",
34
+ alignItems: "center",
35
+ justifyContent: "space-between",
36
+ padding: "0 12px",
37
+ boxSizing: "border-box",
38
+ fontFamily: "system-ui,sans-serif",
39
+ fontWeight: "700",
40
+ fontSize: "12px",
41
+ color: thumbColor,
42
+ overflow: "hidden"
43
+ }
44
+ },
45
+ /* @__PURE__ */ React.createElement("span", { style: { opacity: active ? 0 : 1, transition: "opacity 0.2s", zIndex: 1 } }, inactiveText),
46
+ /* @__PURE__ */ React.createElement("span", { style: { opacity: active ? 1 : 0, transition: "opacity 0.2s", zIndex: 1 } }, activeText),
47
+ /* @__PURE__ */ React.createElement(
48
+ "div",
49
+ {
50
+ style: {
51
+ position: "absolute",
52
+ left: active ? "calc(100% - 32px)" : "4px",
53
+ width: "calc(" + height + " - 8px)",
54
+ height: "calc(" + height + " - 8px)",
55
+ background: thumbColor,
56
+ borderRadius: "50%",
57
+ transition: "left 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55)",
58
+ boxShadow: "0 2px 8px rgba(0,0,0,0.2)"
59
+ }
60
+ }
61
+ )
62
+ );
63
+ };
64
+ export {
65
+ ToggleButton
66
+ };
@@ -0,0 +1,102 @@
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/Toolbox/Toolbox.jsx
30
+ var Toolbox_exports = {};
31
+ __export(Toolbox_exports, {
32
+ Toolbox: () => Toolbox
33
+ });
34
+ module.exports = __toCommonJS(Toolbox_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var Toolbox = ({
37
+ tools = ["Brush", "Eraser", "Text", "Shapes", "Crop"],
38
+ activeTool = "Brush",
39
+ accent = "#6366f1",
40
+ bg = "#0f172a",
41
+ onToolSelect = () => {
42
+ }
43
+ }) => {
44
+ const alpha = (hex, op) => {
45
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
46
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
47
+ };
48
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: {
49
+ background: bg,
50
+ borderRadius: "14px",
51
+ padding: "12px",
52
+ width: "280px",
53
+ border: "1px solid rgba(255,255,255,0.08)",
54
+ boxShadow: "0 10px 40px rgba(0,0,0,0.4)",
55
+ fontFamily: "system-ui,sans-serif"
56
+ } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
57
+ display: "flex",
58
+ flexDirection: "column",
59
+ gap: "8px"
60
+ } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
61
+ fontSize: "13px",
62
+ fontWeight: "700",
63
+ color: "rgba(255,255,255,0.5)",
64
+ marginBottom: "4px",
65
+ textTransform: "uppercase",
66
+ letterSpacing: "0.5px"
67
+ } }, "Tools"), tools.map((tool) => /* @__PURE__ */ import_react.default.createElement(
68
+ "button",
69
+ {
70
+ key: tool,
71
+ onClick: () => onToolSelect(tool),
72
+ style: {
73
+ background: activeTool === tool ? alpha(accent, 0.15) : "transparent",
74
+ border: "1px solid " + (activeTool === tool ? alpha(accent, 0.3) : "rgba(255,255,255,0.05)"),
75
+ padding: "10px 14px",
76
+ borderRadius: "10px",
77
+ display: "flex",
78
+ alignItems: "center",
79
+ gap: "10px",
80
+ cursor: "pointer",
81
+ transition: "all 0.2s",
82
+ color: activeTool === tool ? "#fff" : "rgba(255,255,255,0.7)",
83
+ fontWeight: activeTool === tool ? "600" : "500",
84
+ fontSize: "14px"
85
+ }
86
+ },
87
+ /* @__PURE__ */ import_react.default.createElement("div", { style: {
88
+ width: "24px",
89
+ height: "24px",
90
+ borderRadius: "6px",
91
+ background: activeTool === tool ? accent : "rgba(255,255,255,0.1)",
92
+ display: "flex",
93
+ alignItems: "center",
94
+ justifyContent: "center"
95
+ } }, /* @__PURE__ */ import_react.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, tool === "Brush" && /* @__PURE__ */ import_react.default.createElement("path", { d: "M20.71,4.63L19.37,3.29C19,2.9 18.35,2.9 17.96,3.29L9,12.25L11.75,15L20.71,6.04C21.1,5.65 21.1,5 20.71,4.63M7,14A3,3 0 0,0 4,17C4,18.31 2.84,19 2,19C2.92,20.22 4.5,21 6,21A4,4 0 0,0 10,17A3,3 0 0,0 7,14Z" }), tool === "Eraser" && /* @__PURE__ */ import_react.default.createElement("path", { d: "M16.24,3.56L21.19,8.5C21.97,9.29 21.97,10.55 21.19,11.34L12,20.53C10.44,22.09 7.91,22.09 6.34,20.53L2.81,17C2.03,16.21 2.03,14.95 2.81,14.16L13.41,3.56C14.2,2.78 15.46,2.78 16.24,3.56M4.22,15.58L7.76,19.11C8.54,19.9 9.8,19.9 10.59,19.11L14.12,15.58L9.17,10.63L4.22,15.58Z" }), tool === "Text" && /* @__PURE__ */ import_react.default.createElement("path", { d: "M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z" }), tool === "Shapes" && /* @__PURE__ */ import_react.default.createElement("path", { d: "M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z" }), tool === "Crop" && /* @__PURE__ */ import_react.default.createElement("path", { d: "M7,17V1H5V5H1V7H5V17A2,2 0 0,0 7,19H17V23H19V19H23V17M17,15H19V7C19,5.89 18.1,5 17,5H9V7H17V15Z" }))),
96
+ tool
97
+ ))));
98
+ };
99
+ // Annotate the CommonJS export names for ESM import in node:
100
+ 0 && (module.exports = {
101
+ Toolbox
102
+ });
@@ -0,0 +1,68 @@
1
+ // src/components/Toolbox/Toolbox.jsx
2
+ import React, { useState } from "react";
3
+ var Toolbox = ({
4
+ tools = ["Brush", "Eraser", "Text", "Shapes", "Crop"],
5
+ activeTool = "Brush",
6
+ accent = "#6366f1",
7
+ bg = "#0f172a",
8
+ onToolSelect = () => {
9
+ }
10
+ }) => {
11
+ const alpha = (hex, op) => {
12
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
13
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
14
+ };
15
+ return /* @__PURE__ */ React.createElement("div", { style: {
16
+ background: bg,
17
+ borderRadius: "14px",
18
+ padding: "12px",
19
+ width: "280px",
20
+ border: "1px solid rgba(255,255,255,0.08)",
21
+ boxShadow: "0 10px 40px rgba(0,0,0,0.4)",
22
+ fontFamily: "system-ui,sans-serif"
23
+ } }, /* @__PURE__ */ React.createElement("div", { style: {
24
+ display: "flex",
25
+ flexDirection: "column",
26
+ gap: "8px"
27
+ } }, /* @__PURE__ */ React.createElement("div", { style: {
28
+ fontSize: "13px",
29
+ fontWeight: "700",
30
+ color: "rgba(255,255,255,0.5)",
31
+ marginBottom: "4px",
32
+ textTransform: "uppercase",
33
+ letterSpacing: "0.5px"
34
+ } }, "Tools"), tools.map((tool) => /* @__PURE__ */ React.createElement(
35
+ "button",
36
+ {
37
+ key: tool,
38
+ onClick: () => onToolSelect(tool),
39
+ style: {
40
+ background: activeTool === tool ? alpha(accent, 0.15) : "transparent",
41
+ border: "1px solid " + (activeTool === tool ? alpha(accent, 0.3) : "rgba(255,255,255,0.05)"),
42
+ padding: "10px 14px",
43
+ borderRadius: "10px",
44
+ display: "flex",
45
+ alignItems: "center",
46
+ gap: "10px",
47
+ cursor: "pointer",
48
+ transition: "all 0.2s",
49
+ color: activeTool === tool ? "#fff" : "rgba(255,255,255,0.7)",
50
+ fontWeight: activeTool === tool ? "600" : "500",
51
+ fontSize: "14px"
52
+ }
53
+ },
54
+ /* @__PURE__ */ React.createElement("div", { style: {
55
+ width: "24px",
56
+ height: "24px",
57
+ borderRadius: "6px",
58
+ background: activeTool === tool ? accent : "rgba(255,255,255,0.1)",
59
+ display: "flex",
60
+ alignItems: "center",
61
+ justifyContent: "center"
62
+ } }, /* @__PURE__ */ React.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, tool === "Brush" && /* @__PURE__ */ React.createElement("path", { d: "M20.71,4.63L19.37,3.29C19,2.9 18.35,2.9 17.96,3.29L9,12.25L11.75,15L20.71,6.04C21.1,5.65 21.1,5 20.71,4.63M7,14A3,3 0 0,0 4,17C4,18.31 2.84,19 2,19C2.92,20.22 4.5,21 6,21A4,4 0 0,0 10,17A3,3 0 0,0 7,14Z" }), tool === "Eraser" && /* @__PURE__ */ React.createElement("path", { d: "M16.24,3.56L21.19,8.5C21.97,9.29 21.97,10.55 21.19,11.34L12,20.53C10.44,22.09 7.91,22.09 6.34,20.53L2.81,17C2.03,16.21 2.03,14.95 2.81,14.16L13.41,3.56C14.2,2.78 15.46,2.78 16.24,3.56M4.22,15.58L7.76,19.11C8.54,19.9 9.8,19.9 10.59,19.11L14.12,15.58L9.17,10.63L4.22,15.58Z" }), tool === "Text" && /* @__PURE__ */ React.createElement("path", { d: "M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z" }), tool === "Shapes" && /* @__PURE__ */ React.createElement("path", { d: "M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z" }), tool === "Crop" && /* @__PURE__ */ React.createElement("path", { d: "M7,17V1H5V5H1V7H5V17A2,2 0 0,0 7,19H17V23H19V19H23V17M17,15H19V7C19,5.89 18.1,5 17,5H9V7H17V15Z" }))),
63
+ tool
64
+ ))));
65
+ };
66
+ export {
67
+ Toolbox
68
+ };