@esic-lab/data-core-ui 0.0.28 → 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.css +17 -0
- package/dist/index.d.mts +73 -28
- package/dist/index.d.ts +73 -28
- package/dist/index.js +531 -440
- package/dist/index.mjs +518 -430
- 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,
|
|
@@ -915,7 +934,8 @@ function AntDataTable({
|
|
|
915
934
|
rowCheckbox,
|
|
916
935
|
onRowSelect,
|
|
917
936
|
width,
|
|
918
|
-
height
|
|
937
|
+
height,
|
|
938
|
+
pagination
|
|
919
939
|
}) {
|
|
920
940
|
const [selectedRowKeys, setSelectedRowKeys] = (0, import_react4.useState)([]);
|
|
921
941
|
const rowSelection = {
|
|
@@ -925,7 +945,7 @@ function AntDataTable({
|
|
|
925
945
|
onRowSelect && onRowSelect(newSelectedRowKeys);
|
|
926
946
|
}
|
|
927
947
|
};
|
|
928
|
-
return /* @__PURE__ */ (0,
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
929
949
|
import_antd.ConfigProvider,
|
|
930
950
|
{
|
|
931
951
|
theme: {
|
|
@@ -935,13 +955,13 @@ function AntDataTable({
|
|
|
935
955
|
fontSize: 14
|
|
936
956
|
}
|
|
937
957
|
},
|
|
938
|
-
children: /* @__PURE__ */ (0,
|
|
958
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
939
959
|
import_antd.Table,
|
|
940
960
|
{
|
|
941
961
|
dataSource,
|
|
942
962
|
columns,
|
|
943
963
|
rowSelection: rowCheckbox ? rowSelection : void 0,
|
|
944
|
-
pagination: { position: ["bottomCenter"], pageSize },
|
|
964
|
+
pagination: pagination ? { position: ["bottomCenter"], pageSize } : false,
|
|
945
965
|
style: { width },
|
|
946
966
|
scroll: { y: height }
|
|
947
967
|
}
|
|
@@ -958,7 +978,7 @@ var import_timegrid = __toESM(require("@fullcalendar/timegrid"));
|
|
|
958
978
|
var import_interaction = __toESM(require("@fullcalendar/interaction"));
|
|
959
979
|
var import_th = __toESM(require("@fullcalendar/core/locales/th"));
|
|
960
980
|
var import_icons_react6 = require("@tabler/icons-react");
|
|
961
|
-
var
|
|
981
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
962
982
|
function Calendar({ events }) {
|
|
963
983
|
const calendarRef = (0, import_react5.useRef)(null);
|
|
964
984
|
const [monthTitle, setMonthTitle] = (0, import_react5.useState)("");
|
|
@@ -977,11 +997,11 @@ function Calendar({ events }) {
|
|
|
977
997
|
(0, import_react5.useEffect)(() => {
|
|
978
998
|
updateTitle();
|
|
979
999
|
}, []);
|
|
980
|
-
return /* @__PURE__ */ (0,
|
|
981
|
-
/* @__PURE__ */ (0,
|
|
982
|
-
/* @__PURE__ */ (0,
|
|
983
|
-
/* @__PURE__ */ (0,
|
|
984
|
-
/* @__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)(
|
|
985
1005
|
"p",
|
|
986
1006
|
{
|
|
987
1007
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -992,7 +1012,7 @@ function Calendar({ events }) {
|
|
|
992
1012
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
993
1013
|
}
|
|
994
1014
|
),
|
|
995
|
-
/* @__PURE__ */ (0,
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
996
1016
|
"p",
|
|
997
1017
|
{
|
|
998
1018
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1003,7 +1023,7 @@ function Calendar({ events }) {
|
|
|
1003
1023
|
children: "Month"
|
|
1004
1024
|
}
|
|
1005
1025
|
),
|
|
1006
|
-
/* @__PURE__ */ (0,
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1007
1027
|
"p",
|
|
1008
1028
|
{
|
|
1009
1029
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1014,7 +1034,7 @@ function Calendar({ events }) {
|
|
|
1014
1034
|
children: "Week"
|
|
1015
1035
|
}
|
|
1016
1036
|
),
|
|
1017
|
-
/* @__PURE__ */ (0,
|
|
1037
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1018
1038
|
"p",
|
|
1019
1039
|
{
|
|
1020
1040
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1025,7 +1045,7 @@ function Calendar({ events }) {
|
|
|
1025
1045
|
children: "Day"
|
|
1026
1046
|
}
|
|
1027
1047
|
),
|
|
1028
|
-
/* @__PURE__ */ (0,
|
|
1048
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1029
1049
|
"button",
|
|
1030
1050
|
{
|
|
1031
1051
|
className: "cursor-pointer",
|
|
@@ -1033,10 +1053,10 @@ function Calendar({ events }) {
|
|
|
1033
1053
|
calendarRef.current?.getApi().prev();
|
|
1034
1054
|
updateTitle();
|
|
1035
1055
|
},
|
|
1036
|
-
children: /* @__PURE__ */ (0,
|
|
1056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react6.IconChevronLeft, {})
|
|
1037
1057
|
}
|
|
1038
1058
|
),
|
|
1039
|
-
/* @__PURE__ */ (0,
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1040
1060
|
"button",
|
|
1041
1061
|
{
|
|
1042
1062
|
className: "cursor-pointer",
|
|
@@ -1044,12 +1064,12 @@ function Calendar({ events }) {
|
|
|
1044
1064
|
calendarRef.current?.getApi().next();
|
|
1045
1065
|
updateTitle();
|
|
1046
1066
|
},
|
|
1047
|
-
children: /* @__PURE__ */ (0,
|
|
1067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react6.IconChevronRight, {})
|
|
1048
1068
|
}
|
|
1049
1069
|
)
|
|
1050
1070
|
] })
|
|
1051
1071
|
] }),
|
|
1052
|
-
/* @__PURE__ */ (0,
|
|
1072
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1053
1073
|
import_react6.default,
|
|
1054
1074
|
{
|
|
1055
1075
|
ref: calendarRef,
|
|
@@ -1078,28 +1098,28 @@ function Calendar({ events }) {
|
|
|
1078
1098
|
});
|
|
1079
1099
|
},
|
|
1080
1100
|
eventContent: (arg) => {
|
|
1081
|
-
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 }) });
|
|
1082
1102
|
},
|
|
1083
1103
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
1084
1104
|
}
|
|
1085
1105
|
) }),
|
|
1086
|
-
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) }) })
|
|
1087
1107
|
] });
|
|
1088
1108
|
}
|
|
1089
1109
|
function EventPopUp({ event, onClose }) {
|
|
1090
|
-
return /* @__PURE__ */ (0,
|
|
1091
|
-
/* @__PURE__ */ (0,
|
|
1092
|
-
/* @__PURE__ */ (0,
|
|
1093
|
-
/* @__PURE__ */ (0,
|
|
1094
|
-
/* @__PURE__ */ (0,
|
|
1095
|
-
/* @__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: " }),
|
|
1096
1116
|
event?.start?.toLocaleString?.() || String(event?.start)
|
|
1097
1117
|
] }),
|
|
1098
|
-
/* @__PURE__ */ (0,
|
|
1099
|
-
/* @__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: " }),
|
|
1100
1120
|
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1101
1121
|
] }),
|
|
1102
|
-
/* @__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" })
|
|
1103
1123
|
] })
|
|
1104
1124
|
] });
|
|
1105
1125
|
}
|
|
@@ -1107,7 +1127,7 @@ function EventPopUp({ event, onClose }) {
|
|
|
1107
1127
|
// src/Input/TextInput/TextInput.tsx
|
|
1108
1128
|
var import_icons_react7 = require("@tabler/icons-react");
|
|
1109
1129
|
var import_react7 = require("react");
|
|
1110
|
-
var
|
|
1130
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1111
1131
|
function TextInput({
|
|
1112
1132
|
label,
|
|
1113
1133
|
placeholder,
|
|
@@ -1124,18 +1144,18 @@ function TextInput({
|
|
|
1124
1144
|
setShowPassword(!showPassword);
|
|
1125
1145
|
};
|
|
1126
1146
|
const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
|
|
1127
|
-
return /* @__PURE__ */ (0,
|
|
1128
|
-
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: [
|
|
1129
1149
|
label,
|
|
1130
|
-
required && /* @__PURE__ */ (0,
|
|
1150
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-red-600", children: "\xA0*" })
|
|
1131
1151
|
] }),
|
|
1132
|
-
/* @__PURE__ */ (0,
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1133
1153
|
"div",
|
|
1134
1154
|
{
|
|
1135
1155
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1136
1156
|
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-600" : ""}`,
|
|
1137
1157
|
children: [
|
|
1138
|
-
/* @__PURE__ */ (0,
|
|
1158
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1139
1159
|
"input",
|
|
1140
1160
|
{
|
|
1141
1161
|
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -1148,75 +1168,18 @@ function TextInput({
|
|
|
1148
1168
|
disabled
|
|
1149
1169
|
}
|
|
1150
1170
|
),
|
|
1151
|
-
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 }))
|
|
1152
1172
|
]
|
|
1153
1173
|
}
|
|
1154
1174
|
),
|
|
1155
|
-
error && /* @__PURE__ */ (0,
|
|
1175
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-red-600 body-1", children: error })
|
|
1156
1176
|
] });
|
|
1157
1177
|
}
|
|
1158
1178
|
|
|
1159
|
-
// src/InputField/InputField.tsx
|
|
1160
|
-
var import_antd2 = require("antd");
|
|
1161
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1162
|
-
function InputField({
|
|
1163
|
-
value,
|
|
1164
|
-
onChange,
|
|
1165
|
-
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1166
|
-
title,
|
|
1167
|
-
required,
|
|
1168
|
-
bottomText,
|
|
1169
|
-
disabled,
|
|
1170
|
-
error,
|
|
1171
|
-
addonBefore,
|
|
1172
|
-
addonAfter,
|
|
1173
|
-
defaultValue,
|
|
1174
|
-
className,
|
|
1175
|
-
onClear
|
|
1176
|
-
}) {
|
|
1177
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1178
|
-
import_antd2.ConfigProvider,
|
|
1179
|
-
{
|
|
1180
|
-
theme: {
|
|
1181
|
-
token: {
|
|
1182
|
-
fontFamily: "Kanit"
|
|
1183
|
-
}
|
|
1184
|
-
},
|
|
1185
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "container-input", children: [
|
|
1186
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1187
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "body-1", children: title }),
|
|
1188
|
-
" ",
|
|
1189
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1190
|
-
] }),
|
|
1191
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1192
|
-
import_antd2.Input,
|
|
1193
|
-
{
|
|
1194
|
-
value,
|
|
1195
|
-
placeholder,
|
|
1196
|
-
disabled,
|
|
1197
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1198
|
-
onChange: (e) => onChange(e.target.value || void 0),
|
|
1199
|
-
allowClear: true,
|
|
1200
|
-
addonBefore,
|
|
1201
|
-
addonAfter,
|
|
1202
|
-
defaultValue,
|
|
1203
|
-
onClear
|
|
1204
|
-
}
|
|
1205
|
-
),
|
|
1206
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1207
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1208
|
-
" ",
|
|
1209
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1210
|
-
] })
|
|
1211
|
-
] })
|
|
1212
|
-
}
|
|
1213
|
-
);
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
1179
|
// src/Input/TextArea/TextArea.tsx
|
|
1217
|
-
var
|
|
1180
|
+
var import_antd2 = require("antd");
|
|
1218
1181
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1219
|
-
var { TextArea } =
|
|
1182
|
+
var { TextArea } = import_antd2.Input;
|
|
1220
1183
|
function TextAreaInput({
|
|
1221
1184
|
label,
|
|
1222
1185
|
height = 4,
|
|
@@ -1231,7 +1194,7 @@ function TextAreaInput({
|
|
|
1231
1194
|
disabled
|
|
1232
1195
|
}) {
|
|
1233
1196
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1234
|
-
|
|
1197
|
+
import_antd2.ConfigProvider,
|
|
1235
1198
|
{
|
|
1236
1199
|
theme: {
|
|
1237
1200
|
components: {},
|
|
@@ -1268,29 +1231,30 @@ function TextAreaInput({
|
|
|
1268
1231
|
) });
|
|
1269
1232
|
}
|
|
1270
1233
|
|
|
1271
|
-
// src/
|
|
1272
|
-
var
|
|
1234
|
+
// src/Input/InputField/InputField.tsx
|
|
1235
|
+
var import_antd3 = require("antd");
|
|
1273
1236
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1274
|
-
function
|
|
1237
|
+
function InputField({
|
|
1275
1238
|
value,
|
|
1276
1239
|
onChange,
|
|
1277
|
-
|
|
1240
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1278
1241
|
title,
|
|
1242
|
+
required,
|
|
1279
1243
|
bottomText,
|
|
1280
|
-
error,
|
|
1281
1244
|
disabled,
|
|
1282
|
-
|
|
1283
|
-
|
|
1245
|
+
error,
|
|
1246
|
+
addonBefore,
|
|
1247
|
+
addonAfter,
|
|
1248
|
+
defaultValue,
|
|
1284
1249
|
className,
|
|
1285
|
-
|
|
1250
|
+
onClear
|
|
1286
1251
|
}) {
|
|
1287
1252
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1288
|
-
|
|
1253
|
+
import_antd3.ConfigProvider,
|
|
1289
1254
|
{
|
|
1290
1255
|
theme: {
|
|
1291
1256
|
token: {
|
|
1292
|
-
fontFamily: "Kanit"
|
|
1293
|
-
fontSize: 16
|
|
1257
|
+
fontFamily: "Kanit"
|
|
1294
1258
|
}
|
|
1295
1259
|
},
|
|
1296
1260
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "container-input", children: [
|
|
@@ -1300,26 +1264,18 @@ function ColorPickerBasic({
|
|
|
1300
1264
|
required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1301
1265
|
] }),
|
|
1302
1266
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1303
|
-
|
|
1267
|
+
import_antd3.Input,
|
|
1304
1268
|
{
|
|
1305
|
-
defaultFormat,
|
|
1306
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1307
1269
|
value,
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
"(",
|
|
1318
|
-
hex,
|
|
1319
|
-
")"
|
|
1320
|
-
] });
|
|
1321
|
-
},
|
|
1322
|
-
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
|
|
1323
1279
|
}
|
|
1324
1280
|
),
|
|
1325
1281
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
@@ -1332,12 +1288,75 @@ function ColorPickerBasic({
|
|
|
1332
1288
|
);
|
|
1333
1289
|
}
|
|
1334
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
|
+
|
|
1335
1354
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1336
1355
|
var import_antd5 = require("antd");
|
|
1337
1356
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1338
1357
|
var import_th_TH = __toESM(require("antd/locale/th_TH"));
|
|
1339
1358
|
var import_th2 = __toESM(require_th());
|
|
1340
|
-
var
|
|
1359
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1341
1360
|
function DatePickerBasic({
|
|
1342
1361
|
value,
|
|
1343
1362
|
onChange,
|
|
@@ -1356,7 +1375,7 @@ function DatePickerBasic({
|
|
|
1356
1375
|
}) {
|
|
1357
1376
|
const dateFormat = "DD/MM/YYYY";
|
|
1358
1377
|
import_dayjs.default.locale("th_TH");
|
|
1359
|
-
return /* @__PURE__ */ (0,
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1360
1379
|
import_antd5.ConfigProvider,
|
|
1361
1380
|
{
|
|
1362
1381
|
locale: import_th_TH.default,
|
|
@@ -1366,13 +1385,13 @@ function DatePickerBasic({
|
|
|
1366
1385
|
fontSize: 16
|
|
1367
1386
|
}
|
|
1368
1387
|
},
|
|
1369
|
-
children: /* @__PURE__ */ (0,
|
|
1370
|
-
/* @__PURE__ */ (0,
|
|
1371
|
-
/* @__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 }),
|
|
1372
1391
|
" ",
|
|
1373
|
-
required && /* @__PURE__ */ (0,
|
|
1392
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1374
1393
|
] }),
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1376
1395
|
import_antd5.DatePicker,
|
|
1377
1396
|
{
|
|
1378
1397
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1389,10 +1408,10 @@ function DatePickerBasic({
|
|
|
1389
1408
|
size
|
|
1390
1409
|
}
|
|
1391
1410
|
),
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1393
|
-
/* @__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 }),
|
|
1394
1413
|
" ",
|
|
1395
|
-
error && /* @__PURE__ */ (0,
|
|
1414
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1396
1415
|
] })
|
|
1397
1416
|
] })
|
|
1398
1417
|
}
|
|
@@ -1405,7 +1424,7 @@ var import_th_TH2 = __toESM(require("antd/locale/th_TH"));
|
|
|
1405
1424
|
var import_th3 = __toESM(require_th());
|
|
1406
1425
|
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1407
1426
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1408
|
-
var
|
|
1427
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1409
1428
|
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
1410
1429
|
function DatePickerRangePicker({
|
|
1411
1430
|
value,
|
|
@@ -1426,7 +1445,7 @@ function DatePickerRangePicker({
|
|
|
1426
1445
|
}) {
|
|
1427
1446
|
const dateFormat = "DD/MM/YYYY";
|
|
1428
1447
|
import_dayjs2.default.locale("th_TH");
|
|
1429
|
-
return /* @__PURE__ */ (0,
|
|
1448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1430
1449
|
import_antd6.ConfigProvider,
|
|
1431
1450
|
{
|
|
1432
1451
|
locale: import_th_TH2.default,
|
|
@@ -1436,13 +1455,13 @@ function DatePickerRangePicker({
|
|
|
1436
1455
|
fontSize: 16
|
|
1437
1456
|
}
|
|
1438
1457
|
},
|
|
1439
|
-
children: /* @__PURE__ */ (0,
|
|
1440
|
-
/* @__PURE__ */ (0,
|
|
1441
|
-
/* @__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 }),
|
|
1442
1461
|
" ",
|
|
1443
|
-
required && /* @__PURE__ */ (0,
|
|
1462
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1444
1463
|
] }),
|
|
1445
|
-
/* @__PURE__ */ (0,
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1446
1465
|
import_antd6.DatePicker.RangePicker,
|
|
1447
1466
|
{
|
|
1448
1467
|
format: dateFormat,
|
|
@@ -1460,10 +1479,10 @@ function DatePickerRangePicker({
|
|
|
1460
1479
|
onCalendarChange
|
|
1461
1480
|
}
|
|
1462
1481
|
),
|
|
1463
|
-
/* @__PURE__ */ (0,
|
|
1464
|
-
/* @__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 }),
|
|
1465
1484
|
" ",
|
|
1466
|
-
error && /* @__PURE__ */ (0,
|
|
1485
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1467
1486
|
] })
|
|
1468
1487
|
] })
|
|
1469
1488
|
}
|
|
@@ -1472,7 +1491,7 @@ function DatePickerRangePicker({
|
|
|
1472
1491
|
|
|
1473
1492
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1474
1493
|
var import_antd7 = require("antd");
|
|
1475
|
-
var
|
|
1494
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1476
1495
|
function TimePickerBasic({
|
|
1477
1496
|
value,
|
|
1478
1497
|
onChange,
|
|
@@ -1484,7 +1503,7 @@ function TimePickerBasic({
|
|
|
1484
1503
|
disabled,
|
|
1485
1504
|
className
|
|
1486
1505
|
}) {
|
|
1487
|
-
return /* @__PURE__ */ (0,
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1488
1507
|
import_antd7.ConfigProvider,
|
|
1489
1508
|
{
|
|
1490
1509
|
theme: {
|
|
@@ -1492,13 +1511,13 @@ function TimePickerBasic({
|
|
|
1492
1511
|
fontFamily: "Kanit"
|
|
1493
1512
|
}
|
|
1494
1513
|
},
|
|
1495
|
-
children: /* @__PURE__ */ (0,
|
|
1496
|
-
/* @__PURE__ */ (0,
|
|
1497
|
-
/* @__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 }),
|
|
1498
1517
|
" ",
|
|
1499
|
-
required && /* @__PURE__ */ (0,
|
|
1518
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1500
1519
|
] }),
|
|
1501
|
-
/* @__PURE__ */ (0,
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1502
1521
|
import_antd7.TimePicker,
|
|
1503
1522
|
{
|
|
1504
1523
|
format: "HH:mm",
|
|
@@ -1510,10 +1529,10 @@ function TimePickerBasic({
|
|
|
1510
1529
|
disabled
|
|
1511
1530
|
}
|
|
1512
1531
|
),
|
|
1513
|
-
/* @__PURE__ */ (0,
|
|
1514
|
-
/* @__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 }),
|
|
1515
1534
|
" ",
|
|
1516
|
-
error && /* @__PURE__ */ (0,
|
|
1535
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1517
1536
|
] })
|
|
1518
1537
|
] })
|
|
1519
1538
|
}
|
|
@@ -1522,7 +1541,7 @@ function TimePickerBasic({
|
|
|
1522
1541
|
|
|
1523
1542
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1524
1543
|
var import_antd8 = require("antd");
|
|
1525
|
-
var
|
|
1544
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1526
1545
|
function TimePickerRangePicker({
|
|
1527
1546
|
value,
|
|
1528
1547
|
onChange,
|
|
@@ -1534,7 +1553,7 @@ function TimePickerRangePicker({
|
|
|
1534
1553
|
disabled,
|
|
1535
1554
|
className
|
|
1536
1555
|
}) {
|
|
1537
|
-
return /* @__PURE__ */ (0,
|
|
1556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1538
1557
|
import_antd8.ConfigProvider,
|
|
1539
1558
|
{
|
|
1540
1559
|
theme: {
|
|
@@ -1542,13 +1561,13 @@ function TimePickerRangePicker({
|
|
|
1542
1561
|
fontFamily: "Kanit"
|
|
1543
1562
|
}
|
|
1544
1563
|
},
|
|
1545
|
-
children: /* @__PURE__ */ (0,
|
|
1546
|
-
/* @__PURE__ */ (0,
|
|
1547
|
-
/* @__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 }),
|
|
1548
1567
|
" ",
|
|
1549
|
-
required && /* @__PURE__ */ (0,
|
|
1568
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1550
1569
|
] }),
|
|
1551
|
-
/* @__PURE__ */ (0,
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1552
1571
|
import_antd8.TimePicker.RangePicker,
|
|
1553
1572
|
{
|
|
1554
1573
|
format: "HH:mm",
|
|
@@ -1560,18 +1579,82 @@ function TimePickerRangePicker({
|
|
|
1560
1579
|
disabled
|
|
1561
1580
|
}
|
|
1562
1581
|
),
|
|
1563
|
-
/* @__PURE__ */ (0,
|
|
1564
|
-
/* @__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 }),
|
|
1565
1584
|
" ",
|
|
1566
|
-
error && /* @__PURE__ */ (0,
|
|
1585
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1567
1586
|
] })
|
|
1568
1587
|
] })
|
|
1569
1588
|
}
|
|
1570
1589
|
);
|
|
1571
1590
|
}
|
|
1572
1591
|
|
|
1573
|
-
// src/
|
|
1592
|
+
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1574
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");
|
|
1575
1658
|
|
|
1576
1659
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1577
1660
|
function _typeof(o) {
|
|
@@ -2272,8 +2355,8 @@ magentaDark.primary = magentaDark[5];
|
|
|
2272
2355
|
var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
|
|
2273
2356
|
greyDark.primary = greyDark[5];
|
|
2274
2357
|
|
|
2275
|
-
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2276
|
-
var
|
|
2358
|
+
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2359
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2277
2360
|
function genPresets(presets = presetPalettes) {
|
|
2278
2361
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2279
2362
|
label,
|
|
@@ -2295,14 +2378,14 @@ function ColorPalettePickerBasic({
|
|
|
2295
2378
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35",
|
|
2296
2379
|
onClear
|
|
2297
2380
|
}) {
|
|
2298
|
-
const { token } =
|
|
2381
|
+
const { token } = import_antd10.theme.useToken();
|
|
2299
2382
|
const presets = genPresets({
|
|
2300
2383
|
primary: generate(token.colorPrimary),
|
|
2301
2384
|
red,
|
|
2302
2385
|
green
|
|
2303
2386
|
});
|
|
2304
|
-
return /* @__PURE__ */ (0,
|
|
2305
|
-
|
|
2387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2388
|
+
import_antd10.ConfigProvider,
|
|
2306
2389
|
{
|
|
2307
2390
|
theme: {
|
|
2308
2391
|
token: {
|
|
@@ -2310,14 +2393,14 @@ function ColorPalettePickerBasic({
|
|
|
2310
2393
|
fontSize: 16
|
|
2311
2394
|
}
|
|
2312
2395
|
},
|
|
2313
|
-
children: /* @__PURE__ */ (0,
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2315
|
-
/* @__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 }),
|
|
2316
2399
|
" ",
|
|
2317
|
-
required && /* @__PURE__ */ (0,
|
|
2400
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2318
2401
|
] }),
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2320
|
-
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2403
|
+
import_antd10.ColorPicker,
|
|
2321
2404
|
{
|
|
2322
2405
|
defaultFormat,
|
|
2323
2406
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -2329,9 +2412,9 @@ function ColorPalettePickerBasic({
|
|
|
2329
2412
|
showText: (color) => {
|
|
2330
2413
|
const hex = color.toHexString();
|
|
2331
2414
|
if (!value) {
|
|
2332
|
-
return /* @__PURE__ */ (0,
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: placeholder });
|
|
2333
2416
|
}
|
|
2334
|
-
return /* @__PURE__ */ (0,
|
|
2417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { children: [
|
|
2335
2418
|
"(",
|
|
2336
2419
|
hex,
|
|
2337
2420
|
")"
|
|
@@ -2341,10 +2424,10 @@ function ColorPalettePickerBasic({
|
|
|
2341
2424
|
onClear
|
|
2342
2425
|
}
|
|
2343
2426
|
),
|
|
2344
|
-
/* @__PURE__ */ (0,
|
|
2345
|
-
/* @__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 }),
|
|
2346
2429
|
" ",
|
|
2347
|
-
error && /* @__PURE__ */ (0,
|
|
2430
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2348
2431
|
] })
|
|
2349
2432
|
] })
|
|
2350
2433
|
}
|
|
@@ -2352,8 +2435,8 @@ function ColorPalettePickerBasic({
|
|
|
2352
2435
|
}
|
|
2353
2436
|
|
|
2354
2437
|
// src/Select/SelectField/SelectField.tsx
|
|
2355
|
-
var
|
|
2356
|
-
var
|
|
2438
|
+
var import_antd11 = require("antd");
|
|
2439
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2357
2440
|
function SelectField({
|
|
2358
2441
|
value,
|
|
2359
2442
|
onChange,
|
|
@@ -2372,8 +2455,8 @@ function SelectField({
|
|
|
2372
2455
|
className,
|
|
2373
2456
|
onClear
|
|
2374
2457
|
}) {
|
|
2375
|
-
return /* @__PURE__ */ (0,
|
|
2376
|
-
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2459
|
+
import_antd11.ConfigProvider,
|
|
2377
2460
|
{
|
|
2378
2461
|
theme: {
|
|
2379
2462
|
token: {
|
|
@@ -2381,14 +2464,14 @@ function SelectField({
|
|
|
2381
2464
|
fontSize: 16
|
|
2382
2465
|
}
|
|
2383
2466
|
},
|
|
2384
|
-
children: /* @__PURE__ */ (0,
|
|
2385
|
-
/* @__PURE__ */ (0,
|
|
2386
|
-
/* @__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 }),
|
|
2387
2470
|
" ",
|
|
2388
|
-
required && /* @__PURE__ */ (0,
|
|
2471
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2389
2472
|
] }),
|
|
2390
|
-
/* @__PURE__ */ (0,
|
|
2391
|
-
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2474
|
+
import_antd11.Select,
|
|
2392
2475
|
{
|
|
2393
2476
|
showSearch: true,
|
|
2394
2477
|
value,
|
|
@@ -2402,7 +2485,7 @@ function SelectField({
|
|
|
2402
2485
|
options,
|
|
2403
2486
|
mode,
|
|
2404
2487
|
onSearch: handleSearch,
|
|
2405
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2488
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2406
2489
|
"span",
|
|
2407
2490
|
{
|
|
2408
2491
|
style: {
|
|
@@ -2419,10 +2502,10 @@ function SelectField({
|
|
|
2419
2502
|
onClear
|
|
2420
2503
|
}
|
|
2421
2504
|
),
|
|
2422
|
-
/* @__PURE__ */ (0,
|
|
2423
|
-
/* @__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 }),
|
|
2424
2507
|
" ",
|
|
2425
|
-
error && /* @__PURE__ */ (0,
|
|
2508
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2426
2509
|
] })
|
|
2427
2510
|
] })
|
|
2428
2511
|
}
|
|
@@ -2430,8 +2513,8 @@ function SelectField({
|
|
|
2430
2513
|
}
|
|
2431
2514
|
|
|
2432
2515
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2433
|
-
var
|
|
2434
|
-
var
|
|
2516
|
+
var import_antd12 = require("antd");
|
|
2517
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2435
2518
|
function SelectFieldGroup({
|
|
2436
2519
|
value,
|
|
2437
2520
|
onChange,
|
|
@@ -2449,22 +2532,22 @@ function SelectFieldGroup({
|
|
|
2449
2532
|
handleSearch,
|
|
2450
2533
|
className
|
|
2451
2534
|
}) {
|
|
2452
|
-
return /* @__PURE__ */ (0,
|
|
2453
|
-
|
|
2535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2536
|
+
import_antd12.ConfigProvider,
|
|
2454
2537
|
{
|
|
2455
2538
|
theme: {
|
|
2456
2539
|
token: {
|
|
2457
2540
|
fontFamily: "Kanit"
|
|
2458
2541
|
}
|
|
2459
2542
|
},
|
|
2460
|
-
children: /* @__PURE__ */ (0,
|
|
2461
|
-
/* @__PURE__ */ (0,
|
|
2462
|
-
/* @__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 }),
|
|
2463
2546
|
" ",
|
|
2464
|
-
required && /* @__PURE__ */ (0,
|
|
2547
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2465
2548
|
] }),
|
|
2466
|
-
/* @__PURE__ */ (0,
|
|
2467
|
-
|
|
2549
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2550
|
+
import_antd12.Select,
|
|
2468
2551
|
{
|
|
2469
2552
|
showSearch: true,
|
|
2470
2553
|
value,
|
|
@@ -2478,7 +2561,7 @@ function SelectFieldGroup({
|
|
|
2478
2561
|
options,
|
|
2479
2562
|
mode,
|
|
2480
2563
|
onSearch: handleSearch,
|
|
2481
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2564
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2482
2565
|
"span",
|
|
2483
2566
|
{
|
|
2484
2567
|
style: {
|
|
@@ -2494,10 +2577,10 @@ function SelectFieldGroup({
|
|
|
2494
2577
|
allowClear: true
|
|
2495
2578
|
}
|
|
2496
2579
|
),
|
|
2497
|
-
/* @__PURE__ */ (0,
|
|
2498
|
-
/* @__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 }),
|
|
2499
2582
|
" ",
|
|
2500
|
-
error && /* @__PURE__ */ (0,
|
|
2583
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2501
2584
|
] })
|
|
2502
2585
|
] })
|
|
2503
2586
|
}
|
|
@@ -2505,7 +2588,7 @@ function SelectFieldGroup({
|
|
|
2505
2588
|
}
|
|
2506
2589
|
|
|
2507
2590
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2508
|
-
var
|
|
2591
|
+
var import_antd13 = require("antd");
|
|
2509
2592
|
|
|
2510
2593
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
2511
2594
|
var status = [
|
|
@@ -2518,7 +2601,7 @@ var status = [
|
|
|
2518
2601
|
|
|
2519
2602
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2520
2603
|
var import_icons = require("@ant-design/icons");
|
|
2521
|
-
var
|
|
2604
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2522
2605
|
function SelectFieldStatus({
|
|
2523
2606
|
value,
|
|
2524
2607
|
onChange,
|
|
@@ -2532,8 +2615,8 @@ function SelectFieldStatus({
|
|
|
2532
2615
|
className
|
|
2533
2616
|
}) {
|
|
2534
2617
|
const selectedItem = status.find((s) => s.value === value);
|
|
2535
|
-
return /* @__PURE__ */ (0,
|
|
2536
|
-
|
|
2618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2619
|
+
import_antd13.ConfigProvider,
|
|
2537
2620
|
{
|
|
2538
2621
|
theme: {
|
|
2539
2622
|
components: {
|
|
@@ -2548,17 +2631,17 @@ function SelectFieldStatus({
|
|
|
2548
2631
|
fontFamily: "Kanit"
|
|
2549
2632
|
}
|
|
2550
2633
|
},
|
|
2551
|
-
children: /* @__PURE__ */ (0,
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
2553
|
-
/* @__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 }),
|
|
2554
2637
|
" ",
|
|
2555
|
-
required && /* @__PURE__ */ (0,
|
|
2638
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2556
2639
|
] }),
|
|
2557
|
-
/* @__PURE__ */ (0,
|
|
2558
|
-
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2641
|
+
import_antd13.Select,
|
|
2559
2642
|
{
|
|
2560
2643
|
disabled,
|
|
2561
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2644
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2562
2645
|
value,
|
|
2563
2646
|
onChange,
|
|
2564
2647
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2569,10 +2652,10 @@ function SelectFieldStatus({
|
|
|
2569
2652
|
showSearch: true
|
|
2570
2653
|
}
|
|
2571
2654
|
),
|
|
2572
|
-
/* @__PURE__ */ (0,
|
|
2573
|
-
/* @__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 }),
|
|
2574
2657
|
" ",
|
|
2575
|
-
error && /* @__PURE__ */ (0,
|
|
2658
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2576
2659
|
] })
|
|
2577
2660
|
] })
|
|
2578
2661
|
}
|
|
@@ -2580,7 +2663,7 @@ function SelectFieldStatus({
|
|
|
2580
2663
|
}
|
|
2581
2664
|
|
|
2582
2665
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2583
|
-
var
|
|
2666
|
+
var import_antd14 = require("antd");
|
|
2584
2667
|
|
|
2585
2668
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2586
2669
|
var status2 = [
|
|
@@ -2590,7 +2673,7 @@ var status2 = [
|
|
|
2590
2673
|
|
|
2591
2674
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2592
2675
|
var import_icons2 = require("@ant-design/icons");
|
|
2593
|
-
var
|
|
2676
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2594
2677
|
function SelectFieldStatusReport({
|
|
2595
2678
|
value,
|
|
2596
2679
|
onChange,
|
|
@@ -2604,8 +2687,8 @@ function SelectFieldStatusReport({
|
|
|
2604
2687
|
options
|
|
2605
2688
|
}) {
|
|
2606
2689
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2607
|
-
return /* @__PURE__ */ (0,
|
|
2608
|
-
|
|
2690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2691
|
+
import_antd14.ConfigProvider,
|
|
2609
2692
|
{
|
|
2610
2693
|
theme: {
|
|
2611
2694
|
components: {
|
|
@@ -2620,17 +2703,17 @@ function SelectFieldStatusReport({
|
|
|
2620
2703
|
fontFamily: "Kanit"
|
|
2621
2704
|
}
|
|
2622
2705
|
},
|
|
2623
|
-
children: /* @__PURE__ */ (0,
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
2625
|
-
/* @__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 }),
|
|
2626
2709
|
" ",
|
|
2627
|
-
required && /* @__PURE__ */ (0,
|
|
2710
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2628
2711
|
] }),
|
|
2629
|
-
/* @__PURE__ */ (0,
|
|
2630
|
-
|
|
2712
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2713
|
+
import_antd14.Select,
|
|
2631
2714
|
{
|
|
2632
2715
|
disabled,
|
|
2633
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2716
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2634
2717
|
value,
|
|
2635
2718
|
onChange,
|
|
2636
2719
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2641,10 +2724,10 @@ function SelectFieldStatusReport({
|
|
|
2641
2724
|
showSearch: true
|
|
2642
2725
|
}
|
|
2643
2726
|
),
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2645
|
-
/* @__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 }),
|
|
2646
2729
|
" ",
|
|
2647
|
-
error && /* @__PURE__ */ (0,
|
|
2730
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2648
2731
|
] })
|
|
2649
2732
|
] })
|
|
2650
2733
|
}
|
|
@@ -2652,9 +2735,9 @@ function SelectFieldStatusReport({
|
|
|
2652
2735
|
}
|
|
2653
2736
|
|
|
2654
2737
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2655
|
-
var
|
|
2738
|
+
var import_antd15 = require("antd");
|
|
2656
2739
|
var import_react8 = require("react");
|
|
2657
|
-
var
|
|
2740
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2658
2741
|
function SelectFieldTag({
|
|
2659
2742
|
title,
|
|
2660
2743
|
required,
|
|
@@ -2688,22 +2771,22 @@ function SelectFieldTag({
|
|
|
2688
2771
|
}
|
|
2689
2772
|
onChange?.([]);
|
|
2690
2773
|
};
|
|
2691
|
-
return /* @__PURE__ */ (0,
|
|
2692
|
-
|
|
2774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2775
|
+
import_antd15.ConfigProvider,
|
|
2693
2776
|
{
|
|
2694
2777
|
theme: {
|
|
2695
2778
|
token: {
|
|
2696
2779
|
fontFamily: "Kanit"
|
|
2697
2780
|
}
|
|
2698
2781
|
},
|
|
2699
|
-
children: /* @__PURE__ */ (0,
|
|
2700
|
-
/* @__PURE__ */ (0,
|
|
2701
|
-
/* @__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 }),
|
|
2702
2785
|
" ",
|
|
2703
|
-
required && /* @__PURE__ */ (0,
|
|
2786
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2704
2787
|
] }),
|
|
2705
|
-
/* @__PURE__ */ (0,
|
|
2706
|
-
|
|
2788
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2789
|
+
import_antd15.Select,
|
|
2707
2790
|
{
|
|
2708
2791
|
mode: "tags",
|
|
2709
2792
|
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2721,10 +2804,10 @@ function SelectFieldTag({
|
|
|
2721
2804
|
onClear
|
|
2722
2805
|
}
|
|
2723
2806
|
),
|
|
2724
|
-
/* @__PURE__ */ (0,
|
|
2725
|
-
/* @__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 }),
|
|
2726
2809
|
" ",
|
|
2727
|
-
error && /* @__PURE__ */ (0,
|
|
2810
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2728
2811
|
] })
|
|
2729
2812
|
] })
|
|
2730
2813
|
}
|
|
@@ -2733,9 +2816,9 @@ function SelectFieldTag({
|
|
|
2733
2816
|
|
|
2734
2817
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2735
2818
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
2736
|
-
var
|
|
2819
|
+
var import_antd16 = require("antd");
|
|
2737
2820
|
var import_react9 = require("react");
|
|
2738
|
-
var
|
|
2821
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2739
2822
|
function SelectCustom({
|
|
2740
2823
|
title = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2741
2824
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
@@ -2765,8 +2848,8 @@ function SelectCustom({
|
|
|
2765
2848
|
});
|
|
2766
2849
|
};
|
|
2767
2850
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2768
|
-
return /* @__PURE__ */ (0,
|
|
2769
|
-
|
|
2851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2852
|
+
import_antd16.ConfigProvider,
|
|
2770
2853
|
{
|
|
2771
2854
|
theme: {
|
|
2772
2855
|
token: {
|
|
@@ -2774,14 +2857,14 @@ function SelectCustom({
|
|
|
2774
2857
|
fontSize: 16
|
|
2775
2858
|
}
|
|
2776
2859
|
},
|
|
2777
|
-
children: /* @__PURE__ */ (0,
|
|
2778
|
-
/* @__PURE__ */ (0,
|
|
2779
|
-
/* @__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 }),
|
|
2780
2863
|
" ",
|
|
2781
|
-
required && /* @__PURE__ */ (0,
|
|
2864
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2782
2865
|
] }),
|
|
2783
|
-
/* @__PURE__ */ (0,
|
|
2784
|
-
|
|
2866
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2867
|
+
import_antd16.Select,
|
|
2785
2868
|
{
|
|
2786
2869
|
value,
|
|
2787
2870
|
onChange: handleChange,
|
|
@@ -2791,20 +2874,20 @@ function SelectCustom({
|
|
|
2791
2874
|
onClear
|
|
2792
2875
|
}
|
|
2793
2876
|
),
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
2795
|
-
/* @__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 }),
|
|
2796
2879
|
" ",
|
|
2797
|
-
error && /* @__PURE__ */ (0,
|
|
2880
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2798
2881
|
] }),
|
|
2799
|
-
/* @__PURE__ */ (0,
|
|
2800
|
-
/* @__PURE__ */ (0,
|
|
2801
|
-
/* @__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: [
|
|
2802
2885
|
index + 1,
|
|
2803
2886
|
"."
|
|
2804
2887
|
] }),
|
|
2805
|
-
/* @__PURE__ */ (0,
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { children: v })
|
|
2806
2889
|
] }),
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons_react8.IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
|
|
2808
2891
|
] }, index)) })
|
|
2809
2892
|
] })
|
|
2810
2893
|
}
|
|
@@ -2812,7 +2895,7 @@ function SelectCustom({
|
|
|
2812
2895
|
}
|
|
2813
2896
|
|
|
2814
2897
|
// src/SortFilter/SortFilter.tsx
|
|
2815
|
-
var
|
|
2898
|
+
var import_antd17 = require("antd");
|
|
2816
2899
|
var import_icons3 = require("@ant-design/icons");
|
|
2817
2900
|
|
|
2818
2901
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2845,7 +2928,7 @@ var quarters = [
|
|
|
2845
2928
|
// src/SortFilter/SortFilter.tsx
|
|
2846
2929
|
var import_react10 = require("react");
|
|
2847
2930
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
2848
|
-
var
|
|
2931
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2849
2932
|
function SortFilter({
|
|
2850
2933
|
showYear = true,
|
|
2851
2934
|
showQuarter = true,
|
|
@@ -2856,20 +2939,20 @@ function SortFilter({
|
|
|
2856
2939
|
const [yearValue, setYearValue] = (0, import_react10.useState)();
|
|
2857
2940
|
const [monthValue, setMonthValue] = (0, import_react10.useState)();
|
|
2858
2941
|
const [quarterValue, setQuartersValue] = (0, import_react10.useState)();
|
|
2859
|
-
return /* @__PURE__ */ (0,
|
|
2860
|
-
|
|
2942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2943
|
+
import_antd17.ConfigProvider,
|
|
2861
2944
|
{
|
|
2862
2945
|
theme: {
|
|
2863
2946
|
token: {
|
|
2864
2947
|
fontFamily: "Kanit"
|
|
2865
2948
|
}
|
|
2866
2949
|
},
|
|
2867
|
-
children: /* @__PURE__ */ (0,
|
|
2868
|
-
/* @__PURE__ */ (0,
|
|
2869
|
-
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)(
|
|
2870
2953
|
SelectField,
|
|
2871
2954
|
{
|
|
2872
|
-
prefix: /* @__PURE__ */ (0,
|
|
2955
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2873
2956
|
onChange: setYearValue,
|
|
2874
2957
|
options: years.map((s) => ({
|
|
2875
2958
|
value: s.value,
|
|
@@ -2879,10 +2962,10 @@ function SortFilter({
|
|
|
2879
2962
|
value: yearValue
|
|
2880
2963
|
}
|
|
2881
2964
|
) }),
|
|
2882
|
-
showMonth && /* @__PURE__ */ (0,
|
|
2965
|
+
showMonth && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2883
2966
|
SelectField,
|
|
2884
2967
|
{
|
|
2885
|
-
prefix: /* @__PURE__ */ (0,
|
|
2968
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2886
2969
|
onChange: setMonthValue,
|
|
2887
2970
|
options: months.map((s) => ({
|
|
2888
2971
|
value: s.value,
|
|
@@ -2892,10 +2975,10 @@ function SortFilter({
|
|
|
2892
2975
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2893
2976
|
}
|
|
2894
2977
|
) }),
|
|
2895
|
-
showQuarter && /* @__PURE__ */ (0,
|
|
2978
|
+
showQuarter && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2896
2979
|
SelectField,
|
|
2897
2980
|
{
|
|
2898
|
-
prefix: /* @__PURE__ */ (0,
|
|
2981
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2899
2982
|
onChange: setQuartersValue,
|
|
2900
2983
|
options: quarters.map((s) => ({
|
|
2901
2984
|
value: s.value,
|
|
@@ -2906,8 +2989,8 @@ function SortFilter({
|
|
|
2906
2989
|
}
|
|
2907
2990
|
) })
|
|
2908
2991
|
] }),
|
|
2909
|
-
/* @__PURE__ */ (0,
|
|
2910
|
-
/* @__PURE__ */ (0,
|
|
2992
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2911
2994
|
import_icons_react9.IconSortDescending,
|
|
2912
2995
|
{
|
|
2913
2996
|
size: 24,
|
|
@@ -2915,7 +2998,7 @@ function SortFilter({
|
|
|
2915
2998
|
onClick: onSortClick
|
|
2916
2999
|
}
|
|
2917
3000
|
),
|
|
2918
|
-
/* @__PURE__ */ (0,
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2919
3002
|
import_icons_react9.IconFilter,
|
|
2920
3003
|
{
|
|
2921
3004
|
size: 24,
|
|
@@ -2932,7 +3015,7 @@ function SortFilter({
|
|
|
2932
3015
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2933
3016
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
2934
3017
|
var import_react11 = require("react");
|
|
2935
|
-
var
|
|
3018
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2936
3019
|
function FileUploader({
|
|
2937
3020
|
onUpload,
|
|
2938
3021
|
onError,
|
|
@@ -3003,10 +3086,10 @@ function FileUploader({
|
|
|
3003
3086
|
}
|
|
3004
3087
|
if (inputRef.current) inputRef.current.value = "";
|
|
3005
3088
|
};
|
|
3006
|
-
return /* @__PURE__ */ (0,
|
|
3007
|
-
label && /* @__PURE__ */ (0,
|
|
3008
|
-
/* @__PURE__ */ (0,
|
|
3009
|
-
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)(
|
|
3010
3093
|
"button",
|
|
3011
3094
|
{
|
|
3012
3095
|
type: "button",
|
|
@@ -3014,15 +3097,15 @@ function FileUploader({
|
|
|
3014
3097
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3015
3098
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3016
3099
|
disabled: disabled ? disabled : uploading,
|
|
3017
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3018
|
-
/* @__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 }),
|
|
3019
3102
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3020
|
-
] }) : /* @__PURE__ */ (0,
|
|
3021
|
-
/* @__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" }),
|
|
3022
3105
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
3023
3106
|
] })
|
|
3024
3107
|
}
|
|
3025
|
-
) : /* @__PURE__ */ (0,
|
|
3108
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3026
3109
|
"div",
|
|
3027
3110
|
{
|
|
3028
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
|
|
@@ -3036,17 +3119,17 @@ function FileUploader({
|
|
|
3036
3119
|
},
|
|
3037
3120
|
onDragLeave: () => setDragActive(false),
|
|
3038
3121
|
onDrop: handleDrop,
|
|
3039
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3040
|
-
/* @__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 }),
|
|
3041
3124
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3042
|
-
] }) : /* @__PURE__ */ (0,
|
|
3043
|
-
/* @__PURE__ */ (0,
|
|
3044
|
-
/* @__PURE__ */ (0,
|
|
3045
|
-
/* @__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" })
|
|
3046
3129
|
] })
|
|
3047
3130
|
}
|
|
3048
3131
|
),
|
|
3049
|
-
/* @__PURE__ */ (0,
|
|
3132
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3050
3133
|
"input",
|
|
3051
3134
|
{
|
|
3052
3135
|
type: "file",
|
|
@@ -3059,13 +3142,13 @@ function FileUploader({
|
|
|
3059
3142
|
}
|
|
3060
3143
|
)
|
|
3061
3144
|
] }),
|
|
3062
|
-
description && /* @__PURE__ */ (0,
|
|
3063
|
-
/* @__PURE__ */ (0,
|
|
3064
|
-
/* @__PURE__ */ (0,
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3066
|
-
/* @__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 })
|
|
3067
3150
|
] }),
|
|
3068
|
-
/* @__PURE__ */ (0,
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3069
3152
|
import_icons_react10.IconTrash,
|
|
3070
3153
|
{
|
|
3071
3154
|
size: 20,
|
|
@@ -3099,9 +3182,9 @@ function messageLoading(content, duration) {
|
|
|
3099
3182
|
}
|
|
3100
3183
|
|
|
3101
3184
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3102
|
-
var import_antd17 = require("antd");
|
|
3103
3185
|
var import_antd18 = require("antd");
|
|
3104
|
-
var
|
|
3186
|
+
var import_antd19 = require("antd");
|
|
3187
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3105
3188
|
function Breadcrumbs({
|
|
3106
3189
|
items,
|
|
3107
3190
|
separator,
|
|
@@ -3109,16 +3192,16 @@ function Breadcrumbs({
|
|
|
3109
3192
|
classname,
|
|
3110
3193
|
params
|
|
3111
3194
|
}) {
|
|
3112
|
-
return /* @__PURE__ */ (0,
|
|
3113
|
-
|
|
3195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3196
|
+
import_antd18.ConfigProvider,
|
|
3114
3197
|
{
|
|
3115
3198
|
theme: {
|
|
3116
3199
|
token: {
|
|
3117
3200
|
fontFamily: "Kanit"
|
|
3118
3201
|
}
|
|
3119
3202
|
},
|
|
3120
|
-
children: /* @__PURE__ */ (0,
|
|
3121
|
-
|
|
3203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3204
|
+
import_antd19.Breadcrumb,
|
|
3122
3205
|
{
|
|
3123
3206
|
items,
|
|
3124
3207
|
separator,
|
|
@@ -3132,8 +3215,8 @@ function Breadcrumbs({
|
|
|
3132
3215
|
}
|
|
3133
3216
|
|
|
3134
3217
|
// src/HeadingPage/HeadingPage.tsx
|
|
3135
|
-
var
|
|
3136
|
-
var
|
|
3218
|
+
var import_antd20 = require("antd");
|
|
3219
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3137
3220
|
function HeadingPage({ Heading }) {
|
|
3138
3221
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3139
3222
|
weekday: "long",
|
|
@@ -3141,17 +3224,17 @@ function HeadingPage({ Heading }) {
|
|
|
3141
3224
|
month: "long",
|
|
3142
3225
|
year: "numeric"
|
|
3143
3226
|
});
|
|
3144
|
-
return /* @__PURE__ */ (0,
|
|
3145
|
-
|
|
3227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3228
|
+
import_antd20.ConfigProvider,
|
|
3146
3229
|
{
|
|
3147
3230
|
theme: {
|
|
3148
3231
|
token: {
|
|
3149
3232
|
fontFamily: "Kanit"
|
|
3150
3233
|
}
|
|
3151
3234
|
},
|
|
3152
|
-
children: /* @__PURE__ */ (0,
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3154
|
-
/* @__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: [
|
|
3155
3238
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3156
3239
|
today
|
|
3157
3240
|
] })
|
|
@@ -3161,9 +3244,9 @@ function HeadingPage({ Heading }) {
|
|
|
3161
3244
|
}
|
|
3162
3245
|
|
|
3163
3246
|
// src/Progress/ProgressBar.tsx
|
|
3164
|
-
var
|
|
3247
|
+
var import_antd21 = require("antd");
|
|
3165
3248
|
var import_react12 = require("react");
|
|
3166
|
-
var
|
|
3249
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3167
3250
|
function ProgressBar({
|
|
3168
3251
|
percent = 0,
|
|
3169
3252
|
size = "default",
|
|
@@ -3186,9 +3269,7 @@ function ProgressBar({
|
|
|
3186
3269
|
strokeColor = percent >= minCheckpoint ? "var(--color-green-500)" : "var(--color-red-500)";
|
|
3187
3270
|
}
|
|
3188
3271
|
(0, import_react12.useEffect)(() => {
|
|
3189
|
-
const inner = progressRef.current?.querySelector(
|
|
3190
|
-
".ant-progress-inner"
|
|
3191
|
-
);
|
|
3272
|
+
const inner = progressRef.current?.querySelector(".ant-progress-inner");
|
|
3192
3273
|
if (!inner) return;
|
|
3193
3274
|
const observer = new ResizeObserver(() => {
|
|
3194
3275
|
setBarWidth(inner.offsetWidth);
|
|
@@ -3196,17 +3277,17 @@ function ProgressBar({
|
|
|
3196
3277
|
observer.observe(inner);
|
|
3197
3278
|
return () => observer.disconnect();
|
|
3198
3279
|
}, []);
|
|
3199
|
-
return /* @__PURE__ */ (0,
|
|
3200
|
-
|
|
3280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3281
|
+
import_antd21.ConfigProvider,
|
|
3201
3282
|
{
|
|
3202
3283
|
theme: {
|
|
3203
3284
|
token: {
|
|
3204
3285
|
fontFamily: "Kanit"
|
|
3205
3286
|
}
|
|
3206
3287
|
},
|
|
3207
|
-
children: /* @__PURE__ */ (0,
|
|
3208
|
-
/* @__PURE__ */ (0,
|
|
3209
|
-
|
|
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,
|
|
3210
3291
|
{
|
|
3211
3292
|
className: "w-full",
|
|
3212
3293
|
percent,
|
|
@@ -3221,7 +3302,7 @@ function ProgressBar({
|
|
|
3221
3302
|
strokeColor
|
|
3222
3303
|
}
|
|
3223
3304
|
),
|
|
3224
|
-
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)(
|
|
3225
3306
|
"div",
|
|
3226
3307
|
{
|
|
3227
3308
|
className: "checkpoint absolute top-0",
|
|
@@ -3243,7 +3324,7 @@ function ProgressBar({
|
|
|
3243
3324
|
}
|
|
3244
3325
|
|
|
3245
3326
|
// src/KpiSection/KpiSection.tsx
|
|
3246
|
-
var
|
|
3327
|
+
var import_antd22 = require("antd");
|
|
3247
3328
|
var import_react14 = require("react");
|
|
3248
3329
|
|
|
3249
3330
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3394,7 +3475,7 @@ function useGetKpiSection() {
|
|
|
3394
3475
|
|
|
3395
3476
|
// src/KpiSection/KpiSection.tsx
|
|
3396
3477
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
3397
|
-
var
|
|
3478
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3398
3479
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3399
3480
|
const {
|
|
3400
3481
|
handleAddKpi,
|
|
@@ -3414,7 +3495,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3414
3495
|
itemErrors,
|
|
3415
3496
|
setItemErrors
|
|
3416
3497
|
} = useGetKpiSection();
|
|
3417
|
-
const [messageApi2, messageContainer] =
|
|
3498
|
+
const [messageApi2, messageContainer] = import_antd22.message.useMessage();
|
|
3418
3499
|
const [hasShownError, setHasShownError] = (0, import_react14.useState)(false);
|
|
3419
3500
|
(0, import_react14.useEffect)(() => {
|
|
3420
3501
|
setMessageApi(messageApi2);
|
|
@@ -3424,8 +3505,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3424
3505
|
onChangeKpiList(kpiList);
|
|
3425
3506
|
}
|
|
3426
3507
|
}, [kpiList]);
|
|
3427
|
-
return /* @__PURE__ */ (0,
|
|
3428
|
-
|
|
3508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3509
|
+
import_antd22.ConfigProvider,
|
|
3429
3510
|
{
|
|
3430
3511
|
theme: {
|
|
3431
3512
|
token: {
|
|
@@ -3433,11 +3514,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3433
3514
|
fontSize: 16
|
|
3434
3515
|
}
|
|
3435
3516
|
},
|
|
3436
|
-
children: /* @__PURE__ */ (0,
|
|
3517
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "container-input", children: [
|
|
3437
3518
|
messageContainer,
|
|
3438
|
-
type === "number" && /* @__PURE__ */ (0,
|
|
3439
|
-
/* @__PURE__ */ (0,
|
|
3440
|
-
/* @__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)(
|
|
3441
3522
|
InputField,
|
|
3442
3523
|
{
|
|
3443
3524
|
value: nameKpi,
|
|
@@ -3449,7 +3530,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3449
3530
|
error: errors.nameKpi
|
|
3450
3531
|
}
|
|
3451
3532
|
),
|
|
3452
|
-
/* @__PURE__ */ (0,
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3453
3534
|
InputField,
|
|
3454
3535
|
{
|
|
3455
3536
|
value: kpiValue,
|
|
@@ -3473,7 +3554,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3473
3554
|
error: errors.kpiValue
|
|
3474
3555
|
}
|
|
3475
3556
|
),
|
|
3476
|
-
/* @__PURE__ */ (0,
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3477
3558
|
InputField,
|
|
3478
3559
|
{
|
|
3479
3560
|
value: unitValue,
|
|
@@ -3485,7 +3566,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3485
3566
|
error: errors.unitValue
|
|
3486
3567
|
}
|
|
3487
3568
|
),
|
|
3488
|
-
/* @__PURE__ */ (0,
|
|
3569
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3489
3570
|
import_icons_react11.IconCirclePlus,
|
|
3490
3571
|
{
|
|
3491
3572
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3494,17 +3575,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3494
3575
|
}
|
|
3495
3576
|
) })
|
|
3496
3577
|
] }),
|
|
3497
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3498
3579
|
"div",
|
|
3499
3580
|
{
|
|
3500
3581
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3501
3582
|
children: [
|
|
3502
|
-
/* @__PURE__ */ (0,
|
|
3583
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3503
3584
|
index + 1,
|
|
3504
3585
|
"."
|
|
3505
3586
|
] }),
|
|
3506
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3507
|
-
/* @__PURE__ */ (0,
|
|
3587
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3588
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3508
3589
|
InputField,
|
|
3509
3590
|
{
|
|
3510
3591
|
value: kpi.name,
|
|
@@ -3514,7 +3595,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3514
3595
|
error: itemErrors[kpi.id]?.name
|
|
3515
3596
|
}
|
|
3516
3597
|
),
|
|
3517
|
-
/* @__PURE__ */ (0,
|
|
3598
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3518
3599
|
InputField,
|
|
3519
3600
|
{
|
|
3520
3601
|
value: kpi.value?.toString(),
|
|
@@ -3539,7 +3620,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3539
3620
|
error: itemErrors[kpi.id]?.value
|
|
3540
3621
|
}
|
|
3541
3622
|
),
|
|
3542
|
-
/* @__PURE__ */ (0,
|
|
3623
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3543
3624
|
InputField,
|
|
3544
3625
|
{
|
|
3545
3626
|
value: kpi.unit,
|
|
@@ -3549,29 +3630,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3549
3630
|
error: itemErrors[kpi.id]?.unit
|
|
3550
3631
|
}
|
|
3551
3632
|
),
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3633
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3553
3634
|
"div",
|
|
3554
3635
|
{
|
|
3555
3636
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3556
3637
|
children: [
|
|
3557
|
-
/* @__PURE__ */ (0,
|
|
3638
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3558
3639
|
import_icons_react11.IconCheck,
|
|
3559
3640
|
{
|
|
3560
3641
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3561
3642
|
onClick: () => handleSave(kpi.id, type)
|
|
3562
3643
|
}
|
|
3563
3644
|
),
|
|
3564
|
-
/* @__PURE__ */ (0,
|
|
3645
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3565
3646
|
]
|
|
3566
3647
|
}
|
|
3567
3648
|
)
|
|
3568
|
-
] }) : /* @__PURE__ */ (0,
|
|
3569
|
-
/* @__PURE__ */ (0,
|
|
3570
|
-
/* @__PURE__ */ (0,
|
|
3571
|
-
/* @__PURE__ */ (0,
|
|
3572
|
-
/* @__PURE__ */ (0,
|
|
3573
|
-
/* @__PURE__ */ (0,
|
|
3574
|
-
/* @__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) })
|
|
3575
3656
|
] })
|
|
3576
3657
|
] })
|
|
3577
3658
|
]
|
|
@@ -3579,9 +3660,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3579
3660
|
kpi.id
|
|
3580
3661
|
)) })
|
|
3581
3662
|
] }),
|
|
3582
|
-
type === "text" && /* @__PURE__ */ (0,
|
|
3583
|
-
/* @__PURE__ */ (0,
|
|
3584
|
-
/* @__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)(
|
|
3585
3666
|
InputField,
|
|
3586
3667
|
{
|
|
3587
3668
|
value: nameKpi,
|
|
@@ -3593,7 +3674,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3593
3674
|
error: errors.nameKpi
|
|
3594
3675
|
}
|
|
3595
3676
|
),
|
|
3596
|
-
/* @__PURE__ */ (0,
|
|
3677
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3597
3678
|
import_icons_react11.IconCirclePlus,
|
|
3598
3679
|
{
|
|
3599
3680
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3602,13 +3683,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3602
3683
|
}
|
|
3603
3684
|
) })
|
|
3604
3685
|
] }),
|
|
3605
|
-
/* @__PURE__ */ (0,
|
|
3606
|
-
/* @__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: [
|
|
3607
3688
|
index + 1,
|
|
3608
3689
|
"."
|
|
3609
3690
|
] }),
|
|
3610
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3611
|
-
/* @__PURE__ */ (0,
|
|
3691
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3612
3693
|
InputField,
|
|
3613
3694
|
{
|
|
3614
3695
|
value: kpi.name,
|
|
@@ -3618,27 +3699,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3618
3699
|
error: itemErrors[kpi.id]?.name
|
|
3619
3700
|
}
|
|
3620
3701
|
),
|
|
3621
|
-
/* @__PURE__ */ (0,
|
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3622
3703
|
"div",
|
|
3623
3704
|
{
|
|
3624
3705
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3625
3706
|
children: [
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
3707
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3627
3708
|
import_icons_react11.IconCheck,
|
|
3628
3709
|
{
|
|
3629
3710
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3630
3711
|
onClick: () => handleSave(kpi.id, type)
|
|
3631
3712
|
}
|
|
3632
3713
|
),
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3714
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3634
3715
|
]
|
|
3635
3716
|
}
|
|
3636
3717
|
)
|
|
3637
|
-
] }) : /* @__PURE__ */ (0,
|
|
3638
|
-
/* @__PURE__ */ (0,
|
|
3639
|
-
/* @__PURE__ */ (0,
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
3641
|
-
/* @__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) })
|
|
3642
3723
|
] })
|
|
3643
3724
|
] })
|
|
3644
3725
|
] }, kpi.id)) })
|
|
@@ -3647,8 +3728,16 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3647
3728
|
}
|
|
3648
3729
|
);
|
|
3649
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
|
+
}
|
|
3650
3738
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3651
3739
|
0 && (module.exports = {
|
|
3740
|
+
AntDModal,
|
|
3652
3741
|
AntDataTable,
|
|
3653
3742
|
Breadcrumbs,
|
|
3654
3743
|
Calendar,
|
|
@@ -3663,6 +3752,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3663
3752
|
GhostButton,
|
|
3664
3753
|
HeadingPage,
|
|
3665
3754
|
InputField,
|
|
3755
|
+
InputFieldNumber,
|
|
3666
3756
|
KpiSection,
|
|
3667
3757
|
Loader,
|
|
3668
3758
|
MenuNavBar,
|
|
@@ -3680,6 +3770,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3680
3770
|
Sidebar,
|
|
3681
3771
|
SortFilter,
|
|
3682
3772
|
Switch,
|
|
3773
|
+
TabSelectionButton,
|
|
3683
3774
|
TextAreaInput,
|
|
3684
3775
|
TextInput,
|
|
3685
3776
|
TimePickerBasic,
|