dhre-component-lib 0.2.7 → 0.2.8
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/components/Accordian/Accordian.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +10 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -9356,13 +9356,20 @@ const Search = ({ searchIcon, crossIcon, disabled = false, onSearch, onSelectSug
|
|
|
9356
9356
|
return;
|
|
9357
9357
|
const value = e.target.value;
|
|
9358
9358
|
setQuery(value);
|
|
9359
|
+
if (value.length < 3) {
|
|
9360
|
+
setBorderClass("default-border");
|
|
9361
|
+
setShowSuggestions(false);
|
|
9362
|
+
if (timeoutId)
|
|
9363
|
+
clearTimeout(timeoutId);
|
|
9364
|
+
return;
|
|
9365
|
+
}
|
|
9359
9366
|
setBorderClass("typing-border");
|
|
9360
9367
|
if (timeoutId)
|
|
9361
9368
|
clearTimeout(timeoutId);
|
|
9362
9369
|
const newTimeoutId = setTimeout(() => {
|
|
9363
9370
|
setBorderClass("stopped-border");
|
|
9364
9371
|
onSearch(queryRef.current);
|
|
9365
|
-
},
|
|
9372
|
+
}, 500);
|
|
9366
9373
|
setTimeoutId(newTimeoutId);
|
|
9367
9374
|
if (suggestions && value) {
|
|
9368
9375
|
const filtered = suggestions
|
|
@@ -9438,8 +9445,8 @@ const Modal = ({ isOpen, onClose, title, children, crossIcon }) => {
|
|
|
9438
9445
|
var css = ".accordion {\n padding: 10px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n}\n.accordion.with-border {\n border: 1px solid #CECECE;\n padding: 24px 16px 24px 16px;\n border-radius: 16px;\n}\n.accordion.without-border {\n border-bottom: 1px solid #686868;\n padding: 16px 0px 16px 0px;\n margin-top: 16px;\n}\n.accordion .accordion-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.accordion .accordion-header .accordion-icon {\n margin-right: 10px;\n}\n.accordion .accordion-header .accordion-text {\n display: flex;\n flex-direction: column;\n}\n.accordion .accordion-header .accordian-arrow {\n display: flex;\n justify-content: flex-end;\n}\n.accordion .accordion-content {\n padding: 16px 4px 16px 4px;\n}";
|
|
9439
9446
|
n(css,{});
|
|
9440
9447
|
|
|
9441
|
-
const Accordion = ({ icon, title, description, children, border = false, upArrowIcon, downArrowIcon }) => {
|
|
9442
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
9448
|
+
const Accordion = ({ icon, title, description, children, border = false, upArrowIcon, downArrowIcon, openByDefault }) => {
|
|
9449
|
+
const [isOpen, setIsOpen] = useState(openByDefault ? true : false);
|
|
9443
9450
|
const toggleAccordion = () => {
|
|
9444
9451
|
setIsOpen(!isOpen);
|
|
9445
9452
|
};
|