@megha-ui/react 1.3.31 → 1.3.33

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.
@@ -479,25 +479,28 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
479
479
  }, children: [option.icon &&
480
480
  option.isDelete &&
481
481
  !option.isDelete && _jsx("span", { children: option.icon }), _jsx("span", { style: { margin: "0 0.5rem" }, children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value)));
482
- }) }))] }, gIndex)))) : (filteredOptions.map((option, index) => (_jsxs("li", { ref: (el) => {
483
- optionRefs.current[index] = el;
484
- }, onClick: (e) => onSelectChange
485
- ? handleItemSelect(option, option.disabled || false)
486
- : handleSelect(option.value, option.disabled || false), style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center" }), (index === highlightIndex ? listItemHoverStyle : {})), (option.disabled ? listItemDisabledStyle : {})), (index !== highlightIndex &&
487
- !isMultiple &&
488
- intermediateValues.includes(option.value)
489
- ? selectedItemStyle
490
- : {})), { borderBottom: index === filteredOptions.length - 1
491
- ? "none"
492
- : "1px solid var(--divider-strong, #dddddd)", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), onMouseEnter: (e) => {
493
- if (!option.disabled) {
494
- setHighlightIndex(index);
495
- }
496
- }, children: [isMultiple && (_jsx("div", { style: { marginRight: "0.5rem" }, children: _jsx(Checkbox, { selected: intermediateValues.includes(option.value), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }) })), _jsxs("div", { style: {
497
- display: "flex",
498
- alignItems: "start",
499
- width: "100%",
500
- }, children: [option.icon && option.isDelete && !option.isDelete && (_jsx("span", { style: { margin: "0 0.5rem" }, children: option.icon })), _jsx("span", { children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value))))) }), onApplyChange && (_jsx("li", { style: {
482
+ }) }))] }, gIndex)))) : (filteredOptions.map((option, index) => {
483
+ console.log({ option });
484
+ return (_jsxs("li", { ref: (el) => {
485
+ optionRefs.current[index] = el;
486
+ }, onClick: (e) => onSelectChange
487
+ ? handleItemSelect(option, option.disabled || false)
488
+ : handleSelect(option.value, option.disabled || false), style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center" }), (index === highlightIndex ? listItemHoverStyle : {})), (option.disabled ? listItemDisabledStyle : {})), (index !== highlightIndex &&
489
+ !isMultiple &&
490
+ intermediateValues.includes(option.value)
491
+ ? selectedItemStyle
492
+ : {})), { borderBottom: index === filteredOptions.length - 1
493
+ ? "none"
494
+ : "1px solid var(--divider-strong, #dddddd)", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), onMouseEnter: (e) => {
495
+ if (!option.disabled) {
496
+ setHighlightIndex(index);
497
+ }
498
+ }, children: [isMultiple && (_jsx("div", { style: { marginRight: "0.5rem" }, children: _jsx(Checkbox, { selected: intermediateValues.includes(option.value), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }) })), _jsxs("div", { style: {
499
+ display: "flex",
500
+ alignItems: "start",
501
+ width: "100%",
502
+ }, children: [option.icon && option.isDelete && !option.isDelete && (_jsx("span", { style: { margin: "0 0.5rem" }, children: option.icon })), _jsx("span", { children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value)));
503
+ })) }), onApplyChange && (_jsx("li", { style: {
501
504
  display: "flex",
502
505
  alignItems: "center",
503
506
  justifyContent: "end",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.31",
3
+ "version": "1.3.33",
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",