@instructure/ui-select 8.13.1-snapshot.9 → 8.14.1-snapshot.15

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/es/Select/Group/index.js +2 -3
  3. package/es/Select/Group/props.js +0 -7
  4. package/es/Select/Option/index.js +2 -2
  5. package/es/Select/Option/props.js +0 -27
  6. package/es/Select/SelectLocator.js +5 -2
  7. package/es/Select/index.js +92 -85
  8. package/es/Select/props.js +2 -142
  9. package/lib/Select/Group/index.js +2 -3
  10. package/lib/Select/Group/props.js +0 -7
  11. package/lib/Select/Option/index.js +2 -2
  12. package/lib/Select/Option/props.js +0 -27
  13. package/lib/Select/SelectLocator.js +3 -0
  14. package/lib/Select/index.js +96 -86
  15. package/lib/Select/props.js +2 -142
  16. package/package.json +23 -23
  17. package/src/Select/Group/index.tsx +2 -3
  18. package/src/Select/Group/props.ts +8 -8
  19. package/src/Select/Option/index.tsx +2 -2
  20. package/src/Select/Option/props.ts +33 -25
  21. package/src/Select/index.tsx +160 -168
  22. package/src/Select/props.ts +176 -117
  23. package/tsconfig.build.json +27 -2
  24. package/tsconfig.build.tsbuildinfo +1 -0
  25. package/types/Select/Group/index.d.ts +4 -5
  26. package/types/Select/Group/index.d.ts.map +1 -1
  27. package/types/Select/Group/props.d.ts +7 -1
  28. package/types/Select/Group/props.d.ts.map +1 -1
  29. package/types/Select/Option/index.d.ts +3 -7
  30. package/types/Select/Option/index.d.ts.map +1 -1
  31. package/types/Select/Option/props.d.ts +28 -4
  32. package/types/Select/Option/props.d.ts.map +1 -1
  33. package/types/Select/SelectLocator.d.ts +117 -117
  34. package/types/Select/index.d.ts +68 -99
  35. package/types/Select/index.d.ts.map +1 -1
  36. package/types/Select/props.d.ts +146 -21
  37. package/types/Select/props.d.ts.map +1 -1
@@ -28,176 +28,36 @@ import { PositionPropTypes } from '@instructure/ui-position';
28
28
  import { Group } from './Group';
29
29
  import { Option } from './Option';
30
30
  const propTypes = {
31
- /**
32
- * The form field label.
33
- */
34
31
  renderLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
35
-
36
- /**
37
- * The value to display in the text input.
38
- */
39
32
  inputValue: PropTypes.string,
40
-
41
- /**
42
- * Whether or not to show the options list.
43
- */
44
- isShowingOptions: PropTypes.bool,
45
-
46
- /**
47
- * The id of the text input. One is generated if not supplied.
48
- */
49
33
  id: PropTypes.string,
50
-
51
- /**
52
- * The size of the text input.
53
- */
54
34
  size: PropTypes.oneOf(['small', 'medium', 'large']),
55
-
56
- /**
57
- * Additional helpful text to provide to screen readers about the operation
58
- * of the component.
59
- */
60
35
  assistiveText: PropTypes.string,
61
-
62
- /**
63
- * Html placeholder text to display when the input has no value. This should
64
- * be hint text, not a label replacement.
65
- */
66
36
  placeholder: PropTypes.string,
67
-
68
- /**
69
- * Specifies if interaction with the input is enabled, disabled, or readonly.
70
- * When "disabled", the input changes visibly to indicate that it cannot
71
- * receive user interactions. When "readonly" the input still cannot receive
72
- * user interactions but it keeps the same styles as if it were enabled.
73
- */
74
37
  interaction: PropTypes.oneOf(['enabled', 'disabled', 'readonly']),
75
-
76
- /**
77
- * Whether or not the text input is required.
78
- */
79
38
  isRequired: PropTypes.bool,
80
-
81
- /**
82
- * Whether the input is rendered inline with other elements or if it
83
- * is rendered as a block level element.
84
- */
85
39
  isInline: PropTypes.bool,
86
-
87
- /**
88
- * The width of the text input.
89
- */
90
40
  width: PropTypes.string,
91
-
92
- /**
93
- * The width of the text input, in characters, if a width is not explicitly
94
- * provided via the `width` prop. Only applicable if `isInline={true}`.
95
- */
96
- htmlSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
97
-
98
- /**
99
- * The max width the options list can be before option text wraps. If not
100
- * set, the list will only display as wide as the text input.
101
- */
41
+ htmlSize: PropTypes.number,
102
42
  optionsMaxWidth: PropTypes.string,
103
-
104
- /**
105
- * The number of options that should be visible before having to scroll.
106
- */
107
43
  visibleOptionsCount: PropTypes.number,
108
-
109
- /**
110
- * Displays messages and validation for the input. It should be an object
111
- * with the following shape:
112
- * `{
113
- * text: PropTypes.node,
114
- * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
115
- * }`
116
- */
117
44
  messages: PropTypes.arrayOf(FormPropTypes.message),
118
-
119
- /**
120
- * The placement of the options list.
121
- */
122
45
  placement: PositionPropTypes.placement,
123
-
124
- /**
125
- * The parent in which to constrain the placement.
126
- */
127
46
  constrain: PositionPropTypes.constrain,
128
-
129
- /**
130
- * An element or a function returning an element to use mount the options
131
- * list to in the DOM (defaults to `document.body`)
132
- */
133
47
  mountNode: PositionPropTypes.mountNode,
134
-
135
- /**
136
- * Callback fired when text input receives focus.
137
- */
138
48
  onFocus: PropTypes.func,
139
-
140
- /**
141
- * Callback fired when text input loses focus.
142
- */
143
49
  onBlur: PropTypes.func,
144
-
145
- /**
146
- * Callback fired when text input value changes.
147
- */
148
50
  onInputChange: PropTypes.func,
149
-
150
- /**
151
- * Callback fired requesting that the options list be shown.
152
- */
51
+ isShowingOptions: PropTypes.bool,
153
52
  onRequestShowOptions: PropTypes.func,
154
-
155
- /**
156
- * Callback fired requesting that the options list be hidden.
157
- */
158
53
  onRequestHideOptions: PropTypes.func,
159
-
160
- /**
161
- * Callback fired requesting a particular option be highlighted.
162
- */
163
54
  onRequestHighlightOption: PropTypes.func,
164
-
165
- /**
166
- * Callback fired requesting a particular option be selected.
167
- */
168
55
  onRequestSelectOption: PropTypes.func,
169
-
170
- /**
171
- * A ref to the html `input` element.
172
- */
173
56
  inputRef: PropTypes.func,
174
-
175
- /**
176
- * A ref to the html `ul` element.
177
- */
178
57
  listRef: PropTypes.func,
179
-
180
- /**
181
- * Content to display before the text input. This will commonly be an icon or
182
- * tags to show multiple selections.
183
- */
184
58
  renderBeforeInput: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
185
-
186
- /**
187
- * Content to display after the text input. This content will replace the
188
- * default arrow icons.
189
- */
190
59
  renderAfterInput: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
191
-
192
- /**
193
- * Children of type `<Select.Option />` or `<Select.Group />`.
194
- */
195
60
  children: ChildrenPropTypes.oneOf([Group, Option]),
196
-
197
- /**
198
- * Prevents the default behavior of wrapping the input and rendered content
199
- * when available space is exceeded.
200
- */
201
61
  shouldNotWrap: PropTypes.bool
202
62
  };
203
63
  const allowedProps = ['renderLabel', 'inputValue', 'isShowingOptions', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'htmlSize', 'optionsMaxWidth', 'visibleOptionsCount', 'messages', 'placement', 'constrain', 'mountNode', 'onFocus', 'onBlur', 'onInputChange', 'onRequestShowOptions', 'onRequestHideOptions', 'onRequestHighlightOption', 'onRequestSelectOption', 'inputRef', 'listRef', 'renderBeforeInput', 'renderAfterInput', 'children', 'shouldNotWrap'];
@@ -39,6 +39,7 @@ parent: Select
39
39
  id: Select.Group
40
40
  ---
41
41
  @module Group
42
+ @tsProps
42
43
  **/
43
44
  class Group extends _react.Component {
44
45
  /* istanbul ignore next */
@@ -55,8 +56,6 @@ Group.displayName = "Group";
55
56
  Group.componentId = 'Select.Group';
56
57
  Group.allowedProps = _props.allowedProps;
57
58
  Group.propTypes = _props.propTypes;
58
- Group.defaultProps = {
59
- children: null
60
- };
59
+ Group.defaultProps = {};
61
60
  var _default = Group;
62
61
  exports.default = _default;
@@ -37,14 +37,7 @@ var _Option = require("../Option");
37
37
  * SOFTWARE.
38
38
  */
39
39
  const propTypes = {
40
- /**
41
- * The label associated with the group options.
42
- */
43
40
  renderLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
44
-
45
- /**
46
- * Children of type `<SimpleSelect.Option />` that will be considered part of the group.
47
- */
48
41
  children: _Children.Children.oneOf([_Option.Option])
49
42
  };
50
43
  exports.propTypes = propTypes;
@@ -39,6 +39,7 @@ parent: Select
39
39
  id: Select.Option
40
40
  ---
41
41
  @module Option
42
+ @tsProps
42
43
  **/
43
44
  class Option extends _react.Component {
44
45
  /* istanbul ignore next */
@@ -58,8 +59,7 @@ Option.propTypes = _props.propTypes;
58
59
  Option.defaultProps = {
59
60
  isHighlighted: false,
60
61
  isSelected: false,
61
- isDisabled: false,
62
- children: null
62
+ isDisabled: false
63
63
  };
64
64
  var _default = Option;
65
65
  exports.default = _default;
@@ -33,39 +33,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
33
33
  * SOFTWARE.
34
34
  */
35
35
  const propTypes = {
36
- /**
37
- * The id for the option.
38
- */
39
36
  id: _propTypes.default.string.isRequired,
40
-
41
- /**
42
- * Whether or not this option is highlighted.
43
- */
44
37
  isHighlighted: _propTypes.default.bool,
45
-
46
- /**
47
- * Whether or not this option is selected.
48
- */
49
38
  isSelected: _propTypes.default.bool,
50
-
51
- /**
52
- * Whether or not this option is disabled.
53
- */
54
39
  isDisabled: _propTypes.default.bool,
55
-
56
- /**
57
- * Content to display before the option label, such as an icon.
58
- */
59
40
  renderBeforeLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
60
-
61
- /**
62
- * Content to display after the option label, such as an icon.
63
- */
64
41
  renderAfterLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
65
-
66
- /**
67
- * Content to display as the option label.
68
- */
69
42
  children: _propTypes.default.node
70
43
  };
71
44
  exports.propTypes = propTypes;
@@ -38,8 +38,11 @@ var _index = require("./index");
38
38
  */
39
39
 
40
40
  /* eslint-disable no-restricted-imports */
41
+ // @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module '@ins... Remove this comment to see the full error message
42
+ // @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module '@ins... Remove this comment to see the full error message
41
43
 
42
44
  /* eslint-enable no-restricted-imports */
45
+ // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
43
46
  const SelectLocator = (0, _locator.locator)(_index.Select.selector, {
44
47
  findInput: function () {
45
48
  return (0, _locator.locator)('input').find(...arguments);