@instructure/ui-options 8.25.1-snapshot.0 → 8.26.1-snapshot-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 +12 -0
- package/es/Options/Item/OptionsItemLocator.js +2 -1
- package/es/Options/Item/index.js +2 -1
- package/es/Options/OptionsLocator.js +2 -1
- package/lib/Options/Item/OptionsItemLocator.js +1 -0
- package/lib/Options/Item/index.js +2 -1
- package/lib/Options/OptionsLocator.js +1 -0
- package/package.json +14 -15
- package/src/Options/Item/props.ts +9 -5
- package/src/index.ts +4 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Options/Item/OptionsItemLocator.d.ts +4 -4
- package/types/Options/Item/index.d.ts +2 -12
- package/types/Options/Item/index.d.ts.map +1 -1
- package/types/Options/Item/props.d.ts +5 -5
- package/types/Options/Item/props.d.ts.map +1 -1
- package/types/Options/OptionsLocator.d.ts +14 -14
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/LICENSE.md +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.1-snapshot-1](https://github.com/instructure/instructure-ui/compare/v8.26.0...v8.26.1-snapshot-1) (2022-07-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-options
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [8.26.0](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.26.0) (2022-06-30)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @instructure/ui-options
|
|
17
|
+
|
|
6
18
|
# [8.25.0](https://github.com/instructure/instructure-ui/compare/v8.24.5...v8.25.0) (2022-06-03)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @instructure/ui-options
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
25
|
import { OptionsLocator } from '../OptionsLocator';
|
|
26
|
-
import { Item } from './index';
|
|
26
|
+
import { Item } from './index'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
27
|
+
|
|
27
28
|
export const OptionsItemLocator = locator(Item.selector, {
|
|
28
29
|
findNestedOptions: function () {
|
|
29
30
|
return OptionsLocator.find(...arguments);
|
package/es/Options/Item/index.js
CHANGED
|
@@ -98,7 +98,8 @@ let Item = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyles, gene
|
|
|
98
98
|
const descriptionContent = callRenderProp(description);
|
|
99
99
|
return jsx(ElementType, {
|
|
100
100
|
role: "none",
|
|
101
|
-
css: styles === null || styles === void 0 ? void 0 : styles.item
|
|
101
|
+
css: styles === null || styles === void 0 ? void 0 : styles.item // @ts-expect-error TODO: fix produces an union that is too complex to represent
|
|
102
|
+
,
|
|
102
103
|
ref: element => {
|
|
103
104
|
this.ref = element;
|
|
104
105
|
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
25
|
import { Options } from './index';
|
|
26
|
-
import { OptionsItemLocator } from './Item/OptionsItemLocator';
|
|
26
|
+
import { OptionsItemLocator } from './Item/OptionsItemLocator'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
27
|
+
|
|
27
28
|
export const OptionsLocator = locator(Options.selector, {
|
|
28
29
|
findAllItems: function () {
|
|
29
30
|
return OptionsItemLocator.findAll(...arguments);
|
|
@@ -34,6 +34,7 @@ var _index = require("./index");
|
|
|
34
34
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
|
+
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
37
38
|
const OptionsItemLocator = (0, _uiTestLocator.locator)(_index.Item.selector, {
|
|
38
39
|
findNestedOptions: function () {
|
|
39
40
|
return _OptionsLocator.OptionsLocator.find(...arguments);
|
|
@@ -88,7 +88,8 @@ let Item = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotio
|
|
|
88
88
|
const descriptionContent = (0, _uiReactUtils.callRenderProp)(description);
|
|
89
89
|
return (0, _emotion.jsx)(ElementType, {
|
|
90
90
|
role: "none",
|
|
91
|
-
css: styles === null || styles === void 0 ? void 0 : styles.item
|
|
91
|
+
css: styles === null || styles === void 0 ? void 0 : styles.item // @ts-expect-error TODO: fix produces an union that is too complex to represent
|
|
92
|
+
,
|
|
92
93
|
ref: element => {
|
|
93
94
|
this.ref = element;
|
|
94
95
|
|
|
@@ -34,6 +34,7 @@ var _OptionsItemLocator = require("./Item/OptionsItemLocator");
|
|
|
34
34
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
|
+
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
37
38
|
const OptionsLocator = (0, _uiTestLocator.locator)(_index.Options.selector, {
|
|
38
39
|
findAllItems: function () {
|
|
39
40
|
return _OptionsItemLocator.OptionsItemLocator.findAll(...arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-options",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.26.1-snapshot-1",
|
|
4
4
|
"description": "A view-only component for composing interactive lists and menus.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.
|
|
27
|
-
"@instructure/ui-color-utils": "8.
|
|
28
|
-
"@instructure/ui-test-locator": "8.
|
|
29
|
-
"@instructure/ui-test-utils": "8.
|
|
30
|
-
"@instructure/ui-themes": "8.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.26.1-snapshot-1",
|
|
27
|
+
"@instructure/ui-color-utils": "8.26.1-snapshot-1",
|
|
28
|
+
"@instructure/ui-test-locator": "8.26.1-snapshot-1",
|
|
29
|
+
"@instructure/ui-test-utils": "8.26.1-snapshot-1",
|
|
30
|
+
"@instructure/ui-themes": "8.26.1-snapshot-1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/emotion": "8.
|
|
35
|
-
"@instructure/shared-types": "8.
|
|
36
|
-
"@instructure/ui-icons": "8.
|
|
37
|
-
"@instructure/ui-prop-types": "8.
|
|
38
|
-
"@instructure/ui-react-utils": "8.
|
|
39
|
-
"@instructure/ui-testable": "8.
|
|
40
|
-
"@instructure/ui-view": "8.
|
|
34
|
+
"@instructure/emotion": "8.26.1-snapshot-1",
|
|
35
|
+
"@instructure/shared-types": "8.26.1-snapshot-1",
|
|
36
|
+
"@instructure/ui-icons": "8.26.1-snapshot-1",
|
|
37
|
+
"@instructure/ui-prop-types": "8.26.1-snapshot-1",
|
|
38
|
+
"@instructure/ui-react-utils": "8.26.1-snapshot-1",
|
|
39
|
+
"@instructure/ui-testable": "8.26.1-snapshot-1",
|
|
40
|
+
"@instructure/ui-view": "8.26.1-snapshot-1",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -46,6 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"sideEffects": false
|
|
50
|
-
"gitHead": "59b6babce07a9242111475156f544ec11c1a9283"
|
|
49
|
+
"sideEffects": false
|
|
51
50
|
}
|
|
@@ -34,7 +34,7 @@ import type {
|
|
|
34
34
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
35
35
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
36
36
|
|
|
37
|
-
type
|
|
37
|
+
type OptionsItemRenderProps = {
|
|
38
38
|
children?: React.ReactNode | (() => React.ReactNode)
|
|
39
39
|
/**
|
|
40
40
|
* Element type to render as. Will be set to `<a>` if href is provided.
|
|
@@ -55,17 +55,21 @@ type ItemProps = {
|
|
|
55
55
|
role?: string
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
type OptionsItemOwnProps =
|
|
58
|
+
type OptionsItemOwnProps = OptionsItemRenderProps & {
|
|
59
59
|
/**
|
|
60
60
|
* Content to render before the label
|
|
61
61
|
* (if you pass a function, it has the `props` as its parameter)
|
|
62
62
|
*/
|
|
63
|
-
renderBeforeLabel?:
|
|
63
|
+
renderBeforeLabel?:
|
|
64
|
+
| React.ReactNode
|
|
65
|
+
| ((props: OptionsItemRenderProps) => React.ReactNode)
|
|
64
66
|
/**
|
|
65
67
|
* Content to render after the label
|
|
66
68
|
* (if you pass a function, it has the `props` as its parameter)
|
|
67
69
|
*/
|
|
68
|
-
renderAfterLabel?:
|
|
70
|
+
renderAfterLabel?:
|
|
71
|
+
| React.ReactNode
|
|
72
|
+
| ((props: OptionsItemRenderProps) => React.ReactNode)
|
|
69
73
|
/**
|
|
70
74
|
* Sets the vAlign of renderBeforeLabel content
|
|
71
75
|
*/
|
|
@@ -146,5 +150,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
146
150
|
'children'
|
|
147
151
|
]
|
|
148
152
|
|
|
149
|
-
export type { OptionsItemProps, OptionsItemStyle }
|
|
153
|
+
export type { OptionsItemProps, OptionsItemStyle, OptionsItemRenderProps }
|
|
150
154
|
export { propTypes, allowedProps }
|
package/src/index.ts
CHANGED
|
@@ -29,5 +29,8 @@ export { optionsItemThemeGenerator } from './Options/Item/theme'
|
|
|
29
29
|
export { optionsSeparatorThemeGenerator } from './Options/Separator/theme'
|
|
30
30
|
|
|
31
31
|
export type { OptionsProps } from './Options/props'
|
|
32
|
-
export type {
|
|
32
|
+
export type {
|
|
33
|
+
OptionsItemProps,
|
|
34
|
+
OptionsItemRenderProps
|
|
35
|
+
} from './Options/Item/props'
|
|
33
36
|
export type { OptionsSeparatorProps } from './Options/Separator/props'
|