@megha-ui/react 1.2.576 → 1.2.578

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.
@@ -12,6 +12,7 @@ interface DropdownOption {
12
12
  interface DropdownProps {
13
13
  options: DropdownOption[];
14
14
  selectedValues: (string | number | any)[];
15
+ labelClass?: string;
15
16
  onChange: (values: (string | number)[]) => void;
16
17
  closeOnSelect?: boolean;
17
18
  placeholder?: string;
@@ -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);
@@ -321,7 +321,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
321
321
  marginTop,
322
322
  marginRight,
323
323
  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
324
+ }, 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
325
  ? "1.5rem"
326
326
  : compactDisplay
327
327
  ? "2rem"
@@ -919,7 +919,11 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
919
919
  const newItem = filterColumns.reduce((acc, column) => {
920
920
  var _a;
921
921
  if (!ignoredExportItems.includes(column.key) && item[column.key]) {
922
- acc[column.key] = formatValue(item[column.key].value, (_a = column.dataType) !== null && _a !== void 0 ? _a : "string", locale, exportOptions !== null && exportOptions !== void 0 ? exportOptions : formatOptions);
922
+ let options = exportOptions !== null && exportOptions !== void 0 ? exportOptions : formatOptions;
923
+ if (column.dataType === "currency") {
924
+ options = Object.assign(Object.assign({}, options), { useGrouping: false });
925
+ }
926
+ acc[column.key] = formatValue(item[column.key].value, (_a = column.dataType) !== null && _a !== void 0 ? _a : "string", locale, options);
923
927
  }
924
928
  return acc;
925
929
  }, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.576",
3
+ "version": "1.2.578",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",