@agilant/toga-blox 1.0.130 → 1.0.131

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.
@@ -14,14 +14,13 @@ const Dropdown = ({ options, selectedOption, onOptionSelect, optionClasses = "fl
14
14
  return;
15
15
  setShowMenu(!showMenu);
16
16
  };
17
- return (_jsxs("div", { className: `flex items-center justify-between relative min-w-40 ${dropdownClasses}`, children: [_jsx(BaseToolTip, { message: !isEnabled ? tooltipText : "", toolTipPlacement: "top", textColor: "text-white", textBackgroundColor: `${!isEnabled ? "bg-gray-700" : ""}`, children: _jsxs("div", { onClick: toggleMenu, className: "flex cursor-pointer items-center group h-full", children: [_jsx("div", { className: `font-bold ${optionClasses} bg-white min-w-28`, children: selectedOption.label }), _jsx("div", { className: `transform transition-transform duration-200 mx-1 px-1 rounded-full relative ${!isEnabled ? "text-gray-300" : icon.iconClasses} ${showMenu ? "rotate-180" : "rotate-0"} `, "data-testid": "dropdown-icon", children: getFontAwesomeIcon(icon.name) })] }) }), showMenu && (_jsx(AnimatePresence, { children: showMenu && (_jsx(motion.div, { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, className: `absolute top-0 z-10 right-0 left-0 ${menuClasses}`, children: _jsx("ul", { children: options.map((option) => (_jsxs("li", { className: `text-left px-4 py-2 cursor-pointer border-b ${option.value ===
17
+ return (_jsxs("div", { className: `flex items-center justify-between relative min-w-40 ${dropdownClasses}`, children: [_jsx(BaseToolTip, { message: !isEnabled ? tooltipText : "", toolTipPlacement: "top", textColor: "text-white", textBackgroundColor: `${!isEnabled ? "bg-gray-700" : ""}`, children: _jsxs("div", { onClick: toggleMenu, className: "flex cursor-pointer items-center group h-full", children: [_jsx("div", { className: `font-bold ${optionClasses} bg-white min-w-28`, children: selectedOption.label }), _jsx("div", { className: `transform transition-transform duration-200 mx-1 px-1 rounded-full relative ${!isEnabled ? "text-gray-300" : icon.iconClasses} ${showMenu ? "rotate-180" : "rotate-0"} `, "data-testid": "dropdown-icon", children: getFontAwesomeIcon(icon.name) })] }) }), showMenu && (_jsx(AnimatePresence, { children: showMenu && (_jsx(motion.div, { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, className: `absolute top-0 z-10 right-0 left-0 ${menuClasses}`, children: _jsx("ul", { children: options.map((option) => (_jsxs("li", { className: `justify-end items-center flex px-4 py-2 cursor-pointer border-b ${option.value ===
18
18
  selectedOption.value
19
19
  ? `${selectedOptionBgColor} font-semibold`
20
20
  : `${optionHoverBgColor} text-black`}`, onClick: () => {
21
21
  onOptionSelect(option);
22
22
  setShowMenu(false);
23
23
  }, children: [selectedOption.value ===
24
- option.value &&
25
- getFontAwesomeIcon("check", "solid"), _jsx("span", { className: "pl-2 ", children: option.label })] }, option.value))) }) })) }))] }));
24
+ option.value && (_jsx("span", { className: `flex-1 ${icon.iconClasses}`, children: getFontAwesomeIcon("check", "solid") })), _jsx("span", { className: "pl-2 ", children: option.label })] }, option.value))) }) })) }))] }));
26
25
  };
27
26
  export default Dropdown;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agilant/toga-blox",
3
3
  "private": false,
4
- "version": "1.0.130",
4
+ "version": "1.0.131",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",