@instructure/ui-simple-select 8.26.3 → 8.26.4-snapshot-6
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 +11 -0
- package/package.json +15 -15
- package/src/SimpleSelect/Option/props.ts +6 -7
- package/src/SimpleSelect/index.tsx +1 -1
- package/src/SimpleSelect/props.ts +7 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/SimpleSelect/Option/props.d.ts +6 -5
- package/types/SimpleSelect/Option/props.d.ts.map +1 -1
- package/types/SimpleSelect/index.d.ts +8 -8
- package/types/SimpleSelect/props.d.ts +5 -4
- package/types/SimpleSelect/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
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-6](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.26.4-snapshot-6) (2022-07-21)
|
7
|
+
|
8
|
+
|
9
|
+
### Features
|
10
|
+
|
11
|
+
* support React 18 ([0a2bf0c](https://github.com/instructure/instructure-ui/commit/0a2bf0cdd4d8bcec6e42a7ccf28a787e4a35bc40))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
## [8.26.3](https://github.com/instructure/instructure-ui/compare/v8.26.2...v8.26.3) (2022-07-14)
|
7
18
|
|
8
19
|
### Bug Fixes
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@instructure/ui-simple-select",
|
3
|
-
"version": "8.26.
|
3
|
+
"version": "8.26.4-snapshot-6",
|
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.
|
28
|
-
"@instructure/shared-types": "8.26.
|
29
|
-
"@instructure/ui-form-field": "8.26.
|
30
|
-
"@instructure/ui-position": "8.26.
|
31
|
-
"@instructure/ui-prop-types": "8.26.
|
32
|
-
"@instructure/ui-react-utils": "8.26.
|
33
|
-
"@instructure/ui-select": "8.26.
|
34
|
-
"@instructure/ui-testable": "8.26.
|
27
|
+
"@instructure/console": "8.26.4-snapshot-6",
|
28
|
+
"@instructure/shared-types": "8.26.4-snapshot-6",
|
29
|
+
"@instructure/ui-form-field": "8.26.4-snapshot-6",
|
30
|
+
"@instructure/ui-position": "8.26.4-snapshot-6",
|
31
|
+
"@instructure/ui-prop-types": "8.26.4-snapshot-6",
|
32
|
+
"@instructure/ui-react-utils": "8.26.4-snapshot-6",
|
33
|
+
"@instructure/ui-select": "8.26.4-snapshot-6",
|
34
|
+
"@instructure/ui-testable": "8.26.4-snapshot-6",
|
35
35
|
"prop-types": "^15"
|
36
36
|
},
|
37
37
|
"devDependencies": {
|
38
|
-
"@instructure/ui-babel-preset": "8.26.
|
39
|
-
"@instructure/ui-color-utils": "8.26.
|
40
|
-
"@instructure/ui-icons": "8.26.
|
41
|
-
"@instructure/ui-test-locator": "8.26.
|
42
|
-
"@instructure/ui-test-utils": "8.26.
|
38
|
+
"@instructure/ui-babel-preset": "8.26.4-snapshot-6",
|
39
|
+
"@instructure/ui-color-utils": "8.26.4-snapshot-6",
|
40
|
+
"@instructure/ui-icons": "8.26.4-snapshot-6",
|
41
|
+
"@instructure/ui-test-locator": "8.26.4-snapshot-6",
|
42
|
+
"@instructure/ui-test-utils": "8.26.4-snapshot-6"
|
43
43
|
},
|
44
44
|
"peerDependencies": {
|
45
|
-
"react": ">=16.8 <=
|
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
|
36
|
-
isSelected
|
37
|
-
isHighlighted
|
38
|
-
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?:
|
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:
|
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?:
|
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?:
|
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
|
-
> &
|
242
|
+
> &
|
243
|
+
WithDeterministicIdProps
|
242
244
|
|
243
245
|
type SimpleSelectState = {
|
244
246
|
inputValue?: string
|