@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.mjs
CHANGED
|
@@ -104,14 +104,64 @@ var Typography_default = Typography;
|
|
|
104
104
|
|
|
105
105
|
// src/components/Basic/Shape/Shape.tsx
|
|
106
106
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
107
|
+
var Shape = ({
|
|
108
|
+
children,
|
|
109
|
+
className,
|
|
110
|
+
style
|
|
111
|
+
}) => {
|
|
112
|
+
return /* @__PURE__ */ jsx4("div", { className, style, children });
|
|
113
|
+
};
|
|
114
|
+
var Shape_default = Shape;
|
|
115
|
+
|
|
116
|
+
// src/components/Basic/Image/Image.tsx
|
|
117
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
118
|
+
var ImageControl = ({
|
|
119
|
+
className,
|
|
120
|
+
style,
|
|
121
|
+
imageUrl,
|
|
122
|
+
imageUrlExternal,
|
|
123
|
+
altText = "Preview"
|
|
124
|
+
}) => {
|
|
125
|
+
const imageClass = cn(
|
|
126
|
+
"h-[200px] w-[200px] border-1",
|
|
127
|
+
"border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition",
|
|
128
|
+
className
|
|
129
|
+
);
|
|
130
|
+
const defaultImgClass = cn(
|
|
131
|
+
"w-full h-full",
|
|
132
|
+
className
|
|
133
|
+
);
|
|
134
|
+
let src;
|
|
135
|
+
let extraProps;
|
|
136
|
+
if (imageUrlExternal) {
|
|
137
|
+
src = imageUrlExternal;
|
|
138
|
+
extraProps = {
|
|
139
|
+
className: defaultImgClass
|
|
140
|
+
};
|
|
141
|
+
} else if (imageUrl) {
|
|
142
|
+
src = imageUrl;
|
|
143
|
+
extraProps = {
|
|
144
|
+
className: defaultImgClass
|
|
145
|
+
};
|
|
146
|
+
} else {
|
|
147
|
+
src = "./image-placeholder.png";
|
|
148
|
+
extraProps = {
|
|
149
|
+
width: 50,
|
|
150
|
+
height: 50,
|
|
151
|
+
className: "opacity-50"
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
return /* @__PURE__ */ jsx5("div", { className: imageClass, style, children: /* @__PURE__ */ jsx5("img", { src, alt: altText }) });
|
|
155
|
+
};
|
|
156
|
+
var Image_default = ImageControl;
|
|
107
157
|
|
|
108
158
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
109
159
|
import * as React2 from "react";
|
|
110
160
|
|
|
111
161
|
// src/components/ui/input.tsx
|
|
112
|
-
import { jsx as
|
|
162
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
113
163
|
function Input({ className, type, ...props }) {
|
|
114
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ jsx6(
|
|
115
165
|
"input",
|
|
116
166
|
{
|
|
117
167
|
type,
|
|
@@ -128,7 +178,7 @@ function Input({ className, type, ...props }) {
|
|
|
128
178
|
}
|
|
129
179
|
|
|
130
180
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
131
|
-
import { Fragment, jsx as
|
|
181
|
+
import { Fragment, jsx as jsx7, jsxs } from "react/jsx-runtime";
|
|
132
182
|
var TextInput = ({ className, style, ...props }) => {
|
|
133
183
|
const placeholder = props.placeholder || "Placeholder text";
|
|
134
184
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -154,7 +204,7 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
154
204
|
}
|
|
155
205
|
};
|
|
156
206
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
157
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ jsx7(
|
|
158
208
|
Input,
|
|
159
209
|
{
|
|
160
210
|
type: "text",
|
|
@@ -171,11 +221,11 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
171
221
|
pattern: regexPattern || void 0
|
|
172
222
|
}
|
|
173
223
|
),
|
|
174
|
-
error && /* @__PURE__ */
|
|
224
|
+
error && /* @__PURE__ */ jsx7("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
175
225
|
] });
|
|
176
226
|
};
|
|
177
227
|
|
|
178
|
-
// src/components/Inputs/
|
|
228
|
+
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
179
229
|
import * as React3 from "react";
|
|
180
230
|
|
|
181
231
|
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
@@ -267,39 +317,63 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
|
267
317
|
return Component;
|
|
268
318
|
};
|
|
269
319
|
|
|
320
|
+
// node_modules/lucide-react/dist/esm/icons/calculator.js
|
|
321
|
+
var __iconNode = [
|
|
322
|
+
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
|
|
323
|
+
["line", { x1: "8", x2: "16", y1: "6", y2: "6", key: "x4nwl0" }],
|
|
324
|
+
["line", { x1: "16", x2: "16", y1: "14", y2: "18", key: "wjye3r" }],
|
|
325
|
+
["path", { d: "M16 10h.01", key: "1m94wz" }],
|
|
326
|
+
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
327
|
+
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
328
|
+
["path", { d: "M12 14h.01", key: "1etili" }],
|
|
329
|
+
["path", { d: "M8 14h.01", key: "6423bh" }],
|
|
330
|
+
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
331
|
+
["path", { d: "M8 18h.01", key: "lrp35t" }]
|
|
332
|
+
];
|
|
333
|
+
var Calculator = createLucideIcon("calculator", __iconNode);
|
|
334
|
+
|
|
335
|
+
// node_modules/lucide-react/dist/esm/icons/calendar.js
|
|
336
|
+
var __iconNode2 = [
|
|
337
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
338
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
339
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
340
|
+
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
341
|
+
];
|
|
342
|
+
var Calendar = createLucideIcon("calendar", __iconNode2);
|
|
343
|
+
|
|
270
344
|
// node_modules/lucide-react/dist/esm/icons/check.js
|
|
271
|
-
var
|
|
272
|
-
var Check = createLucideIcon("check",
|
|
345
|
+
var __iconNode3 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
346
|
+
var Check = createLucideIcon("check", __iconNode3);
|
|
273
347
|
|
|
274
348
|
// node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
275
|
-
var
|
|
276
|
-
var ChevronDown = createLucideIcon("chevron-down",
|
|
349
|
+
var __iconNode4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
350
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode4);
|
|
277
351
|
|
|
278
352
|
// node_modules/lucide-react/dist/esm/icons/chevron-left.js
|
|
279
|
-
var
|
|
280
|
-
var ChevronLeft = createLucideIcon("chevron-left",
|
|
353
|
+
var __iconNode5 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
354
|
+
var ChevronLeft = createLucideIcon("chevron-left", __iconNode5);
|
|
281
355
|
|
|
282
356
|
// node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
283
|
-
var
|
|
284
|
-
var ChevronRight = createLucideIcon("chevron-right",
|
|
357
|
+
var __iconNode6 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
358
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode6);
|
|
285
359
|
|
|
286
360
|
// node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
287
|
-
var
|
|
288
|
-
var ChevronUp = createLucideIcon("chevron-up",
|
|
361
|
+
var __iconNode7 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
362
|
+
var ChevronUp = createLucideIcon("chevron-up", __iconNode7);
|
|
289
363
|
|
|
290
364
|
// node_modules/lucide-react/dist/esm/icons/circle.js
|
|
291
|
-
var
|
|
292
|
-
var Circle = createLucideIcon("circle",
|
|
365
|
+
var __iconNode8 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
366
|
+
var Circle = createLucideIcon("circle", __iconNode8);
|
|
293
367
|
|
|
294
368
|
// node_modules/lucide-react/dist/esm/icons/mail.js
|
|
295
|
-
var
|
|
369
|
+
var __iconNode9 = [
|
|
296
370
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
297
371
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
298
372
|
];
|
|
299
|
-
var Mail = createLucideIcon("mail",
|
|
373
|
+
var Mail = createLucideIcon("mail", __iconNode9);
|
|
300
374
|
|
|
301
375
|
// node_modules/lucide-react/dist/esm/icons/scan-eye.js
|
|
302
|
-
var
|
|
376
|
+
var __iconNode10 = [
|
|
303
377
|
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
|
|
304
378
|
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
|
|
305
379
|
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
|
|
@@ -313,11 +387,18 @@ var __iconNode8 = [
|
|
|
313
387
|
}
|
|
314
388
|
]
|
|
315
389
|
];
|
|
316
|
-
var ScanEye = createLucideIcon("scan-eye",
|
|
390
|
+
var ScanEye = createLucideIcon("scan-eye", __iconNode10);
|
|
317
391
|
|
|
318
|
-
//
|
|
319
|
-
|
|
320
|
-
|
|
392
|
+
// node_modules/lucide-react/dist/esm/icons/search.js
|
|
393
|
+
var __iconNode11 = [
|
|
394
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
395
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
396
|
+
];
|
|
397
|
+
var Search = createLucideIcon("search", __iconNode11);
|
|
398
|
+
|
|
399
|
+
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
400
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
401
|
+
var NumberInput = ({ className, style, ...props }) => {
|
|
321
402
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
322
403
|
const regexPattern = props.regexPattern ?? "";
|
|
323
404
|
const errorMessage = props.errorMessage ?? "Required";
|
|
@@ -343,11 +424,12 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
343
424
|
};
|
|
344
425
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
345
426
|
/* @__PURE__ */ jsxs2("div", { className: "flex justify-start items-center relative", children: [
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ jsx8(Calculator, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
428
|
+
/* @__PURE__ */ jsx8(
|
|
348
429
|
Input,
|
|
349
430
|
{
|
|
350
|
-
type: "
|
|
431
|
+
type: "number",
|
|
432
|
+
id: "number-field",
|
|
351
433
|
value,
|
|
352
434
|
className,
|
|
353
435
|
style,
|
|
@@ -362,14 +444,14 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
362
444
|
}
|
|
363
445
|
)
|
|
364
446
|
] }),
|
|
365
|
-
error && /* @__PURE__ */
|
|
447
|
+
error && /* @__PURE__ */ jsx8("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
366
448
|
] });
|
|
367
449
|
};
|
|
368
450
|
|
|
369
|
-
// src/components/Inputs/
|
|
451
|
+
// src/components/Inputs/EmailInput/EmailInput.tsx
|
|
370
452
|
import * as React4 from "react";
|
|
371
|
-
import { Fragment as Fragment3, jsx as
|
|
372
|
-
var
|
|
453
|
+
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
454
|
+
var EmailInput = ({ className, style, ...props }) => {
|
|
373
455
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
374
456
|
const regexPattern = props.regexPattern ?? "";
|
|
375
457
|
const errorMessage = props.errorMessage ?? "Required";
|
|
@@ -395,8 +477,60 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
395
477
|
};
|
|
396
478
|
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
397
479
|
/* @__PURE__ */ jsxs3("div", { className: "flex justify-start items-center relative", children: [
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ jsx9(Mail, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
481
|
+
/* @__PURE__ */ jsx9(
|
|
482
|
+
Input,
|
|
483
|
+
{
|
|
484
|
+
type: "email",
|
|
485
|
+
value,
|
|
486
|
+
className,
|
|
487
|
+
style,
|
|
488
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
489
|
+
placeholder,
|
|
490
|
+
onChange: handleChange,
|
|
491
|
+
disabled: isDisabled || !isEditable,
|
|
492
|
+
readOnly: isReadonly,
|
|
493
|
+
required: isRequired,
|
|
494
|
+
maxLength: noOfCharacters,
|
|
495
|
+
pattern: regexPattern || void 0
|
|
496
|
+
}
|
|
497
|
+
)
|
|
498
|
+
] }),
|
|
499
|
+
error && /* @__PURE__ */ jsx9("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
500
|
+
] });
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
// src/components/Inputs/PasswordInput/PasswordInput.tsx
|
|
504
|
+
import * as React5 from "react";
|
|
505
|
+
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
506
|
+
var PasswordInput = ({ className, style, ...props }) => {
|
|
507
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
508
|
+
const regexPattern = props.regexPattern ?? "";
|
|
509
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
510
|
+
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
511
|
+
const isRequired = props.isRequired ?? false;
|
|
512
|
+
const isEditable = props.isEditable ?? true;
|
|
513
|
+
const isDisabled = props.isDisabled ?? false;
|
|
514
|
+
const isReadonly = props.isReadonly ?? false;
|
|
515
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
516
|
+
const [value, setValue] = React5.useState("");
|
|
517
|
+
const [error, setError] = React5.useState(null);
|
|
518
|
+
const handleChange = (e) => {
|
|
519
|
+
const val = e.target.value;
|
|
520
|
+
if (val.length > noOfCharacters) return;
|
|
521
|
+
setValue(val);
|
|
522
|
+
if (isRequired && val.trim() === "") {
|
|
523
|
+
setError(errorMessage);
|
|
524
|
+
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
525
|
+
setError(errorMessage);
|
|
526
|
+
} else {
|
|
527
|
+
setError(null);
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
531
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex justify-start items-center relative", children: [
|
|
532
|
+
/* @__PURE__ */ jsx10(ScanEye, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
533
|
+
/* @__PURE__ */ jsx10(
|
|
400
534
|
Input,
|
|
401
535
|
{
|
|
402
536
|
type: "password",
|
|
@@ -415,17 +549,17 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
415
549
|
}
|
|
416
550
|
)
|
|
417
551
|
] }),
|
|
418
|
-
error && /* @__PURE__ */
|
|
552
|
+
error && /* @__PURE__ */ jsx10("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
419
553
|
] });
|
|
420
554
|
};
|
|
421
555
|
|
|
422
556
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
423
|
-
import * as
|
|
557
|
+
import * as React6 from "react";
|
|
424
558
|
|
|
425
559
|
// src/components/ui/textarea.tsx
|
|
426
|
-
import { jsx as
|
|
560
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
427
561
|
function Textarea({ className, ...props }) {
|
|
428
|
-
return /* @__PURE__ */
|
|
562
|
+
return /* @__PURE__ */ jsx11(
|
|
429
563
|
"textarea",
|
|
430
564
|
{
|
|
431
565
|
"data-slot": "textarea",
|
|
@@ -439,7 +573,7 @@ function Textarea({ className, ...props }) {
|
|
|
439
573
|
}
|
|
440
574
|
|
|
441
575
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
442
|
-
import { Fragment as
|
|
576
|
+
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
443
577
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
444
578
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
445
579
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -450,8 +584,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
450
584
|
const isDisabled = props.isDisabled ?? false;
|
|
451
585
|
const isReadonly = props.isReadonly ?? false;
|
|
452
586
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
453
|
-
const [value, setValue] =
|
|
454
|
-
const [error, setError] =
|
|
587
|
+
const [value, setValue] = React6.useState("");
|
|
588
|
+
const [error, setError] = React6.useState(null);
|
|
455
589
|
const handleChange = (e) => {
|
|
456
590
|
const val = e.target.value;
|
|
457
591
|
if (val.length > noOfCharacters) return;
|
|
@@ -464,8 +598,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
464
598
|
setError(null);
|
|
465
599
|
}
|
|
466
600
|
};
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
/* @__PURE__ */
|
|
601
|
+
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
602
|
+
/* @__PURE__ */ jsx12(
|
|
469
603
|
Textarea,
|
|
470
604
|
{
|
|
471
605
|
id: "textarea-field",
|
|
@@ -481,13 +615,13 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
481
615
|
maxLength: noOfCharacters
|
|
482
616
|
}
|
|
483
617
|
),
|
|
484
|
-
error && /* @__PURE__ */
|
|
618
|
+
error && /* @__PURE__ */ jsx12("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
485
619
|
] });
|
|
486
620
|
};
|
|
487
621
|
|
|
488
622
|
// src/components/Inputs/UrlInput/UrlInput.tsx
|
|
489
|
-
import * as
|
|
490
|
-
import { Fragment as
|
|
623
|
+
import * as React7 from "react";
|
|
624
|
+
import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
491
625
|
var UrlInput = ({ className, style, ...props }) => {
|
|
492
626
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
493
627
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -498,8 +632,8 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
498
632
|
const isDisabled = props.isDisabled ?? false;
|
|
499
633
|
const isReadonly = props.isReadonly ?? false;
|
|
500
634
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
501
|
-
const [value, setValue] =
|
|
502
|
-
const [error, setError] =
|
|
635
|
+
const [value, setValue] = React7.useState("");
|
|
636
|
+
const [error, setError] = React7.useState(null);
|
|
503
637
|
const handleChange = (e) => {
|
|
504
638
|
const val = e.target.value;
|
|
505
639
|
if (val.length > noOfCharacters) return;
|
|
@@ -512,10 +646,10 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
512
646
|
setError(null);
|
|
513
647
|
}
|
|
514
648
|
};
|
|
515
|
-
return /* @__PURE__ */
|
|
516
|
-
/* @__PURE__ */
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
/* @__PURE__ */
|
|
649
|
+
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
650
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex justify-start items-center relative", children: [
|
|
651
|
+
/* @__PURE__ */ jsx13("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://" }),
|
|
652
|
+
/* @__PURE__ */ jsx13(
|
|
519
653
|
Input,
|
|
520
654
|
{
|
|
521
655
|
type: "url",
|
|
@@ -534,18 +668,18 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
534
668
|
}
|
|
535
669
|
)
|
|
536
670
|
] }),
|
|
537
|
-
error && /* @__PURE__ */
|
|
671
|
+
error && /* @__PURE__ */ jsx13("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
538
672
|
] });
|
|
539
673
|
};
|
|
540
674
|
|
|
541
675
|
// src/components/ui/checkbox.tsx
|
|
542
676
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
543
|
-
import { jsx as
|
|
677
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
544
678
|
function Checkbox({
|
|
545
679
|
className,
|
|
546
680
|
...props
|
|
547
681
|
}) {
|
|
548
|
-
return /* @__PURE__ */
|
|
682
|
+
return /* @__PURE__ */ jsx14(
|
|
549
683
|
CheckboxPrimitive.Root,
|
|
550
684
|
{
|
|
551
685
|
"data-slot": "checkbox",
|
|
@@ -554,12 +688,12 @@ function Checkbox({
|
|
|
554
688
|
className
|
|
555
689
|
),
|
|
556
690
|
...props,
|
|
557
|
-
children: /* @__PURE__ */
|
|
691
|
+
children: /* @__PURE__ */ jsx14(
|
|
558
692
|
CheckboxPrimitive.Indicator,
|
|
559
693
|
{
|
|
560
694
|
"data-slot": "checkbox-indicator",
|
|
561
695
|
className: "flex items-center justify-center text-current transition-none",
|
|
562
|
-
children: /* @__PURE__ */
|
|
696
|
+
children: /* @__PURE__ */ jsx14(Check, { className: "size-3.5" })
|
|
563
697
|
}
|
|
564
698
|
)
|
|
565
699
|
}
|
|
@@ -568,12 +702,12 @@ function Checkbox({
|
|
|
568
702
|
|
|
569
703
|
// src/components/ui/label.tsx
|
|
570
704
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
571
|
-
import { jsx as
|
|
705
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
572
706
|
function Label({
|
|
573
707
|
className,
|
|
574
708
|
...props
|
|
575
709
|
}) {
|
|
576
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ jsx15(
|
|
577
711
|
LabelPrimitive.Root,
|
|
578
712
|
{
|
|
579
713
|
"data-slot": "label",
|
|
@@ -587,23 +721,23 @@ function Label({
|
|
|
587
721
|
}
|
|
588
722
|
|
|
589
723
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
590
|
-
import { jsx as
|
|
724
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
591
725
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
592
726
|
const text = props.text ? props.text : "Subscribe";
|
|
593
|
-
return /* @__PURE__ */
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ jsx16("div", { className, style, children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center space-x-2", children: [
|
|
728
|
+
/* @__PURE__ */ jsx16(Checkbox, { id: "newsletter" }),
|
|
729
|
+
/* @__PURE__ */ jsx16(Label, { htmlFor: "newsletter", children: text })
|
|
596
730
|
] }) });
|
|
597
731
|
};
|
|
598
732
|
|
|
599
733
|
// src/components/ui/radio-group.tsx
|
|
600
734
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
601
|
-
import { jsx as
|
|
735
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
602
736
|
function RadioGroup({
|
|
603
737
|
className,
|
|
604
738
|
...props
|
|
605
739
|
}) {
|
|
606
|
-
return /* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ jsx17(
|
|
607
741
|
RadioGroupPrimitive.Root,
|
|
608
742
|
{
|
|
609
743
|
"data-slot": "radio-group",
|
|
@@ -616,7 +750,7 @@ function RadioGroupItem({
|
|
|
616
750
|
className,
|
|
617
751
|
...props
|
|
618
752
|
}) {
|
|
619
|
-
return /* @__PURE__ */
|
|
753
|
+
return /* @__PURE__ */ jsx17(
|
|
620
754
|
RadioGroupPrimitive.Item,
|
|
621
755
|
{
|
|
622
756
|
"data-slot": "radio-group-item",
|
|
@@ -625,12 +759,12 @@ function RadioGroupItem({
|
|
|
625
759
|
className
|
|
626
760
|
),
|
|
627
761
|
...props,
|
|
628
|
-
children: /* @__PURE__ */
|
|
762
|
+
children: /* @__PURE__ */ jsx17(
|
|
629
763
|
RadioGroupPrimitive.Indicator,
|
|
630
764
|
{
|
|
631
765
|
"data-slot": "radio-group-indicator",
|
|
632
766
|
className: "relative flex items-center justify-center",
|
|
633
|
-
children: /* @__PURE__ */
|
|
767
|
+
children: /* @__PURE__ */ jsx17(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
634
768
|
}
|
|
635
769
|
)
|
|
636
770
|
}
|
|
@@ -638,48 +772,117 @@ function RadioGroupItem({
|
|
|
638
772
|
}
|
|
639
773
|
|
|
640
774
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
641
|
-
import { jsx as
|
|
775
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
642
776
|
var RadioInput = ({ className, style, ...props }) => {
|
|
643
777
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
644
|
-
return /* @__PURE__ */
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
778
|
+
return /* @__PURE__ */ jsx18("div", { className, style, children: /* @__PURE__ */ jsx18(RadioGroup, { defaultValue: "option-1", children: text?.map((item, index) => /* @__PURE__ */ jsxs8("div", { className: "flex items-center space-x-2", children: [
|
|
779
|
+
/* @__PURE__ */ jsx18(RadioGroupItem, { value: item, id: `r${index}` }),
|
|
780
|
+
/* @__PURE__ */ jsx18(Label, { htmlFor: `r${index}`, children: item })
|
|
647
781
|
] }, index)) }) });
|
|
648
782
|
};
|
|
649
783
|
|
|
650
784
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
651
|
-
import { jsx as
|
|
785
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
652
786
|
var MultiCheckbox = ({ className, style, ...props }) => {
|
|
653
787
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
654
|
-
return /* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */
|
|
656
|
-
/* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ jsx19("div", { className, style, children: /* @__PURE__ */ jsx19("div", { className: "flex gap-3 flex-col", children: text?.map((item, index) => /* @__PURE__ */ jsxs9("div", { className: "flex items-center space-x-2", children: [
|
|
789
|
+
/* @__PURE__ */ jsx19(Checkbox, { id: `newsletter-${index}` }),
|
|
790
|
+
/* @__PURE__ */ jsx19(Label, { htmlFor: `newsletter-${index}`, children: item })
|
|
657
791
|
] }, index)) }) });
|
|
658
792
|
};
|
|
659
793
|
|
|
660
794
|
// src/components/Global/TinyMceEditor.tsx
|
|
661
795
|
import { useMemo, useRef } from "react";
|
|
662
796
|
import { Editor } from "@tinymce/tinymce-react";
|
|
663
|
-
import { jsx as
|
|
797
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
798
|
+
function MyEditor({
|
|
799
|
+
value,
|
|
800
|
+
onChange,
|
|
801
|
+
isDefault
|
|
802
|
+
}) {
|
|
803
|
+
const editorRef = useRef(null);
|
|
804
|
+
function stripOuterP(html) {
|
|
805
|
+
const trimmedHtml = html.trim();
|
|
806
|
+
if (!trimmedHtml) return "";
|
|
807
|
+
const div = document.createElement("div");
|
|
808
|
+
div.innerHTML = trimmedHtml;
|
|
809
|
+
const firstChild = div.firstElementChild;
|
|
810
|
+
if (div.childElementCount === 1 && firstChild?.tagName === "P") {
|
|
811
|
+
return firstChild.innerHTML;
|
|
812
|
+
}
|
|
813
|
+
return trimmedHtml;
|
|
814
|
+
}
|
|
815
|
+
const isDefaultToolbar = useMemo(() => {
|
|
816
|
+
let toolbar = "undo redo | formatselect | bold italic forecolor";
|
|
817
|
+
if (isDefault) {
|
|
818
|
+
toolbar = "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help";
|
|
819
|
+
}
|
|
820
|
+
return toolbar;
|
|
821
|
+
}, [isDefault]);
|
|
822
|
+
return /* @__PURE__ */ jsx20(
|
|
823
|
+
Editor,
|
|
824
|
+
{
|
|
825
|
+
apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
|
|
826
|
+
tinymceScriptSrc: process.env.NEXT_PUBLIC_TINYMCE_SCRIPT_SRC,
|
|
827
|
+
onInit: (_evt, editor) => editorRef.current = editor,
|
|
828
|
+
value,
|
|
829
|
+
licenseKey: "gpl",
|
|
830
|
+
init: {
|
|
831
|
+
height: 300,
|
|
832
|
+
menubar: false,
|
|
833
|
+
forced_root_block: false,
|
|
834
|
+
plugins: [
|
|
835
|
+
"advlist",
|
|
836
|
+
"autolink",
|
|
837
|
+
"lists",
|
|
838
|
+
"link",
|
|
839
|
+
"image",
|
|
840
|
+
"charmap",
|
|
841
|
+
"preview",
|
|
842
|
+
"anchor",
|
|
843
|
+
"searchreplace",
|
|
844
|
+
"visualblocks",
|
|
845
|
+
"code",
|
|
846
|
+
"fullscreen",
|
|
847
|
+
"insertdatetime",
|
|
848
|
+
"media",
|
|
849
|
+
"table",
|
|
850
|
+
"help",
|
|
851
|
+
"wordcount"
|
|
852
|
+
],
|
|
853
|
+
toolbar: isDefaultToolbar,
|
|
854
|
+
content_style: `
|
|
855
|
+
body {
|
|
856
|
+
outline: none;
|
|
857
|
+
}
|
|
858
|
+
`
|
|
859
|
+
},
|
|
860
|
+
onEditorChange: (content) => onChange?.(stripOuterP(content))
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
}
|
|
664
864
|
|
|
665
865
|
// src/components/Inputs/RichText/RichText.tsx
|
|
666
|
-
import { jsx as
|
|
866
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
867
|
+
function RichText({ className, style }) {
|
|
868
|
+
return /* @__PURE__ */ jsx21("div", { className, style, children: /* @__PURE__ */ jsx21(MyEditor, { isDefault: true }) });
|
|
869
|
+
}
|
|
667
870
|
|
|
668
871
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
669
|
-
import * as
|
|
872
|
+
import * as React8 from "react";
|
|
670
873
|
|
|
671
874
|
// src/components/ui/select.tsx
|
|
672
875
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
673
|
-
import { jsx as
|
|
876
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
674
877
|
function Select({
|
|
675
878
|
...props
|
|
676
879
|
}) {
|
|
677
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ jsx22(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
678
881
|
}
|
|
679
882
|
function SelectValue({
|
|
680
883
|
...props
|
|
681
884
|
}) {
|
|
682
|
-
return /* @__PURE__ */
|
|
885
|
+
return /* @__PURE__ */ jsx22(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
683
886
|
}
|
|
684
887
|
function SelectTrigger({
|
|
685
888
|
className,
|
|
@@ -687,7 +890,7 @@ function SelectTrigger({
|
|
|
687
890
|
children,
|
|
688
891
|
...props
|
|
689
892
|
}) {
|
|
690
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ jsxs10(
|
|
691
894
|
SelectPrimitive.Trigger,
|
|
692
895
|
{
|
|
693
896
|
"data-slot": "select-trigger",
|
|
@@ -699,7 +902,7 @@ function SelectTrigger({
|
|
|
699
902
|
...props,
|
|
700
903
|
children: [
|
|
701
904
|
children,
|
|
702
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ jsx22(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx22(ChevronDown, { className: "size-4 opacity-50" }) })
|
|
703
906
|
]
|
|
704
907
|
}
|
|
705
908
|
);
|
|
@@ -710,7 +913,7 @@ function SelectContent({
|
|
|
710
913
|
position = "popper",
|
|
711
914
|
...props
|
|
712
915
|
}) {
|
|
713
|
-
return /* @__PURE__ */
|
|
916
|
+
return /* @__PURE__ */ jsx22(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs10(
|
|
714
917
|
SelectPrimitive.Content,
|
|
715
918
|
{
|
|
716
919
|
"data-slot": "select-content",
|
|
@@ -722,8 +925,8 @@ function SelectContent({
|
|
|
722
925
|
position,
|
|
723
926
|
...props,
|
|
724
927
|
children: [
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ jsx22(SelectScrollUpButton, {}),
|
|
929
|
+
/* @__PURE__ */ jsx22(
|
|
727
930
|
SelectPrimitive.Viewport,
|
|
728
931
|
{
|
|
729
932
|
className: cn(
|
|
@@ -733,7 +936,7 @@ function SelectContent({
|
|
|
733
936
|
children
|
|
734
937
|
}
|
|
735
938
|
),
|
|
736
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ jsx22(SelectScrollDownButton, {})
|
|
737
940
|
]
|
|
738
941
|
}
|
|
739
942
|
) });
|
|
@@ -743,7 +946,7 @@ function SelectItem({
|
|
|
743
946
|
children,
|
|
744
947
|
...props
|
|
745
948
|
}) {
|
|
746
|
-
return /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ jsxs10(
|
|
747
950
|
SelectPrimitive.Item,
|
|
748
951
|
{
|
|
749
952
|
"data-slot": "select-item",
|
|
@@ -753,8 +956,8 @@ function SelectItem({
|
|
|
753
956
|
),
|
|
754
957
|
...props,
|
|
755
958
|
children: [
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ jsx22("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx22(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx22(Check, { className: "size-4" }) }) }),
|
|
960
|
+
/* @__PURE__ */ jsx22(SelectPrimitive.ItemText, { children })
|
|
758
961
|
]
|
|
759
962
|
}
|
|
760
963
|
);
|
|
@@ -763,7 +966,7 @@ function SelectScrollUpButton({
|
|
|
763
966
|
className,
|
|
764
967
|
...props
|
|
765
968
|
}) {
|
|
766
|
-
return /* @__PURE__ */
|
|
969
|
+
return /* @__PURE__ */ jsx22(
|
|
767
970
|
SelectPrimitive.ScrollUpButton,
|
|
768
971
|
{
|
|
769
972
|
"data-slot": "select-scroll-up-button",
|
|
@@ -772,7 +975,7 @@ function SelectScrollUpButton({
|
|
|
772
975
|
className
|
|
773
976
|
),
|
|
774
977
|
...props,
|
|
775
|
-
children: /* @__PURE__ */
|
|
978
|
+
children: /* @__PURE__ */ jsx22(ChevronUp, { className: "size-4" })
|
|
776
979
|
}
|
|
777
980
|
);
|
|
778
981
|
}
|
|
@@ -780,7 +983,7 @@ function SelectScrollDownButton({
|
|
|
780
983
|
className,
|
|
781
984
|
...props
|
|
782
985
|
}) {
|
|
783
|
-
return /* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ jsx22(
|
|
784
987
|
SelectPrimitive.ScrollDownButton,
|
|
785
988
|
{
|
|
786
989
|
"data-slot": "select-scroll-down-button",
|
|
@@ -789,13 +992,13 @@ function SelectScrollDownButton({
|
|
|
789
992
|
className
|
|
790
993
|
),
|
|
791
994
|
...props,
|
|
792
|
-
children: /* @__PURE__ */
|
|
995
|
+
children: /* @__PURE__ */ jsx22(ChevronDown, { className: "size-4" })
|
|
793
996
|
}
|
|
794
997
|
);
|
|
795
998
|
}
|
|
796
999
|
|
|
797
1000
|
// src/components/Global/SelectDropdown.tsx
|
|
798
|
-
import { jsx as
|
|
1001
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
799
1002
|
function SelectDropdown({
|
|
800
1003
|
options,
|
|
801
1004
|
placeholder = "Select an option",
|
|
@@ -807,23 +1010,23 @@ function SelectDropdown({
|
|
|
807
1010
|
readOnly,
|
|
808
1011
|
style
|
|
809
1012
|
}) {
|
|
810
|
-
return /* @__PURE__ */
|
|
811
|
-
/* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsxs11(Select, { value, onValueChange: onChange, disabled, children: [
|
|
1014
|
+
/* @__PURE__ */ jsx23(
|
|
812
1015
|
SelectTrigger,
|
|
813
1016
|
{
|
|
814
1017
|
id,
|
|
815
1018
|
className,
|
|
816
1019
|
style: style ?? {},
|
|
817
1020
|
"aria-readonly": readOnly,
|
|
818
|
-
children: /* @__PURE__ */
|
|
1021
|
+
children: /* @__PURE__ */ jsx23(SelectValue, { placeholder })
|
|
819
1022
|
}
|
|
820
1023
|
),
|
|
821
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ jsx23(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsx23(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
822
1025
|
] });
|
|
823
1026
|
}
|
|
824
1027
|
|
|
825
1028
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
826
|
-
import { Fragment as
|
|
1029
|
+
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
827
1030
|
var Dropdown = ({ className, style, ...props }) => {
|
|
828
1031
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Default"];
|
|
829
1032
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
@@ -838,8 +1041,8 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
838
1041
|
const isDisabled = props.isDisabled ?? false;
|
|
839
1042
|
const isReadonly = props.isReadonly ?? false;
|
|
840
1043
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
841
|
-
const [value, setValue] =
|
|
842
|
-
const [error, setError] =
|
|
1044
|
+
const [value, setValue] = React8.useState("");
|
|
1045
|
+
const [error, setError] = React8.useState(null);
|
|
843
1046
|
const handleChange = (val) => {
|
|
844
1047
|
setValue(val);
|
|
845
1048
|
if (isRequired && val.trim() === "") {
|
|
@@ -850,8 +1053,8 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
850
1053
|
setError(null);
|
|
851
1054
|
}
|
|
852
1055
|
};
|
|
853
|
-
return /* @__PURE__ */
|
|
854
|
-
/* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
|
1057
|
+
/* @__PURE__ */ jsx24("div", { className: "flex gap-3 flex-col", children: /* @__PURE__ */ jsx24(
|
|
855
1058
|
SelectDropdown,
|
|
856
1059
|
{
|
|
857
1060
|
options: formatList,
|
|
@@ -868,18 +1071,18 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
868
1071
|
pattern: regexPattern || void 0
|
|
869
1072
|
}
|
|
870
1073
|
) }),
|
|
871
|
-
error && /* @__PURE__ */
|
|
1074
|
+
error && /* @__PURE__ */ jsx24("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
872
1075
|
] });
|
|
873
1076
|
};
|
|
874
1077
|
|
|
875
1078
|
// src/components/ui/switch.tsx
|
|
876
1079
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
877
|
-
import { jsx as
|
|
1080
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
878
1081
|
function Switch({
|
|
879
1082
|
className,
|
|
880
1083
|
...props
|
|
881
1084
|
}) {
|
|
882
|
-
return /* @__PURE__ */
|
|
1085
|
+
return /* @__PURE__ */ jsx25(
|
|
883
1086
|
SwitchPrimitive.Root,
|
|
884
1087
|
{
|
|
885
1088
|
"data-slot": "switch",
|
|
@@ -888,7 +1091,7 @@ function Switch({
|
|
|
888
1091
|
className
|
|
889
1092
|
),
|
|
890
1093
|
...props,
|
|
891
|
-
children: /* @__PURE__ */
|
|
1094
|
+
children: /* @__PURE__ */ jsx25(
|
|
892
1095
|
SwitchPrimitive.Thumb,
|
|
893
1096
|
{
|
|
894
1097
|
"data-slot": "switch-thumb",
|
|
@@ -902,30 +1105,30 @@ function Switch({
|
|
|
902
1105
|
}
|
|
903
1106
|
|
|
904
1107
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
905
|
-
import { jsx as
|
|
1108
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
906
1109
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
907
1110
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
908
|
-
return /* @__PURE__ */
|
|
909
|
-
/* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */
|
|
1111
|
+
return /* @__PURE__ */ jsx26("div", { className, style, children: text?.map((item, index) => /* @__PURE__ */ jsxs13("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
1112
|
+
/* @__PURE__ */ jsx26(Switch, { id: `switch-${index}` }),
|
|
1113
|
+
/* @__PURE__ */ jsx26(Label, { htmlFor: `switch-${index}`, children: item })
|
|
911
1114
|
] }, index)) });
|
|
912
1115
|
};
|
|
913
1116
|
|
|
914
1117
|
// src/components/Inputs/PhoneInput/PhoneInput.tsx
|
|
915
|
-
import * as
|
|
1118
|
+
import * as React9 from "react";
|
|
916
1119
|
import { PhoneInput as PhoneInputField } from "react-international-phone";
|
|
917
1120
|
import "react-international-phone/style.css";
|
|
918
|
-
import { Fragment as
|
|
1121
|
+
import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
919
1122
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
920
1123
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
921
|
-
const [value, setValue] =
|
|
1124
|
+
const [value, setValue] = React9.useState("");
|
|
922
1125
|
const regexPattern = props.regexPattern ?? "";
|
|
923
1126
|
const errorMessage = props.errorMessage ?? "Required";
|
|
924
1127
|
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
925
1128
|
const isRequired = props.isRequired ?? false;
|
|
926
1129
|
const isEditable = props.isEditable ?? true;
|
|
927
1130
|
const isDisabled = props.isDisabled ?? false;
|
|
928
|
-
const [error, setError] =
|
|
1131
|
+
const [error, setError] = React9.useState(null);
|
|
929
1132
|
const handleChange = (val) => {
|
|
930
1133
|
if (val.length > noOfCharacters) return;
|
|
931
1134
|
setValue(val);
|
|
@@ -937,8 +1140,8 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
937
1140
|
setError(null);
|
|
938
1141
|
}
|
|
939
1142
|
};
|
|
940
|
-
return /* @__PURE__ */
|
|
941
|
-
/* @__PURE__ */
|
|
1143
|
+
return /* @__PURE__ */ jsxs14(Fragment8, { children: [
|
|
1144
|
+
/* @__PURE__ */ jsx27(
|
|
942
1145
|
PhoneInputField,
|
|
943
1146
|
{
|
|
944
1147
|
defaultCountry: "in",
|
|
@@ -955,23 +1158,158 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
955
1158
|
style
|
|
956
1159
|
}
|
|
957
1160
|
),
|
|
958
|
-
error && /* @__PURE__ */
|
|
1161
|
+
error && /* @__PURE__ */ jsx27("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1162
|
+
] });
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
1166
|
+
import * as React10 from "react";
|
|
1167
|
+
import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1168
|
+
var SearchInput = ({ className, style, ...props }) => {
|
|
1169
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1170
|
+
const regexPattern = props.regexPattern ?? "";
|
|
1171
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
1172
|
+
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
1173
|
+
const isRequired = props.isRequired ?? false;
|
|
1174
|
+
const isEditable = props.isEditable ?? true;
|
|
1175
|
+
const isDisabled = props.isDisabled ?? false;
|
|
1176
|
+
const isReadonly = props.isReadonly ?? false;
|
|
1177
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1178
|
+
const [value, setValue] = React10.useState("");
|
|
1179
|
+
const [error, setError] = React10.useState(null);
|
|
1180
|
+
const handleChange = (e) => {
|
|
1181
|
+
const val = e.target.value;
|
|
1182
|
+
if (val.length > noOfCharacters) return;
|
|
1183
|
+
setValue(val);
|
|
1184
|
+
if (isRequired && val.trim() === "") {
|
|
1185
|
+
setError(errorMessage);
|
|
1186
|
+
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
1187
|
+
setError(errorMessage);
|
|
1188
|
+
} else {
|
|
1189
|
+
setError(null);
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
return /* @__PURE__ */ jsxs15(Fragment9, { children: [
|
|
1193
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex justify-start items-center relative", children: [
|
|
1194
|
+
/* @__PURE__ */ jsx28(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1195
|
+
/* @__PURE__ */ jsx28(
|
|
1196
|
+
Input,
|
|
1197
|
+
{
|
|
1198
|
+
type: "text",
|
|
1199
|
+
id: "text-field",
|
|
1200
|
+
className,
|
|
1201
|
+
style,
|
|
1202
|
+
value,
|
|
1203
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
1204
|
+
placeholder,
|
|
1205
|
+
onChange: handleChange,
|
|
1206
|
+
disabled: isDisabled || !isEditable,
|
|
1207
|
+
readOnly: isReadonly,
|
|
1208
|
+
required: isRequired,
|
|
1209
|
+
maxLength: noOfCharacters,
|
|
1210
|
+
pattern: regexPattern || void 0
|
|
1211
|
+
}
|
|
1212
|
+
)
|
|
1213
|
+
] }),
|
|
1214
|
+
error && /* @__PURE__ */ jsx28("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1215
|
+
] });
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
// src/components/Inputs/FileInput/FileInput.tsx
|
|
1219
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1220
|
+
var FileInput = ({ className, style, ...props }) => {
|
|
1221
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1222
|
+
return /* @__PURE__ */ jsxs16("div", { className: "d-flex items-center relative align-middle", children: [
|
|
1223
|
+
/* @__PURE__ */ jsx29("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" }),
|
|
1224
|
+
/* @__PURE__ */ jsx29(
|
|
1225
|
+
Input,
|
|
1226
|
+
{
|
|
1227
|
+
type: "file",
|
|
1228
|
+
id: "file",
|
|
1229
|
+
autoComplete: "off",
|
|
1230
|
+
placeholder,
|
|
1231
|
+
className,
|
|
1232
|
+
style
|
|
1233
|
+
}
|
|
1234
|
+
)
|
|
959
1235
|
] });
|
|
960
1236
|
};
|
|
961
1237
|
|
|
962
1238
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
963
|
-
import
|
|
964
|
-
import { Fragment as
|
|
1239
|
+
import React11 from "react";
|
|
1240
|
+
import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1241
|
+
function DatePicker({ className, style, ...props }) {
|
|
1242
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1243
|
+
const minimumDate = props.minimumDate ?? "none";
|
|
1244
|
+
const customMinimumDate = props.customMinimumDate ?? "";
|
|
1245
|
+
const maximumDate = props.maximumDate ?? "none";
|
|
1246
|
+
const customMaximumDate = props.customMaximumDate ?? "";
|
|
1247
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
1248
|
+
const isRequired = props.isRequired ?? false;
|
|
1249
|
+
const isEditable = props.isEditable ?? true;
|
|
1250
|
+
const isDisabled = props.isDisabled ?? false;
|
|
1251
|
+
const isReadonly = props.isReadonly ?? false;
|
|
1252
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1253
|
+
const [value, setValue] = React11.useState("");
|
|
1254
|
+
const [error, setError] = React11.useState(null);
|
|
1255
|
+
const resolveDate = (option, customOption) => {
|
|
1256
|
+
if (!option) return void 0;
|
|
1257
|
+
switch (option) {
|
|
1258
|
+
case "today":
|
|
1259
|
+
return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
1260
|
+
case "custom":
|
|
1261
|
+
return customOption ?? void 0;
|
|
1262
|
+
case "none":
|
|
1263
|
+
default:
|
|
1264
|
+
return void 0;
|
|
1265
|
+
}
|
|
1266
|
+
};
|
|
1267
|
+
const minDate = resolveDate(minimumDate, customMinimumDate);
|
|
1268
|
+
const maxDate = resolveDate(maximumDate, customMaximumDate);
|
|
1269
|
+
const handleChange = (e) => {
|
|
1270
|
+
const val = e.target.value;
|
|
1271
|
+
setValue(val);
|
|
1272
|
+
if (isRequired && val.trim() === "") {
|
|
1273
|
+
setError(errorMessage);
|
|
1274
|
+
} else {
|
|
1275
|
+
setError(null);
|
|
1276
|
+
}
|
|
1277
|
+
};
|
|
1278
|
+
return /* @__PURE__ */ jsxs17(Fragment10, { children: [
|
|
1279
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex justify-start items-center relative", children: [
|
|
1280
|
+
/* @__PURE__ */ jsx30(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1281
|
+
/* @__PURE__ */ jsx30(
|
|
1282
|
+
Input,
|
|
1283
|
+
{
|
|
1284
|
+
type: "date",
|
|
1285
|
+
id: "date",
|
|
1286
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
1287
|
+
onChange: handleChange,
|
|
1288
|
+
disabled: isDisabled || !isEditable,
|
|
1289
|
+
value,
|
|
1290
|
+
readOnly: isReadonly,
|
|
1291
|
+
required: isRequired,
|
|
1292
|
+
placeholder,
|
|
1293
|
+
min: minDate,
|
|
1294
|
+
max: maxDate,
|
|
1295
|
+
className,
|
|
1296
|
+
style
|
|
1297
|
+
}
|
|
1298
|
+
)
|
|
1299
|
+
] }),
|
|
1300
|
+
error && /* @__PURE__ */ jsx30("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1301
|
+
] });
|
|
1302
|
+
}
|
|
965
1303
|
|
|
966
1304
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
967
|
-
import * as
|
|
1305
|
+
import * as React13 from "react";
|
|
968
1306
|
import { addDays, format } from "date-fns";
|
|
969
1307
|
|
|
970
1308
|
// src/components/ui/calendar.tsx
|
|
971
|
-
import * as
|
|
1309
|
+
import * as React12 from "react";
|
|
972
1310
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
973
|
-
import { jsx as
|
|
974
|
-
function
|
|
1311
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1312
|
+
function Calendar2({
|
|
975
1313
|
className,
|
|
976
1314
|
classNames,
|
|
977
1315
|
showOutsideDays = true,
|
|
@@ -982,7 +1320,7 @@ function Calendar({
|
|
|
982
1320
|
...props
|
|
983
1321
|
}) {
|
|
984
1322
|
const defaultClassNames = getDefaultClassNames();
|
|
985
|
-
return /* @__PURE__ */
|
|
1323
|
+
return /* @__PURE__ */ jsx31(
|
|
986
1324
|
DayPicker,
|
|
987
1325
|
{
|
|
988
1326
|
showOutsideDays,
|
|
@@ -1081,7 +1419,7 @@ function Calendar({
|
|
|
1081
1419
|
},
|
|
1082
1420
|
components: {
|
|
1083
1421
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
1084
|
-
return /* @__PURE__ */
|
|
1422
|
+
return /* @__PURE__ */ jsx31(
|
|
1085
1423
|
"div",
|
|
1086
1424
|
{
|
|
1087
1425
|
"data-slot": "calendar",
|
|
@@ -1093,10 +1431,10 @@ function Calendar({
|
|
|
1093
1431
|
},
|
|
1094
1432
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
1095
1433
|
if (orientation === "left") {
|
|
1096
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ jsx31(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
1097
1435
|
}
|
|
1098
1436
|
if (orientation === "right") {
|
|
1099
|
-
return /* @__PURE__ */
|
|
1437
|
+
return /* @__PURE__ */ jsx31(
|
|
1100
1438
|
ChevronRight,
|
|
1101
1439
|
{
|
|
1102
1440
|
className: cn("size-4", className2),
|
|
@@ -1104,11 +1442,11 @@ function Calendar({
|
|
|
1104
1442
|
}
|
|
1105
1443
|
);
|
|
1106
1444
|
}
|
|
1107
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ jsx31(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
1108
1446
|
},
|
|
1109
1447
|
DayButton: CalendarDayButton,
|
|
1110
1448
|
WeekNumber: ({ children, ...props2 }) => {
|
|
1111
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ jsx31("td", { ...props2, children: /* @__PURE__ */ jsx31("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
1112
1450
|
},
|
|
1113
1451
|
...components
|
|
1114
1452
|
},
|
|
@@ -1123,11 +1461,11 @@ function CalendarDayButton({
|
|
|
1123
1461
|
...props
|
|
1124
1462
|
}) {
|
|
1125
1463
|
const defaultClassNames = getDefaultClassNames();
|
|
1126
|
-
const ref =
|
|
1127
|
-
|
|
1464
|
+
const ref = React12.useRef(null);
|
|
1465
|
+
React12.useEffect(() => {
|
|
1128
1466
|
if (modifiers.focused) ref.current?.focus();
|
|
1129
1467
|
}, [modifiers.focused]);
|
|
1130
|
-
return /* @__PURE__ */
|
|
1468
|
+
return /* @__PURE__ */ jsx31(
|
|
1131
1469
|
Button,
|
|
1132
1470
|
{
|
|
1133
1471
|
ref,
|
|
@@ -1150,16 +1488,16 @@ function CalendarDayButton({
|
|
|
1150
1488
|
|
|
1151
1489
|
// src/components/ui/popover.tsx
|
|
1152
1490
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1153
|
-
import { jsx as
|
|
1491
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1154
1492
|
function Popover({
|
|
1155
1493
|
...props
|
|
1156
1494
|
}) {
|
|
1157
|
-
return /* @__PURE__ */
|
|
1495
|
+
return /* @__PURE__ */ jsx32(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1158
1496
|
}
|
|
1159
1497
|
function PopoverTrigger({
|
|
1160
1498
|
...props
|
|
1161
1499
|
}) {
|
|
1162
|
-
return /* @__PURE__ */
|
|
1500
|
+
return /* @__PURE__ */ jsx32(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1163
1501
|
}
|
|
1164
1502
|
function PopoverContent({
|
|
1165
1503
|
className,
|
|
@@ -1167,7 +1505,7 @@ function PopoverContent({
|
|
|
1167
1505
|
sideOffset = 4,
|
|
1168
1506
|
...props
|
|
1169
1507
|
}) {
|
|
1170
|
-
return /* @__PURE__ */
|
|
1508
|
+
return /* @__PURE__ */ jsx32(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx32(
|
|
1171
1509
|
PopoverPrimitive.Content,
|
|
1172
1510
|
{
|
|
1173
1511
|
"data-slot": "popover-content",
|
|
@@ -1183,14 +1521,14 @@ function PopoverContent({
|
|
|
1183
1521
|
}
|
|
1184
1522
|
|
|
1185
1523
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
1186
|
-
import { Fragment as
|
|
1524
|
+
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1187
1525
|
var DateRange = ({ className, style }) => {
|
|
1188
|
-
const [date, setDate] =
|
|
1526
|
+
const [date, setDate] = React13.useState({
|
|
1189
1527
|
from: /* @__PURE__ */ new Date(),
|
|
1190
1528
|
to: addDays(/* @__PURE__ */ new Date(), 7)
|
|
1191
1529
|
});
|
|
1192
|
-
return /* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1530
|
+
return /* @__PURE__ */ jsx33("div", { className, style, children: /* @__PURE__ */ jsxs18(Popover, { children: [
|
|
1531
|
+
/* @__PURE__ */ jsx33(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(
|
|
1194
1532
|
Button,
|
|
1195
1533
|
{
|
|
1196
1534
|
id: "date",
|
|
@@ -1199,16 +1537,16 @@ var DateRange = ({ className, style }) => {
|
|
|
1199
1537
|
"w-[300px] justify-start text-left font-normal text-[11px]",
|
|
1200
1538
|
!date && "text-muted-foreground"
|
|
1201
1539
|
),
|
|
1202
|
-
children: date?.from ? date.to ? /* @__PURE__ */
|
|
1540
|
+
children: date?.from ? date.to ? /* @__PURE__ */ jsxs18(Fragment11, { children: [
|
|
1203
1541
|
format(date.from, "LLL dd, y"),
|
|
1204
1542
|
" -",
|
|
1205
1543
|
" ",
|
|
1206
1544
|
format(date.to, "LLL dd, y")
|
|
1207
|
-
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */
|
|
1545
|
+
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx33("span", { children: "Pick a date range" })
|
|
1208
1546
|
}
|
|
1209
1547
|
) }),
|
|
1210
|
-
/* @__PURE__ */
|
|
1211
|
-
|
|
1548
|
+
/* @__PURE__ */ jsx33(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx33(
|
|
1549
|
+
Calendar2,
|
|
1212
1550
|
{
|
|
1213
1551
|
mode: "range",
|
|
1214
1552
|
defaultMonth: date?.from,
|
|
@@ -1219,6 +1557,7 @@ var DateRange = ({ className, style }) => {
|
|
|
1219
1557
|
) })
|
|
1220
1558
|
] }) });
|
|
1221
1559
|
};
|
|
1560
|
+
var DateRange_default = DateRange;
|
|
1222
1561
|
|
|
1223
1562
|
// src/components/ui/data-table.tsx
|
|
1224
1563
|
import {
|
|
@@ -1228,14 +1567,14 @@ import {
|
|
|
1228
1567
|
} from "@tanstack/react-table";
|
|
1229
1568
|
|
|
1230
1569
|
// src/components/ui/table.tsx
|
|
1231
|
-
import { jsx as
|
|
1570
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1232
1571
|
function Table({ className, ...props }) {
|
|
1233
|
-
return /* @__PURE__ */
|
|
1572
|
+
return /* @__PURE__ */ jsx34(
|
|
1234
1573
|
"div",
|
|
1235
1574
|
{
|
|
1236
1575
|
"data-slot": "table-container",
|
|
1237
1576
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
1238
|
-
children: /* @__PURE__ */
|
|
1577
|
+
children: /* @__PURE__ */ jsx34(
|
|
1239
1578
|
"table",
|
|
1240
1579
|
{
|
|
1241
1580
|
"data-slot": "table",
|
|
@@ -1247,7 +1586,7 @@ function Table({ className, ...props }) {
|
|
|
1247
1586
|
);
|
|
1248
1587
|
}
|
|
1249
1588
|
function TableHeader({ className, ...props }) {
|
|
1250
|
-
return /* @__PURE__ */
|
|
1589
|
+
return /* @__PURE__ */ jsx34(
|
|
1251
1590
|
"thead",
|
|
1252
1591
|
{
|
|
1253
1592
|
"data-slot": "table-header",
|
|
@@ -1260,7 +1599,7 @@ function TableHeader({ className, ...props }) {
|
|
|
1260
1599
|
);
|
|
1261
1600
|
}
|
|
1262
1601
|
function TableBody({ className, ...props }) {
|
|
1263
|
-
return /* @__PURE__ */
|
|
1602
|
+
return /* @__PURE__ */ jsx34(
|
|
1264
1603
|
"tbody",
|
|
1265
1604
|
{
|
|
1266
1605
|
"data-slot": "table-body",
|
|
@@ -1273,7 +1612,7 @@ function TableBody({ className, ...props }) {
|
|
|
1273
1612
|
);
|
|
1274
1613
|
}
|
|
1275
1614
|
function TableRow({ className, ...props }) {
|
|
1276
|
-
return /* @__PURE__ */
|
|
1615
|
+
return /* @__PURE__ */ jsx34(
|
|
1277
1616
|
"tr",
|
|
1278
1617
|
{
|
|
1279
1618
|
"data-slot": "table-row",
|
|
@@ -1286,7 +1625,7 @@ function TableRow({ className, ...props }) {
|
|
|
1286
1625
|
);
|
|
1287
1626
|
}
|
|
1288
1627
|
function TableHead({ className, ...props }) {
|
|
1289
|
-
return /* @__PURE__ */
|
|
1628
|
+
return /* @__PURE__ */ jsx34(
|
|
1290
1629
|
"th",
|
|
1291
1630
|
{
|
|
1292
1631
|
"data-slot": "table-head",
|
|
@@ -1299,7 +1638,7 @@ function TableHead({ className, ...props }) {
|
|
|
1299
1638
|
);
|
|
1300
1639
|
}
|
|
1301
1640
|
function TableCell({ className, ...props }) {
|
|
1302
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ jsx34(
|
|
1303
1642
|
"td",
|
|
1304
1643
|
{
|
|
1305
1644
|
"data-slot": "table-cell",
|
|
@@ -1313,7 +1652,7 @@ function TableCell({ className, ...props }) {
|
|
|
1313
1652
|
}
|
|
1314
1653
|
|
|
1315
1654
|
// src/components/ui/data-table.tsx
|
|
1316
|
-
import { Fragment as
|
|
1655
|
+
import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1317
1656
|
function DataTable({
|
|
1318
1657
|
columns,
|
|
1319
1658
|
rowActions,
|
|
@@ -1338,14 +1677,14 @@ function DataTable({
|
|
|
1338
1677
|
onCellClick(rowData, columnId);
|
|
1339
1678
|
}
|
|
1340
1679
|
};
|
|
1341
|
-
return /* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsx35("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ jsxs19(Table, { children: [
|
|
1681
|
+
/* @__PURE__ */ jsx35(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx35(TableRow, { children: headerGroup.headers.map((header) => {
|
|
1682
|
+
return /* @__PURE__ */ jsx35(TableHead, { children: header.isPlaceholder ? null : flexRender(
|
|
1344
1683
|
header.column.columnDef.header,
|
|
1345
1684
|
header.getContext()
|
|
1346
1685
|
) }, header.id);
|
|
1347
1686
|
}) }, headerGroup.id)) }),
|
|
1348
|
-
/* @__PURE__ */
|
|
1687
|
+
/* @__PURE__ */ jsx35(TableBody, { children: loading ? /* @__PURE__ */ jsx35(TableRow, { children: /* @__PURE__ */ jsx35(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ jsx35(Fragment12, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxs19(
|
|
1349
1688
|
TableRow,
|
|
1350
1689
|
{
|
|
1351
1690
|
"data-state": row.getIsSelected() && "selected",
|
|
@@ -1355,7 +1694,7 @@ function DataTable({
|
|
|
1355
1694
|
const isCellClickable = cellClickEnabled(row.original, cell.column.id);
|
|
1356
1695
|
const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
|
|
1357
1696
|
const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
|
|
1358
|
-
return /* @__PURE__ */
|
|
1697
|
+
return /* @__PURE__ */ jsx35(
|
|
1359
1698
|
TableCell,
|
|
1360
1699
|
{
|
|
1361
1700
|
className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
|
|
@@ -1370,36 +1709,36 @@ function DataTable({
|
|
|
1370
1709
|
cell.id
|
|
1371
1710
|
);
|
|
1372
1711
|
}),
|
|
1373
|
-
rowActions.length > 0 && /* @__PURE__ */
|
|
1712
|
+
rowActions.length > 0 && /* @__PURE__ */ jsx35("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__ */ jsx35("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
|
|
1374
1713
|
]
|
|
1375
1714
|
},
|
|
1376
1715
|
row.id
|
|
1377
|
-
)) : /* @__PURE__ */
|
|
1716
|
+
)) : /* @__PURE__ */ jsx35(TableRow, { children: /* @__PURE__ */ jsx35(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
|
|
1378
1717
|
] }) });
|
|
1379
1718
|
}
|
|
1380
1719
|
|
|
1381
1720
|
// src/components/DataDisplay/Table/Table.tsx
|
|
1382
|
-
import { jsx as
|
|
1721
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1383
1722
|
var Table2 = ({ columns, data, rowActions }) => {
|
|
1384
1723
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
1385
1724
|
const rawData = Array.isArray(data) ? data : [];
|
|
1386
1725
|
const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
|
|
1387
|
-
return /* @__PURE__ */
|
|
1726
|
+
return /* @__PURE__ */ jsx36(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions });
|
|
1388
1727
|
};
|
|
1389
1728
|
var Table_default = Table2;
|
|
1390
1729
|
|
|
1391
1730
|
// src/components/ui/dropdown-menu.tsx
|
|
1392
1731
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1393
|
-
import { jsx as
|
|
1732
|
+
import { jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1394
1733
|
function DropdownMenu({
|
|
1395
1734
|
...props
|
|
1396
1735
|
}) {
|
|
1397
|
-
return /* @__PURE__ */
|
|
1736
|
+
return /* @__PURE__ */ jsx37(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1398
1737
|
}
|
|
1399
1738
|
function DropdownMenuTrigger({
|
|
1400
1739
|
...props
|
|
1401
1740
|
}) {
|
|
1402
|
-
return /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ jsx37(
|
|
1403
1742
|
DropdownMenuPrimitive.Trigger,
|
|
1404
1743
|
{
|
|
1405
1744
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -1412,7 +1751,7 @@ function DropdownMenuContent({
|
|
|
1412
1751
|
sideOffset = 4,
|
|
1413
1752
|
...props
|
|
1414
1753
|
}) {
|
|
1415
|
-
return /* @__PURE__ */
|
|
1754
|
+
return /* @__PURE__ */ jsx37(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx37(
|
|
1416
1755
|
DropdownMenuPrimitive.Content,
|
|
1417
1756
|
{
|
|
1418
1757
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1431,7 +1770,7 @@ function DropdownMenuItem({
|
|
|
1431
1770
|
variant = "default",
|
|
1432
1771
|
...props
|
|
1433
1772
|
}) {
|
|
1434
|
-
return /* @__PURE__ */
|
|
1773
|
+
return /* @__PURE__ */ jsx37(
|
|
1435
1774
|
DropdownMenuPrimitive.Item,
|
|
1436
1775
|
{
|
|
1437
1776
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1447,13 +1786,13 @@ function DropdownMenuItem({
|
|
|
1447
1786
|
}
|
|
1448
1787
|
|
|
1449
1788
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
1450
|
-
import { jsx as
|
|
1789
|
+
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1451
1790
|
var Tabs = ({ tabs, className, style }) => {
|
|
1452
1791
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
1453
1792
|
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 ";
|
|
1454
1793
|
const activeClasses = "bg-white/10 text-white";
|
|
1455
1794
|
const hoverClasses = "hover:bg-white/5";
|
|
1456
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ jsx38("div", { className, style, children: rawTabs.map((tab, index) => {
|
|
1457
1796
|
const finalClasses = [
|
|
1458
1797
|
baseClasses,
|
|
1459
1798
|
tab.isActive ? activeClasses : hoverClasses,
|
|
@@ -1461,24 +1800,24 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1461
1800
|
].join(" ");
|
|
1462
1801
|
const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
1463
1802
|
if (hasDropdown) {
|
|
1464
|
-
return /* @__PURE__ */
|
|
1465
|
-
/* @__PURE__ */
|
|
1803
|
+
return /* @__PURE__ */ jsxs21(DropdownMenu, { children: [
|
|
1804
|
+
/* @__PURE__ */ jsxs21(
|
|
1466
1805
|
DropdownMenuTrigger,
|
|
1467
1806
|
{
|
|
1468
1807
|
className: `${finalClasses} inline-flex items-center gap-1`,
|
|
1469
1808
|
children: [
|
|
1470
1809
|
tab.header,
|
|
1471
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ jsx38(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
1472
1811
|
]
|
|
1473
1812
|
}
|
|
1474
1813
|
),
|
|
1475
|
-
/* @__PURE__ */
|
|
1814
|
+
/* @__PURE__ */ jsx38(
|
|
1476
1815
|
DropdownMenuContent,
|
|
1477
1816
|
{
|
|
1478
1817
|
align: "start",
|
|
1479
1818
|
sideOffset: 6,
|
|
1480
1819
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
1481
|
-
children: tab.children.map((item) => /* @__PURE__ */
|
|
1820
|
+
children: tab.children.map((item) => /* @__PURE__ */ jsx38(
|
|
1482
1821
|
DropdownMenuItem,
|
|
1483
1822
|
{
|
|
1484
1823
|
asChild: true,
|
|
@@ -1491,19 +1830,19 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1491
1830
|
)
|
|
1492
1831
|
] }, index);
|
|
1493
1832
|
}
|
|
1494
|
-
return /* @__PURE__ */
|
|
1833
|
+
return /* @__PURE__ */ jsx38("div", { className: finalClasses, style: { backgroundColor: "transparent", border: "none", ...tab.style }, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
1495
1834
|
}) });
|
|
1496
1835
|
};
|
|
1497
1836
|
var Tabs_default = Tabs;
|
|
1498
1837
|
|
|
1499
1838
|
// src/components/Navigation/Stages/Stages.tsx
|
|
1500
|
-
import
|
|
1501
|
-
import { jsx as
|
|
1839
|
+
import React14 from "react";
|
|
1840
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1502
1841
|
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
1503
|
-
return /* @__PURE__ */
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */
|
|
1842
|
+
return /* @__PURE__ */ jsx39("div", { className, style, children: /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between bg-gray-50 p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
1843
|
+
/* @__PURE__ */ jsx39("div", { className: "flex items-center", children: /* @__PURE__ */ jsx39("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ jsx39("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx39("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
1844
|
+
/* @__PURE__ */ jsx39("div", { className: "flex items-center flex-1 px-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ jsxs22(React14.Fragment, { children: [
|
|
1845
|
+
/* @__PURE__ */ jsx39(
|
|
1507
1846
|
"button",
|
|
1508
1847
|
{
|
|
1509
1848
|
className: `
|
|
@@ -1511,26 +1850,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
|
1511
1850
|
children: stage.header
|
|
1512
1851
|
}
|
|
1513
1852
|
),
|
|
1514
|
-
index < stages.length - 1 && /* @__PURE__ */
|
|
1853
|
+
index < stages.length - 1 && /* @__PURE__ */ jsx39("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
1515
1854
|
] }, stage.id)) }),
|
|
1516
|
-
isShowBtn && /* @__PURE__ */
|
|
1855
|
+
isShowBtn && /* @__PURE__ */ jsx39("div", { className: "flex items-center", children: /* @__PURE__ */ jsx39("button", { className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm", children: buttonText }) })
|
|
1517
1856
|
] }) });
|
|
1518
1857
|
};
|
|
1519
1858
|
var Stages_default = StagesComponent;
|
|
1520
1859
|
|
|
1521
1860
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
1522
|
-
import { jsx as
|
|
1861
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1523
1862
|
var Spacer = ({ className, style }) => {
|
|
1524
|
-
return /* @__PURE__ */
|
|
1863
|
+
return /* @__PURE__ */ jsx40("div", { className: `${className}`, style });
|
|
1525
1864
|
};
|
|
1526
1865
|
var Spacer_default = Spacer;
|
|
1527
1866
|
|
|
1528
1867
|
// src/components/Navigation/Profile/Profile.tsx
|
|
1529
|
-
import { jsx as
|
|
1868
|
+
import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1530
1869
|
var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
1531
|
-
return /* @__PURE__ */
|
|
1532
|
-
showName && /* @__PURE__ */
|
|
1533
|
-
profileType === "avatar" ? /* @__PURE__ */
|
|
1870
|
+
return /* @__PURE__ */ jsx41("div", { className, style, children: /* @__PURE__ */ jsxs23("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
|
|
1871
|
+
showName && /* @__PURE__ */ jsx41("h4", { className: "text-[#000000] dark:text-[#fff] text-[13px] font-[500] mb-0", children: userName }),
|
|
1872
|
+
profileType === "avatar" ? /* @__PURE__ */ jsx41(
|
|
1534
1873
|
"img",
|
|
1535
1874
|
{
|
|
1536
1875
|
src: "https://builder.development.algorithmshift.ai/images/toolset/profile.svg",
|
|
@@ -1538,16 +1877,16 @@ var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
|
1538
1877
|
width: 24,
|
|
1539
1878
|
height: 24
|
|
1540
1879
|
}
|
|
1541
|
-
) : /* @__PURE__ */
|
|
1880
|
+
) : /* @__PURE__ */ jsx41("div", { className: "w-6 h-6 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: "A" })
|
|
1542
1881
|
] }) });
|
|
1543
1882
|
};
|
|
1544
1883
|
var Profile_default = Profile;
|
|
1545
1884
|
|
|
1546
1885
|
// src/components/Navigation/Notification/Notification.tsx
|
|
1547
|
-
import { jsx as
|
|
1548
|
-
var Notification = ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }) => {
|
|
1549
|
-
return /* @__PURE__ */
|
|
1550
|
-
/* @__PURE__ */
|
|
1886
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1887
|
+
var Notification = ({ className, style, badgeType, badgeCount = 0, hideBadgeWhenZero }) => {
|
|
1888
|
+
return /* @__PURE__ */ jsx42("div", { className, style, children: /* @__PURE__ */ jsxs24("div", { className: "w-[34px] h-[34px] bg-[#E9E9E9] rounded-md text-center flex items-center justify-center relative", children: [
|
|
1889
|
+
/* @__PURE__ */ jsx42(
|
|
1551
1890
|
"img",
|
|
1552
1891
|
{
|
|
1553
1892
|
src: "https://builder.development.algorithmshift.ai/images/toolset/notification.svg",
|
|
@@ -1556,14 +1895,14 @@ var Notification = ({ className, style, badgeType, badgeCount, hideBadgeWhenZero
|
|
|
1556
1895
|
height: 18
|
|
1557
1896
|
}
|
|
1558
1897
|
),
|
|
1559
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */
|
|
1898
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ jsx42("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__ */ jsx42("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]" })
|
|
1560
1899
|
] }) });
|
|
1561
1900
|
};
|
|
1562
1901
|
var Notification_default = Notification;
|
|
1563
1902
|
|
|
1564
1903
|
// src/components/Navigation/Logo/Logo.tsx
|
|
1565
|
-
import { jsx as
|
|
1566
|
-
var
|
|
1904
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1905
|
+
var ImageControl2 = ({
|
|
1567
1906
|
className,
|
|
1568
1907
|
style,
|
|
1569
1908
|
imageUrl
|
|
@@ -1583,24 +1922,31 @@ var ImageControl = ({
|
|
|
1583
1922
|
className: "opacity-50"
|
|
1584
1923
|
};
|
|
1585
1924
|
}
|
|
1586
|
-
return /* @__PURE__ */
|
|
1925
|
+
return /* @__PURE__ */ jsx43("div", { className, style, children: /* @__PURE__ */ jsx43("img", { src, alt: "Preview", sizes: "100vw", ...extraProps }) });
|
|
1587
1926
|
};
|
|
1588
|
-
var Logo_default =
|
|
1927
|
+
var Logo_default = ImageControl2;
|
|
1589
1928
|
export {
|
|
1590
1929
|
Button,
|
|
1591
1930
|
CheckboxInput,
|
|
1592
|
-
|
|
1931
|
+
DatePicker,
|
|
1932
|
+
DateRange_default as DateRange,
|
|
1593
1933
|
Dropdown,
|
|
1594
1934
|
EmailInput,
|
|
1935
|
+
FileInput,
|
|
1595
1936
|
Flex_default as FlexLayout,
|
|
1596
1937
|
Grid_default as GridLayout,
|
|
1938
|
+
Image_default as Image,
|
|
1597
1939
|
Logo_default as Logo,
|
|
1598
1940
|
MultiCheckbox,
|
|
1599
1941
|
Notification_default as Notification,
|
|
1942
|
+
NumberInput,
|
|
1600
1943
|
PasswordInput,
|
|
1601
1944
|
PhoneInput,
|
|
1602
1945
|
Profile_default as Profile,
|
|
1603
1946
|
RadioInput,
|
|
1947
|
+
RichText,
|
|
1948
|
+
SearchInput,
|
|
1949
|
+
Shape_default as Shape,
|
|
1604
1950
|
Spacer_default as Spacer,
|
|
1605
1951
|
Stages_default as Stages,
|
|
1606
1952
|
SwitchToggle,
|
|
@@ -1619,6 +1965,8 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
|
1619
1965
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
1620
1966
|
lucide-react/dist/esm/Icon.js:
|
|
1621
1967
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
1968
|
+
lucide-react/dist/esm/icons/calculator.js:
|
|
1969
|
+
lucide-react/dist/esm/icons/calendar.js:
|
|
1622
1970
|
lucide-react/dist/esm/icons/check.js:
|
|
1623
1971
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
1624
1972
|
lucide-react/dist/esm/icons/chevron-left.js:
|
|
@@ -1627,6 +1975,7 @@ lucide-react/dist/esm/icons/chevron-up.js:
|
|
|
1627
1975
|
lucide-react/dist/esm/icons/circle.js:
|
|
1628
1976
|
lucide-react/dist/esm/icons/mail.js:
|
|
1629
1977
|
lucide-react/dist/esm/icons/scan-eye.js:
|
|
1978
|
+
lucide-react/dist/esm/icons/search.js:
|
|
1630
1979
|
lucide-react/dist/esm/lucide-react.js:
|
|
1631
1980
|
(**
|
|
1632
1981
|
* @license lucide-react v0.542.0 - ISC
|