@splunk/react-ui 4.22.0 → 4.23.0

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.
@@ -8,6 +8,16 @@ declare type TextChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HT
8
8
  name?: string;
9
9
  value: string;
10
10
  }) => void;
11
+ /** @public */
12
+ declare type TextBlurHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
13
+ name?: string;
14
+ value: string;
15
+ }) => void;
16
+ /** @public */
17
+ declare type TextFocusHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
18
+ name?: string;
19
+ value: string;
20
+ }) => void;
11
21
  interface TextPropsBase {
12
22
  /** Setting the appearance to search will create a rounded input. */
13
23
  appearance?: 'default' | 'search';
@@ -88,7 +98,7 @@ interface TextPropsBase {
88
98
  * control when multiple controls share an onChange callback. */
89
99
  name?: string;
90
100
  /** A callback for when the input loses focus. */
91
- onBlur?: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
101
+ onBlur?: TextBlurHandler;
92
102
  /**
93
103
  * This is equivalent to onInput which is called on keydown, paste, and so on.
94
104
  * If value is set, this callback is required. This must set the value prop to retain the
@@ -96,7 +106,7 @@ interface TextPropsBase {
96
106
  */
97
107
  onChange?: TextChangeHandler;
98
108
  /** A callback for when the input takes focus. */
99
- onFocus?: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
109
+ onFocus?: TextFocusHandler;
100
110
  /** A keydown callback can be used to prevent a certain input by utilizing the event argument. */
101
111
  onKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
102
112
  /** A callback for when the text selection or cursor position changes. */
@@ -221,5 +231,5 @@ declare const TextWithTheme: React.ForwardRefExoticComponent<Pick<Pick<Pick<Text
221
231
  };
222
232
  export default TextWithTheme;
223
233
  export type { Text as TextWithoutTheme };
224
- export { TextChangeHandler };
234
+ export { TextBlurHandler, TextChangeHandler, TextFocusHandler };
225
235
  export type { TextPropsBase, TextPropsBaseControlled, TextPropsBaseUncontrolled };
@@ -8,6 +8,16 @@ declare type TextAreaChangeHandler = (event: React.ChangeEvent<HTMLTextAreaEleme
8
8
  name?: string;
9
9
  value: string;
10
10
  }) => void;
11
+ /** @public */
12
+ declare type TextAreaBlurHandler = (event: React.FocusEvent<HTMLTextAreaElement>, data: {
13
+ name?: string;
14
+ value: string;
15
+ }) => void;
16
+ /** @public */
17
+ declare type TextAreaFocusHandler = (event: React.FocusEvent<HTMLTextAreaElement>, data: {
18
+ name?: string;
19
+ value: string;
20
+ }) => void;
11
21
  interface TextAreaPropsBase {
12
22
  /**
13
23
  * @deprecated The `search` appearance has been marked for deprecation and will be removed in a future major version.
@@ -89,7 +99,7 @@ interface TextAreaPropsBase {
89
99
  * control when multiple controls share an onChange callback. */
90
100
  name?: string;
91
101
  /** A callback for when the input loses focus. */
92
- onBlur?: React.FocusEventHandler<HTMLTextAreaElement>;
102
+ onBlur?: TextAreaBlurHandler;
93
103
  /**
94
104
  * This is equivalent to onInput which is called on keydown, paste, and so on.
95
105
  * If value is set, this callback is required. This must set the value prop to retain the
@@ -97,7 +107,7 @@ interface TextAreaPropsBase {
97
107
  */
98
108
  onChange?: TextAreaChangeHandler;
99
109
  /** A callback for when the input takes focus. */
100
- onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
110
+ onFocus?: TextAreaFocusHandler;
101
111
  /** A keydown callback can be used to prevent a certain input by utilizing the event argument. */
102
112
  onKeyDown?: React.KeyboardEventHandler<HTMLTextAreaElement>;
103
113
  /** A callback for when the user clicks the textbox.
@@ -201,5 +211,5 @@ declare const TextAreaWithTheme: React.ForwardRefExoticComponent<Pick<Pick<Pick<
201
211
  };
202
212
  export default TextAreaWithTheme;
203
213
  export type { TextArea as TextAreaWithoutTheme };
204
- export { TextAreaChangeHandler };
214
+ export { TextAreaBlurHandler, TextAreaChangeHandler, TextAreaFocusHandler };
205
215
  export type { TextAreaPropsBase, TextAreaPropsBaseControlled, TextAreaPropsBaseUncontrolled };
@@ -1 +0,0 @@
1
- export default function WithShiftModifier(): JSX.Element;