@megha-ui/react 1.3.56 → 1.3.58

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.
@@ -377,15 +377,29 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
377
377
  display: "flex",
378
378
  flexDirection: labelAlignment === "horizontal" ? "row" : "column",
379
379
  alignItems: labelAlignment === "horizontal" ? "center" : "",
380
- }, children: [label && (_jsxs("p", { style: labelStyle, className: labelClass, children: [label, required && _jsx("span", { style: asteriskStyle, children: " *" })] })), _jsxs("div", { ref: wrapperRef, className: `${className}`, style: Object.assign(Object.assign(Object.assign({ border, borderRadius: 4 }, (isIcon ? {} : { padding: "0 0.5rem" })), { alignItems: "center", display: "flex", height: `var(--control-min-height, ${ultraCompactDisplay
381
- ? "1.5rem"
382
- : compactDisplay
383
- ? "2rem"
384
- : density === "ultraCompact"
385
- ? "1.5rem"
386
- : density === "compact"
387
- ? "2rem"
388
- : "2.5rem"})`, position: "relative" }), style), children: [_jsxs("div", { style: {
380
+ }, children: [label && (_jsxs("p", { style: labelStyle, className: labelClass, children: [label, required && _jsx("span", { style: asteriskStyle, children: " *" })] })), _jsxs("div", { ref: wrapperRef, className: `${className}`, style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ border, borderRadius: 4 }, (isIcon ? {} : { padding: "0 0.5rem" })), { alignItems: "center", display: "flex", flexDirection: autoPosition ? "row" : "column", height: autoPosition
381
+ ? `var(--control-min-height, ${ultraCompactDisplay
382
+ ? "1.5rem"
383
+ : compactDisplay
384
+ ? "2rem"
385
+ : density === "ultraCompact"
386
+ ? "1.5rem"
387
+ : density === "compact"
388
+ ? "2rem"
389
+ : "2.5rem"})`
390
+ : "auto" }), (autoPosition
391
+ ? {}
392
+ : {
393
+ minHeight: `var(--control-min-height, ${ultraCompactDisplay
394
+ ? "1.5rem"
395
+ : compactDisplay
396
+ ? "2rem"
397
+ : density === "ultraCompact"
398
+ ? "1.5rem"
399
+ : density === "compact"
400
+ ? "2rem"
401
+ : "2.5rem"})`,
402
+ })), { position: "relative" }), style), children: [_jsxs("div", { style: {
389
403
  display: "flex",
390
404
  alignItems: "center",
391
405
  justifyContent: "space-between",
@@ -410,7 +424,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
410
424
  }, children: [isClear && (displayValue || selectedDisplay) && (_jsx("div", { style: { marginRight: "0.5rem" }, onClick: handleClear, id: clearId, title: "Click to clear the value", children: ClearIcon ? (ClearIcon) : (_jsx("span", { style: {
411
425
  color: "var(--form-border-color, #dbdfe9)",
412
426
  fontSize: "1rem",
413
- }, children: "X" })) })), disabled ? (Tooltip && Tooltip) : DropDownIcon ? (DropDownIcon) : (_jsx(HiChevronDown, { fontSize: "1rem" })), withTooltip && Tooltip && Tooltip] })] }), _jsxs("ul", { style: Object.assign(Object.assign({ width: isGrouping ? "max-content" : dropdownListWidth || "100%", position: "absolute", backgroundColor: dropdownListBG || "var(--dropdown-bg)", boxShadow: "0 4px 0.75rem rgba(0, 0, 0, 0.1)", border: "1px solid var(--divider, #f5f5f5)", zIndex: 10, marginTop: 4, borderRadius: 4, overflow: "hidden" }, clickStyle), { display: !isOpen ? "none" : "" }), children: [searchEnabled && (_jsx("li", { style: { padding: "0.5rem" }, ref: searchOptionRef, children: _jsx("input", { ref: searchInputRef, type: "text", placeholder: "Search...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), disabled: disabled, style: {
427
+ }, children: "X" })) })), disabled ? (Tooltip && Tooltip) : DropDownIcon ? (DropDownIcon) : (_jsx(HiChevronDown, { fontSize: "1rem" })), withTooltip && Tooltip && Tooltip] })] }), _jsxs("ul", { style: Object.assign(Object.assign({ width: isGrouping ? "max-content" : dropdownListWidth || "100%", position: autoPosition ? "absolute" : "static", backgroundColor: dropdownListBG || "var(--dropdown-bg)", boxShadow: "0 4px 0.75rem rgba(0, 0, 0, 0.1)", border: "1px solid var(--divider, #f5f5f5)", zIndex: 10, marginTop: 4, borderRadius: 4, overflow: "hidden" }, (autoPosition ? clickStyle : {})), { display: !isOpen ? "none" : "" }), children: [searchEnabled && (_jsx("li", { style: { padding: "0.5rem" }, ref: searchOptionRef, children: _jsx("input", { ref: searchInputRef, type: "text", placeholder: "Search...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), disabled: disabled, style: {
414
428
  width: "100%",
415
429
  padding: "0.5rem",
416
430
  boxSizing: "border-box",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.56",
3
+ "version": "1.3.58",
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",