@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.
@@ -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 }
@@ -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-selectable/tsconfig.build.json" },
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" },