virtual-ui-lib 1.0.36 → 1.0.38

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 (3) hide show
  1. package/dist/index.js +104 -1131
  2. package/dist/index.mjs +104 -1110
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29,1168 +29,141 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/index.js
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
- AlertBanner: () => AlertBanner,
33
- AnimatedNavbar: () => AnimatedNavbar,
34
- AnimatedProgressBar: () => AnimatedProgressBar,
35
- Button: () => Button,
36
- Card: () => Card,
37
- CopyButton: () => CopyButton,
38
- DateRangePicker: () => DateRangePicker,
39
- Dropdown: () => Dropdown,
40
- EmptyState: () => EmptyState,
41
- Footer: () => Footer,
42
- FormInput: () => FormInput,
43
- GridLayout: () => GridLayout,
44
- ImageUploadPreview: () => ImageUploadPreview,
45
- Loader: () => Loader,
46
- LoadingSkeleton: () => LoadingSkeleton,
47
- MultiStepProgress: () => MultiStepProgress,
48
- Navbar: () => Navbar,
49
- OTPInput: () => OTPInput,
50
- Rating: () => Rating,
51
- RatingStars: () => RatingStars,
52
32
  StatCard: () => StatCard,
53
- UserAvatar: () => UserAvatar,
54
- WishlistButton: () => WishlistButton
33
+ ToastNotification: () => ToastNotification
55
34
  });
56
35
  module.exports = __toCommonJS(index_exports);
57
36
 
58
- // src/components/AlertBanner/AlertBanner.jsx
37
+ // src/components/ToastNotification/ToastNotification.jsx
59
38
  var import_react = __toESM(require("react"));
60
- var AlertBanner = ({
61
- message = "This is an alert message.",
62
- type = "info",
63
- onDismiss
64
- }) => {
65
- const [visible, setVisible] = (0, import_react.useState)(true);
66
- const [fade, setFade] = (0, import_react.useState)(false);
67
- const colors = {
68
- success: { background: "#059669", color: "white" },
69
- error: { background: "#dc2626", color: "white" },
70
- warning: { background: "#f59e0b", color: "black" },
71
- info: { background: "#2563eb", color: "white" }
72
- };
39
+ var ToastNotification = ({
40
+ type = "success",
41
+ title = "Success",
42
+ message = "Your action was successful!",
43
+ duration = 4e3,
44
+ onClose
45
+ }) => {
46
+ const [visible, setVisible] = (0, import_react.useState)(false);
47
+ const [progress, setProgress] = (0, import_react.useState)(0);
73
48
  (0, import_react.useEffect)(() => {
74
- if (!visible) {
75
- setFade(true);
76
- const timeout = setTimeout(() => onDismiss && onDismiss(), 300);
77
- return () => clearTimeout(timeout);
78
- }
79
- }, [visible, onDismiss]);
80
- return /* @__PURE__ */ import_react.default.createElement("div", { style: {
81
- position: "relative",
82
- width: "100%",
83
- background: colors[type].background,
84
- color: colors[type].color,
85
- padding: "16px 24px",
86
- borderRadius: "8px",
87
- boxShadow: "0 2px 10px rgba(0,0,0,0.2)",
88
- transition: "opacity 0.3s ease, transform 0.3s ease",
89
- transform: `translateY(${visible ? "0" : "-20px"})`,
90
- opacity: fade ? 0 : 1,
91
- zIndex: 1e3
92
- }, className: visible ? "slide-down" : "fade-out" }, message, /* @__PURE__ */ import_react.default.createElement("button", { onClick: () => setVisible(false), style: {
93
- position: "absolute",
94
- top: "10px",
95
- right: "10px",
96
- background: "transparent",
97
- color: "inherit",
98
- border: "none",
99
- cursor: "pointer",
100
- fontSize: "16px"
101
- } }, "\u2715"));
102
- };
103
-
104
- // src/components/Button/Button.jsx
105
- var import_react2 = __toESM(require("react"));
106
- var Button = ({
107
- text = "Button",
108
- variant = "primary",
109
- color = "white",
110
- bg = "#2563eb",
111
- outlineColor = "#2563eb",
112
- ghostColor = "#2563eb",
113
- width = "auto",
114
- radius = "8px",
115
- weight = "600",
116
- iconLeft = null,
117
- iconRight = null,
118
- onClick,
119
- loading = false,
120
- disabled = false
121
- }) => {
122
- const variants = {
123
- primary: { background: bg, color, border: "none" },
124
- secondary: { background: "#7c3aed", color, border: "none" },
125
- outline: { background: "transparent", color, border: `2px solid ${outlineColor}` },
126
- ghost: { background: "transparent", color: ghostColor, border: "none" }
127
- };
128
- const { background, border } = variants[variant];
129
- return /* @__PURE__ */ import_react2.default.createElement(
130
- "button",
131
- {
132
- onClick,
133
- disabled: disabled || loading,
134
- style: {
135
- background,
136
- color: variants[variant].color,
137
- width,
138
- border,
139
- borderRadius: radius,
140
- cursor: disabled ? "not-allowed" : "pointer",
141
- fontWeight: weight,
142
- padding: "10px 20px",
143
- opacity: disabled ? 0.6 : 1,
144
- transition: "transform 0.2s ease, background 0.2s ease"
145
- },
146
- onMouseEnter: (e) => e.currentTarget.style.transform = "scale(1.05)",
147
- onMouseLeave: (e) => e.currentTarget.style.transform = "scale(1)",
148
- onMouseDown: (e) => e.currentTarget.style.transform = "scale(0.95)",
149
- onMouseUp: (e) => e.currentTarget.style.transform = "scale(1)"
150
- },
151
- loading ? "Loading..." : /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, iconLeft, text, iconRight))
152
- );
153
- };
154
-
155
- // src/components/Card/Card.jsx
156
- var import_react3 = __toESM(require("react"));
157
- var Card = ({
158
- image = "https://via.placeholder.com/300x200",
159
- title = "Card Title",
160
- description = "This is a description of the card content. It should be concise and informative.",
161
- onClick,
162
- loading = false,
163
- disabled = false,
164
- bg = "#f9fafb",
165
- textColor = "#0f172a",
166
- hoverBg = "#e5e7eb",
167
- radius = "12px",
168
- shadow = "0 4px 14px rgba(0,0,0,0.1)",
169
- hoverShadow = "0 8px 28px rgba(0,0,0,0.2)",
170
- transition = "transform 0.3s, box-shadow 0.3s"
171
- }) => {
172
- return /* @__PURE__ */ import_react3.default.createElement(
173
- "div",
174
- {
175
- style: {
176
- background: bg,
177
- borderRadius: radius,
178
- boxShadow: shadow,
179
- padding: "16px",
180
- transition,
181
- cursor: disabled ? "not-allowed" : "pointer",
182
- opacity: disabled ? 0.6 : 1,
183
- position: "relative",
184
- overflow: "hidden"
185
- },
186
- onClick: disabled ? null : onClick,
187
- onMouseEnter: (e) => {
188
- e.currentTarget.style.boxShadow = hoverShadow;
189
- e.currentTarget.style.transform = "translateY(-4px)";
190
- },
191
- onMouseLeave: (e) => {
192
- e.currentTarget.style.boxShadow = shadow;
193
- e.currentTarget.style.transform = "translateY(0)";
194
- }
195
- },
196
- loading ? /* @__PURE__ */ import_react3.default.createElement("div", { style: {
197
- background: "#e0e0e0",
198
- height: "200px",
199
- borderRadius: radius,
200
- marginBottom: "12px"
201
- } }) : /* @__PURE__ */ import_react3.default.createElement("img", { src: image, alt: title, style: { width: "100%", borderRadius: radius } }),
202
- /* @__PURE__ */ import_react3.default.createElement("h3", { style: { margin: "12px 0 4px", fontSize: "16px", color: textColor } }, title),
203
- /* @__PURE__ */ import_react3.default.createElement("p", { style: { margin: "0 0 12px", fontSize: "14px", color: "#374151" } }, description),
204
- /* @__PURE__ */ import_react3.default.createElement(
205
- "button",
206
- {
207
- style: {
208
- padding: "10px 16px",
209
- background: "#2563eb",
210
- color: "white",
211
- border: "none",
212
- borderRadius: "8px",
213
- cursor: "pointer",
214
- fontWeight: "600",
215
- transition: "background 0.3s"
216
- },
217
- onClick,
218
- disabled
219
- },
220
- "Action"
221
- )
222
- );
223
- };
224
-
225
- // src/components/Dropdown/Dropdown.jsx
226
- var import_react4 = __toESM(require("react"));
227
- var Dropdown = ({
228
- options = ["Option 1", "Option 2", "Option 3"],
229
- defaultValue = "Option 1",
230
- bg = "#1e293b",
231
- accent = "#7c3aed",
232
- textColor = "#f1f5f9",
233
- borderColor = "rgba(255,255,255,0.1)",
234
- radius = "10px",
235
- onSelect
236
- }) => {
237
- const [open, setOpen] = (0, import_react4.useState)(false);
238
- const [selected, setSelected] = (0, import_react4.useState)(defaultValue);
239
- const dropdownRef = (0, import_react4.useRef)(null);
240
- const handleClickOutside = (event) => {
241
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
242
- setOpen(false);
243
- }
244
- };
245
- const handleKeyDown = (event) => {
246
- if (event.key === "ArrowDown") {
247
- }
248
- };
249
- (0, import_react4.useEffect)(() => {
250
- document.addEventListener("mousedown", handleClickOutside);
251
- document.addEventListener("keydown", handleKeyDown);
252
- return () => {
253
- document.removeEventListener("mousedown", handleClickOutside);
254
- document.removeEventListener("keydown", handleKeyDown);
255
- };
256
- });
257
- const handleOptionSelect = (option) => {
258
- setSelected(option);
259
- onSelect && onSelect(option);
260
- setOpen(false);
261
- };
262
- return /* @__PURE__ */ import_react4.default.createElement("div", { style: { position: "relative", display: "inline-block", fontFamily: "system-ui, sans-serif" }, ref: dropdownRef }, /* @__PURE__ */ import_react4.default.createElement("button", { onClick: () => setOpen((prev) => !prev), style: {
263
- background: bg,
264
- color: textColor,
265
- border: `1px solid ${borderColor}`,
266
- borderRadius: radius,
267
- padding: "10px 16px",
268
- cursor: "pointer",
269
- fontSize: "16px",
270
- display: "flex",
271
- alignItems: "center",
272
- gap: "5px"
273
- } }, selected, " ", /* @__PURE__ */ import_react4.default.createElement("span", { style: { marginLeft: "auto" } }, "\u25BC")), open && /* @__PURE__ */ import_react4.default.createElement("div", { style: {
274
- position: "absolute",
275
- top: "100%",
276
- left: 0,
277
- right: 0,
278
- background: bg,
279
- border: `1px solid ${borderColor}`,
280
- borderRadius: radius,
281
- boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
282
- zIndex: 100,
283
- marginTop: "4px",
284
- animation: "fadeIn 0.3s ease, slideDown 0.3s ease"
285
- } }, options.map((option) => /* @__PURE__ */ import_react4.default.createElement("div", { key: option, onClick: () => handleOptionSelect(option), style: {
286
- padding: "10px 15px",
287
- color: option === selected ? accent : textColor,
288
- background: option === selected ? "rgba(124,58,237,0.1)" : "transparent",
289
- borderRadius: radius,
290
- cursor: "pointer",
291
- transition: "background 0.2s"
292
- }, onMouseEnter: (e) => e.currentTarget.style.background = "rgba(124,58,237,0.05)", onMouseLeave: (e) => e.currentTarget.style.background = "transparent" }, option))));
293
- };
294
-
295
- // src/components/EmptyState/EmptyState.jsx
296
- var import_react5 = __toESM(require("react"));
297
- var EmptyState = ({
298
- mode = "default",
299
- icon = "https://i.imgur.com/E9Gdppt.png",
300
- message = "No data available. Please check back later.",
301
- actionText = "Try Again",
302
- onAction
303
- }) => {
304
- const [isVisible, setIsVisible] = (0, import_react5.useState)(false);
305
- (0, import_react5.useEffect)(() => {
306
- setIsVisible(true);
307
- }, []);
308
- const renderModeContent = () => {
309
- switch (mode) {
310
- case "action available":
311
- return /* @__PURE__ */ import_react5.default.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ import_react5.default.createElement("img", { src: icon, alt: "Empty State Icon", style: { width: "60px", marginBottom: "16px" } }), /* @__PURE__ */ import_react5.default.createElement("p", { style: { fontSize: "16px", color: "#64748b", margin: 0 } }, message), /* @__PURE__ */ import_react5.default.createElement("button", { onClick: onAction, style: {
312
- marginTop: "20px",
313
- padding: "10px 20px",
314
- background: "#7c3aed",
315
- color: "white",
316
- border: "none",
317
- borderRadius: "8px",
318
- cursor: "pointer",
319
- fontSize: "14px",
320
- fontWeight: "600",
321
- transition: "background 0.3s ease, transform 0.3s ease",
322
- boxShadow: "0 4px 14px rgba(124,58,237,0.4)"
323
- }, onMouseEnter: (e) => e.currentTarget.style.background = "#6d28d9", onMouseLeave: (e) => e.currentTarget.style.background = "#7c3aed" }, actionText));
324
- case "illustration mode":
325
- return /* @__PURE__ */ import_react5.default.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ import_react5.default.createElement("img", { src: icon, alt: "Illustration", style: { width: "80px", marginBottom: "16px" } }), /* @__PURE__ */ import_react5.default.createElement("p", { style: { fontSize: "16px", color: "#64748b", margin: 0 } }, message));
49
+ setVisible(true);
50
+ const interval = setInterval(() => {
51
+ setProgress((prev) => {
52
+ if (prev >= 100) {
53
+ clearInterval(interval);
54
+ onClose();
55
+ return 100;
56
+ }
57
+ return prev + 100 / (duration / 100);
58
+ });
59
+ }, 100);
60
+ return () => clearInterval(interval);
61
+ }, [duration, onClose]);
62
+ const getStyles = () => {
63
+ let bg, icon;
64
+ switch (type) {
65
+ case "success":
66
+ bg = "#059669";
67
+ icon = "\u2713";
68
+ break;
69
+ case "error":
70
+ bg = "#dc2626";
71
+ icon = "\u2716";
72
+ break;
73
+ case "warning":
74
+ bg = "#eab308";
75
+ icon = "\u26A0\uFE0F";
76
+ break;
77
+ case "info":
78
+ bg = "#2563eb";
79
+ icon = "\u2139\uFE0F";
80
+ break;
326
81
  default:
327
- return /* @__PURE__ */ import_react5.default.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ import_react5.default.createElement("img", { src: icon, alt: "Default Icon", style: { width: "60px", marginBottom: "16px" } }), /* @__PURE__ */ import_react5.default.createElement("p", { style: { fontSize: "16px", color: "#64748b", margin: 0 } }, message));
82
+ bg = "#059669";
83
+ icon = "\u2713";
328
84
  }
85
+ return { background: bg, icon };
329
86
  };
330
- return /* @__PURE__ */ import_react5.default.createElement("div", { style: {
331
- display: "flex",
332
- justifyContent: "center",
333
- alignItems: "center",
334
- height: "100vh",
335
- opacity: isVisible ? 1 : 0,
336
- transition: "opacity 0.5s ease-in-out"
337
- } }, renderModeContent());
338
- };
339
-
340
- // src/components/FormInput/FormInput.jsx
341
- var import_react6 = __toESM(require("react"));
342
- var FormInput = ({
343
- label = "Input Label",
344
- type = "text",
345
- value = "",
346
- placeholder = "Enter text...",
347
- errorMessage = "This field is required.",
348
- isError = false,
349
- isSuccess = false,
350
- isDisabled = false,
351
- onChange
352
- }) => {
353
- const [isFocused, setIsFocused] = (0, import_react6.useState)(false);
354
- const handleFocus = () => setIsFocused(true);
355
- const handleBlur = () => setIsFocused(false);
356
- return /* @__PURE__ */ import_react6.default.createElement("div", { style: { marginBottom: "20px", fontFamily: "system-ui, sans-serif" } }, /* @__PURE__ */ import_react6.default.createElement("label", { style: { display: "block", marginBottom: "8px", fontSize: "14px", color: isError ? "#ef4444" : "#64748b" } }, label), /* @__PURE__ */ import_react6.default.createElement(
357
- "input",
358
- {
359
- type,
360
- value,
361
- placeholder,
362
- onFocus: handleFocus,
363
- onBlur: handleBlur,
364
- onChange,
365
- disabled: isDisabled,
366
- style: {
367
- width: "100%",
368
- padding: "12px 16px",
369
- border: `2px solid ${isError ? "#ef4444" : isSuccess ? "#22c55e" : isFocused ? "#2563eb" : "#d1d5db"}`,
370
- borderRadius: "8px",
371
- boxShadow: isFocused ? "0 4px 14px rgba(37,99,235,0.3)" : "none",
372
- outline: "none",
373
- transition: "border-color 0.3s, box-shadow 0.3s",
374
- fontSize: "16px",
375
- color: "#0f172a"
376
- }
377
- }
378
- ), isError && /* @__PURE__ */ import_react6.default.createElement("p", { style: { marginTop: "8px", color: "#ef4444", fontSize: "12px", opacity: 0, animation: "fadeIn 0.3s forwards" } }, errorMessage), isSuccess && /* @__PURE__ */ import_react6.default.createElement("p", { style: { marginTop: "8px", color: "#22c55e", fontSize: "12px" } }, "Input is valid!"), /* @__PURE__ */ import_react6.default.createElement("style", null, `@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }`));
379
- };
380
-
381
- // src/components/GridLayout/GridLayout.jsx
382
- var import_react7 = __toESM(require("react"));
383
- var GridLayout = ({
384
- items = [],
385
- cols = 3,
386
- loading = false,
387
- emptyMessage = "No items available",
388
- itemBg = "#1f2937",
389
- itemColor = "#f1f5f9",
390
- spacing = "16px",
391
- radius = "8px"
392
- }) => {
393
- const renderItem = (item, index) => /* @__PURE__ */ import_react7.default.createElement("div", { key: index, style: {
394
- background: itemBg,
395
- color: itemColor,
396
- borderRadius: radius,
87
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: {
88
+ position: "fixed",
89
+ bottom: "20px",
90
+ right: "20px",
91
+ opacity: visible ? 1 : 0,
92
+ transform: visible ? "translateY(0)" : "translateY(20px)",
93
+ transition: "opacity 0.3s, transform 0.3s",
94
+ background: getStyles().background,
95
+ borderRadius: "12px",
397
96
  padding: "16px",
398
- margin: spacing,
399
- transition: "transform 0.3s, box-shadow 0.3s",
400
- boxShadow: "0 2px 10px rgba(0, 0, 0, 0.15)",
401
- display: "flex",
402
- justifyContent: "center",
403
- alignItems: "center",
404
- cursor: "pointer"
405
- }, onMouseEnter: (e) => {
406
- e.currentTarget.style.transform = "scale(1.05)";
407
- }, onMouseLeave: (e) => {
408
- e.currentTarget.style.transform = "scale(1)";
409
- } }, item);
410
- if (loading) {
411
- return /* @__PURE__ */ import_react7.default.createElement("div", { style: { display: "grid", gridTemplateColumns: `repeat(${cols}, 1fr)`, gap: spacing } }, Array.from({ length: cols * 3 }).map((_, index) => /* @__PURE__ */ import_react7.default.createElement("div", { key: index, style: { background: "#334155", height: "100px", borderRadius: radius } })));
412
- }
413
- if (items.length === 0) {
414
- return /* @__PURE__ */ import_react7.default.createElement("div", { style: { color: itemColor, textAlign: "center", padding: "20px" } }, emptyMessage);
415
- }
416
- return /* @__PURE__ */ import_react7.default.createElement("div", { style: { display: "grid", gridTemplateColumns: `repeat(${cols}, 1fr)`, gap: spacing } }, items.map(renderItem));
417
- };
418
-
419
- // src/components/ImageUploadPreview/ImageUploadPreview.jsx
420
- var import_react8 = __toESM(require("react"));
421
- var ImageUploadPreview = ({
422
- width = "300px",
423
- height = "200px",
424
- bg = "#1e293b",
425
- borderColor = "#7c3aed",
426
- errorColor = "#dc2626",
427
- borderRadius = "12px",
428
- onImageChange
429
- }) => {
430
- const [image, setImage] = (0, import_react8.useState)(null);
431
- const [error, setError] = (0, import_react8.useState)(false);
432
- const handleImageChange = (e) => {
433
- const file = e.target.files[0];
434
- const validTypes = ["image/png", "image/jpeg", "image/jpg"];
435
- if (validTypes.includes(file.type)) {
436
- setError(false);
437
- const reader = new FileReader();
438
- reader.onload = () => {
439
- setImage(reader.result);
440
- if (onImageChange) onImageChange(reader.result);
441
- };
442
- reader.readAsDataURL(file);
443
- } else {
444
- setError(true);
445
- }
446
- };
447
- const handleRemove = () => {
448
- setImage(null);
449
- setError(false);
450
- };
451
- return /* @__PURE__ */ import_react8.default.createElement("div", { style: {
452
- display: "flex",
453
- justifyContent: "center",
454
- alignItems: "center",
455
- width,
456
- height,
457
- background: bg,
458
- border: `2px solid ${error ? errorColor : borderColor}`,
459
- borderRadius,
460
- position: "relative",
461
- overflow: "hidden",
462
- transition: "border-color 0.3s"
463
- } }, !image && !error && /* @__PURE__ */ import_react8.default.createElement("input", { type: "file", onChange: handleImageChange, style: { display: "none" }, id: "file-input" }), !image && !error && /* @__PURE__ */ import_react8.default.createElement("label", { htmlFor: "file-input", style: { color: "#f1f5f9", cursor: "pointer", textAlign: "center" } }, "Upload Image"), error && /* @__PURE__ */ import_react8.default.createElement("p", { style: { color: errorColor, fontSize: "14px", textAlign: "center" } }, "Invalid image type!"), image && /* @__PURE__ */ import_react8.default.createElement("div", { style: {
464
- position: "absolute",
465
- top: 0,
466
- left: 0,
467
- right: 0,
468
- bottom: 0,
469
- display: "flex",
470
- justifyContent: "center",
471
- alignItems: "center",
472
- background: "rgba(0,0,0,0.6)",
473
- transition: "opacity 0.3s",
474
- opacity: 1
475
- } }, /* @__PURE__ */ import_react8.default.createElement("img", { src: image, alt: "Preview", style: {
476
- maxWidth: "100%",
477
- maxHeight: "100%",
478
- objectFit: "cover",
479
- transition: "transform 0.3s",
480
- borderRadius,
481
- cursor: "zoom-in"
482
- }, onMouseEnter: (e) => e.currentTarget.style.transform = "scale(1.05)", onMouseLeave: (e) => e.currentTarget.style.transform = "scale(1)" })), image && /* @__PURE__ */ import_react8.default.createElement("button", { onClick: handleRemove, style: {
483
- position: "absolute",
484
- top: "10px",
485
- right: "10px",
486
- background: "rgba(255,255,255,0.8)",
487
- color: "#dc2626",
488
- border: "none",
97
+ width: "300px",
98
+ boxShadow: "0 4px 20px rgba(0,0,0,0.2)",
99
+ fontFamily: "system-ui, sans-serif",
100
+ zIndex: 9999
101
+ } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", marginBottom: "8px" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
102
+ width: "24px",
103
+ height: "24px",
489
104
  borderRadius: "50%",
490
- width: "30px",
491
- height: "30px",
492
- cursor: "pointer",
493
- fontSize: "16px",
494
- transition: "background 0.3s"
495
- }, onMouseEnter: (e) => e.currentTarget.style.background = "rgba(255,255,255,1)", onMouseLeave: (e) => e.currentTarget.style.background = "rgba(255,255,255,0.8)" }, "\xD7"));
496
- };
497
-
498
- // src/components/CopyButton/CopyButton.jsx
499
- var import_react9 = __toESM(require("react"));
500
- var CopyButton = ({
501
- text = "Copy",
502
- bg = "#2563eb",
503
- color = "white",
504
- radius = "8px",
505
- icon = /* @__PURE__ */ import_react9.default.createElement("span", { role: "img", "aria-label": "copy" }, "\u{1F4CB}"),
506
- padding = "10px 15px",
507
- shadow = "0 4px 14px rgba(37,99,235,0.4)"
508
- }) => {
509
- const [copied, setCopied] = (0, import_react9.useState)(false);
510
- const handleCopy = () => {
511
- navigator.clipboard.writeText(text);
512
- setCopied(true);
513
- setTimeout(() => setCopied(false), 2e3);
514
- };
515
- return /* @__PURE__ */ import_react9.default.createElement(
516
- "button",
517
- {
518
- onClick: handleCopy,
519
- style: {
520
- background: bg,
521
- color,
522
- border: "none",
523
- borderRadius: radius,
524
- padding,
525
- cursor: "pointer",
526
- fontWeight: "600",
527
- boxShadow: shadow,
528
- display: "flex",
529
- alignItems: "center",
530
- gap: "8px",
531
- transition: "background 0.3s"
532
- }
533
- },
534
- icon,
535
- copied ? "Copied!" : text
536
- );
537
- };
538
-
539
- // src/components/Loader/Loader.jsx
540
- var import_react10 = __toESM(require("react"));
541
- var Loader = ({
542
- size = "medium",
543
- fullScreen = false,
544
- color = "#7c3aed",
545
- backgroundColor = "#0f172a",
546
- duration = "1s"
547
- }) => {
548
- const sizes = { small: "40px", medium: "60px", large: "80px" };
549
- const [fadeIn, setFadeIn] = (0, import_react10.useState)(false);
550
- (0, import_react10.useEffect)(() => {
551
- setFadeIn(true);
552
- }, []);
553
- return /* @__PURE__ */ import_react10.default.createElement(
554
- "div",
555
- {
556
- style: {
557
- display: "flex",
558
- justifyContent: "center",
559
- alignItems: "center",
560
- height: fullScreen ? "100vh" : "auto",
561
- background: fullScreen ? backgroundColor : "transparent",
562
- transition: "opacity 0.5s",
563
- opacity: fadeIn ? 1 : 0
564
- }
565
- },
566
- /* @__PURE__ */ import_react10.default.createElement(
567
- "div",
568
- {
569
- style: {
570
- width: sizes[size],
571
- height: sizes[size],
572
- border: `8px solid ${color}`,
573
- borderTop: `8px solid transparent`,
574
- borderRadius: "50%",
575
- animation: `spin ${duration} linear infinite`
576
- }
577
- }
578
- ),
579
- /* @__PURE__ */ import_react10.default.createElement("style", null, `
580
- @keyframes spin {
581
- 0% { transform: rotate(0deg); }
582
- 100% { transform: rotate(360deg); }
583
- }
584
- `)
585
- );
586
- };
587
-
588
- // src/components/OTPInput/OTPInput.jsx
589
- var import_react11 = __toESM(require("react"));
590
- var OTPInput = ({
591
- length = 4,
592
- bg = "#0f172a",
593
- borderColorDefault = "#4b5563",
594
- borderColorFocus = "#2563eb",
595
- borderColorError = "#e11d48",
596
- borderColorSuccess = "#059669",
597
- color = "#f1f5f9",
598
- radius = "8px",
599
- onChange,
600
- error = false,
601
- success = false
602
- }) => {
603
- const [otp, setOtp] = (0, import_react11.useState)(Array(length).fill(""));
604
- const inputRefs = (0, import_react11.useRef)(Array(length).fill().map(() => import_react11.default.createRef()));
605
- (0, import_react11.useEffect)(() => {
606
- inputRefs.current[0].current.focus();
607
- }, []);
608
- const handleChange = (index, value) => {
609
- if (/[^0-9]/.test(value)) return;
610
- const newOtp = [...otp];
611
- newOtp[index] = value;
612
- setOtp(newOtp);
613
- onChange(newOtp.join(""));
614
- if (value && index < length - 1) {
615
- inputRefs.current[index + 1].current.focus();
616
- }
617
- };
618
- const handleKeyDown = (index, event) => {
619
- if (event.key === "Backspace" && !otp[index] && index > 0) {
620
- inputRefs.current[index - 1].current.focus();
621
- }
622
- };
623
- const handlePaste = (event) => {
624
- const pastedData = event.clipboardData.getData("text").split("").slice(0, length);
625
- const newOtp = pastedData.map((char, index) => char.match(/\d/) ? char : "");
626
- setOtp(newOtp);
627
- newOtp.forEach((_, index) => {
628
- if (inputRefs.current[index]) {
629
- inputRefs.current[index].current.focus();
630
- }
631
- });
632
- onChange(newOtp.join(""));
633
- event.preventDefault();
634
- };
635
- return /* @__PURE__ */ import_react11.default.createElement("div", { style: { display: "flex", justifyContent: "center", gap: "10px" }, onPaste: handlePaste }, otp.map((value, index) => /* @__PURE__ */ import_react11.default.createElement(
636
- "input",
637
- {
638
- key: index,
639
- ref: inputRefs.current[index],
640
- value,
641
- onChange: (e) => handleChange(index, e.target.value),
642
- onKeyDown: (event) => handleKeyDown(index, event),
643
- style: {
644
- width: "40px",
645
- height: "50px",
646
- borderRadius: radius,
647
- border: `2px solid ${error ? borderColorError : success ? borderColorSuccess : index === otp.findIndex((v) => v !== "") ? borderColorFocus : borderColorDefault}`,
648
- background: bg,
649
- color,
650
- fontSize: "20px",
651
- textAlign: "center",
652
- outline: "none",
653
- transition: "border-color 0.3s ease, transform 0.2s ease",
654
- transform: `scale(${index === otp.findIndex((v) => v !== "") ? 1.05 : 1})`
655
- },
656
- autoFocus: index === 0
657
- }
658
- )));
659
- };
660
-
661
- // src/components/RatingStars/RatingStars.jsx
662
- var import_react12 = __toESM(require("react"));
663
- var RatingStars = ({
664
- totalStars = 5,
665
- selectedColor = "#ffc107",
666
- defaultColor = "#e4e5e9",
667
- size = "24px",
668
- onSelect
669
- }) => {
670
- const [hovered, setHovered] = (0, import_react12.useState)(0);
671
- const [selected, setSelected] = (0, import_react12.useState)(0);
672
- const handleMouseEnter = (index) => {
673
- setHovered(index + 1);
674
- };
675
- const handleMouseLeave = () => {
676
- setHovered(0);
677
- };
678
- const handleClick = (index) => {
679
- setSelected(index + 1);
680
- if (onSelect) onSelect(index + 1);
681
- };
682
- return /* @__PURE__ */ import_react12.default.createElement("div", { style: { display: "flex", gap: "4px" } }, [...Array(totalStars)].map((_, index) => /* @__PURE__ */ import_react12.default.createElement(
683
- "svg",
684
- {
685
- key: index,
686
- width: size,
687
- height: size,
688
- viewBox: "0 0 24 24",
689
- fill: "none",
690
- stroke: index < (hovered || selected) ? selectedColor : defaultColor,
691
- strokeWidth: "1.5",
692
- strokeLinecap: "round",
693
- strokeLinejoin: "round",
694
- onMouseEnter: () => handleMouseEnter(index),
695
- onMouseLeave: handleMouseLeave,
696
- onClick: () => handleClick(index),
697
- style: { transition: "color 0.2s ease" }
698
- },
699
- /* @__PURE__ */ import_react12.default.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21 12 17.77 5.82 21 7 14.14 2 9.27 8.91 8.26 12 2" })
700
- )));
701
- };
702
-
703
- // src/components/UserAvatar/UserAvatar.jsx
704
- var import_react13 = __toESM(require("react"));
705
- var UserAvatar = ({
706
- size = "50px",
707
- src = "",
708
- initials = "AB",
709
- online = false,
710
- busy = false,
711
- showStatus = true,
712
- bgColor = "#1e293b",
713
- textColor = "#f1f5f9",
714
- statusColor = "#22c55e",
715
- borderColor = "#7c3aed"
716
- }) => {
717
- return /* @__PURE__ */ import_react13.default.createElement(
718
- "div",
719
- {
720
- style: {
721
- position: "relative",
722
- width: size,
723
- height: size,
724
- borderRadius: "50%",
725
- backgroundColor: bgColor,
726
- display: "flex",
727
- alignItems: "center",
728
- justifyContent: "center",
729
- transition: "transform 0.2s",
730
- cursor: "pointer",
731
- overflow: "hidden",
732
- boxShadow: "0 4px 14px rgba(0, 0, 0, 0.2)"
733
- },
734
- onMouseEnter: (e) => {
735
- e.currentTarget.style.transform = "scale(1.1)";
736
- },
737
- onMouseLeave: (e) => {
738
- e.currentTarget.style.transform = "scale(1)";
739
- }
740
- },
741
- src ? /* @__PURE__ */ import_react13.default.createElement("img", { src, alt: initials, style: {
742
- width: "100%",
743
- height: "100%",
744
- borderRadius: "50%",
745
- objectFit: "cover"
746
- } }) : /* @__PURE__ */ import_react13.default.createElement("span", { style: {
747
- color: textColor,
748
- fontSize: "20px",
749
- fontWeight: "700"
750
- } }, initials),
751
- showStatus && /* @__PURE__ */ import_react13.default.createElement("span", { style: {
752
- position: "absolute",
753
- bottom: "0",
754
- right: "0",
755
- width: "12px",
756
- height: "12px",
757
- borderRadius: "50%",
758
- backgroundColor: busy ? "#fbbf24" : online ? statusColor : "#9ca3af",
759
- border: "2px solid " + borderColor
760
- } })
761
- );
762
- };
763
-
764
- // src/components/Navbar/Navbar.jsx
765
- var import_react14 = __toESM(require("react"));
766
- var Navbar = ({
767
- logo = "https://via.placeholder.com/150",
768
- links = [{ name: "Home", href: "#" }, { name: "About", href: "#" }, { name: "Services", href: "#" }, { name: "Contact", href: "#" }],
769
- bgColor = "#0f172a",
770
- textColor = "#f1f5f9",
771
- linkColor = "#7c3aed",
772
- hoverColor = "#818cf8",
773
- sticky = false,
774
- radius = "8px"
775
- }) => {
776
- const [scrolled, setScrolled] = (0, import_react14.useState)(false);
777
- const [isOpen, setIsOpen] = (0, import_react14.useState)(false);
778
- (0, import_react14.useEffect)(() => {
779
- const handleScroll = () => {
780
- setScrolled(window.scrollY > 50);
781
- };
782
- window.addEventListener("scroll", handleScroll);
783
- return () => window.removeEventListener("scroll", handleScroll);
784
- }, []);
785
- return /* @__PURE__ */ import_react14.default.createElement("nav", { style: {
786
- position: sticky || scrolled ? "sticky" : "relative",
787
- top: 0,
788
- background: bgColor,
789
- padding: "10px 20px",
790
- borderRadius: radius,
791
- boxShadow: scrolled ? "0 4px 10px rgba(0,0,0,0.2)" : "none",
105
+ background: "white",
792
106
  display: "flex",
793
- justifyContent: "space-between",
794
107
  alignItems: "center",
795
- transition: "box-shadow 0.3s ease"
796
- } }, /* @__PURE__ */ import_react14.default.createElement("img", { src: logo, alt: "Logo", style: { width: "120px" } }), /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "none", gap: "20px", fontFamily: "system-ui, sans-serif", color: textColor, fontSize: "16px", cursor: "pointer" }, id: "nav-links" }, links.map((link) => /* @__PURE__ */ import_react14.default.createElement("a", { key: link.name, href: link.href, style: {
797
- color: textColor,
798
- textDecoration: "none",
799
- position: "relative"
800
- }, onMouseEnter: (e) => e.target.style.color = hoverColor, onMouseLeave: (e) => e.target.style.color = textColor }, link.name, /* @__PURE__ */ import_react14.default.createElement("span", { style: {
801
- position: "absolute",
802
- width: "100%",
803
- height: "2px",
804
- background: hoverColor,
805
- bottom: "-4px",
806
- left: 0,
807
- transform: "scaleX(0)",
808
- transition: "transform 0.3s ease"
809
- }, className: "underline" })))), /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ import_react14.default.createElement("button", { onClick: () => setIsOpen(true), style: {
108
+ justifyContent: "center",
109
+ marginRight: "8px"
110
+ } }, /* @__PURE__ */ import_react.default.createElement("span", { style: { color: getStyles().background, fontSize: "16px" } }, getStyles().icon)), /* @__PURE__ */ import_react.default.createElement("h4", { style: { margin: 0, fontSize: "16px", fontWeight: "600", color: "white" } }, title)), /* @__PURE__ */ import_react.default.createElement("p", { style: { margin: "0 0 12px", fontSize: "14px", color: "#f1f5f9" } }, message), /* @__PURE__ */ import_react.default.createElement("button", { onClick: onClose, style: {
810
111
  background: "transparent",
112
+ color: "white",
811
113
  border: "none",
812
- color: textColor,
813
114
  cursor: "pointer",
814
- fontSize: "16px"
815
- } }, "\u2630")), isOpen && /* @__PURE__ */ import_react14.default.createElement("div", { style: {
816
- position: "fixed",
817
- top: 0,
818
- right: 0,
819
- width: "250px",
820
- height: "100%",
821
- background: bgColor,
822
- transform: isOpen ? "translateX(0)" : "translateX(100%)",
823
- transition: "transform 0.3s ease",
824
- padding: "20px",
825
- boxShadow: "-3px 0 10px rgba(0,0,0,0.5)",
826
- zIndex: 1e3
827
- } }, /* @__PURE__ */ import_react14.default.createElement("button", { onClick: () => setIsOpen(false), style: {
828
- color: textColor,
829
- background: "none",
830
- border: "none",
831
- fontSize: "24px",
832
- cursor: "pointer"
833
- } }, "\u2716"), /* @__PURE__ */ import_react14.default.createElement("div", { style: { marginTop: "30px" } }, links.map((link) => /* @__PURE__ */ import_react14.default.createElement("a", { key: link.name, href: link.href, style: {
834
- display: "block",
835
- color: textColor,
836
- textDecoration: "none",
837
- margin: "15px 0"
838
- } }, link.name)))));
839
- };
840
-
841
- // src/components/WishlistButton/WishlistButton.jsx
842
- var import_react15 = __toESM(require("react"));
843
- var WishlistButton = ({
844
- isActive = false,
845
- size = "40px",
846
- inactiveColor = "#d1d5db",
847
- activeColor = "#ff3e30",
848
- onToggle
849
- }) => {
850
- const [active, setActive] = (0, import_react15.useState)(isActive);
851
- const handleClick = () => {
852
- setActive((prev) => !prev);
853
- if (onToggle) onToggle(!active);
854
- };
855
- return /* @__PURE__ */ import_react15.default.createElement("div", { onClick: handleClick, style: { cursor: "pointer", width: size, height: size, display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react15.default.createElement(
856
- "svg",
857
- {
858
- width: "100%",
859
- height: "100%",
860
- viewBox: "0 0 24 24",
861
- fill: "none",
862
- xmlns: "http://www.w3.org/2000/svg",
863
- style: {
864
- transition: "transform 0.2s",
865
- transform: active ? "scale(1.2)" : "scale(1)",
866
- fill: active ? activeColor : inactiveColor
867
- }
868
- },
869
- /* @__PURE__ */ import_react15.default.createElement("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
870
- ));
871
- };
872
-
873
- // src/components/Footer/Footer.jsx
874
- var import_react16 = __toESM(require("react"));
875
- var Footer = ({
876
- bg = "#1e293b",
877
- textColor = "#f1f5f9",
878
- links = [{ text: "Home", url: "/" }, { text: "About", url: "/about" }, { text: "Services", url: "/services" }, { text: "Contact", url: "/contact" }],
879
- brandTitle = "Company Name",
880
- description = "Your reliable partner in success.",
881
- socialLinks = [{ icon: "\u{1F3E0}", url: "https://facebook.com" }, { icon: "\u{1F426}", url: "https://twitter.com" }, { icon: "\u{1F4F8}", url: "https://instagram.com" }]
882
- }) => {
883
- return /* @__PURE__ */ import_react16.default.createElement("footer", { style: { background: bg, color: textColor, padding: "20px 40px", fontFamily: "system-ui, sans-serif" } }, /* @__PURE__ */ import_react16.default.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react16.default.createElement("h2", { style: { margin: "0 0 10px", fontSize: "24px", fontWeight: "700" } }, brandTitle), /* @__PURE__ */ import_react16.default.createElement("p", { style: { margin: "0 0 20px", fontSize: "14px", textAlign: "center" } }, description), /* @__PURE__ */ import_react16.default.createElement("nav", { style: { display: "flex", justifyContent: "center", gap: "20px", marginBottom: "20px" } }, links.map((link) => /* @__PURE__ */ import_react16.default.createElement("a", { key: link.text, href: link.url, style: { color: textColor, textDecoration: "none", fontSize: "16px", transition: "color 0.3s" }, onMouseOver: (e) => e.currentTarget.style.color = "#7c3aed", onMouseOut: (e) => e.currentTarget.style.color = textColor }, link.text))), /* @__PURE__ */ import_react16.default.createElement("div", { style: { display: "flex", gap: "20px" } }, socialLinks.map((social) => /* @__PURE__ */ import_react16.default.createElement("a", { key: social.url, href: social.url, style: { color: textColor, fontSize: "24px", textDecoration: "none", transition: "color 0.3s" }, onMouseOver: (e) => e.currentTarget.style.color = "#7c3aed", onMouseOut: (e) => e.currentTarget.style.color = textColor }, social.icon)))), /* @__PURE__ */ import_react16.default.createElement("div", { style: { marginTop: "20px", fontSize: "12px", textAlign: "center", color: "#94a3b8" } }, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", brandTitle, ". All rights reserved."));
884
- };
885
-
886
- // src/components/AnimatedProgressBar/AnimatedProgressBar.jsx
887
- var import_react17 = __toESM(require("react"));
888
- var AnimatedProgressBar = ({
889
- percentage = 75,
890
- bgColor = "linear-gradient(135deg, #2563eb, #7c3aed)",
891
- height = "24px",
892
- borderRadius = "12px",
893
- textColor = "#ffffff",
894
- fontSize = "14px"
895
- }) => {
896
- return /* @__PURE__ */ import_react17.default.createElement("div", { style: { width: "100%", background: "#e5e7eb", borderRadius, overflow: "hidden", position: "relative" } }, /* @__PURE__ */ import_react17.default.createElement("div", { style: {
897
- width: percentage + "%",
898
- height,
899
- background: bgColor,
900
- borderRadius,
901
- transition: "width 0.5s ease-in-out"
902
- } }), /* @__PURE__ */ import_react17.default.createElement("span", { style: {
903
- position: "absolute",
904
- top: "50%",
905
- left: "50%",
906
- transform: "translate(-50%, -50%)",
907
- color: textColor,
908
- fontSize,
115
+ fontSize: "14px",
909
116
  fontWeight: "600"
910
- } }, percentage, "%"));
911
- };
912
-
913
- // src/components/MultiStepProgress/MultiStepProgress.jsx
914
- var import_react18 = __toESM(require("react"));
915
- var MultiStepProgress = ({
916
- steps = ["Step 1", "Step 2", "Step 3"],
917
- activeStep = 0,
918
- onStepChange
919
- }) => {
920
- const [currentStep, setCurrentStep] = (0, import_react18.useState)(activeStep);
921
- const handleNext = () => {
922
- if (currentStep < steps.length - 1) {
923
- setCurrentStep((prev) => prev + 1);
924
- if (onStepChange) onStepChange(currentStep + 1);
925
- }
926
- };
927
- const handlePrevious = () => {
928
- if (currentStep > 0) {
929
- setCurrentStep((prev) => prev - 1);
930
- if (onStepChange) onStepChange(currentStep - 1);
931
- }
932
- };
933
- return /* @__PURE__ */ import_react18.default.createElement("div", { style: { fontFamily: "system-ui, sans-serif", width: "100%", maxWidth: "700px", margin: "0 auto" } }, /* @__PURE__ */ import_react18.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "16px" } }, steps.map((step, index) => /* @__PURE__ */ import_react18.default.createElement("div", { key: index, style: { flex: 1, textAlign: "center" } }, /* @__PURE__ */ import_react18.default.createElement("div", { style: {
934
- width: "40px",
935
- height: "40px",
936
- margin: "0 auto",
937
- borderRadius: "50%",
938
- background: index < currentStep ? "#059669" : index === currentStep ? "#2563eb" : "#cbd5e1",
939
- color: index <= currentStep ? "white" : "#0f172a",
940
- display: "flex",
941
- alignItems: "center",
942
- justifyContent: "center",
943
- fontWeight: "bold"
944
- } }, index + 1), /* @__PURE__ */ import_react18.default.createElement("p", { style: { color: index <= currentStep ? "#f1f5f9" : "#64748b", marginTop: "8px", fontSize: "14px" } }, step)))), /* @__PURE__ */ import_react18.default.createElement("div", { style: { display: "flex", position: "relative", height: "4px", background: "#cbd5e1", borderRadius: "2px" } }, /* @__PURE__ */ import_react18.default.createElement(
945
- "div",
946
- {
947
- style: {
948
- height: "100%",
949
- width: currentStep / (steps.length - 1) * 100 + "%",
950
- background: "#2563eb",
951
- borderRadius: "2px"
952
- }
953
- }
954
- )), /* @__PURE__ */ import_react18.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", marginTop: "24px" } }, /* @__PURE__ */ import_react18.default.createElement("button", { onClick: handlePrevious, disabled: currentStep === 0, style: {
955
- padding: "10px 20px",
117
+ } }, "Close"), /* @__PURE__ */ import_react.default.createElement("div", { style: {
118
+ height: "4px",
119
+ background: "rgba(255, 255, 255, 0.3)",
956
120
  borderRadius: "8px",
957
- background: currentStep === 0 ? "#cbd5e1" : "#7c3aed",
958
- color: "white",
959
- border: "none",
960
- cursor: currentStep === 0 ? "not-allowed" : "pointer"
961
- } }, "Previous"), /* @__PURE__ */ import_react18.default.createElement("button", { onClick: handleNext, disabled: currentStep === steps.length - 1, style: {
962
- padding: "10px 20px",
963
- borderRadius: "8px",
964
- background: currentStep === steps.length - 1 ? "#cbd5e1" : "#7c3aed",
965
- color: "white",
966
- border: "none",
967
- cursor: currentStep === steps.length - 1 ? "not-allowed" : "pointer"
968
- } }, "Next")));
969
- };
970
-
971
- // src/components/DateRangePicker/DateRangePicker.jsx
972
- var import_react19 = __toESM(require("react"));
973
- var DateRangePicker = ({
974
- startDate = /* @__PURE__ */ new Date(),
975
- endDate = new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 7)),
976
- onChange,
977
- bg = "#0f172a",
978
- highlightColor = "#2563eb",
979
- borderColor = "#7c3aed",
980
- borderRadius = "12px",
981
- textColor = "#f1f5f9"
982
- }) => {
983
- const [selectedStart, setSelectedStart] = (0, import_react19.useState)(startDate);
984
- const [selectedEnd, setSelectedEnd] = (0, import_react19.useState)(endDate);
985
- const daysArray = Array.from({ length: 30 }, (_, i) => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + i)));
986
- const handleSelect = (date) => {
987
- if (!selectedStart || selectedEnd && date < selectedStart) {
988
- setSelectedStart(date);
989
- setSelectedEnd(null);
990
- } else {
991
- setSelectedEnd(date);
992
- }
993
- onChange && onChange(selectedStart, selectedEnd);
994
- };
995
- return /* @__PURE__ */ import_react19.default.createElement("div", { style: { display: "flex", flexDirection: "column", background: bg, padding: "16px", borderRadius, border: `1px solid ${borderColor}`, boxShadow: "0 4px 20px rgba(0, 0, 0, 0.2)", fontFamily: "system-ui, sans-serif" } }, /* @__PURE__ */ import_react19.default.createElement("h3", { style: { color: textColor, margin: "0 0 12px", fontSize: "16px", fontWeight: "600" } }, "Select Date Range"), /* @__PURE__ */ import_react19.default.createElement("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: "8px" } }, daysArray.map((date, index) => /* @__PURE__ */ import_react19.default.createElement("button", { key: index, onClick: () => handleSelect(date), style: {
996
- background: date >= selectedStart && date <= selectedEnd ? highlightColor : "#334155",
997
- color: textColor,
998
- padding: "10px 0",
999
- borderRadius,
1000
- border: "none",
1001
- cursor: "pointer",
1002
- transition: "background 0.3s",
1003
- fontSize: "14px"
1004
- } }, date.getDate()))));
1005
- };
1006
-
1007
- // src/components/LoadingSkeleton/LoadingSkeleton.jsx
1008
- var import_react20 = __toESM(require("react"));
1009
- var LoadingSkeleton = ({
1010
- type = "card",
1011
- width = "300px",
1012
- height = "200px",
1013
- bg = "#334155",
1014
- shimmerColor = "#7c3aed",
1015
- radius = "12px",
1016
- speed = "1.5s"
1017
- }) => {
1018
- const shimmer = {
1019
- background: `linear-gradient(90deg, ${shimmerColor} 25%, rgba(255, 255, 255, 0.2) 50%, ${shimmerColor} 75%)`,
1020
- backgroundSize: "200% 100%",
1021
- animation: `shimmer ${speed} infinite`
1022
- };
1023
- return /* @__PURE__ */ import_react20.default.createElement("div", { style: { width, height, borderRadius: radius, position: "relative", overflow: "hidden", background: bg } }, /* @__PURE__ */ import_react20.default.createElement("div", { style: { width: "100%", height: "100%", ...shimmer } }), /* @__PURE__ */ import_react20.default.createElement("style", null, `@keyframes shimmer { 0% { background-position: 200% 0%; } 100% { background-position: 0% 0%; } }`));
1024
- };
1025
-
1026
- // src/components/Rating/Rating.jsx
1027
- var import_react21 = __toESM(require("react"));
1028
- var Rating = ({
1029
- value = 3.5,
1030
- count = 5,
1031
- size = 24,
1032
- activeColor = "#fbbf24",
1033
- inactiveColor = "#374151",
1034
- spacing = 4,
1035
- onSelect
1036
- }) => {
1037
- const [hoverValue, setHoverValue] = (0, import_react21.useState)(null);
1038
- const [selectedValue, setSelectedValue] = (0, import_react21.useState)(value);
1039
- const handleClick = (val) => {
1040
- setSelectedValue(val);
1041
- if (onSelect) onSelect(val);
1042
- };
1043
- return /* @__PURE__ */ import_react21.default.createElement("div", { style: { display: "flex", gap: spacing } }, [...Array(count)].map((_, i) => {
1044
- const starValue = i + 1;
1045
- const isActive = hoverValue ? hoverValue >= starValue : selectedValue >= starValue;
1046
- const isHalf = hoverValue === null && selectedValue + 0.5 >= starValue && selectedValue < starValue;
1047
- return /* @__PURE__ */ import_react21.default.createElement(
1048
- "div",
1049
- {
1050
- key: i,
1051
- style: { position: "relative", cursor: "pointer" },
1052
- onClick: () => handleClick(starValue),
1053
- onMouseEnter: () => setHoverValue(starValue),
1054
- onMouseLeave: () => setHoverValue(null)
1055
- },
1056
- /* @__PURE__ */ import_react21.default.createElement(
1057
- "svg",
1058
- {
1059
- xmlns: "http://www.w3.org/2000/svg",
1060
- viewBox: "0 0 24 24",
1061
- fill: isActive ? activeColor : inactiveColor,
1062
- width: size,
1063
- height: size
1064
- },
1065
- /* @__PURE__ */ import_react21.default.createElement("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" })
1066
- ),
1067
- isHalf && /* @__PURE__ */ import_react21.default.createElement("div", { style: { position: "absolute", top: 0, left: 0, width: size / 2, height: size, overflow: "hidden" } }, /* @__PURE__ */ import_react21.default.createElement(
1068
- "svg",
1069
- {
1070
- xmlns: "http://www.w3.org/2000/svg",
1071
- viewBox: "0 0 24 24",
1072
- fill: activeColor,
1073
- width: size,
1074
- height: size
1075
- },
1076
- /* @__PURE__ */ import_react21.default.createElement("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" })
1077
- ))
1078
- );
1079
- }));
1080
- };
1081
-
1082
- // src/components/AnimatedNavbar/AnimatedNavbar.jsx
1083
- var import_react22 = __toESM(require("react"));
1084
- var AnimatedNavbar = ({
1085
- logo = "https://via.placeholder.com/100",
1086
- links = [{ text: "Home", href: "#" }, { text: "About", href: "#" }, { text: "Services", href: "#" }, { text: "Contact", href: "#" }],
1087
- bgColor = "#0f172a",
1088
- textColor = "#f1f5f9",
1089
- accentColor = "#7c3aed",
1090
- radius = "8px"
1091
- }) => {
1092
- const [isOpen, setIsOpen] = import_react22.default.useState(false);
1093
- return /* @__PURE__ */ import_react22.default.createElement("nav", { style: {
1094
- background: bgColor,
1095
- display: "flex",
1096
- justifyContent: "space-between",
1097
- alignItems: "center",
1098
- padding: "10px 20px",
1099
- borderRadius: radius,
1100
- position: "relative",
1101
- boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
1102
- transition: "background 0.3s"
1103
- } }, /* @__PURE__ */ import_react22.default.createElement("img", { src: logo, alt: "Logo", style: { width: "100px" } }), /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "15px" } }, /* @__PURE__ */ import_react22.default.createElement("button", { onClick: () => setIsOpen(!isOpen), style: {
1104
- background: accentColor,
1105
- color: textColor,
1106
- border: "none",
1107
- borderRadius: radius,
1108
- padding: "8px 16px",
1109
- fontWeight: "600",
1110
- transition: "background 0.3s"
1111
- } }, "Menu")), isOpen && /* @__PURE__ */ import_react22.default.createElement("div", { style: {
1112
- position: "absolute",
1113
- top: "100%",
1114
- right: "0",
1115
- background: bgColor,
1116
- borderRadius: radius,
1117
- boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
1118
- zIndex: 10,
1119
- display: "flex",
1120
- flexDirection: "column",
1121
- gap: "10px",
1122
- padding: "10px"
1123
- } }, links.map((link) => /* @__PURE__ */ import_react22.default.createElement("a", { key: link.text, href: link.href, style: {
1124
- color: textColor,
1125
- textDecoration: "none",
1126
- padding: "8px 12px",
1127
- borderRadius: radius,
1128
- transition: "background 0.3s"
1129
- }, onMouseEnter: (e) => e.currentTarget.style.background = accentColor, onMouseLeave: (e) => e.currentTarget.style.background = "transparent" }, link.text))));
121
+ overflow: "hidden",
122
+ marginTop: "12px"
123
+ } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
124
+ width: progress + "%",
125
+ height: "100%",
126
+ background: "white",
127
+ transition: "width 0.1s linear"
128
+ } })));
1130
129
  };
1131
130
 
1132
131
  // src/components/StatCard/StatCard.jsx
1133
- var import_react23 = __toESM(require("react"));
132
+ var import_react2 = __toESM(require("react"));
1134
133
  var StatCard = ({
1135
- title = "Total Sales",
1136
- value = 1e3,
1137
- change = 5,
134
+ title = "Revenue",
135
+ metric = 1200,
136
+ change = 15,
1138
137
  bg = "#0f172a",
1139
- accent = "#0f766e",
1140
- negativeAccent = "#dc2626",
138
+ accent = "#059669",
139
+ negativeAccent = "#ef4444",
1141
140
  radius = "16px"
1142
141
  }) => {
1143
- const [count, setCount] = (0, import_react23.useState)(0);
1144
- (0, import_react23.useEffect)(() => {
1145
- let start = 0;
1146
- const end = value;
1147
- const duration = 2;
1148
- const increment = end / (duration * 60);
1149
- const timer = setInterval(() => {
1150
- start += increment;
1151
- if (start >= end) {
1152
- clearInterval(timer);
1153
- setCount(end);
142
+ const [count, setCount] = (0, import_react2.useState)(0);
143
+ (0, import_react2.useEffect)(() => {
144
+ let countUp = 0;
145
+ const interval = setInterval(() => {
146
+ if (countUp < metric) {
147
+ countUp += Math.ceil(metric / 100);
148
+ setCount(countUp);
1154
149
  } else {
1155
- setCount(Math.floor(start));
150
+ clearInterval(interval);
1156
151
  }
1157
- }, 1e3 / 60);
1158
- return () => clearInterval(timer);
1159
- }, [value]);
1160
- return /* @__PURE__ */ import_react23.default.createElement("div", { style: { background: bg, borderRadius: radius, padding: "24px", width: "280px", fontFamily: "system-ui, sans-serif", color: "#f1f5f9", position: "relative", boxShadow: "0 10px 30px rgba(0,0,0,0.5)" } }, /* @__PURE__ */ import_react23.default.createElement("h3", { style: { margin: "0 0 12px", fontSize: "16px", fontWeight: "600" } }, title), /* @__PURE__ */ import_react23.default.createElement("div", { style: { fontSize: "40px", fontWeight: "700", margin: "0 0 8px" } }, count), /* @__PURE__ */ import_react23.default.createElement("span", { style: {
152
+ }, 30);
153
+ return () => clearInterval(interval);
154
+ }, [metric]);
155
+ return /* @__PURE__ */ import_react2.default.createElement("div", { style: { background: bg, borderRadius: radius, padding: "24px", width: "300px", color: "white", boxShadow: "0 10px 30px rgba(0,0,0,0.5)", fontFamily: "system-ui, sans-serif", textAlign: "center" } }, /* @__PURE__ */ import_react2.default.createElement("h3", { style: { margin: "0 0 10px", fontSize: "16px", fontWeight: "600" } }, title), /* @__PURE__ */ import_react2.default.createElement("div", { style: { fontSize: "40px", fontWeight: "700" } }, count), /* @__PURE__ */ import_react2.default.createElement("span", { style: {
156
+ display: "inline-block",
157
+ padding: "5px 12px",
158
+ borderRadius: "10px",
1161
159
  background: change >= 0 ? accent : negativeAccent,
1162
160
  color: "white",
1163
- padding: "4px 8px",
1164
- borderRadius: "12px",
1165
- fontSize: "12px",
1166
- position: "absolute",
1167
- top: "24px",
1168
- right: "24px"
1169
- } }, change >= 0 ? "+" + change + "%" : change + "%"), /* @__PURE__ */ import_react23.default.createElement("svg", { width: "100%", height: "20", viewBox: "0 0 100 20", style: { marginTop: "10px" } }, /* @__PURE__ */ import_react23.default.createElement("polyline", { points: "0,15 20,10 40,12 60,5 80,8 100,0", stroke: accent, fill: "none", strokeWidth: "2" })));
161
+ fontSize: "14px",
162
+ margin: "10px 0"
163
+ } }, change >= 0 ? "+" + change + "%" : change + "%"), /* @__PURE__ */ import_react2.default.createElement("svg", { style: { marginTop: "12px" }, width: "100%", height: "30", viewBox: "0 0 100 30", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react2.default.createElement("polyline", { fill: "none", stroke: change >= 0 ? accent : negativeAccent, strokeWidth: "2", points: "0,15 10,10 20,20 30,15 40,22 50,8 60,18 70,15 80,18 90,10 100,15" })));
1170
164
  };
1171
165
  // Annotate the CommonJS export names for ESM import in node:
1172
166
  0 && (module.exports = {
1173
- AlertBanner,
1174
- AnimatedNavbar,
1175
- AnimatedProgressBar,
1176
- Button,
1177
- Card,
1178
- CopyButton,
1179
- DateRangePicker,
1180
- Dropdown,
1181
- EmptyState,
1182
- Footer,
1183
- FormInput,
1184
- GridLayout,
1185
- ImageUploadPreview,
1186
- Loader,
1187
- LoadingSkeleton,
1188
- MultiStepProgress,
1189
- Navbar,
1190
- OTPInput,
1191
- Rating,
1192
- RatingStars,
1193
167
  StatCard,
1194
- UserAvatar,
1195
- WishlistButton
168
+ ToastNotification
1196
169
  });