@instructure/ui-select 8.11.2-snapshot.7 → 8.12.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-select
9
+
6
10
  ## [8.11.1](https://github.com/instructure/instructure-ui/compare/v8.11.0...v8.11.1) (2021-10-19)
7
11
 
8
12
  ### Bug Fixes
@@ -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._input && this._input.focus();
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._input && isActiveElement(this._input);
121
+ return this.ref && isActiveElement(this.ref);
121
122
  }
122
123
 
123
124
  get id() {
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -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._input && this._input.focus();
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._input && (0, _isActiveElement.isActiveElement)(this._input);
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.7+2681e145a",
3
+ "version": "8.12.0",
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.7+2681e145a",
28
- "@instructure/ui-color-utils": "8.11.2-snapshot.7+2681e145a",
29
- "@instructure/ui-test-locator": "8.11.2-snapshot.7+2681e145a",
30
- "@instructure/ui-test-utils": "8.11.2-snapshot.7+2681e145a",
31
- "@instructure/ui-themes": "8.11.2-snapshot.7+2681e145a"
27
+ "@instructure/ui-babel-preset": "8.12.0",
28
+ "@instructure/ui-color-utils": "8.12.0",
29
+ "@instructure/ui-test-locator": "8.12.0",
30
+ "@instructure/ui-test-utils": "8.12.0",
31
+ "@instructure/ui-themes": "8.12.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.13.10",
35
- "@instructure/emotion": "8.11.2-snapshot.7+2681e145a",
36
- "@instructure/shared-types": "8.11.2-snapshot.7+2681e145a",
37
- "@instructure/ui-dom-utils": "8.11.2-snapshot.7+2681e145a",
38
- "@instructure/ui-form-field": "8.11.2-snapshot.7+2681e145a",
39
- "@instructure/ui-icons": "8.11.2-snapshot.7+2681e145a",
40
- "@instructure/ui-options": "8.11.2-snapshot.7+2681e145a",
41
- "@instructure/ui-popover": "8.11.2-snapshot.7+2681e145a",
42
- "@instructure/ui-position": "8.11.2-snapshot.7+2681e145a",
43
- "@instructure/ui-prop-types": "8.11.2-snapshot.7+2681e145a",
44
- "@instructure/ui-react-utils": "8.11.2-snapshot.7+2681e145a",
45
- "@instructure/ui-selectable": "8.11.2-snapshot.7+2681e145a",
46
- "@instructure/ui-testable": "8.11.2-snapshot.7+2681e145a",
47
- "@instructure/ui-text-input": "8.11.2-snapshot.7+2681e145a",
48
- "@instructure/ui-utils": "8.11.2-snapshot.7+2681e145a",
49
- "@instructure/ui-view": "8.11.2-snapshot.7+2681e145a",
50
- "@instructure/uid": "8.11.2-snapshot.7+2681e145a",
35
+ "@instructure/emotion": "8.12.0",
36
+ "@instructure/shared-types": "8.12.0",
37
+ "@instructure/ui-dom-utils": "8.12.0",
38
+ "@instructure/ui-form-field": "8.12.0",
39
+ "@instructure/ui-icons": "8.12.0",
40
+ "@instructure/ui-options": "8.12.0",
41
+ "@instructure/ui-popover": "8.12.0",
42
+ "@instructure/ui-position": "8.12.0",
43
+ "@instructure/ui-prop-types": "8.12.0",
44
+ "@instructure/ui-react-utils": "8.12.0",
45
+ "@instructure/ui-selectable": "8.12.0",
46
+ "@instructure/ui-testable": "8.12.0",
47
+ "@instructure/ui-text-input": "8.12.0",
48
+ "@instructure/ui-utils": "8.12.0",
49
+ "@instructure/ui-view": "8.12.0",
50
+ "@instructure/uid": "8.12.0",
51
51
  "prop-types": "^15"
52
52
  },
53
53
  "peerDependencies": {
@@ -56,6 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "sideEffects": false,
60
- "gitHead": "2681e145ad469e1396536d3e9eed75a19995eb8a"
59
+ "sideEffects": false
61
60
  }
@@ -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._input && this._input.focus()
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._input && isActiveElement(this._input)
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)
@@ -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 focused(): null;
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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I,OAAO,mBAEV;IAED,IAAI,EAAE,WAEL;IAED,IAAI,KAAK,cAGR;IAED,IAAI,WAAW,0DAEd;IAED,IAAI,mBAAmB,SAyBtB;IAED,IAAI,gBAAgB,QA8BnB;IAGD,cAAc,sBASb;IAGD,aAAa,sBASZ;IAGD,uBAAuB,sBAEtB;IAGD,cAAc,CAAC,EAAE,KAAA;IA0BjB,eAAe,CAAC,KAAK,KAAA,EAAE,EAAE,KAAA;IAQzB,gBAAgB;;;0CA4BC,KAAK;;;;;;uCAkCiB,KAAK;;;;;;;;;;;IAa5C,YAAY,CAAC,MAAM,KAAA,EAAE,IAAI,KAAA;IAwDzB,WAAW,CAAC,KAAK,KAAA,EAAE,IAAI,KAAA;IAyCvB,UAAU,CAAC,IAAI,KAAA;IA6Df,UAAU;IAcV,WAAW,CAAC,IAAI,KAAA;IAyEhB,MAAM;CAwDP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
1
- ---
2
- title: The MIT License (MIT)
3
- category: Getting Started
4
- order: 9
5
- ---
6
-
7
- # The MIT License (MIT)
8
-
9
- Copyright (c) 2015 Instructure, Inc.
10
-
11
- **Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions.**
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.