@instructure/ui-simple-select 8.15.0 → 8.15.1-snapshot.5
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 +3 -1
- package/es/SimpleSelect/props.js +3 -2
- package/lib/SimpleSelect/index.js +3 -1
- package/lib/SimpleSelect/props.js +3 -2
- package/package.json +16 -15
- package/src/SimpleSelect/index.tsx +2 -0
- package/src/SimpleSelect/props.ts +15 -7
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/SimpleSelect/index.d.ts +4 -2
- package/types/SimpleSelect/index.d.ts.map +1 -1
- package/types/SimpleSelect/props.d.ts +9 -4
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
const _excluded = ["id", "value", "children", "renderBeforeLabel", "renderAfterLabel"],
|
|
3
3
|
_excluded2 = ["id", "renderLabel", "children"],
|
|
4
|
-
_excluded3 = ["renderLabel", "value", "defaultValue", "id", "size", "assistiveText", "placeholder", "interaction", "isRequired", "isInline", "width", "optionsMaxWidth", "visibleOptionsCount", "messages", "placement", "constrain", "mountNode", "inputRef", "listRef", "renderEmptyOption", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onShowOptions", "onHideOptions", "children"];
|
|
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
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
@@ -356,6 +356,7 @@ let SimpleSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Si
|
|
|
356
356
|
isInline = _this$props.isInline,
|
|
357
357
|
width = _this$props.width,
|
|
358
358
|
optionsMaxWidth = _this$props.optionsMaxWidth,
|
|
359
|
+
optionsMaxHeight = _this$props.optionsMaxHeight,
|
|
359
360
|
visibleOptionsCount = _this$props.visibleOptionsCount,
|
|
360
361
|
messages = _this$props.messages,
|
|
361
362
|
placement = _this$props.placement,
|
|
@@ -386,6 +387,7 @@ let SimpleSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Si
|
|
|
386
387
|
isInline: isInline,
|
|
387
388
|
width: width,
|
|
388
389
|
optionsMaxWidth: optionsMaxWidth,
|
|
390
|
+
optionsMaxHeight: optionsMaxHeight,
|
|
389
391
|
visibleOptionsCount: visibleOptionsCount,
|
|
390
392
|
messages: messages,
|
|
391
393
|
placement: placement,
|
package/es/SimpleSelect/props.js
CHANGED
|
@@ -40,8 +40,9 @@ const propTypes = {
|
|
|
40
40
|
isRequired: PropTypes.bool,
|
|
41
41
|
isInline: PropTypes.bool,
|
|
42
42
|
width: PropTypes.string,
|
|
43
|
-
optionsMaxWidth: PropTypes.string,
|
|
44
43
|
visibleOptionsCount: PropTypes.number,
|
|
44
|
+
optionsMaxHeight: PropTypes.string,
|
|
45
|
+
optionsMaxWidth: PropTypes.string,
|
|
45
46
|
messages: PropTypes.arrayOf(FormPropTypes.message),
|
|
46
47
|
placement: PositionPropTypes.placement,
|
|
47
48
|
constrain: PositionPropTypes.constrain,
|
|
@@ -58,5 +59,5 @@ const propTypes = {
|
|
|
58
59
|
renderAfterInput: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
59
60
|
children: ChildrenPropTypes.oneOf([Group, Option])
|
|
60
61
|
};
|
|
61
|
-
const allowedProps = ['renderLabel', 'value', 'defaultValue', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', '
|
|
62
|
+
const allowedProps = ['renderLabel', 'value', 'defaultValue', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'visibleOptionsCount', 'optionsMaxHeight', 'optionsMaxWidth', 'messages', 'placement', 'constrain', 'mountNode', 'onChange', 'onFocus', 'onBlur', 'onShowOptions', 'onHideOptions', 'inputRef', 'listRef', 'renderEmptyOption', 'renderBeforeInput', 'renderAfterInput', 'children'];
|
|
62
63
|
export { propTypes, allowedProps };
|
|
@@ -35,7 +35,7 @@ var _props = require("./props");
|
|
|
35
35
|
|
|
36
36
|
const _excluded = ["id", "value", "children", "renderBeforeLabel", "renderAfterLabel"],
|
|
37
37
|
_excluded2 = ["id", "renderLabel", "children"],
|
|
38
|
-
_excluded3 = ["renderLabel", "value", "defaultValue", "id", "size", "assistiveText", "placeholder", "interaction", "isRequired", "isInline", "width", "optionsMaxWidth", "visibleOptionsCount", "messages", "placement", "constrain", "mountNode", "inputRef", "listRef", "renderEmptyOption", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onShowOptions", "onHideOptions", "children"];
|
|
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
40
|
var _dec, _class, _class2, _temp;
|
|
41
41
|
|
|
@@ -356,6 +356,7 @@ let SimpleSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
|
|
|
356
356
|
isInline = _this$props.isInline,
|
|
357
357
|
width = _this$props.width,
|
|
358
358
|
optionsMaxWidth = _this$props.optionsMaxWidth,
|
|
359
|
+
optionsMaxHeight = _this$props.optionsMaxHeight,
|
|
359
360
|
visibleOptionsCount = _this$props.visibleOptionsCount,
|
|
360
361
|
messages = _this$props.messages,
|
|
361
362
|
placement = _this$props.placement,
|
|
@@ -385,6 +386,7 @@ let SimpleSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
|
|
|
385
386
|
isInline: isInline,
|
|
386
387
|
width: width,
|
|
387
388
|
optionsMaxWidth: optionsMaxWidth,
|
|
389
|
+
optionsMaxHeight: optionsMaxHeight,
|
|
388
390
|
visibleOptionsCount: visibleOptionsCount,
|
|
389
391
|
messages: messages,
|
|
390
392
|
placement: placement,
|
|
@@ -55,8 +55,9 @@ const propTypes = {
|
|
|
55
55
|
isRequired: _propTypes.default.bool,
|
|
56
56
|
isInline: _propTypes.default.bool,
|
|
57
57
|
width: _propTypes.default.string,
|
|
58
|
-
optionsMaxWidth: _propTypes.default.string,
|
|
59
58
|
visibleOptionsCount: _propTypes.default.number,
|
|
59
|
+
optionsMaxHeight: _propTypes.default.string,
|
|
60
|
+
optionsMaxWidth: _propTypes.default.string,
|
|
60
61
|
messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
|
|
61
62
|
placement: _PositionPropTypes.PositionPropTypes.placement,
|
|
62
63
|
constrain: _PositionPropTypes.PositionPropTypes.constrain,
|
|
@@ -74,5 +75,5 @@ const propTypes = {
|
|
|
74
75
|
children: _Children.Children.oneOf([_Group.Group, _Option.Option])
|
|
75
76
|
};
|
|
76
77
|
exports.propTypes = propTypes;
|
|
77
|
-
const allowedProps = ['renderLabel', 'value', 'defaultValue', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', '
|
|
78
|
+
const allowedProps = ['renderLabel', 'value', 'defaultValue', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'visibleOptionsCount', 'optionsMaxHeight', 'optionsMaxWidth', 'messages', 'placement', 'constrain', 'mountNode', 'onChange', 'onFocus', 'onBlur', 'onShowOptions', 'onHideOptions', 'inputRef', 'listRef', 'renderEmptyOption', 'renderBeforeInput', 'renderAfterInput', 'children'];
|
|
78
79
|
exports.allowedProps = allowedProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-simple-select",
|
|
3
|
-
"version": "8.15.
|
|
3
|
+
"version": "8.15.1-snapshot.5+c205f80a3",
|
|
4
4
|
"description": "A component for standard select element behavior.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.15.
|
|
29
|
-
"@instructure/ui-form-field": "8.15.
|
|
30
|
-
"@instructure/ui-position": "8.15.
|
|
31
|
-
"@instructure/ui-prop-types": "8.15.
|
|
32
|
-
"@instructure/ui-react-utils": "8.15.
|
|
33
|
-
"@instructure/ui-select": "8.15.
|
|
34
|
-
"@instructure/ui-testable": "8.15.
|
|
35
|
-
"@instructure/uid": "8.15.
|
|
28
|
+
"@instructure/console": "8.15.1-snapshot.5+c205f80a3",
|
|
29
|
+
"@instructure/ui-form-field": "8.15.1-snapshot.5+c205f80a3",
|
|
30
|
+
"@instructure/ui-position": "8.15.1-snapshot.5+c205f80a3",
|
|
31
|
+
"@instructure/ui-prop-types": "8.15.1-snapshot.5+c205f80a3",
|
|
32
|
+
"@instructure/ui-react-utils": "8.15.1-snapshot.5+c205f80a3",
|
|
33
|
+
"@instructure/ui-select": "8.15.1-snapshot.5+c205f80a3",
|
|
34
|
+
"@instructure/ui-testable": "8.15.1-snapshot.5+c205f80a3",
|
|
35
|
+
"@instructure/uid": "8.15.1-snapshot.5+c205f80a3",
|
|
36
36
|
"prop-types": "^15"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-babel-preset": "8.15.
|
|
40
|
-
"@instructure/ui-color-utils": "8.15.
|
|
41
|
-
"@instructure/ui-icons": "8.15.
|
|
42
|
-
"@instructure/ui-test-locator": "8.15.
|
|
43
|
-
"@instructure/ui-test-utils": "8.15.
|
|
39
|
+
"@instructure/ui-babel-preset": "8.15.1-snapshot.5+c205f80a3",
|
|
40
|
+
"@instructure/ui-color-utils": "8.15.1-snapshot.5+c205f80a3",
|
|
41
|
+
"@instructure/ui-icons": "8.15.1-snapshot.5+c205f80a3",
|
|
42
|
+
"@instructure/ui-test-locator": "8.15.1-snapshot.5+c205f80a3",
|
|
43
|
+
"@instructure/ui-test-utils": "8.15.1-snapshot.5+c205f80a3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=16.8 <=17"
|
|
@@ -48,5 +48,6 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"sideEffects": false
|
|
51
|
+
"sideEffects": false,
|
|
52
|
+
"gitHead": "c205f80a35a46812abacb6cdfaadbc0de76beea4"
|
|
52
53
|
}
|
|
@@ -393,6 +393,7 @@ class SimpleSelect extends Component<SimpleSelectProps, SimpleSelectState> {
|
|
|
393
393
|
isInline,
|
|
394
394
|
width,
|
|
395
395
|
optionsMaxWidth,
|
|
396
|
+
optionsMaxHeight,
|
|
396
397
|
visibleOptionsCount,
|
|
397
398
|
messages,
|
|
398
399
|
placement,
|
|
@@ -425,6 +426,7 @@ class SimpleSelect extends Component<SimpleSelectProps, SimpleSelectState> {
|
|
|
425
426
|
isInline={isInline}
|
|
426
427
|
width={width}
|
|
427
428
|
optionsMaxWidth={optionsMaxWidth}
|
|
429
|
+
optionsMaxHeight={optionsMaxHeight}
|
|
428
430
|
visibleOptionsCount={visibleOptionsCount}
|
|
429
431
|
messages={messages}
|
|
430
432
|
placement={placement}
|
|
@@ -144,15 +144,21 @@ type PropsPassedToSelect = {
|
|
|
144
144
|
width?: string
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* The
|
|
148
|
-
* set, the list will only display as wide as the text input.
|
|
147
|
+
* The number of options that should be visible before having to scroll. Works best when the options are the same height.
|
|
149
148
|
*/
|
|
150
|
-
|
|
149
|
+
visibleOptionsCount?: number
|
|
151
150
|
|
|
152
151
|
/**
|
|
153
|
-
* The
|
|
152
|
+
* The max height the options list can be before having to scroll. If
|
|
153
|
+
* set, it will __override__ the `visibleOptionsCount` prop.
|
|
154
154
|
*/
|
|
155
|
-
|
|
155
|
+
optionsMaxHeight?: string
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The max width the options list can be before option text wraps. If not
|
|
159
|
+
* set, the list will only display as wide as the text input.
|
|
160
|
+
*/
|
|
161
|
+
optionsMaxWidth?: string
|
|
156
162
|
|
|
157
163
|
/**
|
|
158
164
|
* Displays messages and validation for the input. It should be an array of
|
|
@@ -253,8 +259,9 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
253
259
|
isRequired: PropTypes.bool,
|
|
254
260
|
isInline: PropTypes.bool,
|
|
255
261
|
width: PropTypes.string,
|
|
256
|
-
optionsMaxWidth: PropTypes.string,
|
|
257
262
|
visibleOptionsCount: PropTypes.number,
|
|
263
|
+
optionsMaxHeight: PropTypes.string,
|
|
264
|
+
optionsMaxWidth: PropTypes.string,
|
|
258
265
|
messages: PropTypes.arrayOf(FormPropTypes.message),
|
|
259
266
|
placement: PositionPropTypes.placement,
|
|
260
267
|
constrain: PositionPropTypes.constrain,
|
|
@@ -284,8 +291,9 @@ const allowedProps: AllowedPropKeys = [
|
|
|
284
291
|
'isRequired',
|
|
285
292
|
'isInline',
|
|
286
293
|
'width',
|
|
287
|
-
'optionsMaxWidth',
|
|
288
294
|
'visibleOptionsCount',
|
|
295
|
+
'optionsMaxHeight',
|
|
296
|
+
'optionsMaxWidth',
|
|
289
297
|
'messages',
|
|
290
298
|
'placement',
|
|
291
299
|
'constrain',
|