trotl-filter 1.0.26 → 1.0.28

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.
package/dist/index.cjs.js CHANGED
@@ -7692,11 +7692,15 @@ const DebounceSelect = ({
7692
7692
  * SearchInput Component
7693
7693
  * @param {string} pushUrlParamObj - URL parameter key (if null, URL params are not updated)
7694
7694
  * @param {string} height - Input height (e.g., "40px", "3rem")
7695
+ * @param {string|number} width - Input width (e.g., "200px" or 200)
7696
+ * @param {boolean} textArea - When true, render a textarea instead of an input
7695
7697
  * @param {object} style - Custom inline styles
7696
7698
  */
7697
7699
  function SearchInput({
7698
7700
  pushUrlParamObj = null,
7699
7701
  height,
7702
+ width,
7703
+ textArea = false,
7700
7704
  style = {},
7701
7705
  ...props
7702
7706
  }) {
@@ -7739,29 +7743,46 @@ function SearchInput({
7739
7743
  setUrlParam("");
7740
7744
  };
7741
7745
 
7746
+ // Normalize numeric sizes to px strings
7747
+ const normalizeSize = s => s === undefined || s === null ? undefined : typeof s === "number" ? `${s}px` : s;
7748
+
7742
7749
  // Apply height to container if provided and style doesn't have height defined
7743
7750
  const containerStyle = {
7744
7751
  position: "relative",
7745
7752
  display: "inline-block",
7746
- height: height || "34px",
7753
+ height: normalizeSize(height) || (textArea ? undefined : "34px"),
7747
7754
  verticalAlign: "middle",
7748
7755
  ...style
7749
7756
  };
7750
7757
  return /*#__PURE__*/React.createElement("div", {
7751
7758
  title: "tooltip",
7752
7759
  style: containerStyle
7753
- }, /*#__PURE__*/React.createElement("input", _extends$1({
7760
+ }, !textArea ? /*#__PURE__*/React.createElement("input", _extends$1({
7754
7761
  className: "basic-input",
7755
7762
  value: value,
7756
7763
  style: {
7757
7764
  marginBottom: "10px",
7758
7765
  padding: "5px",
7759
- width: "200px",
7766
+ width: normalizeSize(width) || "200px",
7760
7767
  paddingRight: value ? "24px" : undefined,
7761
7768
  height: "100%",
7762
7769
  boxSizing: "border-box"
7763
7770
  },
7764
7771
  onChange: handleChange
7772
+ }, props)) : /*#__PURE__*/React.createElement("textarea", _extends$1({
7773
+ className: "basic-input",
7774
+ value: value,
7775
+ style: {
7776
+ marginBottom: "10px",
7777
+ padding: "5px",
7778
+ width: normalizeSize(width) || "200px",
7779
+ paddingRight: value ? "24px" : undefined,
7780
+ boxSizing: "border-box",
7781
+ resize: "vertical",
7782
+ minHeight: normalizeSize(height) || "80px",
7783
+ height: normalizeSize(height) ? "100%" : undefined
7784
+ },
7785
+ onChange: handleChange
7765
7786
  }, props)), value && /*#__PURE__*/React.createElement("span", {
7766
7787
  onClick: handleClear,
7767
7788
  title: "Clear search",