@instructure/ui-simple-select 8.17.0 → 8.17.1-snapshot.17
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/LICENSE.md +27 -0
- package/es/SimpleSelect/index.js +5 -6
- package/lib/SimpleSelect/index.js +5 -5
- package/package.json +16 -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/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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.
|
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.17.
|
|
3
|
+
"version": "8.17.1-snapshot.17+8e38d5a2e",
|
|
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.17.
|
|
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.17+8e38d5a2e",
|
|
28
|
+
"@instructure/shared-types": "8.17.1-snapshot.17+8e38d5a2e",
|
|
29
|
+
"@instructure/ui-form-field": "8.17.1-snapshot.17+8e38d5a2e",
|
|
30
|
+
"@instructure/ui-position": "8.17.1-snapshot.17+8e38d5a2e",
|
|
31
|
+
"@instructure/ui-prop-types": "8.17.1-snapshot.17+8e38d5a2e",
|
|
32
|
+
"@instructure/ui-react-utils": "8.17.1-snapshot.17+8e38d5a2e",
|
|
33
|
+
"@instructure/ui-select": "8.17.1-snapshot.17+8e38d5a2e",
|
|
34
|
+
"@instructure/ui-testable": "8.17.1-snapshot.17+8e38d5a2e",
|
|
35
35
|
"prop-types": "^15"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@instructure/ui-babel-preset": "8.17.
|
|
39
|
-
"@instructure/ui-color-utils": "8.17.
|
|
40
|
-
"@instructure/ui-icons": "8.17.
|
|
41
|
-
"@instructure/ui-test-locator": "8.17.
|
|
42
|
-
"@instructure/ui-test-utils": "8.17.
|
|
38
|
+
"@instructure/ui-babel-preset": "8.17.1-snapshot.17+8e38d5a2e",
|
|
39
|
+
"@instructure/ui-color-utils": "8.17.1-snapshot.17+8e38d5a2e",
|
|
40
|
+
"@instructure/ui-icons": "8.17.1-snapshot.17+8e38d5a2e",
|
|
41
|
+
"@instructure/ui-test-locator": "8.17.1-snapshot.17+8e38d5a2e",
|
|
42
|
+
"@instructure/ui-test-utils": "8.17.1-snapshot.17+8e38d5a2e"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -47,5 +47,6 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"sideEffects": false
|
|
50
|
+
"sideEffects": false,
|
|
51
|
+
"gitHead": "8e38d5a2e11e842eafa2fa270e47a261c6ebb626"
|
|
51
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
|