@algorithm-shift/design-system 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +47 -17
- package/dist/index.d.ts +47 -17
- package/dist/index.js +562 -206
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +552 -203
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,18 +32,25 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
Button: () => Button,
|
|
34
34
|
CheckboxInput: () => CheckboxInput,
|
|
35
|
-
|
|
35
|
+
DatePicker: () => DatePicker,
|
|
36
|
+
DateRange: () => DateRange_default,
|
|
36
37
|
Dropdown: () => Dropdown,
|
|
37
38
|
EmailInput: () => EmailInput,
|
|
39
|
+
FileInput: () => FileInput,
|
|
38
40
|
FlexLayout: () => Flex_default,
|
|
39
41
|
GridLayout: () => Grid_default,
|
|
42
|
+
Image: () => Image_default,
|
|
40
43
|
Logo: () => Logo_default,
|
|
41
44
|
MultiCheckbox: () => MultiCheckbox,
|
|
42
45
|
Notification: () => Notification_default,
|
|
46
|
+
NumberInput: () => NumberInput,
|
|
43
47
|
PasswordInput: () => PasswordInput,
|
|
44
48
|
PhoneInput: () => PhoneInput,
|
|
45
49
|
Profile: () => Profile_default,
|
|
46
50
|
RadioInput: () => RadioInput,
|
|
51
|
+
RichText: () => RichText,
|
|
52
|
+
SearchInput: () => SearchInput,
|
|
53
|
+
Shape: () => Shape_default,
|
|
47
54
|
Spacer: () => Spacer_default,
|
|
48
55
|
Stages: () => Stages_default,
|
|
49
56
|
SwitchToggle: () => SwitchToggle,
|
|
@@ -164,14 +171,64 @@ var Typography_default = Typography;
|
|
|
164
171
|
|
|
165
172
|
// src/components/Basic/Shape/Shape.tsx
|
|
166
173
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
174
|
+
var Shape = ({
|
|
175
|
+
children,
|
|
176
|
+
className,
|
|
177
|
+
style
|
|
178
|
+
}) => {
|
|
179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className, style, children });
|
|
180
|
+
};
|
|
181
|
+
var Shape_default = Shape;
|
|
182
|
+
|
|
183
|
+
// src/components/Basic/Image/Image.tsx
|
|
184
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
185
|
+
var ImageControl = ({
|
|
186
|
+
className,
|
|
187
|
+
style,
|
|
188
|
+
imageUrl,
|
|
189
|
+
imageUrlExternal,
|
|
190
|
+
altText = "Preview"
|
|
191
|
+
}) => {
|
|
192
|
+
const imageClass = cn(
|
|
193
|
+
"h-[200px] w-[200px] border-1",
|
|
194
|
+
"border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition",
|
|
195
|
+
className
|
|
196
|
+
);
|
|
197
|
+
const defaultImgClass = cn(
|
|
198
|
+
"w-full h-full",
|
|
199
|
+
className
|
|
200
|
+
);
|
|
201
|
+
let src;
|
|
202
|
+
let extraProps;
|
|
203
|
+
if (imageUrlExternal) {
|
|
204
|
+
src = imageUrlExternal;
|
|
205
|
+
extraProps = {
|
|
206
|
+
className: defaultImgClass
|
|
207
|
+
};
|
|
208
|
+
} else if (imageUrl) {
|
|
209
|
+
src = imageUrl;
|
|
210
|
+
extraProps = {
|
|
211
|
+
className: defaultImgClass
|
|
212
|
+
};
|
|
213
|
+
} else {
|
|
214
|
+
src = "./image-placeholder.png";
|
|
215
|
+
extraProps = {
|
|
216
|
+
width: 50,
|
|
217
|
+
height: 50,
|
|
218
|
+
className: "opacity-50"
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, style, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src, alt: altText }) });
|
|
222
|
+
};
|
|
223
|
+
var Image_default = ImageControl;
|
|
167
224
|
|
|
168
225
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
169
226
|
var React2 = __toESM(require("react"));
|
|
170
227
|
|
|
171
228
|
// src/components/ui/input.tsx
|
|
172
|
-
var
|
|
229
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
173
230
|
function Input({ className, type, ...props }) {
|
|
174
|
-
return /* @__PURE__ */ (0,
|
|
231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
175
232
|
"input",
|
|
176
233
|
{
|
|
177
234
|
type,
|
|
@@ -188,7 +245,7 @@ function Input({ className, type, ...props }) {
|
|
|
188
245
|
}
|
|
189
246
|
|
|
190
247
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
191
|
-
var
|
|
248
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
192
249
|
var TextInput = ({ className, style, ...props }) => {
|
|
193
250
|
const placeholder = props.placeholder || "Placeholder text";
|
|
194
251
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -213,8 +270,8 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
213
270
|
setError(null);
|
|
214
271
|
}
|
|
215
272
|
};
|
|
216
|
-
return /* @__PURE__ */ (0,
|
|
217
|
-
/* @__PURE__ */ (0,
|
|
273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
274
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
218
275
|
Input,
|
|
219
276
|
{
|
|
220
277
|
type: "text",
|
|
@@ -231,11 +288,11 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
231
288
|
pattern: regexPattern || void 0
|
|
232
289
|
}
|
|
233
290
|
),
|
|
234
|
-
error && /* @__PURE__ */ (0,
|
|
291
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
235
292
|
] });
|
|
236
293
|
};
|
|
237
294
|
|
|
238
|
-
// src/components/Inputs/
|
|
295
|
+
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
239
296
|
var React3 = __toESM(require("react"));
|
|
240
297
|
|
|
241
298
|
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
@@ -327,39 +384,63 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
|
327
384
|
return Component;
|
|
328
385
|
};
|
|
329
386
|
|
|
387
|
+
// node_modules/lucide-react/dist/esm/icons/calculator.js
|
|
388
|
+
var __iconNode = [
|
|
389
|
+
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
|
|
390
|
+
["line", { x1: "8", x2: "16", y1: "6", y2: "6", key: "x4nwl0" }],
|
|
391
|
+
["line", { x1: "16", x2: "16", y1: "14", y2: "18", key: "wjye3r" }],
|
|
392
|
+
["path", { d: "M16 10h.01", key: "1m94wz" }],
|
|
393
|
+
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
394
|
+
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
395
|
+
["path", { d: "M12 14h.01", key: "1etili" }],
|
|
396
|
+
["path", { d: "M8 14h.01", key: "6423bh" }],
|
|
397
|
+
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
398
|
+
["path", { d: "M8 18h.01", key: "lrp35t" }]
|
|
399
|
+
];
|
|
400
|
+
var Calculator = createLucideIcon("calculator", __iconNode);
|
|
401
|
+
|
|
402
|
+
// node_modules/lucide-react/dist/esm/icons/calendar.js
|
|
403
|
+
var __iconNode2 = [
|
|
404
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
405
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
406
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
407
|
+
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
408
|
+
];
|
|
409
|
+
var Calendar = createLucideIcon("calendar", __iconNode2);
|
|
410
|
+
|
|
330
411
|
// node_modules/lucide-react/dist/esm/icons/check.js
|
|
331
|
-
var
|
|
332
|
-
var Check = createLucideIcon("check",
|
|
412
|
+
var __iconNode3 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
413
|
+
var Check = createLucideIcon("check", __iconNode3);
|
|
333
414
|
|
|
334
415
|
// node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
335
|
-
var
|
|
336
|
-
var ChevronDown = createLucideIcon("chevron-down",
|
|
416
|
+
var __iconNode4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
417
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode4);
|
|
337
418
|
|
|
338
419
|
// node_modules/lucide-react/dist/esm/icons/chevron-left.js
|
|
339
|
-
var
|
|
340
|
-
var ChevronLeft = createLucideIcon("chevron-left",
|
|
420
|
+
var __iconNode5 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
421
|
+
var ChevronLeft = createLucideIcon("chevron-left", __iconNode5);
|
|
341
422
|
|
|
342
423
|
// node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
343
|
-
var
|
|
344
|
-
var ChevronRight = createLucideIcon("chevron-right",
|
|
424
|
+
var __iconNode6 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
425
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode6);
|
|
345
426
|
|
|
346
427
|
// node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
347
|
-
var
|
|
348
|
-
var ChevronUp = createLucideIcon("chevron-up",
|
|
428
|
+
var __iconNode7 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
429
|
+
var ChevronUp = createLucideIcon("chevron-up", __iconNode7);
|
|
349
430
|
|
|
350
431
|
// node_modules/lucide-react/dist/esm/icons/circle.js
|
|
351
|
-
var
|
|
352
|
-
var Circle = createLucideIcon("circle",
|
|
432
|
+
var __iconNode8 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
433
|
+
var Circle = createLucideIcon("circle", __iconNode8);
|
|
353
434
|
|
|
354
435
|
// node_modules/lucide-react/dist/esm/icons/mail.js
|
|
355
|
-
var
|
|
436
|
+
var __iconNode9 = [
|
|
356
437
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
357
438
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
358
439
|
];
|
|
359
|
-
var Mail = createLucideIcon("mail",
|
|
440
|
+
var Mail = createLucideIcon("mail", __iconNode9);
|
|
360
441
|
|
|
361
442
|
// node_modules/lucide-react/dist/esm/icons/scan-eye.js
|
|
362
|
-
var
|
|
443
|
+
var __iconNode10 = [
|
|
363
444
|
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
|
|
364
445
|
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
|
|
365
446
|
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
|
|
@@ -373,11 +454,18 @@ var __iconNode8 = [
|
|
|
373
454
|
}
|
|
374
455
|
]
|
|
375
456
|
];
|
|
376
|
-
var ScanEye = createLucideIcon("scan-eye",
|
|
457
|
+
var ScanEye = createLucideIcon("scan-eye", __iconNode10);
|
|
377
458
|
|
|
378
|
-
//
|
|
379
|
-
var
|
|
380
|
-
|
|
459
|
+
// node_modules/lucide-react/dist/esm/icons/search.js
|
|
460
|
+
var __iconNode11 = [
|
|
461
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
462
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
463
|
+
];
|
|
464
|
+
var Search = createLucideIcon("search", __iconNode11);
|
|
465
|
+
|
|
466
|
+
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
467
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
468
|
+
var NumberInput = ({ className, style, ...props }) => {
|
|
381
469
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
382
470
|
const regexPattern = props.regexPattern ?? "";
|
|
383
471
|
const errorMessage = props.errorMessage ?? "Required";
|
|
@@ -401,13 +489,14 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
401
489
|
setError(null);
|
|
402
490
|
}
|
|
403
491
|
};
|
|
404
|
-
return /* @__PURE__ */ (0,
|
|
405
|
-
/* @__PURE__ */ (0,
|
|
406
|
-
/* @__PURE__ */ (0,
|
|
407
|
-
/* @__PURE__ */ (0,
|
|
492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
493
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
494
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Calculator, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
408
496
|
Input,
|
|
409
497
|
{
|
|
410
|
-
type: "
|
|
498
|
+
type: "number",
|
|
499
|
+
id: "number-field",
|
|
411
500
|
value,
|
|
412
501
|
className,
|
|
413
502
|
style,
|
|
@@ -422,14 +511,14 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
422
511
|
}
|
|
423
512
|
)
|
|
424
513
|
] }),
|
|
425
|
-
error && /* @__PURE__ */ (0,
|
|
514
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
426
515
|
] });
|
|
427
516
|
};
|
|
428
517
|
|
|
429
|
-
// src/components/Inputs/
|
|
518
|
+
// src/components/Inputs/EmailInput/EmailInput.tsx
|
|
430
519
|
var React4 = __toESM(require("react"));
|
|
431
|
-
var
|
|
432
|
-
var
|
|
520
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
521
|
+
var EmailInput = ({ className, style, ...props }) => {
|
|
433
522
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
434
523
|
const regexPattern = props.regexPattern ?? "";
|
|
435
524
|
const errorMessage = props.errorMessage ?? "Required";
|
|
@@ -453,10 +542,62 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
453
542
|
setError(null);
|
|
454
543
|
}
|
|
455
544
|
};
|
|
456
|
-
return /* @__PURE__ */ (0,
|
|
457
|
-
/* @__PURE__ */ (0,
|
|
458
|
-
/* @__PURE__ */ (0,
|
|
459
|
-
/* @__PURE__ */ (0,
|
|
545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
546
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Mail, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
549
|
+
Input,
|
|
550
|
+
{
|
|
551
|
+
type: "email",
|
|
552
|
+
value,
|
|
553
|
+
className,
|
|
554
|
+
style,
|
|
555
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
556
|
+
placeholder,
|
|
557
|
+
onChange: handleChange,
|
|
558
|
+
disabled: isDisabled || !isEditable,
|
|
559
|
+
readOnly: isReadonly,
|
|
560
|
+
required: isRequired,
|
|
561
|
+
maxLength: noOfCharacters,
|
|
562
|
+
pattern: regexPattern || void 0
|
|
563
|
+
}
|
|
564
|
+
)
|
|
565
|
+
] }),
|
|
566
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
567
|
+
] });
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
// src/components/Inputs/PasswordInput/PasswordInput.tsx
|
|
571
|
+
var React5 = __toESM(require("react"));
|
|
572
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
573
|
+
var PasswordInput = ({ className, style, ...props }) => {
|
|
574
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
575
|
+
const regexPattern = props.regexPattern ?? "";
|
|
576
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
577
|
+
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
578
|
+
const isRequired = props.isRequired ?? false;
|
|
579
|
+
const isEditable = props.isEditable ?? true;
|
|
580
|
+
const isDisabled = props.isDisabled ?? false;
|
|
581
|
+
const isReadonly = props.isReadonly ?? false;
|
|
582
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
583
|
+
const [value, setValue] = React5.useState("");
|
|
584
|
+
const [error, setError] = React5.useState(null);
|
|
585
|
+
const handleChange = (e) => {
|
|
586
|
+
const val = e.target.value;
|
|
587
|
+
if (val.length > noOfCharacters) return;
|
|
588
|
+
setValue(val);
|
|
589
|
+
if (isRequired && val.trim() === "") {
|
|
590
|
+
setError(errorMessage);
|
|
591
|
+
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
592
|
+
setError(errorMessage);
|
|
593
|
+
} else {
|
|
594
|
+
setError(null);
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ScanEye, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
460
601
|
Input,
|
|
461
602
|
{
|
|
462
603
|
type: "password",
|
|
@@ -475,17 +616,17 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
475
616
|
}
|
|
476
617
|
)
|
|
477
618
|
] }),
|
|
478
|
-
error && /* @__PURE__ */ (0,
|
|
619
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
479
620
|
] });
|
|
480
621
|
};
|
|
481
622
|
|
|
482
623
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
483
|
-
var
|
|
624
|
+
var React6 = __toESM(require("react"));
|
|
484
625
|
|
|
485
626
|
// src/components/ui/textarea.tsx
|
|
486
|
-
var
|
|
627
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
487
628
|
function Textarea({ className, ...props }) {
|
|
488
|
-
return /* @__PURE__ */ (0,
|
|
629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
489
630
|
"textarea",
|
|
490
631
|
{
|
|
491
632
|
"data-slot": "textarea",
|
|
@@ -499,7 +640,7 @@ function Textarea({ className, ...props }) {
|
|
|
499
640
|
}
|
|
500
641
|
|
|
501
642
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
502
|
-
var
|
|
643
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
503
644
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
504
645
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
505
646
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -510,8 +651,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
510
651
|
const isDisabled = props.isDisabled ?? false;
|
|
511
652
|
const isReadonly = props.isReadonly ?? false;
|
|
512
653
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
513
|
-
const [value, setValue] =
|
|
514
|
-
const [error, setError] =
|
|
654
|
+
const [value, setValue] = React6.useState("");
|
|
655
|
+
const [error, setError] = React6.useState(null);
|
|
515
656
|
const handleChange = (e) => {
|
|
516
657
|
const val = e.target.value;
|
|
517
658
|
if (val.length > noOfCharacters) return;
|
|
@@ -524,8 +665,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
524
665
|
setError(null);
|
|
525
666
|
}
|
|
526
667
|
};
|
|
527
|
-
return /* @__PURE__ */ (0,
|
|
528
|
-
/* @__PURE__ */ (0,
|
|
668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
669
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
529
670
|
Textarea,
|
|
530
671
|
{
|
|
531
672
|
id: "textarea-field",
|
|
@@ -541,13 +682,13 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
541
682
|
maxLength: noOfCharacters
|
|
542
683
|
}
|
|
543
684
|
),
|
|
544
|
-
error && /* @__PURE__ */ (0,
|
|
685
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
545
686
|
] });
|
|
546
687
|
};
|
|
547
688
|
|
|
548
689
|
// src/components/Inputs/UrlInput/UrlInput.tsx
|
|
549
|
-
var
|
|
550
|
-
var
|
|
690
|
+
var React7 = __toESM(require("react"));
|
|
691
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
551
692
|
var UrlInput = ({ className, style, ...props }) => {
|
|
552
693
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
553
694
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -558,8 +699,8 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
558
699
|
const isDisabled = props.isDisabled ?? false;
|
|
559
700
|
const isReadonly = props.isReadonly ?? false;
|
|
560
701
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
561
|
-
const [value, setValue] =
|
|
562
|
-
const [error, setError] =
|
|
702
|
+
const [value, setValue] = React7.useState("");
|
|
703
|
+
const [error, setError] = React7.useState(null);
|
|
563
704
|
const handleChange = (e) => {
|
|
564
705
|
const val = e.target.value;
|
|
565
706
|
if (val.length > noOfCharacters) return;
|
|
@@ -572,10 +713,10 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
572
713
|
setError(null);
|
|
573
714
|
}
|
|
574
715
|
};
|
|
575
|
-
return /* @__PURE__ */ (0,
|
|
576
|
-
/* @__PURE__ */ (0,
|
|
577
|
-
/* @__PURE__ */ (0,
|
|
578
|
-
/* @__PURE__ */ (0,
|
|
716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
717
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
718
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
|
|
719
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
579
720
|
Input,
|
|
580
721
|
{
|
|
581
722
|
type: "url",
|
|
@@ -594,18 +735,18 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
594
735
|
}
|
|
595
736
|
)
|
|
596
737
|
] }),
|
|
597
|
-
error && /* @__PURE__ */ (0,
|
|
738
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
598
739
|
] });
|
|
599
740
|
};
|
|
600
741
|
|
|
601
742
|
// src/components/ui/checkbox.tsx
|
|
602
743
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
603
|
-
var
|
|
744
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
604
745
|
function Checkbox({
|
|
605
746
|
className,
|
|
606
747
|
...props
|
|
607
748
|
}) {
|
|
608
|
-
return /* @__PURE__ */ (0,
|
|
749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
609
750
|
CheckboxPrimitive.Root,
|
|
610
751
|
{
|
|
611
752
|
"data-slot": "checkbox",
|
|
@@ -614,12 +755,12 @@ function Checkbox({
|
|
|
614
755
|
className
|
|
615
756
|
),
|
|
616
757
|
...props,
|
|
617
|
-
children: /* @__PURE__ */ (0,
|
|
758
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
618
759
|
CheckboxPrimitive.Indicator,
|
|
619
760
|
{
|
|
620
761
|
"data-slot": "checkbox-indicator",
|
|
621
762
|
className: "flex items-center justify-center text-current transition-none",
|
|
622
|
-
children: /* @__PURE__ */ (0,
|
|
763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Check, { className: "size-3.5" })
|
|
623
764
|
}
|
|
624
765
|
)
|
|
625
766
|
}
|
|
@@ -628,12 +769,12 @@ function Checkbox({
|
|
|
628
769
|
|
|
629
770
|
// src/components/ui/label.tsx
|
|
630
771
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
631
|
-
var
|
|
772
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
632
773
|
function Label({
|
|
633
774
|
className,
|
|
634
775
|
...props
|
|
635
776
|
}) {
|
|
636
|
-
return /* @__PURE__ */ (0,
|
|
777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
637
778
|
LabelPrimitive.Root,
|
|
638
779
|
{
|
|
639
780
|
"data-slot": "label",
|
|
@@ -647,23 +788,23 @@ function Label({
|
|
|
647
788
|
}
|
|
648
789
|
|
|
649
790
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
650
|
-
var
|
|
791
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
651
792
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
652
793
|
const text = props.text ? props.text : "Subscribe";
|
|
653
|
-
return /* @__PURE__ */ (0,
|
|
654
|
-
/* @__PURE__ */ (0,
|
|
655
|
-
/* @__PURE__ */ (0,
|
|
794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
795
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Checkbox, { id: "newsletter" }),
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Label, { htmlFor: "newsletter", children: text })
|
|
656
797
|
] }) });
|
|
657
798
|
};
|
|
658
799
|
|
|
659
800
|
// src/components/ui/radio-group.tsx
|
|
660
801
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
661
|
-
var
|
|
802
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
662
803
|
function RadioGroup({
|
|
663
804
|
className,
|
|
664
805
|
...props
|
|
665
806
|
}) {
|
|
666
|
-
return /* @__PURE__ */ (0,
|
|
807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
667
808
|
RadioGroupPrimitive.Root,
|
|
668
809
|
{
|
|
669
810
|
"data-slot": "radio-group",
|
|
@@ -676,7 +817,7 @@ function RadioGroupItem({
|
|
|
676
817
|
className,
|
|
677
818
|
...props
|
|
678
819
|
}) {
|
|
679
|
-
return /* @__PURE__ */ (0,
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
680
821
|
RadioGroupPrimitive.Item,
|
|
681
822
|
{
|
|
682
823
|
"data-slot": "radio-group-item",
|
|
@@ -685,12 +826,12 @@ function RadioGroupItem({
|
|
|
685
826
|
className
|
|
686
827
|
),
|
|
687
828
|
...props,
|
|
688
|
-
children: /* @__PURE__ */ (0,
|
|
829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
689
830
|
RadioGroupPrimitive.Indicator,
|
|
690
831
|
{
|
|
691
832
|
"data-slot": "radio-group-indicator",
|
|
692
833
|
className: "relative flex items-center justify-center",
|
|
693
|
-
children: /* @__PURE__ */ (0,
|
|
834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
694
835
|
}
|
|
695
836
|
)
|
|
696
837
|
}
|
|
@@ -698,48 +839,117 @@ function RadioGroupItem({
|
|
|
698
839
|
}
|
|
699
840
|
|
|
700
841
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
701
|
-
var
|
|
842
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
702
843
|
var RadioInput = ({ className, style, ...props }) => {
|
|
703
844
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
704
|
-
return /* @__PURE__ */ (0,
|
|
705
|
-
/* @__PURE__ */ (0,
|
|
706
|
-
/* @__PURE__ */ (0,
|
|
845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadioGroup, { defaultValue: "option-1", children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadioGroupItem, { value: item, id: `r${index}` }),
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { htmlFor: `r${index}`, children: item })
|
|
707
848
|
] }, index)) }) });
|
|
708
849
|
};
|
|
709
850
|
|
|
710
851
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
711
|
-
var
|
|
852
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
712
853
|
var MultiCheckbox = ({ className, style, ...props }) => {
|
|
713
854
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
715
|
-
/* @__PURE__ */ (0,
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex gap-3 flex-col", children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
856
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Checkbox, { id: `newsletter-${index}` }),
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Label, { htmlFor: `newsletter-${index}`, children: item })
|
|
717
858
|
] }, index)) }) });
|
|
718
859
|
};
|
|
719
860
|
|
|
720
861
|
// src/components/Global/TinyMceEditor.tsx
|
|
721
862
|
var import_react4 = require("react");
|
|
722
863
|
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
723
|
-
var
|
|
864
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
865
|
+
function MyEditor({
|
|
866
|
+
value,
|
|
867
|
+
onChange,
|
|
868
|
+
isDefault
|
|
869
|
+
}) {
|
|
870
|
+
const editorRef = (0, import_react4.useRef)(null);
|
|
871
|
+
function stripOuterP(html) {
|
|
872
|
+
const trimmedHtml = html.trim();
|
|
873
|
+
if (!trimmedHtml) return "";
|
|
874
|
+
const div = document.createElement("div");
|
|
875
|
+
div.innerHTML = trimmedHtml;
|
|
876
|
+
const firstChild = div.firstElementChild;
|
|
877
|
+
if (div.childElementCount === 1 && firstChild?.tagName === "P") {
|
|
878
|
+
return firstChild.innerHTML;
|
|
879
|
+
}
|
|
880
|
+
return trimmedHtml;
|
|
881
|
+
}
|
|
882
|
+
const isDefaultToolbar = (0, import_react4.useMemo)(() => {
|
|
883
|
+
let toolbar = "undo redo | formatselect | bold italic forecolor";
|
|
884
|
+
if (isDefault) {
|
|
885
|
+
toolbar = "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help";
|
|
886
|
+
}
|
|
887
|
+
return toolbar;
|
|
888
|
+
}, [isDefault]);
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
890
|
+
import_tinymce_react.Editor,
|
|
891
|
+
{
|
|
892
|
+
apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
|
|
893
|
+
tinymceScriptSrc: process.env.NEXT_PUBLIC_TINYMCE_SCRIPT_SRC,
|
|
894
|
+
onInit: (_evt, editor) => editorRef.current = editor,
|
|
895
|
+
value,
|
|
896
|
+
licenseKey: "gpl",
|
|
897
|
+
init: {
|
|
898
|
+
height: 300,
|
|
899
|
+
menubar: false,
|
|
900
|
+
forced_root_block: false,
|
|
901
|
+
plugins: [
|
|
902
|
+
"advlist",
|
|
903
|
+
"autolink",
|
|
904
|
+
"lists",
|
|
905
|
+
"link",
|
|
906
|
+
"image",
|
|
907
|
+
"charmap",
|
|
908
|
+
"preview",
|
|
909
|
+
"anchor",
|
|
910
|
+
"searchreplace",
|
|
911
|
+
"visualblocks",
|
|
912
|
+
"code",
|
|
913
|
+
"fullscreen",
|
|
914
|
+
"insertdatetime",
|
|
915
|
+
"media",
|
|
916
|
+
"table",
|
|
917
|
+
"help",
|
|
918
|
+
"wordcount"
|
|
919
|
+
],
|
|
920
|
+
toolbar: isDefaultToolbar,
|
|
921
|
+
content_style: `
|
|
922
|
+
body {
|
|
923
|
+
outline: none;
|
|
924
|
+
}
|
|
925
|
+
`
|
|
926
|
+
},
|
|
927
|
+
onEditorChange: (content) => onChange?.(stripOuterP(content))
|
|
928
|
+
}
|
|
929
|
+
);
|
|
930
|
+
}
|
|
724
931
|
|
|
725
932
|
// src/components/Inputs/RichText/RichText.tsx
|
|
726
|
-
var
|
|
933
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
934
|
+
function RichText({ className, style }) {
|
|
935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MyEditor, { isDefault: true }) });
|
|
936
|
+
}
|
|
727
937
|
|
|
728
938
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
729
|
-
var
|
|
939
|
+
var React8 = __toESM(require("react"));
|
|
730
940
|
|
|
731
941
|
// src/components/ui/select.tsx
|
|
732
942
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
733
|
-
var
|
|
943
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
734
944
|
function Select({
|
|
735
945
|
...props
|
|
736
946
|
}) {
|
|
737
|
-
return /* @__PURE__ */ (0,
|
|
947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
738
948
|
}
|
|
739
949
|
function SelectValue({
|
|
740
950
|
...props
|
|
741
951
|
}) {
|
|
742
|
-
return /* @__PURE__ */ (0,
|
|
952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
743
953
|
}
|
|
744
954
|
function SelectTrigger({
|
|
745
955
|
className,
|
|
@@ -747,7 +957,7 @@ function SelectTrigger({
|
|
|
747
957
|
children,
|
|
748
958
|
...props
|
|
749
959
|
}) {
|
|
750
|
-
return /* @__PURE__ */ (0,
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
751
961
|
SelectPrimitive.Trigger,
|
|
752
962
|
{
|
|
753
963
|
"data-slot": "select-trigger",
|
|
@@ -759,7 +969,7 @@ function SelectTrigger({
|
|
|
759
969
|
...props,
|
|
760
970
|
children: [
|
|
761
971
|
children,
|
|
762
|
-
/* @__PURE__ */ (0,
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronDown, { className: "size-4 opacity-50" }) })
|
|
763
973
|
]
|
|
764
974
|
}
|
|
765
975
|
);
|
|
@@ -770,7 +980,7 @@ function SelectContent({
|
|
|
770
980
|
position = "popper",
|
|
771
981
|
...props
|
|
772
982
|
}) {
|
|
773
|
-
return /* @__PURE__ */ (0,
|
|
983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
774
984
|
SelectPrimitive.Content,
|
|
775
985
|
{
|
|
776
986
|
"data-slot": "select-content",
|
|
@@ -782,8 +992,8 @@ function SelectContent({
|
|
|
782
992
|
position,
|
|
783
993
|
...props,
|
|
784
994
|
children: [
|
|
785
|
-
/* @__PURE__ */ (0,
|
|
786
|
-
/* @__PURE__ */ (0,
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectScrollUpButton, {}),
|
|
996
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
787
997
|
SelectPrimitive.Viewport,
|
|
788
998
|
{
|
|
789
999
|
className: cn(
|
|
@@ -793,7 +1003,7 @@ function SelectContent({
|
|
|
793
1003
|
children
|
|
794
1004
|
}
|
|
795
1005
|
),
|
|
796
|
-
/* @__PURE__ */ (0,
|
|
1006
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectScrollDownButton, {})
|
|
797
1007
|
]
|
|
798
1008
|
}
|
|
799
1009
|
) });
|
|
@@ -803,7 +1013,7 @@ function SelectItem({
|
|
|
803
1013
|
children,
|
|
804
1014
|
...props
|
|
805
1015
|
}) {
|
|
806
|
-
return /* @__PURE__ */ (0,
|
|
1016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
807
1017
|
SelectPrimitive.Item,
|
|
808
1018
|
{
|
|
809
1019
|
"data-slot": "select-item",
|
|
@@ -813,8 +1023,8 @@ function SelectItem({
|
|
|
813
1023
|
),
|
|
814
1024
|
...props,
|
|
815
1025
|
children: [
|
|
816
|
-
/* @__PURE__ */ (0,
|
|
817
|
-
/* @__PURE__ */ (0,
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Check, { className: "size-4" }) }) }),
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.ItemText, { children })
|
|
818
1028
|
]
|
|
819
1029
|
}
|
|
820
1030
|
);
|
|
@@ -823,7 +1033,7 @@ function SelectScrollUpButton({
|
|
|
823
1033
|
className,
|
|
824
1034
|
...props
|
|
825
1035
|
}) {
|
|
826
|
-
return /* @__PURE__ */ (0,
|
|
1036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
827
1037
|
SelectPrimitive.ScrollUpButton,
|
|
828
1038
|
{
|
|
829
1039
|
"data-slot": "select-scroll-up-button",
|
|
@@ -832,7 +1042,7 @@ function SelectScrollUpButton({
|
|
|
832
1042
|
className
|
|
833
1043
|
),
|
|
834
1044
|
...props,
|
|
835
|
-
children: /* @__PURE__ */ (0,
|
|
1045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronUp, { className: "size-4" })
|
|
836
1046
|
}
|
|
837
1047
|
);
|
|
838
1048
|
}
|
|
@@ -840,7 +1050,7 @@ function SelectScrollDownButton({
|
|
|
840
1050
|
className,
|
|
841
1051
|
...props
|
|
842
1052
|
}) {
|
|
843
|
-
return /* @__PURE__ */ (0,
|
|
1053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
844
1054
|
SelectPrimitive.ScrollDownButton,
|
|
845
1055
|
{
|
|
846
1056
|
"data-slot": "select-scroll-down-button",
|
|
@@ -849,13 +1059,13 @@ function SelectScrollDownButton({
|
|
|
849
1059
|
className
|
|
850
1060
|
),
|
|
851
1061
|
...props,
|
|
852
|
-
children: /* @__PURE__ */ (0,
|
|
1062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronDown, { className: "size-4" })
|
|
853
1063
|
}
|
|
854
1064
|
);
|
|
855
1065
|
}
|
|
856
1066
|
|
|
857
1067
|
// src/components/Global/SelectDropdown.tsx
|
|
858
|
-
var
|
|
1068
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
859
1069
|
function SelectDropdown({
|
|
860
1070
|
options,
|
|
861
1071
|
placeholder = "Select an option",
|
|
@@ -867,23 +1077,23 @@ function SelectDropdown({
|
|
|
867
1077
|
readOnly,
|
|
868
1078
|
style
|
|
869
1079
|
}) {
|
|
870
|
-
return /* @__PURE__ */ (0,
|
|
871
|
-
/* @__PURE__ */ (0,
|
|
1080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Select, { value, onValueChange: onChange, disabled, children: [
|
|
1081
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
872
1082
|
SelectTrigger,
|
|
873
1083
|
{
|
|
874
1084
|
id,
|
|
875
1085
|
className,
|
|
876
1086
|
style: style ?? {},
|
|
877
1087
|
"aria-readonly": readOnly,
|
|
878
|
-
children: /* @__PURE__ */ (0,
|
|
1088
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectValue, { placeholder })
|
|
879
1089
|
}
|
|
880
1090
|
),
|
|
881
|
-
/* @__PURE__ */ (0,
|
|
1091
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectContent, { children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
882
1092
|
] });
|
|
883
1093
|
}
|
|
884
1094
|
|
|
885
1095
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
886
|
-
var
|
|
1096
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
887
1097
|
var Dropdown = ({ className, style, ...props }) => {
|
|
888
1098
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Default"];
|
|
889
1099
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
@@ -898,8 +1108,8 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
898
1108
|
const isDisabled = props.isDisabled ?? false;
|
|
899
1109
|
const isReadonly = props.isReadonly ?? false;
|
|
900
1110
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
901
|
-
const [value, setValue] =
|
|
902
|
-
const [error, setError] =
|
|
1111
|
+
const [value, setValue] = React8.useState("");
|
|
1112
|
+
const [error, setError] = React8.useState(null);
|
|
903
1113
|
const handleChange = (val) => {
|
|
904
1114
|
setValue(val);
|
|
905
1115
|
if (isRequired && val.trim() === "") {
|
|
@@ -910,8 +1120,8 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
910
1120
|
setError(null);
|
|
911
1121
|
}
|
|
912
1122
|
};
|
|
913
|
-
return /* @__PURE__ */ (0,
|
|
914
|
-
/* @__PURE__ */ (0,
|
|
1123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1124
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex gap-3 flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
915
1125
|
SelectDropdown,
|
|
916
1126
|
{
|
|
917
1127
|
options: formatList,
|
|
@@ -928,18 +1138,18 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
928
1138
|
pattern: regexPattern || void 0
|
|
929
1139
|
}
|
|
930
1140
|
) }),
|
|
931
|
-
error && /* @__PURE__ */ (0,
|
|
1141
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
932
1142
|
] });
|
|
933
1143
|
};
|
|
934
1144
|
|
|
935
1145
|
// src/components/ui/switch.tsx
|
|
936
1146
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
|
|
937
|
-
var
|
|
1147
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
938
1148
|
function Switch({
|
|
939
1149
|
className,
|
|
940
1150
|
...props
|
|
941
1151
|
}) {
|
|
942
|
-
return /* @__PURE__ */ (0,
|
|
1152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
943
1153
|
SwitchPrimitive.Root,
|
|
944
1154
|
{
|
|
945
1155
|
"data-slot": "switch",
|
|
@@ -948,7 +1158,7 @@ function Switch({
|
|
|
948
1158
|
className
|
|
949
1159
|
),
|
|
950
1160
|
...props,
|
|
951
|
-
children: /* @__PURE__ */ (0,
|
|
1161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
952
1162
|
SwitchPrimitive.Thumb,
|
|
953
1163
|
{
|
|
954
1164
|
"data-slot": "switch-thumb",
|
|
@@ -962,30 +1172,30 @@ function Switch({
|
|
|
962
1172
|
}
|
|
963
1173
|
|
|
964
1174
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
965
|
-
var
|
|
1175
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
966
1176
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
967
1177
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
968
|
-
return /* @__PURE__ */ (0,
|
|
969
|
-
/* @__PURE__ */ (0,
|
|
970
|
-
/* @__PURE__ */ (0,
|
|
1178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className, style, children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Switch, { id: `switch-${index}` }),
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label, { htmlFor: `switch-${index}`, children: item })
|
|
971
1181
|
] }, index)) });
|
|
972
1182
|
};
|
|
973
1183
|
|
|
974
1184
|
// src/components/Inputs/PhoneInput/PhoneInput.tsx
|
|
975
|
-
var
|
|
1185
|
+
var React9 = __toESM(require("react"));
|
|
976
1186
|
var import_react_international_phone = require("react-international-phone");
|
|
977
1187
|
var import_style = require("react-international-phone/style.css");
|
|
978
|
-
var
|
|
1188
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
979
1189
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
980
1190
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
981
|
-
const [value, setValue] =
|
|
1191
|
+
const [value, setValue] = React9.useState("");
|
|
982
1192
|
const regexPattern = props.regexPattern ?? "";
|
|
983
1193
|
const errorMessage = props.errorMessage ?? "Required";
|
|
984
1194
|
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
985
1195
|
const isRequired = props.isRequired ?? false;
|
|
986
1196
|
const isEditable = props.isEditable ?? true;
|
|
987
1197
|
const isDisabled = props.isDisabled ?? false;
|
|
988
|
-
const [error, setError] =
|
|
1198
|
+
const [error, setError] = React9.useState(null);
|
|
989
1199
|
const handleChange = (val) => {
|
|
990
1200
|
if (val.length > noOfCharacters) return;
|
|
991
1201
|
setValue(val);
|
|
@@ -997,8 +1207,8 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
997
1207
|
setError(null);
|
|
998
1208
|
}
|
|
999
1209
|
};
|
|
1000
|
-
return /* @__PURE__ */ (0,
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
1210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1002
1212
|
import_react_international_phone.PhoneInput,
|
|
1003
1213
|
{
|
|
1004
1214
|
defaultCountry: "in",
|
|
@@ -1015,23 +1225,158 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
1015
1225
|
style
|
|
1016
1226
|
}
|
|
1017
1227
|
),
|
|
1018
|
-
error && /* @__PURE__ */ (0,
|
|
1228
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1229
|
+
] });
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1232
|
+
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
1233
|
+
var React10 = __toESM(require("react"));
|
|
1234
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1235
|
+
var SearchInput = ({ className, style, ...props }) => {
|
|
1236
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1237
|
+
const regexPattern = props.regexPattern ?? "";
|
|
1238
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
1239
|
+
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
1240
|
+
const isRequired = props.isRequired ?? false;
|
|
1241
|
+
const isEditable = props.isEditable ?? true;
|
|
1242
|
+
const isDisabled = props.isDisabled ?? false;
|
|
1243
|
+
const isReadonly = props.isReadonly ?? false;
|
|
1244
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1245
|
+
const [value, setValue] = React10.useState("");
|
|
1246
|
+
const [error, setError] = React10.useState(null);
|
|
1247
|
+
const handleChange = (e) => {
|
|
1248
|
+
const val = e.target.value;
|
|
1249
|
+
if (val.length > noOfCharacters) return;
|
|
1250
|
+
setValue(val);
|
|
1251
|
+
if (isRequired && val.trim() === "") {
|
|
1252
|
+
setError(errorMessage);
|
|
1253
|
+
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
1254
|
+
setError(errorMessage);
|
|
1255
|
+
} else {
|
|
1256
|
+
setError(null);
|
|
1257
|
+
}
|
|
1258
|
+
};
|
|
1259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1263
|
+
Input,
|
|
1264
|
+
{
|
|
1265
|
+
type: "text",
|
|
1266
|
+
id: "text-field",
|
|
1267
|
+
className,
|
|
1268
|
+
style,
|
|
1269
|
+
value,
|
|
1270
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
1271
|
+
placeholder,
|
|
1272
|
+
onChange: handleChange,
|
|
1273
|
+
disabled: isDisabled || !isEditable,
|
|
1274
|
+
readOnly: isReadonly,
|
|
1275
|
+
required: isRequired,
|
|
1276
|
+
maxLength: noOfCharacters,
|
|
1277
|
+
pattern: regexPattern || void 0
|
|
1278
|
+
}
|
|
1279
|
+
)
|
|
1280
|
+
] }),
|
|
1281
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1282
|
+
] });
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
// src/components/Inputs/FileInput/FileInput.tsx
|
|
1286
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1287
|
+
var FileInput = ({ className, style, ...props }) => {
|
|
1288
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[11px]", children: "Browse" }),
|
|
1291
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1292
|
+
Input,
|
|
1293
|
+
{
|
|
1294
|
+
type: "file",
|
|
1295
|
+
id: "file",
|
|
1296
|
+
autoComplete: "off",
|
|
1297
|
+
placeholder,
|
|
1298
|
+
className,
|
|
1299
|
+
style
|
|
1300
|
+
}
|
|
1301
|
+
)
|
|
1019
1302
|
] });
|
|
1020
1303
|
};
|
|
1021
1304
|
|
|
1022
1305
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
1023
1306
|
var import_react5 = __toESM(require("react"));
|
|
1024
|
-
var
|
|
1307
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1308
|
+
function DatePicker({ className, style, ...props }) {
|
|
1309
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1310
|
+
const minimumDate = props.minimumDate ?? "none";
|
|
1311
|
+
const customMinimumDate = props.customMinimumDate ?? "";
|
|
1312
|
+
const maximumDate = props.maximumDate ?? "none";
|
|
1313
|
+
const customMaximumDate = props.customMaximumDate ?? "";
|
|
1314
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
1315
|
+
const isRequired = props.isRequired ?? false;
|
|
1316
|
+
const isEditable = props.isEditable ?? true;
|
|
1317
|
+
const isDisabled = props.isDisabled ?? false;
|
|
1318
|
+
const isReadonly = props.isReadonly ?? false;
|
|
1319
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1320
|
+
const [value, setValue] = import_react5.default.useState("");
|
|
1321
|
+
const [error, setError] = import_react5.default.useState(null);
|
|
1322
|
+
const resolveDate = (option, customOption) => {
|
|
1323
|
+
if (!option) return void 0;
|
|
1324
|
+
switch (option) {
|
|
1325
|
+
case "today":
|
|
1326
|
+
return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
1327
|
+
case "custom":
|
|
1328
|
+
return customOption ?? void 0;
|
|
1329
|
+
case "none":
|
|
1330
|
+
default:
|
|
1331
|
+
return void 0;
|
|
1332
|
+
}
|
|
1333
|
+
};
|
|
1334
|
+
const minDate = resolveDate(minimumDate, customMinimumDate);
|
|
1335
|
+
const maxDate = resolveDate(maximumDate, customMaximumDate);
|
|
1336
|
+
const handleChange = (e) => {
|
|
1337
|
+
const val = e.target.value;
|
|
1338
|
+
setValue(val);
|
|
1339
|
+
if (isRequired && val.trim() === "") {
|
|
1340
|
+
setError(errorMessage);
|
|
1341
|
+
} else {
|
|
1342
|
+
setError(null);
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1349
|
+
Input,
|
|
1350
|
+
{
|
|
1351
|
+
type: "date",
|
|
1352
|
+
id: "date",
|
|
1353
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
1354
|
+
onChange: handleChange,
|
|
1355
|
+
disabled: isDisabled || !isEditable,
|
|
1356
|
+
value,
|
|
1357
|
+
readOnly: isReadonly,
|
|
1358
|
+
required: isRequired,
|
|
1359
|
+
placeholder,
|
|
1360
|
+
min: minDate,
|
|
1361
|
+
max: maxDate,
|
|
1362
|
+
className,
|
|
1363
|
+
style
|
|
1364
|
+
}
|
|
1365
|
+
)
|
|
1366
|
+
] }),
|
|
1367
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1368
|
+
] });
|
|
1369
|
+
}
|
|
1025
1370
|
|
|
1026
1371
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
1027
|
-
var
|
|
1372
|
+
var React13 = __toESM(require("react"));
|
|
1028
1373
|
var import_date_fns = require("date-fns");
|
|
1029
1374
|
|
|
1030
1375
|
// src/components/ui/calendar.tsx
|
|
1031
|
-
var
|
|
1376
|
+
var React12 = __toESM(require("react"));
|
|
1032
1377
|
var import_react_day_picker = require("react-day-picker");
|
|
1033
|
-
var
|
|
1034
|
-
function
|
|
1378
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1379
|
+
function Calendar2({
|
|
1035
1380
|
className,
|
|
1036
1381
|
classNames,
|
|
1037
1382
|
showOutsideDays = true,
|
|
@@ -1042,7 +1387,7 @@ function Calendar({
|
|
|
1042
1387
|
...props
|
|
1043
1388
|
}) {
|
|
1044
1389
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1046
1391
|
import_react_day_picker.DayPicker,
|
|
1047
1392
|
{
|
|
1048
1393
|
showOutsideDays,
|
|
@@ -1141,7 +1486,7 @@ function Calendar({
|
|
|
1141
1486
|
},
|
|
1142
1487
|
components: {
|
|
1143
1488
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
1144
|
-
return /* @__PURE__ */ (0,
|
|
1489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1145
1490
|
"div",
|
|
1146
1491
|
{
|
|
1147
1492
|
"data-slot": "calendar",
|
|
@@ -1153,10 +1498,10 @@ function Calendar({
|
|
|
1153
1498
|
},
|
|
1154
1499
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
1155
1500
|
if (orientation === "left") {
|
|
1156
|
-
return /* @__PURE__ */ (0,
|
|
1501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
1157
1502
|
}
|
|
1158
1503
|
if (orientation === "right") {
|
|
1159
|
-
return /* @__PURE__ */ (0,
|
|
1504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1160
1505
|
ChevronRight,
|
|
1161
1506
|
{
|
|
1162
1507
|
className: cn("size-4", className2),
|
|
@@ -1164,11 +1509,11 @@ function Calendar({
|
|
|
1164
1509
|
}
|
|
1165
1510
|
);
|
|
1166
1511
|
}
|
|
1167
|
-
return /* @__PURE__ */ (0,
|
|
1512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
1168
1513
|
},
|
|
1169
1514
|
DayButton: CalendarDayButton,
|
|
1170
1515
|
WeekNumber: ({ children, ...props2 }) => {
|
|
1171
|
-
return /* @__PURE__ */ (0,
|
|
1516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
1172
1517
|
},
|
|
1173
1518
|
...components
|
|
1174
1519
|
},
|
|
@@ -1183,11 +1528,11 @@ function CalendarDayButton({
|
|
|
1183
1528
|
...props
|
|
1184
1529
|
}) {
|
|
1185
1530
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1186
|
-
const ref =
|
|
1187
|
-
|
|
1531
|
+
const ref = React12.useRef(null);
|
|
1532
|
+
React12.useEffect(() => {
|
|
1188
1533
|
if (modifiers.focused) ref.current?.focus();
|
|
1189
1534
|
}, [modifiers.focused]);
|
|
1190
|
-
return /* @__PURE__ */ (0,
|
|
1535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1191
1536
|
Button,
|
|
1192
1537
|
{
|
|
1193
1538
|
ref,
|
|
@@ -1210,16 +1555,16 @@ function CalendarDayButton({
|
|
|
1210
1555
|
|
|
1211
1556
|
// src/components/ui/popover.tsx
|
|
1212
1557
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
1213
|
-
var
|
|
1558
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1214
1559
|
function Popover({
|
|
1215
1560
|
...props
|
|
1216
1561
|
}) {
|
|
1217
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1218
1563
|
}
|
|
1219
1564
|
function PopoverTrigger({
|
|
1220
1565
|
...props
|
|
1221
1566
|
}) {
|
|
1222
|
-
return /* @__PURE__ */ (0,
|
|
1567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1223
1568
|
}
|
|
1224
1569
|
function PopoverContent({
|
|
1225
1570
|
className,
|
|
@@ -1227,7 +1572,7 @@ function PopoverContent({
|
|
|
1227
1572
|
sideOffset = 4,
|
|
1228
1573
|
...props
|
|
1229
1574
|
}) {
|
|
1230
|
-
return /* @__PURE__ */ (0,
|
|
1575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1231
1576
|
PopoverPrimitive.Content,
|
|
1232
1577
|
{
|
|
1233
1578
|
"data-slot": "popover-content",
|
|
@@ -1243,14 +1588,14 @@ function PopoverContent({
|
|
|
1243
1588
|
}
|
|
1244
1589
|
|
|
1245
1590
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
1246
|
-
var
|
|
1591
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1247
1592
|
var DateRange = ({ className, style }) => {
|
|
1248
|
-
const [date, setDate] =
|
|
1593
|
+
const [date, setDate] = React13.useState({
|
|
1249
1594
|
from: /* @__PURE__ */ new Date(),
|
|
1250
1595
|
to: (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
|
|
1251
1596
|
});
|
|
1252
|
-
return /* @__PURE__ */ (0,
|
|
1253
|
-
/* @__PURE__ */ (0,
|
|
1597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Popover, { children: [
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1254
1599
|
Button,
|
|
1255
1600
|
{
|
|
1256
1601
|
id: "date",
|
|
@@ -1259,16 +1604,16 @@ var DateRange = ({ className, style }) => {
|
|
|
1259
1604
|
"w-[300px] justify-start text-left font-normal text-[11px]",
|
|
1260
1605
|
!date && "text-muted-foreground"
|
|
1261
1606
|
),
|
|
1262
|
-
children: date?.from ? date.to ? /* @__PURE__ */ (0,
|
|
1607
|
+
children: date?.from ? date.to ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
1263
1608
|
(0, import_date_fns.format)(date.from, "LLL dd, y"),
|
|
1264
1609
|
" -",
|
|
1265
1610
|
" ",
|
|
1266
1611
|
(0, import_date_fns.format)(date.to, "LLL dd, y")
|
|
1267
|
-
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0,
|
|
1612
|
+
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: "Pick a date range" })
|
|
1268
1613
|
}
|
|
1269
1614
|
) }),
|
|
1270
|
-
/* @__PURE__ */ (0,
|
|
1271
|
-
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1616
|
+
Calendar2,
|
|
1272
1617
|
{
|
|
1273
1618
|
mode: "range",
|
|
1274
1619
|
defaultMonth: date?.from,
|
|
@@ -1279,19 +1624,20 @@ var DateRange = ({ className, style }) => {
|
|
|
1279
1624
|
) })
|
|
1280
1625
|
] }) });
|
|
1281
1626
|
};
|
|
1627
|
+
var DateRange_default = DateRange;
|
|
1282
1628
|
|
|
1283
1629
|
// src/components/ui/data-table.tsx
|
|
1284
1630
|
var import_react_table = require("@tanstack/react-table");
|
|
1285
1631
|
|
|
1286
1632
|
// src/components/ui/table.tsx
|
|
1287
|
-
var
|
|
1633
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1288
1634
|
function Table({ className, ...props }) {
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1290
1636
|
"div",
|
|
1291
1637
|
{
|
|
1292
1638
|
"data-slot": "table-container",
|
|
1293
1639
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
1294
|
-
children: /* @__PURE__ */ (0,
|
|
1640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1295
1641
|
"table",
|
|
1296
1642
|
{
|
|
1297
1643
|
"data-slot": "table",
|
|
@@ -1303,7 +1649,7 @@ function Table({ className, ...props }) {
|
|
|
1303
1649
|
);
|
|
1304
1650
|
}
|
|
1305
1651
|
function TableHeader({ className, ...props }) {
|
|
1306
|
-
return /* @__PURE__ */ (0,
|
|
1652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1307
1653
|
"thead",
|
|
1308
1654
|
{
|
|
1309
1655
|
"data-slot": "table-header",
|
|
@@ -1316,7 +1662,7 @@ function TableHeader({ className, ...props }) {
|
|
|
1316
1662
|
);
|
|
1317
1663
|
}
|
|
1318
1664
|
function TableBody({ className, ...props }) {
|
|
1319
|
-
return /* @__PURE__ */ (0,
|
|
1665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1320
1666
|
"tbody",
|
|
1321
1667
|
{
|
|
1322
1668
|
"data-slot": "table-body",
|
|
@@ -1329,7 +1675,7 @@ function TableBody({ className, ...props }) {
|
|
|
1329
1675
|
);
|
|
1330
1676
|
}
|
|
1331
1677
|
function TableRow({ className, ...props }) {
|
|
1332
|
-
return /* @__PURE__ */ (0,
|
|
1678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1333
1679
|
"tr",
|
|
1334
1680
|
{
|
|
1335
1681
|
"data-slot": "table-row",
|
|
@@ -1342,7 +1688,7 @@ function TableRow({ className, ...props }) {
|
|
|
1342
1688
|
);
|
|
1343
1689
|
}
|
|
1344
1690
|
function TableHead({ className, ...props }) {
|
|
1345
|
-
return /* @__PURE__ */ (0,
|
|
1691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1346
1692
|
"th",
|
|
1347
1693
|
{
|
|
1348
1694
|
"data-slot": "table-head",
|
|
@@ -1355,7 +1701,7 @@ function TableHead({ className, ...props }) {
|
|
|
1355
1701
|
);
|
|
1356
1702
|
}
|
|
1357
1703
|
function TableCell({ className, ...props }) {
|
|
1358
|
-
return /* @__PURE__ */ (0,
|
|
1704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1359
1705
|
"td",
|
|
1360
1706
|
{
|
|
1361
1707
|
"data-slot": "table-cell",
|
|
@@ -1369,7 +1715,7 @@ function TableCell({ className, ...props }) {
|
|
|
1369
1715
|
}
|
|
1370
1716
|
|
|
1371
1717
|
// src/components/ui/data-table.tsx
|
|
1372
|
-
var
|
|
1718
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1373
1719
|
function DataTable({
|
|
1374
1720
|
columns,
|
|
1375
1721
|
rowActions,
|
|
@@ -1394,14 +1740,14 @@ function DataTable({
|
|
|
1394
1740
|
onCellClick(rowData, columnId);
|
|
1395
1741
|
}
|
|
1396
1742
|
};
|
|
1397
|
-
return /* @__PURE__ */ (0,
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
1399
|
-
return /* @__PURE__ */ (0,
|
|
1743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Table, { children: [
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
|
|
1745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
1400
1746
|
header.column.columnDef.header,
|
|
1401
1747
|
header.getContext()
|
|
1402
1748
|
) }, header.id);
|
|
1403
1749
|
}) }, headerGroup.id)) }),
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1750
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1405
1751
|
TableRow,
|
|
1406
1752
|
{
|
|
1407
1753
|
"data-state": row.getIsSelected() && "selected",
|
|
@@ -1411,7 +1757,7 @@ function DataTable({
|
|
|
1411
1757
|
const isCellClickable = cellClickEnabled(row.original, cell.column.id);
|
|
1412
1758
|
const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
|
|
1413
1759
|
const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
|
|
1414
|
-
return /* @__PURE__ */ (0,
|
|
1760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1415
1761
|
TableCell,
|
|
1416
1762
|
{
|
|
1417
1763
|
className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
|
|
@@ -1426,36 +1772,36 @@ function DataTable({
|
|
|
1426
1772
|
cell.id
|
|
1427
1773
|
);
|
|
1428
1774
|
}),
|
|
1429
|
-
rowActions.length > 0 && /* @__PURE__ */ (0,
|
|
1775
|
+
rowActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "absolute top-0 right-0 bg-white py-3 min-w-[100px] z-50 shadow-md flex items-center justify-center gap-3 p-2 opacity-0 group-hover:opacity-100 duration-300 h-full", children: rowActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
|
|
1430
1776
|
]
|
|
1431
1777
|
},
|
|
1432
1778
|
row.id
|
|
1433
|
-
)) : /* @__PURE__ */ (0,
|
|
1779
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
|
|
1434
1780
|
] }) });
|
|
1435
1781
|
}
|
|
1436
1782
|
|
|
1437
1783
|
// src/components/DataDisplay/Table/Table.tsx
|
|
1438
|
-
var
|
|
1784
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1439
1785
|
var Table2 = ({ columns, data, rowActions }) => {
|
|
1440
1786
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
1441
1787
|
const rawData = Array.isArray(data) ? data : [];
|
|
1442
1788
|
const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
|
|
1443
|
-
return /* @__PURE__ */ (0,
|
|
1789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions });
|
|
1444
1790
|
};
|
|
1445
1791
|
var Table_default = Table2;
|
|
1446
1792
|
|
|
1447
1793
|
// src/components/ui/dropdown-menu.tsx
|
|
1448
1794
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1449
|
-
var
|
|
1795
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1450
1796
|
function DropdownMenu({
|
|
1451
1797
|
...props
|
|
1452
1798
|
}) {
|
|
1453
|
-
return /* @__PURE__ */ (0,
|
|
1799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1454
1800
|
}
|
|
1455
1801
|
function DropdownMenuTrigger({
|
|
1456
1802
|
...props
|
|
1457
1803
|
}) {
|
|
1458
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1459
1805
|
DropdownMenuPrimitive.Trigger,
|
|
1460
1806
|
{
|
|
1461
1807
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -1468,7 +1814,7 @@ function DropdownMenuContent({
|
|
|
1468
1814
|
sideOffset = 4,
|
|
1469
1815
|
...props
|
|
1470
1816
|
}) {
|
|
1471
|
-
return /* @__PURE__ */ (0,
|
|
1817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1472
1818
|
DropdownMenuPrimitive.Content,
|
|
1473
1819
|
{
|
|
1474
1820
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1487,7 +1833,7 @@ function DropdownMenuItem({
|
|
|
1487
1833
|
variant = "default",
|
|
1488
1834
|
...props
|
|
1489
1835
|
}) {
|
|
1490
|
-
return /* @__PURE__ */ (0,
|
|
1836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1491
1837
|
DropdownMenuPrimitive.Item,
|
|
1492
1838
|
{
|
|
1493
1839
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1503,13 +1849,13 @@ function DropdownMenuItem({
|
|
|
1503
1849
|
}
|
|
1504
1850
|
|
|
1505
1851
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
1506
|
-
var
|
|
1852
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1507
1853
|
var Tabs = ({ tabs, className, style }) => {
|
|
1508
1854
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
1509
1855
|
const baseClasses = "text-[12px] text-[#E9E9E9] p-2 text-center rounded-md transition-colors border-none outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 cursor-pointer select-none ";
|
|
1510
1856
|
const activeClasses = "bg-white/10 text-white";
|
|
1511
1857
|
const hoverClasses = "hover:bg-white/5";
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className, style, children: rawTabs.map((tab, index) => {
|
|
1513
1859
|
const finalClasses = [
|
|
1514
1860
|
baseClasses,
|
|
1515
1861
|
tab.isActive ? activeClasses : hoverClasses,
|
|
@@ -1517,24 +1863,24 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1517
1863
|
].join(" ");
|
|
1518
1864
|
const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
1519
1865
|
if (hasDropdown) {
|
|
1520
|
-
return /* @__PURE__ */ (0,
|
|
1521
|
-
/* @__PURE__ */ (0,
|
|
1866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(DropdownMenu, { children: [
|
|
1867
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1522
1868
|
DropdownMenuTrigger,
|
|
1523
1869
|
{
|
|
1524
1870
|
className: `${finalClasses} inline-flex items-center gap-1`,
|
|
1525
1871
|
children: [
|
|
1526
1872
|
tab.header,
|
|
1527
|
-
/* @__PURE__ */ (0,
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
1528
1874
|
]
|
|
1529
1875
|
}
|
|
1530
1876
|
),
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1877
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1532
1878
|
DropdownMenuContent,
|
|
1533
1879
|
{
|
|
1534
1880
|
align: "start",
|
|
1535
1881
|
sideOffset: 6,
|
|
1536
1882
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
1537
|
-
children: tab.children.map((item) => /* @__PURE__ */ (0,
|
|
1883
|
+
children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1538
1884
|
DropdownMenuItem,
|
|
1539
1885
|
{
|
|
1540
1886
|
asChild: true,
|
|
@@ -1547,19 +1893,19 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1547
1893
|
)
|
|
1548
1894
|
] }, index);
|
|
1549
1895
|
}
|
|
1550
|
-
return /* @__PURE__ */ (0,
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: finalClasses, style: { backgroundColor: "transparent", border: "none", ...tab.style }, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
1551
1897
|
}) });
|
|
1552
1898
|
};
|
|
1553
1899
|
var Tabs_default = Tabs;
|
|
1554
1900
|
|
|
1555
1901
|
// src/components/Navigation/Stages/Stages.tsx
|
|
1556
1902
|
var import_react6 = __toESM(require("react"));
|
|
1557
|
-
var
|
|
1903
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1558
1904
|
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
1559
|
-
return /* @__PURE__ */ (0,
|
|
1560
|
-
/* @__PURE__ */ (0,
|
|
1561
|
-
/* @__PURE__ */ (0,
|
|
1562
|
-
/* @__PURE__ */ (0,
|
|
1905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between bg-gray-50 p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
1906
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
1907
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center flex-1 px-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react6.default.Fragment, { children: [
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1563
1909
|
"button",
|
|
1564
1910
|
{
|
|
1565
1911
|
className: `
|
|
@@ -1567,26 +1913,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
|
1567
1913
|
children: stage.header
|
|
1568
1914
|
}
|
|
1569
1915
|
),
|
|
1570
|
-
index < stages.length - 1 && /* @__PURE__ */ (0,
|
|
1916
|
+
index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
1571
1917
|
] }, stage.id)) }),
|
|
1572
|
-
isShowBtn && /* @__PURE__ */ (0,
|
|
1918
|
+
isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm", children: buttonText }) })
|
|
1573
1919
|
] }) });
|
|
1574
1920
|
};
|
|
1575
1921
|
var Stages_default = StagesComponent;
|
|
1576
1922
|
|
|
1577
1923
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
1578
|
-
var
|
|
1924
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1579
1925
|
var Spacer = ({ className, style }) => {
|
|
1580
|
-
return /* @__PURE__ */ (0,
|
|
1926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: `${className}`, style });
|
|
1581
1927
|
};
|
|
1582
1928
|
var Spacer_default = Spacer;
|
|
1583
1929
|
|
|
1584
1930
|
// src/components/Navigation/Profile/Profile.tsx
|
|
1585
|
-
var
|
|
1931
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1586
1932
|
var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
1587
|
-
return /* @__PURE__ */ (0,
|
|
1588
|
-
showName && /* @__PURE__ */ (0,
|
|
1589
|
-
profileType === "avatar" ? /* @__PURE__ */ (0,
|
|
1933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
|
|
1934
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h4", { className: "text-[#000000] dark:text-[#fff] text-[13px] font-[500] mb-0", children: userName }),
|
|
1935
|
+
profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1590
1936
|
"img",
|
|
1591
1937
|
{
|
|
1592
1938
|
src: "https://builder.development.algorithmshift.ai/images/toolset/profile.svg",
|
|
@@ -1594,16 +1940,16 @@ var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
|
1594
1940
|
width: 24,
|
|
1595
1941
|
height: 24
|
|
1596
1942
|
}
|
|
1597
|
-
) : /* @__PURE__ */ (0,
|
|
1943
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-6 h-6 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: "A" })
|
|
1598
1944
|
] }) });
|
|
1599
1945
|
};
|
|
1600
1946
|
var Profile_default = Profile;
|
|
1601
1947
|
|
|
1602
1948
|
// src/components/Navigation/Notification/Notification.tsx
|
|
1603
|
-
var
|
|
1604
|
-
var Notification = ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }) => {
|
|
1605
|
-
return /* @__PURE__ */ (0,
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1949
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1950
|
+
var Notification = ({ className, style, badgeType, badgeCount = 0, hideBadgeWhenZero }) => {
|
|
1951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "w-[34px] h-[34px] bg-[#E9E9E9] rounded-md text-center flex items-center justify-center relative", children: [
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1607
1953
|
"img",
|
|
1608
1954
|
{
|
|
1609
1955
|
src: "https://builder.development.algorithmshift.ai/images/toolset/notification.svg",
|
|
@@ -1612,14 +1958,14 @@ var Notification = ({ className, style, badgeType, badgeCount, hideBadgeWhenZero
|
|
|
1612
1958
|
height: 18
|
|
1613
1959
|
}
|
|
1614
1960
|
),
|
|
1615
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0,
|
|
1961
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-[10px] text-[#fff] bg-[#FF4A4A] w-[20px] h-[20px] rounded-full absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 leading-[20px]", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "bg-[#FF4A4A] w-[10px] h-[10px] rounded-full absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 leading-[20px]" })
|
|
1616
1962
|
] }) });
|
|
1617
1963
|
};
|
|
1618
1964
|
var Notification_default = Notification;
|
|
1619
1965
|
|
|
1620
1966
|
// src/components/Navigation/Logo/Logo.tsx
|
|
1621
|
-
var
|
|
1622
|
-
var
|
|
1967
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1968
|
+
var ImageControl2 = ({
|
|
1623
1969
|
className,
|
|
1624
1970
|
style,
|
|
1625
1971
|
imageUrl
|
|
@@ -1639,25 +1985,32 @@ var ImageControl = ({
|
|
|
1639
1985
|
className: "opacity-50"
|
|
1640
1986
|
};
|
|
1641
1987
|
}
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
1988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src, alt: "Preview", sizes: "100vw", ...extraProps }) });
|
|
1643
1989
|
};
|
|
1644
|
-
var Logo_default =
|
|
1990
|
+
var Logo_default = ImageControl2;
|
|
1645
1991
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1646
1992
|
0 && (module.exports = {
|
|
1647
1993
|
Button,
|
|
1648
1994
|
CheckboxInput,
|
|
1995
|
+
DatePicker,
|
|
1649
1996
|
DateRange,
|
|
1650
1997
|
Dropdown,
|
|
1651
1998
|
EmailInput,
|
|
1999
|
+
FileInput,
|
|
1652
2000
|
FlexLayout,
|
|
1653
2001
|
GridLayout,
|
|
2002
|
+
Image,
|
|
1654
2003
|
Logo,
|
|
1655
2004
|
MultiCheckbox,
|
|
1656
2005
|
Notification,
|
|
2006
|
+
NumberInput,
|
|
1657
2007
|
PasswordInput,
|
|
1658
2008
|
PhoneInput,
|
|
1659
2009
|
Profile,
|
|
1660
2010
|
RadioInput,
|
|
2011
|
+
RichText,
|
|
2012
|
+
SearchInput,
|
|
2013
|
+
Shape,
|
|
1661
2014
|
Spacer,
|
|
1662
2015
|
Stages,
|
|
1663
2016
|
SwitchToggle,
|
|
@@ -1676,6 +2029,8 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
|
1676
2029
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
1677
2030
|
lucide-react/dist/esm/Icon.js:
|
|
1678
2031
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
2032
|
+
lucide-react/dist/esm/icons/calculator.js:
|
|
2033
|
+
lucide-react/dist/esm/icons/calendar.js:
|
|
1679
2034
|
lucide-react/dist/esm/icons/check.js:
|
|
1680
2035
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
1681
2036
|
lucide-react/dist/esm/icons/chevron-left.js:
|
|
@@ -1684,6 +2039,7 @@ lucide-react/dist/esm/icons/chevron-up.js:
|
|
|
1684
2039
|
lucide-react/dist/esm/icons/circle.js:
|
|
1685
2040
|
lucide-react/dist/esm/icons/mail.js:
|
|
1686
2041
|
lucide-react/dist/esm/icons/scan-eye.js:
|
|
2042
|
+
lucide-react/dist/esm/icons/search.js:
|
|
1687
2043
|
lucide-react/dist/esm/lucide-react.js:
|
|
1688
2044
|
(**
|
|
1689
2045
|
* @license lucide-react v0.542.0 - ISC
|