virtual-ui-lib 1.0.35 → 1.0.37

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