@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 { IoChevronDownCircleOutline } from "react-icons/io5";
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("span", { children: groupOption.groupedValue }), _jsx("span", { children: collapsed === groupOption.groupedValue ? (_jsx(IoChevronDownCircleOutline, { style: {
376
- transition: "transform 0.2s ease",
377
- transform: "rotate(180deg)",
378
- marginLeft: "auto",
379
- cursor: "pointer",
380
- }, onClick: () => {
381
- if (collapsed === groupOption.groupedValue) {
382
- setCollapsed("");
383
- }
384
- else {
385
- setCollapsed(groupOption.groupedValue);
386
- }
387
- } })) : (_jsx(IoChevronDownCircleOutline, { style: {
388
- transition: "transform 0.2s ease",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.364",
3
+ "version": "1.2.365",
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",