@megha-ui/react 1.2.364 → 1.2.365
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.
|
@@ -7,7 +7,7 @@ import Block from "../block";
|
|
|
7
7
|
import Text from "../text";
|
|
8
8
|
import Button from "../button";
|
|
9
9
|
import { HiChevronDown } from "react-icons/hi";
|
|
10
|
-
import {
|
|
10
|
+
import { FaChevronDown, FaChevronUp } from "react-icons/fa";
|
|
11
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, isClear, ClearIcon, clearId, selectedDisplay, checkboxWrapper, isSort = true, onSelectChange, isLoading = false, onApplyChange, withTooltip = false, isCreatable = false, onCreate = () => { }, autoPosition = false, compactDisplay = false, ultraCompactDisplay = false, isGrouping = false, }) => {
|
|
12
12
|
var _a, _b;
|
|
13
13
|
const { density } = useDensity();
|
|
@@ -372,30 +372,20 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
372
372
|
display: "flex",
|
|
373
373
|
alignItems: "center",
|
|
374
374
|
justifyContent: "space-between",
|
|
375
|
-
}, children: [_jsx("
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
marginLeft: "auto",
|
|
390
|
-
cursor: "pointer",
|
|
391
|
-
}, onClick: () => {
|
|
392
|
-
if (collapsed === groupOption.groupedValue) {
|
|
393
|
-
setCollapsed("");
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
setCollapsed(groupOption.groupedValue);
|
|
397
|
-
}
|
|
398
|
-
} })) })] }), collapsed === groupOption.groupedValue ? null : (_jsx(_Fragment, { children: groupOption.options.map((option, index) => {
|
|
375
|
+
}, children: [_jsx("div", { className: "flex items-center justify-center", onClick: () => setCollapsed(collapsed === groupOption.groupedValue ? "" : groupOption.groupedValue), style: {
|
|
376
|
+
background: "rgb(222, 222, 222)",
|
|
377
|
+
borderRadius: "0.25rem",
|
|
378
|
+
cursor: "pointer",
|
|
379
|
+
flexGrow: 0,
|
|
380
|
+
flexShrink: 0,
|
|
381
|
+
padding: "0.25rem",
|
|
382
|
+
}, children: collapsed === groupOption.groupedValue ? (_jsx(FaChevronUp, { style: {
|
|
383
|
+
height: "0.85rem",
|
|
384
|
+
width: "0.85rem",
|
|
385
|
+
} })) : (_jsx(FaChevronDown, { style: {
|
|
386
|
+
height: "0.85rem",
|
|
387
|
+
width: "0.85rem",
|
|
388
|
+
} })) }), _jsx("span", { children: groupOption.groupedValue })] }), collapsed === groupOption.groupedValue ? null : (_jsx(_Fragment, { children: groupOption.options.map((option, index) => {
|
|
399
389
|
let prevOptions = groupedOptions.filter((item, index) => index < gIndex);
|
|
400
390
|
prevOptions = [
|
|
401
391
|
...prevOptions.map((item) => item.options),
|
package/package.json
CHANGED