@megha-ui/react 1.2.93 → 1.2.95

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.
@@ -289,7 +289,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
289
289
  return text;
290
290
  };
291
291
  return ((0, jsx_runtime_1.jsxs)("div", { style: {
292
- width: label ? "100%" : "",
292
+ width: "100%",
293
293
  marginBottom,
294
294
  marginTop,
295
295
  marginRight,
@@ -319,17 +319,17 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
319
319
  borderRadius: 4,
320
320
  } }) })), isSelectAll && isMultiple && filteredOptions.length > 0 && ((0, jsx_runtime_1.jsxs)("li", { style: Object.assign(Object.assign(Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center" }), (-1 === highlightIndex ? listItemHoverStyle : {})), { borderBottom: "1px solid #dddddd", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), onMouseEnter: (e) => {
321
321
  setHighlightIndex(-1);
322
- }, onClick: () => onSelectChange ? handleAllItemSelect() : handleAllSelect(), children: [(0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues
323
- .sort((a, b) => (a > b ? -1 : 1))
324
- .toString() ===
325
- filteredOptions
326
- .map((item) => item.value)
322
+ }, onClick: () => onSelectChange ? handleAllItemSelect() : handleAllSelect(), children: [(0, jsx_runtime_1.jsx)("div", { style: { marginRight: "0.5rem" }, children: (0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues
327
323
  .sort((a, b) => (a > b ? -1 : 1))
328
- .toString(), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }), (0, jsx_runtime_1.jsx)("div", { style: {
324
+ .toString() ===
325
+ filteredOptions
326
+ .map((item) => item.value)
327
+ .sort((a, b) => (a > b ? -1 : 1))
328
+ .toString(), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }) }), (0, jsx_runtime_1.jsx)("div", { style: {
329
329
  display: "flex",
330
330
  alignItems: "start",
331
331
  width: "100%",
332
- }, children: (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: "0.5rem" }, children: "Select All" }) })] })), (0, jsx_runtime_1.jsx)("div", { style: { maxHeight: maxDropdownHeight, overflowY: "auto" }, children: isLoading ? ((0, jsx_runtime_1.jsxs)(block_1.default, { as: "div", className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)(text_1.default, { as: "span", children: "Loading options" }), (0, jsx_runtime_1.jsx)(loader_1.default, { size: 12 })] })) : isCreatable && filteredOptions.length < 1 ? ((0, jsx_runtime_1.jsxs)("li", { onClick: (e) => onCreate(searchTerm), style: Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), children: [isMultiple && ((0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues.includes(searchTerm), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper })), (0, jsx_runtime_1.jsx)("div", { style: {
332
+ }, children: (0, jsx_runtime_1.jsx)("span", { children: "Select All" }) })] })), (0, jsx_runtime_1.jsx)("div", { style: { maxHeight: maxDropdownHeight, overflowY: "auto" }, children: isLoading ? ((0, jsx_runtime_1.jsxs)(block_1.default, { as: "div", className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)(text_1.default, { as: "span", children: "Loading options" }), (0, jsx_runtime_1.jsx)(loader_1.default, { size: 12 })] })) : isCreatable && filteredOptions.length < 1 ? ((0, jsx_runtime_1.jsxs)("li", { onClick: (e) => onCreate(searchTerm), style: Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), children: [isMultiple && ((0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues.includes(searchTerm), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper })), (0, jsx_runtime_1.jsx)("div", { style: {
333
333
  display: "flex",
334
334
  alignItems: "start",
335
335
  width: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.93",
3
+ "version": "1.2.95",
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.mjs",