@eztrak/shared 0.11.0 → 0.12.0

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.
@@ -33,6 +33,7 @@ __export(components_exports, {
33
33
  CardSkeleton: () => CardSkeleton,
34
34
  CustomCellEditor: () => CustomCellEditor,
35
35
  CustomPagination: () => CustomPagination,
36
+ DropdownFilter: () => DropdownFilter,
36
37
  EztrakTabs: () => EztrakTabs,
37
38
  Loader: () => Loader,
38
39
  Modal: () => Modal,
@@ -41,7 +42,8 @@ __export(components_exports, {
41
42
  SearchInput: () => SearchInput,
42
43
  TableLayoutToolbarControls: () => TableLayoutToolbarControls,
43
44
  ToolTip: () => ToolTip,
44
- TooltipText: () => TooltipText
45
+ TooltipText: () => TooltipText,
46
+ dropdownStyles: () => dropdownStyles
45
47
  });
46
48
  module.exports = __toCommonJS(components_exports);
47
49
 
@@ -671,9 +673,119 @@ function CustomPagination({
671
673
  );
672
674
  }
673
675
 
674
- // src/components/search-filters/ResetFiltersButton.tsx
676
+ // src/components/search-filters/DropdownFilter.tsx
677
+ var import_react_select = __toESM(require("react-select"));
675
678
  var import_react_router_dom2 = require("react-router-dom");
679
+
680
+ // src/components/search-filters/dropdownStyles.ts
681
+ var themeColors = {
682
+ primary: "#FF7335",
683
+ primaryHover: "#E65C2E",
684
+ lightBackground: "#FFF3EB",
685
+ textColor: "black",
686
+ white: "white"
687
+ };
688
+ var dropdownStyles = (_borderRadius = "5px") => ({
689
+ control: (provided, state) => ({
690
+ ...provided,
691
+ fontSize: "14px",
692
+ padding: "4px 8px",
693
+ minWidth: "180px",
694
+ borderRadius: "5px",
695
+ cursor: "pointer",
696
+ borderColor: state.isFocused ? themeColors.primary : "#e0e0e0",
697
+ boxShadow: state.isFocused ? "0 0 0 2px rgba(255, 115, 53, 0.3)" : "none",
698
+ "&:hover": {
699
+ borderColor: themeColors.primary
700
+ },
701
+ transition: "border-color 0.2s, box-shadow 0.2s",
702
+ zIndex: 50
703
+ }),
704
+ option: (provided, state) => ({
705
+ ...provided,
706
+ fontSize: "14px",
707
+ backgroundColor: state.isSelected ? themeColors.primary : state.isFocused ? themeColors.lightBackground : themeColors.white,
708
+ borderRadius: "5px",
709
+ cursor: "pointer",
710
+ borderColor: state.isFocused ? themeColors.primary : "#e0e0e0",
711
+ color: state.isSelected ? themeColors.white : state.isFocused ? themeColors.primary : themeColors.textColor,
712
+ "&:hover": {
713
+ backgroundColor: themeColors.lightBackground,
714
+ color: themeColors.primary
715
+ },
716
+ "&:active": {
717
+ backgroundColor: themeColors.primary,
718
+ color: themeColors.white
719
+ },
720
+ transition: "background-color 0.2s, color 0.2s",
721
+ zIndex: 50
722
+ }),
723
+ singleValue: (provided) => ({
724
+ ...provided,
725
+ color: themeColors.textColor,
726
+ zIndex: 50
727
+ }),
728
+ menu: (provided) => ({
729
+ ...provided,
730
+ borderRadius: "5px",
731
+ boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
732
+ marginTop: "4px",
733
+ zIndex: 50
734
+ }),
735
+ dropdownIndicator: (provided) => ({
736
+ ...provided,
737
+ color: themeColors.primary,
738
+ "&:hover": {
739
+ color: themeColors.primaryHover
740
+ },
741
+ zIndex: 50
742
+ }),
743
+ indicatorSeparator: () => ({
744
+ display: "none"
745
+ })
746
+ });
747
+
748
+ // src/components/search-filters/DropdownFilter.tsx
676
749
  var import_jsx_runtime3 = require("react/jsx-runtime");
750
+ function DropdownFilter({
751
+ name,
752
+ valueKey = "id",
753
+ options,
754
+ placeholder,
755
+ borderRadius = "20px",
756
+ ...otherProps
757
+ }) {
758
+ const [searchParams, setSearchParams] = (0, import_react_router_dom2.useSearchParams)();
759
+ const currentValue = searchParams.get(name);
760
+ const selectedOption = currentValue ? options?.find(
761
+ (option) => option[valueKey]?.toString() === currentValue
762
+ ) ?? null : null;
763
+ const handleChange = (selected) => {
764
+ setSearchParams((prev) => {
765
+ if (!selected || selected[valueKey] === "") {
766
+ prev.delete(name);
767
+ } else {
768
+ prev.set(name, String(selected[valueKey]));
769
+ }
770
+ return prev;
771
+ });
772
+ };
773
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
774
+ import_react_select.default,
775
+ {
776
+ placeholder: placeholder ?? `Select ${name}`,
777
+ value: selectedOption,
778
+ onChange: handleChange,
779
+ options,
780
+ styles: dropdownStyles(borderRadius),
781
+ ...otherProps
782
+ }
783
+ );
784
+ }
785
+
786
+ // src/components/search-filters/ResetFiltersButton.tsx
787
+ var import_react_router_dom3 = require("react-router-dom");
788
+ var import_jsx_runtime4 = require("react/jsx-runtime");
677
789
  var BASE_STYLES = "inline-flex items-center gap-1.5 px-5 py-3 rounded-md text-sm font-medium transition-colors duration-200 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50";
678
790
  var VARIANTS = {
679
791
  primary: "bg-white text-secondary border border-secondary hover:bg-lightGray hover:text-black",
@@ -688,7 +800,7 @@ function ResetIcon({
688
800
  size = 16,
689
801
  className
690
802
  }) {
691
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
803
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
692
804
  "svg",
693
805
  {
694
806
  width: size,
@@ -702,10 +814,10 @@ function ResetIcon({
702
814
  "aria-hidden": "true",
703
815
  className,
704
816
  children: [
705
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
706
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 3v5h-5" }),
707
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
708
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 16H3v5" })
817
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
818
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 3v5h-5" }),
819
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
820
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8 16H3v5" })
709
821
  ]
710
822
  }
711
823
  );
@@ -719,13 +831,13 @@ function ResetFiltersButton({
719
831
  onReset,
720
832
  disabled = false
721
833
  }) {
722
- const [, setSearchParams] = (0, import_react_router_dom2.useSearchParams)();
834
+ const [, setSearchParams] = (0, import_react_router_dom3.useSearchParams)();
723
835
  const handleReset = () => {
724
836
  setSearchParams({}, { replace: true });
725
837
  onReset?.();
726
838
  };
727
- const resolvedIcon = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ResetIcon, { size: 16 }) : icon;
728
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
839
+ const resolvedIcon = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ResetIcon, { size: 16 }) : icon;
840
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
729
841
  "button",
730
842
  {
731
843
  type: "button",
@@ -743,8 +855,8 @@ function ResetFiltersButton({
743
855
  // src/components/search-filters/SearchInput.tsx
744
856
  var import_react2 = require("react");
745
857
  var import_fi = require("react-icons/fi");
746
- var import_react_router_dom3 = require("react-router-dom");
747
- var import_jsx_runtime4 = require("react/jsx-runtime");
858
+ var import_react_router_dom4 = require("react-router-dom");
859
+ var import_jsx_runtime5 = require("react/jsx-runtime");
748
860
  function SearchInput({
749
861
  placeholder = "Search...",
750
862
  searchBtn = "",
@@ -761,7 +873,7 @@ function SearchInput({
761
873
  defaultValue,
762
874
  ...props
763
875
  }) {
764
- const [searchParams, setSearchParams] = (0, import_react_router_dom3.useSearchParams)();
876
+ const [searchParams, setSearchParams] = (0, import_react_router_dom4.useSearchParams)();
765
877
  const queryParam = searchParams.get(defaultParam) || defaultValue || "";
766
878
  const [inputValue, setInputValue] = (0, import_react2.useState)(queryParam);
767
879
  const debounceTimerRef = (0, import_react2.useRef)(null);
@@ -813,7 +925,7 @@ function SearchInput({
813
925
  }
814
926
  };
815
927
  }, []);
816
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
928
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
817
929
  "form",
818
930
  {
819
931
  onSubmit: handleSearch,
@@ -822,7 +934,7 @@ function SearchInput({
822
934
  searchWrapperClass
823
935
  ),
824
936
  children: [
825
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
937
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
826
938
  "button",
827
939
  {
828
940
  type: "submit",
@@ -830,7 +942,7 @@ function SearchInput({
830
942
  "bg-white text-secondary rounded-full flex items-center justify-center w-10 h-10",
831
943
  searchBtn
832
944
  ),
833
- children: customIcon ? customIcon : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
945
+ children: customIcon ? customIcon : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
834
946
  import_fi.FiSearch,
835
947
  {
836
948
  className: cn("h-5 w-5 text-gray-400", searchIconClassName)
@@ -838,7 +950,7 @@ function SearchInput({
838
950
  )
839
951
  }
840
952
  ),
841
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
953
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
842
954
  "input",
843
955
  {
844
956
  value: inputValue,
@@ -863,9 +975,9 @@ var import_fa = require("react-icons/fa");
863
975
  var import_io5 = require("react-icons/io5");
864
976
 
865
977
  // src/components/Loader/Loader.tsx
866
- var import_jsx_runtime5 = require("react/jsx-runtime");
978
+ var import_jsx_runtime6 = require("react/jsx-runtime");
867
979
  var Loader = ({ className, color = "#F54C00", size = "50px", speed = "1s" }) => {
868
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: `loader`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
980
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `loader`, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
869
981
  "div",
870
982
  {
871
983
  className: `spinner ${className}`,
@@ -882,7 +994,7 @@ var Loader = ({ className, color = "#F54C00", size = "50px", speed = "1s" }) =>
882
994
  };
883
995
 
884
996
  // src/components/modal/Modal.tsx
885
- var import_jsx_runtime6 = require("react/jsx-runtime");
997
+ var import_jsx_runtime7 = require("react/jsx-runtime");
886
998
  function Modal({
887
999
  isOpen,
888
1000
  onClose,
@@ -923,7 +1035,7 @@ function Modal({
923
1035
  document.body.style.overflow = "unset";
924
1036
  };
925
1037
  }, [isOpen, onClose, closeOnEscape]);
926
- const modalContent = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_framer_motion.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1038
+ const modalContent = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_framer_motion.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
927
1039
  "div",
928
1040
  {
929
1041
  className: "fixed inset-0 bg-gray-500 bg-opacity-50 flex justify-center items-center z-1000 p-4",
@@ -942,7 +1054,7 @@ function Modal({
942
1054
  zIndex
943
1055
  },
944
1056
  children: [
945
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1057
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
946
1058
  import_framer_motion.motion.div,
947
1059
  {
948
1060
  ref: modalRef,
@@ -963,7 +1075,7 @@ function Modal({
963
1075
  // Ensure modal doesn't exceed viewport height
964
1076
  },
965
1077
  children: [
966
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1078
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
967
1079
  "div",
968
1080
  {
969
1081
  style: {
@@ -971,43 +1083,43 @@ function Modal({
971
1083
  },
972
1084
  className: "sticky top-0 z-10 flex justify-between items-center bg-white text-2xl p-8 pb-4 rounded-t-3xl",
973
1085
  children: [
974
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "font-semibold", children: title }),
975
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center space-x-4", children: [
976
- onPrint && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1086
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "font-semibold", children: title }),
1087
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-4", children: [
1088
+ onPrint && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
977
1089
  "button",
978
1090
  {
979
1091
  onClick: onPrint,
980
1092
  className: "flex items-center gap-1 hover:text-gray-300 text-sm border p-1 rounded",
981
1093
  children: [
982
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fa.FaPrint, { name: "FaPrint" }),
983
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "Print" })
1094
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_fa.FaPrint, { name: "FaPrint" }),
1095
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "Print" })
984
1096
  ]
985
1097
  }
986
1098
  ),
987
- onExport && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1099
+ onExport && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
988
1100
  "button",
989
1101
  {
990
1102
  onClick: onExport,
991
1103
  className: "flex items-center gap-1 hover:text-gray-300 text-sm border p-1 rounded",
992
1104
  children: [
993
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fa.FaFileExport, {}),
994
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "Export" })
1105
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_fa.FaFileExport, {}),
1106
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "Export" })
995
1107
  ]
996
1108
  }
997
1109
  ),
998
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1110
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
999
1111
  "button",
1000
1112
  {
1001
1113
  onClick: onClose,
1002
1114
  className: "px-2 hover:opacity-70 transition-opacity",
1003
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_io5.IoCloseCircleOutline, { color: "#8898AA", size: 25 })
1115
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_io5.IoCloseCircleOutline, { color: "#8898AA", size: 25 })
1004
1116
  }
1005
1117
  )
1006
1118
  ] })
1007
1119
  ]
1008
1120
  }
1009
1121
  ),
1010
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1122
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1011
1123
  "div",
1012
1124
  {
1013
1125
  className: cn(
@@ -1017,7 +1129,7 @@ function Modal({
1017
1129
  children
1018
1130
  }
1019
1131
  ),
1020
- footer && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1132
+ footer && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1021
1133
  "div",
1022
1134
  {
1023
1135
  className: cn("sticky bottom-0 flex justify-end p-4 space-x-4 border-t bg-white ", footerClassName),
@@ -1031,7 +1143,7 @@ function Modal({
1031
1143
  ]
1032
1144
  }
1033
1145
  ),
1034
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1146
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1035
1147
  "div",
1036
1148
  {
1037
1149
  className: "fixed inset-0 flex items-center justify-center bg-gray-200/60",
@@ -1040,7 +1152,7 @@ function Modal({
1040
1152
  "aria-live": "polite",
1041
1153
  role: "status",
1042
1154
  onClick: (e) => e.stopPropagation(),
1043
- children: customLoader ? customLoader : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Loader, { size: "48px" })
1155
+ children: customLoader ? customLoader : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Loader, { size: "48px" })
1044
1156
  }
1045
1157
  )
1046
1158
  ]
@@ -1056,7 +1168,7 @@ function Modal({
1056
1168
  }
1057
1169
 
1058
1170
  // src/components/skeleton/CardSkeleton.tsx
1059
- var import_jsx_runtime7 = require("react/jsx-runtime");
1171
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1060
1172
  var DEFAULT_LINE_WIDTHS = ["w-32", "w-48"];
1061
1173
  function shouldShowAvatar(variant, showAvatar) {
1062
1174
  return showAvatar ?? variant === "profile";
@@ -1065,7 +1177,7 @@ function shouldShowImage(variant, showImage) {
1065
1177
  return showImage ?? variant === "image";
1066
1178
  }
1067
1179
  function AvatarSkeleton({ className }) {
1068
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1180
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1069
1181
  "svg",
1070
1182
  {
1071
1183
  className: cn("w-10 h-10 text-gray-200 dark:text-gray-700", className),
@@ -1073,7 +1185,7 @@ function AvatarSkeleton({ className }) {
1073
1185
  xmlns: "http://www.w3.org/2000/svg",
1074
1186
  fill: "currentColor",
1075
1187
  viewBox: "0 0 20 20",
1076
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z" })
1188
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z" })
1077
1189
  }
1078
1190
  );
1079
1191
  }
@@ -1082,7 +1194,7 @@ function SkeletonBlock({
1082
1194
  className,
1083
1195
  isFirst
1084
1196
  }) {
1085
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1197
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1086
1198
  "div",
1087
1199
  {
1088
1200
  className: cn(
@@ -1114,14 +1226,14 @@ function CardSkeleton({
1114
1226
  const skeletons = Array.from({ length: Math.max(1, count) }, (_, index) => {
1115
1227
  const renderAvatar = shouldShowAvatar(variant, showAvatar);
1116
1228
  const renderImage = shouldShowImage(variant, showImage);
1117
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1229
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1118
1230
  "div",
1119
1231
  {
1120
1232
  className: cn("animate-pulse md:p-6 dark:border-gray-700", className),
1121
1233
  style: { animationDuration, ...style },
1122
1234
  ...props,
1123
1235
  children: [
1124
- renderImage ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1236
+ renderImage ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1125
1237
  "div",
1126
1238
  {
1127
1239
  className: cn(
@@ -1130,9 +1242,9 @@ function CardSkeleton({
1130
1242
  )
1131
1243
  }
1132
1244
  ) : null,
1133
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex items-center mt-4 gap-4", contentClassName), children: [
1134
- renderAvatar ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AvatarSkeleton, { className: avatarClassName }) : null,
1135
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: Array.from({ length: Math.max(1, lines) }, (_2, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1245
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex items-center mt-4 gap-4", contentClassName), children: [
1246
+ renderAvatar ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AvatarSkeleton, { className: avatarClassName }) : null,
1247
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: Array.from({ length: Math.max(1, lines) }, (_2, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1136
1248
  SkeletonBlock,
1137
1249
  {
1138
1250
  widthClass: lineWidths[lineIndex] ?? lineWidths[lineWidths.length - 1] ?? DEFAULT_LINE_WIDTHS[1],
@@ -1142,19 +1254,19 @@ function CardSkeleton({
1142
1254
  lineIndex
1143
1255
  )) })
1144
1256
  ] }),
1145
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: srLabel })
1257
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sr-only", children: srLabel })
1146
1258
  ]
1147
1259
  },
1148
1260
  index
1149
1261
  );
1150
1262
  });
1151
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: skeletons });
1263
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: skeletons });
1152
1264
  }
1153
1265
 
1154
1266
  // src/components/tooltip/ToolTip.tsx
1155
1267
  var import_react4 = require("react");
1156
1268
  var import_react_tooltip = require("react-tooltip");
1157
- var import_jsx_runtime8 = require("react/jsx-runtime");
1269
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1158
1270
  var defaultTooltipStyle = {
1159
1271
  color: "#fff",
1160
1272
  borderRadius: "5px",
@@ -1181,10 +1293,10 @@ function ToolTip({
1181
1293
  const tooltipId = `eztrak-tooltip-${generatedId.replace(/:/g, "")}`;
1182
1294
  const tooltipText = String(text ?? "");
1183
1295
  if (disabled || !tooltipText) {
1184
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className, children });
1296
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className, children });
1185
1297
  }
1186
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1187
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1298
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1299
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1188
1300
  "span",
1189
1301
  {
1190
1302
  className,
@@ -1194,7 +1306,7 @@ function ToolTip({
1194
1306
  children
1195
1307
  }
1196
1308
  ),
1197
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1309
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1198
1310
  import_react_tooltip.Tooltip,
1199
1311
  {
1200
1312
  id: tooltipId,
@@ -1238,7 +1350,7 @@ var toDateInputValue = (date) => {
1238
1350
  };
1239
1351
 
1240
1352
  // src/components/tooltip/TooltipText.tsx
1241
- var import_jsx_runtime9 = require("react/jsx-runtime");
1353
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1242
1354
  function TooltipText({
1243
1355
  text = "",
1244
1356
  maxLength = 20,
@@ -1258,7 +1370,7 @@ function TooltipText({
1258
1370
  const displayText = truncateText(fullText, maxLength);
1259
1371
  const isTruncated = displayText !== fullText;
1260
1372
  const tooltipDisabled = !showTooltip || !hasValue || tooltipWhenTruncatedOnly && !isTruncated;
1261
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1373
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1262
1374
  ToolTip,
1263
1375
  {
1264
1376
  text: fullText,
@@ -1270,7 +1382,7 @@ function TooltipText({
1270
1382
  tooltipStyle,
1271
1383
  wrapperTabIndex: tooltipDisabled ? void 0 : 0,
1272
1384
  disabled: tooltipDisabled,
1273
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn("inline-block max-w-full align-bottom", textClassName), children: displayText })
1385
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: cn("inline-block max-w-full align-bottom", textClassName), children: displayText })
1274
1386
  }
1275
1387
  );
1276
1388
  }
@@ -1278,9 +1390,9 @@ function TooltipText({
1278
1390
  // src/components/cell-editor/CustomCellEditor.tsx
1279
1391
  var import_react5 = require("react");
1280
1392
  var import_react_hot_toast2 = __toESM(require("react-hot-toast"));
1281
- var import_jsx_runtime10 = require("react/jsx-runtime");
1393
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1282
1394
  function ButtonSpinner() {
1283
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1395
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1284
1396
  "svg",
1285
1397
  {
1286
1398
  className: "animate-spin",
@@ -1290,7 +1402,7 @@ function ButtonSpinner() {
1290
1402
  fill: "none",
1291
1403
  "aria-hidden": true,
1292
1404
  children: [
1293
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1405
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1294
1406
  "circle",
1295
1407
  {
1296
1408
  cx: "12",
@@ -1301,7 +1413,7 @@ function ButtonSpinner() {
1301
1413
  strokeOpacity: "0.25"
1302
1414
  }
1303
1415
  ),
1304
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1416
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1305
1417
  "path",
1306
1418
  {
1307
1419
  d: "M12 2a10 10 0 0 1 10 10",
@@ -1437,7 +1549,7 @@ var CustomCellEditor = (0, import_react5.forwardRef)(
1437
1549
  const defaultInputClass = "w-48 px-2 py-1 text-sm border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-1 focus:ring-blue-400";
1438
1550
  const defaultSaveBtnClass = "px-3 py-1 text-sm font-medium text-white bg-green-500 rounded-md hover:bg-green-600 disabled:opacity-50 whitespace-nowrap shrink-0";
1439
1551
  const defaultCancelBtnClass = "px-3 py-1 text-sm font-medium text-white bg-red-500 rounded-md hover:bg-red-600 disabled:opacity-50 whitespace-nowrap shrink-0";
1440
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1552
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1441
1553
  "div",
1442
1554
  {
1443
1555
  className: cn(
@@ -1446,7 +1558,7 @@ var CustomCellEditor = (0, import_react5.forwardRef)(
1446
1558
  ),
1447
1559
  style: containerStyle,
1448
1560
  children: [
1449
- isDropdown ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1561
+ isDropdown ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1450
1562
  "select",
1451
1563
  {
1452
1564
  ref: selectRef,
@@ -1456,11 +1568,11 @@ var CustomCellEditor = (0, import_react5.forwardRef)(
1456
1568
  className: inputClassName ?? defaultInputClass,
1457
1569
  disabled: isLoading,
1458
1570
  children: [
1459
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "", disabled: true, children: "Select option..." }),
1460
- normalizedOptions.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
1571
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "", disabled: true, children: "Select option..." }),
1572
+ normalizedOptions.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
1461
1573
  ]
1462
1574
  }
1463
- ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1575
+ ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1464
1576
  "input",
1465
1577
  {
1466
1578
  ref: inputRef,
@@ -1473,7 +1585,7 @@ var CustomCellEditor = (0, import_react5.forwardRef)(
1473
1585
  disabled: isLoading
1474
1586
  }
1475
1587
  ),
1476
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1588
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1477
1589
  "button",
1478
1590
  {
1479
1591
  type: "button",
@@ -1482,10 +1594,10 @@ var CustomCellEditor = (0, import_react5.forwardRef)(
1482
1594
  className: saveButtonClassName ?? (saveButtonStyle ? void 0 : defaultSaveBtnClass),
1483
1595
  style: saveButtonStyle,
1484
1596
  title: "Save (Enter)",
1485
- children: isLoading ? loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ButtonSpinner, {}) : saveButtonContent ?? "Save"
1597
+ children: isLoading ? loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ButtonSpinner, {}) : saveButtonContent ?? "Save"
1486
1598
  }
1487
1599
  ),
1488
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1600
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1489
1601
  "button",
1490
1602
  {
1491
1603
  type: "button",
@@ -1508,6 +1620,7 @@ CustomCellEditor.displayName = "CustomCellEditor";
1508
1620
  CardSkeleton,
1509
1621
  CustomCellEditor,
1510
1622
  CustomPagination,
1623
+ DropdownFilter,
1511
1624
  EztrakTabs,
1512
1625
  Loader,
1513
1626
  Modal,
@@ -1516,6 +1629,7 @@ CustomCellEditor.displayName = "CustomCellEditor";
1516
1629
  SearchInput,
1517
1630
  TableLayoutToolbarControls,
1518
1631
  ToolTip,
1519
- TooltipText
1632
+ TooltipText,
1633
+ dropdownStyles
1520
1634
  });
1521
1635
  //# sourceMappingURL=index.js.map