@instructure/ui-simple-select 8.15.1-snapshot.3 → 8.16.1-snapshot.2
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 +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 +15 -16
- 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/es/package.json +0 -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.16.0](https://github.com/instructure/instructure-ui/compare/v8.15.0...v8.16.0) (2022-02-03)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **ui-simple-select:** add `optionsMaxHeight` prop to SimpleSelect ([c205f80](https://github.com/instructure/instructure-ui/commit/c205f80a35a46812abacb6cdfaadbc0de76beea4))
|
|
11
|
+
|
|
6
12
|
# [8.15.0](https://github.com/instructure/instructure-ui/compare/v8.14.0...v8.15.0) (2022-01-26)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @instructure/ui-simple-select
|
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,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-simple-select",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.16.1-snapshot.2+25359e770",
|
|
4
4
|
"description": "A component for standard select element behavior.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
|
-
"type": "commonjs",
|
|
7
6
|
"module": "./es/index.js",
|
|
8
7
|
"main": "./lib/index.js",
|
|
9
8
|
"types": "./types/index.d.ts",
|
|
@@ -25,22 +24,22 @@
|
|
|
25
24
|
"license": "MIT",
|
|
26
25
|
"dependencies": {
|
|
27
26
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.
|
|
29
|
-
"@instructure/ui-form-field": "8.
|
|
30
|
-
"@instructure/ui-position": "8.
|
|
31
|
-
"@instructure/ui-prop-types": "8.
|
|
32
|
-
"@instructure/ui-react-utils": "8.
|
|
33
|
-
"@instructure/ui-select": "8.
|
|
34
|
-
"@instructure/ui-testable": "8.
|
|
35
|
-
"@instructure/uid": "8.
|
|
27
|
+
"@instructure/console": "8.16.1-snapshot.2+25359e770",
|
|
28
|
+
"@instructure/ui-form-field": "8.16.1-snapshot.2+25359e770",
|
|
29
|
+
"@instructure/ui-position": "8.16.1-snapshot.2+25359e770",
|
|
30
|
+
"@instructure/ui-prop-types": "8.16.1-snapshot.2+25359e770",
|
|
31
|
+
"@instructure/ui-react-utils": "8.16.1-snapshot.2+25359e770",
|
|
32
|
+
"@instructure/ui-select": "8.16.1-snapshot.2+25359e770",
|
|
33
|
+
"@instructure/ui-testable": "8.16.1-snapshot.2+25359e770",
|
|
34
|
+
"@instructure/uid": "8.16.1-snapshot.2+25359e770",
|
|
36
35
|
"prop-types": "^15"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-babel-preset": "8.
|
|
40
|
-
"@instructure/ui-color-utils": "8.
|
|
41
|
-
"@instructure/ui-icons": "8.
|
|
42
|
-
"@instructure/ui-test-locator": "8.
|
|
43
|
-
"@instructure/ui-test-utils": "8.
|
|
38
|
+
"@instructure/ui-babel-preset": "8.16.1-snapshot.2+25359e770",
|
|
39
|
+
"@instructure/ui-color-utils": "8.16.1-snapshot.2+25359e770",
|
|
40
|
+
"@instructure/ui-icons": "8.16.1-snapshot.2+25359e770",
|
|
41
|
+
"@instructure/ui-test-locator": "8.16.1-snapshot.2+25359e770",
|
|
42
|
+
"@instructure/ui-test-utils": "8.16.1-snapshot.2+25359e770"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
45
|
"react": ">=16.8 <=17"
|
|
@@ -49,5 +48,5 @@
|
|
|
49
48
|
"access": "public"
|
|
50
49
|
},
|
|
51
50
|
"sideEffects": false,
|
|
52
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "25359e77043270cf26e92b14f396b498f1540c62"
|
|
53
52
|
}
|
|
@@ -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',
|