@megha-ui/react 1.3.32 → 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.
@@ -362,7 +362,6 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
362
362
  }
363
363
  return text;
364
364
  };
365
- console.log({ options });
366
365
  return (_jsxs("div", { style: {
367
366
  width: width !== null && width !== void 0 ? width : "max-content",
368
367
  marginBottom,
@@ -480,25 +479,28 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
480
479
  }, children: [option.icon &&
481
480
  option.isDelete &&
482
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)));
483
- }) }))] }, gIndex)))) : (filteredOptions.map((option, index) => (_jsxs("li", { ref: (el) => {
484
- optionRefs.current[index] = el;
485
- }, onClick: (e) => onSelectChange
486
- ? handleItemSelect(option, option.disabled || false)
487
- : 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 &&
488
- !isMultiple &&
489
- intermediateValues.includes(option.value)
490
- ? selectedItemStyle
491
- : {})), { borderBottom: index === filteredOptions.length - 1
492
- ? "none"
493
- : "1px solid var(--divider-strong, #dddddd)", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), onMouseEnter: (e) => {
494
- if (!option.disabled) {
495
- setHighlightIndex(index);
496
- }
497
- }, 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: {
498
- display: "flex",
499
- alignItems: "start",
500
- width: "100%",
501
- }, 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: {
502
504
  display: "flex",
503
505
  alignItems: "center",
504
506
  justifyContent: "end",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.32",
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",