dhre-component-lib 0.5.9 → 0.6.2

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.
@@ -3,15 +3,13 @@ import "./Tabs.module.scss";
3
3
  type Tab = {
4
4
  name: string;
5
5
  value: string;
6
+ count?: number;
6
7
  };
7
8
  interface TabsProps {
8
9
  tabs: Tab[];
9
10
  onTabChange: (selectedTab: Tab) => void;
10
11
  selectedTabValue?: string;
11
12
  dot?: boolean;
12
- installmentsOverdue?: boolean;
13
- otherchargesOverdue?: boolean;
14
- OverdueDotImg?: any;
15
13
  }
16
14
  declare const Tabs: React.FC<TabsProps>;
17
15
  export default Tabs;
package/dist/index.d.ts CHANGED
@@ -270,15 +270,13 @@ declare const Accordion: React.FC<AccordionProps>;
270
270
  type Tab = {
271
271
  name: string;
272
272
  value: string;
273
+ count?: number;
273
274
  };
274
275
  interface TabsProps {
275
276
  tabs: Tab[];
276
277
  onTabChange: (selectedTab: Tab) => void;
277
278
  selectedTabValue?: string;
278
279
  dot?: boolean;
279
- installmentsOverdue?: boolean;
280
- otherchargesOverdue?: boolean;
281
- OverdueDotImg?: any;
282
280
  }
283
281
  declare const Tabs: React.FC<TabsProps>;
284
282
 
package/dist/index.esm.js CHANGED
@@ -9394,6 +9394,7 @@ const OTPInput = ({ length = 4, onChange, autoFocus = false, onResend, resendDel
9394
9394
  useEffect(() => {
9395
9395
  if (error) {
9396
9396
  setTimer(0);
9397
+ setOtp(Array(length).fill(""));
9397
9398
  }
9398
9399
  }, [error]);
9399
9400
  function getReadableStatus() {
@@ -9557,10 +9558,10 @@ const Accordion = ({ icon, title, description, children, border = false, upArrow
9557
9558
  isOpen && (React__default.createElement("div", { className: "accordion-content" }, children))));
9558
9559
  };
9559
9560
 
9560
- var css$a = ".tabs {\n display: flex;\n}\n\n.tab {\n padding: 12px;\n cursor: pointer;\n background-color: transparent;\n border: none;\n color: #a7a7a7;\n border-bottom: 2px solid transparent;\n transition: border-bottom 0.3s ease;\n font-size: 18px;\n display: flex;\n align-items: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n gap: 0.5rem;\n}\n\n.tab.active {\n border-bottom: 2px solid #000000;\n color: #000000;\n}\n\n.tab.inActive {\n border-bottom: 1px solid #e1e1e1;\n}\n\n.tab:hover {\n color: #000000;\n}\n\n.main {\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.main::-webkit-scrollbar {\n display: none;\n}\n\n@media (max-width: 767px) {\n .tab {\n font-size: 14px;\n }\n .main {\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n }\n .main::-webkit-scrollbar {\n display: none;\n }\n}\n.dot {\n display: inline-block !important;\n width: 8px !important;\n height: 8px !important;\n background-color: red !important;\n border-radius: 50% !important;\n margin-left: 5px !important;\n}";
9561
+ var css$a = ".tabs {\n display: flex;\n}\n\n.tab {\n padding: 12px;\n cursor: pointer;\n background-color: transparent;\n border: none;\n color: #a7a7a7;\n border-bottom: 2px solid transparent;\n transition: border-bottom 0.3s ease;\n font-size: 18px;\n display: flex;\n align-items: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n gap: 0.5rem;\n}\n\n.tab.active {\n border-bottom: 2px solid #000000;\n color: #000000;\n}\n\n.tab.inActive {\n border-bottom: 1px solid #e1e1e1;\n}\n\n.tab:hover {\n color: #000000;\n}\n\n.main {\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.main::-webkit-scrollbar {\n display: none;\n}\n\n@media (max-width: 767px) {\n .tab {\n font-size: 14px;\n }\n .main {\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n }\n .main::-webkit-scrollbar {\n display: none;\n }\n}\n.dot {\n display: inline-block !important;\n width: 8px !important;\n height: 8px !important;\n background-color: red !important;\n border-radius: 50% !important;\n margin-left: 5px !important;\n}\n\n.counts {\n background-color: #d92d27;\n border-radius: 1.5rem;\n font-size: 18px;\n color: #ffffff;\n padding: 1px;\n width: 2rem;\n height: 1.5rem;\n}";
9561
9562
  n(css$a,{});
9562
9563
 
9563
- const Tabs = ({ tabs, onTabChange, selectedTabValue, dot, installmentsOverdue, otherchargesOverdue, OverdueDotImg }) => {
9564
+ const Tabs = ({ tabs, onTabChange, selectedTabValue, dot }) => {
9564
9565
  const [selectedTab, setSelectedTab] = useState();
9565
9566
  const haveDots = ["identification", "", ""];
9566
9567
  useEffect(() => {
@@ -9585,11 +9586,11 @@ const Tabs = ({ tabs, onTabChange, selectedTabValue, dot, installmentsOverdue, o
9585
9586
  React__default.createElement("button", { key: tab?.value, className: `tab ${selectedTab?.value === tab?.value ? "active" : "inActive"}`, onClick: () => handleTabClick(tab) },
9586
9587
  tab?.name,
9587
9588
  dot && haveDots.includes(tab.value.toLowerCase()) && (React__default.createElement("span", { className: "dot" })),
9588
- tab?.value == "Installments" && installmentsOverdue && React__default.createElement(OverdueDotImg, null),
9589
- tab?.value == "Other charges" && otherchargesOverdue && React__default.createElement(OverdueDotImg, null))))))));
9589
+ tab?.count && tab?.count > 0 &&
9590
+ React__default.createElement("div", { className: "counts" }, tab?.count))))))));
9590
9591
  };
9591
9592
 
9592
- var css$9 = ".dropdown {\n width: 100%;\n border: 0.0625rem solid #686868;\n height: 3.5rem;\n border-radius: 0.5rem;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 1rem;\n position: relative;\n cursor: pointer;\n z-index: 11;\n}\n\n.astreik {\n color: #eb0542;\n}\n\n.label {\n position: absolute;\n z-index: 1;\n top: -10px;\n left: 11px;\n background: #ffffff;\n padding: 0 6px;\n transition: all 0.3s ease-out;\n}\n\n.placeholder {\n color: #686868;\n}\n\n.dropPosition {\n position: relative;\n}\n\n.dropdownValues {\n border: 0.0625rem solid #e1e1e1;\n box-shadow: 0px 0.25rem 0.5rem 0px rgba(0, 0, 0, 0.2509803922);\n border-radius: 0.5rem;\n margin-top: 0.3125rem;\n position: absolute;\n width: 100%;\n z-index: 9;\n}\n\n.unselectedText {\n background: #ffffff;\n height: 3.24rem;\n padding: 1rem;\n color: #686868;\n cursor: pointer;\n}\n\n.value {\n color: #000000;\n}\n\n.unselectedText:hover {\n background: #e1e1e1;\n color: #000000;\n font-weight: 700 !important;\n}\n\n.backdropDropdown {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.dropdown select {\n background: transparent;\n width: 10.625rem;\n padding: 0.5rem;\n border: 0;\n border-radius: 0;\n height: 2.1875rem;\n}";
9593
+ var css$9 = ".dropdown {\n width: 100%;\n border: 0.0625rem solid #686868;\n height: 3.5rem;\n border-radius: 0.5rem;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 1rem;\n position: relative;\n cursor: pointer;\n z-index: 1;\n}\n\n.astreik {\n color: #eb0542;\n}\n\n.label {\n position: absolute;\n z-index: 2;\n top: -10px;\n left: 11px;\n background: #ffffff;\n padding: 0 6px;\n transition: all 0.3s ease-out;\n}\n\n.placeholder {\n color: #686868;\n}\n\n.dropPosition {\n position: relative;\n}\n\n.dropdownValues {\n border: 0.0625rem solid #e1e1e1;\n box-shadow: 0px 0.25rem 0.5rem 0px rgba(0, 0, 0, 0.2509803922);\n border-radius: 0.5rem;\n margin-top: 0.3125rem;\n position: absolute;\n width: 100%;\n z-index: 9;\n}\n\n.unselectedText {\n background: #ffffff;\n height: 3.24rem;\n padding: 1rem;\n color: #686868;\n cursor: pointer;\n}\n\n.value {\n color: #000000;\n}\n\n.unselectedText:hover {\n background: #e1e1e1;\n color: #000000;\n font-weight: 700 !important;\n}\n\n.backdropDropdown {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.dropdown select {\n background: transparent;\n width: 10.625rem;\n padding: 0.5rem;\n border: 0;\n border-radius: 0;\n height: 2.1875rem;\n}";
9593
9594
  n(css$9,{});
9594
9595
 
9595
9596
  function Dropdown(props) {