dhre-component-lib 0.8.5 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -286,6 +286,7 @@ interface TabsProps {
|
|
|
286
286
|
onTabChange: (selectedTab: Tab) => void;
|
|
287
287
|
selectedTabValue?: string;
|
|
288
288
|
dot?: boolean;
|
|
289
|
+
wrapperClassName?: string;
|
|
289
290
|
}
|
|
290
291
|
declare const Tabs: React.FC<TabsProps>;
|
|
291
292
|
|
|
@@ -316,6 +317,7 @@ declare function TextArea(props: {
|
|
|
316
317
|
charText: string;
|
|
317
318
|
property?: any;
|
|
318
319
|
isShortTextBox?: boolean;
|
|
320
|
+
shouldCheckRegex?: boolean;
|
|
319
321
|
}): React.JSX.Element;
|
|
320
322
|
|
|
321
323
|
interface DrawerProps {
|
package/dist/index.esm.js
CHANGED
|
@@ -21815,7 +21815,7 @@ const Accordion = ({ icon, title, description, children, border = false, upArrow
|
|
|
21815
21815
|
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: #686868;\n border-bottom: 2px solid transparent;\n transition: border-bottom 0.3s ease;\n font-size: 18px !important;\n display: flex;\n align-items: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n gap: 0.5rem;\n line-height: 25.2px;\n font-family: \"Meraas Aktiv\", sans-serif;\n font-weight: 400;\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 .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}";
|
|
21816
21816
|
n(css$a,{});
|
|
21817
21817
|
|
|
21818
|
-
const Tabs = ({ tabs, onTabChange, selectedTabValue, dot }) => {
|
|
21818
|
+
const Tabs = ({ tabs, onTabChange, selectedTabValue, dot, wrapperClassName }) => {
|
|
21819
21819
|
const [selectedTab, setSelectedTab] = useState();
|
|
21820
21820
|
const haveDots = ["identification", "", ""];
|
|
21821
21821
|
useEffect(() => {
|
|
@@ -21835,7 +21835,7 @@ const Tabs = ({ tabs, onTabChange, selectedTabValue, dot }) => {
|
|
|
21835
21835
|
setSelectedTab(tab);
|
|
21836
21836
|
onTabChange(tab);
|
|
21837
21837
|
};
|
|
21838
|
-
return (React__default.createElement("div", { className:
|
|
21838
|
+
return (React__default.createElement("div", { className: `main ${wrapperClassName}`.trim() },
|
|
21839
21839
|
React__default.createElement("div", { className: "tabs" }, tabs?.map((tab) => (React__default.createElement(React__default.Fragment, null,
|
|
21840
21840
|
React__default.createElement("button", { key: tab?.value, className: `tab ${selectedTab?.value === tab?.value ? "active" : "inActive"}`, onClick: () => handleTabClick(tab) },
|
|
21841
21841
|
tab?.name,
|
|
@@ -21888,10 +21888,10 @@ var css$8 = ".textArea {\n min-width: 70%;\n width: 100%;\n height: 8.875rem;
|
|
|
21888
21888
|
n(css$8,{});
|
|
21889
21889
|
|
|
21890
21890
|
function TextArea(props) {
|
|
21891
|
-
const { value, onChange, requiredLimit, placeholder, charText, property, isShortTextBox } = props;
|
|
21891
|
+
const { shouldCheckRegex, value, onChange, requiredLimit, placeholder, charText, property, isShortTextBox } = props;
|
|
21892
21892
|
const [showLabelOnBorder, setShowLabelOnBorder] = useState(false);
|
|
21893
21893
|
const checkSpecialChar = (e) => {
|
|
21894
|
-
if (!/[0-9a-zA-Z ]/.test(e.key)) {
|
|
21894
|
+
if (shouldCheckRegex && !/[0-9a-zA-Z ]/.test(e.key)) {
|
|
21895
21895
|
e.preventDefault();
|
|
21896
21896
|
}
|
|
21897
21897
|
console.log('textAraea');
|