@algorithm-shift/design-system 1.2.55 → 1.2.57
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/client.js +3 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +3 -2
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +17 -13
- package/dist/index.d.ts +17 -13
- package/dist/index.js +370 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +327 -308
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
var src_exports = {};
|
|
33
33
|
__export(src_exports, {
|
|
34
34
|
Accordion: () => Accordion_default,
|
|
35
|
+
AccordionGroup: () => AccordionGroup_default,
|
|
35
36
|
BarChart: () => BarChart_default,
|
|
36
37
|
Breadcrumb: () => Breadcrumb_default,
|
|
37
38
|
Button: () => Button_default,
|
|
@@ -60,6 +61,7 @@ __export(src_exports, {
|
|
|
60
61
|
RichText: () => RichText,
|
|
61
62
|
Search: () => SearchInput_default,
|
|
62
63
|
Shape: () => Shape_default,
|
|
64
|
+
Slot: () => Slot_default,
|
|
63
65
|
Spacer: () => Spacer_default,
|
|
64
66
|
Stages: () => Stages_default,
|
|
65
67
|
SwitchToggle: () => SwitchToggle_default,
|
|
@@ -177,6 +179,22 @@ var Accordion = ({
|
|
|
177
179
|
};
|
|
178
180
|
var Accordion_default = Accordion;
|
|
179
181
|
|
|
182
|
+
// src/components/Layout/Slot.tsx
|
|
183
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
184
|
+
var Slot = ({
|
|
185
|
+
children
|
|
186
|
+
}) => {
|
|
187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children });
|
|
188
|
+
};
|
|
189
|
+
var Slot_default = Slot;
|
|
190
|
+
|
|
191
|
+
// src/components/Layout/AccordionGroup.tsx
|
|
192
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
193
|
+
var AccordionGroup = ({ children, style, className }) => {
|
|
194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className, style, children });
|
|
195
|
+
};
|
|
196
|
+
var AccordionGroup_default = AccordionGroup;
|
|
197
|
+
|
|
180
198
|
// src/components/ui/button.tsx
|
|
181
199
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
182
200
|
var import_class_variance_authority = require("class-variance-authority");
|
|
@@ -199,7 +217,7 @@ function getInitials(name) {
|
|
|
199
217
|
}
|
|
200
218
|
|
|
201
219
|
// src/components/ui/button.tsx
|
|
202
|
-
var
|
|
220
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
203
221
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
204
222
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
205
223
|
{
|
|
@@ -233,7 +251,7 @@ function Button({
|
|
|
233
251
|
...props
|
|
234
252
|
}) {
|
|
235
253
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
236
|
-
return /* @__PURE__ */ (0,
|
|
254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
237
255
|
Comp,
|
|
238
256
|
{
|
|
239
257
|
"data-slot": "button",
|
|
@@ -244,14 +262,14 @@ function Button({
|
|
|
244
262
|
}
|
|
245
263
|
|
|
246
264
|
// src/components/Basic/Button/Button.tsx
|
|
247
|
-
var
|
|
265
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
248
266
|
var ButtonWrapper = ({
|
|
249
267
|
className,
|
|
250
268
|
style,
|
|
251
269
|
textContent = "Button",
|
|
252
270
|
...props
|
|
253
271
|
}) => {
|
|
254
|
-
return /* @__PURE__ */ (0,
|
|
272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
255
273
|
Button,
|
|
256
274
|
{
|
|
257
275
|
...props,
|
|
@@ -267,7 +285,7 @@ var Button_default = ButtonWrapper;
|
|
|
267
285
|
var image_placeholder_default = "data:image/png;base64,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";
|
|
268
286
|
|
|
269
287
|
// src/components/Basic/Image/Image.tsx
|
|
270
|
-
var
|
|
288
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
271
289
|
var ImageControl = ({
|
|
272
290
|
className,
|
|
273
291
|
style,
|
|
@@ -284,21 +302,21 @@ var ImageControl = ({
|
|
|
284
302
|
className
|
|
285
303
|
);
|
|
286
304
|
if (!imageUrl && !imageUrlExternal) {
|
|
287
|
-
return /* @__PURE__ */ (0,
|
|
305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: imageClass, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { src: image_placeholder_default, alt: altText, className: "opacity-50", width: 50, height: 50 }) });
|
|
288
306
|
}
|
|
289
307
|
const url = imageUrlExternal || imageUrl;
|
|
290
|
-
return /* @__PURE__ */ (0,
|
|
308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { src: url, alt: altText, className: defaultImgClass, style });
|
|
291
309
|
};
|
|
292
310
|
var Image_default = ImageControl;
|
|
293
311
|
|
|
294
312
|
// src/components/Basic/Shape/Shape.tsx
|
|
295
|
-
var
|
|
313
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
296
314
|
var Shape = ({
|
|
297
315
|
children,
|
|
298
316
|
className,
|
|
299
317
|
style
|
|
300
318
|
}) => {
|
|
301
|
-
return /* @__PURE__ */ (0,
|
|
319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className, style, children });
|
|
302
320
|
};
|
|
303
321
|
var Shape_default = Shape;
|
|
304
322
|
|
|
@@ -26636,9 +26654,9 @@ var ZoomOut = createLucideIcon("zoom-out", __iconNode1634);
|
|
|
26636
26654
|
|
|
26637
26655
|
// src/components/Basic/Breadcrumb/Breadcrumb.tsx
|
|
26638
26656
|
var import_link3 = __toESM(require("next/link"));
|
|
26639
|
-
var
|
|
26657
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
26640
26658
|
var Breadcrumb = ({ list = [], className, style }) => {
|
|
26641
|
-
return /* @__PURE__ */ (0,
|
|
26659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
26642
26660
|
"nav",
|
|
26643
26661
|
{
|
|
26644
26662
|
"aria-label": "breadcrumb",
|
|
@@ -26646,16 +26664,16 @@ var Breadcrumb = ({ list = [], className, style }) => {
|
|
|
26646
26664
|
style,
|
|
26647
26665
|
children: list.map((item, index) => {
|
|
26648
26666
|
const isLast = index === list.length - 1;
|
|
26649
|
-
return /* @__PURE__ */ (0,
|
|
26650
|
-
item.url && !isLast ? /* @__PURE__ */ (0,
|
|
26667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center", children: [
|
|
26668
|
+
item.url && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
26651
26669
|
import_link3.default,
|
|
26652
26670
|
{
|
|
26653
26671
|
href: item.url,
|
|
26654
26672
|
className: "hover:text-foreground transition-colors",
|
|
26655
26673
|
children: item.header
|
|
26656
26674
|
}
|
|
26657
|
-
) : /* @__PURE__ */ (0,
|
|
26658
|
-
!isLast && /* @__PURE__ */ (0,
|
|
26675
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-foreground font-medium", children: item.header }),
|
|
26676
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChevronRight, { className: "mx-2 h-4 w-4 text-muted-foreground" })
|
|
26659
26677
|
] }, item.id);
|
|
26660
26678
|
})
|
|
26661
26679
|
}
|
|
@@ -26665,16 +26683,16 @@ var Breadcrumb_default = Breadcrumb;
|
|
|
26665
26683
|
|
|
26666
26684
|
// src/components/ui/dropdown-menu.tsx
|
|
26667
26685
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
26668
|
-
var
|
|
26686
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
26669
26687
|
function DropdownMenu({
|
|
26670
26688
|
...props
|
|
26671
26689
|
}) {
|
|
26672
|
-
return /* @__PURE__ */ (0,
|
|
26690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
26673
26691
|
}
|
|
26674
26692
|
function DropdownMenuTrigger({
|
|
26675
26693
|
...props
|
|
26676
26694
|
}) {
|
|
26677
|
-
return /* @__PURE__ */ (0,
|
|
26695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
26678
26696
|
DropdownMenuPrimitive.Trigger,
|
|
26679
26697
|
{
|
|
26680
26698
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -26687,7 +26705,7 @@ function DropdownMenuContent({
|
|
|
26687
26705
|
sideOffset = 4,
|
|
26688
26706
|
...props
|
|
26689
26707
|
}) {
|
|
26690
|
-
return /* @__PURE__ */ (0,
|
|
26708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
26691
26709
|
DropdownMenuPrimitive.Content,
|
|
26692
26710
|
{
|
|
26693
26711
|
"data-slot": "dropdown-menu-content",
|
|
@@ -26706,7 +26724,7 @@ function DropdownMenuItem({
|
|
|
26706
26724
|
variant = "default",
|
|
26707
26725
|
...props
|
|
26708
26726
|
}) {
|
|
26709
|
-
return /* @__PURE__ */ (0,
|
|
26727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
26710
26728
|
DropdownMenuPrimitive.Item,
|
|
26711
26729
|
{
|
|
26712
26730
|
"data-slot": "dropdown-menu-item",
|
|
@@ -26723,7 +26741,7 @@ function DropdownMenuItem({
|
|
|
26723
26741
|
function DropdownMenuSub({
|
|
26724
26742
|
...props
|
|
26725
26743
|
}) {
|
|
26726
|
-
return /* @__PURE__ */ (0,
|
|
26744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
26727
26745
|
}
|
|
26728
26746
|
function DropdownMenuSubTrigger({
|
|
26729
26747
|
className,
|
|
@@ -26731,7 +26749,7 @@ function DropdownMenuSubTrigger({
|
|
|
26731
26749
|
children,
|
|
26732
26750
|
...props
|
|
26733
26751
|
}) {
|
|
26734
|
-
return /* @__PURE__ */ (0,
|
|
26752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
26735
26753
|
DropdownMenuPrimitive.SubTrigger,
|
|
26736
26754
|
{
|
|
26737
26755
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -26743,7 +26761,7 @@ function DropdownMenuSubTrigger({
|
|
|
26743
26761
|
...props,
|
|
26744
26762
|
children: [
|
|
26745
26763
|
children,
|
|
26746
|
-
/* @__PURE__ */ (0,
|
|
26764
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ChevronRight, { className: "ml-auto size-4" })
|
|
26747
26765
|
]
|
|
26748
26766
|
}
|
|
26749
26767
|
);
|
|
@@ -26752,7 +26770,7 @@ function DropdownMenuSubContent({
|
|
|
26752
26770
|
className,
|
|
26753
26771
|
...props
|
|
26754
26772
|
}) {
|
|
26755
|
-
return /* @__PURE__ */ (0,
|
|
26773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
26756
26774
|
DropdownMenuPrimitive.SubContent,
|
|
26757
26775
|
{
|
|
26758
26776
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -26767,11 +26785,11 @@ function DropdownMenuSubContent({
|
|
|
26767
26785
|
|
|
26768
26786
|
// src/components/Basic/ButtonGroup/ButtonGroup.tsx
|
|
26769
26787
|
var import_link4 = __toESM(require("next/link"));
|
|
26770
|
-
var
|
|
26788
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
26771
26789
|
function SplitButton({ style, textContent, className, list = [] }) {
|
|
26772
26790
|
const bgColor = style?.backgroundColor || "";
|
|
26773
|
-
return /* @__PURE__ */ (0,
|
|
26774
|
-
/* @__PURE__ */ (0,
|
|
26791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "inline-flex rounded-md overflow-hidden border border-teal-200 bg-teal-700 items-center focus:ring-0", style: { backgroundColor: bgColor }, children: [
|
|
26792
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
26775
26793
|
Button,
|
|
26776
26794
|
{
|
|
26777
26795
|
className: `rounded-none border-r px-4 py-2 text-whit focus:ring-0 ${className || ""}`,
|
|
@@ -26779,17 +26797,17 @@ function SplitButton({ style, textContent, className, list = [] }) {
|
|
|
26779
26797
|
children: textContent || "Button"
|
|
26780
26798
|
}
|
|
26781
26799
|
),
|
|
26782
|
-
/* @__PURE__ */ (0,
|
|
26783
|
-
/* @__PURE__ */ (0,
|
|
26800
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenu, { children: [
|
|
26801
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
26784
26802
|
Button,
|
|
26785
26803
|
{
|
|
26786
26804
|
className: "rounded-none bg-teal-700 px-4 py-2 text-white ring-0 shadow-none hover:bg-teal-600 focus:ring-0",
|
|
26787
26805
|
"aria-label": "Open Dropdown",
|
|
26788
26806
|
style: { backgroundColor: bgColor },
|
|
26789
|
-
children: /* @__PURE__ */ (0,
|
|
26807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronDown, { className: "w-4 h-4" })
|
|
26790
26808
|
}
|
|
26791
26809
|
) }),
|
|
26792
|
-
/* @__PURE__ */ (0,
|
|
26810
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuContent, { align: "end", className: "bg-white min-w-[120px]", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_link4.default, { href: item.url || "#", children: item.header }) }, item.id)) })
|
|
26793
26811
|
] })
|
|
26794
26812
|
] });
|
|
26795
26813
|
}
|
|
@@ -26797,7 +26815,7 @@ function SplitButton({ style, textContent, className, list = [] }) {
|
|
|
26797
26815
|
// src/components/Basic/Icon/Icon.tsx
|
|
26798
26816
|
var faSolid = __toESM(require("@fortawesome/free-solid-svg-icons"));
|
|
26799
26817
|
var import_react_fontawesome = require("@fortawesome/react-fontawesome");
|
|
26800
|
-
var
|
|
26818
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
26801
26819
|
var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize = 10, style }) => {
|
|
26802
26820
|
let content = null;
|
|
26803
26821
|
if (iconType === "fontawesome") {
|
|
@@ -26806,7 +26824,7 @@ var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize
|
|
|
26806
26824
|
if (!faIcon) {
|
|
26807
26825
|
return null;
|
|
26808
26826
|
}
|
|
26809
|
-
content = /* @__PURE__ */ (0,
|
|
26827
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
26810
26828
|
import_react_fontawesome.FontAwesomeIcon,
|
|
26811
26829
|
{
|
|
26812
26830
|
icon: faIcon,
|
|
@@ -26820,16 +26838,16 @@ var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize
|
|
|
26820
26838
|
if (!Lucide) {
|
|
26821
26839
|
return null;
|
|
26822
26840
|
}
|
|
26823
|
-
content = /* @__PURE__ */ (0,
|
|
26841
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Lucide, { className: cn("w-5 h-5"), size: fontSize, style: { color: style?.color } });
|
|
26824
26842
|
}
|
|
26825
|
-
return /* @__PURE__ */ (0,
|
|
26843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style, className, children: content });
|
|
26826
26844
|
};
|
|
26827
26845
|
var Icon_default = Icon2;
|
|
26828
26846
|
|
|
26829
26847
|
// src/components/ui/input.tsx
|
|
26830
|
-
var
|
|
26848
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
26831
26849
|
function Input({ className, type, ...props }) {
|
|
26832
|
-
return /* @__PURE__ */ (0,
|
|
26850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
26833
26851
|
"input",
|
|
26834
26852
|
{
|
|
26835
26853
|
type,
|
|
@@ -26846,7 +26864,7 @@ function Input({ className, type, ...props }) {
|
|
|
26846
26864
|
}
|
|
26847
26865
|
|
|
26848
26866
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
26849
|
-
var
|
|
26867
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
26850
26868
|
var TextInput = ({ className, style, ...props }) => {
|
|
26851
26869
|
const placeholder = props.placeholder || "Placeholder text";
|
|
26852
26870
|
const isEditable = props.isEditable ?? true;
|
|
@@ -26856,8 +26874,8 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
26856
26874
|
const handleChange = (e) => {
|
|
26857
26875
|
props.onChange?.(e);
|
|
26858
26876
|
};
|
|
26859
|
-
return /* @__PURE__ */ (0,
|
|
26860
|
-
/* @__PURE__ */ (0,
|
|
26877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
26878
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
26861
26879
|
Input,
|
|
26862
26880
|
{
|
|
26863
26881
|
type: "text",
|
|
@@ -26875,13 +26893,13 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
26875
26893
|
readOnly: isReadonly
|
|
26876
26894
|
}
|
|
26877
26895
|
),
|
|
26878
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
26896
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26879
26897
|
] });
|
|
26880
26898
|
};
|
|
26881
26899
|
var TextInput_default = TextInput;
|
|
26882
26900
|
|
|
26883
26901
|
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
26884
|
-
var
|
|
26902
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
26885
26903
|
var NumberInput = ({ className, style, ...props }) => {
|
|
26886
26904
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26887
26905
|
const isEditable = props.isEditable ?? true;
|
|
@@ -26891,10 +26909,10 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
26891
26909
|
const handleChange = (e) => {
|
|
26892
26910
|
props.onChange?.(e);
|
|
26893
26911
|
};
|
|
26894
|
-
return /* @__PURE__ */ (0,
|
|
26895
|
-
/* @__PURE__ */ (0,
|
|
26896
|
-
/* @__PURE__ */ (0,
|
|
26897
|
-
/* @__PURE__ */ (0,
|
|
26912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
26913
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
26914
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Calculator, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
26915
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
26898
26916
|
Input,
|
|
26899
26917
|
{
|
|
26900
26918
|
type: "number",
|
|
@@ -26914,13 +26932,13 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
26914
26932
|
}
|
|
26915
26933
|
)
|
|
26916
26934
|
] }),
|
|
26917
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
26935
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26918
26936
|
] });
|
|
26919
26937
|
};
|
|
26920
26938
|
var NumberInput_default = NumberInput;
|
|
26921
26939
|
|
|
26922
26940
|
// src/components/Inputs/EmailInput/EmailInput.tsx
|
|
26923
|
-
var
|
|
26941
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
26924
26942
|
var EmailInput = ({ className, style, ...props }) => {
|
|
26925
26943
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26926
26944
|
const isEditable = props.isEditable ?? true;
|
|
@@ -26930,10 +26948,10 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
26930
26948
|
const handleChange = (e) => {
|
|
26931
26949
|
props.onChange?.(e);
|
|
26932
26950
|
};
|
|
26933
|
-
return /* @__PURE__ */ (0,
|
|
26934
|
-
/* @__PURE__ */ (0,
|
|
26935
|
-
/* @__PURE__ */ (0,
|
|
26936
|
-
/* @__PURE__ */ (0,
|
|
26951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
26952
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
26953
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Mail, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
26954
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
26937
26955
|
Input,
|
|
26938
26956
|
{
|
|
26939
26957
|
type: "email",
|
|
@@ -26952,13 +26970,13 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
26952
26970
|
}
|
|
26953
26971
|
)
|
|
26954
26972
|
] }),
|
|
26955
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
26973
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26956
26974
|
] });
|
|
26957
26975
|
};
|
|
26958
26976
|
var EmailInput_default = EmailInput;
|
|
26959
26977
|
|
|
26960
26978
|
// src/components/Inputs/PasswordInput/PasswordInput.tsx
|
|
26961
|
-
var
|
|
26979
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
26962
26980
|
var PasswordInput = ({ className, style, ...props }) => {
|
|
26963
26981
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
26964
26982
|
const isEditable = props.isEditable ?? true;
|
|
@@ -26968,10 +26986,10 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
26968
26986
|
const handleChange = (e) => {
|
|
26969
26987
|
props.onChange?.(e);
|
|
26970
26988
|
};
|
|
26971
|
-
return /* @__PURE__ */ (0,
|
|
26972
|
-
/* @__PURE__ */ (0,
|
|
26973
|
-
/* @__PURE__ */ (0,
|
|
26974
|
-
/* @__PURE__ */ (0,
|
|
26989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
26990
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
26991
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ScanEye, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
26992
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
26975
26993
|
Input,
|
|
26976
26994
|
{
|
|
26977
26995
|
type: "password",
|
|
@@ -26991,15 +27009,15 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
26991
27009
|
}
|
|
26992
27010
|
)
|
|
26993
27011
|
] }),
|
|
26994
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27012
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
26995
27013
|
] });
|
|
26996
27014
|
};
|
|
26997
27015
|
var PasswordInput_default = PasswordInput;
|
|
26998
27016
|
|
|
26999
27017
|
// src/components/ui/textarea.tsx
|
|
27000
|
-
var
|
|
27018
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
27001
27019
|
function Textarea({ className, ...props }) {
|
|
27002
|
-
return /* @__PURE__ */ (0,
|
|
27020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
27003
27021
|
"textarea",
|
|
27004
27022
|
{
|
|
27005
27023
|
"data-slot": "textarea",
|
|
@@ -27013,7 +27031,7 @@ function Textarea({ className, ...props }) {
|
|
|
27013
27031
|
}
|
|
27014
27032
|
|
|
27015
27033
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
27016
|
-
var
|
|
27034
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
27017
27035
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
27018
27036
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27019
27037
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27023,8 +27041,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
27023
27041
|
const handleChange = (e) => {
|
|
27024
27042
|
props.onChange?.(e);
|
|
27025
27043
|
};
|
|
27026
|
-
return /* @__PURE__ */ (0,
|
|
27027
|
-
/* @__PURE__ */ (0,
|
|
27044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
27045
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
27028
27046
|
Textarea,
|
|
27029
27047
|
{
|
|
27030
27048
|
id: "textarea-field",
|
|
@@ -27042,13 +27060,13 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
27042
27060
|
readOnly: isReadonly
|
|
27043
27061
|
}
|
|
27044
27062
|
),
|
|
27045
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27063
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27046
27064
|
] });
|
|
27047
27065
|
};
|
|
27048
27066
|
var Textarea_default = Textarea2;
|
|
27049
27067
|
|
|
27050
27068
|
// src/components/Inputs/UrlInput/UrlInput.tsx
|
|
27051
|
-
var
|
|
27069
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
27052
27070
|
var UrlInput = ({ className, style, ...props }) => {
|
|
27053
27071
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27054
27072
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27058,10 +27076,10 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
27058
27076
|
const handleChange = (e) => {
|
|
27059
27077
|
props.onChange?.(e);
|
|
27060
27078
|
};
|
|
27061
|
-
return /* @__PURE__ */ (0,
|
|
27062
|
-
/* @__PURE__ */ (0,
|
|
27063
|
-
/* @__PURE__ */ (0,
|
|
27064
|
-
/* @__PURE__ */ (0,
|
|
27079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
27080
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27081
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.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://" }),
|
|
27082
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
27065
27083
|
Input,
|
|
27066
27084
|
{
|
|
27067
27085
|
id: "url-field",
|
|
@@ -27081,19 +27099,19 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
27081
27099
|
}
|
|
27082
27100
|
)
|
|
27083
27101
|
] }),
|
|
27084
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27102
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27085
27103
|
] });
|
|
27086
27104
|
};
|
|
27087
27105
|
var UrlInput_default = UrlInput;
|
|
27088
27106
|
|
|
27089
27107
|
// src/components/ui/checkbox.tsx
|
|
27090
27108
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
27091
|
-
var
|
|
27109
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
27092
27110
|
function Checkbox({
|
|
27093
27111
|
className,
|
|
27094
27112
|
...props
|
|
27095
27113
|
}) {
|
|
27096
|
-
return /* @__PURE__ */ (0,
|
|
27114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
27097
27115
|
CheckboxPrimitive.Root,
|
|
27098
27116
|
{
|
|
27099
27117
|
"data-slot": "checkbox",
|
|
@@ -27102,12 +27120,12 @@ function Checkbox({
|
|
|
27102
27120
|
className
|
|
27103
27121
|
),
|
|
27104
27122
|
...props,
|
|
27105
|
-
children: /* @__PURE__ */ (0,
|
|
27123
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
27106
27124
|
CheckboxPrimitive.Indicator,
|
|
27107
27125
|
{
|
|
27108
27126
|
"data-slot": "checkbox-indicator",
|
|
27109
27127
|
className: "flex items-center justify-center text-current transition-none",
|
|
27110
|
-
children: /* @__PURE__ */ (0,
|
|
27128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Check, { className: "size-3.5" })
|
|
27111
27129
|
}
|
|
27112
27130
|
)
|
|
27113
27131
|
}
|
|
@@ -27116,12 +27134,12 @@ function Checkbox({
|
|
|
27116
27134
|
|
|
27117
27135
|
// src/components/ui/label.tsx
|
|
27118
27136
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
27119
|
-
var
|
|
27137
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
27120
27138
|
function Label2({
|
|
27121
27139
|
className,
|
|
27122
27140
|
...props
|
|
27123
27141
|
}) {
|
|
27124
|
-
return /* @__PURE__ */ (0,
|
|
27142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
27125
27143
|
LabelPrimitive.Root,
|
|
27126
27144
|
{
|
|
27127
27145
|
"data-slot": "label",
|
|
@@ -27135,7 +27153,7 @@ function Label2({
|
|
|
27135
27153
|
}
|
|
27136
27154
|
|
|
27137
27155
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
27138
|
-
var
|
|
27156
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
27139
27157
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
27140
27158
|
const isEditable = props.isEditable ?? true;
|
|
27141
27159
|
const isDisabled = props.isDisabled ?? false;
|
|
@@ -27143,9 +27161,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
|
|
|
27143
27161
|
const handleChange = (value) => {
|
|
27144
27162
|
props.onChange?.(value);
|
|
27145
27163
|
};
|
|
27146
|
-
return /* @__PURE__ */ (0,
|
|
27147
|
-
/* @__PURE__ */ (0,
|
|
27148
|
-
/* @__PURE__ */ (0,
|
|
27164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
27165
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
27166
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
27149
27167
|
Checkbox,
|
|
27150
27168
|
{
|
|
27151
27169
|
id: props.name || "checkbox",
|
|
@@ -27154,21 +27172,21 @@ var CheckboxInput = ({ className, style, ...props }) => {
|
|
|
27154
27172
|
disabled: !isEditable || isDisabled
|
|
27155
27173
|
}
|
|
27156
27174
|
),
|
|
27157
|
-
/* @__PURE__ */ (0,
|
|
27175
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label2, { htmlFor: props.name || "checkbox", children: text })
|
|
27158
27176
|
] }) }),
|
|
27159
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27177
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27160
27178
|
] });
|
|
27161
27179
|
};
|
|
27162
27180
|
var Checkbox_default = CheckboxInput;
|
|
27163
27181
|
|
|
27164
27182
|
// src/components/ui/radio-group.tsx
|
|
27165
27183
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
27166
|
-
var
|
|
27184
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
27167
27185
|
function RadioGroup2({
|
|
27168
27186
|
className,
|
|
27169
27187
|
...props
|
|
27170
27188
|
}) {
|
|
27171
|
-
return /* @__PURE__ */ (0,
|
|
27189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
27172
27190
|
RadioGroupPrimitive.Root,
|
|
27173
27191
|
{
|
|
27174
27192
|
"data-slot": "radio-group",
|
|
@@ -27181,7 +27199,7 @@ function RadioGroupItem({
|
|
|
27181
27199
|
className,
|
|
27182
27200
|
...props
|
|
27183
27201
|
}) {
|
|
27184
|
-
return /* @__PURE__ */ (0,
|
|
27202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
27185
27203
|
RadioGroupPrimitive.Item,
|
|
27186
27204
|
{
|
|
27187
27205
|
"data-slot": "radio-group-item",
|
|
@@ -27190,12 +27208,12 @@ function RadioGroupItem({
|
|
|
27190
27208
|
className
|
|
27191
27209
|
),
|
|
27192
27210
|
...props,
|
|
27193
|
-
children: /* @__PURE__ */ (0,
|
|
27211
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
27194
27212
|
RadioGroupPrimitive.Indicator,
|
|
27195
27213
|
{
|
|
27196
27214
|
"data-slot": "radio-group-indicator",
|
|
27197
27215
|
className: "relative flex items-center justify-center",
|
|
27198
|
-
children: /* @__PURE__ */ (0,
|
|
27216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
27199
27217
|
}
|
|
27200
27218
|
)
|
|
27201
27219
|
}
|
|
@@ -27203,7 +27221,7 @@ function RadioGroupItem({
|
|
|
27203
27221
|
}
|
|
27204
27222
|
|
|
27205
27223
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
27206
|
-
var
|
|
27224
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
27207
27225
|
var RadioInput = ({
|
|
27208
27226
|
className,
|
|
27209
27227
|
style,
|
|
@@ -27214,7 +27232,8 @@ var RadioInput = ({
|
|
|
27214
27232
|
dataLabel,
|
|
27215
27233
|
...props
|
|
27216
27234
|
}) => {
|
|
27217
|
-
const
|
|
27235
|
+
const list = Array.isArray(data) ? data : [];
|
|
27236
|
+
const options = (list || []).map((item) => ({
|
|
27218
27237
|
value: item[dataKey || "value"],
|
|
27219
27238
|
label: item[dataLabel || "label"]
|
|
27220
27239
|
}));
|
|
@@ -27222,29 +27241,29 @@ var RadioInput = ({
|
|
|
27222
27241
|
onChange?.(value);
|
|
27223
27242
|
};
|
|
27224
27243
|
const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
|
|
27225
|
-
return /* @__PURE__ */ (0,
|
|
27226
|
-
/* @__PURE__ */ (0,
|
|
27244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
27245
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
27227
27246
|
RadioGroup2,
|
|
27228
27247
|
{
|
|
27229
27248
|
defaultValue: resolvedDefaultValue,
|
|
27230
27249
|
onValueChange: handleChange,
|
|
27231
27250
|
children: [
|
|
27232
|
-
options.length === 0 && /* @__PURE__ */ (0,
|
|
27233
|
-
options.map((item) => /* @__PURE__ */ (0,
|
|
27234
|
-
/* @__PURE__ */ (0,
|
|
27235
|
-
/* @__PURE__ */ (0,
|
|
27251
|
+
options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-sm text-gray-500", children: "No options available" }),
|
|
27252
|
+
options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
27253
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
|
|
27254
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
|
|
27236
27255
|
] }, item.value))
|
|
27237
27256
|
]
|
|
27238
27257
|
}
|
|
27239
27258
|
) }),
|
|
27240
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27259
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27241
27260
|
] });
|
|
27242
27261
|
};
|
|
27243
27262
|
var RadioInput_default = RadioInput;
|
|
27244
27263
|
|
|
27245
27264
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
27246
27265
|
var import_react5 = require("react");
|
|
27247
|
-
var
|
|
27266
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
27248
27267
|
var MultiCheckbox = ({
|
|
27249
27268
|
className,
|
|
27250
27269
|
style,
|
|
@@ -27256,8 +27275,9 @@ var MultiCheckbox = ({
|
|
|
27256
27275
|
isEditable = true,
|
|
27257
27276
|
isDisabled = false
|
|
27258
27277
|
}) => {
|
|
27278
|
+
const list = Array.isArray(data) ? data : [];
|
|
27259
27279
|
const [value, setValue] = (0, import_react5.useState)(propValue);
|
|
27260
|
-
const options = (
|
|
27280
|
+
const options = (list || []).map((item) => ({
|
|
27261
27281
|
value: item[dataKey || "value"],
|
|
27262
27282
|
label: item[dataLabel || "label"]
|
|
27263
27283
|
}));
|
|
@@ -27271,15 +27291,15 @@ var MultiCheckbox = ({
|
|
|
27271
27291
|
},
|
|
27272
27292
|
[onChange]
|
|
27273
27293
|
);
|
|
27274
|
-
return /* @__PURE__ */ (0,
|
|
27294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
27275
27295
|
"div",
|
|
27276
27296
|
{
|
|
27277
27297
|
className: cn("flex flex-col gap-3", className),
|
|
27278
27298
|
style,
|
|
27279
27299
|
children: [
|
|
27280
|
-
options.length === 0 && /* @__PURE__ */ (0,
|
|
27281
|
-
options.map((opt) => /* @__PURE__ */ (0,
|
|
27282
|
-
/* @__PURE__ */ (0,
|
|
27300
|
+
options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm text-gray-500", children: "No options available." }),
|
|
27301
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
27302
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
27283
27303
|
Checkbox,
|
|
27284
27304
|
{
|
|
27285
27305
|
id: opt.value,
|
|
@@ -27288,7 +27308,7 @@ var MultiCheckbox = ({
|
|
|
27288
27308
|
disabled: !isEditable || isDisabled
|
|
27289
27309
|
}
|
|
27290
27310
|
),
|
|
27291
|
-
/* @__PURE__ */ (0,
|
|
27311
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Label2, { htmlFor: opt.value, children: opt.label })
|
|
27292
27312
|
] }, opt.value))
|
|
27293
27313
|
]
|
|
27294
27314
|
}
|
|
@@ -27299,7 +27319,7 @@ var MultiCheckbox_default = MultiCheckbox;
|
|
|
27299
27319
|
// src/components/Global/TinyMceEditor.tsx
|
|
27300
27320
|
var import_react6 = require("react");
|
|
27301
27321
|
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
27302
|
-
var
|
|
27322
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
27303
27323
|
function MyEditor({
|
|
27304
27324
|
value,
|
|
27305
27325
|
onChange,
|
|
@@ -27324,7 +27344,7 @@ function MyEditor({
|
|
|
27324
27344
|
}
|
|
27325
27345
|
return toolbar;
|
|
27326
27346
|
}, [isDefault]);
|
|
27327
|
-
return /* @__PURE__ */ (0,
|
|
27347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27328
27348
|
import_tinymce_react.Editor,
|
|
27329
27349
|
{
|
|
27330
27350
|
apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
|
|
@@ -27368,9 +27388,9 @@ function MyEditor({
|
|
|
27368
27388
|
}
|
|
27369
27389
|
|
|
27370
27390
|
// src/components/Inputs/RichText/RichText.tsx
|
|
27371
|
-
var
|
|
27391
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
27372
27392
|
function RichText({ className, style, ...props }) {
|
|
27373
|
-
return /* @__PURE__ */ (0,
|
|
27393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
27374
27394
|
"div",
|
|
27375
27395
|
{
|
|
27376
27396
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
@@ -27379,8 +27399,8 @@ function RichText({ className, style, ...props }) {
|
|
|
27379
27399
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27380
27400
|
},
|
|
27381
27401
|
children: [
|
|
27382
|
-
/* @__PURE__ */ (0,
|
|
27383
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27402
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MyEditor, { onChange: (content) => props.onChange?.(content), value: props.value, isDefault: true }),
|
|
27403
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27384
27404
|
]
|
|
27385
27405
|
}
|
|
27386
27406
|
);
|
|
@@ -27388,16 +27408,16 @@ function RichText({ className, style, ...props }) {
|
|
|
27388
27408
|
|
|
27389
27409
|
// src/components/ui/select.tsx
|
|
27390
27410
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
27391
|
-
var
|
|
27411
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
27392
27412
|
function Select({
|
|
27393
27413
|
...props
|
|
27394
27414
|
}) {
|
|
27395
|
-
return /* @__PURE__ */ (0,
|
|
27415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
27396
27416
|
}
|
|
27397
27417
|
function SelectValue({
|
|
27398
27418
|
...props
|
|
27399
27419
|
}) {
|
|
27400
|
-
return /* @__PURE__ */ (0,
|
|
27420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
27401
27421
|
}
|
|
27402
27422
|
function SelectTrigger({
|
|
27403
27423
|
className,
|
|
@@ -27405,7 +27425,7 @@ function SelectTrigger({
|
|
|
27405
27425
|
children,
|
|
27406
27426
|
...props
|
|
27407
27427
|
}) {
|
|
27408
|
-
return /* @__PURE__ */ (0,
|
|
27428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
27409
27429
|
SelectPrimitive.Trigger,
|
|
27410
27430
|
{
|
|
27411
27431
|
"data-slot": "select-trigger",
|
|
@@ -27417,7 +27437,7 @@ function SelectTrigger({
|
|
|
27417
27437
|
...props,
|
|
27418
27438
|
children: [
|
|
27419
27439
|
children,
|
|
27420
|
-
/* @__PURE__ */ (0,
|
|
27440
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChevronDown, { className: "size-4 opacity-50" }) })
|
|
27421
27441
|
]
|
|
27422
27442
|
}
|
|
27423
27443
|
);
|
|
@@ -27428,7 +27448,7 @@ function SelectContent({
|
|
|
27428
27448
|
position = "popper",
|
|
27429
27449
|
...props
|
|
27430
27450
|
}) {
|
|
27431
|
-
return /* @__PURE__ */ (0,
|
|
27451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
27432
27452
|
SelectPrimitive.Content,
|
|
27433
27453
|
{
|
|
27434
27454
|
"data-slot": "select-content",
|
|
@@ -27440,8 +27460,8 @@ function SelectContent({
|
|
|
27440
27460
|
position,
|
|
27441
27461
|
...props,
|
|
27442
27462
|
children: [
|
|
27443
|
-
/* @__PURE__ */ (0,
|
|
27444
|
-
/* @__PURE__ */ (0,
|
|
27463
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectScrollUpButton, {}),
|
|
27464
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
27445
27465
|
SelectPrimitive.Viewport,
|
|
27446
27466
|
{
|
|
27447
27467
|
className: cn(
|
|
@@ -27451,7 +27471,7 @@ function SelectContent({
|
|
|
27451
27471
|
children
|
|
27452
27472
|
}
|
|
27453
27473
|
),
|
|
27454
|
-
/* @__PURE__ */ (0,
|
|
27474
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectScrollDownButton, {})
|
|
27455
27475
|
]
|
|
27456
27476
|
}
|
|
27457
27477
|
) });
|
|
@@ -27461,7 +27481,7 @@ function SelectItem({
|
|
|
27461
27481
|
children,
|
|
27462
27482
|
...props
|
|
27463
27483
|
}) {
|
|
27464
|
-
return /* @__PURE__ */ (0,
|
|
27484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
27465
27485
|
SelectPrimitive.Item,
|
|
27466
27486
|
{
|
|
27467
27487
|
"data-slot": "select-item",
|
|
@@ -27471,8 +27491,8 @@ function SelectItem({
|
|
|
27471
27491
|
),
|
|
27472
27492
|
...props,
|
|
27473
27493
|
children: [
|
|
27474
|
-
/* @__PURE__ */ (0,
|
|
27475
|
-
/* @__PURE__ */ (0,
|
|
27494
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Check, { className: "size-4" }) }) }),
|
|
27495
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.ItemText, { children })
|
|
27476
27496
|
]
|
|
27477
27497
|
}
|
|
27478
27498
|
);
|
|
@@ -27481,7 +27501,7 @@ function SelectScrollUpButton({
|
|
|
27481
27501
|
className,
|
|
27482
27502
|
...props
|
|
27483
27503
|
}) {
|
|
27484
|
-
return /* @__PURE__ */ (0,
|
|
27504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
27485
27505
|
SelectPrimitive.ScrollUpButton,
|
|
27486
27506
|
{
|
|
27487
27507
|
"data-slot": "select-scroll-up-button",
|
|
@@ -27490,7 +27510,7 @@ function SelectScrollUpButton({
|
|
|
27490
27510
|
className
|
|
27491
27511
|
),
|
|
27492
27512
|
...props,
|
|
27493
|
-
children: /* @__PURE__ */ (0,
|
|
27513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChevronUp, { className: "size-4" })
|
|
27494
27514
|
}
|
|
27495
27515
|
);
|
|
27496
27516
|
}
|
|
@@ -27498,7 +27518,7 @@ function SelectScrollDownButton({
|
|
|
27498
27518
|
className,
|
|
27499
27519
|
...props
|
|
27500
27520
|
}) {
|
|
27501
|
-
return /* @__PURE__ */ (0,
|
|
27521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
27502
27522
|
SelectPrimitive.ScrollDownButton,
|
|
27503
27523
|
{
|
|
27504
27524
|
"data-slot": "select-scroll-down-button",
|
|
@@ -27507,15 +27527,15 @@ function SelectScrollDownButton({
|
|
|
27507
27527
|
className
|
|
27508
27528
|
),
|
|
27509
27529
|
...props,
|
|
27510
|
-
children: /* @__PURE__ */ (0,
|
|
27530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChevronDown, { className: "size-4" })
|
|
27511
27531
|
}
|
|
27512
27532
|
);
|
|
27513
27533
|
}
|
|
27514
27534
|
|
|
27515
27535
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
27516
|
-
var
|
|
27536
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
27517
27537
|
var Dropdown = ({ className, style, ...props }) => {
|
|
27518
|
-
const list = props.data
|
|
27538
|
+
const list = Array.isArray(props?.data) ? props.data : [];
|
|
27519
27539
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
27520
27540
|
const isEditable = props.isEditable ?? true;
|
|
27521
27541
|
const isDisabled = props.isDisabled ?? false;
|
|
@@ -27529,9 +27549,9 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
27529
27549
|
value: item[dataKey],
|
|
27530
27550
|
label: item[dataLabel]
|
|
27531
27551
|
}));
|
|
27532
|
-
return /* @__PURE__ */ (0,
|
|
27533
|
-
/* @__PURE__ */ (0,
|
|
27534
|
-
/* @__PURE__ */ (0,
|
|
27552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
27553
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Select, { name: props.name, value: props.value, onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
|
|
27554
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
27535
27555
|
SelectTrigger,
|
|
27536
27556
|
{
|
|
27537
27557
|
id: props.name || "select-field",
|
|
@@ -27541,24 +27561,24 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
27541
27561
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27542
27562
|
},
|
|
27543
27563
|
"aria-readonly": isReadonly,
|
|
27544
|
-
children: /* @__PURE__ */ (0,
|
|
27564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectValue, { placeholder })
|
|
27545
27565
|
}
|
|
27546
27566
|
),
|
|
27547
|
-
/* @__PURE__ */ (0,
|
|
27567
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectContent, { children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
27548
27568
|
] }),
|
|
27549
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27569
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27550
27570
|
] });
|
|
27551
27571
|
};
|
|
27552
27572
|
var Dropdown_default = Dropdown;
|
|
27553
27573
|
|
|
27554
27574
|
// src/components/ui/switch.tsx
|
|
27555
27575
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
|
|
27556
|
-
var
|
|
27576
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
27557
27577
|
function Switch({
|
|
27558
27578
|
className,
|
|
27559
27579
|
...props
|
|
27560
27580
|
}) {
|
|
27561
|
-
return /* @__PURE__ */ (0,
|
|
27581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
27562
27582
|
SwitchPrimitive.Root,
|
|
27563
27583
|
{
|
|
27564
27584
|
"data-slot": "switch",
|
|
@@ -27567,7 +27587,7 @@ function Switch({
|
|
|
27567
27587
|
className
|
|
27568
27588
|
),
|
|
27569
27589
|
...props,
|
|
27570
|
-
children: /* @__PURE__ */ (0,
|
|
27590
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
27571
27591
|
SwitchPrimitive.Thumb,
|
|
27572
27592
|
{
|
|
27573
27593
|
"data-slot": "switch-thumb",
|
|
@@ -27581,16 +27601,16 @@ function Switch({
|
|
|
27581
27601
|
}
|
|
27582
27602
|
|
|
27583
27603
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
27584
|
-
var
|
|
27604
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
27585
27605
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
27586
27606
|
const isEditable = props.isEditable ?? true;
|
|
27587
27607
|
const isDisabled = props.isDisabled ?? false;
|
|
27588
27608
|
const handleChange = (value) => {
|
|
27589
27609
|
props.onChange?.(value);
|
|
27590
27610
|
};
|
|
27591
|
-
return /* @__PURE__ */ (0,
|
|
27592
|
-
/* @__PURE__ */ (0,
|
|
27593
|
-
/* @__PURE__ */ (0,
|
|
27611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
27612
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
27613
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
27594
27614
|
Switch,
|
|
27595
27615
|
{
|
|
27596
27616
|
id: props.name || "switch",
|
|
@@ -27599,9 +27619,9 @@ var SwitchToggle = ({ className, style, ...props }) => {
|
|
|
27599
27619
|
disabled: isDisabled || !isEditable
|
|
27600
27620
|
}
|
|
27601
27621
|
),
|
|
27602
|
-
/* @__PURE__ */ (0,
|
|
27622
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Label2, { htmlFor: props.name || "switch", children: props.text })
|
|
27603
27623
|
] }) }),
|
|
27604
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27624
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27605
27625
|
] });
|
|
27606
27626
|
};
|
|
27607
27627
|
var SwitchToggle_default = SwitchToggle;
|
|
@@ -27609,7 +27629,7 @@ var SwitchToggle_default = SwitchToggle;
|
|
|
27609
27629
|
// src/components/Inputs/PhoneInput/PhoneInput.tsx
|
|
27610
27630
|
var import_react_international_phone = require("react-international-phone");
|
|
27611
27631
|
var import_style = require("react-international-phone/style.css");
|
|
27612
|
-
var
|
|
27632
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
27613
27633
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
27614
27634
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
27615
27635
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27617,8 +27637,8 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
27617
27637
|
const handleChange = (val) => {
|
|
27618
27638
|
props.onChange?.(val);
|
|
27619
27639
|
};
|
|
27620
|
-
return /* @__PURE__ */ (0,
|
|
27621
|
-
/* @__PURE__ */ (0,
|
|
27640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
27641
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
27622
27642
|
import_react_international_phone.PhoneInput,
|
|
27623
27643
|
{
|
|
27624
27644
|
defaultCountry: "in",
|
|
@@ -27637,13 +27657,13 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
27637
27657
|
disabled: isDisabled || !isEditable
|
|
27638
27658
|
}
|
|
27639
27659
|
),
|
|
27640
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27660
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27641
27661
|
] });
|
|
27642
27662
|
};
|
|
27643
27663
|
var PhoneInput_default = PhoneInput;
|
|
27644
27664
|
|
|
27645
27665
|
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
27646
|
-
var
|
|
27666
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
27647
27667
|
var SearchInput = ({ className, style, ...props }) => {
|
|
27648
27668
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27649
27669
|
const isEditable = props.isEditable ?? true;
|
|
@@ -27653,10 +27673,10 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
27653
27673
|
const handleChange = (e) => {
|
|
27654
27674
|
props.onChange?.(e);
|
|
27655
27675
|
};
|
|
27656
|
-
return /* @__PURE__ */ (0,
|
|
27657
|
-
/* @__PURE__ */ (0,
|
|
27658
|
-
/* @__PURE__ */ (0,
|
|
27659
|
-
/* @__PURE__ */ (0,
|
|
27676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
27677
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27678
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
27679
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
27660
27680
|
Input,
|
|
27661
27681
|
{
|
|
27662
27682
|
type: "text",
|
|
@@ -27676,17 +27696,17 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
27676
27696
|
}
|
|
27677
27697
|
)
|
|
27678
27698
|
] }),
|
|
27679
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27699
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27680
27700
|
] });
|
|
27681
27701
|
};
|
|
27682
27702
|
var SearchInput_default = SearchInput;
|
|
27683
27703
|
|
|
27684
27704
|
// src/components/Inputs/FileInput/FileInput.tsx
|
|
27685
|
-
var
|
|
27705
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
27686
27706
|
var FileInput2 = ({ className, style, ...props }) => {
|
|
27687
27707
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27688
|
-
return /* @__PURE__ */ (0,
|
|
27689
|
-
/* @__PURE__ */ (0,
|
|
27708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
|
|
27709
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
27690
27710
|
Input,
|
|
27691
27711
|
{
|
|
27692
27712
|
type: "file",
|
|
@@ -27705,13 +27725,13 @@ var FileInput2 = ({ className, style, ...props }) => {
|
|
|
27705
27725
|
}
|
|
27706
27726
|
}
|
|
27707
27727
|
),
|
|
27708
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27728
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27709
27729
|
] });
|
|
27710
27730
|
};
|
|
27711
27731
|
var FileInput_default = FileInput2;
|
|
27712
27732
|
|
|
27713
27733
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
27714
|
-
var
|
|
27734
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
27715
27735
|
function DatePicker({ className, style, ...props }) {
|
|
27716
27736
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
27717
27737
|
const minimumDate = props.minimumDate ?? "none";
|
|
@@ -27739,10 +27759,10 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27739
27759
|
const handleChange = (e) => {
|
|
27740
27760
|
props.onChange?.(e);
|
|
27741
27761
|
};
|
|
27742
|
-
return /* @__PURE__ */ (0,
|
|
27743
|
-
/* @__PURE__ */ (0,
|
|
27744
|
-
/* @__PURE__ */ (0,
|
|
27745
|
-
/* @__PURE__ */ (0,
|
|
27762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
27763
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27764
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
27765
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
27746
27766
|
Input,
|
|
27747
27767
|
{
|
|
27748
27768
|
type: "date",
|
|
@@ -27768,7 +27788,7 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27768
27788
|
}
|
|
27769
27789
|
)
|
|
27770
27790
|
] }),
|
|
27771
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
27791
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27772
27792
|
] });
|
|
27773
27793
|
}
|
|
27774
27794
|
|
|
@@ -27779,7 +27799,7 @@ var import_date_fns = require("date-fns");
|
|
|
27779
27799
|
// src/components/ui/calendar.tsx
|
|
27780
27800
|
var React3 = __toESM(require("react"));
|
|
27781
27801
|
var import_react_day_picker = require("react-day-picker");
|
|
27782
|
-
var
|
|
27802
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
27783
27803
|
function Calendar2({
|
|
27784
27804
|
className,
|
|
27785
27805
|
classNames,
|
|
@@ -27791,7 +27811,7 @@ function Calendar2({
|
|
|
27791
27811
|
...props
|
|
27792
27812
|
}) {
|
|
27793
27813
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
27794
|
-
return /* @__PURE__ */ (0,
|
|
27814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
27795
27815
|
import_react_day_picker.DayPicker,
|
|
27796
27816
|
{
|
|
27797
27817
|
showOutsideDays,
|
|
@@ -27890,7 +27910,7 @@ function Calendar2({
|
|
|
27890
27910
|
},
|
|
27891
27911
|
components: {
|
|
27892
27912
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
27893
|
-
return /* @__PURE__ */ (0,
|
|
27913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
27894
27914
|
"div",
|
|
27895
27915
|
{
|
|
27896
27916
|
"data-slot": "calendar",
|
|
@@ -27902,10 +27922,10 @@ function Calendar2({
|
|
|
27902
27922
|
},
|
|
27903
27923
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
27904
27924
|
if (orientation === "left") {
|
|
27905
|
-
return /* @__PURE__ */ (0,
|
|
27925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
27906
27926
|
}
|
|
27907
27927
|
if (orientation === "right") {
|
|
27908
|
-
return /* @__PURE__ */ (0,
|
|
27928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
27909
27929
|
ChevronRight,
|
|
27910
27930
|
{
|
|
27911
27931
|
className: cn("size-4", className2),
|
|
@@ -27913,11 +27933,11 @@ function Calendar2({
|
|
|
27913
27933
|
}
|
|
27914
27934
|
);
|
|
27915
27935
|
}
|
|
27916
|
-
return /* @__PURE__ */ (0,
|
|
27936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
27917
27937
|
},
|
|
27918
27938
|
DayButton: CalendarDayButton,
|
|
27919
27939
|
WeekNumber: ({ children, ...props2 }) => {
|
|
27920
|
-
return /* @__PURE__ */ (0,
|
|
27940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
27921
27941
|
},
|
|
27922
27942
|
...components
|
|
27923
27943
|
},
|
|
@@ -27936,7 +27956,7 @@ function CalendarDayButton({
|
|
|
27936
27956
|
React3.useEffect(() => {
|
|
27937
27957
|
if (modifiers.focused) ref.current?.focus();
|
|
27938
27958
|
}, [modifiers.focused]);
|
|
27939
|
-
return /* @__PURE__ */ (0,
|
|
27959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
27940
27960
|
Button,
|
|
27941
27961
|
{
|
|
27942
27962
|
ref,
|
|
@@ -27959,16 +27979,16 @@ function CalendarDayButton({
|
|
|
27959
27979
|
|
|
27960
27980
|
// src/components/ui/popover.tsx
|
|
27961
27981
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
27962
|
-
var
|
|
27982
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
27963
27983
|
function Popover({
|
|
27964
27984
|
...props
|
|
27965
27985
|
}) {
|
|
27966
|
-
return /* @__PURE__ */ (0,
|
|
27986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
27967
27987
|
}
|
|
27968
27988
|
function PopoverTrigger({
|
|
27969
27989
|
...props
|
|
27970
27990
|
}) {
|
|
27971
|
-
return /* @__PURE__ */ (0,
|
|
27991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
27972
27992
|
}
|
|
27973
27993
|
function PopoverContent({
|
|
27974
27994
|
className,
|
|
@@ -27976,7 +27996,7 @@ function PopoverContent({
|
|
|
27976
27996
|
sideOffset = 4,
|
|
27977
27997
|
...props
|
|
27978
27998
|
}) {
|
|
27979
|
-
return /* @__PURE__ */ (0,
|
|
27999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
27980
28000
|
PopoverPrimitive.Content,
|
|
27981
28001
|
{
|
|
27982
28002
|
"data-slot": "popover-content",
|
|
@@ -27992,7 +28012,7 @@ function PopoverContent({
|
|
|
27992
28012
|
}
|
|
27993
28013
|
|
|
27994
28014
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
27995
|
-
var
|
|
28015
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
27996
28016
|
var DateRange = ({ className, style, ...props }) => {
|
|
27997
28017
|
const isDateRange = (val) => !!val && val.from instanceof Date;
|
|
27998
28018
|
const [date, setDate] = React4.useState(
|
|
@@ -28007,9 +28027,9 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28007
28027
|
props.onChange?.(value);
|
|
28008
28028
|
}
|
|
28009
28029
|
};
|
|
28010
|
-
return /* @__PURE__ */ (0,
|
|
28011
|
-
/* @__PURE__ */ (0,
|
|
28012
|
-
/* @__PURE__ */ (0,
|
|
28030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
28031
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Popover, { children: [
|
|
28032
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28013
28033
|
Button,
|
|
28014
28034
|
{
|
|
28015
28035
|
id: "date",
|
|
@@ -28018,15 +28038,15 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28018
28038
|
"w-full justify-start text-left font-normal text-[11px] border-[#BDBDBD]",
|
|
28019
28039
|
!date && "text-muted-foreground"
|
|
28020
28040
|
),
|
|
28021
|
-
children: date?.from ? date.to ? /* @__PURE__ */ (0,
|
|
28041
|
+
children: date?.from ? date.to ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
28022
28042
|
(0, import_date_fns.format)(date.from, "LLL dd, y"),
|
|
28023
28043
|
" -",
|
|
28024
28044
|
" ",
|
|
28025
28045
|
(0, import_date_fns.format)(date.to, "LLL dd, y")
|
|
28026
|
-
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0,
|
|
28046
|
+
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: "Pick a date range" })
|
|
28027
28047
|
}
|
|
28028
28048
|
) }),
|
|
28029
|
-
/* @__PURE__ */ (0,
|
|
28049
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28030
28050
|
Calendar2,
|
|
28031
28051
|
{
|
|
28032
28052
|
mode: "range",
|
|
@@ -28037,13 +28057,13 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28037
28057
|
}
|
|
28038
28058
|
) })
|
|
28039
28059
|
] }) }),
|
|
28040
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
28060
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28041
28061
|
] });
|
|
28042
28062
|
};
|
|
28043
28063
|
var DateRange_default = DateRange;
|
|
28044
28064
|
|
|
28045
28065
|
// src/components/Inputs/TextInputGroup/TextInputGroup.tsx
|
|
28046
|
-
var
|
|
28066
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
28047
28067
|
var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
28048
28068
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
28049
28069
|
const isEditable = props.isEditable ?? true;
|
|
@@ -28053,8 +28073,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28053
28073
|
const handleChange = (e) => {
|
|
28054
28074
|
props.onChange?.(e);
|
|
28055
28075
|
};
|
|
28056
|
-
return /* @__PURE__ */ (0,
|
|
28057
|
-
/* @__PURE__ */ (0,
|
|
28076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
28077
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
28058
28078
|
"div",
|
|
28059
28079
|
{
|
|
28060
28080
|
className: cn(
|
|
@@ -28064,8 +28084,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28064
28084
|
props.errorMessage ? "border-red-500" : ""
|
|
28065
28085
|
),
|
|
28066
28086
|
children: [
|
|
28067
|
-
prepend && /* @__PURE__ */ (0,
|
|
28068
|
-
/* @__PURE__ */ (0,
|
|
28087
|
+
prepend && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
|
|
28088
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
28069
28089
|
Input,
|
|
28070
28090
|
{
|
|
28071
28091
|
id: props.name || "prepend-input",
|
|
@@ -28087,11 +28107,11 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
28087
28107
|
readOnly: isReadonly
|
|
28088
28108
|
}
|
|
28089
28109
|
),
|
|
28090
|
-
append && /* @__PURE__ */ (0,
|
|
28110
|
+
append && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
|
|
28091
28111
|
]
|
|
28092
28112
|
}
|
|
28093
28113
|
),
|
|
28094
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
28114
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
28095
28115
|
] });
|
|
28096
28116
|
};
|
|
28097
28117
|
var TextInputGroup_default = TextInputGroup;
|
|
@@ -28103,14 +28123,14 @@ var import_react7 = require("react");
|
|
|
28103
28123
|
var import_react_table = require("@tanstack/react-table");
|
|
28104
28124
|
|
|
28105
28125
|
// src/components/ui/table.tsx
|
|
28106
|
-
var
|
|
28126
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
28107
28127
|
function Table3({ className, ...props }) {
|
|
28108
|
-
return /* @__PURE__ */ (0,
|
|
28128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28109
28129
|
"div",
|
|
28110
28130
|
{
|
|
28111
28131
|
"data-slot": "table-container",
|
|
28112
28132
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
28113
|
-
children: /* @__PURE__ */ (0,
|
|
28133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28114
28134
|
"table",
|
|
28115
28135
|
{
|
|
28116
28136
|
"data-slot": "table",
|
|
@@ -28122,7 +28142,7 @@ function Table3({ className, ...props }) {
|
|
|
28122
28142
|
);
|
|
28123
28143
|
}
|
|
28124
28144
|
function TableHeader({ className, ...props }) {
|
|
28125
|
-
return /* @__PURE__ */ (0,
|
|
28145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28126
28146
|
"thead",
|
|
28127
28147
|
{
|
|
28128
28148
|
"data-slot": "table-header",
|
|
@@ -28135,7 +28155,7 @@ function TableHeader({ className, ...props }) {
|
|
|
28135
28155
|
);
|
|
28136
28156
|
}
|
|
28137
28157
|
function TableBody({ className, ...props }) {
|
|
28138
|
-
return /* @__PURE__ */ (0,
|
|
28158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28139
28159
|
"tbody",
|
|
28140
28160
|
{
|
|
28141
28161
|
"data-slot": "table-body",
|
|
@@ -28148,7 +28168,7 @@ function TableBody({ className, ...props }) {
|
|
|
28148
28168
|
);
|
|
28149
28169
|
}
|
|
28150
28170
|
function TableRow({ className, ...props }) {
|
|
28151
|
-
return /* @__PURE__ */ (0,
|
|
28171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28152
28172
|
"tr",
|
|
28153
28173
|
{
|
|
28154
28174
|
"data-slot": "table-row",
|
|
@@ -28161,7 +28181,7 @@ function TableRow({ className, ...props }) {
|
|
|
28161
28181
|
);
|
|
28162
28182
|
}
|
|
28163
28183
|
function TableHead({ className, ...props }) {
|
|
28164
|
-
return /* @__PURE__ */ (0,
|
|
28184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28165
28185
|
"th",
|
|
28166
28186
|
{
|
|
28167
28187
|
"data-slot": "table-head",
|
|
@@ -28174,7 +28194,7 @@ function TableHead({ className, ...props }) {
|
|
|
28174
28194
|
);
|
|
28175
28195
|
}
|
|
28176
28196
|
function TableCell({ className, ...props }) {
|
|
28177
|
-
return /* @__PURE__ */ (0,
|
|
28197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
28178
28198
|
"td",
|
|
28179
28199
|
{
|
|
28180
28200
|
"data-slot": "table-cell",
|
|
@@ -28188,7 +28208,7 @@ function TableCell({ className, ...props }) {
|
|
|
28188
28208
|
}
|
|
28189
28209
|
|
|
28190
28210
|
// src/components/ui/data-table.tsx
|
|
28191
|
-
var
|
|
28211
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
28192
28212
|
function DataTable({
|
|
28193
28213
|
columns,
|
|
28194
28214
|
rowActions,
|
|
@@ -28213,14 +28233,14 @@ function DataTable({
|
|
|
28213
28233
|
onCellClick(rowData, columnId);
|
|
28214
28234
|
}
|
|
28215
28235
|
};
|
|
28216
|
-
return /* @__PURE__ */ (0,
|
|
28217
|
-
/* @__PURE__ */ (0,
|
|
28218
|
-
return /* @__PURE__ */ (0,
|
|
28236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Table3, { children: [
|
|
28237
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
|
|
28238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
28219
28239
|
header.column.columnDef.header,
|
|
28220
28240
|
header.getContext()
|
|
28221
28241
|
) }, header.id);
|
|
28222
28242
|
}) }, headerGroup.id)) }),
|
|
28223
|
-
/* @__PURE__ */ (0,
|
|
28243
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
28224
28244
|
TableRow,
|
|
28225
28245
|
{
|
|
28226
28246
|
"data-state": row.getIsSelected() && "selected",
|
|
@@ -28230,7 +28250,7 @@ function DataTable({
|
|
|
28230
28250
|
const isCellClickable = cellClickEnabled(row.original, cell.column.id);
|
|
28231
28251
|
const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
|
|
28232
28252
|
const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
|
|
28233
|
-
return /* @__PURE__ */ (0,
|
|
28253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
28234
28254
|
TableCell,
|
|
28235
28255
|
{
|
|
28236
28256
|
className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
|
|
@@ -28245,18 +28265,18 @@ function DataTable({
|
|
|
28245
28265
|
cell.id
|
|
28246
28266
|
);
|
|
28247
28267
|
}),
|
|
28248
|
-
rowActions.length > 0 && /* @__PURE__ */ (0,
|
|
28268
|
+
rowActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.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_runtime45.jsx)("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
|
|
28249
28269
|
]
|
|
28250
28270
|
},
|
|
28251
28271
|
row.id
|
|
28252
|
-
)) : /* @__PURE__ */ (0,
|
|
28272
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
|
|
28253
28273
|
] }) });
|
|
28254
28274
|
}
|
|
28255
28275
|
|
|
28256
28276
|
// src/components/ui/pagination.tsx
|
|
28257
|
-
var
|
|
28277
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
28258
28278
|
function Pagination({ className, ...props }) {
|
|
28259
|
-
return /* @__PURE__ */ (0,
|
|
28279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28260
28280
|
"nav",
|
|
28261
28281
|
{
|
|
28262
28282
|
role: "navigation",
|
|
@@ -28271,7 +28291,7 @@ function PaginationContent({
|
|
|
28271
28291
|
className,
|
|
28272
28292
|
...props
|
|
28273
28293
|
}) {
|
|
28274
|
-
return /* @__PURE__ */ (0,
|
|
28294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28275
28295
|
"ul",
|
|
28276
28296
|
{
|
|
28277
28297
|
"data-slot": "pagination-content",
|
|
@@ -28281,7 +28301,7 @@ function PaginationContent({
|
|
|
28281
28301
|
);
|
|
28282
28302
|
}
|
|
28283
28303
|
function PaginationItem({ ...props }) {
|
|
28284
|
-
return /* @__PURE__ */ (0,
|
|
28304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
28285
28305
|
}
|
|
28286
28306
|
function PaginationLink({
|
|
28287
28307
|
className,
|
|
@@ -28289,7 +28309,7 @@ function PaginationLink({
|
|
|
28289
28309
|
size = "icon",
|
|
28290
28310
|
...props
|
|
28291
28311
|
}) {
|
|
28292
|
-
return /* @__PURE__ */ (0,
|
|
28312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
28293
28313
|
"a",
|
|
28294
28314
|
{
|
|
28295
28315
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -28310,7 +28330,7 @@ function PaginationPrevious({
|
|
|
28310
28330
|
className,
|
|
28311
28331
|
...props
|
|
28312
28332
|
}) {
|
|
28313
|
-
return /* @__PURE__ */ (0,
|
|
28333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
28314
28334
|
PaginationLink,
|
|
28315
28335
|
{
|
|
28316
28336
|
"aria-label": "Go to previous page",
|
|
@@ -28318,8 +28338,8 @@ function PaginationPrevious({
|
|
|
28318
28338
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
28319
28339
|
...props,
|
|
28320
28340
|
children: [
|
|
28321
|
-
/* @__PURE__ */ (0,
|
|
28322
|
-
/* @__PURE__ */ (0,
|
|
28341
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChevronLeft, {}),
|
|
28342
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
28323
28343
|
]
|
|
28324
28344
|
}
|
|
28325
28345
|
);
|
|
@@ -28328,7 +28348,7 @@ function PaginationNext({
|
|
|
28328
28348
|
className,
|
|
28329
28349
|
...props
|
|
28330
28350
|
}) {
|
|
28331
|
-
return /* @__PURE__ */ (0,
|
|
28351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
28332
28352
|
PaginationLink,
|
|
28333
28353
|
{
|
|
28334
28354
|
"aria-label": "Go to next page",
|
|
@@ -28336,8 +28356,8 @@ function PaginationNext({
|
|
|
28336
28356
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
28337
28357
|
...props,
|
|
28338
28358
|
children: [
|
|
28339
|
-
/* @__PURE__ */ (0,
|
|
28340
|
-
/* @__PURE__ */ (0,
|
|
28359
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
28360
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChevronRight, {})
|
|
28341
28361
|
]
|
|
28342
28362
|
}
|
|
28343
28363
|
);
|
|
@@ -28346,7 +28366,7 @@ function PaginationEllipsis({
|
|
|
28346
28366
|
className,
|
|
28347
28367
|
...props
|
|
28348
28368
|
}) {
|
|
28349
|
-
return /* @__PURE__ */ (0,
|
|
28369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
28350
28370
|
"span",
|
|
28351
28371
|
{
|
|
28352
28372
|
"aria-hidden": true,
|
|
@@ -28354,15 +28374,15 @@ function PaginationEllipsis({
|
|
|
28354
28374
|
className: cn("flex size-9 items-center justify-center", className),
|
|
28355
28375
|
...props,
|
|
28356
28376
|
children: [
|
|
28357
|
-
/* @__PURE__ */ (0,
|
|
28358
|
-
/* @__PURE__ */ (0,
|
|
28377
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Ellipsis, { className: "size-4" }),
|
|
28378
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
28359
28379
|
]
|
|
28360
28380
|
}
|
|
28361
28381
|
);
|
|
28362
28382
|
}
|
|
28363
28383
|
|
|
28364
28384
|
// src/components/DataDisplay/Pagination/Pagination.tsx
|
|
28365
|
-
var
|
|
28385
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
28366
28386
|
var CustomPagination = ({
|
|
28367
28387
|
totalPages,
|
|
28368
28388
|
currentPage,
|
|
@@ -28408,10 +28428,10 @@ var CustomPagination = ({
|
|
|
28408
28428
|
}
|
|
28409
28429
|
};
|
|
28410
28430
|
const pageNumbers = getPageNumbers();
|
|
28411
|
-
return /* @__PURE__ */ (0,
|
|
28412
|
-
/* @__PURE__ */ (0,
|
|
28413
|
-
/* @__PURE__ */ (0,
|
|
28414
|
-
/* @__PURE__ */ (0,
|
|
28431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
|
|
28432
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
28433
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
|
|
28434
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
28415
28435
|
Select,
|
|
28416
28436
|
{
|
|
28417
28437
|
defaultValue: String(perPage),
|
|
@@ -28419,26 +28439,26 @@ var CustomPagination = ({
|
|
|
28419
28439
|
onPageChange({ page: 1, itemsPerPage: Number(value) });
|
|
28420
28440
|
},
|
|
28421
28441
|
children: [
|
|
28422
|
-
/* @__PURE__ */ (0,
|
|
28423
|
-
/* @__PURE__ */ (0,
|
|
28424
|
-
/* @__PURE__ */ (0,
|
|
28425
|
-
/* @__PURE__ */ (0,
|
|
28426
|
-
/* @__PURE__ */ (0,
|
|
28427
|
-
/* @__PURE__ */ (0,
|
|
28442
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectValue, { placeholder: "Select" }) }),
|
|
28443
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(SelectContent, { children: [
|
|
28444
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "5", children: "5" }),
|
|
28445
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "10", children: "10" }),
|
|
28446
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "20", children: "20" }),
|
|
28447
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "50", children: "50" })
|
|
28428
28448
|
] })
|
|
28429
28449
|
]
|
|
28430
28450
|
}
|
|
28431
28451
|
)
|
|
28432
28452
|
] }),
|
|
28433
|
-
/* @__PURE__ */ (0,
|
|
28434
|
-
/* @__PURE__ */ (0,
|
|
28453
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Pagination, { className: "justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(PaginationContent, { children: [
|
|
28454
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28435
28455
|
PaginationPrevious,
|
|
28436
28456
|
{
|
|
28437
28457
|
onClick: () => handlePageChange(currentPage - 1),
|
|
28438
28458
|
className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
28439
28459
|
}
|
|
28440
28460
|
) }),
|
|
28441
|
-
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0,
|
|
28461
|
+
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28442
28462
|
PaginationLink,
|
|
28443
28463
|
{
|
|
28444
28464
|
onClick: () => handlePageChange(pageNumber),
|
|
@@ -28447,7 +28467,7 @@ var CustomPagination = ({
|
|
|
28447
28467
|
children: pageNumber
|
|
28448
28468
|
}
|
|
28449
28469
|
) }, index)),
|
|
28450
|
-
/* @__PURE__ */ (0,
|
|
28470
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28451
28471
|
PaginationNext,
|
|
28452
28472
|
{
|
|
28453
28473
|
onClick: () => handlePageChange(currentPage + 1),
|
|
@@ -28460,7 +28480,7 @@ var CustomPagination = ({
|
|
|
28460
28480
|
var Pagination_default = CustomPagination;
|
|
28461
28481
|
|
|
28462
28482
|
// src/components/DataDisplay/Table/Table.tsx
|
|
28463
|
-
var
|
|
28483
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
28464
28484
|
var Table4 = ({
|
|
28465
28485
|
columns,
|
|
28466
28486
|
data,
|
|
@@ -28506,8 +28526,8 @@ var Table4 = ({
|
|
|
28506
28526
|
if (!selectedColumn) return false;
|
|
28507
28527
|
return selectedColumn.isClickable ?? false;
|
|
28508
28528
|
};
|
|
28509
|
-
return /* @__PURE__ */ (0,
|
|
28510
|
-
/* @__PURE__ */ (0,
|
|
28529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: `${className || ""} space-y-3`, style, children: [
|
|
28530
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
28511
28531
|
DataTable,
|
|
28512
28532
|
{
|
|
28513
28533
|
...props,
|
|
@@ -28518,7 +28538,7 @@ var Table4 = ({
|
|
|
28518
28538
|
cellClickEnabled: isCellClickEnabled
|
|
28519
28539
|
}
|
|
28520
28540
|
),
|
|
28521
|
-
enablePagination && /* @__PURE__ */ (0,
|
|
28541
|
+
enablePagination && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
28522
28542
|
Pagination_default,
|
|
28523
28543
|
{
|
|
28524
28544
|
perPage: itemsPerPage,
|
|
@@ -28533,7 +28553,7 @@ var Table_default = Table4;
|
|
|
28533
28553
|
|
|
28534
28554
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
28535
28555
|
var import_link5 = __toESM(require("next/link"));
|
|
28536
|
-
var
|
|
28556
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
28537
28557
|
var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
28538
28558
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
28539
28559
|
const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
|
|
@@ -28546,23 +28566,23 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28546
28566
|
const renderDesktopTab = (tab, index) => {
|
|
28547
28567
|
const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
|
|
28548
28568
|
if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
|
|
28549
|
-
return /* @__PURE__ */ (0,
|
|
28550
|
-
/* @__PURE__ */ (0,
|
|
28569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu, { children: [
|
|
28570
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
|
|
28551
28571
|
tab.header,
|
|
28552
|
-
/* @__PURE__ */ (0,
|
|
28572
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
28553
28573
|
] }),
|
|
28554
|
-
/* @__PURE__ */ (0,
|
|
28574
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28555
28575
|
DropdownMenuContent,
|
|
28556
28576
|
{
|
|
28557
28577
|
align: "start",
|
|
28558
28578
|
sideOffset: 6,
|
|
28559
28579
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
28560
|
-
children: tab.children.map((item) => /* @__PURE__ */ (0,
|
|
28580
|
+
children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28561
28581
|
DropdownMenuItem,
|
|
28562
28582
|
{
|
|
28563
28583
|
asChild: true,
|
|
28564
28584
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
28565
|
-
children: /* @__PURE__ */ (0,
|
|
28585
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
|
|
28566
28586
|
},
|
|
28567
28587
|
item.id
|
|
28568
28588
|
))
|
|
@@ -28570,14 +28590,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28570
28590
|
)
|
|
28571
28591
|
] }, index);
|
|
28572
28592
|
}
|
|
28573
|
-
return tab.url ? /* @__PURE__ */ (0,
|
|
28593
|
+
return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_link5.default, { href: tab.url, className: finalClasses, style: tab.style, children: tab.header }, index) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
28574
28594
|
};
|
|
28575
|
-
const renderMobileMenu = () => /* @__PURE__ */ (0,
|
|
28576
|
-
/* @__PURE__ */ (0,
|
|
28577
|
-
/* @__PURE__ */ (0,
|
|
28595
|
+
const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu, { children: [
|
|
28596
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
|
|
28597
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Menu, { className: "h-4 w-4" }),
|
|
28578
28598
|
"Menu"
|
|
28579
28599
|
] }),
|
|
28580
|
-
/* @__PURE__ */ (0,
|
|
28600
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28581
28601
|
DropdownMenuContent,
|
|
28582
28602
|
{
|
|
28583
28603
|
align: "start",
|
|
@@ -28586,25 +28606,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28586
28606
|
children: rawTabs.map((tab, i) => {
|
|
28587
28607
|
const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
28588
28608
|
if (hasChildren) {
|
|
28589
|
-
return /* @__PURE__ */ (0,
|
|
28590
|
-
/* @__PURE__ */ (0,
|
|
28591
|
-
/* @__PURE__ */ (0,
|
|
28609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuSub, { children: [
|
|
28610
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
|
|
28611
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28592
28612
|
DropdownMenuItem,
|
|
28593
28613
|
{
|
|
28594
28614
|
asChild: true,
|
|
28595
28615
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
|
|
28596
|
-
children: /* @__PURE__ */ (0,
|
|
28616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
|
|
28597
28617
|
},
|
|
28598
28618
|
item.id
|
|
28599
28619
|
)) })
|
|
28600
28620
|
] }, i);
|
|
28601
28621
|
}
|
|
28602
|
-
return /* @__PURE__ */ (0,
|
|
28622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
28603
28623
|
DropdownMenuItem,
|
|
28604
28624
|
{
|
|
28605
28625
|
asChild: true,
|
|
28606
28626
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
|
|
28607
|
-
children: /* @__PURE__ */ (0,
|
|
28627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_link5.default, { href: tab.url || "#", children: tab.header })
|
|
28608
28628
|
},
|
|
28609
28629
|
i
|
|
28610
28630
|
);
|
|
@@ -28614,57 +28634,56 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28614
28634
|
] });
|
|
28615
28635
|
const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
|
|
28616
28636
|
const forceDesktop = canvasMode === "desktop";
|
|
28617
|
-
return /* @__PURE__ */ (0,
|
|
28618
|
-
forceDesktop && /* @__PURE__ */ (0,
|
|
28619
|
-
forceMobile && /* @__PURE__ */ (0,
|
|
28620
|
-
/* @__PURE__ */ (0,
|
|
28637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className, style, children: [
|
|
28638
|
+
forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
|
|
28639
|
+
forceMobile && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: renderMobileMenu() }),
|
|
28640
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "md:hidden", children: renderMobileMenu() })
|
|
28621
28641
|
] });
|
|
28622
28642
|
};
|
|
28623
28643
|
var Tabs_default = Tabs;
|
|
28624
28644
|
|
|
28625
28645
|
// src/components/Navigation/Stages/Stages.tsx
|
|
28626
28646
|
var import_react8 = __toESM(require("react"));
|
|
28627
|
-
var
|
|
28647
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
28628
28648
|
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
28629
|
-
return /* @__PURE__ */ (0,
|
|
28630
|
-
/* @__PURE__ */ (0,
|
|
28631
|
-
/* @__PURE__ */ (0,
|
|
28632
|
-
/* @__PURE__ */ (0,
|
|
28649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
28650
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
28651
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react8.default.Fragment, { children: [
|
|
28652
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
28633
28653
|
"button",
|
|
28634
28654
|
{
|
|
28635
|
-
className: `
|
|
28636
|
-
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"}`,
|
|
28655
|
+
className: `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"}`,
|
|
28637
28656
|
children: stage.header
|
|
28638
28657
|
}
|
|
28639
28658
|
),
|
|
28640
|
-
index < stages.length - 1 && /* @__PURE__ */ (0,
|
|
28659
|
+
index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
28641
28660
|
] }, stage.id)) }),
|
|
28642
|
-
isShowBtn && /* @__PURE__ */ (0,
|
|
28661
|
+
isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime50.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 }) })
|
|
28643
28662
|
] }) });
|
|
28644
28663
|
};
|
|
28645
28664
|
var Stages_default = StagesComponent;
|
|
28646
28665
|
|
|
28647
28666
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
28648
|
-
var
|
|
28667
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
28649
28668
|
var Spacer = ({ className, style }) => {
|
|
28650
|
-
return /* @__PURE__ */ (0,
|
|
28669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `${className}`, style });
|
|
28651
28670
|
};
|
|
28652
28671
|
var Spacer_default = Spacer;
|
|
28653
28672
|
|
|
28654
28673
|
// src/components/Navigation/Profile/Profile.tsx
|
|
28655
|
-
var
|
|
28674
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
28656
28675
|
|
|
28657
28676
|
// src/components/Navigation/Notification/Notification.tsx
|
|
28658
|
-
var
|
|
28677
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
28659
28678
|
|
|
28660
28679
|
// src/components/Navigation/Logo/Logo.tsx
|
|
28661
|
-
var
|
|
28680
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
28662
28681
|
|
|
28663
28682
|
// src/components/ui/avatar.tsx
|
|
28664
28683
|
var React6 = __toESM(require("react"));
|
|
28665
28684
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
|
|
28666
|
-
var
|
|
28667
|
-
var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
28685
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
28686
|
+
var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
28668
28687
|
AvatarPrimitive.Root,
|
|
28669
28688
|
{
|
|
28670
28689
|
ref,
|
|
@@ -28676,7 +28695,7 @@ var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
28676
28695
|
}
|
|
28677
28696
|
));
|
|
28678
28697
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
28679
|
-
var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
28698
|
+
var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
28680
28699
|
AvatarPrimitive.Image,
|
|
28681
28700
|
{
|
|
28682
28701
|
ref,
|
|
@@ -28685,7 +28704,7 @@ var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
28685
28704
|
}
|
|
28686
28705
|
));
|
|
28687
28706
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
28688
|
-
var AvatarFallback = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
28707
|
+
var AvatarFallback = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
28689
28708
|
AvatarPrimitive.Fallback,
|
|
28690
28709
|
{
|
|
28691
28710
|
ref,
|
|
@@ -28701,7 +28720,7 @@ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
|
28701
28720
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
28702
28721
|
var import_link6 = __toESM(require("next/link"));
|
|
28703
28722
|
var import_image3 = __toESM(require("next/image"));
|
|
28704
|
-
var
|
|
28723
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
28705
28724
|
function Navbar({
|
|
28706
28725
|
style,
|
|
28707
28726
|
badgeType,
|
|
@@ -28716,9 +28735,9 @@ function Navbar({
|
|
|
28716
28735
|
userName = "Guest User"
|
|
28717
28736
|
}) {
|
|
28718
28737
|
const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
|
|
28719
|
-
return /* @__PURE__ */ (0,
|
|
28720
|
-
/* @__PURE__ */ (0,
|
|
28721
|
-
!isMobileView && /* @__PURE__ */ (0,
|
|
28738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("nav", { className: "w-full border-b bg-white shadow-sm", style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-2", children: [
|
|
28739
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_link6.default, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" }) }),
|
|
28740
|
+
!isMobileView && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
28722
28741
|
import_link6.default,
|
|
28723
28742
|
{
|
|
28724
28743
|
href: item.url || "#",
|
|
@@ -28727,54 +28746,54 @@ function Navbar({
|
|
|
28727
28746
|
},
|
|
28728
28747
|
item.id
|
|
28729
28748
|
)) }),
|
|
28730
|
-
/* @__PURE__ */ (0,
|
|
28731
|
-
!isMobileView ? /* @__PURE__ */ (0,
|
|
28732
|
-
/* @__PURE__ */ (0,
|
|
28733
|
-
/* @__PURE__ */ (0,
|
|
28734
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
28749
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
28750
|
+
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
28751
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
28752
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
|
|
28753
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
28735
28754
|
Button,
|
|
28736
28755
|
{
|
|
28737
28756
|
variant: "ghost",
|
|
28738
28757
|
size: "icon",
|
|
28739
28758
|
className: "border border-gray-400",
|
|
28740
|
-
children: /* @__PURE__ */ (0,
|
|
28759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Search, { className: "h-5 w-5 text-gray-400" })
|
|
28741
28760
|
}
|
|
28742
28761
|
),
|
|
28743
|
-
/* @__PURE__ */ (0,
|
|
28744
|
-
/* @__PURE__ */ (0,
|
|
28745
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0,
|
|
28762
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "relative bg-[#E9E9E9] rounded-md", children: [
|
|
28763
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F]" }) }),
|
|
28764
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
|
|
28746
28765
|
] }),
|
|
28747
|
-
/* @__PURE__ */ (0,
|
|
28748
|
-
/* @__PURE__ */ (0,
|
|
28749
|
-
!isMobileView && showName && /* @__PURE__ */ (0,
|
|
28750
|
-
!isMobileView ? /* @__PURE__ */ (0,
|
|
28751
|
-
/* @__PURE__ */ (0,
|
|
28766
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenu, { children: [
|
|
28767
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
28768
|
+
!isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h4", { className: "text-[#000000] text-[13px] font-[500] mb-0", children: userName }),
|
|
28769
|
+
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
28770
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
28752
28771
|
AvatarImage,
|
|
28753
28772
|
{
|
|
28754
28773
|
src: "/images/appbuilder/toolset/profile.svg",
|
|
28755
28774
|
alt: "Profile"
|
|
28756
28775
|
}
|
|
28757
|
-
) : /* @__PURE__ */ (0,
|
|
28758
|
-
/* @__PURE__ */ (0,
|
|
28776
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
|
|
28777
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
28759
28778
|
Button,
|
|
28760
28779
|
{
|
|
28761
28780
|
variant: "ghost",
|
|
28762
28781
|
size: "icon",
|
|
28763
28782
|
className: "text-gray-900 md:hidden",
|
|
28764
|
-
children: /* @__PURE__ */ (0,
|
|
28783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Menu, { className: "h-6 w-6" })
|
|
28765
28784
|
}
|
|
28766
28785
|
)
|
|
28767
|
-
] }) : /* @__PURE__ */ (0,
|
|
28786
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
28768
28787
|
Button,
|
|
28769
28788
|
{
|
|
28770
28789
|
variant: "ghost",
|
|
28771
28790
|
size: "icon",
|
|
28772
28791
|
className: "text-gray-900",
|
|
28773
|
-
children: /* @__PURE__ */ (0,
|
|
28792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Menu, { className: "h-6 w-6" })
|
|
28774
28793
|
}
|
|
28775
28794
|
)
|
|
28776
28795
|
] }) }),
|
|
28777
|
-
/* @__PURE__ */ (0,
|
|
28796
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuContent, { align: "end", className: "bg-white", children: list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) }) })
|
|
28778
28797
|
] })
|
|
28779
28798
|
] })
|
|
28780
28799
|
] }) });
|
|
@@ -28782,28 +28801,28 @@ function Navbar({
|
|
|
28782
28801
|
|
|
28783
28802
|
// src/components/Chart/BarChart.tsx
|
|
28784
28803
|
var import_recharts = require("recharts");
|
|
28785
|
-
var
|
|
28804
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
28786
28805
|
var ChartComponent = ({ className, style, ...props }) => {
|
|
28787
28806
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
28788
28807
|
const chartType = props.chartType || "bar";
|
|
28789
28808
|
const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
|
|
28790
|
-
return /* @__PURE__ */ (0,
|
|
28791
|
-
/* @__PURE__ */ (0,
|
|
28792
|
-
/* @__PURE__ */ (0,
|
|
28793
|
-
/* @__PURE__ */ (0,
|
|
28794
|
-
/* @__PURE__ */ (0,
|
|
28795
|
-
/* @__PURE__ */ (0,
|
|
28796
|
-
/* @__PURE__ */ (0,
|
|
28797
|
-
] }) : /* @__PURE__ */ (0,
|
|
28798
|
-
/* @__PURE__ */ (0,
|
|
28799
|
-
/* @__PURE__ */ (0,
|
|
28800
|
-
/* @__PURE__ */ (0,
|
|
28809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: `${className} h-[400px]`, style, children: data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_recharts.BarChart, { data, children: [
|
|
28810
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
28811
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.XAxis, { dataKey: "name" }),
|
|
28812
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.YAxis, {}),
|
|
28813
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.Tooltip, {}),
|
|
28814
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
|
|
28815
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.Bar, { dataKey: "value", fill: "#00695C" })
|
|
28816
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_recharts.AreaChart, { data, children: [
|
|
28817
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
28818
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
|
|
28819
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
|
|
28801
28820
|
] }) }),
|
|
28802
|
-
/* @__PURE__ */ (0,
|
|
28803
|
-
/* @__PURE__ */ (0,
|
|
28804
|
-
/* @__PURE__ */ (0,
|
|
28805
|
-
/* @__PURE__ */ (0,
|
|
28806
|
-
/* @__PURE__ */ (0,
|
|
28821
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
28822
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.XAxis, { dataKey: "name" }),
|
|
28823
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.YAxis, {}),
|
|
28824
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_recharts.Tooltip, {}),
|
|
28825
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
28807
28826
|
import_recharts.Area,
|
|
28808
28827
|
{
|
|
28809
28828
|
type: "monotone",
|
|
@@ -28819,7 +28838,7 @@ var BarChart_default = ChartComponent;
|
|
|
28819
28838
|
|
|
28820
28839
|
// src/components/Chart/PieChart.tsx
|
|
28821
28840
|
var import_recharts2 = require("recharts");
|
|
28822
|
-
var
|
|
28841
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
28823
28842
|
var DonutChart = ({ className, style, ...props }) => {
|
|
28824
28843
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
28825
28844
|
const total = data.reduce((sum, d) => sum + d.value, 0);
|
|
@@ -28830,7 +28849,7 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28830
28849
|
const renderLabel = ({ value, x, y }) => {
|
|
28831
28850
|
if (value == null) return null;
|
|
28832
28851
|
const percentage = (Number(value) / total * 100).toFixed(0);
|
|
28833
|
-
return /* @__PURE__ */ (0,
|
|
28852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
28834
28853
|
"text",
|
|
28835
28854
|
{
|
|
28836
28855
|
x,
|
|
@@ -28852,33 +28871,33 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28852
28871
|
const wrapperClass = canvasMode ? forceDesktop ? "flex-row" : "flex-col" : "flex-col md:flex-row";
|
|
28853
28872
|
const renderLegends = () => {
|
|
28854
28873
|
if (!showLegends) return null;
|
|
28855
|
-
return /* @__PURE__ */ (0,
|
|
28874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
28856
28875
|
"div",
|
|
28857
28876
|
{
|
|
28858
28877
|
className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
|
|
28859
28878
|
children: [
|
|
28860
|
-
/* @__PURE__ */ (0,
|
|
28879
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
28861
28880
|
"span",
|
|
28862
28881
|
{
|
|
28863
28882
|
className: "inline-block w-[16px] h-[16px] rounded",
|
|
28864
28883
|
style: { backgroundColor: d.color }
|
|
28865
28884
|
}
|
|
28866
28885
|
),
|
|
28867
|
-
/* @__PURE__ */ (0,
|
|
28886
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
|
|
28868
28887
|
]
|
|
28869
28888
|
},
|
|
28870
28889
|
d.name
|
|
28871
28890
|
)) });
|
|
28872
28891
|
};
|
|
28873
|
-
return /* @__PURE__ */ (0,
|
|
28892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
28874
28893
|
"div",
|
|
28875
28894
|
{
|
|
28876
28895
|
className: `relative flex items-center ${wrapperClass} ${className}`,
|
|
28877
28896
|
style,
|
|
28878
28897
|
children: [
|
|
28879
|
-
/* @__PURE__ */ (0,
|
|
28880
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
28881
|
-
/* @__PURE__ */ (0,
|
|
28898
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
|
|
28899
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_recharts2.PieChart, { children: [
|
|
28900
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
28882
28901
|
import_recharts2.Pie,
|
|
28883
28902
|
{
|
|
28884
28903
|
data,
|
|
@@ -28890,8 +28909,8 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28890
28909
|
labelLine: false,
|
|
28891
28910
|
isAnimationActive: false,
|
|
28892
28911
|
children: [
|
|
28893
|
-
data.map((entry, index) => /* @__PURE__ */ (0,
|
|
28894
|
-
/* @__PURE__ */ (0,
|
|
28912
|
+
data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
|
|
28913
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
28895
28914
|
import_recharts2.LabelList,
|
|
28896
28915
|
{
|
|
28897
28916
|
dataKey: "value",
|
|
@@ -28902,14 +28921,14 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28902
28921
|
]
|
|
28903
28922
|
}
|
|
28904
28923
|
),
|
|
28905
|
-
/* @__PURE__ */ (0,
|
|
28924
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_recharts2.Tooltip, { formatter: (value, name) => [`${value}k`, name] })
|
|
28906
28925
|
] }) }),
|
|
28907
|
-
/* @__PURE__ */ (0,
|
|
28926
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-2xl md:text-4xl font-bold text-[#000]", children: [
|
|
28908
28927
|
total,
|
|
28909
28928
|
"k"
|
|
28910
28929
|
] })
|
|
28911
28930
|
] }),
|
|
28912
|
-
/* @__PURE__ */ (0,
|
|
28931
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: `flex ${forceDesktop ? "flex-col ml-auto space-y-3" : "flex-wrap justify-center gap-2 mt-4"}
|
|
28913
28932
|
w-full md:w-auto`, children: renderLegends() })
|
|
28914
28933
|
]
|
|
28915
28934
|
}
|
|
@@ -28918,10 +28937,10 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
28918
28937
|
var PieChart_default = DonutChart;
|
|
28919
28938
|
|
|
28920
28939
|
// src/components/Blocks/EmailComposer.tsx
|
|
28921
|
-
var
|
|
28940
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
28922
28941
|
function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
|
|
28923
|
-
return /* @__PURE__ */ (0,
|
|
28924
|
-
/* @__PURE__ */ (0,
|
|
28942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
|
|
28943
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28925
28944
|
"input",
|
|
28926
28945
|
{
|
|
28927
28946
|
type: "email",
|
|
@@ -28930,8 +28949,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28930
28949
|
required: true
|
|
28931
28950
|
}
|
|
28932
28951
|
) }),
|
|
28933
|
-
/* @__PURE__ */ (0,
|
|
28934
|
-
/* @__PURE__ */ (0,
|
|
28952
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
28953
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28935
28954
|
"input",
|
|
28936
28955
|
{
|
|
28937
28956
|
type: "email",
|
|
@@ -28942,7 +28961,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28942
28961
|
required: true
|
|
28943
28962
|
}
|
|
28944
28963
|
),
|
|
28945
|
-
!showCc && /* @__PURE__ */ (0,
|
|
28964
|
+
!showCc && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28946
28965
|
"button",
|
|
28947
28966
|
{
|
|
28948
28967
|
onClick: () => setShowCc?.(true),
|
|
@@ -28950,7 +28969,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28950
28969
|
children: "Cc"
|
|
28951
28970
|
}
|
|
28952
28971
|
),
|
|
28953
|
-
!showBcc && /* @__PURE__ */ (0,
|
|
28972
|
+
!showBcc && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28954
28973
|
"button",
|
|
28955
28974
|
{
|
|
28956
28975
|
onClick: () => setShowBcc?.(true),
|
|
@@ -28959,7 +28978,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28959
28978
|
}
|
|
28960
28979
|
)
|
|
28961
28980
|
] }) }),
|
|
28962
|
-
showCc && /* @__PURE__ */ (0,
|
|
28981
|
+
showCc && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28963
28982
|
"input",
|
|
28964
28983
|
{
|
|
28965
28984
|
type: "text",
|
|
@@ -28969,7 +28988,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28969
28988
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
28970
28989
|
}
|
|
28971
28990
|
) }),
|
|
28972
|
-
showBcc && /* @__PURE__ */ (0,
|
|
28991
|
+
showBcc && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28973
28992
|
"input",
|
|
28974
28993
|
{
|
|
28975
28994
|
type: "text",
|
|
@@ -28979,7 +28998,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28979
28998
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
28980
28999
|
}
|
|
28981
29000
|
) }),
|
|
28982
|
-
/* @__PURE__ */ (0,
|
|
29001
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
28983
29002
|
"input",
|
|
28984
29003
|
{
|
|
28985
29004
|
type: "text",
|
|
@@ -28989,11 +29008,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
28989
29008
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
28990
29009
|
}
|
|
28991
29010
|
) }),
|
|
28992
|
-
/* @__PURE__ */ (0,
|
|
28993
|
-
/* @__PURE__ */ (0,
|
|
28994
|
-
/* @__PURE__ */ (0,
|
|
28995
|
-
/* @__PURE__ */ (0,
|
|
28996
|
-
/* @__PURE__ */ (0,
|
|
29011
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(MyEditor, { value: body, onChange: setBody }) }),
|
|
29012
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
29013
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
|
|
29014
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
|
|
29015
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
|
|
28997
29016
|
] })
|
|
28998
29017
|
] }) });
|
|
28999
29018
|
}
|
|
@@ -29037,6 +29056,7 @@ function showSonnerToast({
|
|
|
29037
29056
|
// Annotate the CommonJS export names for ESM import in node:
|
|
29038
29057
|
0 && (module.exports = {
|
|
29039
29058
|
Accordion,
|
|
29059
|
+
AccordionGroup,
|
|
29040
29060
|
BarChart,
|
|
29041
29061
|
Breadcrumb,
|
|
29042
29062
|
Button,
|
|
@@ -29065,6 +29085,7 @@ function showSonnerToast({
|
|
|
29065
29085
|
RichText,
|
|
29066
29086
|
Search,
|
|
29067
29087
|
Shape,
|
|
29088
|
+
Slot,
|
|
29068
29089
|
Spacer,
|
|
29069
29090
|
Stages,
|
|
29070
29091
|
SwitchToggle,
|