@instructure/ui-simple-select 8.16.1-snapshot.2 → 8.17.1-snapshot.14
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 +6 -0
- package/es/SimpleSelect/index.js +5 -6
- package/lib/SimpleSelect/index.js +5 -5
- package/package.json +15 -15
- package/src/SimpleSelect/index.tsx +4 -3
- package/src/SimpleSelect/props.ts +2 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/SimpleSelect/index.d.ts.map +1 -1
- package/types/SimpleSelect/props.d.ts +2 -1
- package/types/SimpleSelect/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- remove type:"commonjs" from package.json files ([0b243be](https://github.com/instructure/instructure-ui/commit/0b243bee389ee14493e6b3dbb30a8b660c295d3d))
|
|
11
|
+
|
|
6
12
|
# [8.16.0](https://github.com/instructure/instructure-ui/compare/v8.15.0...v8.16.0) (2022-02-03)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/es/SimpleSelect/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const _excluded = ["id", "value", "children", "renderBeforeLabel", "renderAfterL
|
|
|
3
3
|
_excluded2 = ["id", "renderLabel", "children"],
|
|
4
4
|
_excluded3 = ["renderLabel", "value", "defaultValue", "id", "size", "assistiveText", "placeholder", "interaction", "isRequired", "isInline", "width", "optionsMaxWidth", "optionsMaxHeight", "visibleOptionsCount", "messages", "placement", "constrain", "mountNode", "inputRef", "listRef", "renderEmptyOption", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onShowOptions", "onHideOptions", "children"];
|
|
5
5
|
|
|
6
|
-
var _dec, _class, _class2, _temp;
|
|
6
|
+
var _dec, _dec2, _class, _class2, _temp;
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
* The MIT License (MIT)
|
|
@@ -30,8 +30,7 @@ var _dec, _class, _class2, _temp;
|
|
|
30
30
|
*/
|
|
31
31
|
import React, { Component, Children } from 'react';
|
|
32
32
|
import { testable } from '@instructure/ui-testable';
|
|
33
|
-
import { matchComponentTypes, passthroughProps, callRenderProp, getInteraction } from '@instructure/ui-react-utils';
|
|
34
|
-
import { uid } from '@instructure/uid';
|
|
33
|
+
import { matchComponentTypes, passthroughProps, callRenderProp, getInteraction, withDeterministicId } from '@instructure/ui-react-utils';
|
|
35
34
|
import { Select } from '@instructure/ui-select';
|
|
36
35
|
import { Option } from './Option';
|
|
37
36
|
import { Group } from './Group';
|
|
@@ -44,7 +43,7 @@ tags: form, field, dropdown
|
|
|
44
43
|
---
|
|
45
44
|
@tsProps
|
|
46
45
|
**/
|
|
47
|
-
let SimpleSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class SimpleSelect extends Component {
|
|
46
|
+
let SimpleSelect = (_dec = withDeterministicId(), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class SimpleSelect extends Component {
|
|
48
47
|
constructor(props) {
|
|
49
48
|
super(props);
|
|
50
49
|
this.ref = null;
|
|
@@ -178,7 +177,7 @@ let SimpleSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Si
|
|
|
178
177
|
highlightedOptionId: void 0,
|
|
179
178
|
selectedOptionId: _option ? _option.props.id : void 0
|
|
180
179
|
};
|
|
181
|
-
this._emptyOptionId =
|
|
180
|
+
this._emptyOptionId = props.deterministicId('Select-EmptyOption');
|
|
182
181
|
}
|
|
183
182
|
|
|
184
183
|
get _select() {
|
|
@@ -415,6 +414,6 @@ let SimpleSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Si
|
|
|
415
414
|
placement: 'bottom stretch',
|
|
416
415
|
constrain: 'window',
|
|
417
416
|
renderEmptyOption: '---'
|
|
418
|
-
}, _temp)) || _class);
|
|
417
|
+
}, _temp)) || _class) || _class);
|
|
419
418
|
export { SimpleSelect };
|
|
420
419
|
export default SimpleSelect;
|
|
@@ -23,7 +23,7 @@ var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js
|
|
|
23
23
|
|
|
24
24
|
var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
27
27
|
|
|
28
28
|
var _Select = require("@instructure/ui-select/lib/Select");
|
|
29
29
|
|
|
@@ -37,7 +37,7 @@ const _excluded = ["id", "value", "children", "renderBeforeLabel", "renderAfterL
|
|
|
37
37
|
_excluded2 = ["id", "renderLabel", "children"],
|
|
38
38
|
_excluded3 = ["renderLabel", "value", "defaultValue", "id", "size", "assistiveText", "placeholder", "interaction", "isRequired", "isInline", "width", "optionsMaxWidth", "optionsMaxHeight", "visibleOptionsCount", "messages", "placement", "constrain", "mountNode", "inputRef", "listRef", "renderEmptyOption", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onShowOptions", "onHideOptions", "children"];
|
|
39
39
|
|
|
40
|
-
var _dec, _class, _class2, _temp;
|
|
40
|
+
var _dec, _dec2, _class, _class2, _temp;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
---
|
|
@@ -46,7 +46,7 @@ tags: form, field, dropdown
|
|
|
46
46
|
---
|
|
47
47
|
@tsProps
|
|
48
48
|
**/
|
|
49
|
-
let SimpleSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _class2 = class SimpleSelect extends _react.Component {
|
|
49
|
+
let SimpleSelect = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class SimpleSelect extends _react.Component {
|
|
50
50
|
constructor(props) {
|
|
51
51
|
super(props);
|
|
52
52
|
this.ref = null;
|
|
@@ -180,7 +180,7 @@ let SimpleSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
|
|
|
180
180
|
highlightedOptionId: void 0,
|
|
181
181
|
selectedOptionId: _option ? _option.props.id : void 0
|
|
182
182
|
};
|
|
183
|
-
this._emptyOptionId =
|
|
183
|
+
this._emptyOptionId = props.deterministicId('Select-EmptyOption');
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
get _select() {
|
|
@@ -414,7 +414,7 @@ let SimpleSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
|
|
|
414
414
|
placement: 'bottom stretch',
|
|
415
415
|
constrain: 'window',
|
|
416
416
|
renderEmptyOption: '---'
|
|
417
|
-
}, _temp)) || _class);
|
|
417
|
+
}, _temp)) || _class) || _class);
|
|
418
418
|
exports.SimpleSelect = SimpleSelect;
|
|
419
419
|
var _default = SimpleSelect;
|
|
420
420
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-simple-select",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.17.1-snapshot.14+f0b03679c",
|
|
4
4
|
"description": "A component for standard select element behavior.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.13.10",
|
|
27
|
-
"@instructure/console": "8.
|
|
28
|
-
"@instructure/
|
|
29
|
-
"@instructure/ui-
|
|
30
|
-
"@instructure/ui-
|
|
31
|
-
"@instructure/ui-
|
|
32
|
-
"@instructure/ui-
|
|
33
|
-
"@instructure/ui-
|
|
34
|
-
"@instructure/
|
|
27
|
+
"@instructure/console": "8.17.1-snapshot.14+f0b03679c",
|
|
28
|
+
"@instructure/shared-types": "8.17.1-snapshot.14+f0b03679c",
|
|
29
|
+
"@instructure/ui-form-field": "8.17.1-snapshot.14+f0b03679c",
|
|
30
|
+
"@instructure/ui-position": "8.17.1-snapshot.14+f0b03679c",
|
|
31
|
+
"@instructure/ui-prop-types": "8.17.1-snapshot.14+f0b03679c",
|
|
32
|
+
"@instructure/ui-react-utils": "8.17.1-snapshot.14+f0b03679c",
|
|
33
|
+
"@instructure/ui-select": "8.17.1-snapshot.14+f0b03679c",
|
|
34
|
+
"@instructure/ui-testable": "8.17.1-snapshot.14+f0b03679c",
|
|
35
35
|
"prop-types": "^15"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@instructure/ui-babel-preset": "8.
|
|
39
|
-
"@instructure/ui-color-utils": "8.
|
|
40
|
-
"@instructure/ui-icons": "8.
|
|
41
|
-
"@instructure/ui-test-locator": "8.
|
|
42
|
-
"@instructure/ui-test-utils": "8.
|
|
38
|
+
"@instructure/ui-babel-preset": "8.17.1-snapshot.14+f0b03679c",
|
|
39
|
+
"@instructure/ui-color-utils": "8.17.1-snapshot.14+f0b03679c",
|
|
40
|
+
"@instructure/ui-icons": "8.17.1-snapshot.14+f0b03679c",
|
|
41
|
+
"@instructure/ui-test-locator": "8.17.1-snapshot.14+f0b03679c",
|
|
42
|
+
"@instructure/ui-test-utils": "8.17.1-snapshot.14+f0b03679c"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": false,
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "f0b03679c4c4d05d4d650d22646ac1dc6791e935"
|
|
52
52
|
}
|
|
@@ -29,9 +29,9 @@ import {
|
|
|
29
29
|
matchComponentTypes,
|
|
30
30
|
passthroughProps,
|
|
31
31
|
callRenderProp,
|
|
32
|
-
getInteraction
|
|
32
|
+
getInteraction,
|
|
33
|
+
withDeterministicId
|
|
33
34
|
} from '@instructure/ui-react-utils'
|
|
34
|
-
import { uid } from '@instructure/uid'
|
|
35
35
|
|
|
36
36
|
import { Select } from '@instructure/ui-select'
|
|
37
37
|
import type { SelectProps } from '@instructure/ui-select'
|
|
@@ -63,6 +63,7 @@ tags: form, field, dropdown
|
|
|
63
63
|
---
|
|
64
64
|
@tsProps
|
|
65
65
|
**/
|
|
66
|
+
@withDeterministicId()
|
|
66
67
|
@testable()
|
|
67
68
|
class SimpleSelect extends Component<SimpleSelectProps, SimpleSelectState> {
|
|
68
69
|
static readonly componentId = 'SimpleSelect'
|
|
@@ -99,7 +100,7 @@ class SimpleSelect extends Component<SimpleSelectProps, SimpleSelectState> {
|
|
|
99
100
|
selectedOptionId: option ? option.props.id : undefined
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
this._emptyOptionId =
|
|
103
|
+
this._emptyOptionId = props.deterministicId!('Select-EmptyOption')
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
get _select() {
|
|
@@ -44,6 +44,7 @@ import type {
|
|
|
44
44
|
PositionMountNode
|
|
45
45
|
} from '@instructure/ui-position'
|
|
46
46
|
import type { SelectOwnProps } from '@instructure/ui-select'
|
|
47
|
+
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
47
48
|
|
|
48
49
|
type SimpleSelectOwnProps = PropsPassedToSelect & {
|
|
49
50
|
/**
|
|
@@ -237,7 +238,7 @@ type SimpleSelectProps = PickPropsWithExceptions<
|
|
|
237
238
|
OtherHTMLAttributes<
|
|
238
239
|
SimpleSelectOwnProps,
|
|
239
240
|
InputHTMLAttributes<SimpleSelectOwnProps>
|
|
240
|
-
>
|
|
241
|
+
> & WithDeterministicIdProps
|
|
241
242
|
|
|
242
243
|
type SimpleSelectState = {
|
|
243
244
|
inputValue?: string
|