@instructure/ui-simple-select 8.26.2 → 8.26.4-snapshot-3

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 CHANGED
@@ -3,6 +3,23 @@
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.26.4-snapshot-3](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.26.4-snapshot-3) (2022-07-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * support React 18 ([0a2bf0c](https://github.com/instructure/instructure-ui/commit/0a2bf0cdd4d8bcec6e42a7ccf28a787e4a35bc40))
12
+
13
+
14
+
15
+
16
+
17
+ ## [8.26.3](https://github.com/instructure/instructure-ui/compare/v8.26.2...v8.26.3) (2022-07-14)
18
+
19
+ ### Bug Fixes
20
+
21
+ - **ui-color-picker,ui-date-input,ui-date-time-input,ui-select,ui-simple-select,ui-text-input,ui-time-select:** before/after elements should inherit input color ([7daf257](https://github.com/instructure/instructure-ui/commit/7daf257a8ee491f84de2f00a56becd22636891e3))
22
+
6
23
  ## [8.26.2](https://github.com/instructure/instructure-ui/compare/v8.26.1...v8.26.2) (2022-07-11)
7
24
 
8
25
  **Note:** Version bump only for package @instructure/ui-simple-select
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-simple-select",
3
- "version": "8.26.2",
3
+ "version": "8.26.4-snapshot-3",
4
4
  "description": "A component for standard select element behavior.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,25 +24,25 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/console": "8.26.2",
28
- "@instructure/shared-types": "8.26.2",
29
- "@instructure/ui-form-field": "8.26.2",
30
- "@instructure/ui-position": "8.26.2",
31
- "@instructure/ui-prop-types": "8.26.2",
32
- "@instructure/ui-react-utils": "8.26.2",
33
- "@instructure/ui-select": "8.26.2",
34
- "@instructure/ui-testable": "8.26.2",
27
+ "@instructure/console": "8.26.4-snapshot-3",
28
+ "@instructure/shared-types": "8.26.4-snapshot-3",
29
+ "@instructure/ui-form-field": "8.26.4-snapshot-3",
30
+ "@instructure/ui-position": "8.26.4-snapshot-3",
31
+ "@instructure/ui-prop-types": "8.26.4-snapshot-3",
32
+ "@instructure/ui-react-utils": "8.26.4-snapshot-3",
33
+ "@instructure/ui-select": "8.26.4-snapshot-3",
34
+ "@instructure/ui-testable": "8.26.4-snapshot-3",
35
35
  "prop-types": "^15"
36
36
  },
37
37
  "devDependencies": {
38
- "@instructure/ui-babel-preset": "8.26.2",
39
- "@instructure/ui-color-utils": "8.26.2",
40
- "@instructure/ui-icons": "8.26.2",
41
- "@instructure/ui-test-locator": "8.26.2",
42
- "@instructure/ui-test-utils": "8.26.2"
38
+ "@instructure/ui-babel-preset": "8.26.4-snapshot-3",
39
+ "@instructure/ui-color-utils": "8.26.4-snapshot-3",
40
+ "@instructure/ui-icons": "8.26.4-snapshot-3",
41
+ "@instructure/ui-test-locator": "8.26.4-snapshot-3",
42
+ "@instructure/ui-test-utils": "8.26.4-snapshot-3"
43
43
  },
44
44
  "peerDependencies": {
45
- "react": ">=16.8 <=17"
45
+ "react": ">=16.8 <=18"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -29,18 +29,17 @@ import type {
29
29
  OtherHTMLAttributes,
30
30
  PropValidators
31
31
  } from '@instructure/shared-types'
32
+ import { Renderable } from '@instructure/shared-types'
32
33
 
33
34
  type OptionProps = {
34
35
  id: SimpleSelectOptionOwnProps['id']
35
- isDisabled: SimpleSelectOptionOwnProps['isDisabled']
36
- isSelected: boolean
37
- isHighlighted: boolean
38
- children: SimpleSelectOptionOwnProps['children']
36
+ isDisabled?: SimpleSelectOptionOwnProps['isDisabled']
37
+ isSelected?: boolean
38
+ isHighlighted?: boolean
39
+ children?: React.ReactNode
39
40
  }
40
41
 
41
- type RenderSimpleSelectOptionLabel =
42
- | React.ReactNode
43
- | ((args: OptionProps) => React.ReactNode)
42
+ type RenderSimpleSelectOptionLabel = Renderable<OptionProps>
44
43
 
45
44
  type SimpleSelectOptionOwnProps = {
46
45
  /**
@@ -345,7 +345,7 @@ class SimpleSelect extends Component<SimpleSelectProps, SimpleSelectState> {
345
345
  const getRenderLabel = (renderLabel: RenderSimpleSelectOptionLabel) => {
346
346
  return typeof renderLabel === 'function' &&
347
347
  !renderLabel?.prototype?.isReactComponent
348
- ? renderLabel.bind(null, {
348
+ ? (renderLabel as any).bind(null, {
349
349
  id,
350
350
  isDisabled,
351
351
  isSelected,
@@ -45,6 +45,7 @@ import type {
45
45
  } from '@instructure/ui-position'
46
46
  import type { SelectOwnProps } from '@instructure/ui-select'
47
47
  import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
48
+ import { Renderable } from '@instructure/shared-types'
48
49
 
49
50
  type SimpleSelectOwnProps = PropsPassedToSelect & {
50
51
  /**
@@ -84,7 +85,7 @@ type SimpleSelectOwnProps = PropsPassedToSelect & {
84
85
  /**
85
86
  * Content to display in the list when no options are available.
86
87
  */
87
- renderEmptyOption?: React.ReactNode | (() => React.ReactNode)
88
+ renderEmptyOption?: Renderable
88
89
 
89
90
  /**
90
91
  * Children of type `<SimpleSelect.Option />` or `<SimpleSelect.Group />`.
@@ -96,7 +97,7 @@ type PropsPassedToSelect = {
96
97
  /**
97
98
  * The form field label.
98
99
  */
99
- renderLabel: React.ReactNode | (() => React.ReactNode)
100
+ renderLabel: Renderable
100
101
 
101
102
  /**
102
103
  * The id of the text input. One is generated if not supplied.
@@ -200,13 +201,13 @@ type PropsPassedToSelect = {
200
201
  /**
201
202
  * Content to display before the text input. This will commonly be an icon.
202
203
  */
203
- renderBeforeInput?: React.ReactNode | (() => React.ReactNode)
204
+ renderBeforeInput?: Renderable
204
205
 
205
206
  /**
206
207
  * Content to display after the text input. This content will replace the
207
208
  * default arrow icons.
208
209
  */
209
- renderAfterInput?: React.ReactNode | (() => React.ReactNode)
210
+ renderAfterInput?: Renderable
210
211
 
211
212
  /**
212
213
  * Callback fired when text input receives focus.
@@ -238,7 +239,8 @@ type SimpleSelectProps = PickPropsWithExceptions<
238
239
  OtherHTMLAttributes<
239
240
  SimpleSelectOwnProps,
240
241
  InputHTMLAttributes<SimpleSelectOwnProps>
241
- > & WithDeterministicIdProps
242
+ > &
243
+ WithDeterministicIdProps
242
244
 
243
245
  type SimpleSelectState = {
244
246
  inputValue?: string