baseui 0.0.0-alpha-989e067 → 0.0.0-alpha-a6cd368

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.
@@ -27,7 +27,10 @@ import { isFocusVisible, forkFocus, forkBlur } from '../utils/focusVisible.js';
27
27
 
28
28
  const NullComponent = () => null;
29
29
 
30
- class BaseInput<T> extends React.Component<BaseInputPropsT<T>, InternalStateT> {
30
+ class BaseInput<T: HTMLInputElement | HTMLTextAreaElement> extends React.Component<
31
+ BaseInputPropsT<T>,
32
+ InternalStateT
33
+ > {
31
34
  static defaultProps = {
32
35
  'aria-activedescendant': null,
33
36
  'aria-autocomplete': null,
@@ -63,7 +66,7 @@ class BaseInput<T> extends React.Component<BaseInputPropsT<T>, InternalStateT> {
63
66
  type: 'text',
64
67
  };
65
68
 
66
- inputRef = this.props.inputRef || React.createRef<HTMLInputElement>();
69
+ inputRef = this.props.inputRef || React.createRef<T>();
67
70
 
68
71
  state = {
69
72
  isFocused: this.props.autoFocus || false,
@@ -108,7 +108,7 @@ export type BaseInputPropsT<T> = {|
108
108
  /** A hint as to the type of data that might be entered by the user while editing the element or its contents. */
109
109
  inputMode?: string,
110
110
  /** A ref to access an input element. */
111
- inputRef?: ReactRefT<HTMLInputElement>,
111
+ inputRef?: ReactRefT<T>,
112
112
  name: string,
113
113
  onBlur: (e: SyntheticFocusEvent<T>) => mixed,
114
114
  onChange?: (e: SyntheticInputEvent<T>) => mixed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "0.0.0-alpha-989e067",
3
+ "version": "0.0.0-alpha-a6cd368",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",
@@ -133,7 +133,7 @@ export type PropsT = {
133
133
  /** Defines if the comparison for a new creatable value should be case-insensitive. */
134
134
  ignoreCase?: boolean,
135
135
  /** A ref to access the input element powering the select if it's a search select, or the container div if it isn't. */
136
- controlRef?: ReactRefT<HTMLElement>,
136
+ controlRef?: ReactRefT<HTMLInputElement | HTMLDivElement>,
137
137
  /** Defines if the select is in a loading (async) state. */
138
138
  isLoading: boolean,
139
139
  /** Defines an option key for a default label value. */