@wavelengthusaf/components 1.1.7 → 1.1.8

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.d.mts CHANGED
@@ -119,19 +119,21 @@ interface SearchProps {
119
119
  borderRadius?: number | string;
120
120
  label?: string;
121
121
  width?: string;
122
- height?: string;
122
+ height?: string | number;
123
123
  children?: ReactNode;
124
124
  borderColor?: string;
125
125
  hoverColor?: string;
126
126
  textColor?: string;
127
127
  backgroundColor?: string;
128
128
  placeholder?: string;
129
+ size?: "small" | "medium";
130
+ fontSize?: string;
129
131
  options: SearchResult[];
130
132
  onChange?: React__default.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
131
133
  searchFunction: (value: string) => SearchResult[];
132
134
  onSearchItemSelected: (selectedItem: SearchResult | string) => void;
133
135
  }
134
- declare function WavelengthSearch({ id, mode, width, height, label, borderRadius, children, placeholder, searchFunction, onSearchItemSelected, options, onChange, borderColor, hoverColor, textColor, backgroundColor, }: SearchProps): React__default.JSX.Element | undefined;
136
+ declare function WavelengthSearch({ id, mode, width, height, label, size, borderRadius, children, placeholder, searchFunction, onSearchItemSelected, options, onChange, borderColor, hoverColor, textColor, fontSize, backgroundColor, }: SearchProps): React__default.JSX.Element | undefined;
135
137
 
136
138
  declare function SearchTextField(): React__default.JSX.Element;
137
139
 
package/dist/index.d.ts CHANGED
@@ -119,19 +119,21 @@ interface SearchProps {
119
119
  borderRadius?: number | string;
120
120
  label?: string;
121
121
  width?: string;
122
- height?: string;
122
+ height?: string | number;
123
123
  children?: ReactNode;
124
124
  borderColor?: string;
125
125
  hoverColor?: string;
126
126
  textColor?: string;
127
127
  backgroundColor?: string;
128
128
  placeholder?: string;
129
+ size?: "small" | "medium";
130
+ fontSize?: string;
129
131
  options: SearchResult[];
130
132
  onChange?: React__default.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
131
133
  searchFunction: (value: string) => SearchResult[];
132
134
  onSearchItemSelected: (selectedItem: SearchResult | string) => void;
133
135
  }
134
- declare function WavelengthSearch({ id, mode, width, height, label, borderRadius, children, placeholder, searchFunction, onSearchItemSelected, options, onChange, borderColor, hoverColor, textColor, backgroundColor, }: SearchProps): React__default.JSX.Element | undefined;
136
+ declare function WavelengthSearch({ id, mode, width, height, label, size, borderRadius, children, placeholder, searchFunction, onSearchItemSelected, options, onChange, borderColor, hoverColor, textColor, fontSize, backgroundColor, }: SearchProps): React__default.JSX.Element | undefined;
135
137
 
136
138
  declare function SearchTextField(): React__default.JSX.Element;
137
139
 
package/dist/index.js CHANGED
@@ -3424,12 +3424,50 @@ var import_InputAdornment = __toESM(require("@mui/material/InputAdornment"));
3424
3424
  var import_IconButton = __toESM(require("@mui/material/IconButton"));
3425
3425
  var import_react13 = require("react");
3426
3426
  var import_ListItem = __toESM(require("@mui/material/ListItem"));
3427
+ var CustomPopper = (props) => {
3428
+ return /* @__PURE__ */ import_react12.default.createElement(
3429
+ import_material5.Popper,
3430
+ __spreadProps(__spreadValues({
3431
+ sx: {
3432
+ "&.MuiAutocomplete-popper": {
3433
+ zIndex: 5
3434
+ }
3435
+ }
3436
+ }, props), {
3437
+ placement: "bottom",
3438
+ disablePortal: true,
3439
+ modifiers: [
3440
+ {
3441
+ name: "flip",
3442
+ enabled: true,
3443
+ options: {
3444
+ altBoundary: true,
3445
+ rootBoundary: "document",
3446
+ padding: 8
3447
+ }
3448
+ },
3449
+ {
3450
+ name: "preventOverflow",
3451
+ enabled: true,
3452
+ options: {
3453
+ altAxis: true,
3454
+ altBoundary: true,
3455
+ tether: true,
3456
+ rootBoundary: "document",
3457
+ padding: 8
3458
+ }
3459
+ }
3460
+ ]
3461
+ })
3462
+ );
3463
+ };
3427
3464
  function WavelengthSearch({
3428
3465
  id,
3429
3466
  mode,
3430
3467
  width: width2,
3431
3468
  height: height2,
3432
3469
  label,
3470
+ size,
3433
3471
  borderRadius: borderRadius2,
3434
3472
  children,
3435
3473
  placeholder,
@@ -3440,6 +3478,7 @@ function WavelengthSearch({
3440
3478
  borderColor: borderColor2,
3441
3479
  hoverColor,
3442
3480
  textColor,
3481
+ fontSize,
3443
3482
  backgroundColor: backgroundColor2
3444
3483
  }) {
3445
3484
  const palette2 = getPalette();
@@ -3482,8 +3521,9 @@ function WavelengthSearch({
3482
3521
  placeholder
3483
3522
  }, params), {
3484
3523
  id,
3524
+ size,
3485
3525
  InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
3486
- style: { borderRadius: borderRadius2, height: height2, color: textColor, backgroundColor: backgroundColor2 },
3526
+ style: { borderRadius: borderRadius2, color: textColor, backgroundColor: backgroundColor2, height: height2, fontSize },
3487
3527
  type: "search",
3488
3528
  endAdornment: /* @__PURE__ */ import_react12.default.createElement(import_InputAdornment.default, { position: "end" }, /* @__PURE__ */ import_react12.default.createElement(import_IconButton.default, { sx: { color: textColor } }, children))
3489
3529
  }),
@@ -3509,7 +3549,8 @@ function WavelengthSearch({
3509
3549
  label,
3510
3550
  onChange
3511
3551
  })
3512
- )
3552
+ ),
3553
+ PopperComponent: CustomPopper
3513
3554
  }
3514
3555
  ));
3515
3556
  } else if (mode == "manual") {
@@ -3557,8 +3598,9 @@ function WavelengthSearch({
3557
3598
  }
3558
3599
  }, params), {
3559
3600
  id,
3601
+ size,
3560
3602
  InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
3561
- style: { borderRadius: borderRadius2, height: height2, color: textColor },
3603
+ style: { borderRadius: borderRadius2, height: height2, color: textColor, fontSize },
3562
3604
  type: "search",
3563
3605
  endAdornment: /* @__PURE__ */ import_react12.default.createElement(import_InputAdornment.default, { position: "end" }, /* @__PURE__ */ import_react12.default.createElement(
3564
3606
  import_IconButton.default,