@instructure/ui-select 8.11.2-snapshot.15 → 8.11.2-snapshot.23
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/es/Select/index.js +6 -5
- package/lib/Select/index.js +6 -5
- package/package.json +23 -23
- package/src/Select/index.tsx +9 -4
- package/types/Select/index.d.ts +2 -2
- package/types/Select/index.d.ts.map +1 -1
package/es/Select/index.js
CHANGED
|
@@ -64,7 +64,6 @@ let Select = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
|
|
|
64
64
|
};
|
|
65
65
|
this._defaultId = uid('Select');
|
|
66
66
|
this._assistId = uid('Select-assistiveText');
|
|
67
|
-
this._input = null;
|
|
68
67
|
this._inputContainer = void 0;
|
|
69
68
|
this._list = null;
|
|
70
69
|
this._optionIds = [];
|
|
@@ -78,8 +77,6 @@ let Select = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
|
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
this._input = node; // TODO remove this in v9 and keep just 'ref'
|
|
82
|
-
|
|
83
80
|
this.ref = node;
|
|
84
81
|
this.props.inputRef(node);
|
|
85
82
|
};
|
|
@@ -113,11 +110,15 @@ let Select = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
|
|
|
113
110
|
}
|
|
114
111
|
|
|
115
112
|
focus() {
|
|
116
|
-
this.
|
|
113
|
+
this.ref && this.ref.focus();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
get _input() {
|
|
117
|
+
return this.ref;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
get focused() {
|
|
120
|
-
return this.
|
|
121
|
+
return this.ref && isActiveElement(this.ref);
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
get id() {
|
package/lib/Select/index.js
CHANGED
|
@@ -74,7 +74,6 @@ let Select = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
|
|
|
74
74
|
};
|
|
75
75
|
this._defaultId = (0, _uid.uid)('Select');
|
|
76
76
|
this._assistId = (0, _uid.uid)('Select-assistiveText');
|
|
77
|
-
this._input = null;
|
|
78
77
|
this._inputContainer = void 0;
|
|
79
78
|
this._list = null;
|
|
80
79
|
this._optionIds = [];
|
|
@@ -88,8 +87,6 @@ let Select = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
|
|
|
88
87
|
});
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
this._input = node; // TODO remove this in v9 and keep just 'ref'
|
|
92
|
-
|
|
93
90
|
this.ref = node;
|
|
94
91
|
this.props.inputRef(node);
|
|
95
92
|
};
|
|
@@ -123,11 +120,15 @@ let Select = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
|
|
|
123
120
|
}
|
|
124
121
|
|
|
125
122
|
focus() {
|
|
126
|
-
this.
|
|
123
|
+
this.ref && this.ref.focus();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
get _input() {
|
|
127
|
+
return this.ref;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
get focused() {
|
|
130
|
-
return this.
|
|
131
|
+
return this.ref && (0, _isActiveElement.isActiveElement)(this.ref);
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
get id() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-select",
|
|
3
|
-
"version": "8.11.2-snapshot.
|
|
3
|
+
"version": "8.11.2-snapshot.23+0d8081052",
|
|
4
4
|
"description": "A component for select and autocomplete behavior.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,30 +24,30 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.11.2-snapshot.
|
|
28
|
-
"@instructure/ui-color-utils": "8.11.2-snapshot.
|
|
29
|
-
"@instructure/ui-test-locator": "8.11.2-snapshot.
|
|
30
|
-
"@instructure/ui-test-utils": "8.11.2-snapshot.
|
|
31
|
-
"@instructure/ui-themes": "8.11.2-snapshot.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.11.2-snapshot.23+0d8081052",
|
|
28
|
+
"@instructure/ui-color-utils": "8.11.2-snapshot.23+0d8081052",
|
|
29
|
+
"@instructure/ui-test-locator": "8.11.2-snapshot.23+0d8081052",
|
|
30
|
+
"@instructure/ui-test-utils": "8.11.2-snapshot.23+0d8081052",
|
|
31
|
+
"@instructure/ui-themes": "8.11.2-snapshot.23+0d8081052"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.13.10",
|
|
35
|
-
"@instructure/emotion": "8.11.2-snapshot.
|
|
36
|
-
"@instructure/shared-types": "8.11.2-snapshot.
|
|
37
|
-
"@instructure/ui-dom-utils": "8.11.2-snapshot.
|
|
38
|
-
"@instructure/ui-form-field": "8.11.2-snapshot.
|
|
39
|
-
"@instructure/ui-icons": "8.11.2-snapshot.
|
|
40
|
-
"@instructure/ui-options": "8.11.2-snapshot.
|
|
41
|
-
"@instructure/ui-popover": "8.11.2-snapshot.
|
|
42
|
-
"@instructure/ui-position": "8.11.2-snapshot.
|
|
43
|
-
"@instructure/ui-prop-types": "8.11.2-snapshot.
|
|
44
|
-
"@instructure/ui-react-utils": "8.11.2-snapshot.
|
|
45
|
-
"@instructure/ui-selectable": "8.11.2-snapshot.
|
|
46
|
-
"@instructure/ui-testable": "8.11.2-snapshot.
|
|
47
|
-
"@instructure/ui-text-input": "8.11.2-snapshot.
|
|
48
|
-
"@instructure/ui-utils": "8.11.2-snapshot.
|
|
49
|
-
"@instructure/ui-view": "8.11.2-snapshot.
|
|
50
|
-
"@instructure/uid": "8.11.2-snapshot.
|
|
35
|
+
"@instructure/emotion": "8.11.2-snapshot.23+0d8081052",
|
|
36
|
+
"@instructure/shared-types": "8.11.2-snapshot.23+0d8081052",
|
|
37
|
+
"@instructure/ui-dom-utils": "8.11.2-snapshot.23+0d8081052",
|
|
38
|
+
"@instructure/ui-form-field": "8.11.2-snapshot.23+0d8081052",
|
|
39
|
+
"@instructure/ui-icons": "8.11.2-snapshot.23+0d8081052",
|
|
40
|
+
"@instructure/ui-options": "8.11.2-snapshot.23+0d8081052",
|
|
41
|
+
"@instructure/ui-popover": "8.11.2-snapshot.23+0d8081052",
|
|
42
|
+
"@instructure/ui-position": "8.11.2-snapshot.23+0d8081052",
|
|
43
|
+
"@instructure/ui-prop-types": "8.11.2-snapshot.23+0d8081052",
|
|
44
|
+
"@instructure/ui-react-utils": "8.11.2-snapshot.23+0d8081052",
|
|
45
|
+
"@instructure/ui-selectable": "8.11.2-snapshot.23+0d8081052",
|
|
46
|
+
"@instructure/ui-testable": "8.11.2-snapshot.23+0d8081052",
|
|
47
|
+
"@instructure/ui-text-input": "8.11.2-snapshot.23+0d8081052",
|
|
48
|
+
"@instructure/ui-utils": "8.11.2-snapshot.23+0d8081052",
|
|
49
|
+
"@instructure/ui-view": "8.11.2-snapshot.23+0d8081052",
|
|
50
|
+
"@instructure/uid": "8.11.2-snapshot.23+0d8081052",
|
|
51
51
|
"prop-types": "^15"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"sideEffects": false,
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "0d8081052d9986085a7d0c62ee9ac41a1dcf8608"
|
|
61
61
|
}
|
package/src/Select/index.tsx
CHANGED
|
@@ -128,7 +128,6 @@ class Select extends Component<SelectProps> {
|
|
|
128
128
|
|
|
129
129
|
_defaultId = uid('Select')
|
|
130
130
|
_assistId = uid('Select-assistiveText')
|
|
131
|
-
_input = null
|
|
132
131
|
_inputContainer = undefined
|
|
133
132
|
_list = null
|
|
134
133
|
// temporarily stores actionable options
|
|
@@ -138,11 +137,18 @@ class Select extends Component<SelectProps> {
|
|
|
138
137
|
|
|
139
138
|
focus() {
|
|
140
139
|
// @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'.
|
|
141
|
-
this.
|
|
140
|
+
this.ref && this.ref.focus()
|
|
141
|
+
}
|
|
142
|
+
get _input() {
|
|
143
|
+
console.warn(
|
|
144
|
+
'_input property is deprecated and will be removed in v9, please use ref instead'
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
return this.ref
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
get focused() {
|
|
145
|
-
return this.
|
|
151
|
+
return this.ref && isActiveElement(this.ref)
|
|
146
152
|
}
|
|
147
153
|
|
|
148
154
|
get id() {
|
|
@@ -224,7 +230,6 @@ class Select extends Component<SelectProps> {
|
|
|
224
230
|
this.setState({ hasInputRef: true })
|
|
225
231
|
}
|
|
226
232
|
|
|
227
|
-
this._input = node // TODO remove this in v9 and keep just 'ref'
|
|
228
233
|
this.ref = node
|
|
229
234
|
// @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
|
|
230
235
|
this.props.inputRef(node)
|
package/types/Select/index.d.ts
CHANGED
|
@@ -112,13 +112,13 @@ declare class Select extends Component<SelectProps> {
|
|
|
112
112
|
};
|
|
113
113
|
_defaultId: string;
|
|
114
114
|
_assistId: string;
|
|
115
|
-
_input: null;
|
|
116
115
|
_inputContainer: undefined;
|
|
117
116
|
_list: null;
|
|
118
117
|
_optionIds: never[];
|
|
119
118
|
_optionHeight: number;
|
|
120
119
|
focus(): void;
|
|
121
|
-
get
|
|
120
|
+
get _input(): Element | null;
|
|
121
|
+
get focused(): boolean | null;
|
|
122
122
|
get id(): string;
|
|
123
123
|
get width(): undefined;
|
|
124
124
|
get interaction(): import("@instructure/ui-react-utils").InteractionType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Select/index.tsx"],"names":[],"mappings":"AAwBA,eAA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