@algorithm-shift/design-system 1.2.2 → 1.2.4

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.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,13 +17,41 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
21
31
  var index_exports = {};
22
32
  __export(index_exports, {
23
33
  Button: () => Button,
24
- CustomButton: () => CustomButton,
34
+ CheckboxInput: () => CheckboxInput,
35
+ DateRange: () => DateRange,
36
+ Dropdown: () => Dropdown,
37
+ EmailInput: () => EmailInput,
38
+ FlexLayout: () => Flex_default,
39
+ GridLayout: () => Grid_default,
40
+ Logo: () => Logo_default,
41
+ MultiCheckbox: () => MultiCheckbox,
42
+ Notification: () => Notification_default,
43
+ PasswordInput: () => PasswordInput,
44
+ PhoneInput: () => PhoneInput,
45
+ Profile: () => Profile_default,
46
+ RadioInput: () => RadioInput,
47
+ Spacer: () => Spacer_default,
48
+ Stages: () => Stages_default,
49
+ SwitchToggle: () => SwitchToggle,
50
+ Table: () => Table_default,
51
+ Tabs: () => Tabs_default,
52
+ TextInput: () => TextInput,
53
+ Textarea: () => Textarea2,
54
+ UrlInput: () => UrlInput,
25
55
  buttonVariants: () => buttonVariants,
26
56
  cn: () => cn
27
57
  });
@@ -83,33 +113,1558 @@ function Button({
83
113
  );
84
114
  }
85
115
 
86
- // src/components/CustomButton.tsx
116
+ // src/components/Layout/Flex.tsx
87
117
  var import_jsx_runtime2 = require("react/jsx-runtime");
88
- function CustomButton({
118
+ var Flex = ({
119
+ children,
120
+ className,
121
+ style
122
+ }) => {
123
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className, style, children });
124
+ };
125
+ var Flex_default = Flex;
126
+
127
+ // src/components/Layout/Grid.tsx
128
+ var import_jsx_runtime3 = require("react/jsx-runtime");
129
+ var Grid = ({
130
+ children,
131
+ className,
132
+ style
133
+ }) => {
134
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, style, children });
135
+ };
136
+ var Grid_default = Grid;
137
+
138
+ // src/components/Basic/Typography/Typography.tsx
139
+ var import_react = __toESM(require("react"));
140
+
141
+ // src/components/Basic/Shape/Shape.tsx
142
+ var import_jsx_runtime4 = require("react/jsx-runtime");
143
+
144
+ // src/components/Inputs/TextInput/TextInput.tsx
145
+ var React2 = __toESM(require("react"));
146
+
147
+ // src/components/ui/input.tsx
148
+ var import_jsx_runtime5 = require("react/jsx-runtime");
149
+ function Input({ className, type, ...props }) {
150
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
151
+ "input",
152
+ {
153
+ type,
154
+ "data-slot": "input",
155
+ className: cn(
156
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
157
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
158
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
159
+ className
160
+ ),
161
+ ...props
162
+ }
163
+ );
164
+ }
165
+
166
+ // src/components/Inputs/TextInput/TextInput.tsx
167
+ var import_jsx_runtime6 = require("react/jsx-runtime");
168
+ var TextInput = ({ className, style, ...props }) => {
169
+ const placeholder = props.placeholder || "Placeholder text";
170
+ const regexPattern = props.regexPattern ?? "";
171
+ const errorMessage = props.errorMessage ?? "Required";
172
+ const noOfCharacters = props.noOfCharacters ?? 100;
173
+ const isRequired = props.isRequired ?? false;
174
+ const isEditable = props.isEditable ?? true;
175
+ const isDisabled = props.isDisabled ?? false;
176
+ const isReadonly = props.isReadonly ?? false;
177
+ const isAutocomplete = props.isAutocomplete ?? false;
178
+ const [value, setValue] = React2.useState("");
179
+ const [error, setError] = React2.useState(null);
180
+ const handleChange = (e) => {
181
+ const val = e.target.value;
182
+ if (val.length > noOfCharacters) return;
183
+ setValue(val);
184
+ if (isRequired && val.trim() === "") {
185
+ setError(errorMessage);
186
+ } else if (regexPattern && !new RegExp(regexPattern).test(val)) {
187
+ setError(errorMessage);
188
+ } else {
189
+ setError(null);
190
+ }
191
+ };
192
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
193
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
194
+ Input,
195
+ {
196
+ type: "text",
197
+ className,
198
+ style,
199
+ value,
200
+ autoComplete: isAutocomplete ? "on" : "off",
201
+ placeholder,
202
+ onChange: handleChange,
203
+ disabled: isDisabled || !isEditable,
204
+ readOnly: isReadonly,
205
+ required: isRequired,
206
+ maxLength: noOfCharacters,
207
+ pattern: regexPattern || void 0
208
+ }
209
+ ),
210
+ error && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
211
+ ] });
212
+ };
213
+
214
+ // src/components/Inputs/EmailInput/EmailInput.tsx
215
+ var React3 = __toESM(require("react"));
216
+
217
+ // node_modules/lucide-react/dist/esm/createLucideIcon.js
218
+ var import_react3 = require("react");
219
+
220
+ // node_modules/lucide-react/dist/esm/shared/src/utils.js
221
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
222
+ var toCamelCase = (string) => string.replace(
223
+ /^([A-Z])|[\s-_]+(\w)/g,
224
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
225
+ );
226
+ var toPascalCase = (string) => {
227
+ const camelCase = toCamelCase(string);
228
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
229
+ };
230
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
231
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
232
+ }).join(" ").trim();
233
+ var hasA11yProp = (props) => {
234
+ for (const prop in props) {
235
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
236
+ return true;
237
+ }
238
+ }
239
+ };
240
+
241
+ // node_modules/lucide-react/dist/esm/Icon.js
242
+ var import_react2 = require("react");
243
+
244
+ // node_modules/lucide-react/dist/esm/defaultAttributes.js
245
+ var defaultAttributes = {
246
+ xmlns: "http://www.w3.org/2000/svg",
247
+ width: 24,
248
+ height: 24,
249
+ viewBox: "0 0 24 24",
250
+ fill: "none",
251
+ stroke: "currentColor",
252
+ strokeWidth: 2,
253
+ strokeLinecap: "round",
254
+ strokeLinejoin: "round"
255
+ };
256
+
257
+ // node_modules/lucide-react/dist/esm/Icon.js
258
+ var Icon = (0, import_react2.forwardRef)(
259
+ ({
260
+ color = "currentColor",
261
+ size = 24,
262
+ strokeWidth = 2,
263
+ absoluteStrokeWidth,
264
+ className = "",
265
+ children,
266
+ iconNode,
267
+ ...rest
268
+ }, ref) => (0, import_react2.createElement)(
269
+ "svg",
270
+ {
271
+ ref,
272
+ ...defaultAttributes,
273
+ width: size,
274
+ height: size,
275
+ stroke: color,
276
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
277
+ className: mergeClasses("lucide", className),
278
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
279
+ ...rest
280
+ },
281
+ [
282
+ ...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
283
+ ...Array.isArray(children) ? children : [children]
284
+ ]
285
+ )
286
+ );
287
+
288
+ // node_modules/lucide-react/dist/esm/createLucideIcon.js
289
+ var createLucideIcon = (iconName, iconNode) => {
290
+ const Component = (0, import_react3.forwardRef)(
291
+ ({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
292
+ ref,
293
+ iconNode,
294
+ className: mergeClasses(
295
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
296
+ `lucide-${iconName}`,
297
+ className
298
+ ),
299
+ ...props
300
+ })
301
+ );
302
+ Component.displayName = toPascalCase(iconName);
303
+ return Component;
304
+ };
305
+
306
+ // node_modules/lucide-react/dist/esm/icons/check.js
307
+ var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
308
+ var Check = createLucideIcon("check", __iconNode);
309
+
310
+ // node_modules/lucide-react/dist/esm/icons/chevron-down.js
311
+ var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
312
+ var ChevronDown = createLucideIcon("chevron-down", __iconNode2);
313
+
314
+ // node_modules/lucide-react/dist/esm/icons/chevron-left.js
315
+ var __iconNode3 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
316
+ var ChevronLeft = createLucideIcon("chevron-left", __iconNode3);
317
+
318
+ // node_modules/lucide-react/dist/esm/icons/chevron-right.js
319
+ var __iconNode4 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
320
+ var ChevronRight = createLucideIcon("chevron-right", __iconNode4);
321
+
322
+ // node_modules/lucide-react/dist/esm/icons/chevron-up.js
323
+ var __iconNode5 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
324
+ var ChevronUp = createLucideIcon("chevron-up", __iconNode5);
325
+
326
+ // node_modules/lucide-react/dist/esm/icons/circle.js
327
+ var __iconNode6 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
328
+ var Circle = createLucideIcon("circle", __iconNode6);
329
+
330
+ // node_modules/lucide-react/dist/esm/icons/mail.js
331
+ var __iconNode7 = [
332
+ ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
333
+ ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
334
+ ];
335
+ var Mail = createLucideIcon("mail", __iconNode7);
336
+
337
+ // node_modules/lucide-react/dist/esm/icons/scan-eye.js
338
+ var __iconNode8 = [
339
+ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
340
+ ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
341
+ ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
342
+ ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
343
+ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
344
+ [
345
+ "path",
346
+ {
347
+ d: "M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",
348
+ key: "11ak4c"
349
+ }
350
+ ]
351
+ ];
352
+ var ScanEye = createLucideIcon("scan-eye", __iconNode8);
353
+
354
+ // src/components/Inputs/EmailInput/EmailInput.tsx
355
+ var import_jsx_runtime7 = require("react/jsx-runtime");
356
+ var EmailInput = ({ className, style, ...props }) => {
357
+ const placeholder = props.placeholder ?? "Placeholder text";
358
+ const regexPattern = props.regexPattern ?? "";
359
+ const errorMessage = props.errorMessage ?? "Required";
360
+ const noOfCharacters = props.noOfCharacters ?? 100;
361
+ const isRequired = props.isRequired ?? false;
362
+ const isEditable = props.isEditable ?? true;
363
+ const isDisabled = props.isDisabled ?? false;
364
+ const isReadonly = props.isReadonly ?? false;
365
+ const isAutocomplete = props.isAutocomplete ?? false;
366
+ const [value, setValue] = React3.useState("");
367
+ const [error, setError] = React3.useState(null);
368
+ const handleChange = (e) => {
369
+ const val = e.target.value;
370
+ if (val.length > noOfCharacters) return;
371
+ setValue(val);
372
+ if (isRequired && val.trim() === "") {
373
+ setError(errorMessage);
374
+ } else if (regexPattern && !new RegExp(regexPattern).test(val)) {
375
+ setError(errorMessage);
376
+ } else {
377
+ setError(null);
378
+ }
379
+ };
380
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
381
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex justify-start items-center relative", children: [
382
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Mail, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
383
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
384
+ Input,
385
+ {
386
+ type: "email",
387
+ value,
388
+ className,
389
+ style,
390
+ autoComplete: isAutocomplete ? "on" : "off",
391
+ placeholder,
392
+ onChange: handleChange,
393
+ disabled: isDisabled || !isEditable,
394
+ readOnly: isReadonly,
395
+ required: isRequired,
396
+ maxLength: noOfCharacters,
397
+ pattern: regexPattern || void 0
398
+ }
399
+ )
400
+ ] }),
401
+ error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
402
+ ] });
403
+ };
404
+
405
+ // src/components/Inputs/PasswordInput/PasswordInput.tsx
406
+ var React4 = __toESM(require("react"));
407
+ var import_jsx_runtime8 = require("react/jsx-runtime");
408
+ var PasswordInput = ({ className, style, ...props }) => {
409
+ const placeholder = props.placeholder ?? "Placeholder text";
410
+ const regexPattern = props.regexPattern ?? "";
411
+ const errorMessage = props.errorMessage ?? "Required";
412
+ const noOfCharacters = props.noOfCharacters ?? 100;
413
+ const isRequired = props.isRequired ?? false;
414
+ const isEditable = props.isEditable ?? true;
415
+ const isDisabled = props.isDisabled ?? false;
416
+ const isReadonly = props.isReadonly ?? false;
417
+ const isAutocomplete = props.isAutocomplete ?? false;
418
+ const [value, setValue] = React4.useState("");
419
+ const [error, setError] = React4.useState(null);
420
+ const handleChange = (e) => {
421
+ const val = e.target.value;
422
+ if (val.length > noOfCharacters) return;
423
+ setValue(val);
424
+ if (isRequired && val.trim() === "") {
425
+ setError(errorMessage);
426
+ } else if (regexPattern && !new RegExp(regexPattern).test(val)) {
427
+ setError(errorMessage);
428
+ } else {
429
+ setError(null);
430
+ }
431
+ };
432
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
433
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-start items-center relative", children: [
434
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScanEye, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
435
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
436
+ Input,
437
+ {
438
+ type: "password",
439
+ id: "password-field",
440
+ className,
441
+ style,
442
+ value,
443
+ autoComplete: isAutocomplete ? "on" : "off",
444
+ placeholder,
445
+ onChange: handleChange,
446
+ disabled: isDisabled || !isEditable,
447
+ readOnly: isReadonly,
448
+ required: isRequired,
449
+ maxLength: noOfCharacters,
450
+ pattern: regexPattern || void 0
451
+ }
452
+ )
453
+ ] }),
454
+ error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
455
+ ] });
456
+ };
457
+
458
+ // src/components/Inputs/Textarea/Textarea.tsx
459
+ var React5 = __toESM(require("react"));
460
+
461
+ // src/components/ui/textarea.tsx
462
+ var import_jsx_runtime9 = require("react/jsx-runtime");
463
+ function Textarea({ className, ...props }) {
464
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
465
+ "textarea",
466
+ {
467
+ "data-slot": "textarea",
468
+ className: cn(
469
+ "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
470
+ className
471
+ ),
472
+ ...props
473
+ }
474
+ );
475
+ }
476
+
477
+ // src/components/Inputs/Textarea/Textarea.tsx
478
+ var import_jsx_runtime10 = require("react/jsx-runtime");
479
+ var Textarea2 = ({ className, style, ...props }) => {
480
+ const placeholder = props.placeholder ?? "Placeholder text";
481
+ const regexPattern = props.regexPattern ?? "";
482
+ const errorMessage = props.errorMessage ?? "Required";
483
+ const noOfCharacters = props.noOfCharacters ?? 100;
484
+ const isRequired = props.isRequired ?? false;
485
+ const isEditable = props.isEditable ?? true;
486
+ const isDisabled = props.isDisabled ?? false;
487
+ const isReadonly = props.isReadonly ?? false;
488
+ const isAutocomplete = props.isAutocomplete ?? false;
489
+ const [value, setValue] = React5.useState("");
490
+ const [error, setError] = React5.useState(null);
491
+ const handleChange = (e) => {
492
+ const val = e.target.value;
493
+ if (val.length > noOfCharacters) return;
494
+ setValue(val);
495
+ if (isRequired && val.trim() === "") {
496
+ setError(errorMessage);
497
+ } else if (regexPattern && !new RegExp(regexPattern).test(val)) {
498
+ setError(errorMessage);
499
+ } else {
500
+ setError(null);
501
+ }
502
+ };
503
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
504
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
505
+ Textarea,
506
+ {
507
+ id: "textarea-field",
508
+ className,
509
+ style,
510
+ value,
511
+ autoComplete: isAutocomplete ? "on" : "off",
512
+ placeholder,
513
+ onChange: handleChange,
514
+ disabled: isDisabled || !isEditable,
515
+ readOnly: isReadonly,
516
+ required: isRequired,
517
+ maxLength: noOfCharacters
518
+ }
519
+ ),
520
+ error && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
521
+ ] });
522
+ };
523
+
524
+ // src/components/Inputs/UrlInput/UrlInput.tsx
525
+ var React6 = __toESM(require("react"));
526
+ var import_jsx_runtime11 = require("react/jsx-runtime");
527
+ var UrlInput = ({ className, style, ...props }) => {
528
+ const placeholder = props.placeholder ?? "Placeholder text";
529
+ const regexPattern = props.regexPattern ?? "";
530
+ const errorMessage = props.errorMessage ?? "Required";
531
+ const noOfCharacters = props.noOfCharacters ?? 100;
532
+ const isRequired = props.isRequired ?? false;
533
+ const isEditable = props.isEditable ?? true;
534
+ const isDisabled = props.isDisabled ?? false;
535
+ const isReadonly = props.isReadonly ?? false;
536
+ const isAutocomplete = props.isAutocomplete ?? false;
537
+ const [value, setValue] = React6.useState("");
538
+ const [error, setError] = React6.useState(null);
539
+ const handleChange = (e) => {
540
+ const val = e.target.value;
541
+ if (val.length > noOfCharacters) return;
542
+ setValue(val);
543
+ if (isRequired && val.trim() === "") {
544
+ setError(errorMessage);
545
+ } else if (regexPattern && !new RegExp(regexPattern).test(val)) {
546
+ setError(errorMessage);
547
+ } else {
548
+ setError(null);
549
+ }
550
+ };
551
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
552
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex justify-start items-center relative", children: [
553
+ /* @__PURE__ */ (0, import_jsx_runtime11.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://" }),
554
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
555
+ Input,
556
+ {
557
+ type: "url",
558
+ className,
559
+ style,
560
+ id: "url-field",
561
+ value,
562
+ autoComplete: isAutocomplete ? "on" : "off",
563
+ placeholder,
564
+ onChange: handleChange,
565
+ disabled: isDisabled || !isEditable,
566
+ readOnly: isReadonly,
567
+ required: isRequired,
568
+ maxLength: noOfCharacters,
569
+ pattern: regexPattern || void 0
570
+ }
571
+ )
572
+ ] }),
573
+ error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
574
+ ] });
575
+ };
576
+
577
+ // src/components/ui/checkbox.tsx
578
+ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
579
+ var import_jsx_runtime12 = require("react/jsx-runtime");
580
+ function Checkbox({
89
581
  className,
90
- asChild = false,
91
582
  ...props
92
583
  }) {
93
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
94
- "button",
584
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
585
+ CheckboxPrimitive.Root,
95
586
  {
96
- "data-slot": "button",
97
- className: "bg-red-500 text-white shadow-xs hover:bg-red-600 focus-visible:ring-red-200 dark:focus-visible:ring-red-400 dark:bg-red-700",
587
+ "data-slot": "checkbox",
588
+ className: cn(
589
+ "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
590
+ className
591
+ ),
592
+ ...props,
593
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
594
+ CheckboxPrimitive.Indicator,
595
+ {
596
+ "data-slot": "checkbox-indicator",
597
+ className: "flex items-center justify-center text-current transition-none",
598
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Check, { className: "size-3.5" })
599
+ }
600
+ )
601
+ }
602
+ );
603
+ }
604
+
605
+ // src/components/ui/label.tsx
606
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
607
+ var import_jsx_runtime13 = require("react/jsx-runtime");
608
+ function Label({
609
+ className,
610
+ ...props
611
+ }) {
612
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
613
+ LabelPrimitive.Root,
614
+ {
615
+ "data-slot": "label",
616
+ className: cn(
617
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
618
+ className
619
+ ),
98
620
  ...props
99
621
  }
100
622
  );
101
623
  }
102
624
 
103
- // src/components/Layout/Flex.tsx
104
- var import_jsx_runtime3 = require("react/jsx-runtime");
625
+ // src/components/Inputs/Checkbox/Checkbox.tsx
626
+ var import_jsx_runtime14 = require("react/jsx-runtime");
627
+ var CheckboxInput = ({ className, style, ...props }) => {
628
+ const text = props.text ? props.text : "Subscribe";
629
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center space-x-2", children: [
630
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Checkbox, { id: "newsletter" }),
631
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label, { htmlFor: "newsletter", children: text })
632
+ ] }) });
633
+ };
105
634
 
106
- // src/components/Layout/Grid.tsx
107
- var import_jsx_runtime4 = require("react/jsx-runtime");
635
+ // src/components/ui/radio-group.tsx
636
+ var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
637
+ var import_jsx_runtime15 = require("react/jsx-runtime");
638
+ function RadioGroup({
639
+ className,
640
+ ...props
641
+ }) {
642
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
643
+ RadioGroupPrimitive.Root,
644
+ {
645
+ "data-slot": "radio-group",
646
+ className: cn("grid gap-3", className),
647
+ ...props
648
+ }
649
+ );
650
+ }
651
+ function RadioGroupItem({
652
+ className,
653
+ ...props
654
+ }) {
655
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
656
+ RadioGroupPrimitive.Item,
657
+ {
658
+ "data-slot": "radio-group-item",
659
+ className: cn(
660
+ "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
661
+ className
662
+ ),
663
+ ...props,
664
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
665
+ RadioGroupPrimitive.Indicator,
666
+ {
667
+ "data-slot": "radio-group-indicator",
668
+ className: "relative flex items-center justify-center",
669
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
670
+ }
671
+ )
672
+ }
673
+ );
674
+ }
675
+
676
+ // src/components/Inputs/RadioInput/RadioInput.tsx
677
+ var import_jsx_runtime16 = require("react/jsx-runtime");
678
+ var RadioInput = ({ className, style, ...props }) => {
679
+ const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
680
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RadioGroup, { defaultValue: "option-1", children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center space-x-2", children: [
681
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RadioGroupItem, { value: item, id: `r${index}` }),
682
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Label, { htmlFor: `r${index}`, children: item })
683
+ ] }, index)) }) });
684
+ };
685
+
686
+ // src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
687
+ var import_jsx_runtime17 = require("react/jsx-runtime");
688
+ var MultiCheckbox = ({ className, style, ...props }) => {
689
+ const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
690
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex gap-3 flex-col", children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center space-x-2", children: [
691
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Checkbox, { id: `newsletter-${index}` }),
692
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Label, { htmlFor: `newsletter-${index}`, children: item })
693
+ ] }, index)) }) });
694
+ };
695
+
696
+ // src/components/Global/TinyMceEditor.tsx
697
+ var import_react4 = require("react");
698
+ var import_tinymce_react = require("@tinymce/tinymce-react");
699
+ var import_jsx_runtime18 = require("react/jsx-runtime");
700
+
701
+ // src/components/Inputs/RichText/RichText.tsx
702
+ var import_jsx_runtime19 = require("react/jsx-runtime");
703
+
704
+ // src/components/Inputs/Dropdown/Dropdown.tsx
705
+ var React7 = __toESM(require("react"));
706
+
707
+ // src/components/ui/select.tsx
708
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
709
+ var import_jsx_runtime20 = require("react/jsx-runtime");
710
+ function Select({
711
+ ...props
712
+ }) {
713
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
714
+ }
715
+ function SelectValue({
716
+ ...props
717
+ }) {
718
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
719
+ }
720
+ function SelectTrigger({
721
+ className,
722
+ size = "default",
723
+ children,
724
+ ...props
725
+ }) {
726
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
727
+ SelectPrimitive.Trigger,
728
+ {
729
+ "data-slot": "select-trigger",
730
+ "data-size": size,
731
+ className: cn(
732
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
733
+ className
734
+ ),
735
+ ...props,
736
+ children: [
737
+ children,
738
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronDown, { className: "size-4 opacity-50" }) })
739
+ ]
740
+ }
741
+ );
742
+ }
743
+ function SelectContent({
744
+ className,
745
+ children,
746
+ position = "popper",
747
+ ...props
748
+ }) {
749
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
750
+ SelectPrimitive.Content,
751
+ {
752
+ "data-slot": "select-content",
753
+ className: cn(
754
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
755
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
756
+ className
757
+ ),
758
+ position,
759
+ ...props,
760
+ children: [
761
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectScrollUpButton, {}),
762
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
763
+ SelectPrimitive.Viewport,
764
+ {
765
+ className: cn(
766
+ "p-1",
767
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
768
+ ),
769
+ children
770
+ }
771
+ ),
772
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectScrollDownButton, {})
773
+ ]
774
+ }
775
+ ) });
776
+ }
777
+ function SelectItem({
778
+ className,
779
+ children,
780
+ ...props
781
+ }) {
782
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
783
+ SelectPrimitive.Item,
784
+ {
785
+ "data-slot": "select-item",
786
+ className: cn(
787
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
788
+ className
789
+ ),
790
+ ...props,
791
+ children: [
792
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Check, { className: "size-4" }) }) }),
793
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.ItemText, { children })
794
+ ]
795
+ }
796
+ );
797
+ }
798
+ function SelectScrollUpButton({
799
+ className,
800
+ ...props
801
+ }) {
802
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
803
+ SelectPrimitive.ScrollUpButton,
804
+ {
805
+ "data-slot": "select-scroll-up-button",
806
+ className: cn(
807
+ "flex cursor-default items-center justify-center py-1",
808
+ className
809
+ ),
810
+ ...props,
811
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronUp, { className: "size-4" })
812
+ }
813
+ );
814
+ }
815
+ function SelectScrollDownButton({
816
+ className,
817
+ ...props
818
+ }) {
819
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
820
+ SelectPrimitive.ScrollDownButton,
821
+ {
822
+ "data-slot": "select-scroll-down-button",
823
+ className: cn(
824
+ "flex cursor-default items-center justify-center py-1",
825
+ className
826
+ ),
827
+ ...props,
828
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronDown, { className: "size-4" })
829
+ }
830
+ );
831
+ }
832
+
833
+ // src/components/Global/SelectDropdown.tsx
834
+ var import_jsx_runtime21 = require("react/jsx-runtime");
835
+ function SelectDropdown({
836
+ options,
837
+ placeholder = "Select an option",
838
+ value,
839
+ onChange,
840
+ className,
841
+ id,
842
+ disabled,
843
+ readOnly,
844
+ style
845
+ }) {
846
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Select, { value, onValueChange: onChange, disabled, children: [
847
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
848
+ SelectTrigger,
849
+ {
850
+ id,
851
+ className,
852
+ style: style ?? {},
853
+ "aria-readonly": readOnly,
854
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectValue, { placeholder })
855
+ }
856
+ ),
857
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectContent, { children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
858
+ ] });
859
+ }
860
+
861
+ // src/components/Inputs/Dropdown/Dropdown.tsx
862
+ var import_jsx_runtime22 = require("react/jsx-runtime");
863
+ var Dropdown = ({ className, style, ...props }) => {
864
+ const text = Array.isArray(props.text) ? props.text : [props.text ?? "Default"];
865
+ const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
866
+ const formatList = text.map((item) => ({
867
+ label: item || "value1",
868
+ value: item
869
+ }));
870
+ const regexPattern = props.regexPattern ?? "";
871
+ const errorMessage = props.errorMessage ?? "Required";
872
+ const isRequired = props.isRequired ?? false;
873
+ const isEditable = props.isEditable ?? true;
874
+ const isDisabled = props.isDisabled ?? false;
875
+ const isReadonly = props.isReadonly ?? false;
876
+ const isAutocomplete = props.isAutocomplete ?? false;
877
+ const [value, setValue] = React7.useState("");
878
+ const [error, setError] = React7.useState(null);
879
+ const handleChange = (val) => {
880
+ setValue(val);
881
+ if (isRequired && val.trim() === "") {
882
+ setError(errorMessage);
883
+ } else if (regexPattern && !new RegExp(regexPattern).test(val)) {
884
+ setError(errorMessage);
885
+ } else {
886
+ setError(null);
887
+ }
888
+ };
889
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
890
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex gap-3 flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
891
+ SelectDropdown,
892
+ {
893
+ options: formatList,
894
+ placeholder,
895
+ id: "select-field",
896
+ value,
897
+ className,
898
+ style,
899
+ autoComplete: isAutocomplete ? "on" : "off",
900
+ onChange: handleChange,
901
+ disabled: isDisabled || !isEditable,
902
+ readOnly: isReadonly,
903
+ required: isRequired,
904
+ pattern: regexPattern || void 0
905
+ }
906
+ ) }),
907
+ error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
908
+ ] });
909
+ };
910
+
911
+ // src/components/ui/switch.tsx
912
+ var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
913
+ var import_jsx_runtime23 = require("react/jsx-runtime");
914
+ function Switch({
915
+ className,
916
+ ...props
917
+ }) {
918
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
919
+ SwitchPrimitive.Root,
920
+ {
921
+ "data-slot": "switch",
922
+ className: cn(
923
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
924
+ className
925
+ ),
926
+ ...props,
927
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
928
+ SwitchPrimitive.Thumb,
929
+ {
930
+ "data-slot": "switch-thumb",
931
+ className: cn(
932
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
933
+ )
934
+ }
935
+ )
936
+ }
937
+ );
938
+ }
939
+
940
+ // src/components/Inputs/SwitchToggle/SwitchToggle.tsx
941
+ var import_jsx_runtime24 = require("react/jsx-runtime");
942
+ var SwitchToggle = ({ className, style, ...props }) => {
943
+ const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
944
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className, style, children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center space-x-2 mb-2", children: [
945
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Switch, { id: `switch-${index}` }),
946
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Label, { htmlFor: `switch-${index}`, children: item })
947
+ ] }, index)) });
948
+ };
949
+
950
+ // src/components/Inputs/PhoneInput/PhoneInput.tsx
951
+ var React8 = __toESM(require("react"));
952
+ var import_react_international_phone = require("react-international-phone");
953
+ var import_style = require("react-international-phone/style.css");
954
+ var import_jsx_runtime25 = require("react/jsx-runtime");
955
+ var PhoneInput = ({ className, style, ...props }) => {
956
+ const placeholder = props.placeholder ?? "Enter phone number";
957
+ const [value, setValue] = React8.useState("");
958
+ const regexPattern = props.regexPattern ?? "";
959
+ const errorMessage = props.errorMessage ?? "Required";
960
+ const noOfCharacters = props.noOfCharacters ?? 100;
961
+ const isRequired = props.isRequired ?? false;
962
+ const isEditable = props.isEditable ?? true;
963
+ const isDisabled = props.isDisabled ?? false;
964
+ const [error, setError] = React8.useState(null);
965
+ const handleChange = (val) => {
966
+ if (val.length > noOfCharacters) return;
967
+ setValue(val);
968
+ if (isRequired && val.trim() === "") {
969
+ setError(errorMessage);
970
+ } else if (regexPattern && !new RegExp(regexPattern).test(val)) {
971
+ setError(errorMessage);
972
+ } else {
973
+ setError(null);
974
+ }
975
+ };
976
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
977
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
978
+ import_react_international_phone.PhoneInput,
979
+ {
980
+ defaultCountry: "in",
981
+ value,
982
+ onChange: (phone) => handleChange(phone),
983
+ inputProps: {
984
+ id: "phone-field",
985
+ required: isRequired
986
+ },
987
+ placeholder,
988
+ disabled: isDisabled || !isEditable,
989
+ required: isRequired,
990
+ className,
991
+ style
992
+ }
993
+ ),
994
+ error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
995
+ ] });
996
+ };
997
+
998
+ // src/components/Inputs/DatePicker/DatePicker.tsx
999
+ var import_react5 = __toESM(require("react"));
1000
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1001
+
1002
+ // src/components/Inputs/DateRange/DateRange.tsx
1003
+ var React11 = __toESM(require("react"));
1004
+ var import_date_fns = require("date-fns");
1005
+
1006
+ // src/components/ui/calendar.tsx
1007
+ var React10 = __toESM(require("react"));
1008
+ var import_react_day_picker = require("react-day-picker");
1009
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1010
+ function Calendar({
1011
+ className,
1012
+ classNames,
1013
+ showOutsideDays = true,
1014
+ captionLayout = "label",
1015
+ buttonVariant = "ghost",
1016
+ formatters,
1017
+ components,
1018
+ ...props
1019
+ }) {
1020
+ const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
1021
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1022
+ import_react_day_picker.DayPicker,
1023
+ {
1024
+ showOutsideDays,
1025
+ className: cn(
1026
+ "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
1027
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
1028
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
1029
+ className
1030
+ ),
1031
+ captionLayout,
1032
+ formatters: {
1033
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
1034
+ ...formatters
1035
+ },
1036
+ classNames: {
1037
+ root: cn("w-fit", defaultClassNames.root),
1038
+ months: cn(
1039
+ "flex gap-4 flex-col md:flex-row relative",
1040
+ defaultClassNames.months
1041
+ ),
1042
+ month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
1043
+ nav: cn(
1044
+ "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
1045
+ defaultClassNames.nav
1046
+ ),
1047
+ button_previous: cn(
1048
+ buttonVariants({ variant: buttonVariant }),
1049
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
1050
+ defaultClassNames.button_previous
1051
+ ),
1052
+ button_next: cn(
1053
+ buttonVariants({ variant: buttonVariant }),
1054
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
1055
+ defaultClassNames.button_next
1056
+ ),
1057
+ month_caption: cn(
1058
+ "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
1059
+ defaultClassNames.month_caption
1060
+ ),
1061
+ dropdowns: cn(
1062
+ "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
1063
+ defaultClassNames.dropdowns
1064
+ ),
1065
+ dropdown_root: cn(
1066
+ "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
1067
+ defaultClassNames.dropdown_root
1068
+ ),
1069
+ dropdown: cn(
1070
+ "absolute bg-popover inset-0 opacity-0",
1071
+ defaultClassNames.dropdown
1072
+ ),
1073
+ caption_label: cn(
1074
+ "select-none font-medium",
1075
+ captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
1076
+ defaultClassNames.caption_label
1077
+ ),
1078
+ table: "w-full border-collapse",
1079
+ weekdays: cn("flex", defaultClassNames.weekdays),
1080
+ weekday: cn(
1081
+ "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
1082
+ defaultClassNames.weekday
1083
+ ),
1084
+ week: cn("flex w-full mt-2", defaultClassNames.week),
1085
+ week_number_header: cn(
1086
+ "select-none w-(--cell-size)",
1087
+ defaultClassNames.week_number_header
1088
+ ),
1089
+ week_number: cn(
1090
+ "text-[0.8rem] select-none text-muted-foreground",
1091
+ defaultClassNames.week_number
1092
+ ),
1093
+ day: cn(
1094
+ "relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
1095
+ defaultClassNames.day
1096
+ ),
1097
+ range_start: cn(
1098
+ "rounded-l-md bg-accent",
1099
+ defaultClassNames.range_start
1100
+ ),
1101
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
1102
+ range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
1103
+ today: cn(
1104
+ "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
1105
+ defaultClassNames.today
1106
+ ),
1107
+ outside: cn(
1108
+ "text-muted-foreground aria-selected:text-muted-foreground",
1109
+ defaultClassNames.outside
1110
+ ),
1111
+ disabled: cn(
1112
+ "text-muted-foreground opacity-50",
1113
+ defaultClassNames.disabled
1114
+ ),
1115
+ hidden: cn("invisible", defaultClassNames.hidden),
1116
+ ...classNames
1117
+ },
1118
+ components: {
1119
+ Root: ({ className: className2, rootRef, ...props2 }) => {
1120
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1121
+ "div",
1122
+ {
1123
+ "data-slot": "calendar",
1124
+ ref: rootRef,
1125
+ className: cn(className2),
1126
+ ...props2
1127
+ }
1128
+ );
1129
+ },
1130
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
1131
+ if (orientation === "left") {
1132
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChevronLeft, { className: cn("size-4", className2), ...props2 });
1133
+ }
1134
+ if (orientation === "right") {
1135
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1136
+ ChevronRight,
1137
+ {
1138
+ className: cn("size-4", className2),
1139
+ ...props2
1140
+ }
1141
+ );
1142
+ }
1143
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChevronDown, { className: cn("size-4", className2), ...props2 });
1144
+ },
1145
+ DayButton: CalendarDayButton,
1146
+ WeekNumber: ({ children, ...props2 }) => {
1147
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
1148
+ },
1149
+ ...components
1150
+ },
1151
+ ...props
1152
+ }
1153
+ );
1154
+ }
1155
+ function CalendarDayButton({
1156
+ className,
1157
+ day,
1158
+ modifiers,
1159
+ ...props
1160
+ }) {
1161
+ const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
1162
+ const ref = React10.useRef(null);
1163
+ React10.useEffect(() => {
1164
+ if (modifiers.focused) ref.current?.focus();
1165
+ }, [modifiers.focused]);
1166
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1167
+ Button,
1168
+ {
1169
+ ref,
1170
+ variant: "ghost",
1171
+ size: "icon",
1172
+ "data-day": day.date.toLocaleDateString(),
1173
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1174
+ "data-range-start": modifiers.range_start,
1175
+ "data-range-end": modifiers.range_end,
1176
+ "data-range-middle": modifiers.range_middle,
1177
+ className: cn(
1178
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
1179
+ defaultClassNames.day,
1180
+ className
1181
+ ),
1182
+ ...props
1183
+ }
1184
+ );
1185
+ }
1186
+
1187
+ // src/components/ui/popover.tsx
1188
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
1189
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1190
+ function Popover({
1191
+ ...props
1192
+ }) {
1193
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
1194
+ }
1195
+ function PopoverTrigger({
1196
+ ...props
1197
+ }) {
1198
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
1199
+ }
1200
+ function PopoverContent({
1201
+ className,
1202
+ align = "center",
1203
+ sideOffset = 4,
1204
+ ...props
1205
+ }) {
1206
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1207
+ PopoverPrimitive.Content,
1208
+ {
1209
+ "data-slot": "popover-content",
1210
+ align,
1211
+ sideOffset,
1212
+ className: cn(
1213
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
1214
+ className
1215
+ ),
1216
+ ...props
1217
+ }
1218
+ ) });
1219
+ }
1220
+
1221
+ // src/components/Inputs/DateRange/DateRange.tsx
1222
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1223
+ var DateRange = ({ className, style }) => {
1224
+ const [date, setDate] = React11.useState({
1225
+ from: /* @__PURE__ */ new Date(),
1226
+ to: (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
1227
+ });
1228
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Popover, { children: [
1229
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1230
+ Button,
1231
+ {
1232
+ id: "date",
1233
+ variant: "outline",
1234
+ className: cn(
1235
+ "w-[300px] justify-start text-left font-normal text-[11px]",
1236
+ !date && "text-muted-foreground"
1237
+ ),
1238
+ children: date?.from ? date.to ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1239
+ (0, import_date_fns.format)(date.from, "LLL dd, y"),
1240
+ " -",
1241
+ " ",
1242
+ (0, import_date_fns.format)(date.to, "LLL dd, y")
1243
+ ] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Pick a date range" })
1244
+ }
1245
+ ) }),
1246
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1247
+ Calendar,
1248
+ {
1249
+ mode: "range",
1250
+ defaultMonth: date?.from,
1251
+ selected: date,
1252
+ onSelect: setDate,
1253
+ numberOfMonths: 2
1254
+ }
1255
+ ) })
1256
+ ] }) });
1257
+ };
1258
+
1259
+ // src/components/ui/data-table.tsx
1260
+ var import_react_table = require("@tanstack/react-table");
1261
+
1262
+ // src/components/ui/table.tsx
1263
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1264
+ function Table({ className, ...props }) {
1265
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1266
+ "div",
1267
+ {
1268
+ "data-slot": "table-container",
1269
+ className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
1270
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1271
+ "table",
1272
+ {
1273
+ "data-slot": "table",
1274
+ className: cn("w-full text-sm", className),
1275
+ ...props
1276
+ }
1277
+ )
1278
+ }
1279
+ );
1280
+ }
1281
+ function TableHeader({ className, ...props }) {
1282
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1283
+ "thead",
1284
+ {
1285
+ "data-slot": "table-header",
1286
+ className: cn(
1287
+ "bg-gray-100 text-gray-700 [&>tr]:border-b [&>tr]:border-gray-200 [&>tr>th]:border-r [&>tr>th]:border-gray-200 [&>tr>th]:last:border-r-0",
1288
+ className
1289
+ ),
1290
+ ...props
1291
+ }
1292
+ );
1293
+ }
1294
+ function TableBody({ className, ...props }) {
1295
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1296
+ "tbody",
1297
+ {
1298
+ "data-slot": "table-body",
1299
+ className: cn(
1300
+ "[&>tr]:border-b [&>tr]:border-gray-200 [&>tr:last-child]:border-0 [&>tr>td]:border-r [&>tr>td]:border-gray-200 [&>tr>td]:last:border-r-0",
1301
+ className
1302
+ ),
1303
+ ...props
1304
+ }
1305
+ );
1306
+ }
1307
+ function TableRow({ className, ...props }) {
1308
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1309
+ "tr",
1310
+ {
1311
+ "data-slot": "table-row",
1312
+ className: cn(
1313
+ "border-b border-gray-200 hover:bg-gray-50 transition-colors",
1314
+ className
1315
+ ),
1316
+ ...props
1317
+ }
1318
+ );
1319
+ }
1320
+ function TableHead({ className, ...props }) {
1321
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1322
+ "th",
1323
+ {
1324
+ "data-slot": "table-head",
1325
+ className: cn(
1326
+ "h-12 px-6 text-left align-middle font-semibold whitespace-nowrap",
1327
+ className
1328
+ ),
1329
+ ...props
1330
+ }
1331
+ );
1332
+ }
1333
+ function TableCell({ className, ...props }) {
1334
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1335
+ "td",
1336
+ {
1337
+ "data-slot": "table-cell",
1338
+ className: cn(
1339
+ "px-6 py-4 align-middle text-gray-700",
1340
+ className
1341
+ ),
1342
+ ...props
1343
+ }
1344
+ );
1345
+ }
1346
+
1347
+ // src/components/ui/data-table.tsx
1348
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1349
+ function DataTable({
1350
+ columns,
1351
+ rowActions,
1352
+ data,
1353
+ loading,
1354
+ getRowSelection,
1355
+ onCellClick,
1356
+ cellClickEnabled = () => false
1357
+ }) {
1358
+ const table = (0, import_react_table.useReactTable)({
1359
+ data,
1360
+ columns,
1361
+ enableRowSelection: true,
1362
+ onRowSelectionChange: getRowSelection ? (updaterOrValue) => {
1363
+ const value = typeof updaterOrValue === "function" ? updaterOrValue(table.getState().rowSelection) : updaterOrValue;
1364
+ getRowSelection(value);
1365
+ } : void 0,
1366
+ getCoreRowModel: (0, import_react_table.getCoreRowModel)()
1367
+ });
1368
+ const handleCellClick = (rowData, columnId) => {
1369
+ if (onCellClick) {
1370
+ onCellClick(rowData, columnId);
1371
+ }
1372
+ };
1373
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Table, { children: [
1374
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
1375
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
1376
+ header.column.columnDef.header,
1377
+ header.getContext()
1378
+ ) }, header.id);
1379
+ }) }, headerGroup.id)) }),
1380
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1381
+ TableRow,
1382
+ {
1383
+ "data-state": row.getIsSelected() && "selected",
1384
+ className: "relative group",
1385
+ children: [
1386
+ row.getVisibleCells().map((cell) => {
1387
+ const isCellClickable = cellClickEnabled(row.original, cell.column.id);
1388
+ const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
1389
+ const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
1390
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1391
+ TableCell,
1392
+ {
1393
+ className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
1394
+ style: dynamicStyle,
1395
+ onClick: () => {
1396
+ if (isCellClickable) {
1397
+ handleCellClick(row.original, cell.column.id);
1398
+ }
1399
+ },
1400
+ children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
1401
+ },
1402
+ cell.id
1403
+ );
1404
+ }),
1405
+ rowActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.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_runtime31.jsx)("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
1406
+ ]
1407
+ },
1408
+ row.id
1409
+ )) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
1410
+ ] }) });
1411
+ }
1412
+
1413
+ // src/components/DataDisplay/Table/Table.tsx
1414
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1415
+ var Table2 = ({ columns, data, rowActions }) => {
1416
+ const rawColumns = Array.isArray(columns) ? columns : [];
1417
+ const rawData = Array.isArray(data) ? data : [];
1418
+ const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
1419
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions });
1420
+ };
1421
+ var Table_default = Table2;
1422
+
1423
+ // src/components/ui/dropdown-menu.tsx
1424
+ var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
1425
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1426
+ function DropdownMenu({
1427
+ ...props
1428
+ }) {
1429
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
1430
+ }
1431
+ function DropdownMenuTrigger({
1432
+ ...props
1433
+ }) {
1434
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1435
+ DropdownMenuPrimitive.Trigger,
1436
+ {
1437
+ "data-slot": "dropdown-menu-trigger",
1438
+ ...props
1439
+ }
1440
+ );
1441
+ }
1442
+ function DropdownMenuContent({
1443
+ className,
1444
+ sideOffset = 4,
1445
+ ...props
1446
+ }) {
1447
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1448
+ DropdownMenuPrimitive.Content,
1449
+ {
1450
+ "data-slot": "dropdown-menu-content",
1451
+ sideOffset,
1452
+ className: cn(
1453
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
1454
+ className
1455
+ ),
1456
+ ...props
1457
+ }
1458
+ ) });
1459
+ }
1460
+ function DropdownMenuItem({
1461
+ className,
1462
+ inset,
1463
+ variant = "default",
1464
+ ...props
1465
+ }) {
1466
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1467
+ DropdownMenuPrimitive.Item,
1468
+ {
1469
+ "data-slot": "dropdown-menu-item",
1470
+ "data-inset": inset,
1471
+ "data-variant": variant,
1472
+ className: cn(
1473
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1474
+ className
1475
+ ),
1476
+ ...props
1477
+ }
1478
+ );
1479
+ }
1480
+
1481
+ // src/components/Navigation/Tabs/Tabs.tsx
1482
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1483
+ var Tabs = ({ tabs, className, style }) => {
1484
+ const rawTabs = Array.isArray(tabs) ? tabs : [];
1485
+ 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 ";
1486
+ const activeClasses = "bg-white/10 text-white";
1487
+ const hoverClasses = "hover:bg-white/5";
1488
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className, style, children: rawTabs.map((tab, index) => {
1489
+ const finalClasses = [
1490
+ baseClasses,
1491
+ tab.isActive ? activeClasses : hoverClasses,
1492
+ tab.className || ""
1493
+ ].join(" ");
1494
+ const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
1495
+ if (hasDropdown) {
1496
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DropdownMenu, { children: [
1497
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
1498
+ DropdownMenuTrigger,
1499
+ {
1500
+ className: `${finalClasses} inline-flex items-center gap-1`,
1501
+ children: [
1502
+ tab.header,
1503
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
1504
+ ]
1505
+ }
1506
+ ),
1507
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1508
+ DropdownMenuContent,
1509
+ {
1510
+ align: "start",
1511
+ sideOffset: 6,
1512
+ className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
1513
+ children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1514
+ DropdownMenuItem,
1515
+ {
1516
+ asChild: true,
1517
+ className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
1518
+ children: item.header
1519
+ },
1520
+ item.id
1521
+ ))
1522
+ }
1523
+ )
1524
+ ] }, index);
1525
+ }
1526
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: finalClasses, style: { backgroundColor: "transparent", border: "none", ...tab.style }, role: "button", tabIndex: 0, children: tab.header }, index);
1527
+ }) });
1528
+ };
1529
+ var Tabs_default = Tabs;
1530
+
1531
+ // src/components/Navigation/Stages/Stages.tsx
1532
+ var import_react6 = __toESM(require("react"));
1533
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1534
+ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
1535
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between bg-gray-50 p-2 rounded-lg border border-gray-200 w-full", children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center flex-1 px-2", children: stages.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react6.default.Fragment, { children: [
1538
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1539
+ "button",
1540
+ {
1541
+ className: `
1542
+ min-w-[120px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap ${stage.isActive ? "bg-[#034486] text-white shadow-md" : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}`,
1543
+ children: stage.header
1544
+ }
1545
+ ),
1546
+ index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
1547
+ ] }, stage.id)) }),
1548
+ isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.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 }) })
1549
+ ] }) });
1550
+ };
1551
+ var Stages_default = StagesComponent;
1552
+
1553
+ // src/components/Navigation/Spacer/Spacer.tsx
1554
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1555
+ var Spacer = ({ className, style }) => {
1556
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `${className}`, style });
1557
+ };
1558
+ var Spacer_default = Spacer;
1559
+
1560
+ // src/components/Navigation/Profile/Profile.tsx
1561
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1562
+ var Profile = ({ profileType, showName, userName, className, style }) => {
1563
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
1564
+ showName && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h4", { className: "text-[#000000] dark:text-[#fff] text-[13px] font-[500] mb-0", children: userName }),
1565
+ profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1566
+ "img",
1567
+ {
1568
+ src: "https://builder.development.algorithmshift.ai/images/toolset/profile.svg",
1569
+ alt: "auto",
1570
+ width: 24,
1571
+ height: 24
1572
+ }
1573
+ ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "w-6 h-6 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: "A" })
1574
+ ] }) });
1575
+ };
1576
+ var Profile_default = Profile;
1577
+
1578
+ // src/components/Navigation/Notification/Notification.tsx
1579
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1580
+ var Notification = ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }) => {
1581
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "w-[34px] h-[34px] bg-[#E9E9E9] rounded-md text-center flex items-center justify-center relative", children: [
1582
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1583
+ "img",
1584
+ {
1585
+ src: "https://builder.development.algorithmshift.ai/images/toolset/notification.svg",
1586
+ alt: "auto",
1587
+ width: 18,
1588
+ height: 18
1589
+ }
1590
+ ),
1591
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.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_runtime38.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]" })
1592
+ ] }) });
1593
+ };
1594
+ var Notification_default = Notification;
1595
+
1596
+ // src/components/Navigation/Logo/Logo.tsx
1597
+ var import_jsx_runtime39 = require("react/jsx-runtime");
1598
+ var ImageControl = ({
1599
+ className,
1600
+ style,
1601
+ imageUrl
1602
+ }) => {
1603
+ let src;
1604
+ let extraProps;
1605
+ if (imageUrl) {
1606
+ src = imageUrl;
1607
+ extraProps = {
1608
+ className: "w-full h-full"
1609
+ };
1610
+ } else {
1611
+ src = "https://builder.development.algorithmshift.ai/_next/image?url=%2Fdrag_and_drop.png&w=1920&q=75";
1612
+ extraProps = {
1613
+ width: 50,
1614
+ height: 50,
1615
+ className: "opacity-50"
1616
+ };
1617
+ }
1618
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("img", { src, alt: "Preview", sizes: "100vw", ...extraProps }) });
1619
+ };
1620
+ var Logo_default = ImageControl;
108
1621
  // Annotate the CommonJS export names for ESM import in node:
109
1622
  0 && (module.exports = {
110
1623
  Button,
111
- CustomButton,
1624
+ CheckboxInput,
1625
+ DateRange,
1626
+ Dropdown,
1627
+ EmailInput,
1628
+ FlexLayout,
1629
+ GridLayout,
1630
+ Logo,
1631
+ MultiCheckbox,
1632
+ Notification,
1633
+ PasswordInput,
1634
+ PhoneInput,
1635
+ Profile,
1636
+ RadioInput,
1637
+ Spacer,
1638
+ Stages,
1639
+ SwitchToggle,
1640
+ Table,
1641
+ Tabs,
1642
+ TextInput,
1643
+ Textarea,
1644
+ UrlInput,
112
1645
  buttonVariants,
113
1646
  cn
114
1647
  });
1648
+ /*! Bundled license information:
1649
+
1650
+ lucide-react/dist/esm/shared/src/utils.js:
1651
+ lucide-react/dist/esm/defaultAttributes.js:
1652
+ lucide-react/dist/esm/Icon.js:
1653
+ lucide-react/dist/esm/createLucideIcon.js:
1654
+ lucide-react/dist/esm/icons/check.js:
1655
+ lucide-react/dist/esm/icons/chevron-down.js:
1656
+ lucide-react/dist/esm/icons/chevron-left.js:
1657
+ lucide-react/dist/esm/icons/chevron-right.js:
1658
+ lucide-react/dist/esm/icons/chevron-up.js:
1659
+ lucide-react/dist/esm/icons/circle.js:
1660
+ lucide-react/dist/esm/icons/mail.js:
1661
+ lucide-react/dist/esm/icons/scan-eye.js:
1662
+ lucide-react/dist/esm/lucide-react.js:
1663
+ (**
1664
+ * @license lucide-react v0.542.0 - ISC
1665
+ *
1666
+ * This source code is licensed under the ISC license.
1667
+ * See the LICENSE file in the root directory of this source tree.
1668
+ *)
1669
+ */
115
1670
  //# sourceMappingURL=index.js.map