@deriv-web-design/ui 0.0.9 → 0.0.12

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
@@ -99,8 +99,11 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "cl
99
99
 
100
100
  declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
101
101
 
102
+ type SearchFieldVariant = "outline" | "fill";
102
103
  type SearchFieldStatus = "neutral" | "success" | "fail";
103
104
  interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "className"> {
105
+ /** Visual style of the field. Defaults to "outline". */
106
+ variant?: SearchFieldVariant;
104
107
  /** Visual validation state. Defaults to "neutral". */
105
108
  status?: SearchFieldStatus;
106
109
  /** Called when the clear (×) button is clicked.
package/dist/index.d.ts CHANGED
@@ -99,8 +99,11 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "cl
99
99
 
100
100
  declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
101
101
 
102
+ type SearchFieldVariant = "outline" | "fill";
102
103
  type SearchFieldStatus = "neutral" | "success" | "fail";
103
104
  interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "className"> {
105
+ /** Visual style of the field. Defaults to "outline". */
106
+ variant?: SearchFieldVariant;
104
107
  /** Visual validation state. Defaults to "neutral". */
105
108
  status?: SearchFieldStatus;
106
109
  /** Called when the clear (×) button is clicked.
package/dist/index.js CHANGED
@@ -318,6 +318,7 @@ var FailIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { wid
318
318
  ] });
319
319
  var SearchField = (0, import_react3.forwardRef)(
320
320
  ({
321
+ variant = "outline",
321
322
  status = "neutral",
322
323
  value,
323
324
  defaultValue,
@@ -363,6 +364,7 @@ var SearchField = (0, import_react3.forwardRef)(
363
364
  const showClearButton = hasValue && !disabled;
364
365
  const wrapperClass = [
365
366
  "sf-wrapper",
367
+ variant,
366
368
  status,
367
369
  className ?? ""
368
370
  ].filter(Boolean).join(" ");