@esic-lab/data-core-ui 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +71 -27
- package/dist/index.d.ts +71 -27
- package/dist/index.js +528 -438
- package/dist/index.mjs +515 -428
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -461,6 +461,7 @@ var require_customParseFormat = __commonJS({
|
|
|
461
461
|
// src/index.ts
|
|
462
462
|
var index_exports = {};
|
|
463
463
|
__export(index_exports, {
|
|
464
|
+
AntDModal: () => AntDModal,
|
|
464
465
|
AntDataTable: () => AntDataTable,
|
|
465
466
|
Breadcrumbs: () => Breadcrumbs,
|
|
466
467
|
Calendar: () => Calendar,
|
|
@@ -475,6 +476,7 @@ __export(index_exports, {
|
|
|
475
476
|
GhostButton: () => GhostButton,
|
|
476
477
|
HeadingPage: () => HeadingPage,
|
|
477
478
|
InputField: () => InputField,
|
|
479
|
+
InputFieldNumber: () => InputFieldNumber,
|
|
478
480
|
KpiSection: () => KpiSection,
|
|
479
481
|
Loader: () => Loader,
|
|
480
482
|
MenuNavBar: () => MenuNavBar,
|
|
@@ -492,6 +494,7 @@ __export(index_exports, {
|
|
|
492
494
|
Sidebar: () => Sidebar,
|
|
493
495
|
SortFilter: () => SortFilter,
|
|
494
496
|
Switch: () => Switch,
|
|
497
|
+
TabSelectionButton: () => TabSelectionButton,
|
|
495
498
|
TextAreaInput: () => TextAreaInput,
|
|
496
499
|
TextInput: () => TextInput,
|
|
497
500
|
TimePickerBasic: () => TimePickerBasic,
|
|
@@ -571,10 +574,26 @@ function GhostButton({ title, onClick, iconLeft, iconRight, disabled }) {
|
|
|
571
574
|
);
|
|
572
575
|
}
|
|
573
576
|
|
|
574
|
-
// src/
|
|
577
|
+
// src/Button/TabSelectionButton/TabSelectionButton.tsx
|
|
575
578
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
579
|
+
var TabSelectionButton = ({ title, now, onClickGoto }) => {
|
|
580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex subtitle-2", children: [
|
|
581
|
+
title.map((text) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
582
|
+
"button",
|
|
583
|
+
{
|
|
584
|
+
onClick: () => onClickGoto(text.path),
|
|
585
|
+
className: `text-nowrap px-2 cursor-pointer ${now === text.path ? "border-b-primary-700 text-primary-700 border-b-2" : "border-b-gray-200 border-b-2"}`,
|
|
586
|
+
children: text.name
|
|
587
|
+
}
|
|
588
|
+
)),
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-b-gray-200 border-b-2 w-full" })
|
|
590
|
+
] });
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
// src/Loader/Loader/Loader.tsx
|
|
594
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
576
595
|
function Loader({ size = 25, color = "#000000" }) {
|
|
577
|
-
return /* @__PURE__ */ (0,
|
|
596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
578
597
|
"div",
|
|
579
598
|
{
|
|
580
599
|
style: {
|
|
@@ -592,14 +611,14 @@ function Loader({ size = 25, color = "#000000" }) {
|
|
|
592
611
|
|
|
593
612
|
// src/Checkbox/Checkbox/Checkbox.tsx
|
|
594
613
|
var import_icons_react = require("@tabler/icons-react");
|
|
595
|
-
var
|
|
614
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
596
615
|
function Checkbox({ label, checked, onChange, disabled }) {
|
|
597
616
|
const handleClick = () => {
|
|
598
617
|
if (!disabled) {
|
|
599
618
|
onChange(!checked);
|
|
600
619
|
}
|
|
601
620
|
};
|
|
602
|
-
return /* @__PURE__ */ (0,
|
|
621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
603
622
|
"div",
|
|
604
623
|
{
|
|
605
624
|
className: `flex gap-[10px] items-center
|
|
@@ -607,32 +626,32 @@ function Checkbox({ label, checked, onChange, disabled }) {
|
|
|
607
626
|
"aria-disabled": disabled,
|
|
608
627
|
onClick: handleClick,
|
|
609
628
|
children: [
|
|
610
|
-
/* @__PURE__ */ (0,
|
|
629
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
611
630
|
"div",
|
|
612
631
|
{
|
|
613
632
|
className: `flex justify-center items-center border-[1px] border-black w-[24px] h-[24px] rounded-[8px] transition-colors duration-100
|
|
614
633
|
${checked ? "bg-black text-white" : "bg-white text-black"}
|
|
615
634
|
${disabled ? "pointer-events-none" : ""}`,
|
|
616
|
-
children: /* @__PURE__ */ (0,
|
|
635
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
617
636
|
"span",
|
|
618
637
|
{
|
|
619
638
|
className: `flex justify-center items-center transition-transform duration-150
|
|
620
639
|
${checked ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
621
|
-
children: /* @__PURE__ */ (0,
|
|
640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons_react.IconCheck, { size: 20 })
|
|
622
641
|
}
|
|
623
642
|
)
|
|
624
643
|
}
|
|
625
644
|
),
|
|
626
|
-
label && /* @__PURE__ */ (0,
|
|
645
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "body-1 select-none", children: label })
|
|
627
646
|
]
|
|
628
647
|
}
|
|
629
648
|
);
|
|
630
649
|
}
|
|
631
650
|
|
|
632
651
|
// src/Checkbox/CheckboxGroup/CheckboxGroup.tsx
|
|
633
|
-
var
|
|
652
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
634
653
|
function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
635
|
-
return /* @__PURE__ */ (0,
|
|
654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
636
655
|
Checkbox,
|
|
637
656
|
{
|
|
638
657
|
checked: opt.checked,
|
|
@@ -645,14 +664,14 @@ function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
|
645
664
|
}
|
|
646
665
|
|
|
647
666
|
// src/Radio/Radio/Radio.tsx
|
|
648
|
-
var
|
|
667
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
649
668
|
function Radio({ selected, onChange, disabled }) {
|
|
650
669
|
const handleClick = () => {
|
|
651
670
|
if (!disabled) {
|
|
652
671
|
onChange(!selected);
|
|
653
672
|
}
|
|
654
673
|
};
|
|
655
|
-
return /* @__PURE__ */ (0,
|
|
674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
656
675
|
"div",
|
|
657
676
|
{
|
|
658
677
|
className: `
|
|
@@ -661,31 +680,31 @@ function Radio({ selected, onChange, disabled }) {
|
|
|
661
680
|
`,
|
|
662
681
|
onClick: handleClick,
|
|
663
682
|
"aria-disabled": disabled,
|
|
664
|
-
children: selected && /* @__PURE__ */ (0,
|
|
683
|
+
children: selected && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `bg-black w-[10px] h-[10px] rounded-full transition-all duration-300` })
|
|
665
684
|
}
|
|
666
685
|
);
|
|
667
686
|
}
|
|
668
687
|
|
|
669
688
|
// src/Radio/RadioGroup/RadioGroup.tsx
|
|
670
|
-
var
|
|
689
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
671
690
|
function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
|
|
672
|
-
return /* @__PURE__ */ (0,
|
|
673
|
-
/* @__PURE__ */ (0,
|
|
674
|
-
/* @__PURE__ */ (0,
|
|
691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
692
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value), disabled: opt.disabled }),
|
|
693
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: `body-1 ${opt.disabled ? "text-gray-400 cursor-not-allowed" : ""}`, children: opt.label })
|
|
675
694
|
] }, opt.value)) });
|
|
676
695
|
}
|
|
677
696
|
|
|
678
697
|
// src/Switch/Switch/Switch.tsx
|
|
679
|
-
var
|
|
698
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
680
699
|
function Switch({ label, checked, onChange, disabled }) {
|
|
681
700
|
const handleClick = () => {
|
|
682
701
|
if (!disabled) {
|
|
683
702
|
onChange(!checked);
|
|
684
703
|
}
|
|
685
704
|
};
|
|
686
|
-
return /* @__PURE__ */ (0,
|
|
687
|
-
label && /* @__PURE__ */ (0,
|
|
688
|
-
/* @__PURE__ */ (0,
|
|
705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-[10px]", children: [
|
|
706
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
689
708
|
"button",
|
|
690
709
|
{
|
|
691
710
|
type: "button",
|
|
@@ -697,7 +716,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
697
716
|
${checked ? "bg-blue-500" : "bg-gray-300"}
|
|
698
717
|
${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
|
|
699
718
|
`,
|
|
700
|
-
children: /* @__PURE__ */ (0,
|
|
719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
701
720
|
"div",
|
|
702
721
|
{
|
|
703
722
|
className: `bg-white w-5 h-5 rounded-full shadow-md transform transition-transform duration-300
|
|
@@ -710,22 +729,22 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
710
729
|
}
|
|
711
730
|
|
|
712
731
|
// src/NavBar/MenuNavBar/MenuNavBar.tsx
|
|
713
|
-
var
|
|
732
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
714
733
|
function MenuNavBar({ menus, onClick }) {
|
|
715
|
-
return /* @__PURE__ */ (0,
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
717
|
-
menu?.subMenus.map((subMenu) => /* @__PURE__ */ (0,
|
|
734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
|
|
735
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
|
|
736
|
+
menu?.subMenus.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
718
737
|
"div",
|
|
719
738
|
{
|
|
720
739
|
className: "group flex justify-center items-center gap-[10px] p-[10px] w-[202px] h-[47px] rounded-[6px] subtitle-2 cursor-pointer hover:bg-red-100 active:bg-primary-500 hover:text-white active:text-white",
|
|
721
740
|
onClick: () => onClick(subMenu.path),
|
|
722
741
|
children: [
|
|
723
|
-
/* @__PURE__ */ (0,
|
|
724
|
-
subMenu.icon && /* @__PURE__ */ (0,
|
|
725
|
-
subMenu.iconActive && /* @__PURE__ */ (0,
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: [
|
|
743
|
+
subMenu.icon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: `block ${subMenu.iconActive ? "group-active:hidden" : ""}`, children: subMenu.icon }),
|
|
744
|
+
subMenu.iconActive && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "hidden group-active:block", children: subMenu.iconActive })
|
|
726
745
|
] }),
|
|
727
746
|
subMenu.title,
|
|
728
|
-
/* @__PURE__ */ (0,
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
|
|
729
748
|
]
|
|
730
749
|
},
|
|
731
750
|
`sub_${subMenu.title}`
|
|
@@ -736,39 +755,39 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
736
755
|
// src/NavBar/MenuNavBar/Sidebar.tsx
|
|
737
756
|
var import_icons_react2 = require("@tabler/icons-react");
|
|
738
757
|
var import_react = require("react");
|
|
739
|
-
var
|
|
758
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
740
759
|
var SidebarContext = (0, import_react.createContext)({ expanded: false });
|
|
741
760
|
function Sidebar({ children, logo }) {
|
|
742
761
|
const [expanded, setExpanded] = (0, import_react.useState)(true);
|
|
743
|
-
return /* @__PURE__ */ (0,
|
|
744
|
-
/* @__PURE__ */ (0,
|
|
745
|
-
expanded && logo && /* @__PURE__ */ (0,
|
|
746
|
-
/* @__PURE__ */ (0,
|
|
762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("aside", { className: "h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
|
|
763
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
|
|
764
|
+
expanded && logo && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: logo, width: 120, className: "ml-auto" }),
|
|
765
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
747
766
|
"button",
|
|
748
767
|
{
|
|
749
768
|
className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
|
|
750
769
|
onClick: () => setExpanded((curr) => !curr),
|
|
751
|
-
children: expanded ? /* @__PURE__ */ (0,
|
|
770
|
+
children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_react2.IconChevronLeftPipe, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_react2.IconChevronRightPipe, {})
|
|
752
771
|
}
|
|
753
772
|
)
|
|
754
773
|
] }),
|
|
755
|
-
/* @__PURE__ */ (0,
|
|
774
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "flex-1 px-3", children }) })
|
|
756
775
|
] }) });
|
|
757
776
|
}
|
|
758
777
|
|
|
759
778
|
// src/NavBar/TopNavBar/TopNavBar.tsx
|
|
760
779
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
761
|
-
var
|
|
780
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
762
781
|
function TopNavBar({ onClickNoti, logo }) {
|
|
763
|
-
return /* @__PURE__ */ (0,
|
|
764
|
-
/* @__PURE__ */ (0,
|
|
782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w-full h-full flex", children: [
|
|
783
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
|
|
765
784
|
logo,
|
|
766
|
-
/* @__PURE__ */ (0,
|
|
785
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "subtitle-1", children: "Project Management" })
|
|
767
786
|
] }),
|
|
768
|
-
/* @__PURE__ */ (0,
|
|
769
|
-
/* @__PURE__ */ (0,
|
|
770
|
-
/* @__PURE__ */ (0,
|
|
771
|
-
/* @__PURE__ */ (0,
|
|
787
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: "Search" }),
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons_react3.IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
|
|
772
791
|
] })
|
|
773
792
|
] });
|
|
774
793
|
}
|
|
@@ -780,7 +799,7 @@ var import_react3 = require("react");
|
|
|
780
799
|
// src/Table/Pagination/Pagination.tsx
|
|
781
800
|
var import_icons_react4 = require("@tabler/icons-react");
|
|
782
801
|
var import_react2 = require("react");
|
|
783
|
-
var
|
|
802
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
784
803
|
function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
785
804
|
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
786
805
|
const getPages = (0, import_react2.useMemo)(() => {
|
|
@@ -804,21 +823,21 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
804
823
|
return pages;
|
|
805
824
|
}, [totalPages, currentPage]);
|
|
806
825
|
if (totalPages <= 1) return null;
|
|
807
|
-
return /* @__PURE__ */ (0,
|
|
808
|
-
/* @__PURE__ */ (0,
|
|
826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
809
828
|
"button",
|
|
810
829
|
{
|
|
811
830
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
812
831
|
disabled: currentPage === 1,
|
|
813
832
|
onClick: () => onPageChange(currentPage - 1),
|
|
814
833
|
children: [
|
|
815
|
-
/* @__PURE__ */ (0,
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react4.IconArrowLeft, {}),
|
|
816
835
|
"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
|
|
817
836
|
]
|
|
818
837
|
}
|
|
819
838
|
),
|
|
820
839
|
getPages.map(
|
|
821
|
-
(page, i) => typeof page === "string" ? /* @__PURE__ */ (0,
|
|
840
|
+
(page, i) => typeof page === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
822
841
|
"button",
|
|
823
842
|
{
|
|
824
843
|
className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
|
|
@@ -829,7 +848,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
829
848
|
i
|
|
830
849
|
)
|
|
831
850
|
),
|
|
832
|
-
/* @__PURE__ */ (0,
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
833
852
|
"button",
|
|
834
853
|
{
|
|
835
854
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
@@ -837,7 +856,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
837
856
|
onClick: () => onPageChange(currentPage + 1),
|
|
838
857
|
children: [
|
|
839
858
|
"\u0E16\u0E31\u0E14\u0E44\u0E1B",
|
|
840
|
-
/* @__PURE__ */ (0,
|
|
859
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react4.IconArrowRight, {})
|
|
841
860
|
]
|
|
842
861
|
}
|
|
843
862
|
)
|
|
@@ -845,7 +864,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
845
864
|
}
|
|
846
865
|
|
|
847
866
|
// src/Table/DataTable/DataTable.tsx
|
|
848
|
-
var
|
|
867
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
849
868
|
function DataTable({ columns, data, onSort, isLoading }) {
|
|
850
869
|
const cols = Math.max(1, columns.length);
|
|
851
870
|
const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
|
|
@@ -857,14 +876,14 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
857
876
|
onSort();
|
|
858
877
|
}
|
|
859
878
|
};
|
|
860
|
-
return /* @__PURE__ */ (0,
|
|
861
|
-
/* @__PURE__ */ (0,
|
|
879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "border rounded-md w-full h-full", children: [
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
|
|
862
881
|
const isActive = sortConfig?.key === col.accessor;
|
|
863
882
|
const direction = isActive ? sortConfig?.direction : null;
|
|
864
|
-
return /* @__PURE__ */ (0,
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
|
|
865
884
|
col.header,
|
|
866
|
-
col.sortable && /* @__PURE__ */ (0,
|
|
867
|
-
direction === null && /* @__PURE__ */ (0,
|
|
885
|
+
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
886
|
+
direction === null && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
868
887
|
import_icons_react5.IconSelector,
|
|
869
888
|
{
|
|
870
889
|
size: 15,
|
|
@@ -872,7 +891,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
872
891
|
onClick: () => onSorting({ key: col.accessor, direction: "asc" })
|
|
873
892
|
}
|
|
874
893
|
),
|
|
875
|
-
direction === "asc" && /* @__PURE__ */ (0,
|
|
894
|
+
direction === "asc" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
876
895
|
import_icons_react5.IconSortAscending,
|
|
877
896
|
{
|
|
878
897
|
size: 15,
|
|
@@ -880,7 +899,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
880
899
|
onClick: () => onSorting({ key: col.accessor, direction: "desc" })
|
|
881
900
|
}
|
|
882
901
|
),
|
|
883
|
-
direction === "desc" && /* @__PURE__ */ (0,
|
|
902
|
+
direction === "desc" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
884
903
|
import_icons_react5.IconSortDescending,
|
|
885
904
|
{
|
|
886
905
|
size: 15,
|
|
@@ -891,23 +910,23 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
891
910
|
] })
|
|
892
911
|
] }, i);
|
|
893
912
|
}) }),
|
|
894
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
913
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Loader, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
895
914
|
"div",
|
|
896
915
|
{
|
|
897
916
|
className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
|
|
898
917
|
style: { ["--cols"]: cols },
|
|
899
|
-
children: columns.map((col, c) => /* @__PURE__ */ (0,
|
|
918
|
+
children: columns.map((col, c) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
|
|
900
919
|
},
|
|
901
920
|
i
|
|
902
921
|
)) }),
|
|
903
|
-
/* @__PURE__ */ (0,
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
|
|
904
923
|
] });
|
|
905
924
|
}
|
|
906
925
|
|
|
907
926
|
// src/Table/DataTable/AntDataTable.tsx
|
|
908
927
|
var import_antd = require("antd");
|
|
909
928
|
var import_react4 = require("react");
|
|
910
|
-
var
|
|
929
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
911
930
|
function AntDataTable({
|
|
912
931
|
dataSource,
|
|
913
932
|
columns,
|
|
@@ -926,7 +945,7 @@ function AntDataTable({
|
|
|
926
945
|
onRowSelect && onRowSelect(newSelectedRowKeys);
|
|
927
946
|
}
|
|
928
947
|
};
|
|
929
|
-
return /* @__PURE__ */ (0,
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
930
949
|
import_antd.ConfigProvider,
|
|
931
950
|
{
|
|
932
951
|
theme: {
|
|
@@ -936,7 +955,7 @@ function AntDataTable({
|
|
|
936
955
|
fontSize: 14
|
|
937
956
|
}
|
|
938
957
|
},
|
|
939
|
-
children: /* @__PURE__ */ (0,
|
|
958
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
940
959
|
import_antd.Table,
|
|
941
960
|
{
|
|
942
961
|
dataSource,
|
|
@@ -959,7 +978,7 @@ var import_timegrid = __toESM(require("@fullcalendar/timegrid"));
|
|
|
959
978
|
var import_interaction = __toESM(require("@fullcalendar/interaction"));
|
|
960
979
|
var import_th = __toESM(require("@fullcalendar/core/locales/th"));
|
|
961
980
|
var import_icons_react6 = require("@tabler/icons-react");
|
|
962
|
-
var
|
|
981
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
963
982
|
function Calendar({ events }) {
|
|
964
983
|
const calendarRef = (0, import_react5.useRef)(null);
|
|
965
984
|
const [monthTitle, setMonthTitle] = (0, import_react5.useState)("");
|
|
@@ -978,11 +997,11 @@ function Calendar({ events }) {
|
|
|
978
997
|
(0, import_react5.useEffect)(() => {
|
|
979
998
|
updateTitle();
|
|
980
999
|
}, []);
|
|
981
|
-
return /* @__PURE__ */ (0,
|
|
982
|
-
/* @__PURE__ */ (0,
|
|
983
|
-
/* @__PURE__ */ (0,
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
985
|
-
/* @__PURE__ */ (0,
|
|
1000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "fc w-full h-full relative z-10", children: [
|
|
1001
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex mb-[8px]", children: [
|
|
1002
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "headline-5", children: monthTitle }),
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex gap-[10px] ml-auto", children: [
|
|
1004
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
986
1005
|
"p",
|
|
987
1006
|
{
|
|
988
1007
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -993,7 +1012,7 @@ function Calendar({ events }) {
|
|
|
993
1012
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
994
1013
|
}
|
|
995
1014
|
),
|
|
996
|
-
/* @__PURE__ */ (0,
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
997
1016
|
"p",
|
|
998
1017
|
{
|
|
999
1018
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1004,7 +1023,7 @@ function Calendar({ events }) {
|
|
|
1004
1023
|
children: "Month"
|
|
1005
1024
|
}
|
|
1006
1025
|
),
|
|
1007
|
-
/* @__PURE__ */ (0,
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1008
1027
|
"p",
|
|
1009
1028
|
{
|
|
1010
1029
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1015,7 +1034,7 @@ function Calendar({ events }) {
|
|
|
1015
1034
|
children: "Week"
|
|
1016
1035
|
}
|
|
1017
1036
|
),
|
|
1018
|
-
/* @__PURE__ */ (0,
|
|
1037
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1019
1038
|
"p",
|
|
1020
1039
|
{
|
|
1021
1040
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1026,7 +1045,7 @@ function Calendar({ events }) {
|
|
|
1026
1045
|
children: "Day"
|
|
1027
1046
|
}
|
|
1028
1047
|
),
|
|
1029
|
-
/* @__PURE__ */ (0,
|
|
1048
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1030
1049
|
"button",
|
|
1031
1050
|
{
|
|
1032
1051
|
className: "cursor-pointer",
|
|
@@ -1034,10 +1053,10 @@ function Calendar({ events }) {
|
|
|
1034
1053
|
calendarRef.current?.getApi().prev();
|
|
1035
1054
|
updateTitle();
|
|
1036
1055
|
},
|
|
1037
|
-
children: /* @__PURE__ */ (0,
|
|
1056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react6.IconChevronLeft, {})
|
|
1038
1057
|
}
|
|
1039
1058
|
),
|
|
1040
|
-
/* @__PURE__ */ (0,
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1041
1060
|
"button",
|
|
1042
1061
|
{
|
|
1043
1062
|
className: "cursor-pointer",
|
|
@@ -1045,12 +1064,12 @@ function Calendar({ events }) {
|
|
|
1045
1064
|
calendarRef.current?.getApi().next();
|
|
1046
1065
|
updateTitle();
|
|
1047
1066
|
},
|
|
1048
|
-
children: /* @__PURE__ */ (0,
|
|
1067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react6.IconChevronRight, {})
|
|
1049
1068
|
}
|
|
1050
1069
|
)
|
|
1051
1070
|
] })
|
|
1052
1071
|
] }),
|
|
1053
|
-
/* @__PURE__ */ (0,
|
|
1072
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1054
1073
|
import_react6.default,
|
|
1055
1074
|
{
|
|
1056
1075
|
ref: calendarRef,
|
|
@@ -1079,28 +1098,28 @@ function Calendar({ events }) {
|
|
|
1079
1098
|
});
|
|
1080
1099
|
},
|
|
1081
1100
|
eventContent: (arg) => {
|
|
1082
|
-
return /* @__PURE__ */ (0,
|
|
1101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex items-center h-[28px] p-[4px] border-green-500 border-l-[10px] bg-red-400 rounded text-left text-white caption-1", children: arg.event.title }) });
|
|
1083
1102
|
},
|
|
1084
1103
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
1085
1104
|
}
|
|
1086
1105
|
) }),
|
|
1087
|
-
openPopup && /* @__PURE__ */ (0,
|
|
1106
|
+
openPopup && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
|
|
1088
1107
|
] });
|
|
1089
1108
|
}
|
|
1090
1109
|
function EventPopUp({ event, onClose }) {
|
|
1091
|
-
return /* @__PURE__ */ (0,
|
|
1092
|
-
/* @__PURE__ */ (0,
|
|
1093
|
-
/* @__PURE__ */ (0,
|
|
1094
|
-
/* @__PURE__ */ (0,
|
|
1095
|
-
/* @__PURE__ */ (0,
|
|
1096
|
-
/* @__PURE__ */ (0,
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
|
|
1111
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react6.IconX, { className: "w-6 h-6 text-gray-600" }) }),
|
|
1112
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "text-lg font-semibold", children: event.title }) }),
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
|
|
1114
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
1115
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
|
|
1097
1116
|
event?.start?.toLocaleString?.() || String(event?.start)
|
|
1098
1117
|
] }),
|
|
1099
|
-
/* @__PURE__ */ (0,
|
|
1100
|
-
/* @__PURE__ */ (0,
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
1119
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
|
|
1101
1120
|
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1102
1121
|
] }),
|
|
1103
|
-
/* @__PURE__ */ (0,
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "text-sm font-semibold text-gray-500 uppercase mb-2 hover:underline cursor-pointer", children: "\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21" })
|
|
1104
1123
|
] })
|
|
1105
1124
|
] });
|
|
1106
1125
|
}
|
|
@@ -1108,7 +1127,7 @@ function EventPopUp({ event, onClose }) {
|
|
|
1108
1127
|
// src/Input/TextInput/TextInput.tsx
|
|
1109
1128
|
var import_icons_react7 = require("@tabler/icons-react");
|
|
1110
1129
|
var import_react7 = require("react");
|
|
1111
|
-
var
|
|
1130
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1112
1131
|
function TextInput({
|
|
1113
1132
|
label,
|
|
1114
1133
|
placeholder,
|
|
@@ -1125,18 +1144,18 @@ function TextInput({
|
|
|
1125
1144
|
setShowPassword(!showPassword);
|
|
1126
1145
|
};
|
|
1127
1146
|
const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
|
|
1128
|
-
return /* @__PURE__ */ (0,
|
|
1129
|
-
label && /* @__PURE__ */ (0,
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1148
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "body-1 mb-[8px]", children: [
|
|
1130
1149
|
label,
|
|
1131
|
-
required && /* @__PURE__ */ (0,
|
|
1150
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-red-600", children: "\xA0*" })
|
|
1132
1151
|
] }),
|
|
1133
|
-
/* @__PURE__ */ (0,
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1134
1153
|
"div",
|
|
1135
1154
|
{
|
|
1136
1155
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1137
1156
|
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-600" : ""}`,
|
|
1138
1157
|
children: [
|
|
1139
|
-
/* @__PURE__ */ (0,
|
|
1158
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1140
1159
|
"input",
|
|
1141
1160
|
{
|
|
1142
1161
|
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -1149,75 +1168,18 @@ function TextInput({
|
|
|
1149
1168
|
disabled
|
|
1150
1169
|
}
|
|
1151
1170
|
),
|
|
1152
|
-
type === "password" && (showPassword ? /* @__PURE__ */ (0,
|
|
1171
|
+
type === "password" && (showPassword ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react7.IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react7.IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
|
|
1153
1172
|
]
|
|
1154
1173
|
}
|
|
1155
1174
|
),
|
|
1156
|
-
error && /* @__PURE__ */ (0,
|
|
1175
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-red-600 body-1", children: error })
|
|
1157
1176
|
] });
|
|
1158
1177
|
}
|
|
1159
1178
|
|
|
1160
|
-
// src/InputField/InputField.tsx
|
|
1161
|
-
var import_antd2 = require("antd");
|
|
1162
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1163
|
-
function InputField({
|
|
1164
|
-
value,
|
|
1165
|
-
onChange,
|
|
1166
|
-
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1167
|
-
title,
|
|
1168
|
-
required,
|
|
1169
|
-
bottomText,
|
|
1170
|
-
disabled,
|
|
1171
|
-
error,
|
|
1172
|
-
addonBefore,
|
|
1173
|
-
addonAfter,
|
|
1174
|
-
defaultValue,
|
|
1175
|
-
className,
|
|
1176
|
-
onClear
|
|
1177
|
-
}) {
|
|
1178
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1179
|
-
import_antd2.ConfigProvider,
|
|
1180
|
-
{
|
|
1181
|
-
theme: {
|
|
1182
|
-
token: {
|
|
1183
|
-
fontFamily: "Kanit"
|
|
1184
|
-
}
|
|
1185
|
-
},
|
|
1186
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "container-input", children: [
|
|
1187
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1188
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "body-1", children: title }),
|
|
1189
|
-
" ",
|
|
1190
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1191
|
-
] }),
|
|
1192
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1193
|
-
import_antd2.Input,
|
|
1194
|
-
{
|
|
1195
|
-
value,
|
|
1196
|
-
placeholder,
|
|
1197
|
-
disabled,
|
|
1198
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1199
|
-
onChange: (e) => onChange(e.target.value || void 0),
|
|
1200
|
-
allowClear: true,
|
|
1201
|
-
addonBefore,
|
|
1202
|
-
addonAfter,
|
|
1203
|
-
defaultValue,
|
|
1204
|
-
onClear
|
|
1205
|
-
}
|
|
1206
|
-
),
|
|
1207
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1208
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1209
|
-
" ",
|
|
1210
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1211
|
-
] })
|
|
1212
|
-
] })
|
|
1213
|
-
}
|
|
1214
|
-
);
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
1179
|
// src/Input/TextArea/TextArea.tsx
|
|
1218
|
-
var
|
|
1180
|
+
var import_antd2 = require("antd");
|
|
1219
1181
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1220
|
-
var { TextArea } =
|
|
1182
|
+
var { TextArea } = import_antd2.Input;
|
|
1221
1183
|
function TextAreaInput({
|
|
1222
1184
|
label,
|
|
1223
1185
|
height = 4,
|
|
@@ -1232,7 +1194,7 @@ function TextAreaInput({
|
|
|
1232
1194
|
disabled
|
|
1233
1195
|
}) {
|
|
1234
1196
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1235
|
-
|
|
1197
|
+
import_antd2.ConfigProvider,
|
|
1236
1198
|
{
|
|
1237
1199
|
theme: {
|
|
1238
1200
|
components: {},
|
|
@@ -1269,29 +1231,30 @@ function TextAreaInput({
|
|
|
1269
1231
|
) });
|
|
1270
1232
|
}
|
|
1271
1233
|
|
|
1272
|
-
// src/
|
|
1273
|
-
var
|
|
1234
|
+
// src/Input/InputField/InputField.tsx
|
|
1235
|
+
var import_antd3 = require("antd");
|
|
1274
1236
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1275
|
-
function
|
|
1237
|
+
function InputField({
|
|
1276
1238
|
value,
|
|
1277
1239
|
onChange,
|
|
1278
|
-
|
|
1240
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1279
1241
|
title,
|
|
1242
|
+
required,
|
|
1280
1243
|
bottomText,
|
|
1281
|
-
error,
|
|
1282
1244
|
disabled,
|
|
1283
|
-
|
|
1284
|
-
|
|
1245
|
+
error,
|
|
1246
|
+
addonBefore,
|
|
1247
|
+
addonAfter,
|
|
1248
|
+
defaultValue,
|
|
1285
1249
|
className,
|
|
1286
|
-
|
|
1250
|
+
onClear
|
|
1287
1251
|
}) {
|
|
1288
1252
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1289
|
-
|
|
1253
|
+
import_antd3.ConfigProvider,
|
|
1290
1254
|
{
|
|
1291
1255
|
theme: {
|
|
1292
1256
|
token: {
|
|
1293
|
-
fontFamily: "Kanit"
|
|
1294
|
-
fontSize: 16
|
|
1257
|
+
fontFamily: "Kanit"
|
|
1295
1258
|
}
|
|
1296
1259
|
},
|
|
1297
1260
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "container-input", children: [
|
|
@@ -1301,26 +1264,18 @@ function ColorPickerBasic({
|
|
|
1301
1264
|
required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1302
1265
|
] }),
|
|
1303
1266
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1304
|
-
|
|
1267
|
+
import_antd3.Input,
|
|
1305
1268
|
{
|
|
1306
|
-
defaultFormat,
|
|
1307
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1308
1269
|
value,
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
"(",
|
|
1319
|
-
hex,
|
|
1320
|
-
")"
|
|
1321
|
-
] });
|
|
1322
|
-
},
|
|
1323
|
-
disabled
|
|
1270
|
+
placeholder,
|
|
1271
|
+
disabled,
|
|
1272
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1273
|
+
onChange: (e) => onChange(e.target.value || void 0),
|
|
1274
|
+
allowClear: true,
|
|
1275
|
+
addonBefore,
|
|
1276
|
+
addonAfter,
|
|
1277
|
+
defaultValue,
|
|
1278
|
+
onClear
|
|
1324
1279
|
}
|
|
1325
1280
|
),
|
|
1326
1281
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
@@ -1333,12 +1288,75 @@ function ColorPickerBasic({
|
|
|
1333
1288
|
);
|
|
1334
1289
|
}
|
|
1335
1290
|
|
|
1291
|
+
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1292
|
+
var import_antd4 = require("antd");
|
|
1293
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1294
|
+
function InputFieldNumber({
|
|
1295
|
+
value,
|
|
1296
|
+
onChange,
|
|
1297
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1298
|
+
title,
|
|
1299
|
+
required,
|
|
1300
|
+
disabled,
|
|
1301
|
+
error,
|
|
1302
|
+
addonBefore,
|
|
1303
|
+
addonAfter,
|
|
1304
|
+
defaultValue,
|
|
1305
|
+
className,
|
|
1306
|
+
max,
|
|
1307
|
+
min,
|
|
1308
|
+
controls,
|
|
1309
|
+
size,
|
|
1310
|
+
changeOnWheel,
|
|
1311
|
+
formatter,
|
|
1312
|
+
parser
|
|
1313
|
+
}) {
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1315
|
+
import_antd4.ConfigProvider,
|
|
1316
|
+
{
|
|
1317
|
+
theme: {
|
|
1318
|
+
token: {
|
|
1319
|
+
fontFamily: "Kanit"
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "container-input", children: [
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "body-1", children: title }),
|
|
1325
|
+
" ",
|
|
1326
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1327
|
+
] }),
|
|
1328
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1329
|
+
import_antd4.InputNumber,
|
|
1330
|
+
{
|
|
1331
|
+
value: value ?? void 0,
|
|
1332
|
+
onChange: (val) => onChange(val),
|
|
1333
|
+
placeholder,
|
|
1334
|
+
disabled,
|
|
1335
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1336
|
+
addonBefore,
|
|
1337
|
+
addonAfter,
|
|
1338
|
+
defaultValue,
|
|
1339
|
+
max,
|
|
1340
|
+
min,
|
|
1341
|
+
controls,
|
|
1342
|
+
size,
|
|
1343
|
+
changeOnWheel,
|
|
1344
|
+
formatter,
|
|
1345
|
+
parser
|
|
1346
|
+
}
|
|
1347
|
+
),
|
|
1348
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1349
|
+
] })
|
|
1350
|
+
}
|
|
1351
|
+
);
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1336
1354
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1337
1355
|
var import_antd5 = require("antd");
|
|
1338
1356
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1339
1357
|
var import_th_TH = __toESM(require("antd/locale/th_TH"));
|
|
1340
1358
|
var import_th2 = __toESM(require_th());
|
|
1341
|
-
var
|
|
1359
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1342
1360
|
function DatePickerBasic({
|
|
1343
1361
|
value,
|
|
1344
1362
|
onChange,
|
|
@@ -1357,7 +1375,7 @@ function DatePickerBasic({
|
|
|
1357
1375
|
}) {
|
|
1358
1376
|
const dateFormat = "DD/MM/YYYY";
|
|
1359
1377
|
import_dayjs.default.locale("th_TH");
|
|
1360
|
-
return /* @__PURE__ */ (0,
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1361
1379
|
import_antd5.ConfigProvider,
|
|
1362
1380
|
{
|
|
1363
1381
|
locale: import_th_TH.default,
|
|
@@ -1367,13 +1385,13 @@ function DatePickerBasic({
|
|
|
1367
1385
|
fontSize: 16
|
|
1368
1386
|
}
|
|
1369
1387
|
},
|
|
1370
|
-
children: /* @__PURE__ */ (0,
|
|
1371
|
-
/* @__PURE__ */ (0,
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "container-input", children: [
|
|
1389
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "body-1", children: title }),
|
|
1373
1391
|
" ",
|
|
1374
|
-
required && /* @__PURE__ */ (0,
|
|
1392
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1375
1393
|
] }),
|
|
1376
|
-
/* @__PURE__ */ (0,
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1377
1395
|
import_antd5.DatePicker,
|
|
1378
1396
|
{
|
|
1379
1397
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1390,10 +1408,10 @@ function DatePickerBasic({
|
|
|
1390
1408
|
size
|
|
1391
1409
|
}
|
|
1392
1410
|
),
|
|
1393
|
-
/* @__PURE__ */ (0,
|
|
1394
|
-
/* @__PURE__ */ (0,
|
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1395
1413
|
" ",
|
|
1396
|
-
error && /* @__PURE__ */ (0,
|
|
1414
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1397
1415
|
] })
|
|
1398
1416
|
] })
|
|
1399
1417
|
}
|
|
@@ -1406,7 +1424,7 @@ var import_th_TH2 = __toESM(require("antd/locale/th_TH"));
|
|
|
1406
1424
|
var import_th3 = __toESM(require_th());
|
|
1407
1425
|
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1408
1426
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1409
|
-
var
|
|
1427
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1410
1428
|
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
1411
1429
|
function DatePickerRangePicker({
|
|
1412
1430
|
value,
|
|
@@ -1427,7 +1445,7 @@ function DatePickerRangePicker({
|
|
|
1427
1445
|
}) {
|
|
1428
1446
|
const dateFormat = "DD/MM/YYYY";
|
|
1429
1447
|
import_dayjs2.default.locale("th_TH");
|
|
1430
|
-
return /* @__PURE__ */ (0,
|
|
1448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1431
1449
|
import_antd6.ConfigProvider,
|
|
1432
1450
|
{
|
|
1433
1451
|
locale: import_th_TH2.default,
|
|
@@ -1437,13 +1455,13 @@ function DatePickerRangePicker({
|
|
|
1437
1455
|
fontSize: 16
|
|
1438
1456
|
}
|
|
1439
1457
|
},
|
|
1440
|
-
children: /* @__PURE__ */ (0,
|
|
1441
|
-
/* @__PURE__ */ (0,
|
|
1442
|
-
/* @__PURE__ */ (0,
|
|
1458
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "container-input", children: [
|
|
1459
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "body-1", children: title }),
|
|
1443
1461
|
" ",
|
|
1444
|
-
required && /* @__PURE__ */ (0,
|
|
1462
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1445
1463
|
] }),
|
|
1446
|
-
/* @__PURE__ */ (0,
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1447
1465
|
import_antd6.DatePicker.RangePicker,
|
|
1448
1466
|
{
|
|
1449
1467
|
format: dateFormat,
|
|
@@ -1461,10 +1479,10 @@ function DatePickerRangePicker({
|
|
|
1461
1479
|
onCalendarChange
|
|
1462
1480
|
}
|
|
1463
1481
|
),
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1466
1484
|
" ",
|
|
1467
|
-
error && /* @__PURE__ */ (0,
|
|
1485
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1468
1486
|
] })
|
|
1469
1487
|
] })
|
|
1470
1488
|
}
|
|
@@ -1473,7 +1491,7 @@ function DatePickerRangePicker({
|
|
|
1473
1491
|
|
|
1474
1492
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1475
1493
|
var import_antd7 = require("antd");
|
|
1476
|
-
var
|
|
1494
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1477
1495
|
function TimePickerBasic({
|
|
1478
1496
|
value,
|
|
1479
1497
|
onChange,
|
|
@@ -1485,7 +1503,7 @@ function TimePickerBasic({
|
|
|
1485
1503
|
disabled,
|
|
1486
1504
|
className
|
|
1487
1505
|
}) {
|
|
1488
|
-
return /* @__PURE__ */ (0,
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1489
1507
|
import_antd7.ConfigProvider,
|
|
1490
1508
|
{
|
|
1491
1509
|
theme: {
|
|
@@ -1493,13 +1511,13 @@ function TimePickerBasic({
|
|
|
1493
1511
|
fontFamily: "Kanit"
|
|
1494
1512
|
}
|
|
1495
1513
|
},
|
|
1496
|
-
children: /* @__PURE__ */ (0,
|
|
1497
|
-
/* @__PURE__ */ (0,
|
|
1498
|
-
/* @__PURE__ */ (0,
|
|
1514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "container-input", children: [
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: title }),
|
|
1499
1517
|
" ",
|
|
1500
|
-
required && /* @__PURE__ */ (0,
|
|
1518
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1501
1519
|
] }),
|
|
1502
|
-
/* @__PURE__ */ (0,
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1503
1521
|
import_antd7.TimePicker,
|
|
1504
1522
|
{
|
|
1505
1523
|
format: "HH:mm",
|
|
@@ -1511,10 +1529,10 @@ function TimePickerBasic({
|
|
|
1511
1529
|
disabled
|
|
1512
1530
|
}
|
|
1513
1531
|
),
|
|
1514
|
-
/* @__PURE__ */ (0,
|
|
1515
|
-
/* @__PURE__ */ (0,
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
1533
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1516
1534
|
" ",
|
|
1517
|
-
error && /* @__PURE__ */ (0,
|
|
1535
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1518
1536
|
] })
|
|
1519
1537
|
] })
|
|
1520
1538
|
}
|
|
@@ -1523,7 +1541,7 @@ function TimePickerBasic({
|
|
|
1523
1541
|
|
|
1524
1542
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1525
1543
|
var import_antd8 = require("antd");
|
|
1526
|
-
var
|
|
1544
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1527
1545
|
function TimePickerRangePicker({
|
|
1528
1546
|
value,
|
|
1529
1547
|
onChange,
|
|
@@ -1535,7 +1553,7 @@ function TimePickerRangePicker({
|
|
|
1535
1553
|
disabled,
|
|
1536
1554
|
className
|
|
1537
1555
|
}) {
|
|
1538
|
-
return /* @__PURE__ */ (0,
|
|
1556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1539
1557
|
import_antd8.ConfigProvider,
|
|
1540
1558
|
{
|
|
1541
1559
|
theme: {
|
|
@@ -1543,13 +1561,13 @@ function TimePickerRangePicker({
|
|
|
1543
1561
|
fontFamily: "Kanit"
|
|
1544
1562
|
}
|
|
1545
1563
|
},
|
|
1546
|
-
children: /* @__PURE__ */ (0,
|
|
1547
|
-
/* @__PURE__ */ (0,
|
|
1548
|
-
/* @__PURE__ */ (0,
|
|
1564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
|
|
1565
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: title }),
|
|
1549
1567
|
" ",
|
|
1550
|
-
required && /* @__PURE__ */ (0,
|
|
1568
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1551
1569
|
] }),
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1553
1571
|
import_antd8.TimePicker.RangePicker,
|
|
1554
1572
|
{
|
|
1555
1573
|
format: "HH:mm",
|
|
@@ -1561,18 +1579,82 @@ function TimePickerRangePicker({
|
|
|
1561
1579
|
disabled
|
|
1562
1580
|
}
|
|
1563
1581
|
),
|
|
1564
|
-
/* @__PURE__ */ (0,
|
|
1565
|
-
/* @__PURE__ */ (0,
|
|
1582
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
1583
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1566
1584
|
" ",
|
|
1567
|
-
error && /* @__PURE__ */ (0,
|
|
1585
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1568
1586
|
] })
|
|
1569
1587
|
] })
|
|
1570
1588
|
}
|
|
1571
1589
|
);
|
|
1572
1590
|
}
|
|
1573
1591
|
|
|
1574
|
-
// src/
|
|
1592
|
+
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1575
1593
|
var import_antd9 = require("antd");
|
|
1594
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1595
|
+
function ColorPickerBasic({
|
|
1596
|
+
value,
|
|
1597
|
+
onChange,
|
|
1598
|
+
required,
|
|
1599
|
+
title,
|
|
1600
|
+
bottomText,
|
|
1601
|
+
error,
|
|
1602
|
+
disabled,
|
|
1603
|
+
allowClear,
|
|
1604
|
+
defaultFormat,
|
|
1605
|
+
className,
|
|
1606
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1607
|
+
}) {
|
|
1608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1609
|
+
import_antd9.ConfigProvider,
|
|
1610
|
+
{
|
|
1611
|
+
theme: {
|
|
1612
|
+
token: {
|
|
1613
|
+
fontFamily: "Kanit",
|
|
1614
|
+
fontSize: 16
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
1619
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: title }),
|
|
1620
|
+
" ",
|
|
1621
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1622
|
+
] }),
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1624
|
+
import_antd9.ColorPicker,
|
|
1625
|
+
{
|
|
1626
|
+
defaultFormat,
|
|
1627
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1628
|
+
value,
|
|
1629
|
+
defaultValue: "#ffff",
|
|
1630
|
+
onChange,
|
|
1631
|
+
allowClear,
|
|
1632
|
+
showText: (color) => {
|
|
1633
|
+
const hex = color.toHexString();
|
|
1634
|
+
if (!value) {
|
|
1635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: placeholder });
|
|
1636
|
+
}
|
|
1637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { children: [
|
|
1638
|
+
"(",
|
|
1639
|
+
hex,
|
|
1640
|
+
")"
|
|
1641
|
+
] });
|
|
1642
|
+
},
|
|
1643
|
+
disabled
|
|
1644
|
+
}
|
|
1645
|
+
),
|
|
1646
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1648
|
+
" ",
|
|
1649
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1650
|
+
] })
|
|
1651
|
+
] })
|
|
1652
|
+
}
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1657
|
+
var import_antd10 = require("antd");
|
|
1576
1658
|
|
|
1577
1659
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1578
1660
|
function _typeof(o) {
|
|
@@ -2273,8 +2355,8 @@ magentaDark.primary = magentaDark[5];
|
|
|
2273
2355
|
var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
|
|
2274
2356
|
greyDark.primary = greyDark[5];
|
|
2275
2357
|
|
|
2276
|
-
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2277
|
-
var
|
|
2358
|
+
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2359
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2278
2360
|
function genPresets(presets = presetPalettes) {
|
|
2279
2361
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2280
2362
|
label,
|
|
@@ -2296,14 +2378,14 @@ function ColorPalettePickerBasic({
|
|
|
2296
2378
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35",
|
|
2297
2379
|
onClear
|
|
2298
2380
|
}) {
|
|
2299
|
-
const { token } =
|
|
2381
|
+
const { token } = import_antd10.theme.useToken();
|
|
2300
2382
|
const presets = genPresets({
|
|
2301
2383
|
primary: generate(token.colorPrimary),
|
|
2302
2384
|
red,
|
|
2303
2385
|
green
|
|
2304
2386
|
});
|
|
2305
|
-
return /* @__PURE__ */ (0,
|
|
2306
|
-
|
|
2387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2388
|
+
import_antd10.ConfigProvider,
|
|
2307
2389
|
{
|
|
2308
2390
|
theme: {
|
|
2309
2391
|
token: {
|
|
@@ -2311,14 +2393,14 @@ function ColorPalettePickerBasic({
|
|
|
2311
2393
|
fontSize: 16
|
|
2312
2394
|
}
|
|
2313
2395
|
},
|
|
2314
|
-
children: /* @__PURE__ */ (0,
|
|
2315
|
-
/* @__PURE__ */ (0,
|
|
2316
|
-
/* @__PURE__ */ (0,
|
|
2396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: title }),
|
|
2317
2399
|
" ",
|
|
2318
|
-
required && /* @__PURE__ */ (0,
|
|
2400
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2319
2401
|
] }),
|
|
2320
|
-
/* @__PURE__ */ (0,
|
|
2321
|
-
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2403
|
+
import_antd10.ColorPicker,
|
|
2322
2404
|
{
|
|
2323
2405
|
defaultFormat,
|
|
2324
2406
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -2330,9 +2412,9 @@ function ColorPalettePickerBasic({
|
|
|
2330
2412
|
showText: (color) => {
|
|
2331
2413
|
const hex = color.toHexString();
|
|
2332
2414
|
if (!value) {
|
|
2333
|
-
return /* @__PURE__ */ (0,
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: placeholder });
|
|
2334
2416
|
}
|
|
2335
|
-
return /* @__PURE__ */ (0,
|
|
2417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { children: [
|
|
2336
2418
|
"(",
|
|
2337
2419
|
hex,
|
|
2338
2420
|
")"
|
|
@@ -2342,10 +2424,10 @@ function ColorPalettePickerBasic({
|
|
|
2342
2424
|
onClear
|
|
2343
2425
|
}
|
|
2344
2426
|
),
|
|
2345
|
-
/* @__PURE__ */ (0,
|
|
2346
|
-
/* @__PURE__ */ (0,
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2347
2429
|
" ",
|
|
2348
|
-
error && /* @__PURE__ */ (0,
|
|
2430
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2349
2431
|
] })
|
|
2350
2432
|
] })
|
|
2351
2433
|
}
|
|
@@ -2353,8 +2435,8 @@ function ColorPalettePickerBasic({
|
|
|
2353
2435
|
}
|
|
2354
2436
|
|
|
2355
2437
|
// src/Select/SelectField/SelectField.tsx
|
|
2356
|
-
var
|
|
2357
|
-
var
|
|
2438
|
+
var import_antd11 = require("antd");
|
|
2439
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2358
2440
|
function SelectField({
|
|
2359
2441
|
value,
|
|
2360
2442
|
onChange,
|
|
@@ -2373,8 +2455,8 @@ function SelectField({
|
|
|
2373
2455
|
className,
|
|
2374
2456
|
onClear
|
|
2375
2457
|
}) {
|
|
2376
|
-
return /* @__PURE__ */ (0,
|
|
2377
|
-
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2459
|
+
import_antd11.ConfigProvider,
|
|
2378
2460
|
{
|
|
2379
2461
|
theme: {
|
|
2380
2462
|
token: {
|
|
@@ -2382,14 +2464,14 @@ function SelectField({
|
|
|
2382
2464
|
fontSize: 16
|
|
2383
2465
|
}
|
|
2384
2466
|
},
|
|
2385
|
-
children: /* @__PURE__ */ (0,
|
|
2386
|
-
/* @__PURE__ */ (0,
|
|
2387
|
-
/* @__PURE__ */ (0,
|
|
2467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: title }),
|
|
2388
2470
|
" ",
|
|
2389
|
-
required && /* @__PURE__ */ (0,
|
|
2471
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2390
2472
|
] }),
|
|
2391
|
-
/* @__PURE__ */ (0,
|
|
2392
|
-
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2474
|
+
import_antd11.Select,
|
|
2393
2475
|
{
|
|
2394
2476
|
showSearch: true,
|
|
2395
2477
|
value,
|
|
@@ -2403,7 +2485,7 @@ function SelectField({
|
|
|
2403
2485
|
options,
|
|
2404
2486
|
mode,
|
|
2405
2487
|
onSearch: handleSearch,
|
|
2406
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2488
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2407
2489
|
"span",
|
|
2408
2490
|
{
|
|
2409
2491
|
style: {
|
|
@@ -2420,10 +2502,10 @@ function SelectField({
|
|
|
2420
2502
|
onClear
|
|
2421
2503
|
}
|
|
2422
2504
|
),
|
|
2423
|
-
/* @__PURE__ */ (0,
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2425
2507
|
" ",
|
|
2426
|
-
error && /* @__PURE__ */ (0,
|
|
2508
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2427
2509
|
] })
|
|
2428
2510
|
] })
|
|
2429
2511
|
}
|
|
@@ -2431,8 +2513,8 @@ function SelectField({
|
|
|
2431
2513
|
}
|
|
2432
2514
|
|
|
2433
2515
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2434
|
-
var
|
|
2435
|
-
var
|
|
2516
|
+
var import_antd12 = require("antd");
|
|
2517
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2436
2518
|
function SelectFieldGroup({
|
|
2437
2519
|
value,
|
|
2438
2520
|
onChange,
|
|
@@ -2450,22 +2532,22 @@ function SelectFieldGroup({
|
|
|
2450
2532
|
handleSearch,
|
|
2451
2533
|
className
|
|
2452
2534
|
}) {
|
|
2453
|
-
return /* @__PURE__ */ (0,
|
|
2454
|
-
|
|
2535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2536
|
+
import_antd12.ConfigProvider,
|
|
2455
2537
|
{
|
|
2456
2538
|
theme: {
|
|
2457
2539
|
token: {
|
|
2458
2540
|
fontFamily: "Kanit"
|
|
2459
2541
|
}
|
|
2460
2542
|
},
|
|
2461
|
-
children: /* @__PURE__ */ (0,
|
|
2462
|
-
/* @__PURE__ */ (0,
|
|
2463
|
-
/* @__PURE__ */ (0,
|
|
2543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
|
|
2544
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2545
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: title }),
|
|
2464
2546
|
" ",
|
|
2465
|
-
required && /* @__PURE__ */ (0,
|
|
2547
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2466
2548
|
] }),
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2468
|
-
|
|
2549
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2550
|
+
import_antd12.Select,
|
|
2469
2551
|
{
|
|
2470
2552
|
showSearch: true,
|
|
2471
2553
|
value,
|
|
@@ -2479,7 +2561,7 @@ function SelectFieldGroup({
|
|
|
2479
2561
|
options,
|
|
2480
2562
|
mode,
|
|
2481
2563
|
onSearch: handleSearch,
|
|
2482
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2564
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2483
2565
|
"span",
|
|
2484
2566
|
{
|
|
2485
2567
|
style: {
|
|
@@ -2495,10 +2577,10 @@ function SelectFieldGroup({
|
|
|
2495
2577
|
allowClear: true
|
|
2496
2578
|
}
|
|
2497
2579
|
),
|
|
2498
|
-
/* @__PURE__ */ (0,
|
|
2499
|
-
/* @__PURE__ */ (0,
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2500
2582
|
" ",
|
|
2501
|
-
error && /* @__PURE__ */ (0,
|
|
2583
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2502
2584
|
] })
|
|
2503
2585
|
] })
|
|
2504
2586
|
}
|
|
@@ -2506,7 +2588,7 @@ function SelectFieldGroup({
|
|
|
2506
2588
|
}
|
|
2507
2589
|
|
|
2508
2590
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2509
|
-
var
|
|
2591
|
+
var import_antd13 = require("antd");
|
|
2510
2592
|
|
|
2511
2593
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
2512
2594
|
var status = [
|
|
@@ -2519,7 +2601,7 @@ var status = [
|
|
|
2519
2601
|
|
|
2520
2602
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2521
2603
|
var import_icons = require("@ant-design/icons");
|
|
2522
|
-
var
|
|
2604
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2523
2605
|
function SelectFieldStatus({
|
|
2524
2606
|
value,
|
|
2525
2607
|
onChange,
|
|
@@ -2533,8 +2615,8 @@ function SelectFieldStatus({
|
|
|
2533
2615
|
className
|
|
2534
2616
|
}) {
|
|
2535
2617
|
const selectedItem = status.find((s) => s.value === value);
|
|
2536
|
-
return /* @__PURE__ */ (0,
|
|
2537
|
-
|
|
2618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2619
|
+
import_antd13.ConfigProvider,
|
|
2538
2620
|
{
|
|
2539
2621
|
theme: {
|
|
2540
2622
|
components: {
|
|
@@ -2549,17 +2631,17 @@ function SelectFieldStatus({
|
|
|
2549
2631
|
fontFamily: "Kanit"
|
|
2550
2632
|
}
|
|
2551
2633
|
},
|
|
2552
|
-
children: /* @__PURE__ */ (0,
|
|
2553
|
-
/* @__PURE__ */ (0,
|
|
2554
|
-
/* @__PURE__ */ (0,
|
|
2634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: title }),
|
|
2555
2637
|
" ",
|
|
2556
|
-
required && /* @__PURE__ */ (0,
|
|
2638
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2557
2639
|
] }),
|
|
2558
|
-
/* @__PURE__ */ (0,
|
|
2559
|
-
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2641
|
+
import_antd13.Select,
|
|
2560
2642
|
{
|
|
2561
2643
|
disabled,
|
|
2562
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2644
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2563
2645
|
value,
|
|
2564
2646
|
onChange,
|
|
2565
2647
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2570,10 +2652,10 @@ function SelectFieldStatus({
|
|
|
2570
2652
|
showSearch: true
|
|
2571
2653
|
}
|
|
2572
2654
|
),
|
|
2573
|
-
/* @__PURE__ */ (0,
|
|
2574
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2656
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2575
2657
|
" ",
|
|
2576
|
-
error && /* @__PURE__ */ (0,
|
|
2658
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2577
2659
|
] })
|
|
2578
2660
|
] })
|
|
2579
2661
|
}
|
|
@@ -2581,7 +2663,7 @@ function SelectFieldStatus({
|
|
|
2581
2663
|
}
|
|
2582
2664
|
|
|
2583
2665
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2584
|
-
var
|
|
2666
|
+
var import_antd14 = require("antd");
|
|
2585
2667
|
|
|
2586
2668
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2587
2669
|
var status2 = [
|
|
@@ -2591,7 +2673,7 @@ var status2 = [
|
|
|
2591
2673
|
|
|
2592
2674
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2593
2675
|
var import_icons2 = require("@ant-design/icons");
|
|
2594
|
-
var
|
|
2676
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2595
2677
|
function SelectFieldStatusReport({
|
|
2596
2678
|
value,
|
|
2597
2679
|
onChange,
|
|
@@ -2605,8 +2687,8 @@ function SelectFieldStatusReport({
|
|
|
2605
2687
|
options
|
|
2606
2688
|
}) {
|
|
2607
2689
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2608
|
-
return /* @__PURE__ */ (0,
|
|
2609
|
-
|
|
2690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2691
|
+
import_antd14.ConfigProvider,
|
|
2610
2692
|
{
|
|
2611
2693
|
theme: {
|
|
2612
2694
|
components: {
|
|
@@ -2621,17 +2703,17 @@ function SelectFieldStatusReport({
|
|
|
2621
2703
|
fontFamily: "Kanit"
|
|
2622
2704
|
}
|
|
2623
2705
|
},
|
|
2624
|
-
children: /* @__PURE__ */ (0,
|
|
2625
|
-
/* @__PURE__ */ (0,
|
|
2626
|
-
/* @__PURE__ */ (0,
|
|
2706
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "container-input", children: [
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "body-1", children: title }),
|
|
2627
2709
|
" ",
|
|
2628
|
-
required && /* @__PURE__ */ (0,
|
|
2710
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2629
2711
|
] }),
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
2631
|
-
|
|
2712
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2713
|
+
import_antd14.Select,
|
|
2632
2714
|
{
|
|
2633
2715
|
disabled,
|
|
2634
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2716
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2635
2717
|
value,
|
|
2636
2718
|
onChange,
|
|
2637
2719
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2642,10 +2724,10 @@ function SelectFieldStatusReport({
|
|
|
2642
2724
|
showSearch: true
|
|
2643
2725
|
}
|
|
2644
2726
|
),
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2647
2729
|
" ",
|
|
2648
|
-
error && /* @__PURE__ */ (0,
|
|
2730
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2649
2731
|
] })
|
|
2650
2732
|
] })
|
|
2651
2733
|
}
|
|
@@ -2653,9 +2735,9 @@ function SelectFieldStatusReport({
|
|
|
2653
2735
|
}
|
|
2654
2736
|
|
|
2655
2737
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2656
|
-
var
|
|
2738
|
+
var import_antd15 = require("antd");
|
|
2657
2739
|
var import_react8 = require("react");
|
|
2658
|
-
var
|
|
2740
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2659
2741
|
function SelectFieldTag({
|
|
2660
2742
|
title,
|
|
2661
2743
|
required,
|
|
@@ -2689,22 +2771,22 @@ function SelectFieldTag({
|
|
|
2689
2771
|
}
|
|
2690
2772
|
onChange?.([]);
|
|
2691
2773
|
};
|
|
2692
|
-
return /* @__PURE__ */ (0,
|
|
2693
|
-
|
|
2774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2775
|
+
import_antd15.ConfigProvider,
|
|
2694
2776
|
{
|
|
2695
2777
|
theme: {
|
|
2696
2778
|
token: {
|
|
2697
2779
|
fontFamily: "Kanit"
|
|
2698
2780
|
}
|
|
2699
2781
|
},
|
|
2700
|
-
children: /* @__PURE__ */ (0,
|
|
2701
|
-
/* @__PURE__ */ (0,
|
|
2702
|
-
/* @__PURE__ */ (0,
|
|
2782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "container-input", children: [
|
|
2783
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2784
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "body-1", children: title }),
|
|
2703
2785
|
" ",
|
|
2704
|
-
required && /* @__PURE__ */ (0,
|
|
2786
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2705
2787
|
] }),
|
|
2706
|
-
/* @__PURE__ */ (0,
|
|
2707
|
-
|
|
2788
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2789
|
+
import_antd15.Select,
|
|
2708
2790
|
{
|
|
2709
2791
|
mode: "tags",
|
|
2710
2792
|
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2722,10 +2804,10 @@ function SelectFieldTag({
|
|
|
2722
2804
|
onClear
|
|
2723
2805
|
}
|
|
2724
2806
|
),
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
2807
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2727
2809
|
" ",
|
|
2728
|
-
error && /* @__PURE__ */ (0,
|
|
2810
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2729
2811
|
] })
|
|
2730
2812
|
] })
|
|
2731
2813
|
}
|
|
@@ -2734,9 +2816,9 @@ function SelectFieldTag({
|
|
|
2734
2816
|
|
|
2735
2817
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2736
2818
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
2737
|
-
var
|
|
2819
|
+
var import_antd16 = require("antd");
|
|
2738
2820
|
var import_react9 = require("react");
|
|
2739
|
-
var
|
|
2821
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2740
2822
|
function SelectCustom({
|
|
2741
2823
|
title = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2742
2824
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
@@ -2766,8 +2848,8 @@ function SelectCustom({
|
|
|
2766
2848
|
});
|
|
2767
2849
|
};
|
|
2768
2850
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2769
|
-
return /* @__PURE__ */ (0,
|
|
2770
|
-
|
|
2851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2852
|
+
import_antd16.ConfigProvider,
|
|
2771
2853
|
{
|
|
2772
2854
|
theme: {
|
|
2773
2855
|
token: {
|
|
@@ -2775,14 +2857,14 @@ function SelectCustom({
|
|
|
2775
2857
|
fontSize: 16
|
|
2776
2858
|
}
|
|
2777
2859
|
},
|
|
2778
|
-
children: /* @__PURE__ */ (0,
|
|
2779
|
-
/* @__PURE__ */ (0,
|
|
2780
|
-
/* @__PURE__ */ (0,
|
|
2860
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "container-input", children: [
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "body-1", children: title }),
|
|
2781
2863
|
" ",
|
|
2782
|
-
required && /* @__PURE__ */ (0,
|
|
2864
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2783
2865
|
] }),
|
|
2784
|
-
/* @__PURE__ */ (0,
|
|
2785
|
-
|
|
2866
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2867
|
+
import_antd16.Select,
|
|
2786
2868
|
{
|
|
2787
2869
|
value,
|
|
2788
2870
|
onChange: handleChange,
|
|
@@ -2792,20 +2874,20 @@ function SelectCustom({
|
|
|
2792
2874
|
onClear
|
|
2793
2875
|
}
|
|
2794
2876
|
),
|
|
2795
|
-
/* @__PURE__ */ (0,
|
|
2796
|
-
/* @__PURE__ */ (0,
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
2878
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2797
2879
|
" ",
|
|
2798
|
-
error && /* @__PURE__ */ (0,
|
|
2880
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2799
2881
|
] }),
|
|
2800
|
-
/* @__PURE__ */ (0,
|
|
2801
|
-
/* @__PURE__ */ (0,
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
2882
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
|
|
2883
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { children: [
|
|
2803
2885
|
index + 1,
|
|
2804
2886
|
"."
|
|
2805
2887
|
] }),
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { children: v })
|
|
2807
2889
|
] }),
|
|
2808
|
-
/* @__PURE__ */ (0,
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons_react8.IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
|
|
2809
2891
|
] }, index)) })
|
|
2810
2892
|
] })
|
|
2811
2893
|
}
|
|
@@ -2813,7 +2895,7 @@ function SelectCustom({
|
|
|
2813
2895
|
}
|
|
2814
2896
|
|
|
2815
2897
|
// src/SortFilter/SortFilter.tsx
|
|
2816
|
-
var
|
|
2898
|
+
var import_antd17 = require("antd");
|
|
2817
2899
|
var import_icons3 = require("@ant-design/icons");
|
|
2818
2900
|
|
|
2819
2901
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2846,7 +2928,7 @@ var quarters = [
|
|
|
2846
2928
|
// src/SortFilter/SortFilter.tsx
|
|
2847
2929
|
var import_react10 = require("react");
|
|
2848
2930
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
2849
|
-
var
|
|
2931
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2850
2932
|
function SortFilter({
|
|
2851
2933
|
showYear = true,
|
|
2852
2934
|
showQuarter = true,
|
|
@@ -2857,20 +2939,20 @@ function SortFilter({
|
|
|
2857
2939
|
const [yearValue, setYearValue] = (0, import_react10.useState)();
|
|
2858
2940
|
const [monthValue, setMonthValue] = (0, import_react10.useState)();
|
|
2859
2941
|
const [quarterValue, setQuartersValue] = (0, import_react10.useState)();
|
|
2860
|
-
return /* @__PURE__ */ (0,
|
|
2861
|
-
|
|
2942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2943
|
+
import_antd17.ConfigProvider,
|
|
2862
2944
|
{
|
|
2863
2945
|
theme: {
|
|
2864
2946
|
token: {
|
|
2865
2947
|
fontFamily: "Kanit"
|
|
2866
2948
|
}
|
|
2867
2949
|
},
|
|
2868
|
-
children: /* @__PURE__ */ (0,
|
|
2869
|
-
/* @__PURE__ */ (0,
|
|
2870
|
-
showYear && /* @__PURE__ */ (0,
|
|
2950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
|
|
2951
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
|
|
2952
|
+
showYear && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2871
2953
|
SelectField,
|
|
2872
2954
|
{
|
|
2873
|
-
prefix: /* @__PURE__ */ (0,
|
|
2955
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2874
2956
|
onChange: setYearValue,
|
|
2875
2957
|
options: years.map((s) => ({
|
|
2876
2958
|
value: s.value,
|
|
@@ -2880,10 +2962,10 @@ function SortFilter({
|
|
|
2880
2962
|
value: yearValue
|
|
2881
2963
|
}
|
|
2882
2964
|
) }),
|
|
2883
|
-
showMonth && /* @__PURE__ */ (0,
|
|
2965
|
+
showMonth && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2884
2966
|
SelectField,
|
|
2885
2967
|
{
|
|
2886
|
-
prefix: /* @__PURE__ */ (0,
|
|
2968
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2887
2969
|
onChange: setMonthValue,
|
|
2888
2970
|
options: months.map((s) => ({
|
|
2889
2971
|
value: s.value,
|
|
@@ -2893,10 +2975,10 @@ function SortFilter({
|
|
|
2893
2975
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2894
2976
|
}
|
|
2895
2977
|
) }),
|
|
2896
|
-
showQuarter && /* @__PURE__ */ (0,
|
|
2978
|
+
showQuarter && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2897
2979
|
SelectField,
|
|
2898
2980
|
{
|
|
2899
|
-
prefix: /* @__PURE__ */ (0,
|
|
2981
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2900
2982
|
onChange: setQuartersValue,
|
|
2901
2983
|
options: quarters.map((s) => ({
|
|
2902
2984
|
value: s.value,
|
|
@@ -2907,8 +2989,8 @@ function SortFilter({
|
|
|
2907
2989
|
}
|
|
2908
2990
|
) })
|
|
2909
2991
|
] }),
|
|
2910
|
-
/* @__PURE__ */ (0,
|
|
2911
|
-
/* @__PURE__ */ (0,
|
|
2992
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2912
2994
|
import_icons_react9.IconSortDescending,
|
|
2913
2995
|
{
|
|
2914
2996
|
size: 24,
|
|
@@ -2916,7 +2998,7 @@ function SortFilter({
|
|
|
2916
2998
|
onClick: onSortClick
|
|
2917
2999
|
}
|
|
2918
3000
|
),
|
|
2919
|
-
/* @__PURE__ */ (0,
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2920
3002
|
import_icons_react9.IconFilter,
|
|
2921
3003
|
{
|
|
2922
3004
|
size: 24,
|
|
@@ -2933,7 +3015,7 @@ function SortFilter({
|
|
|
2933
3015
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2934
3016
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
2935
3017
|
var import_react11 = require("react");
|
|
2936
|
-
var
|
|
3018
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2937
3019
|
function FileUploader({
|
|
2938
3020
|
onUpload,
|
|
2939
3021
|
onError,
|
|
@@ -3004,10 +3086,10 @@ function FileUploader({
|
|
|
3004
3086
|
}
|
|
3005
3087
|
if (inputRef.current) inputRef.current.value = "";
|
|
3006
3088
|
};
|
|
3007
|
-
return /* @__PURE__ */ (0,
|
|
3008
|
-
label && /* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3010
|
-
mode === "upload" ? /* @__PURE__ */ (0,
|
|
3089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "w-full", children: [
|
|
3090
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "body-1", children: label }),
|
|
3091
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
|
|
3092
|
+
mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3011
3093
|
"button",
|
|
3012
3094
|
{
|
|
3013
3095
|
type: "button",
|
|
@@ -3015,15 +3097,15 @@ function FileUploader({
|
|
|
3015
3097
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3016
3098
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3017
3099
|
disabled: disabled ? disabled : uploading,
|
|
3018
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3019
|
-
/* @__PURE__ */ (0,
|
|
3100
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3101
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Loader, { size: 15 }),
|
|
3020
3102
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3021
|
-
] }) : /* @__PURE__ */ (0,
|
|
3022
|
-
/* @__PURE__ */ (0,
|
|
3103
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3104
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_react10.IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3023
3105
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
3024
3106
|
] })
|
|
3025
3107
|
}
|
|
3026
|
-
) : /* @__PURE__ */ (0,
|
|
3108
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3027
3109
|
"div",
|
|
3028
3110
|
{
|
|
3029
3111
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3037,17 +3119,17 @@ function FileUploader({
|
|
|
3037
3119
|
},
|
|
3038
3120
|
onDragLeave: () => setDragActive(false),
|
|
3039
3121
|
onDrop: handleDrop,
|
|
3040
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
3122
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3123
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Loader, { size: 15 }),
|
|
3042
3124
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3043
|
-
] }) : /* @__PURE__ */ (0,
|
|
3044
|
-
/* @__PURE__ */ (0,
|
|
3045
|
-
/* @__PURE__ */ (0,
|
|
3046
|
-
/* @__PURE__ */ (0,
|
|
3125
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3126
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_react10.IconUpload, { size: 20 }),
|
|
3127
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "body-1", children: "\u0E04\u0E25\u0E34\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E1A\u0E23\u0E34\u0E40\u0E27\u0E13\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14" }),
|
|
3128
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-gray-400 body-3", children: "\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E32\u0E22\u0E44\u0E1F\u0E25\u0E4C" })
|
|
3047
3129
|
] })
|
|
3048
3130
|
}
|
|
3049
3131
|
),
|
|
3050
|
-
/* @__PURE__ */ (0,
|
|
3132
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3051
3133
|
"input",
|
|
3052
3134
|
{
|
|
3053
3135
|
type: "file",
|
|
@@ -3060,13 +3142,13 @@ function FileUploader({
|
|
|
3060
3142
|
}
|
|
3061
3143
|
)
|
|
3062
3144
|
] }),
|
|
3063
|
-
description && /* @__PURE__ */ (0,
|
|
3064
|
-
/* @__PURE__ */ (0,
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
/* @__PURE__ */ (0,
|
|
3145
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-gray-400 body-4", children: description }),
|
|
3146
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
3147
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
3148
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_react10.IconPaperclip, { size: 15 }) }),
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "truncate", children: file.name })
|
|
3068
3150
|
] }),
|
|
3069
|
-
/* @__PURE__ */ (0,
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3070
3152
|
import_icons_react10.IconTrash,
|
|
3071
3153
|
{
|
|
3072
3154
|
size: 20,
|
|
@@ -3100,9 +3182,9 @@ function messageLoading(content, duration) {
|
|
|
3100
3182
|
}
|
|
3101
3183
|
|
|
3102
3184
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3103
|
-
var import_antd17 = require("antd");
|
|
3104
3185
|
var import_antd18 = require("antd");
|
|
3105
|
-
var
|
|
3186
|
+
var import_antd19 = require("antd");
|
|
3187
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3106
3188
|
function Breadcrumbs({
|
|
3107
3189
|
items,
|
|
3108
3190
|
separator,
|
|
@@ -3110,16 +3192,16 @@ function Breadcrumbs({
|
|
|
3110
3192
|
classname,
|
|
3111
3193
|
params
|
|
3112
3194
|
}) {
|
|
3113
|
-
return /* @__PURE__ */ (0,
|
|
3114
|
-
|
|
3195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3196
|
+
import_antd18.ConfigProvider,
|
|
3115
3197
|
{
|
|
3116
3198
|
theme: {
|
|
3117
3199
|
token: {
|
|
3118
3200
|
fontFamily: "Kanit"
|
|
3119
3201
|
}
|
|
3120
3202
|
},
|
|
3121
|
-
children: /* @__PURE__ */ (0,
|
|
3122
|
-
|
|
3203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3204
|
+
import_antd19.Breadcrumb,
|
|
3123
3205
|
{
|
|
3124
3206
|
items,
|
|
3125
3207
|
separator,
|
|
@@ -3133,8 +3215,8 @@ function Breadcrumbs({
|
|
|
3133
3215
|
}
|
|
3134
3216
|
|
|
3135
3217
|
// src/HeadingPage/HeadingPage.tsx
|
|
3136
|
-
var
|
|
3137
|
-
var
|
|
3218
|
+
var import_antd20 = require("antd");
|
|
3219
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3138
3220
|
function HeadingPage({ Heading }) {
|
|
3139
3221
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3140
3222
|
weekday: "long",
|
|
@@ -3142,17 +3224,17 @@ function HeadingPage({ Heading }) {
|
|
|
3142
3224
|
month: "long",
|
|
3143
3225
|
year: "numeric"
|
|
3144
3226
|
});
|
|
3145
|
-
return /* @__PURE__ */ (0,
|
|
3146
|
-
|
|
3227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3228
|
+
import_antd20.ConfigProvider,
|
|
3147
3229
|
{
|
|
3148
3230
|
theme: {
|
|
3149
3231
|
token: {
|
|
3150
3232
|
fontFamily: "Kanit"
|
|
3151
3233
|
}
|
|
3152
3234
|
},
|
|
3153
|
-
children: /* @__PURE__ */ (0,
|
|
3154
|
-
/* @__PURE__ */ (0,
|
|
3155
|
-
/* @__PURE__ */ (0,
|
|
3235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3236
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "headline-5", children: Heading }),
|
|
3237
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("p", { className: "body-1", children: [
|
|
3156
3238
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3157
3239
|
today
|
|
3158
3240
|
] })
|
|
@@ -3162,9 +3244,9 @@ function HeadingPage({ Heading }) {
|
|
|
3162
3244
|
}
|
|
3163
3245
|
|
|
3164
3246
|
// src/Progress/ProgressBar.tsx
|
|
3165
|
-
var
|
|
3247
|
+
var import_antd21 = require("antd");
|
|
3166
3248
|
var import_react12 = require("react");
|
|
3167
|
-
var
|
|
3249
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3168
3250
|
function ProgressBar({
|
|
3169
3251
|
percent = 0,
|
|
3170
3252
|
size = "default",
|
|
@@ -3187,9 +3269,7 @@ function ProgressBar({
|
|
|
3187
3269
|
strokeColor = percent >= minCheckpoint ? "var(--color-green-500)" : "var(--color-red-500)";
|
|
3188
3270
|
}
|
|
3189
3271
|
(0, import_react12.useEffect)(() => {
|
|
3190
|
-
const inner = progressRef.current?.querySelector(
|
|
3191
|
-
".ant-progress-inner"
|
|
3192
|
-
);
|
|
3272
|
+
const inner = progressRef.current?.querySelector(".ant-progress-inner");
|
|
3193
3273
|
if (!inner) return;
|
|
3194
3274
|
const observer = new ResizeObserver(() => {
|
|
3195
3275
|
setBarWidth(inner.offsetWidth);
|
|
@@ -3197,17 +3277,17 @@ function ProgressBar({
|
|
|
3197
3277
|
observer.observe(inner);
|
|
3198
3278
|
return () => observer.disconnect();
|
|
3199
3279
|
}, []);
|
|
3200
|
-
return /* @__PURE__ */ (0,
|
|
3201
|
-
|
|
3280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3281
|
+
import_antd21.ConfigProvider,
|
|
3202
3282
|
{
|
|
3203
3283
|
theme: {
|
|
3204
3284
|
token: {
|
|
3205
3285
|
fontFamily: "Kanit"
|
|
3206
3286
|
}
|
|
3207
3287
|
},
|
|
3208
|
-
children: /* @__PURE__ */ (0,
|
|
3209
|
-
/* @__PURE__ */ (0,
|
|
3210
|
-
|
|
3288
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3289
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3290
|
+
import_antd21.Progress,
|
|
3211
3291
|
{
|
|
3212
3292
|
className: "w-full",
|
|
3213
3293
|
percent,
|
|
@@ -3222,7 +3302,7 @@ function ProgressBar({
|
|
|
3222
3302
|
strokeColor
|
|
3223
3303
|
}
|
|
3224
3304
|
),
|
|
3225
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0,
|
|
3305
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3226
3306
|
"div",
|
|
3227
3307
|
{
|
|
3228
3308
|
className: "checkpoint absolute top-0",
|
|
@@ -3244,7 +3324,7 @@ function ProgressBar({
|
|
|
3244
3324
|
}
|
|
3245
3325
|
|
|
3246
3326
|
// src/KpiSection/KpiSection.tsx
|
|
3247
|
-
var
|
|
3327
|
+
var import_antd22 = require("antd");
|
|
3248
3328
|
var import_react14 = require("react");
|
|
3249
3329
|
|
|
3250
3330
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3395,7 +3475,7 @@ function useGetKpiSection() {
|
|
|
3395
3475
|
|
|
3396
3476
|
// src/KpiSection/KpiSection.tsx
|
|
3397
3477
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
3398
|
-
var
|
|
3478
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3399
3479
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3400
3480
|
const {
|
|
3401
3481
|
handleAddKpi,
|
|
@@ -3415,7 +3495,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3415
3495
|
itemErrors,
|
|
3416
3496
|
setItemErrors
|
|
3417
3497
|
} = useGetKpiSection();
|
|
3418
|
-
const [messageApi2, messageContainer] =
|
|
3498
|
+
const [messageApi2, messageContainer] = import_antd22.message.useMessage();
|
|
3419
3499
|
const [hasShownError, setHasShownError] = (0, import_react14.useState)(false);
|
|
3420
3500
|
(0, import_react14.useEffect)(() => {
|
|
3421
3501
|
setMessageApi(messageApi2);
|
|
@@ -3425,8 +3505,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3425
3505
|
onChangeKpiList(kpiList);
|
|
3426
3506
|
}
|
|
3427
3507
|
}, [kpiList]);
|
|
3428
|
-
return /* @__PURE__ */ (0,
|
|
3429
|
-
|
|
3508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3509
|
+
import_antd22.ConfigProvider,
|
|
3430
3510
|
{
|
|
3431
3511
|
theme: {
|
|
3432
3512
|
token: {
|
|
@@ -3434,11 +3514,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3434
3514
|
fontSize: 16
|
|
3435
3515
|
}
|
|
3436
3516
|
},
|
|
3437
|
-
children: /* @__PURE__ */ (0,
|
|
3517
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "container-input", children: [
|
|
3438
3518
|
messageContainer,
|
|
3439
|
-
type === "number" && /* @__PURE__ */ (0,
|
|
3440
|
-
/* @__PURE__ */ (0,
|
|
3441
|
-
/* @__PURE__ */ (0,
|
|
3519
|
+
type === "number" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-4", children: [
|
|
3520
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3521
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3442
3522
|
InputField,
|
|
3443
3523
|
{
|
|
3444
3524
|
value: nameKpi,
|
|
@@ -3450,7 +3530,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3450
3530
|
error: errors.nameKpi
|
|
3451
3531
|
}
|
|
3452
3532
|
),
|
|
3453
|
-
/* @__PURE__ */ (0,
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3454
3534
|
InputField,
|
|
3455
3535
|
{
|
|
3456
3536
|
value: kpiValue,
|
|
@@ -3474,7 +3554,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3474
3554
|
error: errors.kpiValue
|
|
3475
3555
|
}
|
|
3476
3556
|
),
|
|
3477
|
-
/* @__PURE__ */ (0,
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3478
3558
|
InputField,
|
|
3479
3559
|
{
|
|
3480
3560
|
value: unitValue,
|
|
@@ -3486,7 +3566,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3486
3566
|
error: errors.unitValue
|
|
3487
3567
|
}
|
|
3488
3568
|
),
|
|
3489
|
-
/* @__PURE__ */ (0,
|
|
3569
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3490
3570
|
import_icons_react11.IconCirclePlus,
|
|
3491
3571
|
{
|
|
3492
3572
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3495,17 +3575,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3495
3575
|
}
|
|
3496
3576
|
) })
|
|
3497
3577
|
] }),
|
|
3498
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3499
3579
|
"div",
|
|
3500
3580
|
{
|
|
3501
3581
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3502
3582
|
children: [
|
|
3503
|
-
/* @__PURE__ */ (0,
|
|
3583
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3504
3584
|
index + 1,
|
|
3505
3585
|
"."
|
|
3506
3586
|
] }),
|
|
3507
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3508
|
-
/* @__PURE__ */ (0,
|
|
3587
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3588
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3509
3589
|
InputField,
|
|
3510
3590
|
{
|
|
3511
3591
|
value: kpi.name,
|
|
@@ -3515,7 +3595,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3515
3595
|
error: itemErrors[kpi.id]?.name
|
|
3516
3596
|
}
|
|
3517
3597
|
),
|
|
3518
|
-
/* @__PURE__ */ (0,
|
|
3598
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3519
3599
|
InputField,
|
|
3520
3600
|
{
|
|
3521
3601
|
value: kpi.value?.toString(),
|
|
@@ -3540,7 +3620,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3540
3620
|
error: itemErrors[kpi.id]?.value
|
|
3541
3621
|
}
|
|
3542
3622
|
),
|
|
3543
|
-
/* @__PURE__ */ (0,
|
|
3623
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3544
3624
|
InputField,
|
|
3545
3625
|
{
|
|
3546
3626
|
value: kpi.unit,
|
|
@@ -3550,29 +3630,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3550
3630
|
error: itemErrors[kpi.id]?.unit
|
|
3551
3631
|
}
|
|
3552
3632
|
),
|
|
3553
|
-
/* @__PURE__ */ (0,
|
|
3633
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3554
3634
|
"div",
|
|
3555
3635
|
{
|
|
3556
3636
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3557
3637
|
children: [
|
|
3558
|
-
/* @__PURE__ */ (0,
|
|
3638
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3559
3639
|
import_icons_react11.IconCheck,
|
|
3560
3640
|
{
|
|
3561
3641
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3562
3642
|
onClick: () => handleSave(kpi.id, type)
|
|
3563
3643
|
}
|
|
3564
3644
|
),
|
|
3565
|
-
/* @__PURE__ */ (0,
|
|
3645
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3566
3646
|
]
|
|
3567
3647
|
}
|
|
3568
3648
|
)
|
|
3569
|
-
] }) : /* @__PURE__ */ (0,
|
|
3570
|
-
/* @__PURE__ */ (0,
|
|
3571
|
-
/* @__PURE__ */ (0,
|
|
3572
|
-
/* @__PURE__ */ (0,
|
|
3573
|
-
/* @__PURE__ */ (0,
|
|
3574
|
-
/* @__PURE__ */ (0,
|
|
3575
|
-
/* @__PURE__ */ (0,
|
|
3649
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3651
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.value }),
|
|
3652
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.unit }),
|
|
3653
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3654
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3655
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3576
3656
|
] })
|
|
3577
3657
|
] })
|
|
3578
3658
|
]
|
|
@@ -3580,9 +3660,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3580
3660
|
kpi.id
|
|
3581
3661
|
)) })
|
|
3582
3662
|
] }),
|
|
3583
|
-
type === "text" && /* @__PURE__ */ (0,
|
|
3584
|
-
/* @__PURE__ */ (0,
|
|
3585
|
-
/* @__PURE__ */ (0,
|
|
3663
|
+
type === "text" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-4", children: [
|
|
3664
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3665
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3586
3666
|
InputField,
|
|
3587
3667
|
{
|
|
3588
3668
|
value: nameKpi,
|
|
@@ -3594,7 +3674,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3594
3674
|
error: errors.nameKpi
|
|
3595
3675
|
}
|
|
3596
3676
|
),
|
|
3597
|
-
/* @__PURE__ */ (0,
|
|
3677
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3598
3678
|
import_icons_react11.IconCirclePlus,
|
|
3599
3679
|
{
|
|
3600
3680
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3603,13 +3683,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3603
3683
|
}
|
|
3604
3684
|
) })
|
|
3605
3685
|
] }),
|
|
3606
|
-
/* @__PURE__ */ (0,
|
|
3607
|
-
/* @__PURE__ */ (0,
|
|
3686
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3687
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3608
3688
|
index + 1,
|
|
3609
3689
|
"."
|
|
3610
3690
|
] }),
|
|
3611
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3612
|
-
/* @__PURE__ */ (0,
|
|
3691
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3613
3693
|
InputField,
|
|
3614
3694
|
{
|
|
3615
3695
|
value: kpi.name,
|
|
@@ -3619,27 +3699,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3619
3699
|
error: itemErrors[kpi.id]?.name
|
|
3620
3700
|
}
|
|
3621
3701
|
),
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3623
3703
|
"div",
|
|
3624
3704
|
{
|
|
3625
3705
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3626
3706
|
children: [
|
|
3627
|
-
/* @__PURE__ */ (0,
|
|
3707
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3628
3708
|
import_icons_react11.IconCheck,
|
|
3629
3709
|
{
|
|
3630
3710
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3631
3711
|
onClick: () => handleSave(kpi.id, type)
|
|
3632
3712
|
}
|
|
3633
3713
|
),
|
|
3634
|
-
/* @__PURE__ */ (0,
|
|
3714
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3635
3715
|
]
|
|
3636
3716
|
}
|
|
3637
3717
|
)
|
|
3638
|
-
] }) : /* @__PURE__ */ (0,
|
|
3639
|
-
/* @__PURE__ */ (0,
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
3641
|
-
/* @__PURE__ */ (0,
|
|
3642
|
-
/* @__PURE__ */ (0,
|
|
3718
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3719
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3720
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3721
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3722
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3643
3723
|
] })
|
|
3644
3724
|
] })
|
|
3645
3725
|
] }, kpi.id)) })
|
|
@@ -3648,8 +3728,16 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3648
3728
|
}
|
|
3649
3729
|
);
|
|
3650
3730
|
}
|
|
3731
|
+
|
|
3732
|
+
// src/Modal/Modal/Modal.tsx
|
|
3733
|
+
var import_antd23 = require("antd");
|
|
3734
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3735
|
+
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd23.Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children }) }) });
|
|
3737
|
+
}
|
|
3651
3738
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3652
3739
|
0 && (module.exports = {
|
|
3740
|
+
AntDModal,
|
|
3653
3741
|
AntDataTable,
|
|
3654
3742
|
Breadcrumbs,
|
|
3655
3743
|
Calendar,
|
|
@@ -3664,6 +3752,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3664
3752
|
GhostButton,
|
|
3665
3753
|
HeadingPage,
|
|
3666
3754
|
InputField,
|
|
3755
|
+
InputFieldNumber,
|
|
3667
3756
|
KpiSection,
|
|
3668
3757
|
Loader,
|
|
3669
3758
|
MenuNavBar,
|
|
@@ -3681,6 +3770,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3681
3770
|
Sidebar,
|
|
3682
3771
|
SortFilter,
|
|
3683
3772
|
Switch,
|
|
3773
|
+
TabSelectionButton,
|
|
3684
3774
|
TextAreaInput,
|
|
3685
3775
|
TextInput,
|
|
3686
3776
|
TimePickerBasic,
|