@esic-lab/data-core-ui 0.0.29 → 0.0.31

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.mjs CHANGED
@@ -324,6 +324,28 @@ var require_th = __commonJS({
324
324
  }
325
325
  });
326
326
 
327
+ // node_modules/dayjs/plugin/buddhistEra.js
328
+ var require_buddhistEra = __commonJS({
329
+ "node_modules/dayjs/plugin/buddhistEra.js"(exports, module) {
330
+ "use strict";
331
+ !(function(t, e) {
332
+ "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_buddhistEra = e();
333
+ })(exports, (function() {
334
+ "use strict";
335
+ return function(t, e) {
336
+ var n = e.prototype, i = n.format;
337
+ n.format = function(t2) {
338
+ var e2 = this, n2 = (t2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g, (function(t3, n3) {
339
+ var i2, o = String(e2.$y + 543), f = "BB" === t3 ? [o.slice(-2), 2] : [o, 4];
340
+ return n3 || (i2 = e2.$utils()).s.apply(i2, f.concat(["0"]));
341
+ }));
342
+ return i.bind(this)(n2);
343
+ };
344
+ };
345
+ }));
346
+ }
347
+ });
348
+
327
349
  // node_modules/dayjs/plugin/customParseFormat.js
328
350
  var require_customParseFormat = __commonJS({
329
351
  "node_modules/dayjs/plugin/customParseFormat.js"(exports, module) {
@@ -517,10 +539,26 @@ function GhostButton({ title, onClick, iconLeft, iconRight, disabled }) {
517
539
  );
518
540
  }
519
541
 
542
+ // src/Button/TabSelectionButton/TabSelectionButton.tsx
543
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
544
+ var TabSelectionButton = ({ title, now, onClickGoto }) => {
545
+ return /* @__PURE__ */ jsxs4("div", { className: "flex subtitle-2", children: [
546
+ title.map((text) => /* @__PURE__ */ jsx4(
547
+ "button",
548
+ {
549
+ onClick: () => onClickGoto(text.path),
550
+ 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"}`,
551
+ children: text.name
552
+ }
553
+ )),
554
+ /* @__PURE__ */ jsx4("div", { className: "border-b-gray-200 border-b-2 w-full" })
555
+ ] });
556
+ };
557
+
520
558
  // src/Loader/Loader/Loader.tsx
521
- import { jsx as jsx4 } from "react/jsx-runtime";
559
+ import { jsx as jsx5 } from "react/jsx-runtime";
522
560
  function Loader({ size = 25, color = "#000000" }) {
523
- return /* @__PURE__ */ jsx4(
561
+ return /* @__PURE__ */ jsx5(
524
562
  "div",
525
563
  {
526
564
  style: {
@@ -538,14 +576,14 @@ function Loader({ size = 25, color = "#000000" }) {
538
576
 
539
577
  // src/Checkbox/Checkbox/Checkbox.tsx
540
578
  import { IconCheck } from "@tabler/icons-react";
541
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
579
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
542
580
  function Checkbox({ label, checked, onChange, disabled }) {
543
581
  const handleClick = () => {
544
582
  if (!disabled) {
545
583
  onChange(!checked);
546
584
  }
547
585
  };
548
- return /* @__PURE__ */ jsxs4(
586
+ return /* @__PURE__ */ jsxs5(
549
587
  "div",
550
588
  {
551
589
  className: `flex gap-[10px] items-center
@@ -553,32 +591,32 @@ function Checkbox({ label, checked, onChange, disabled }) {
553
591
  "aria-disabled": disabled,
554
592
  onClick: handleClick,
555
593
  children: [
556
- /* @__PURE__ */ jsx5(
594
+ /* @__PURE__ */ jsx6(
557
595
  "div",
558
596
  {
559
597
  className: `flex justify-center items-center border-[1px] border-black w-[24px] h-[24px] rounded-[8px] transition-colors duration-100
560
598
  ${checked ? "bg-black text-white" : "bg-white text-black"}
561
599
  ${disabled ? "pointer-events-none" : ""}`,
562
- children: /* @__PURE__ */ jsx5(
600
+ children: /* @__PURE__ */ jsx6(
563
601
  "span",
564
602
  {
565
603
  className: `flex justify-center items-center transition-transform duration-150
566
604
  ${checked ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
567
- children: /* @__PURE__ */ jsx5(IconCheck, { size: 20 })
605
+ children: /* @__PURE__ */ jsx6(IconCheck, { size: 20 })
568
606
  }
569
607
  )
570
608
  }
571
609
  ),
572
- label && /* @__PURE__ */ jsx5("p", { className: "body-1 select-none", children: label })
610
+ label && /* @__PURE__ */ jsx6("p", { className: "body-1 select-none", children: label })
573
611
  ]
574
612
  }
575
613
  );
576
614
  }
577
615
 
578
616
  // src/Checkbox/CheckboxGroup/CheckboxGroup.tsx
579
- import { jsx as jsx6 } from "react/jsx-runtime";
617
+ import { jsx as jsx7 } from "react/jsx-runtime";
580
618
  function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
581
- return /* @__PURE__ */ jsx6("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsx6(
619
+ return /* @__PURE__ */ jsx7("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsx7(
582
620
  Checkbox,
583
621
  {
584
622
  checked: opt.checked,
@@ -591,14 +629,14 @@ function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
591
629
  }
592
630
 
593
631
  // src/Radio/Radio/Radio.tsx
594
- import { jsx as jsx7 } from "react/jsx-runtime";
632
+ import { jsx as jsx8 } from "react/jsx-runtime";
595
633
  function Radio({ selected, onChange, disabled }) {
596
634
  const handleClick = () => {
597
635
  if (!disabled) {
598
636
  onChange(!selected);
599
637
  }
600
638
  };
601
- return /* @__PURE__ */ jsx7(
639
+ return /* @__PURE__ */ jsx8(
602
640
  "div",
603
641
  {
604
642
  className: `
@@ -607,31 +645,31 @@ function Radio({ selected, onChange, disabled }) {
607
645
  `,
608
646
  onClick: handleClick,
609
647
  "aria-disabled": disabled,
610
- children: selected && /* @__PURE__ */ jsx7("div", { className: `bg-black w-[10px] h-[10px] rounded-full transition-all duration-300` })
648
+ children: selected && /* @__PURE__ */ jsx8("div", { className: `bg-black w-[10px] h-[10px] rounded-full transition-all duration-300` })
611
649
  }
612
650
  );
613
651
  }
614
652
 
615
653
  // src/Radio/RadioGroup/RadioGroup.tsx
616
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
654
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
617
655
  function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
618
- return /* @__PURE__ */ jsx8("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsxs5("label", { className: "flex items-center gap-2 cursor-pointer", children: [
619
- /* @__PURE__ */ jsx8(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value), disabled: opt.disabled }),
620
- /* @__PURE__ */ jsx8("span", { className: `body-1 ${opt.disabled ? "text-gray-400 cursor-not-allowed" : ""}`, children: opt.label })
656
+ return /* @__PURE__ */ jsx9("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsxs6("label", { className: "flex items-center gap-2 cursor-pointer", children: [
657
+ /* @__PURE__ */ jsx9(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value), disabled: opt.disabled }),
658
+ /* @__PURE__ */ jsx9("span", { className: `body-1 ${opt.disabled ? "text-gray-400 cursor-not-allowed" : ""}`, children: opt.label })
621
659
  ] }, opt.value)) });
622
660
  }
623
661
 
624
662
  // src/Switch/Switch/Switch.tsx
625
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
663
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
626
664
  function Switch({ label, checked, onChange, disabled }) {
627
665
  const handleClick = () => {
628
666
  if (!disabled) {
629
667
  onChange(!checked);
630
668
  }
631
669
  };
632
- return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[10px]", children: [
633
- label && /* @__PURE__ */ jsx9("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
634
- /* @__PURE__ */ jsx9(
670
+ return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-[10px]", children: [
671
+ label && /* @__PURE__ */ jsx10("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
672
+ /* @__PURE__ */ jsx10(
635
673
  "button",
636
674
  {
637
675
  type: "button",
@@ -643,7 +681,7 @@ function Switch({ label, checked, onChange, disabled }) {
643
681
  ${checked ? "bg-blue-500" : "bg-gray-300"}
644
682
  ${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
645
683
  `,
646
- children: /* @__PURE__ */ jsx9(
684
+ children: /* @__PURE__ */ jsx10(
647
685
  "div",
648
686
  {
649
687
  className: `bg-white w-5 h-5 rounded-full shadow-md transform transition-transform duration-300
@@ -655,23 +693,55 @@ function Switch({ label, checked, onChange, disabled }) {
655
693
  ] });
656
694
  }
657
695
 
696
+ // src/Switch/SwitchSelect/SwitchSelect.tsx
697
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
698
+ function SwitchSelect({
699
+ option,
700
+ onClick,
701
+ value,
702
+ label,
703
+ required,
704
+ color
705
+ }) {
706
+ return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col container-input", children: [
707
+ label && /* @__PURE__ */ jsxs8("p", { className: `body-1`, children: [
708
+ label,
709
+ " ",
710
+ required && /* @__PURE__ */ jsx11("span", { className: "text-red-500", children: "*" })
711
+ ] }),
712
+ /* @__PURE__ */ jsx11("div", { className: "flex", children: option.map((item, index) => /* @__PURE__ */ jsx11(
713
+ "button",
714
+ {
715
+ onClick: () => onClick(item.value),
716
+ className: `
717
+ body-1 border-y-1 border-primary-500 cursor-pointer h-[32px] px-2
718
+ ${item.value === value ? `${color ? `bg-[${color}]` : `bg-primary-500`} text-white` : "bg-white text-primary-500"}
719
+ ${index === 0 ? "border-l-1 rounded-l-lg" : index === option.length - 1 ? "border-r-1 rounded-r-lg" : "border-x-1"}
720
+ `,
721
+ children: item.label
722
+ },
723
+ item.value
724
+ )) })
725
+ ] });
726
+ }
727
+
658
728
  // src/NavBar/MenuNavBar/MenuNavBar.tsx
659
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
729
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
660
730
  function MenuNavBar({ menus, onClick }) {
661
- return /* @__PURE__ */ jsx10("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ jsxs7("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
662
- /* @__PURE__ */ jsx10("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
663
- menu?.subMenus.map((subMenu) => /* @__PURE__ */ jsxs7(
731
+ return /* @__PURE__ */ jsx12("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ jsxs9("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
732
+ /* @__PURE__ */ jsx12("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
733
+ menu?.subMenus.map((subMenu) => /* @__PURE__ */ jsxs9(
664
734
  "div",
665
735
  {
666
736
  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",
667
737
  onClick: () => onClick(subMenu.path),
668
738
  children: [
669
- /* @__PURE__ */ jsxs7("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: [
670
- subMenu.icon && /* @__PURE__ */ jsx10("span", { className: `block ${subMenu.iconActive ? "group-active:hidden" : ""}`, children: subMenu.icon }),
671
- subMenu.iconActive && /* @__PURE__ */ jsx10("span", { className: "hidden group-active:block", children: subMenu.iconActive })
739
+ /* @__PURE__ */ jsxs9("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: [
740
+ subMenu.icon && /* @__PURE__ */ jsx12("span", { className: `block ${subMenu.iconActive ? "group-active:hidden" : ""}`, children: subMenu.icon }),
741
+ subMenu.iconActive && /* @__PURE__ */ jsx12("span", { className: "hidden group-active:block", children: subMenu.iconActive })
672
742
  ] }),
673
743
  subMenu.title,
674
- /* @__PURE__ */ jsx10("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
744
+ /* @__PURE__ */ jsx12("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
675
745
  ]
676
746
  },
677
747
  `sub_${subMenu.title}`
@@ -682,39 +752,39 @@ function MenuNavBar({ menus, onClick }) {
682
752
  // src/NavBar/MenuNavBar/Sidebar.tsx
683
753
  import { IconChevronLeftPipe, IconChevronRightPipe } from "@tabler/icons-react";
684
754
  import { createContext, useContext, useState } from "react";
685
- import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
755
+ import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
686
756
  var SidebarContext = createContext({ expanded: false });
687
757
  function Sidebar({ children, logo }) {
688
758
  const [expanded, setExpanded] = useState(true);
689
- return /* @__PURE__ */ jsx11("aside", { className: "h-screen", children: /* @__PURE__ */ jsxs8("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
690
- /* @__PURE__ */ jsxs8("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
691
- expanded && logo && /* @__PURE__ */ jsx11("img", { src: logo, width: 120, className: "ml-auto" }),
692
- /* @__PURE__ */ jsx11(
759
+ return /* @__PURE__ */ jsx13("aside", { className: "h-screen", children: /* @__PURE__ */ jsxs10("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
760
+ /* @__PURE__ */ jsxs10("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
761
+ expanded && logo && /* @__PURE__ */ jsx13("img", { src: logo, width: 120, className: "ml-auto" }),
762
+ /* @__PURE__ */ jsx13(
693
763
  "button",
694
764
  {
695
765
  className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
696
766
  onClick: () => setExpanded((curr) => !curr),
697
- children: expanded ? /* @__PURE__ */ jsx11(IconChevronLeftPipe, {}) : /* @__PURE__ */ jsx11(IconChevronRightPipe, {})
767
+ children: expanded ? /* @__PURE__ */ jsx13(IconChevronLeftPipe, {}) : /* @__PURE__ */ jsx13(IconChevronRightPipe, {})
698
768
  }
699
769
  )
700
770
  ] }),
701
- /* @__PURE__ */ jsx11(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ jsx11("ul", { className: "flex-1 px-3", children }) })
771
+ /* @__PURE__ */ jsx13(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ jsx13("ul", { className: "flex-1 px-3", children }) })
702
772
  ] }) });
703
773
  }
704
774
 
705
775
  // src/NavBar/TopNavBar/TopNavBar.tsx
706
776
  import { IconBellRinging } from "@tabler/icons-react";
707
- import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
777
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
708
778
  function TopNavBar({ onClickNoti, logo }) {
709
- return /* @__PURE__ */ jsxs9("div", { className: "w-full h-full flex", children: [
710
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
779
+ return /* @__PURE__ */ jsxs11("div", { className: "w-full h-full flex", children: [
780
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
711
781
  logo,
712
- /* @__PURE__ */ jsx12("p", { className: "subtitle-1", children: "Project Management" })
782
+ /* @__PURE__ */ jsx14("p", { className: "subtitle-1", children: "Project Management" })
713
783
  ] }),
714
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
715
- /* @__PURE__ */ jsx12("div", { children: "Search" }),
716
- /* @__PURE__ */ jsx12("div", { children: /* @__PURE__ */ jsx12(IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
717
- /* @__PURE__ */ jsx12("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
784
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
785
+ /* @__PURE__ */ jsx14("div", { children: "Search" }),
786
+ /* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsx14(IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
787
+ /* @__PURE__ */ jsx14("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
718
788
  ] })
719
789
  ] });
720
790
  }
@@ -726,7 +796,7 @@ import { useState as useState2 } from "react";
726
796
  // src/Table/Pagination/Pagination.tsx
727
797
  import { IconArrowLeft, IconArrowRight } from "@tabler/icons-react";
728
798
  import { useMemo } from "react";
729
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
799
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
730
800
  function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
731
801
  const totalPages = Math.ceil(totalItems / itemsPerPage);
732
802
  const getPages = useMemo(() => {
@@ -750,21 +820,21 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
750
820
  return pages;
751
821
  }, [totalPages, currentPage]);
752
822
  if (totalPages <= 1) return null;
753
- return /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
754
- /* @__PURE__ */ jsxs10(
823
+ return /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
824
+ /* @__PURE__ */ jsxs12(
755
825
  "button",
756
826
  {
757
827
  className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
758
828
  disabled: currentPage === 1,
759
829
  onClick: () => onPageChange(currentPage - 1),
760
830
  children: [
761
- /* @__PURE__ */ jsx13(IconArrowLeft, {}),
831
+ /* @__PURE__ */ jsx15(IconArrowLeft, {}),
762
832
  "\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
763
833
  ]
764
834
  }
765
835
  ),
766
836
  getPages.map(
767
- (page, i) => typeof page === "string" ? /* @__PURE__ */ jsx13("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ jsx13(
837
+ (page, i) => typeof page === "string" ? /* @__PURE__ */ jsx15("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ jsx15(
768
838
  "button",
769
839
  {
770
840
  className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
@@ -775,7 +845,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
775
845
  i
776
846
  )
777
847
  ),
778
- /* @__PURE__ */ jsxs10(
848
+ /* @__PURE__ */ jsxs12(
779
849
  "button",
780
850
  {
781
851
  className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
@@ -783,7 +853,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
783
853
  onClick: () => onPageChange(currentPage + 1),
784
854
  children: [
785
855
  "\u0E16\u0E31\u0E14\u0E44\u0E1B",
786
- /* @__PURE__ */ jsx13(IconArrowRight, {})
856
+ /* @__PURE__ */ jsx15(IconArrowRight, {})
787
857
  ]
788
858
  }
789
859
  )
@@ -791,7 +861,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
791
861
  }
792
862
 
793
863
  // src/Table/DataTable/DataTable.tsx
794
- import { Fragment, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
864
+ import { Fragment, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
795
865
  function DataTable({ columns, data, onSort, isLoading }) {
796
866
  const cols = Math.max(1, columns.length);
797
867
  const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
@@ -803,14 +873,14 @@ function DataTable({ columns, data, onSort, isLoading }) {
803
873
  onSort();
804
874
  }
805
875
  };
806
- return /* @__PURE__ */ jsxs11("div", { className: "border rounded-md w-full h-full", children: [
807
- /* @__PURE__ */ jsx14("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
876
+ return /* @__PURE__ */ jsxs13("div", { className: "border rounded-md w-full h-full", children: [
877
+ /* @__PURE__ */ jsx16("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
808
878
  const isActive = sortConfig?.key === col.accessor;
809
879
  const direction = isActive ? sortConfig?.direction : null;
810
- return /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
880
+ return /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
811
881
  col.header,
812
- col.sortable && /* @__PURE__ */ jsxs11(Fragment, { children: [
813
- direction === null && /* @__PURE__ */ jsx14(
882
+ col.sortable && /* @__PURE__ */ jsxs13(Fragment, { children: [
883
+ direction === null && /* @__PURE__ */ jsx16(
814
884
  IconSelector,
815
885
  {
816
886
  size: 15,
@@ -818,7 +888,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
818
888
  onClick: () => onSorting({ key: col.accessor, direction: "asc" })
819
889
  }
820
890
  ),
821
- direction === "asc" && /* @__PURE__ */ jsx14(
891
+ direction === "asc" && /* @__PURE__ */ jsx16(
822
892
  IconSortAscending,
823
893
  {
824
894
  size: 15,
@@ -826,7 +896,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
826
896
  onClick: () => onSorting({ key: col.accessor, direction: "desc" })
827
897
  }
828
898
  ),
829
- direction === "desc" && /* @__PURE__ */ jsx14(
899
+ direction === "desc" && /* @__PURE__ */ jsx16(
830
900
  IconSortDescending,
831
901
  {
832
902
  size: 15,
@@ -837,29 +907,32 @@ function DataTable({ columns, data, onSort, isLoading }) {
837
907
  ] })
838
908
  ] }, i);
839
909
  }) }),
840
- isLoading ? /* @__PURE__ */ jsx14("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ jsx14(Loader, {}) }) : /* @__PURE__ */ jsx14(Fragment, { children: data.map((row, i) => /* @__PURE__ */ jsx14(
910
+ isLoading ? /* @__PURE__ */ jsx16("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ jsx16(Loader, {}) }) : /* @__PURE__ */ jsx16(Fragment, { children: data.map((row, i) => /* @__PURE__ */ jsx16(
841
911
  "div",
842
912
  {
843
913
  className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
844
914
  style: { ["--cols"]: cols },
845
- children: columns.map((col, c) => /* @__PURE__ */ jsx14("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
915
+ children: columns.map((col, c) => /* @__PURE__ */ jsx16("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
846
916
  },
847
917
  i
848
918
  )) }),
849
- /* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsx14(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
919
+ /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
850
920
  ] });
851
921
  }
852
922
 
853
923
  // src/Table/DataTable/AntDataTable.tsx
854
924
  import { ConfigProvider, Table } from "antd";
855
925
  import { useState as useState3 } from "react";
856
- import { Fragment as Fragment2, jsx as jsx15 } from "react/jsx-runtime";
926
+ import { Fragment as Fragment2, jsx as jsx17 } from "react/jsx-runtime";
857
927
  function AntDataTable({
858
928
  dataSource,
859
929
  columns,
860
930
  pageSize = 10,
861
931
  rowCheckbox,
862
932
  onRowSelect,
933
+ // onFilteredDataChange,
934
+ onFilter,
935
+ onChange,
863
936
  width,
864
937
  height,
865
938
  pagination
@@ -872,7 +945,11 @@ function AntDataTable({
872
945
  onRowSelect && onRowSelect(newSelectedRowKeys);
873
946
  }
874
947
  };
875
- return /* @__PURE__ */ jsx15(Fragment2, { children: /* @__PURE__ */ jsx15(
948
+ const handleChange = (paginationArgs, filters, sorter, extra) => {
949
+ onChange?.(paginationArgs, filters, sorter, extra);
950
+ onFilter(filters);
951
+ };
952
+ return /* @__PURE__ */ jsx17(Fragment2, { children: /* @__PURE__ */ jsx17(
876
953
  ConfigProvider,
877
954
  {
878
955
  theme: {
@@ -882,12 +959,13 @@ function AntDataTable({
882
959
  fontSize: 14
883
960
  }
884
961
  },
885
- children: /* @__PURE__ */ jsx15(
962
+ children: /* @__PURE__ */ jsx17(
886
963
  Table,
887
964
  {
888
965
  dataSource,
889
966
  columns,
890
967
  rowSelection: rowCheckbox ? rowSelection : void 0,
968
+ onChange: handleChange,
891
969
  pagination: pagination ? { position: ["bottomCenter"], pageSize } : false,
892
970
  style: { width },
893
971
  scroll: { y: height }
@@ -905,7 +983,7 @@ import timeGridPlugin from "@fullcalendar/timegrid";
905
983
  import interactionPlugin from "@fullcalendar/interaction";
906
984
  import thLocale from "@fullcalendar/core/locales/th";
907
985
  import { IconChevronLeft, IconChevronRight, IconX } from "@tabler/icons-react";
908
- import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
986
+ import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
909
987
  function Calendar({ events }) {
910
988
  const calendarRef = useRef(null);
911
989
  const [monthTitle, setMonthTitle] = useState4("");
@@ -924,11 +1002,11 @@ function Calendar({ events }) {
924
1002
  useEffect(() => {
925
1003
  updateTitle();
926
1004
  }, []);
927
- return /* @__PURE__ */ jsxs12("div", { className: "fc w-full h-full relative z-10", children: [
928
- /* @__PURE__ */ jsxs12("div", { className: "flex mb-[8px]", children: [
929
- /* @__PURE__ */ jsx16("p", { className: "headline-5", children: monthTitle }),
930
- /* @__PURE__ */ jsxs12("div", { className: "flex gap-[10px] ml-auto", children: [
931
- /* @__PURE__ */ jsx16(
1005
+ return /* @__PURE__ */ jsxs14("div", { className: "fc w-full h-full relative z-10", children: [
1006
+ /* @__PURE__ */ jsxs14("div", { className: "flex mb-[8px]", children: [
1007
+ /* @__PURE__ */ jsx18("p", { className: "headline-5", children: monthTitle }),
1008
+ /* @__PURE__ */ jsxs14("div", { className: "flex gap-[10px] ml-auto", children: [
1009
+ /* @__PURE__ */ jsx18(
932
1010
  "p",
933
1011
  {
934
1012
  className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
@@ -939,7 +1017,7 @@ function Calendar({ events }) {
939
1017
  children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
940
1018
  }
941
1019
  ),
942
- /* @__PURE__ */ jsx16(
1020
+ /* @__PURE__ */ jsx18(
943
1021
  "p",
944
1022
  {
945
1023
  className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
@@ -950,7 +1028,7 @@ function Calendar({ events }) {
950
1028
  children: "Month"
951
1029
  }
952
1030
  ),
953
- /* @__PURE__ */ jsx16(
1031
+ /* @__PURE__ */ jsx18(
954
1032
  "p",
955
1033
  {
956
1034
  className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
@@ -961,7 +1039,7 @@ function Calendar({ events }) {
961
1039
  children: "Week"
962
1040
  }
963
1041
  ),
964
- /* @__PURE__ */ jsx16(
1042
+ /* @__PURE__ */ jsx18(
965
1043
  "p",
966
1044
  {
967
1045
  className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
@@ -972,7 +1050,7 @@ function Calendar({ events }) {
972
1050
  children: "Day"
973
1051
  }
974
1052
  ),
975
- /* @__PURE__ */ jsx16(
1053
+ /* @__PURE__ */ jsx18(
976
1054
  "button",
977
1055
  {
978
1056
  className: "cursor-pointer",
@@ -980,10 +1058,10 @@ function Calendar({ events }) {
980
1058
  calendarRef.current?.getApi().prev();
981
1059
  updateTitle();
982
1060
  },
983
- children: /* @__PURE__ */ jsx16(IconChevronLeft, {})
1061
+ children: /* @__PURE__ */ jsx18(IconChevronLeft, {})
984
1062
  }
985
1063
  ),
986
- /* @__PURE__ */ jsx16(
1064
+ /* @__PURE__ */ jsx18(
987
1065
  "button",
988
1066
  {
989
1067
  className: "cursor-pointer",
@@ -991,12 +1069,12 @@ function Calendar({ events }) {
991
1069
  calendarRef.current?.getApi().next();
992
1070
  updateTitle();
993
1071
  },
994
- children: /* @__PURE__ */ jsx16(IconChevronRight, {})
1072
+ children: /* @__PURE__ */ jsx18(IconChevronRight, {})
995
1073
  }
996
1074
  )
997
1075
  ] })
998
1076
  ] }),
999
- /* @__PURE__ */ jsx16("div", { className: "relative z-10", children: /* @__PURE__ */ jsx16(
1077
+ /* @__PURE__ */ jsx18("div", { className: "relative z-10", children: /* @__PURE__ */ jsx18(
1000
1078
  FullCalendar,
1001
1079
  {
1002
1080
  ref: calendarRef,
@@ -1025,28 +1103,28 @@ function Calendar({ events }) {
1025
1103
  });
1026
1104
  },
1027
1105
  eventContent: (arg) => {
1028
- return /* @__PURE__ */ jsx16(Fragment3, { children: /* @__PURE__ */ jsx16("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 }) });
1106
+ return /* @__PURE__ */ jsx18(Fragment3, { children: /* @__PURE__ */ jsx18("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 }) });
1029
1107
  },
1030
1108
  moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
1031
1109
  }
1032
1110
  ) }),
1033
- openPopup && /* @__PURE__ */ jsx16("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ jsx16(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
1111
+ openPopup && /* @__PURE__ */ jsx18("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ jsx18(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
1034
1112
  ] });
1035
1113
  }
1036
1114
  function EventPopUp({ event, onClose }) {
1037
- return /* @__PURE__ */ jsxs12("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
1038
- /* @__PURE__ */ jsx16("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ jsx16(IconX, { className: "w-6 h-6 text-gray-600" }) }),
1039
- /* @__PURE__ */ jsx16("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ jsx16("h2", { className: "text-lg font-semibold", children: event.title }) }),
1040
- /* @__PURE__ */ jsxs12("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
1041
- /* @__PURE__ */ jsxs12("p", { children: [
1042
- /* @__PURE__ */ jsx16("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
1115
+ return /* @__PURE__ */ jsxs14("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
1116
+ /* @__PURE__ */ jsx18("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ jsx18(IconX, { className: "w-6 h-6 text-gray-600" }) }),
1117
+ /* @__PURE__ */ jsx18("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ jsx18("h2", { className: "text-lg font-semibold", children: event.title }) }),
1118
+ /* @__PURE__ */ jsxs14("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
1119
+ /* @__PURE__ */ jsxs14("p", { children: [
1120
+ /* @__PURE__ */ jsx18("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
1043
1121
  event?.start?.toLocaleString?.() || String(event?.start)
1044
1122
  ] }),
1045
- /* @__PURE__ */ jsxs12("p", { children: [
1046
- /* @__PURE__ */ jsx16("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
1123
+ /* @__PURE__ */ jsxs14("p", { children: [
1124
+ /* @__PURE__ */ jsx18("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
1047
1125
  event?.end?.toLocaleString?.() || String(event?.end)
1048
1126
  ] }),
1049
- /* @__PURE__ */ jsx16("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" })
1127
+ /* @__PURE__ */ jsx18("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" })
1050
1128
  ] })
1051
1129
  ] });
1052
1130
  }
@@ -1054,7 +1132,7 @@ function EventPopUp({ event, onClose }) {
1054
1132
  // src/Input/TextInput/TextInput.tsx
1055
1133
  import { IconEye, IconEyeOff } from "@tabler/icons-react";
1056
1134
  import { useState as useState5 } from "react";
1057
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1135
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1058
1136
  function TextInput({
1059
1137
  label,
1060
1138
  placeholder,
@@ -1071,18 +1149,18 @@ function TextInput({
1071
1149
  setShowPassword(!showPassword);
1072
1150
  };
1073
1151
  const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
1074
- return /* @__PURE__ */ jsxs13("div", { children: [
1075
- label && /* @__PURE__ */ jsxs13("p", { className: "body-1 mb-[8px]", children: [
1152
+ return /* @__PURE__ */ jsxs15("div", { children: [
1153
+ label && /* @__PURE__ */ jsxs15("p", { className: "body-1 mb-[8px]", children: [
1076
1154
  label,
1077
- required && /* @__PURE__ */ jsx17("span", { className: "text-red-600", children: "\xA0*" })
1155
+ required && /* @__PURE__ */ jsx19("span", { className: "text-red-500", children: "\xA0*" })
1078
1156
  ] }),
1079
- /* @__PURE__ */ jsxs13(
1157
+ /* @__PURE__ */ jsxs15(
1080
1158
  "div",
1081
1159
  {
1082
1160
  className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
1083
- ${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-600" : ""}`,
1161
+ ${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
1084
1162
  children: [
1085
- /* @__PURE__ */ jsx17(
1163
+ /* @__PURE__ */ jsx19(
1086
1164
  "input",
1087
1165
  {
1088
1166
  className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
@@ -1095,75 +1173,18 @@ function TextInput({
1095
1173
  disabled
1096
1174
  }
1097
1175
  ),
1098
- type === "password" && (showPassword ? /* @__PURE__ */ jsx17(IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ jsx17(IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
1176
+ type === "password" && (showPassword ? /* @__PURE__ */ jsx19(IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ jsx19(IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
1099
1177
  ]
1100
1178
  }
1101
1179
  ),
1102
- error && /* @__PURE__ */ jsx17("p", { className: "text-red-600 body-1", children: error })
1180
+ error && /* @__PURE__ */ jsx19("p", { className: "text-red-500 body-1", children: error })
1103
1181
  ] });
1104
1182
  }
1105
1183
 
1106
- // src/InputField/InputField.tsx
1107
- import { ConfigProvider as ConfigProvider2, Input } from "antd";
1108
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1109
- function InputField({
1110
- value,
1111
- onChange,
1112
- placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
1113
- title,
1114
- required,
1115
- bottomText,
1116
- disabled,
1117
- error,
1118
- addonBefore,
1119
- addonAfter,
1120
- defaultValue,
1121
- className,
1122
- onClear
1123
- }) {
1124
- return /* @__PURE__ */ jsx18(
1125
- ConfigProvider2,
1126
- {
1127
- theme: {
1128
- token: {
1129
- fontFamily: "Kanit"
1130
- }
1131
- },
1132
- children: /* @__PURE__ */ jsxs14("div", { className: "container-input", children: [
1133
- /* @__PURE__ */ jsxs14("div", { children: [
1134
- /* @__PURE__ */ jsx18("span", { className: "body-1", children: title }),
1135
- " ",
1136
- required && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
1137
- ] }),
1138
- /* @__PURE__ */ jsx18(
1139
- Input,
1140
- {
1141
- value,
1142
- placeholder,
1143
- disabled,
1144
- className: `body-1 w-full ${className ?? ""}`,
1145
- onChange: (e) => onChange(e.target.value || void 0),
1146
- allowClear: true,
1147
- addonBefore,
1148
- addonAfter,
1149
- defaultValue,
1150
- onClear
1151
- }
1152
- ),
1153
- /* @__PURE__ */ jsxs14("div", { children: [
1154
- /* @__PURE__ */ jsx18("p", { className: "caption-1 text-gray-500", children: bottomText }),
1155
- " ",
1156
- error && /* @__PURE__ */ jsx18("p", { className: "caption-1 text-red-500 ", children: error })
1157
- ] })
1158
- ] })
1159
- }
1160
- );
1161
- }
1162
-
1163
1184
  // src/Input/TextArea/TextArea.tsx
1164
- import { ConfigProvider as ConfigProvider3, Input as Input2 } from "antd";
1165
- import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1166
- var { TextArea } = Input2;
1185
+ import { ConfigProvider as ConfigProvider2, Input } from "antd";
1186
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
1187
+ var { TextArea } = Input;
1167
1188
  function TextAreaInput({
1168
1189
  label,
1169
1190
  height = 4,
@@ -1177,8 +1198,8 @@ function TextAreaInput({
1177
1198
  error,
1178
1199
  disabled
1179
1200
  }) {
1180
- return /* @__PURE__ */ jsx19(Fragment4, { children: /* @__PURE__ */ jsx19(
1181
- ConfigProvider3,
1201
+ return /* @__PURE__ */ jsx20(Fragment4, { children: /* @__PURE__ */ jsx20(
1202
+ ConfigProvider2,
1182
1203
  {
1183
1204
  theme: {
1184
1205
  components: {},
@@ -1187,13 +1208,13 @@ function TextAreaInput({
1187
1208
  fontSize: 16
1188
1209
  }
1189
1210
  },
1190
- children: /* @__PURE__ */ jsxs15("div", { children: [
1191
- label && /* @__PURE__ */ jsxs15("p", { className: "body-1 mb-[8px]", children: [
1211
+ children: /* @__PURE__ */ jsxs16("div", { children: [
1212
+ label && /* @__PURE__ */ jsxs16("p", { className: "body-1 mb-[8px]", children: [
1192
1213
  label,
1193
1214
  " ",
1194
- required && /* @__PURE__ */ jsx19("span", { className: "text-red-500", children: "\xA0*" })
1215
+ required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "\xA0*" })
1195
1216
  ] }),
1196
- /* @__PURE__ */ jsx19(
1217
+ /* @__PURE__ */ jsx20(
1197
1218
  TextArea,
1198
1219
  {
1199
1220
  value,
@@ -1209,71 +1230,126 @@ function TextAreaInput({
1209
1230
  disabled
1210
1231
  }
1211
1232
  ),
1212
- error && /* @__PURE__ */ jsx19("p", { className: "text-red-600 body-1", children: error })
1233
+ error && /* @__PURE__ */ jsx20("p", { className: "text-red-500 body-1", children: error })
1213
1234
  ] })
1214
1235
  }
1215
1236
  ) });
1216
1237
  }
1217
1238
 
1218
- // src/ColorPicker/ColorPicker.tsx
1219
- import { ConfigProvider as ConfigProvider4, ColorPicker } from "antd";
1220
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
1221
- function ColorPickerBasic({
1239
+ // src/Input/InputField/InputField.tsx
1240
+ import { ConfigProvider as ConfigProvider3, Input as Input2, Space } from "antd";
1241
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
1242
+ function InputField({
1222
1243
  value,
1223
1244
  onChange,
1245
+ placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
1246
+ label,
1224
1247
  required,
1225
- title,
1226
- bottomText,
1248
+ disabled,
1227
1249
  error,
1250
+ addonBefore,
1251
+ addonAfter,
1252
+ defaultValue,
1253
+ className,
1254
+ onClear,
1255
+ statickey
1256
+ }) {
1257
+ return /* @__PURE__ */ jsx21(
1258
+ ConfigProvider3,
1259
+ {
1260
+ theme: {
1261
+ token: {
1262
+ fontFamily: "Kanit"
1263
+ }
1264
+ },
1265
+ children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
1266
+ /* @__PURE__ */ jsxs17("div", { children: [
1267
+ /* @__PURE__ */ jsx21("span", { className: "body-1", children: label }),
1268
+ " ",
1269
+ required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
1270
+ ] }),
1271
+ /* @__PURE__ */ jsxs17(Space.Compact, { children: [
1272
+ statickey && /* @__PURE__ */ jsx21("span", { className: "items-center flex px-2 bg-gray-300 rounded-l-md body-1", children: statickey }),
1273
+ /* @__PURE__ */ jsx21(
1274
+ Input2,
1275
+ {
1276
+ value,
1277
+ placeholder,
1278
+ disabled,
1279
+ className: `body-1 w-full ${className ?? ""}`,
1280
+ onChange: (e) => onChange(e.target.value || void 0),
1281
+ allowClear: true,
1282
+ addonBefore,
1283
+ addonAfter,
1284
+ defaultValue,
1285
+ onClear
1286
+ }
1287
+ )
1288
+ ] }),
1289
+ error && /* @__PURE__ */ jsx21("p", { className: "text-red-500 caption-1", children: error })
1290
+ ] })
1291
+ }
1292
+ );
1293
+ }
1294
+
1295
+ // src/Input/InputFieldNumber/InputFieldNumber.tsx
1296
+ import { ConfigProvider as ConfigProvider4, InputNumber } from "antd";
1297
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
1298
+ function InputFieldNumber({
1299
+ value,
1300
+ onChange,
1301
+ placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
1302
+ label,
1303
+ required,
1228
1304
  disabled,
1229
- allowClear,
1230
- defaultFormat,
1305
+ error,
1306
+ addonBefore,
1307
+ addonAfter,
1308
+ defaultValue,
1231
1309
  className,
1232
- placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
1310
+ max,
1311
+ min,
1312
+ controls,
1313
+ size,
1314
+ changeOnWheel,
1315
+ formatter,
1316
+ parser
1233
1317
  }) {
1234
- return /* @__PURE__ */ jsx20(
1318
+ return /* @__PURE__ */ jsx22(
1235
1319
  ConfigProvider4,
1236
1320
  {
1237
1321
  theme: {
1238
1322
  token: {
1239
- fontFamily: "Kanit",
1240
- fontSize: 16
1323
+ fontFamily: "Kanit"
1241
1324
  }
1242
1325
  },
1243
- children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
1244
- /* @__PURE__ */ jsxs16("div", { children: [
1245
- /* @__PURE__ */ jsx20("span", { className: "body-1", children: title }),
1326
+ children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
1327
+ /* @__PURE__ */ jsxs18("div", { children: [
1328
+ /* @__PURE__ */ jsx22("span", { className: "body-1", children: label }),
1246
1329
  " ",
1247
- required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
1330
+ required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
1248
1331
  ] }),
1249
- /* @__PURE__ */ jsx20(
1250
- ColorPicker,
1332
+ /* @__PURE__ */ jsx22(
1333
+ InputNumber,
1251
1334
  {
1252
- defaultFormat,
1253
- className: `body-1 w-full ${className ?? ""}`,
1254
- value,
1255
- defaultValue: "#ffff",
1256
- onChange,
1257
- allowClear,
1258
- showText: (color) => {
1259
- const hex = color.toHexString();
1260
- if (!value) {
1261
- return /* @__PURE__ */ jsx20("span", { children: placeholder });
1262
- }
1263
- return /* @__PURE__ */ jsxs16("span", { children: [
1264
- "(",
1265
- hex,
1266
- ")"
1267
- ] });
1268
- },
1269
- disabled
1335
+ value: value ?? void 0,
1336
+ onChange: (val) => onChange(val),
1337
+ placeholder,
1338
+ disabled,
1339
+ className: `body-1 !w-full ${className ?? ""}`,
1340
+ addonBefore,
1341
+ addonAfter,
1342
+ defaultValue,
1343
+ max,
1344
+ min,
1345
+ controls,
1346
+ size,
1347
+ changeOnWheel,
1348
+ formatter,
1349
+ parser
1270
1350
  }
1271
1351
  ),
1272
- /* @__PURE__ */ jsxs16("div", { children: [
1273
- /* @__PURE__ */ jsx20("p", { className: "caption-1 text-gray-500", children: bottomText }),
1274
- " ",
1275
- error && /* @__PURE__ */ jsx20("p", { className: "caption-1 text-red-500 ", children: error })
1276
- ] })
1352
+ error && /* @__PURE__ */ jsx22("p", { className: "text-red-500 caption-1", children: error })
1277
1353
  ] })
1278
1354
  }
1279
1355
  );
@@ -1282,15 +1358,19 @@ function ColorPickerBasic({
1282
1358
  // src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
1283
1359
  var import_dayjs = __toESM(require_dayjs_min());
1284
1360
  var import_th2 = __toESM(require_th());
1361
+ var import_buddhistEra = __toESM(require_buddhistEra());
1285
1362
  import { ConfigProvider as ConfigProvider5, DatePicker } from "antd";
1363
+ import th from "antd/es/date-picker/locale/th_TH";
1286
1364
  import thTH from "antd/locale/th_TH";
1287
- import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
1365
+ import { th as thFns } from "date-fns/locale";
1366
+ import { format } from "date-fns";
1367
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
1368
+ import_dayjs.default.extend(import_buddhistEra.default);
1288
1369
  function DatePickerBasic({
1289
1370
  value,
1290
1371
  onChange,
1291
1372
  required,
1292
- title,
1293
- bottomText,
1373
+ label,
1294
1374
  error,
1295
1375
  placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
1296
1376
  disabled,
@@ -1303,7 +1383,17 @@ function DatePickerBasic({
1303
1383
  }) {
1304
1384
  const dateFormat = "DD/MM/YYYY";
1305
1385
  import_dayjs.default.locale("th_TH");
1306
- return /* @__PURE__ */ jsx21(
1386
+ const buddhistLocale = {
1387
+ ...th,
1388
+ lang: {
1389
+ ...th.lang,
1390
+ fieldDateFormat: "BBBB-MM-DD",
1391
+ fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
1392
+ yearFormat: "BBBB",
1393
+ cellYearFormat: "BBBB"
1394
+ }
1395
+ };
1396
+ return /* @__PURE__ */ jsx23(
1307
1397
  ConfigProvider5,
1308
1398
  {
1309
1399
  locale: thTH,
@@ -1313,13 +1403,13 @@ function DatePickerBasic({
1313
1403
  fontSize: 16
1314
1404
  }
1315
1405
  },
1316
- children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
1317
- /* @__PURE__ */ jsxs17("div", { children: [
1318
- /* @__PURE__ */ jsx21("span", { className: "body-1", children: title }),
1406
+ children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
1407
+ /* @__PURE__ */ jsxs19("div", { children: [
1408
+ /* @__PURE__ */ jsx23("span", { className: "body-1", children: label }),
1319
1409
  " ",
1320
- required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
1410
+ required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
1321
1411
  ] }),
1322
- /* @__PURE__ */ jsx21(
1412
+ /* @__PURE__ */ jsx23(
1323
1413
  DatePicker,
1324
1414
  {
1325
1415
  className: `body-1 w-full ${className ?? ""}`,
@@ -1328,19 +1418,19 @@ function DatePickerBasic({
1328
1418
  onChange,
1329
1419
  allowClear: true,
1330
1420
  disabled,
1331
- format: dateFormat,
1421
+ format: (date) => date ? format(date.toDate(), "dd/MM/yyyy", { locale: thFns }).replace(
1422
+ /\d{4}$/,
1423
+ (y) => String(parseInt(y) + 543)
1424
+ ) : "",
1332
1425
  defaultValue,
1333
- minDate,
1334
- maxDate,
1335
- disabledDate,
1336
- size
1426
+ disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
1427
+ minDate: minDate ? (0, import_dayjs.default)(minDate) : void 0,
1428
+ maxDate: maxDate ? (0, import_dayjs.default)(maxDate) : void 0,
1429
+ size,
1430
+ locale: buddhistLocale
1337
1431
  }
1338
1432
  ),
1339
- /* @__PURE__ */ jsxs17("div", { children: [
1340
- /* @__PURE__ */ jsx21("p", { className: "caption-1 text-gray-500", children: bottomText }),
1341
- " ",
1342
- error && /* @__PURE__ */ jsx21("p", { className: "caption-1 text-red-500 ", children: error })
1343
- ] })
1433
+ error && /* @__PURE__ */ jsx23("p", { className: "text-red-500 caption-1", children: error })
1344
1434
  ] })
1345
1435
  }
1346
1436
  );
@@ -1352,15 +1442,17 @@ var import_customParseFormat = __toESM(require_customParseFormat());
1352
1442
  var import_dayjs2 = __toESM(require_dayjs_min());
1353
1443
  import { ConfigProvider as ConfigProvider6, DatePicker as DatePicker2 } from "antd";
1354
1444
  import thTH2 from "antd/locale/th_TH";
1355
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
1445
+ import th2 from "antd/es/date-picker/locale/th_TH";
1446
+ import { format as format2 } from "date-fns";
1447
+ import { th as thFns2 } from "date-fns/locale";
1448
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
1356
1449
  import_dayjs2.default.extend(import_customParseFormat.default);
1357
1450
  function DatePickerRangePicker({
1358
1451
  value,
1359
1452
  onChange,
1360
1453
  placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
1361
- title,
1454
+ label,
1362
1455
  required,
1363
- bottomText,
1364
1456
  error,
1365
1457
  disabled,
1366
1458
  minDate,
@@ -1373,7 +1465,17 @@ function DatePickerRangePicker({
1373
1465
  }) {
1374
1466
  const dateFormat = "DD/MM/YYYY";
1375
1467
  import_dayjs2.default.locale("th_TH");
1376
- return /* @__PURE__ */ jsx22(
1468
+ const buddhistLocale = {
1469
+ ...th2,
1470
+ lang: {
1471
+ ...th2.lang,
1472
+ fieldDateFormat: "BBBB-MM-DD",
1473
+ fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
1474
+ yearFormat: "BBBB",
1475
+ cellYearFormat: "BBBB"
1476
+ }
1477
+ };
1478
+ return /* @__PURE__ */ jsx24(
1377
1479
  ConfigProvider6,
1378
1480
  {
1379
1481
  locale: thTH2,
@@ -1383,142 +1485,222 @@ function DatePickerRangePicker({
1383
1485
  fontSize: 16
1384
1486
  }
1385
1487
  },
1386
- children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
1387
- /* @__PURE__ */ jsxs18("div", { children: [
1388
- /* @__PURE__ */ jsx22("span", { className: "body-1", children: title }),
1488
+ children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
1489
+ /* @__PURE__ */ jsxs20("div", { children: [
1490
+ /* @__PURE__ */ jsx24("span", { className: "body-1", children: label }),
1389
1491
  " ",
1390
- required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
1492
+ required && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
1391
1493
  ] }),
1392
- /* @__PURE__ */ jsx22(
1494
+ /* @__PURE__ */ jsx24(
1393
1495
  DatePicker2.RangePicker,
1394
1496
  {
1395
- format: dateFormat,
1396
- value,
1497
+ format: (date) => date ? format2(date.toDate(), "dd/MM/yyyy", { locale: thFns2 }).replace(
1498
+ /\d{4}$/,
1499
+ (y) => String(parseInt(y) + 543)
1500
+ ) : "",
1501
+ value: value ? [value[0] ? (0, import_dayjs2.default)(value[0]) : null, value[1] ? (0, import_dayjs2.default)(value[1]) : null] : null,
1397
1502
  placeholder,
1398
1503
  className: `body-1 w-full ${className ?? ""}`,
1399
- onChange,
1504
+ onChange: (dates, dateStrings) => {
1505
+ if (!dates) {
1506
+ onChange(null);
1507
+ } else {
1508
+ onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
1509
+ }
1510
+ },
1400
1511
  allowClear: true,
1401
1512
  disabled,
1402
- minDate,
1403
- maxDate,
1404
- disabledDate,
1513
+ minDate: minDate ? (0, import_dayjs2.default)(minDate) : void 0,
1514
+ maxDate: maxDate ? (0, import_dayjs2.default)(maxDate) : void 0,
1515
+ disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
1405
1516
  size,
1406
1517
  onOpenChange,
1407
- onCalendarChange
1518
+ onCalendarChange: (dates, dateStrings, info) => {
1519
+ if (!dates) {
1520
+ onCalendarChange?.([null, null], dateStrings, info);
1521
+ } else {
1522
+ onCalendarChange?.(
1523
+ [dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null],
1524
+ dateStrings,
1525
+ info
1526
+ );
1527
+ }
1528
+ },
1529
+ locale: buddhistLocale
1408
1530
  }
1409
1531
  ),
1410
- /* @__PURE__ */ jsxs18("div", { children: [
1411
- /* @__PURE__ */ jsx22("p", { className: "caption-1 text-gray-500", children: bottomText }),
1412
- " ",
1413
- error && /* @__PURE__ */ jsx22("p", { className: "caption-1 text-red-500 ", children: error })
1414
- ] })
1532
+ error && /* @__PURE__ */ jsx24("p", { className: "text-red-500 caption-1", children: error })
1415
1533
  ] })
1416
1534
  }
1417
1535
  );
1418
1536
  }
1419
1537
 
1420
1538
  // src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
1539
+ var import_dayjs3 = __toESM(require_dayjs_min());
1421
1540
  import { ConfigProvider as ConfigProvider7, TimePicker } from "antd";
1422
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
1541
+ import thTH3 from "antd/locale/th_TH";
1542
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
1423
1543
  function TimePickerBasic({
1424
1544
  value,
1425
1545
  onChange,
1426
1546
  required,
1427
- title,
1428
- bottomText,
1547
+ label,
1429
1548
  error,
1430
1549
  placeholder,
1431
1550
  disabled,
1432
1551
  className
1433
1552
  }) {
1434
- return /* @__PURE__ */ jsx23(
1553
+ return /* @__PURE__ */ jsx25(
1435
1554
  ConfigProvider7,
1436
1555
  {
1556
+ locale: thTH3,
1437
1557
  theme: {
1438
1558
  token: {
1439
1559
  fontFamily: "Kanit"
1440
1560
  }
1441
1561
  },
1442
- children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
1443
- /* @__PURE__ */ jsxs19("div", { children: [
1444
- /* @__PURE__ */ jsx23("span", { className: "body-1", children: title }),
1562
+ children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
1563
+ /* @__PURE__ */ jsxs21("div", { children: [
1564
+ /* @__PURE__ */ jsx25("span", { className: "body-1", children: label }),
1445
1565
  " ",
1446
- required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
1566
+ required && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
1447
1567
  ] }),
1448
- /* @__PURE__ */ jsx23(
1568
+ /* @__PURE__ */ jsx25(
1449
1569
  TimePicker,
1450
1570
  {
1451
1571
  format: "HH:mm",
1452
1572
  className: `body-1 w-full ${className ?? ""}`,
1453
- value,
1573
+ value: value ? (0, import_dayjs3.default)(value) : null,
1454
1574
  placeholder,
1455
- onChange,
1575
+ onChange: (time) => {
1576
+ onChange(time ? time.toDate() : null);
1577
+ },
1456
1578
  allowClear: true,
1457
1579
  disabled
1458
1580
  }
1459
1581
  ),
1460
- /* @__PURE__ */ jsxs19("div", { children: [
1461
- /* @__PURE__ */ jsx23("p", { className: "caption-1 text-gray-500", children: bottomText }),
1462
- " ",
1463
- error && /* @__PURE__ */ jsx23("p", { className: "caption-1 text-red-500 ", children: error })
1464
- ] })
1582
+ error && /* @__PURE__ */ jsx25("p", { className: "text-red-500 caption-1", children: error })
1583
+ ] })
1584
+ }
1585
+ );
1586
+ }
1587
+
1588
+ // src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
1589
+ var import_dayjs4 = __toESM(require_dayjs_min());
1590
+ import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
1591
+ import thTH4 from "antd/locale/th_TH";
1592
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
1593
+ function TimePickerRangePicker({
1594
+ value,
1595
+ onChange,
1596
+ placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
1597
+ label,
1598
+ required,
1599
+ error,
1600
+ disabled,
1601
+ className
1602
+ }) {
1603
+ return /* @__PURE__ */ jsx26(
1604
+ ConfigProvider8,
1605
+ {
1606
+ locale: thTH4,
1607
+ theme: {
1608
+ token: {
1609
+ fontFamily: "Kanit"
1610
+ }
1611
+ },
1612
+ children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
1613
+ /* @__PURE__ */ jsxs22("div", { children: [
1614
+ /* @__PURE__ */ jsx26("span", { className: "body-1", children: label }),
1615
+ " ",
1616
+ required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
1617
+ ] }),
1618
+ /* @__PURE__ */ jsx26(
1619
+ TimePicker2.RangePicker,
1620
+ {
1621
+ format: "HH:mm",
1622
+ value: value ? [value[0] ? (0, import_dayjs4.default)(value[0]) : null, value[1] ? (0, import_dayjs4.default)(value[1]) : null] : null,
1623
+ placeholder,
1624
+ className: `body-1 w-full ${className ?? ""}`,
1625
+ onChange: (dates, dateStrings) => {
1626
+ if (!dates) {
1627
+ onChange(null);
1628
+ } else {
1629
+ onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
1630
+ }
1631
+ },
1632
+ allowClear: true,
1633
+ disabled,
1634
+ showNow: true
1635
+ }
1636
+ ),
1637
+ error && /* @__PURE__ */ jsx26("p", { className: "text-red-500 caption-1", children: error })
1465
1638
  ] })
1466
1639
  }
1467
1640
  );
1468
1641
  }
1469
1642
 
1470
- // src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
1471
- import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
1472
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
1473
- function TimePickerRangePicker({
1643
+ // src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
1644
+ import { ConfigProvider as ConfigProvider9, ColorPicker } from "antd";
1645
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
1646
+ function ColorPickerBasic({
1474
1647
  value,
1475
1648
  onChange,
1476
- placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
1477
- title,
1478
1649
  required,
1479
- bottomText,
1650
+ label,
1480
1651
  error,
1481
1652
  disabled,
1482
- className
1653
+ allowClear,
1654
+ defaultFormat,
1655
+ className,
1656
+ placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
1483
1657
  }) {
1484
- return /* @__PURE__ */ jsx24(
1485
- ConfigProvider8,
1658
+ return /* @__PURE__ */ jsx27(
1659
+ ConfigProvider9,
1486
1660
  {
1487
1661
  theme: {
1488
1662
  token: {
1489
- fontFamily: "Kanit"
1663
+ fontFamily: "Kanit",
1664
+ fontSize: 16
1490
1665
  }
1491
1666
  },
1492
- children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
1493
- /* @__PURE__ */ jsxs20("div", { children: [
1494
- /* @__PURE__ */ jsx24("span", { className: "body-1", children: title }),
1667
+ children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
1668
+ /* @__PURE__ */ jsxs23("div", { children: [
1669
+ /* @__PURE__ */ jsx27("span", { className: "body-1", children: label }),
1495
1670
  " ",
1496
- required && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
1671
+ required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
1497
1672
  ] }),
1498
- /* @__PURE__ */ jsx24(
1499
- TimePicker2.RangePicker,
1673
+ /* @__PURE__ */ jsx27(
1674
+ ColorPicker,
1500
1675
  {
1501
- format: "HH:mm",
1502
- value,
1503
- placeholder,
1676
+ defaultFormat,
1504
1677
  className: `body-1 w-full ${className ?? ""}`,
1678
+ value,
1679
+ defaultValue: "#ffff",
1505
1680
  onChange,
1506
- allowClear: true,
1681
+ allowClear,
1682
+ showText: (color) => {
1683
+ const hex = color.toHexString();
1684
+ if (!value) {
1685
+ return /* @__PURE__ */ jsx27("span", { children: placeholder });
1686
+ }
1687
+ return /* @__PURE__ */ jsxs23("span", { children: [
1688
+ "(",
1689
+ hex,
1690
+ ")"
1691
+ ] });
1692
+ },
1507
1693
  disabled
1508
1694
  }
1509
1695
  ),
1510
- /* @__PURE__ */ jsxs20("div", { children: [
1511
- /* @__PURE__ */ jsx24("p", { className: "caption-1 text-gray-500", children: bottomText }),
1512
- " ",
1513
- error && /* @__PURE__ */ jsx24("p", { className: "caption-1 text-red-500 ", children: error })
1514
- ] })
1696
+ error && /* @__PURE__ */ jsx27("p", { className: "text-red-500 caption-1", children: error })
1515
1697
  ] })
1516
1698
  }
1517
1699
  );
1518
1700
  }
1519
1701
 
1520
- // src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
1521
- import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
1702
+ // src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
1703
+ import { ConfigProvider as ConfigProvider10, ColorPicker as ColorPicker2, theme } from "antd";
1522
1704
 
1523
1705
  // node_modules/@babel/runtime/helpers/esm/typeof.js
1524
1706
  function _typeof(o) {
@@ -2219,8 +2401,8 @@ magentaDark.primary = magentaDark[5];
2219
2401
  var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
2220
2402
  greyDark.primary = greyDark[5];
2221
2403
 
2222
- // src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
2223
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2404
+ // src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
2405
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
2224
2406
  function genPresets(presets = presetPalettes) {
2225
2407
  return Object.entries(presets).map(([label, colors]) => ({
2226
2408
  label,
@@ -2232,8 +2414,7 @@ function ColorPalettePickerBasic({
2232
2414
  value,
2233
2415
  onChange,
2234
2416
  required,
2235
- title,
2236
- bottomText,
2417
+ label,
2237
2418
  error,
2238
2419
  disabled,
2239
2420
  allowClear,
@@ -2248,8 +2429,8 @@ function ColorPalettePickerBasic({
2248
2429
  red,
2249
2430
  green
2250
2431
  });
2251
- return /* @__PURE__ */ jsx25(
2252
- ConfigProvider9,
2432
+ return /* @__PURE__ */ jsx28(
2433
+ ConfigProvider10,
2253
2434
  {
2254
2435
  theme: {
2255
2436
  token: {
@@ -2257,13 +2438,13 @@ function ColorPalettePickerBasic({
2257
2438
  fontSize: 16
2258
2439
  }
2259
2440
  },
2260
- children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
2261
- /* @__PURE__ */ jsxs21("div", { children: [
2262
- /* @__PURE__ */ jsx25("span", { className: "body-1", children: title }),
2441
+ children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
2442
+ /* @__PURE__ */ jsxs24("div", { children: [
2443
+ /* @__PURE__ */ jsx28("span", { className: "body-1", children: label }),
2263
2444
  " ",
2264
- required && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
2445
+ required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
2265
2446
  ] }),
2266
- /* @__PURE__ */ jsx25(
2447
+ /* @__PURE__ */ jsx28(
2267
2448
  ColorPicker2,
2268
2449
  {
2269
2450
  defaultFormat,
@@ -2276,9 +2457,9 @@ function ColorPalettePickerBasic({
2276
2457
  showText: (color) => {
2277
2458
  const hex = color.toHexString();
2278
2459
  if (!value) {
2279
- return /* @__PURE__ */ jsx25("span", { children: placeholder });
2460
+ return /* @__PURE__ */ jsx28("span", { children: placeholder });
2280
2461
  }
2281
- return /* @__PURE__ */ jsxs21("span", { children: [
2462
+ return /* @__PURE__ */ jsxs24("span", { children: [
2282
2463
  "(",
2283
2464
  hex,
2284
2465
  ")"
@@ -2288,26 +2469,21 @@ function ColorPalettePickerBasic({
2288
2469
  onClear
2289
2470
  }
2290
2471
  ),
2291
- /* @__PURE__ */ jsxs21("div", { children: [
2292
- /* @__PURE__ */ jsx25("p", { className: "caption-1 text-gray-500", children: bottomText }),
2293
- " ",
2294
- error && /* @__PURE__ */ jsx25("p", { className: "caption-1 text-red-500 ", children: error })
2295
- ] })
2472
+ error && /* @__PURE__ */ jsx28("p", { className: "text-red-500 caption-1", children: error })
2296
2473
  ] })
2297
2474
  }
2298
2475
  );
2299
2476
  }
2300
2477
 
2301
2478
  // src/Select/SelectField/SelectField.tsx
2302
- import { Select, ConfigProvider as ConfigProvider10 } from "antd";
2303
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
2479
+ import { Select, ConfigProvider as ConfigProvider11 } from "antd";
2480
+ import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
2304
2481
  function SelectField({
2305
2482
  value,
2306
2483
  onChange,
2307
2484
  placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
2308
- title,
2485
+ label,
2309
2486
  required,
2310
- bottomText,
2311
2487
  error,
2312
2488
  disabled,
2313
2489
  defaultValue,
@@ -2319,8 +2495,8 @@ function SelectField({
2319
2495
  className,
2320
2496
  onClear
2321
2497
  }) {
2322
- return /* @__PURE__ */ jsx26(
2323
- ConfigProvider10,
2498
+ return /* @__PURE__ */ jsx29(
2499
+ ConfigProvider11,
2324
2500
  {
2325
2501
  theme: {
2326
2502
  token: {
@@ -2328,13 +2504,13 @@ function SelectField({
2328
2504
  fontSize: 16
2329
2505
  }
2330
2506
  },
2331
- children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
2332
- /* @__PURE__ */ jsxs22("div", { children: [
2333
- /* @__PURE__ */ jsx26("span", { className: "body-1", children: title }),
2507
+ children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
2508
+ /* @__PURE__ */ jsxs25("div", { children: [
2509
+ /* @__PURE__ */ jsx29("span", { className: "body-1", children: label }),
2334
2510
  " ",
2335
- required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
2511
+ required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
2336
2512
  ] }),
2337
- /* @__PURE__ */ jsx26(
2513
+ /* @__PURE__ */ jsx29(
2338
2514
  Select,
2339
2515
  {
2340
2516
  showSearch: true,
@@ -2349,7 +2525,7 @@ function SelectField({
2349
2525
  options,
2350
2526
  mode,
2351
2527
  onSearch: handleSearch,
2352
- prefix: prefix ? /* @__PURE__ */ jsx26(
2528
+ prefix: prefix ? /* @__PURE__ */ jsx29(
2353
2529
  "span",
2354
2530
  {
2355
2531
  style: {
@@ -2366,26 +2542,21 @@ function SelectField({
2366
2542
  onClear
2367
2543
  }
2368
2544
  ),
2369
- /* @__PURE__ */ jsxs22("div", { children: [
2370
- /* @__PURE__ */ jsx26("p", { className: "caption-1 text-gray-500", children: bottomText }),
2371
- " ",
2372
- error && /* @__PURE__ */ jsx26("p", { className: "caption-1 text-red-500 ", children: error })
2373
- ] })
2545
+ error && /* @__PURE__ */ jsx29("p", { className: "text-red-500 caption-1", children: error })
2374
2546
  ] })
2375
2547
  }
2376
2548
  );
2377
2549
  }
2378
2550
 
2379
2551
  // src/Select/SelectFieldGroup/SelectFieldGroup.tsx
2380
- import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
2381
- import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2552
+ import { Select as Select2, ConfigProvider as ConfigProvider12 } from "antd";
2553
+ import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
2382
2554
  function SelectFieldGroup({
2383
2555
  value,
2384
2556
  onChange,
2385
2557
  placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
2386
- title,
2558
+ label,
2387
2559
  required,
2388
- bottomText,
2389
2560
  error,
2390
2561
  disabled,
2391
2562
  defaultValue,
@@ -2396,21 +2567,21 @@ function SelectFieldGroup({
2396
2567
  handleSearch,
2397
2568
  className
2398
2569
  }) {
2399
- return /* @__PURE__ */ jsx27(
2400
- ConfigProvider11,
2570
+ return /* @__PURE__ */ jsx30(
2571
+ ConfigProvider12,
2401
2572
  {
2402
2573
  theme: {
2403
2574
  token: {
2404
2575
  fontFamily: "Kanit"
2405
2576
  }
2406
2577
  },
2407
- children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
2408
- /* @__PURE__ */ jsxs23("div", { children: [
2409
- /* @__PURE__ */ jsx27("span", { className: "body-1", children: title }),
2578
+ children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
2579
+ /* @__PURE__ */ jsxs26("div", { children: [
2580
+ /* @__PURE__ */ jsx30("span", { className: "body-1", children: label }),
2410
2581
  " ",
2411
- required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
2582
+ required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
2412
2583
  ] }),
2413
- /* @__PURE__ */ jsx27(
2584
+ /* @__PURE__ */ jsx30(
2414
2585
  Select2,
2415
2586
  {
2416
2587
  showSearch: true,
@@ -2425,7 +2596,7 @@ function SelectFieldGroup({
2425
2596
  options,
2426
2597
  mode,
2427
2598
  onSearch: handleSearch,
2428
- prefix: prefix ? /* @__PURE__ */ jsx27(
2599
+ prefix: prefix ? /* @__PURE__ */ jsx30(
2429
2600
  "span",
2430
2601
  {
2431
2602
  style: {
@@ -2441,18 +2612,14 @@ function SelectFieldGroup({
2441
2612
  allowClear: true
2442
2613
  }
2443
2614
  ),
2444
- /* @__PURE__ */ jsxs23("div", { children: [
2445
- /* @__PURE__ */ jsx27("p", { className: "caption-1 text-gray-500", children: bottomText }),
2446
- " ",
2447
- error && /* @__PURE__ */ jsx27("p", { className: "caption-1 text-red-500 ", children: error })
2448
- ] })
2615
+ error && /* @__PURE__ */ jsx30("p", { className: "text-red-500 caption-1", children: error })
2449
2616
  ] })
2450
2617
  }
2451
2618
  );
2452
2619
  }
2453
2620
 
2454
2621
  // src/Select/SelectFieldStatus/SelectFieldStatus.tsx
2455
- import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
2622
+ import { Select as Select3, ConfigProvider as ConfigProvider13 } from "antd";
2456
2623
 
2457
2624
  // src/Select/SelectFieldStatus/StatusMockup.ts
2458
2625
  var status = [
@@ -2465,22 +2632,21 @@ var status = [
2465
2632
 
2466
2633
  // src/Select/SelectFieldStatus/SelectFieldStatus.tsx
2467
2634
  import { DownOutlined } from "@ant-design/icons";
2468
- import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
2635
+ import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
2469
2636
  function SelectFieldStatus({
2470
2637
  value,
2471
2638
  onChange,
2472
2639
  placeholder,
2473
- title,
2640
+ label,
2474
2641
  required,
2475
- bottomText,
2476
2642
  disabled,
2477
2643
  error,
2478
2644
  options,
2479
2645
  className
2480
2646
  }) {
2481
2647
  const selectedItem = status.find((s) => s.value === value);
2482
- return /* @__PURE__ */ jsx28(
2483
- ConfigProvider12,
2648
+ return /* @__PURE__ */ jsx31(
2649
+ ConfigProvider13,
2484
2650
  {
2485
2651
  theme: {
2486
2652
  components: {
@@ -2495,17 +2661,17 @@ function SelectFieldStatus({
2495
2661
  fontFamily: "Kanit"
2496
2662
  }
2497
2663
  },
2498
- children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
2499
- /* @__PURE__ */ jsxs24("div", { children: [
2500
- /* @__PURE__ */ jsx28("span", { className: "body-1", children: title }),
2664
+ children: /* @__PURE__ */ jsxs27("div", { className: "container-input", children: [
2665
+ /* @__PURE__ */ jsxs27("div", { children: [
2666
+ /* @__PURE__ */ jsx31("span", { className: "body-1", children: label }),
2501
2667
  " ",
2502
- required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
2668
+ required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
2503
2669
  ] }),
2504
- /* @__PURE__ */ jsx28(
2670
+ /* @__PURE__ */ jsx31(
2505
2671
  Select3,
2506
2672
  {
2507
2673
  disabled,
2508
- suffixIcon: /* @__PURE__ */ jsx28(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2674
+ suffixIcon: /* @__PURE__ */ jsx31(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2509
2675
  value,
2510
2676
  onChange,
2511
2677
  className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
@@ -2516,18 +2682,14 @@ function SelectFieldStatus({
2516
2682
  showSearch: true
2517
2683
  }
2518
2684
  ),
2519
- /* @__PURE__ */ jsxs24("div", { children: [
2520
- /* @__PURE__ */ jsx28("p", { className: "caption-1 text-gray-500", children: bottomText }),
2521
- " ",
2522
- error && /* @__PURE__ */ jsx28("p", { className: "caption-1 text-red-500 ", children: error })
2523
- ] })
2685
+ error && /* @__PURE__ */ jsx31("p", { className: "text-red-500 caption-1", children: error })
2524
2686
  ] })
2525
2687
  }
2526
2688
  );
2527
2689
  }
2528
2690
 
2529
2691
  // src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
2530
- import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
2692
+ import { Select as Select4, ConfigProvider as ConfigProvider14 } from "antd";
2531
2693
 
2532
2694
  // src/Select/SelectFieldStatusReport/StatusReportMockup.ts
2533
2695
  var status2 = [
@@ -2537,22 +2699,21 @@ var status2 = [
2537
2699
 
2538
2700
  // src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
2539
2701
  import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
2540
- import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
2702
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
2541
2703
  function SelectFieldStatusReport({
2542
2704
  value,
2543
2705
  onChange,
2544
2706
  placeholder,
2545
- title,
2707
+ label,
2546
2708
  required,
2547
- bottomText,
2548
2709
  disabled,
2549
2710
  error,
2550
2711
  className,
2551
2712
  options
2552
2713
  }) {
2553
2714
  const selectedItem = status2.find((s) => s.value === value);
2554
- return /* @__PURE__ */ jsx29(
2555
- ConfigProvider13,
2715
+ return /* @__PURE__ */ jsx32(
2716
+ ConfigProvider14,
2556
2717
  {
2557
2718
  theme: {
2558
2719
  components: {
@@ -2567,17 +2728,17 @@ function SelectFieldStatusReport({
2567
2728
  fontFamily: "Kanit"
2568
2729
  }
2569
2730
  },
2570
- children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
2571
- /* @__PURE__ */ jsxs25("div", { children: [
2572
- /* @__PURE__ */ jsx29("span", { className: "body-1", children: title }),
2731
+ children: /* @__PURE__ */ jsxs28("div", { className: "container-input", children: [
2732
+ /* @__PURE__ */ jsxs28("div", { children: [
2733
+ /* @__PURE__ */ jsx32("span", { className: "body-1", children: label }),
2573
2734
  " ",
2574
- required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
2735
+ required && /* @__PURE__ */ jsx32("span", { className: "text-red-500", children: "*" })
2575
2736
  ] }),
2576
- /* @__PURE__ */ jsx29(
2737
+ /* @__PURE__ */ jsx32(
2577
2738
  Select4,
2578
2739
  {
2579
2740
  disabled,
2580
- suffixIcon: /* @__PURE__ */ jsx29(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2741
+ suffixIcon: /* @__PURE__ */ jsx32(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2581
2742
  value,
2582
2743
  onChange,
2583
2744
  className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
@@ -2588,24 +2749,19 @@ function SelectFieldStatusReport({
2588
2749
  showSearch: true
2589
2750
  }
2590
2751
  ),
2591
- /* @__PURE__ */ jsxs25("div", { children: [
2592
- /* @__PURE__ */ jsx29("p", { className: "caption-1 text-gray-500", children: bottomText }),
2593
- " ",
2594
- error && /* @__PURE__ */ jsx29("p", { className: "caption-1 text-red-500 ", children: error })
2595
- ] })
2752
+ error && /* @__PURE__ */ jsx32("p", { className: "text-red-500 caption-1", children: error })
2596
2753
  ] })
2597
2754
  }
2598
2755
  );
2599
2756
  }
2600
2757
 
2601
2758
  // src/Select/SelectFieldTag/SelectFieldTag.tsx
2602
- import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
2759
+ import { Select as Select5, ConfigProvider as ConfigProvider15 } from "antd";
2603
2760
  import { useState as useState6 } from "react";
2604
- import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
2761
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
2605
2762
  function SelectFieldTag({
2606
- title,
2763
+ label,
2607
2764
  required,
2608
- bottomText,
2609
2765
  placeholder,
2610
2766
  options,
2611
2767
  error,
@@ -2635,21 +2791,21 @@ function SelectFieldTag({
2635
2791
  }
2636
2792
  onChange?.([]);
2637
2793
  };
2638
- return /* @__PURE__ */ jsx30(
2639
- ConfigProvider14,
2794
+ return /* @__PURE__ */ jsx33(
2795
+ ConfigProvider15,
2640
2796
  {
2641
2797
  theme: {
2642
2798
  token: {
2643
2799
  fontFamily: "Kanit"
2644
2800
  }
2645
2801
  },
2646
- children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
2647
- /* @__PURE__ */ jsxs26("div", { children: [
2648
- /* @__PURE__ */ jsx30("span", { className: "body-1", children: title }),
2802
+ children: /* @__PURE__ */ jsxs29("div", { className: "container-input", children: [
2803
+ /* @__PURE__ */ jsxs29("div", { children: [
2804
+ /* @__PURE__ */ jsx33("span", { className: "body-1", children: label }),
2649
2805
  " ",
2650
- required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
2806
+ required && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: "*" })
2651
2807
  ] }),
2652
- /* @__PURE__ */ jsx30(
2808
+ /* @__PURE__ */ jsx33(
2653
2809
  Select5,
2654
2810
  {
2655
2811
  mode: "tags",
@@ -2668,11 +2824,7 @@ function SelectFieldTag({
2668
2824
  onClear
2669
2825
  }
2670
2826
  ),
2671
- /* @__PURE__ */ jsxs26("div", { children: [
2672
- /* @__PURE__ */ jsx30("p", { className: "caption-1 text-gray-500", children: bottomText }),
2673
- " ",
2674
- error && /* @__PURE__ */ jsx30("p", { className: "caption-1 text-red-500 ", children: error })
2675
- ] })
2827
+ error && /* @__PURE__ */ jsx33("p", { className: "text-red-500 caption-1", children: error })
2676
2828
  ] })
2677
2829
  }
2678
2830
  );
@@ -2680,16 +2832,15 @@ function SelectFieldTag({
2680
2832
 
2681
2833
  // src/Select/SelectCustom/SelectCustom.tsx
2682
2834
  import { IconTrash } from "@tabler/icons-react";
2683
- import { Select as Select6, ConfigProvider as ConfigProvider15 } from "antd";
2835
+ import { Select as Select6, ConfigProvider as ConfigProvider16 } from "antd";
2684
2836
  import { useState as useState7 } from "react";
2685
- import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
2837
+ import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
2686
2838
  function SelectCustom({
2687
- title = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
2839
+ label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
2688
2840
  placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
2689
2841
  options,
2690
2842
  required = false,
2691
2843
  onChange,
2692
- bottomText,
2693
2844
  error,
2694
2845
  onClear
2695
2846
  }) {
@@ -2712,8 +2863,8 @@ function SelectCustom({
2712
2863
  });
2713
2864
  };
2714
2865
  const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
2715
- return /* @__PURE__ */ jsx31(
2716
- ConfigProvider15,
2866
+ return /* @__PURE__ */ jsx34(
2867
+ ConfigProvider16,
2717
2868
  {
2718
2869
  theme: {
2719
2870
  token: {
@@ -2721,13 +2872,13 @@ function SelectCustom({
2721
2872
  fontSize: 16
2722
2873
  }
2723
2874
  },
2724
- children: /* @__PURE__ */ jsxs27("div", { className: "container-input", children: [
2725
- /* @__PURE__ */ jsxs27("div", { children: [
2726
- /* @__PURE__ */ jsx31("span", { className: "body-1", children: title }),
2875
+ children: /* @__PURE__ */ jsxs30("div", { className: "container-input", children: [
2876
+ /* @__PURE__ */ jsxs30("div", { children: [
2877
+ /* @__PURE__ */ jsx34("span", { className: "body-1", children: label }),
2727
2878
  " ",
2728
- required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
2879
+ required && /* @__PURE__ */ jsx34("span", { className: "text-red-500", children: "*" })
2729
2880
  ] }),
2730
- /* @__PURE__ */ jsx31(
2881
+ /* @__PURE__ */ jsx34(
2731
2882
  Select6,
2732
2883
  {
2733
2884
  value,
@@ -2738,20 +2889,16 @@ function SelectCustom({
2738
2889
  onClear
2739
2890
  }
2740
2891
  ),
2741
- /* @__PURE__ */ jsxs27("div", { children: [
2742
- /* @__PURE__ */ jsx31("p", { className: "caption-1 text-gray-500", children: bottomText }),
2743
- " ",
2744
- error && /* @__PURE__ */ jsx31("p", { className: "caption-1 text-red-500 ", children: error })
2745
- ] }),
2746
- /* @__PURE__ */ jsx31("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs27("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
2747
- /* @__PURE__ */ jsxs27("div", { className: "flex flex-row gap-[8px]", children: [
2748
- /* @__PURE__ */ jsxs27("p", { children: [
2892
+ error && /* @__PURE__ */ jsx34("p", { className: "text-red-500 caption-1", children: error }),
2893
+ /* @__PURE__ */ jsx34("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs30("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
2894
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-row gap-[8px]", children: [
2895
+ /* @__PURE__ */ jsxs30("p", { children: [
2749
2896
  index + 1,
2750
2897
  "."
2751
2898
  ] }),
2752
- /* @__PURE__ */ jsx31("p", { children: v })
2899
+ /* @__PURE__ */ jsx34("p", { children: v })
2753
2900
  ] }),
2754
- /* @__PURE__ */ jsx31(IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
2901
+ /* @__PURE__ */ jsx34(IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
2755
2902
  ] }, index)) })
2756
2903
  ] })
2757
2904
  }
@@ -2759,7 +2906,7 @@ function SelectCustom({
2759
2906
  }
2760
2907
 
2761
2908
  // src/SortFilter/SortFilter.tsx
2762
- import { ConfigProvider as ConfigProvider16 } from "antd";
2909
+ import { ConfigProvider as ConfigProvider17 } from "antd";
2763
2910
  import { CalendarOutlined } from "@ant-design/icons";
2764
2911
 
2765
2912
  // src/SortFilter/DataMockSortFilter.ts
@@ -2792,7 +2939,7 @@ var quarters = [
2792
2939
  // src/SortFilter/SortFilter.tsx
2793
2940
  import { useState as useState8 } from "react";
2794
2941
  import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
2795
- import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
2942
+ import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
2796
2943
  function SortFilter({
2797
2944
  showYear = true,
2798
2945
  showQuarter = true,
@@ -2803,20 +2950,20 @@ function SortFilter({
2803
2950
  const [yearValue, setYearValue] = useState8();
2804
2951
  const [monthValue, setMonthValue] = useState8();
2805
2952
  const [quarterValue, setQuartersValue] = useState8();
2806
- return /* @__PURE__ */ jsx32(
2807
- ConfigProvider16,
2953
+ return /* @__PURE__ */ jsx35(
2954
+ ConfigProvider17,
2808
2955
  {
2809
2956
  theme: {
2810
2957
  token: {
2811
2958
  fontFamily: "Kanit"
2812
2959
  }
2813
2960
  },
2814
- children: /* @__PURE__ */ jsxs28("div", { className: "w-full flex items-center justify-between", children: [
2815
- /* @__PURE__ */ jsxs28("div", { className: "w-full flex gap-[10px]", children: [
2816
- showYear && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
2961
+ children: /* @__PURE__ */ jsxs31("div", { className: "w-full flex items-center justify-between", children: [
2962
+ /* @__PURE__ */ jsxs31("div", { className: "w-full flex gap-[10px]", children: [
2963
+ showYear && /* @__PURE__ */ jsx35("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx35(
2817
2964
  SelectField,
2818
2965
  {
2819
- prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
2966
+ prefix: /* @__PURE__ */ jsx35(CalendarOutlined, {}),
2820
2967
  onChange: setYearValue,
2821
2968
  options: years.map((s) => ({
2822
2969
  value: s.value,
@@ -2826,10 +2973,10 @@ function SortFilter({
2826
2973
  value: yearValue
2827
2974
  }
2828
2975
  ) }),
2829
- showMonth && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
2976
+ showMonth && /* @__PURE__ */ jsx35("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx35(
2830
2977
  SelectField,
2831
2978
  {
2832
- prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
2979
+ prefix: /* @__PURE__ */ jsx35(CalendarOutlined, {}),
2833
2980
  onChange: setMonthValue,
2834
2981
  options: months.map((s) => ({
2835
2982
  value: s.value,
@@ -2839,10 +2986,10 @@ function SortFilter({
2839
2986
  placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
2840
2987
  }
2841
2988
  ) }),
2842
- showQuarter && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
2989
+ showQuarter && /* @__PURE__ */ jsx35("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx35(
2843
2990
  SelectField,
2844
2991
  {
2845
- prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
2992
+ prefix: /* @__PURE__ */ jsx35(CalendarOutlined, {}),
2846
2993
  onChange: setQuartersValue,
2847
2994
  options: quarters.map((s) => ({
2848
2995
  value: s.value,
@@ -2853,8 +3000,8 @@ function SortFilter({
2853
3000
  }
2854
3001
  ) })
2855
3002
  ] }),
2856
- /* @__PURE__ */ jsxs28("div", { className: "flex gap-[10px]", children: [
2857
- /* @__PURE__ */ jsx32(
3003
+ /* @__PURE__ */ jsxs31("div", { className: "flex gap-[10px]", children: [
3004
+ /* @__PURE__ */ jsx35(
2858
3005
  IconSortDescending2,
2859
3006
  {
2860
3007
  size: 24,
@@ -2862,7 +3009,7 @@ function SortFilter({
2862
3009
  onClick: onSortClick
2863
3010
  }
2864
3011
  ),
2865
- /* @__PURE__ */ jsx32(
3012
+ /* @__PURE__ */ jsx35(
2866
3013
  IconFilter,
2867
3014
  {
2868
3015
  size: 24,
@@ -2879,7 +3026,7 @@ function SortFilter({
2879
3026
  // src/Upload/FileUploader/FileUploader.tsx
2880
3027
  import { IconPaperclip, IconUpload, IconTrash as IconTrash2 } from "@tabler/icons-react";
2881
3028
  import { useRef as useRef2, useState as useState9 } from "react";
2882
- import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
3029
+ import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
2883
3030
  function FileUploader({
2884
3031
  onUpload,
2885
3032
  onError,
@@ -2912,7 +3059,7 @@ function FileUploader({
2912
3059
  const handleRemoveFile = async (index) => {
2913
3060
  try {
2914
3061
  if (onRemove) {
2915
- await onRemove();
3062
+ await onRemove(index);
2916
3063
  }
2917
3064
  const updatedList = [...fileList];
2918
3065
  updatedList.splice(index, 1);
@@ -2950,10 +3097,10 @@ function FileUploader({
2950
3097
  }
2951
3098
  if (inputRef.current) inputRef.current.value = "";
2952
3099
  };
2953
- return /* @__PURE__ */ jsxs29("div", { className: "w-full", children: [
2954
- label && /* @__PURE__ */ jsx33("p", { className: "body-1", children: label }),
2955
- /* @__PURE__ */ jsxs29("div", { children: [
2956
- mode === "upload" ? /* @__PURE__ */ jsx33(
3100
+ return /* @__PURE__ */ jsxs32("div", { className: "w-full", children: [
3101
+ label && /* @__PURE__ */ jsx36("p", { className: "body-1", children: label }),
3102
+ /* @__PURE__ */ jsxs32("div", { children: [
3103
+ mode === "upload" ? /* @__PURE__ */ jsx36(
2957
3104
  "button",
2958
3105
  {
2959
3106
  type: "button",
@@ -2961,15 +3108,15 @@ function FileUploader({
2961
3108
  className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
2962
3109
  ${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
2963
3110
  disabled: disabled ? disabled : uploading,
2964
- children: uploading ? /* @__PURE__ */ jsxs29(Fragment5, { children: [
2965
- /* @__PURE__ */ jsx33(Loader, { size: 15 }),
3111
+ children: uploading ? /* @__PURE__ */ jsxs32(Fragment5, { children: [
3112
+ /* @__PURE__ */ jsx36(Loader, { size: 15 }),
2966
3113
  " \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
2967
- ] }) : /* @__PURE__ */ jsxs29(Fragment5, { children: [
2968
- /* @__PURE__ */ jsx33(IconUpload, { size: 15, className: "text-gray-400" }),
3114
+ ] }) : /* @__PURE__ */ jsxs32(Fragment5, { children: [
3115
+ /* @__PURE__ */ jsx36(IconUpload, { size: 15, className: "text-gray-400" }),
2969
3116
  " \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
2970
3117
  ] })
2971
3118
  }
2972
- ) : /* @__PURE__ */ jsx33(
3119
+ ) : /* @__PURE__ */ jsx36(
2973
3120
  "div",
2974
3121
  {
2975
3122
  className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
@@ -2983,17 +3130,17 @@ function FileUploader({
2983
3130
  },
2984
3131
  onDragLeave: () => setDragActive(false),
2985
3132
  onDrop: handleDrop,
2986
- children: uploading ? /* @__PURE__ */ jsxs29("div", { className: "flex justify-center items-center gap-2", children: [
2987
- /* @__PURE__ */ jsx33(Loader, { size: 15 }),
3133
+ children: uploading ? /* @__PURE__ */ jsxs32("div", { className: "flex justify-center items-center gap-2", children: [
3134
+ /* @__PURE__ */ jsx36(Loader, { size: 15 }),
2988
3135
  " \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
2989
- ] }) : /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center gap-2", children: [
2990
- /* @__PURE__ */ jsx33(IconUpload, { size: 20 }),
2991
- /* @__PURE__ */ jsx33("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" }),
2992
- /* @__PURE__ */ jsx33("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" })
3136
+ ] }) : /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center gap-2", children: [
3137
+ /* @__PURE__ */ jsx36(IconUpload, { size: 20 }),
3138
+ /* @__PURE__ */ jsx36("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" }),
3139
+ /* @__PURE__ */ jsx36("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" })
2993
3140
  ] })
2994
3141
  }
2995
3142
  ),
2996
- /* @__PURE__ */ jsx33(
3143
+ /* @__PURE__ */ jsx36(
2997
3144
  "input",
2998
3145
  {
2999
3146
  type: "file",
@@ -3006,13 +3153,13 @@ function FileUploader({
3006
3153
  }
3007
3154
  )
3008
3155
  ] }),
3009
- description && /* @__PURE__ */ jsx33("p", { className: "text-gray-400 body-4", children: description }),
3010
- /* @__PURE__ */ jsx33("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
3011
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
3012
- /* @__PURE__ */ jsx33("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx33(IconPaperclip, { size: 15 }) }),
3013
- /* @__PURE__ */ jsx33("span", { className: "truncate", children: file.name })
3156
+ description && /* @__PURE__ */ jsx36("p", { className: "text-gray-400 body-4", children: description }),
3157
+ /* @__PURE__ */ jsx36("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
3158
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
3159
+ /* @__PURE__ */ jsx36("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx36(IconPaperclip, { size: 15 }) }),
3160
+ /* @__PURE__ */ jsx36("span", { className: "truncate", children: file.name })
3014
3161
  ] }),
3015
- /* @__PURE__ */ jsx33(
3162
+ /* @__PURE__ */ jsx36(
3016
3163
  IconTrash2,
3017
3164
  {
3018
3165
  size: 20,
@@ -3046,9 +3193,9 @@ function messageLoading(content, duration) {
3046
3193
  }
3047
3194
 
3048
3195
  // src/Breadcrumb/Breadcrumb.tsx
3049
- import { ConfigProvider as ConfigProvider17 } from "antd";
3196
+ import { ConfigProvider as ConfigProvider18 } from "antd";
3050
3197
  import { Breadcrumb } from "antd";
3051
- import { jsx as jsx34 } from "react/jsx-runtime";
3198
+ import { jsx as jsx37 } from "react/jsx-runtime";
3052
3199
  function Breadcrumbs({
3053
3200
  items,
3054
3201
  separator,
@@ -3056,15 +3203,15 @@ function Breadcrumbs({
3056
3203
  classname,
3057
3204
  params
3058
3205
  }) {
3059
- return /* @__PURE__ */ jsx34(
3060
- ConfigProvider17,
3206
+ return /* @__PURE__ */ jsx37(
3207
+ ConfigProvider18,
3061
3208
  {
3062
3209
  theme: {
3063
3210
  token: {
3064
3211
  fontFamily: "Kanit"
3065
3212
  }
3066
3213
  },
3067
- children: /* @__PURE__ */ jsx34(
3214
+ children: /* @__PURE__ */ jsx37(
3068
3215
  Breadcrumb,
3069
3216
  {
3070
3217
  items,
@@ -3079,8 +3226,8 @@ function Breadcrumbs({
3079
3226
  }
3080
3227
 
3081
3228
  // src/HeadingPage/HeadingPage.tsx
3082
- import { ConfigProvider as ConfigProvider18 } from "antd";
3083
- import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3229
+ import { ConfigProvider as ConfigProvider19 } from "antd";
3230
+ import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
3084
3231
  function HeadingPage({ Heading }) {
3085
3232
  const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
3086
3233
  weekday: "long",
@@ -3088,17 +3235,17 @@ function HeadingPage({ Heading }) {
3088
3235
  month: "long",
3089
3236
  year: "numeric"
3090
3237
  });
3091
- return /* @__PURE__ */ jsx35(
3092
- ConfigProvider18,
3238
+ return /* @__PURE__ */ jsx38(
3239
+ ConfigProvider19,
3093
3240
  {
3094
3241
  theme: {
3095
3242
  token: {
3096
3243
  fontFamily: "Kanit"
3097
3244
  }
3098
3245
  },
3099
- children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
3100
- /* @__PURE__ */ jsx35("p", { className: "headline-5", children: Heading }),
3101
- /* @__PURE__ */ jsxs30("p", { className: "body-1", children: [
3246
+ children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
3247
+ /* @__PURE__ */ jsx38("p", { className: "headline-5", children: Heading }),
3248
+ /* @__PURE__ */ jsxs33("p", { className: "body-1", children: [
3102
3249
  " \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
3103
3250
  today
3104
3251
  ] })
@@ -3108,9 +3255,9 @@ function HeadingPage({ Heading }) {
3108
3255
  }
3109
3256
 
3110
3257
  // src/Progress/ProgressBar.tsx
3111
- import { ConfigProvider as ConfigProvider19, Progress } from "antd";
3258
+ import { ConfigProvider as ConfigProvider20, Progress } from "antd";
3112
3259
  import { useEffect as useEffect2, useRef as useRef3, useState as useState10 } from "react";
3113
- import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3260
+ import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
3114
3261
  function ProgressBar({
3115
3262
  percent = 0,
3116
3263
  size = "default",
@@ -3133,9 +3280,7 @@ function ProgressBar({
3133
3280
  strokeColor = percent >= minCheckpoint ? "var(--color-green-500)" : "var(--color-red-500)";
3134
3281
  }
3135
3282
  useEffect2(() => {
3136
- const inner = progressRef.current?.querySelector(
3137
- ".ant-progress-inner"
3138
- );
3283
+ const inner = progressRef.current?.querySelector(".ant-progress-inner");
3139
3284
  if (!inner) return;
3140
3285
  const observer = new ResizeObserver(() => {
3141
3286
  setBarWidth(inner.offsetWidth);
@@ -3143,16 +3288,16 @@ function ProgressBar({
3143
3288
  observer.observe(inner);
3144
3289
  return () => observer.disconnect();
3145
3290
  }, []);
3146
- return /* @__PURE__ */ jsx36(
3147
- ConfigProvider19,
3291
+ return /* @__PURE__ */ jsx39(
3292
+ ConfigProvider20,
3148
3293
  {
3149
3294
  theme: {
3150
3295
  token: {
3151
3296
  fontFamily: "Kanit"
3152
3297
  }
3153
3298
  },
3154
- children: /* @__PURE__ */ jsxs31("div", { className: "relative w-full", ref: progressRef, children: [
3155
- /* @__PURE__ */ jsx36(
3299
+ children: /* @__PURE__ */ jsxs34("div", { className: "relative w-full", ref: progressRef, children: [
3300
+ /* @__PURE__ */ jsx39(
3156
3301
  Progress,
3157
3302
  {
3158
3303
  className: "w-full",
@@ -3168,7 +3313,7 @@ function ProgressBar({
3168
3313
  strokeColor
3169
3314
  }
3170
3315
  ),
3171
- barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx36(
3316
+ barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx39(
3172
3317
  "div",
3173
3318
  {
3174
3319
  className: "checkpoint absolute top-0",
@@ -3190,7 +3335,7 @@ function ProgressBar({
3190
3335
  }
3191
3336
 
3192
3337
  // src/KpiSection/KpiSection.tsx
3193
- import { ConfigProvider as ConfigProvider20, message } from "antd";
3338
+ import { ConfigProvider as ConfigProvider21, message } from "antd";
3194
3339
  import { useEffect as useEffect3, useState as useState12 } from "react";
3195
3340
 
3196
3341
  // src/KpiSection/hooks/useGetKpiSection.ts
@@ -3341,7 +3486,7 @@ function useGetKpiSection() {
3341
3486
 
3342
3487
  // src/KpiSection/KpiSection.tsx
3343
3488
  import { IconCheck as IconCheck2, IconCirclePlus, IconPencil, IconTrash as IconTrash3, IconX as IconX2 } from "@tabler/icons-react";
3344
- import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
3489
+ import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
3345
3490
  function KpiSection({ type, onChangeKpiList }) {
3346
3491
  const {
3347
3492
  handleAddKpi,
@@ -3371,8 +3516,8 @@ function KpiSection({ type, onChangeKpiList }) {
3371
3516
  onChangeKpiList(kpiList);
3372
3517
  }
3373
3518
  }, [kpiList]);
3374
- return /* @__PURE__ */ jsx37(
3375
- ConfigProvider20,
3519
+ return /* @__PURE__ */ jsx40(
3520
+ ConfigProvider21,
3376
3521
  {
3377
3522
  theme: {
3378
3523
  token: {
@@ -3380,15 +3525,15 @@ function KpiSection({ type, onChangeKpiList }) {
3380
3525
  fontSize: 16
3381
3526
  }
3382
3527
  },
3383
- children: /* @__PURE__ */ jsxs32("div", { className: "container-input", children: [
3528
+ children: /* @__PURE__ */ jsxs35("div", { className: "container-input", children: [
3384
3529
  messageContainer,
3385
- type === "number" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
3386
- /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
3387
- /* @__PURE__ */ jsx37(
3530
+ type === "number" && /* @__PURE__ */ jsxs35("div", { className: "space-y-4", children: [
3531
+ /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
3532
+ /* @__PURE__ */ jsx40(
3388
3533
  InputField,
3389
3534
  {
3390
3535
  value: nameKpi,
3391
- title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3536
+ label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3392
3537
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3393
3538
  required: true,
3394
3539
  onChange: (value) => setNameKpi(value ?? ""),
@@ -3396,11 +3541,11 @@ function KpiSection({ type, onChangeKpiList }) {
3396
3541
  error: errors.nameKpi
3397
3542
  }
3398
3543
  ),
3399
- /* @__PURE__ */ jsx37(
3544
+ /* @__PURE__ */ jsx40(
3400
3545
  InputField,
3401
3546
  {
3402
3547
  value: kpiValue,
3403
- title: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3548
+ label: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3404
3549
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3405
3550
  required: true,
3406
3551
  onChange: (value) => {
@@ -3420,11 +3565,11 @@ function KpiSection({ type, onChangeKpiList }) {
3420
3565
  error: errors.kpiValue
3421
3566
  }
3422
3567
  ),
3423
- /* @__PURE__ */ jsx37(
3568
+ /* @__PURE__ */ jsx40(
3424
3569
  InputField,
3425
3570
  {
3426
3571
  value: unitValue,
3427
- title: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
3572
+ label: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
3428
3573
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3429
3574
  required: true,
3430
3575
  onChange: (value) => setUnitValue(value ?? ""),
@@ -3432,7 +3577,7 @@ function KpiSection({ type, onChangeKpiList }) {
3432
3577
  error: errors.unitValue
3433
3578
  }
3434
3579
  ),
3435
- /* @__PURE__ */ jsx37("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx37(
3580
+ /* @__PURE__ */ jsx40("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx40(
3436
3581
  IconCirclePlus,
3437
3582
  {
3438
3583
  className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
@@ -3441,17 +3586,17 @@ function KpiSection({ type, onChangeKpiList }) {
3441
3586
  }
3442
3587
  ) })
3443
3588
  ] }),
3444
- /* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32(
3589
+ /* @__PURE__ */ jsx40("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs35(
3445
3590
  "div",
3446
3591
  {
3447
3592
  className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
3448
3593
  children: [
3449
- /* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3594
+ /* @__PURE__ */ jsxs35("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3450
3595
  index + 1,
3451
3596
  "."
3452
3597
  ] }),
3453
- kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
3454
- /* @__PURE__ */ jsx37(
3598
+ kpi.isEditing ? /* @__PURE__ */ jsxs35(Fragment6, { children: [
3599
+ /* @__PURE__ */ jsx40(
3455
3600
  InputField,
3456
3601
  {
3457
3602
  value: kpi.name,
@@ -3461,7 +3606,7 @@ function KpiSection({ type, onChangeKpiList }) {
3461
3606
  error: itemErrors[kpi.id]?.name
3462
3607
  }
3463
3608
  ),
3464
- /* @__PURE__ */ jsx37(
3609
+ /* @__PURE__ */ jsx40(
3465
3610
  InputField,
3466
3611
  {
3467
3612
  value: kpi.value?.toString(),
@@ -3486,7 +3631,7 @@ function KpiSection({ type, onChangeKpiList }) {
3486
3631
  error: itemErrors[kpi.id]?.value
3487
3632
  }
3488
3633
  ),
3489
- /* @__PURE__ */ jsx37(
3634
+ /* @__PURE__ */ jsx40(
3490
3635
  InputField,
3491
3636
  {
3492
3637
  value: kpi.unit,
@@ -3496,29 +3641,29 @@ function KpiSection({ type, onChangeKpiList }) {
3496
3641
  error: itemErrors[kpi.id]?.unit
3497
3642
  }
3498
3643
  ),
3499
- /* @__PURE__ */ jsxs32(
3644
+ /* @__PURE__ */ jsxs35(
3500
3645
  "div",
3501
3646
  {
3502
3647
  className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
3503
3648
  children: [
3504
- /* @__PURE__ */ jsx37(
3649
+ /* @__PURE__ */ jsx40(
3505
3650
  IconCheck2,
3506
3651
  {
3507
3652
  className: "w-[30px] h-[30px] cursor-pointer",
3508
3653
  onClick: () => handleSave(kpi.id, type)
3509
3654
  }
3510
3655
  ),
3511
- /* @__PURE__ */ jsx37(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3656
+ /* @__PURE__ */ jsx40(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3512
3657
  ]
3513
3658
  }
3514
3659
  )
3515
- ] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
3516
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
3517
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.value }),
3518
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.unit }),
3519
- /* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
3520
- /* @__PURE__ */ jsx37(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3521
- /* @__PURE__ */ jsx37(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3660
+ ] }) : /* @__PURE__ */ jsxs35(Fragment6, { children: [
3661
+ /* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.name }),
3662
+ /* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.value }),
3663
+ /* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.unit }),
3664
+ /* @__PURE__ */ jsxs35("div", { className: "flex gap-3 justify-end", children: [
3665
+ /* @__PURE__ */ jsx40(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3666
+ /* @__PURE__ */ jsx40(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3522
3667
  ] })
3523
3668
  ] })
3524
3669
  ]
@@ -3526,13 +3671,13 @@ function KpiSection({ type, onChangeKpiList }) {
3526
3671
  kpi.id
3527
3672
  )) })
3528
3673
  ] }),
3529
- type === "text" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
3530
- /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
3531
- /* @__PURE__ */ jsx37(
3674
+ type === "text" && /* @__PURE__ */ jsxs35("div", { className: "space-y-4", children: [
3675
+ /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
3676
+ /* @__PURE__ */ jsx40(
3532
3677
  InputField,
3533
3678
  {
3534
3679
  value: nameKpi,
3535
- title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3680
+ label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3536
3681
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3537
3682
  required: true,
3538
3683
  onChange: (value) => setNameKpi(value ?? ""),
@@ -3540,7 +3685,7 @@ function KpiSection({ type, onChangeKpiList }) {
3540
3685
  error: errors.nameKpi
3541
3686
  }
3542
3687
  ),
3543
- /* @__PURE__ */ jsx37("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx37(
3688
+ /* @__PURE__ */ jsx40("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx40(
3544
3689
  IconCirclePlus,
3545
3690
  {
3546
3691
  className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
@@ -3549,13 +3694,13 @@ function KpiSection({ type, onChangeKpiList }) {
3549
3694
  }
3550
3695
  ) })
3551
3696
  ] }),
3552
- /* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
3553
- /* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3697
+ /* @__PURE__ */ jsx40("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
3698
+ /* @__PURE__ */ jsxs35("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3554
3699
  index + 1,
3555
3700
  "."
3556
3701
  ] }),
3557
- kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
3558
- /* @__PURE__ */ jsx37(
3702
+ kpi.isEditing ? /* @__PURE__ */ jsxs35(Fragment6, { children: [
3703
+ /* @__PURE__ */ jsx40(
3559
3704
  InputField,
3560
3705
  {
3561
3706
  value: kpi.name,
@@ -3565,27 +3710,27 @@ function KpiSection({ type, onChangeKpiList }) {
3565
3710
  error: itemErrors[kpi.id]?.name
3566
3711
  }
3567
3712
  ),
3568
- /* @__PURE__ */ jsxs32(
3713
+ /* @__PURE__ */ jsxs35(
3569
3714
  "div",
3570
3715
  {
3571
3716
  className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
3572
3717
  children: [
3573
- /* @__PURE__ */ jsx37(
3718
+ /* @__PURE__ */ jsx40(
3574
3719
  IconCheck2,
3575
3720
  {
3576
3721
  className: "w-[30px] h-[30px] cursor-pointer",
3577
3722
  onClick: () => handleSave(kpi.id, type)
3578
3723
  }
3579
3724
  ),
3580
- /* @__PURE__ */ jsx37(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3725
+ /* @__PURE__ */ jsx40(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3581
3726
  ]
3582
3727
  }
3583
3728
  )
3584
- ] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
3585
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
3586
- /* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
3587
- /* @__PURE__ */ jsx37(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3588
- /* @__PURE__ */ jsx37(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3729
+ ] }) : /* @__PURE__ */ jsxs35(Fragment6, { children: [
3730
+ /* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.name }),
3731
+ /* @__PURE__ */ jsxs35("div", { className: "flex gap-3 justify-end", children: [
3732
+ /* @__PURE__ */ jsx40(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3733
+ /* @__PURE__ */ jsx40(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3589
3734
  ] })
3590
3735
  ] })
3591
3736
  ] }, kpi.id)) })
@@ -3594,7 +3739,240 @@ function KpiSection({ type, onChangeKpiList }) {
3594
3739
  }
3595
3740
  );
3596
3741
  }
3742
+
3743
+ // src/Modal/Modal/Modal.tsx
3744
+ import { Modal } from "antd";
3745
+ import { jsx as jsx41 } from "react/jsx-runtime";
3746
+ function AntDModal({ children, isOpen, width, onCancel }) {
3747
+ return /* @__PURE__ */ jsx41("div", { children: /* @__PURE__ */ jsx41(Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ jsx41("div", { children }) }) });
3748
+ }
3749
+
3750
+ // src/Indicator/Indicator/Indicator.tsx
3751
+ import { IconCheck as IconCheck3, IconCirclePlus as IconCirclePlus2, IconPencil as IconPencil2, IconTrash as IconTrash4, IconX as IconX3 } from "@tabler/icons-react";
3752
+ import { useState as useState13 } from "react";
3753
+ import { Input as Input4 } from "antd";
3754
+ import { Fragment as Fragment7, jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
3755
+ function Indicator({
3756
+ option = [
3757
+ { value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
3758
+ { value: "NUMBER", label: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }
3759
+ ],
3760
+ type,
3761
+ arrayData,
3762
+ setArrayData
3763
+ }) {
3764
+ const [valueSwitch, setValueSwitch] = useState13("TEXT");
3765
+ const [cacheData, setCacheData] = useState13({
3766
+ indicatorType: type,
3767
+ inputType: valueSwitch,
3768
+ textValue: "",
3769
+ numberValue: "",
3770
+ unit: ""
3771
+ });
3772
+ const [cacheEditData, setCacheEditData] = useState13({
3773
+ indicatorType: type,
3774
+ inputType: valueSwitch,
3775
+ textValue: "",
3776
+ numberValue: "",
3777
+ unit: ""
3778
+ });
3779
+ const [editIndex, setEditIndex] = useState13(null);
3780
+ const handleAddIndicator = () => {
3781
+ if (cacheData.textValue.trim() === "") return;
3782
+ setArrayData([
3783
+ ...arrayData,
3784
+ valueSwitch === "TEXT" ? {
3785
+ indicatorType: type,
3786
+ inputType: "TEXT",
3787
+ textValue: cacheData.textValue
3788
+ } : cacheData
3789
+ ]);
3790
+ setCacheData({
3791
+ indicatorType: type,
3792
+ inputType: valueSwitch,
3793
+ textValue: "",
3794
+ numberValue: "",
3795
+ unit: ""
3796
+ });
3797
+ };
3798
+ const handleChangeCashData = (key, value) => {
3799
+ setCacheData((prev) => ({
3800
+ ...prev,
3801
+ [key]: value
3802
+ }));
3803
+ console.log(cacheData);
3804
+ };
3805
+ const handleClick = (active) => {
3806
+ handleChangeCashData("inputType", active);
3807
+ setValueSwitch(active);
3808
+ };
3809
+ const handleDeleteIndicator = (index) => {
3810
+ const newData = arrayData.filter((_, i) => i !== index);
3811
+ setArrayData(newData);
3812
+ setEditIndex(null);
3813
+ };
3814
+ const handleEditIndicator = (index) => {
3815
+ setCacheEditData(arrayData[index]);
3816
+ setEditIndex(index);
3817
+ };
3818
+ const handleCancelEditIndicator = () => {
3819
+ setEditIndex(null);
3820
+ };
3821
+ const handleConfirmEditIndicator = (index) => {
3822
+ if (cacheEditData.textValue.trim() === "") return;
3823
+ const newData = [...arrayData];
3824
+ newData[index] = cacheEditData;
3825
+ setArrayData(newData);
3826
+ setEditIndex(null);
3827
+ };
3828
+ const handleChangeEditCashData = (e) => {
3829
+ const { name, value } = e.target;
3830
+ setCacheEditData((prev) => ({
3831
+ ...prev,
3832
+ [name]: value
3833
+ }));
3834
+ console.log(cacheEditData);
3835
+ };
3836
+ return /* @__PURE__ */ jsxs36("div", { className: "w-full", children: [
3837
+ /* @__PURE__ */ jsxs36(
3838
+ "div",
3839
+ {
3840
+ className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
3841
+ children: [
3842
+ /* @__PURE__ */ jsx42(SwitchSelect, { option, onClick: handleClick, value: valueSwitch, label: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17", required: true }),
3843
+ /* @__PURE__ */ jsx42(
3844
+ InputField,
3845
+ {
3846
+ label: `\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
3847
+ value: cacheData.textValue,
3848
+ className: "h-[32px]",
3849
+ onChange: (e) => handleChangeCashData("textValue", String(e)),
3850
+ placeholder: `\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
3851
+ required: true
3852
+ }
3853
+ ),
3854
+ valueSwitch === "NUMBER" && /* @__PURE__ */ jsxs36(Fragment7, { children: [
3855
+ /* @__PURE__ */ jsx42(
3856
+ InputFieldNumber,
3857
+ {
3858
+ label: `\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
3859
+ value: cacheData.numberValue ?? "",
3860
+ className: "h-[32px]",
3861
+ onChange: (e) => handleChangeCashData("numberValue", String(e)),
3862
+ placeholder: `\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
3863
+ required: true
3864
+ }
3865
+ ),
3866
+ /* @__PURE__ */ jsx42(
3867
+ InputField,
3868
+ {
3869
+ label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
3870
+ value: cacheData.unit ?? "",
3871
+ className: "h-[32px]",
3872
+ onChange: (e) => handleChangeCashData("unit", String(e)),
3873
+ placeholder: "\u0E23\u0E30\u0E1A\u0E38\u0E2B\u0E19\u0E48\u0E27\u0E22",
3874
+ required: true
3875
+ }
3876
+ )
3877
+ ] }),
3878
+ /* @__PURE__ */ jsx42(IconCirclePlus2, { onClick: handleAddIndicator, className: "mt-7 cursor-pointer", size: 32 })
3879
+ ]
3880
+ }
3881
+ ),
3882
+ /* @__PURE__ */ jsx42(Fragment7, { children: arrayData.map((item, index) => /* @__PURE__ */ jsxs36(
3883
+ "div",
3884
+ {
3885
+ className: `space-y-4 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
3886
+ children: [
3887
+ /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
3888
+ index === editIndex ? /* @__PURE__ */ jsx42(
3889
+ Input4,
3890
+ {
3891
+ className: "body-1 mt-2",
3892
+ variant: "underlined",
3893
+ value: cacheEditData.textValue,
3894
+ name: "textValue",
3895
+ onChange: (e) => handleChangeEditCashData(e)
3896
+ }
3897
+ ) : /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.textValue }),
3898
+ item.inputType === "NUMBER" && /* @__PURE__ */ jsxs36(Fragment7, { children: [
3899
+ index === editIndex ? /* @__PURE__ */ jsx42(
3900
+ Input4,
3901
+ {
3902
+ className: "body-1 mt-2",
3903
+ variant: "underlined",
3904
+ value: cacheEditData.numberValue,
3905
+ name: "numberValue",
3906
+ onChange: (e) => handleChangeEditCashData(e)
3907
+ }
3908
+ ) : /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.numberValue }),
3909
+ index === editIndex ? /* @__PURE__ */ jsx42(
3910
+ Input4,
3911
+ {
3912
+ className: "body-1 mt-2",
3913
+ variant: "underlined",
3914
+ value: cacheEditData.unit,
3915
+ name: "unit",
3916
+ onChange: (e) => handleChangeEditCashData(e)
3917
+ }
3918
+ ) : /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.unit })
3919
+ ] }),
3920
+ /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ jsxs36("div", { className: "flex", children: [
3921
+ /* @__PURE__ */ jsx42(
3922
+ IconCheck3,
3923
+ {
3924
+ className: "cursor-pointer text-green-600",
3925
+ onClick: () => handleConfirmEditIndicator(index)
3926
+ }
3927
+ ),
3928
+ /* @__PURE__ */ jsx42(IconX3, { className: "cursor-pointer text-red-600", onClick: handleCancelEditIndicator })
3929
+ ] }) : void 0 : /* @__PURE__ */ jsx42(IconPencil2, { className: "cursor-pointer", onClick: () => handleEditIndicator(index) }) }),
3930
+ /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ jsx42(IconTrash4, { onClick: () => handleDeleteIndicator(index) }) })
3931
+ ]
3932
+ }
3933
+ )) })
3934
+ ] });
3935
+ }
3936
+
3937
+ // src/FilterPopUp/FilterPopUp.tsx
3938
+ import { IconCheck as IconCheck4, IconFilter as IconFilter2, IconTrash as IconTrash5 } from "@tabler/icons-react";
3939
+ import { useState as useState14 } from "react";
3940
+ import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
3941
+ var FilterPopUp = (filter) => {
3942
+ const [isAction, setIsAction] = useState14(true);
3943
+ const [filterArray, setFilterArray] = useState14([""]);
3944
+ const handleClearFilter = () => {
3945
+ setFilterArray([]);
3946
+ };
3947
+ const handleSubmitFilter = () => {
3948
+ filter.handleSearch(filterArray);
3949
+ };
3950
+ return /* @__PURE__ */ jsxs37("div", { className: "relative", children: [
3951
+ /* @__PURE__ */ jsxs37("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
3952
+ /* @__PURE__ */ jsx43(IconFilter2, {}),
3953
+ "filter"
3954
+ ] }),
3955
+ isAction ? /* @__PURE__ */ jsxs37("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
3956
+ /* @__PURE__ */ jsxs37("div", { className: "flex justify-end", children: [
3957
+ /* @__PURE__ */ jsxs37("div", { className: "flex justify-end text-nowrap gap-2", children: [
3958
+ /* @__PURE__ */ jsx43(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ jsx43(IconCheck4, {}) }),
3959
+ /* @__PURE__ */ jsx43(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ jsx43(IconTrash5, {}) })
3960
+ ] }),
3961
+ ""
3962
+ ] }),
3963
+ /* @__PURE__ */ jsx43(
3964
+ SelectCustom,
3965
+ {
3966
+ options: filter.selectionFilter,
3967
+ onChange: (list) => setFilterArray(list),
3968
+ label: "\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01"
3969
+ }
3970
+ )
3971
+ ] }) : void 0
3972
+ ] });
3973
+ };
3597
3974
  export {
3975
+ AntDModal,
3598
3976
  AntDataTable,
3599
3977
  Breadcrumbs,
3600
3978
  Calendar,
@@ -3606,9 +3984,12 @@ export {
3606
3984
  DatePickerBasic,
3607
3985
  DatePickerRangePicker,
3608
3986
  FileUploader,
3987
+ FilterPopUp,
3609
3988
  GhostButton,
3610
3989
  HeadingPage,
3990
+ Indicator,
3611
3991
  InputField,
3992
+ InputFieldNumber,
3612
3993
  KpiSection,
3613
3994
  Loader,
3614
3995
  MenuNavBar,
@@ -3626,6 +4007,8 @@ export {
3626
4007
  Sidebar,
3627
4008
  SortFilter,
3628
4009
  Switch,
4010
+ SwitchSelect,
4011
+ TabSelectionButton,
3629
4012
  TextAreaInput,
3630
4013
  TextInput,
3631
4014
  TimePickerBasic,