@megha-ui/react 1.2.577 → 1.2.579
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.
|
@@ -8,7 +8,7 @@ import Text from "../text";
|
|
|
8
8
|
import Button from "../button";
|
|
9
9
|
import { HiChevronDown } from "react-icons/hi";
|
|
10
10
|
import { FaChevronDown, FaChevronUp } from "react-icons/fa";
|
|
11
|
-
const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select...", isMultiple = false, isSelectAll = false, className, style, labelFontSize, labelFontWeight, labelMarginBottom, asteriskColor, label, disabled = false, width, searchEnabled = true, dropdownListWidth, marginBottom, marginTop, marginRight, marginLeft, required, dropdownListBG, searchBorderColor = "#2377ba", maxDropdownHeight = "12rem", border = "1px solid #dbdfe9", selectedCharLength = 0, menuFrom = "left", Tooltip, DropDownIcon, onMenuClose, onMenuOpen, isClear, ClearIcon, clearId, selectedDisplay, checkboxWrapper, isSort = true, onSelectChange, isLoading = false, onApplyChange, withTooltip = false, isCreatable = false, onCreate = () => { }, autoPosition = false, compactDisplay = false, ultraCompactDisplay = false, isGrouping = false, isIcon = false, withValue = false, closeOnSelect = true, }) => {
|
|
11
|
+
const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select...", isMultiple = false, isSelectAll = false, className, style, labelFontSize, labelFontWeight, labelMarginBottom, labelClass, asteriskColor, label, disabled = false, width, searchEnabled = true, dropdownListWidth, marginBottom, marginTop, marginRight, marginLeft, required, dropdownListBG, searchBorderColor = "#2377ba", maxDropdownHeight = "12rem", border = "1px solid #dbdfe9", selectedCharLength = 0, menuFrom = "left", Tooltip, DropDownIcon, onMenuClose, onMenuOpen, isClear, ClearIcon, clearId, selectedDisplay, checkboxWrapper, isSort = true, onSelectChange, isLoading = false, onApplyChange, withTooltip = false, isCreatable = false, onCreate = () => { }, autoPosition = false, compactDisplay = false, ultraCompactDisplay = false, isGrouping = false, isIcon = false, withValue = false, closeOnSelect = true, }) => {
|
|
12
12
|
var _a, _b;
|
|
13
13
|
const { density } = useDensity();
|
|
14
14
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -259,7 +259,6 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
259
259
|
fontSize: labelFontSize,
|
|
260
260
|
fontWeight: labelFontWeight,
|
|
261
261
|
marginBottom: labelMarginBottom,
|
|
262
|
-
lineHeight: 1
|
|
263
262
|
};
|
|
264
263
|
const asteriskStyle = {
|
|
265
264
|
color: asteriskColor,
|
|
@@ -321,7 +320,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
321
320
|
marginTop,
|
|
322
321
|
marginRight,
|
|
323
322
|
marginLeft,
|
|
324
|
-
}, children: [label && (_jsxs("p", { style: labelStyle, children: [label, required && _jsx("span", { style: asteriskStyle, children: " *" })] })), _jsxs("div", { ref: wrapperRef, className: `${className}`, style: Object.assign(Object.assign(Object.assign({ border, borderRadius: 4 }, (isIcon ? {} : { padding: "0 0.5rem" })), { alignItems: "center", display: "flex", minHeight: `var(--control-min-height, ${ultraCompactDisplay
|
|
323
|
+
}, children: [label && (_jsxs("p", { style: labelStyle, className: labelClass, children: [label, required && _jsx("span", { style: asteriskStyle, children: " *" })] })), _jsxs("div", { ref: wrapperRef, className: `${className}`, style: Object.assign(Object.assign(Object.assign({ border, borderRadius: 4 }, (isIcon ? {} : { padding: "0 0.5rem" })), { alignItems: "center", display: "flex", minHeight: `var(--control-min-height, ${ultraCompactDisplay
|
|
325
324
|
? "1.5rem"
|
|
326
325
|
: compactDisplay
|
|
327
326
|
? "2rem"
|
package/package.json
CHANGED