@instructure/ui-select 10.26.1-snapshot-2 → 10.26.1
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 +2 -23
- package/es/Select/Group/index.js +2 -1
- package/es/Select/Group/props.js +8 -1
- package/es/Select/Option/index.js +2 -1
- package/es/Select/Option/props.js +11 -1
- package/es/Select/index.js +7 -10
- package/es/Select/props.js +45 -1
- package/lib/Select/Group/index.js +1 -0
- package/lib/Select/Group/props.js +9 -1
- package/lib/Select/Option/index.js +1 -0
- package/lib/Select/Option/props.js +12 -1
- package/lib/Select/index.js +6 -9
- package/lib/Select/props.js +45 -1
- package/package.json +24 -21
- package/src/Select/Group/index.tsx +2 -1
- package/src/Select/Group/props.ts +16 -2
- package/src/Select/Option/index.tsx +2 -1
- package/src/Select/Option/props.ts +19 -2
- package/src/Select/index.tsx +5 -6
- package/src/Select/props.ts +48 -1
- package/tsconfig.build.json +3 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Select/Group/index.d.ts +4 -0
- package/types/Select/Group/index.d.ts.map +1 -1
- package/types/Select/Group/props.d.ts +3 -2
- package/types/Select/Group/props.d.ts.map +1 -1
- package/types/Select/Option/index.d.ts +7 -0
- package/types/Select/Option/index.d.ts.map +1 -1
- package/types/Select/Option/props.d.ts +3 -2
- package/types/Select/Option/props.d.ts.map +1 -1
- package/types/Select/index.d.ts +33 -2
- package/types/Select/index.d.ts.map +1 -1
- package/types/Select/props.d.ts +3 -2
- package/types/Select/props.d.ts.map +1 -1
package/src/Select/props.ts
CHANGED
|
@@ -23,9 +23,18 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import { InputHTMLAttributes } from 'react'
|
|
26
|
+
import PropTypes from 'prop-types'
|
|
27
|
+
|
|
28
|
+
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types'
|
|
29
|
+
import { FormPropTypes } from '@instructure/ui-form-field'
|
|
30
|
+
import { PositionPropTypes } from '@instructure/ui-position'
|
|
31
|
+
|
|
32
|
+
import { Group } from './Group'
|
|
33
|
+
import { Option } from './Option'
|
|
26
34
|
|
|
27
35
|
import type {
|
|
28
36
|
OtherHTMLAttributes,
|
|
37
|
+
PropValidators,
|
|
29
38
|
SelectTheme
|
|
30
39
|
} from '@instructure/shared-types'
|
|
31
40
|
import type { FormMessage } from '@instructure/ui-form-field'
|
|
@@ -293,6 +302,44 @@ type SelectStyle = ComponentStyle<
|
|
|
293
302
|
'select' | 'icon' | 'assistiveText' | 'popoverBorderWidth'
|
|
294
303
|
>
|
|
295
304
|
|
|
305
|
+
const propTypes: PropValidators<PropKeys> = {
|
|
306
|
+
renderLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
307
|
+
inputValue: PropTypes.string,
|
|
308
|
+
id: PropTypes.string,
|
|
309
|
+
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
310
|
+
assistiveText: PropTypes.string,
|
|
311
|
+
placeholder: PropTypes.string,
|
|
312
|
+
interaction: PropTypes.oneOf(['enabled', 'disabled', 'readonly']),
|
|
313
|
+
isRequired: PropTypes.bool,
|
|
314
|
+
isInline: PropTypes.bool,
|
|
315
|
+
width: PropTypes.string,
|
|
316
|
+
htmlSize: PropTypes.number,
|
|
317
|
+
visibleOptionsCount: PropTypes.number,
|
|
318
|
+
isOptionContentAppliedToInput: PropTypes.bool,
|
|
319
|
+
optionsMaxHeight: PropTypes.string,
|
|
320
|
+
optionsMaxWidth: PropTypes.string,
|
|
321
|
+
messages: PropTypes.arrayOf(FormPropTypes.message),
|
|
322
|
+
placement: PositionPropTypes.placement,
|
|
323
|
+
constrain: PositionPropTypes.constrain,
|
|
324
|
+
mountNode: PositionPropTypes.mountNode,
|
|
325
|
+
onFocus: PropTypes.func,
|
|
326
|
+
onBlur: PropTypes.func,
|
|
327
|
+
onInputChange: PropTypes.func,
|
|
328
|
+
isShowingOptions: PropTypes.bool,
|
|
329
|
+
onRequestShowOptions: PropTypes.func,
|
|
330
|
+
onRequestHideOptions: PropTypes.func,
|
|
331
|
+
onRequestHighlightOption: PropTypes.func,
|
|
332
|
+
onRequestSelectOption: PropTypes.func,
|
|
333
|
+
inputRef: PropTypes.func,
|
|
334
|
+
listRef: PropTypes.func,
|
|
335
|
+
renderBeforeInput: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
336
|
+
renderAfterInput: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
337
|
+
children: ChildrenPropTypes.oneOf([Group, Option]),
|
|
338
|
+
shouldNotWrap: PropTypes.bool,
|
|
339
|
+
scrollToHighlightedOption: PropTypes.bool,
|
|
340
|
+
layout: PropTypes.oneOf(['stacked', 'inline'])
|
|
341
|
+
}
|
|
342
|
+
|
|
296
343
|
const allowedProps: AllowedPropKeys = [
|
|
297
344
|
'renderLabel',
|
|
298
345
|
'inputValue',
|
|
@@ -332,4 +379,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
332
379
|
]
|
|
333
380
|
|
|
334
381
|
export type { SelectProps, SelectOwnProps, SelectStyle }
|
|
335
|
-
export { allowedProps }
|
|
382
|
+
export { propTypes, allowedProps }
|
package/tsconfig.build.json
CHANGED
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
{ "path": "../ui-options/tsconfig.build.json" },
|
|
19
19
|
{ "path": "../ui-popover/tsconfig.build.json" },
|
|
20
20
|
{ "path": "../ui-position/tsconfig.build.json" },
|
|
21
|
-
{ "path": "../ui-
|
|
21
|
+
{ "path": "../ui-prop-types/tsconfig.build.json" },
|
|
22
22
|
{ "path": "../ui-scripts/tsconfig.build.json" },
|
|
23
|
+
{ "path": "../ui-selectable/tsconfig.build.json" },
|
|
24
|
+
{ "path": "../ui-testable/tsconfig.build.json" },
|
|
23
25
|
{ "path": "../ui-text-input/tsconfig.build.json" },
|
|
24
26
|
{ "path": "../ui-utils/tsconfig.build.json" },
|
|
25
27
|
{ "path": "../ui-view/tsconfig.build.json" },
|