@instructure/ui-menu 8.9.2-snapshot.4 → 8.10.1-snapshot.4
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 +4 -0
- package/es/Menu/MenuItem/index.js +1 -1
- package/es/Menu/MenuItemGroup/index.js +1 -1
- package/es/Menu/MenuItemSeparator/index.js +1 -1
- package/lib/Menu/MenuItem/index.js +1 -1
- package/lib/Menu/MenuItemGroup/index.js +1 -1
- package/lib/Menu/MenuItemSeparator/index.js +1 -1
- package/package.json +21 -21
- package/src/Menu/MenuItem/index.tsx +1 -1
- package/src/Menu/MenuItem/props.ts +11 -4
- package/src/Menu/MenuItem/styles.ts +6 -3
- package/src/Menu/MenuItemGroup/index.tsx +1 -1
- package/src/Menu/MenuItemGroup/props.ts +8 -4
- package/src/Menu/MenuItemGroup/styles.ts +3 -2
- package/src/Menu/MenuItemSeparator/index.tsx +1 -1
- package/src/Menu/MenuItemSeparator/props.ts +10 -4
- package/src/Menu/MenuItemSeparator/styles.ts +5 -2
- package/src/Menu/props.ts +6 -4
- package/src/Menu/styles.ts +3 -2
- package/types/Menu/MenuItem/props.d.ts +5 -4
- package/types/Menu/MenuItem/props.d.ts.map +1 -1
- package/types/Menu/MenuItem/styles.d.ts +3 -246
- package/types/Menu/MenuItem/styles.d.ts.map +1 -1
- package/types/Menu/MenuItemGroup/props.d.ts +5 -4
- package/types/Menu/MenuItemGroup/props.d.ts.map +1 -1
- package/types/Menu/MenuItemGroup/styles.d.ts +3 -24
- package/types/Menu/MenuItemGroup/styles.d.ts.map +1 -1
- package/types/Menu/MenuItemSeparator/props.d.ts +5 -4
- package/types/Menu/MenuItemSeparator/props.d.ts.map +1 -1
- package/types/Menu/MenuItemSeparator/styles.d.ts +3 -10
- package/types/Menu/MenuItemSeparator/styles.d.ts.map +1 -1
- package/types/Menu/props.d.ts +5 -4
- package/types/Menu/props.d.ts.map +1 -1
- package/types/Menu/styles.d.ts +3 -34
- package/types/Menu/styles.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-menu
|
|
9
|
+
|
|
6
10
|
## [8.9.1](https://github.com/instructure/instructure-ui/compare/v8.9.0...v8.9.1) (2021-09-16)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-menu
|
|
@@ -203,7 +203,7 @@ let MenuItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
203
203
|
onKeyUp = _this$props3.onKeyUp,
|
|
204
204
|
type = _this$props3.type,
|
|
205
205
|
href = _this$props3.href;
|
|
206
|
-
const props = omitProps(this.props, MenuItem.
|
|
206
|
+
const props = omitProps(this.props, MenuItem.allowedProps);
|
|
207
207
|
const ElementType = this.elementType;
|
|
208
208
|
return jsx(ElementType // eslint-disable-line jsx-a11y/mouse-events-have-key-events
|
|
209
209
|
, Object.assign({
|
|
@@ -168,7 +168,7 @@ let MenuItemGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _d
|
|
|
168
168
|
render() {
|
|
169
169
|
var _this$props$styles2, _this$props$styles3;
|
|
170
170
|
|
|
171
|
-
const props = omitProps(this.props, MenuItemGroup.
|
|
171
|
+
const props = omitProps(this.props, MenuItemGroup.allowedProps);
|
|
172
172
|
return jsx("span", Object.assign({}, props, {
|
|
173
173
|
css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.menuItemGroup,
|
|
174
174
|
role: "presentation"
|
|
@@ -52,7 +52,7 @@ let MenuItemSeparator = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
52
52
|
render() {
|
|
53
53
|
var _this$props$styles;
|
|
54
54
|
|
|
55
|
-
const props = omitProps(this.props, MenuItemSeparator.
|
|
55
|
+
const props = omitProps(this.props, MenuItemSeparator.allowedProps);
|
|
56
56
|
return jsx("div", Object.assign({}, props, {
|
|
57
57
|
role: "presentation",
|
|
58
58
|
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.menuItemSeparator
|
|
@@ -205,7 +205,7 @@ let MenuItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
205
205
|
onKeyUp = _this$props3.onKeyUp,
|
|
206
206
|
type = _this$props3.type,
|
|
207
207
|
href = _this$props3.href;
|
|
208
|
-
const props = (0, _omitProps.omitProps)(this.props, MenuItem.
|
|
208
|
+
const props = (0, _omitProps.omitProps)(this.props, MenuItem.allowedProps);
|
|
209
209
|
const ElementType = this.elementType;
|
|
210
210
|
return (0, _emotion.jsx)(ElementType // eslint-disable-line jsx-a11y/mouse-events-have-key-events
|
|
211
211
|
, Object.assign({
|
|
@@ -167,7 +167,7 @@ let MenuItemGroup = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defa
|
|
|
167
167
|
render() {
|
|
168
168
|
var _this$props$styles2, _this$props$styles3;
|
|
169
169
|
|
|
170
|
-
const props = (0, _omitProps.omitProps)(this.props, MenuItemGroup.
|
|
170
|
+
const props = (0, _omitProps.omitProps)(this.props, MenuItemGroup.allowedProps);
|
|
171
171
|
return (0, _emotion.jsx)("span", Object.assign({}, props, {
|
|
172
172
|
css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.menuItemGroup,
|
|
173
173
|
role: "presentation"
|
|
@@ -42,7 +42,7 @@ let MenuItemSeparator = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
42
42
|
render() {
|
|
43
43
|
var _this$props$styles;
|
|
44
44
|
|
|
45
|
-
const props = (0, _omitProps.omitProps)(this.props, MenuItemSeparator.
|
|
45
|
+
const props = (0, _omitProps.omitProps)(this.props, MenuItemSeparator.allowedProps);
|
|
46
46
|
return (0, _emotion.jsx)("div", Object.assign({}, props, {
|
|
47
47
|
role: "presentation",
|
|
48
48
|
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.menuItemSeparator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-menu",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.1-snapshot.4+6c5c9e653",
|
|
4
4
|
"description": "A dropdown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.
|
|
28
|
-
"@instructure/ui-color-utils": "8.
|
|
29
|
-
"@instructure/ui-test-locator": "8.
|
|
30
|
-
"@instructure/ui-test-queries": "8.
|
|
31
|
-
"@instructure/ui-test-utils": "8.
|
|
32
|
-
"@instructure/ui-themes": "8.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.10.1-snapshot.4+6c5c9e653",
|
|
28
|
+
"@instructure/ui-color-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
29
|
+
"@instructure/ui-test-locator": "8.10.1-snapshot.4+6c5c9e653",
|
|
30
|
+
"@instructure/ui-test-queries": "8.10.1-snapshot.4+6c5c9e653",
|
|
31
|
+
"@instructure/ui-test-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
32
|
+
"@instructure/ui-themes": "8.10.1-snapshot.4+6c5c9e653"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/runtime": "^7.13.10",
|
|
36
|
-
"@instructure/console": "8.
|
|
37
|
-
"@instructure/emotion": "8.
|
|
38
|
-
"@instructure/shared-types": "8.
|
|
39
|
-
"@instructure/ui-a11y-utils": "8.
|
|
40
|
-
"@instructure/ui-dom-utils": "8.
|
|
41
|
-
"@instructure/ui-icons": "8.
|
|
42
|
-
"@instructure/ui-popover": "8.
|
|
43
|
-
"@instructure/ui-position": "8.
|
|
44
|
-
"@instructure/ui-prop-types": "8.
|
|
45
|
-
"@instructure/ui-react-utils": "8.
|
|
46
|
-
"@instructure/ui-testable": "8.
|
|
47
|
-
"@instructure/ui-utils": "8.
|
|
48
|
-
"@instructure/uid": "8.
|
|
36
|
+
"@instructure/console": "8.10.1-snapshot.4+6c5c9e653",
|
|
37
|
+
"@instructure/emotion": "8.10.1-snapshot.4+6c5c9e653",
|
|
38
|
+
"@instructure/shared-types": "8.10.1-snapshot.4+6c5c9e653",
|
|
39
|
+
"@instructure/ui-a11y-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
40
|
+
"@instructure/ui-dom-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
41
|
+
"@instructure/ui-icons": "8.10.1-snapshot.4+6c5c9e653",
|
|
42
|
+
"@instructure/ui-popover": "8.10.1-snapshot.4+6c5c9e653",
|
|
43
|
+
"@instructure/ui-position": "8.10.1-snapshot.4+6c5c9e653",
|
|
44
|
+
"@instructure/ui-prop-types": "8.10.1-snapshot.4+6c5c9e653",
|
|
45
|
+
"@instructure/ui-react-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
46
|
+
"@instructure/ui-testable": "8.10.1-snapshot.4+6c5c9e653",
|
|
47
|
+
"@instructure/ui-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
48
|
+
"@instructure/uid": "8.10.1-snapshot.4+6c5c9e653",
|
|
49
49
|
"keycode": "^2",
|
|
50
50
|
"prop-types": "^15"
|
|
51
51
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"sideEffects": false,
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "6c5c9e653f7ce3d239296f4ed19c5679fdddcd5b"
|
|
60
60
|
}
|
|
@@ -227,7 +227,7 @@ class MenuItem extends Component<MenuItemProps> {
|
|
|
227
227
|
render() {
|
|
228
228
|
const { disabled, controls, onKeyDown, onKeyUp, type, href } = this.props
|
|
229
229
|
|
|
230
|
-
const props = omitProps(this.props, MenuItem.
|
|
230
|
+
const props = omitProps(this.props, MenuItem.allowedProps)
|
|
231
231
|
const ElementType = this.elementType
|
|
232
232
|
|
|
233
233
|
return (
|
|
@@ -27,8 +27,12 @@ import PropTypes from 'prop-types'
|
|
|
27
27
|
|
|
28
28
|
import { controllable } from '@instructure/ui-prop-types'
|
|
29
29
|
|
|
30
|
-
import type {
|
|
31
|
-
|
|
30
|
+
import type {
|
|
31
|
+
AsElementType,
|
|
32
|
+
PropValidators,
|
|
33
|
+
MenuItemTheme
|
|
34
|
+
} from '@instructure/shared-types'
|
|
35
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
32
36
|
|
|
33
37
|
type MenuItemOwnProps = {
|
|
34
38
|
children: React.ReactNode
|
|
@@ -51,7 +55,10 @@ type PropKeys = keyof MenuItemOwnProps
|
|
|
51
55
|
|
|
52
56
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
53
57
|
|
|
54
|
-
type MenuItemProps = MenuItemOwnProps &
|
|
58
|
+
type MenuItemProps = MenuItemOwnProps &
|
|
59
|
+
WithStyleProps<MenuItemTheme, MenuItemStyle>
|
|
60
|
+
|
|
61
|
+
type MenuItemStyle = ComponentStyle<'menuItem' | 'icon' | 'label'>
|
|
55
62
|
|
|
56
63
|
const propTypes: PropValidators<PropKeys> = {
|
|
57
64
|
/**
|
|
@@ -105,5 +112,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
105
112
|
'href'
|
|
106
113
|
]
|
|
107
114
|
|
|
108
|
-
export type { MenuItemProps }
|
|
115
|
+
export type { MenuItemProps, MenuItemStyle }
|
|
109
116
|
export { propTypes, allowedProps }
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { MenuItemTheme } from '@instructure/shared-types'
|
|
26
|
-
import { MenuItemProps } from './props'
|
|
25
|
+
import type { MenuItemTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { MenuItemProps, MenuItemStyle } from './props'
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* ---
|
|
@@ -35,7 +35,10 @@ import { MenuItemProps } from './props'
|
|
|
35
35
|
* @param {Object} state the state of the component, the style is applied to
|
|
36
36
|
* @return {Object} The final style object, which will be used in the component
|
|
37
37
|
*/
|
|
38
|
-
const generateStyle = (
|
|
38
|
+
const generateStyle = (
|
|
39
|
+
componentTheme: MenuItemTheme,
|
|
40
|
+
props: MenuItemProps
|
|
41
|
+
): MenuItemStyle => {
|
|
39
42
|
const { type, disabled } = props
|
|
40
43
|
|
|
41
44
|
const isRadioOrCheckbox = type === 'checkbox' || type === 'radio'
|
|
@@ -28,11 +28,12 @@ import {
|
|
|
28
28
|
controllable,
|
|
29
29
|
Children as ChildrenPropTypes
|
|
30
30
|
} from '@instructure/ui-prop-types'
|
|
31
|
+
|
|
31
32
|
import { MenuItem } from '../MenuItem'
|
|
32
33
|
import { MenuItemSeparator } from '../MenuItemSeparator'
|
|
33
34
|
|
|
34
|
-
import type { PropValidators } from '@instructure/shared-types'
|
|
35
|
-
import type { WithStyleProps } from '@instructure/emotion'
|
|
35
|
+
import type { PropValidators, MenuGroupTheme } from '@instructure/shared-types'
|
|
36
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
36
37
|
|
|
37
38
|
type MenuGroupOwnProps = {
|
|
38
39
|
label: React.ReactNode
|
|
@@ -53,7 +54,10 @@ type PropKeys = keyof MenuGroupOwnProps
|
|
|
53
54
|
|
|
54
55
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
55
56
|
|
|
56
|
-
type MenuGroupProps = MenuGroupOwnProps &
|
|
57
|
+
type MenuGroupProps = MenuGroupOwnProps &
|
|
58
|
+
WithStyleProps<MenuGroupTheme, MenuGroupStyle>
|
|
59
|
+
|
|
60
|
+
type MenuGroupStyle = ComponentStyle<'menuItemGroup' | 'label' | 'items'>
|
|
57
61
|
|
|
58
62
|
const propTypes: PropValidators<PropKeys> = {
|
|
59
63
|
label: PropTypes.node.isRequired,
|
|
@@ -106,5 +110,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
106
110
|
'isTabbable'
|
|
107
111
|
]
|
|
108
112
|
|
|
109
|
-
export type { MenuGroupProps }
|
|
113
|
+
export type { MenuGroupProps, MenuGroupStyle }
|
|
110
114
|
export { propTypes, allowedProps }
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { MenuGroupTheme } from '@instructure/shared-types'
|
|
25
|
+
import type { MenuGroupTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { MenuGroupStyle } from './props'
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* ---
|
|
@@ -34,7 +35,7 @@ import { MenuGroupTheme } from '@instructure/shared-types'
|
|
|
34
35
|
* @param {Object} state the state of the component, the style is applied to
|
|
35
36
|
* @return {Object} The final style object, which will be used in the component
|
|
36
37
|
*/
|
|
37
|
-
const generateStyle = (componentTheme: MenuGroupTheme) => {
|
|
38
|
+
const generateStyle = (componentTheme: MenuGroupTheme): MenuGroupStyle => {
|
|
38
39
|
return {
|
|
39
40
|
menuItemGroup: {
|
|
40
41
|
label: 'menuItemGroup',
|
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import type { WithStyleProps } from '@instructure/emotion'
|
|
26
|
-
import type {
|
|
25
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
26
|
+
import type {
|
|
27
|
+
PropValidators,
|
|
28
|
+
MenuSeparatorTheme
|
|
29
|
+
} from '@instructure/shared-types'
|
|
27
30
|
|
|
28
31
|
// keeping here to keep the structure of props.ts
|
|
29
32
|
// eslint-disable-next-line
|
|
@@ -33,11 +36,14 @@ type PropKeys = keyof MenuSeparatorOwnProps
|
|
|
33
36
|
|
|
34
37
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
35
38
|
|
|
36
|
-
type MenuSeparatorProps = MenuSeparatorOwnProps &
|
|
39
|
+
type MenuSeparatorProps = MenuSeparatorOwnProps &
|
|
40
|
+
WithStyleProps<MenuSeparatorTheme, MenuSeparatorStyle>
|
|
41
|
+
|
|
42
|
+
type MenuSeparatorStyle = ComponentStyle<'menuItemSeparator'>
|
|
37
43
|
|
|
38
44
|
const propTypes: PropValidators<PropKeys> = {}
|
|
39
45
|
|
|
40
46
|
const allowedProps: AllowedPropKeys = []
|
|
41
47
|
|
|
42
|
-
export type { MenuSeparatorProps }
|
|
48
|
+
export type { MenuSeparatorProps, MenuSeparatorStyle }
|
|
43
49
|
export { propTypes, allowedProps }
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { MenuSeparatorTheme } from '@instructure/shared-types'
|
|
25
|
+
import type { MenuSeparatorTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { MenuSeparatorStyle } from './props'
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* ---
|
|
@@ -34,7 +35,9 @@ import { MenuSeparatorTheme } from '@instructure/shared-types'
|
|
|
34
35
|
* @param {Object} state the state of the component, the style is applied to
|
|
35
36
|
* @return {Object} The final style object, which will be used in the component
|
|
36
37
|
*/
|
|
37
|
-
const generateStyle = (
|
|
38
|
+
const generateStyle = (
|
|
39
|
+
componentTheme: MenuSeparatorTheme
|
|
40
|
+
): MenuSeparatorStyle => {
|
|
38
41
|
return {
|
|
39
42
|
menuItemSeparator: {
|
|
40
43
|
label: 'menuItemSeparator',
|
package/src/Menu/props.ts
CHANGED
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
Children as ChildrenPropTypes
|
|
31
31
|
} from '@instructure/ui-prop-types'
|
|
32
32
|
|
|
33
|
-
import type { PropValidators } from '@instructure/shared-types'
|
|
34
|
-
import type { WithStyleProps } from '@instructure/emotion'
|
|
33
|
+
import type { PropValidators, MenuTheme } from '@instructure/shared-types'
|
|
34
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
35
35
|
import type {
|
|
36
36
|
PlacementPropValues,
|
|
37
37
|
PositionConstraint,
|
|
@@ -75,7 +75,9 @@ type PropKeys = keyof MenuOwnProps
|
|
|
75
75
|
|
|
76
76
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
77
77
|
|
|
78
|
-
type MenuProps = MenuOwnProps & WithStyleProps
|
|
78
|
+
type MenuProps = MenuOwnProps & WithStyleProps<MenuTheme, MenuStyle>
|
|
79
|
+
|
|
80
|
+
type MenuStyle = ComponentStyle<'menu'>
|
|
79
81
|
|
|
80
82
|
const propTypes: PropValidators<PropKeys> = {
|
|
81
83
|
/**
|
|
@@ -231,5 +233,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
231
233
|
'offsetY'
|
|
232
234
|
]
|
|
233
235
|
|
|
234
|
-
export type { MenuProps }
|
|
236
|
+
export type { MenuProps, MenuStyle }
|
|
235
237
|
export { propTypes, allowedProps }
|
package/src/Menu/styles.ts
CHANGED
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { MenuTheme } from '@instructure/shared-types'
|
|
25
|
+
import type { MenuTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { MenuStyle } from './props'
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* ---
|
|
@@ -34,7 +35,7 @@ import { MenuTheme } from '@instructure/shared-types'
|
|
|
34
35
|
* @param {Object} state the state of the component, the style is applied to
|
|
35
36
|
* @return {Object} The final style object, which will be used in the component
|
|
36
37
|
*/
|
|
37
|
-
const generateStyle = (componentTheme: MenuTheme) => {
|
|
38
|
+
const generateStyle = (componentTheme: MenuTheme): MenuStyle => {
|
|
38
39
|
return {
|
|
39
40
|
menu: {
|
|
40
41
|
label: 'menu',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
3
|
-
import type { WithStyleProps } from '@instructure/emotion';
|
|
2
|
+
import type { AsElementType, PropValidators, MenuItemTheme } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
declare type MenuItemOwnProps = {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
defaultSelected?: boolean;
|
|
@@ -19,9 +19,10 @@ declare type MenuItemOwnProps = {
|
|
|
19
19
|
};
|
|
20
20
|
declare type PropKeys = keyof MenuItemOwnProps;
|
|
21
21
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
22
|
-
declare type MenuItemProps = MenuItemOwnProps & WithStyleProps
|
|
22
|
+
declare type MenuItemProps = MenuItemOwnProps & WithStyleProps<MenuItemTheme, MenuItemStyle>;
|
|
23
|
+
declare type MenuItemStyle = ComponentStyle<'menuItem' | 'icon' | 'label'>;
|
|
23
24
|
declare const propTypes: PropValidators<PropKeys>;
|
|
24
25
|
declare const allowedProps: AllowedPropKeys;
|
|
25
|
-
export type { MenuItemProps };
|
|
26
|
+
export type { MenuItemProps, MenuItemStyle };
|
|
26
27
|
export { propTypes, allowedProps };
|
|
27
28
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItem/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItem/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;IACjD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,gBAAgB,CAAA;AAEtC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,aAAa,GAAG,gBAAgB,GACnC,cAAc,CAAC,aAAa,EAAE,aAAa,CAAC,CAAA;AAE9C,aAAK,aAAa,GAAG,cAAc,CAAC,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;AAElE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAiCvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAenB,CAAA;AAED,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MenuItemTheme } from '@instructure/shared-types';
|
|
2
|
-
import { MenuItemProps } from './props';
|
|
1
|
+
import type { MenuItemTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { MenuItemProps, MenuItemStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,249 +10,6 @@ import { MenuItemProps } from './props';
|
|
|
10
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
11
11
|
* @return {Object} The final style object, which will be used in the component
|
|
12
12
|
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: MenuItemTheme, props: MenuItemProps) =>
|
|
14
|
-
menuItem: {
|
|
15
|
-
'&:is(a)': {
|
|
16
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
17
|
-
textDecoration: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
'&:-webkit-any(a)': {
|
|
21
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
22
|
-
textDecoration: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
cursor: string;
|
|
26
|
-
pointerEvents: string;
|
|
27
|
-
opacity: number;
|
|
28
|
-
'&:focus, &:active, &:hover': {
|
|
29
|
-
background: string;
|
|
30
|
-
'[class*="menuItem__label"]': {
|
|
31
|
-
color: string;
|
|
32
|
-
};
|
|
33
|
-
'[class*="menuItem__icon"]': {
|
|
34
|
-
color: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
'&::-moz-focus-inner': {
|
|
38
|
-
padding: string;
|
|
39
|
-
margin: string;
|
|
40
|
-
border: string;
|
|
41
|
-
};
|
|
42
|
-
paddingInlineStart: string | 0;
|
|
43
|
-
label: string;
|
|
44
|
-
position: string;
|
|
45
|
-
border: string;
|
|
46
|
-
outline: string;
|
|
47
|
-
padding: string | 0;
|
|
48
|
-
margin: string;
|
|
49
|
-
width: string;
|
|
50
|
-
borderRadius: string;
|
|
51
|
-
boxSizing: string;
|
|
52
|
-
textAlign: string;
|
|
53
|
-
userSelect: string;
|
|
54
|
-
fontFamily: string;
|
|
55
|
-
fontWeight: number;
|
|
56
|
-
lineHeight: string | number;
|
|
57
|
-
fontSize: string | 0;
|
|
58
|
-
background: string;
|
|
59
|
-
transition: string;
|
|
60
|
-
display: string;
|
|
61
|
-
textDecoration: string;
|
|
62
|
-
} | {
|
|
63
|
-
'&:is(a)': {
|
|
64
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
65
|
-
textDecoration: string;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
'&:-webkit-any(a)': {
|
|
69
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
70
|
-
textDecoration: string;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
cursor: string;
|
|
74
|
-
pointerEvents?: undefined;
|
|
75
|
-
opacity?: undefined;
|
|
76
|
-
'&:focus, &:active, &:hover': {
|
|
77
|
-
background: string;
|
|
78
|
-
'[class*="menuItem__label"]': {
|
|
79
|
-
color: string;
|
|
80
|
-
};
|
|
81
|
-
'[class*="menuItem__icon"]': {
|
|
82
|
-
color: string;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
'&::-moz-focus-inner': {
|
|
86
|
-
padding: string;
|
|
87
|
-
margin: string;
|
|
88
|
-
border: string;
|
|
89
|
-
};
|
|
90
|
-
paddingInlineStart: string | 0;
|
|
91
|
-
label: string;
|
|
92
|
-
position: string;
|
|
93
|
-
border: string;
|
|
94
|
-
outline: string;
|
|
95
|
-
padding: string | 0;
|
|
96
|
-
margin: string;
|
|
97
|
-
width: string;
|
|
98
|
-
borderRadius: string;
|
|
99
|
-
boxSizing: string;
|
|
100
|
-
textAlign: string;
|
|
101
|
-
userSelect: string;
|
|
102
|
-
fontFamily: string;
|
|
103
|
-
fontWeight: number;
|
|
104
|
-
lineHeight: string | number;
|
|
105
|
-
fontSize: string | 0;
|
|
106
|
-
background: string;
|
|
107
|
-
transition: string;
|
|
108
|
-
display: string;
|
|
109
|
-
textDecoration: string;
|
|
110
|
-
} | {
|
|
111
|
-
'&:is(a)': {
|
|
112
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
113
|
-
textDecoration: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
'&:-webkit-any(a)': {
|
|
117
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
118
|
-
textDecoration: string;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
cursor: string;
|
|
122
|
-
pointerEvents: string;
|
|
123
|
-
opacity: number;
|
|
124
|
-
'&:focus, &:active, &:hover': {
|
|
125
|
-
background: string;
|
|
126
|
-
'[class*="menuItem__label"]': {
|
|
127
|
-
color: string;
|
|
128
|
-
};
|
|
129
|
-
'[class*="menuItem__icon"]': {
|
|
130
|
-
color: string;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
'&::-moz-focus-inner': {
|
|
134
|
-
padding: string;
|
|
135
|
-
margin: string;
|
|
136
|
-
border: string;
|
|
137
|
-
};
|
|
138
|
-
paddingInlineStart?: undefined;
|
|
139
|
-
label: string;
|
|
140
|
-
position: string;
|
|
141
|
-
border: string;
|
|
142
|
-
outline: string;
|
|
143
|
-
padding: string | 0;
|
|
144
|
-
margin: string;
|
|
145
|
-
width: string;
|
|
146
|
-
borderRadius: string;
|
|
147
|
-
boxSizing: string;
|
|
148
|
-
textAlign: string;
|
|
149
|
-
userSelect: string;
|
|
150
|
-
fontFamily: string;
|
|
151
|
-
fontWeight: number;
|
|
152
|
-
lineHeight: string | number;
|
|
153
|
-
fontSize: string | 0;
|
|
154
|
-
background: string;
|
|
155
|
-
transition: string;
|
|
156
|
-
display: string;
|
|
157
|
-
textDecoration: string;
|
|
158
|
-
} | {
|
|
159
|
-
'&:is(a)': {
|
|
160
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
161
|
-
textDecoration: string;
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
'&:-webkit-any(a)': {
|
|
165
|
-
'&, &:link, &:visited, &:active, &:hover, &:focus': {
|
|
166
|
-
textDecoration: string;
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
cursor: string;
|
|
170
|
-
pointerEvents?: undefined;
|
|
171
|
-
opacity?: undefined;
|
|
172
|
-
'&:focus, &:active, &:hover': {
|
|
173
|
-
background: string;
|
|
174
|
-
'[class*="menuItem__label"]': {
|
|
175
|
-
color: string;
|
|
176
|
-
};
|
|
177
|
-
'[class*="menuItem__icon"]': {
|
|
178
|
-
color: string;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
'&::-moz-focus-inner': {
|
|
182
|
-
padding: string;
|
|
183
|
-
margin: string;
|
|
184
|
-
border: string;
|
|
185
|
-
};
|
|
186
|
-
paddingInlineStart?: undefined;
|
|
187
|
-
label: string;
|
|
188
|
-
position: string;
|
|
189
|
-
border: string;
|
|
190
|
-
outline: string;
|
|
191
|
-
padding: string | 0;
|
|
192
|
-
margin: string;
|
|
193
|
-
width: string;
|
|
194
|
-
borderRadius: string;
|
|
195
|
-
boxSizing: string;
|
|
196
|
-
textAlign: string;
|
|
197
|
-
userSelect: string;
|
|
198
|
-
fontFamily: string;
|
|
199
|
-
fontWeight: number;
|
|
200
|
-
lineHeight: string | number;
|
|
201
|
-
fontSize: string | 0;
|
|
202
|
-
background: string;
|
|
203
|
-
transition: string;
|
|
204
|
-
display: string;
|
|
205
|
-
textDecoration: string;
|
|
206
|
-
};
|
|
207
|
-
icon: {
|
|
208
|
-
insetInlineStart: string;
|
|
209
|
-
insetInlineEnd: string | 0;
|
|
210
|
-
label: string;
|
|
211
|
-
position: string;
|
|
212
|
-
display: string;
|
|
213
|
-
alignItems: string;
|
|
214
|
-
top: string;
|
|
215
|
-
width: string;
|
|
216
|
-
height: string;
|
|
217
|
-
color: string;
|
|
218
|
-
} | {
|
|
219
|
-
insetInlineStart: string | 0;
|
|
220
|
-
insetInlineEnd: string;
|
|
221
|
-
label: string;
|
|
222
|
-
position: string;
|
|
223
|
-
display: string;
|
|
224
|
-
alignItems: string;
|
|
225
|
-
top: string;
|
|
226
|
-
width: string;
|
|
227
|
-
height: string;
|
|
228
|
-
color: string;
|
|
229
|
-
} | {
|
|
230
|
-
insetInlineStart: string;
|
|
231
|
-
insetInlineEnd: string | 0;
|
|
232
|
-
label: string;
|
|
233
|
-
position: string;
|
|
234
|
-
display: string;
|
|
235
|
-
alignItems: string;
|
|
236
|
-
top: string;
|
|
237
|
-
width: string;
|
|
238
|
-
height: string;
|
|
239
|
-
color: string;
|
|
240
|
-
} | {
|
|
241
|
-
insetInlineStart?: undefined;
|
|
242
|
-
insetInlineEnd?: undefined;
|
|
243
|
-
label: string;
|
|
244
|
-
position: string;
|
|
245
|
-
display: string;
|
|
246
|
-
alignItems: string;
|
|
247
|
-
top: string;
|
|
248
|
-
width: string;
|
|
249
|
-
height: string;
|
|
250
|
-
color: string;
|
|
251
|
-
};
|
|
252
|
-
label: {
|
|
253
|
-
label: string;
|
|
254
|
-
color: string;
|
|
255
|
-
};
|
|
256
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: MenuItemTheme, props: MenuItemProps) => MenuItemStyle;
|
|
257
14
|
export default generateStyle;
|
|
258
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItem/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItem/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE3D;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,aAAa,SACtB,aAAa,KACnB,aAyGF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
-
import type { WithStyleProps } from '@instructure/emotion';
|
|
2
|
+
import type { PropValidators, MenuGroupTheme } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
declare type MenuGroupOwnProps = {
|
|
5
5
|
label: React.ReactNode;
|
|
6
6
|
allowMultiple?: boolean;
|
|
@@ -17,9 +17,10 @@ declare type MenuGroupOwnProps = {
|
|
|
17
17
|
};
|
|
18
18
|
declare type PropKeys = keyof MenuGroupOwnProps;
|
|
19
19
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
20
|
-
declare type MenuGroupProps = MenuGroupOwnProps & WithStyleProps
|
|
20
|
+
declare type MenuGroupProps = MenuGroupOwnProps & WithStyleProps<MenuGroupTheme, MenuGroupStyle>;
|
|
21
|
+
declare type MenuGroupStyle = ComponentStyle<'menuItemGroup' | 'label' | 'items'>;
|
|
21
22
|
declare const propTypes: PropValidators<PropKeys>;
|
|
22
23
|
declare const allowedProps: AllowedPropKeys;
|
|
23
|
-
export type { MenuGroupProps };
|
|
24
|
+
export type { MenuGroupProps, MenuGroupStyle };
|
|
24
25
|
export { propTypes, allowedProps };
|
|
25
26
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/props.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/props.ts"],"names":[],"mappings":";AAkCA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,eAAe,CAAC,EAAE,GAAG,EAAE,CAAA;IACvB,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACrC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,iBAAiB,CAAA;AAEvC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,cAAc,GAAG,iBAAiB,GACrC,cAAc,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;AAEhD,aAAK,cAAc,GAAG,cAAc,CAAC,eAAe,GAAG,OAAO,GAAG,OAAO,CAAC,CAAA;AAEzE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAkCvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAanB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { MenuGroupTheme } from '@instructure/shared-types';
|
|
1
|
+
import type { MenuGroupTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { MenuGroupStyle } from './props';
|
|
2
3
|
/**
|
|
3
4
|
* ---
|
|
4
5
|
* private: true
|
|
@@ -9,28 +10,6 @@ import { MenuGroupTheme } from '@instructure/shared-types';
|
|
|
9
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
10
11
|
* @return {Object} The final style object, which will be used in the component
|
|
11
12
|
*/
|
|
12
|
-
declare const generateStyle: (componentTheme: MenuGroupTheme) =>
|
|
13
|
-
menuItemGroup: {
|
|
14
|
-
label: string;
|
|
15
|
-
display: string;
|
|
16
|
-
};
|
|
17
|
-
label: {
|
|
18
|
-
label: string;
|
|
19
|
-
background: string;
|
|
20
|
-
padding: string | 0;
|
|
21
|
-
display: string;
|
|
22
|
-
fontSize: string | 0;
|
|
23
|
-
fontFamily: string;
|
|
24
|
-
fontWeight: number;
|
|
25
|
-
color: string;
|
|
26
|
-
textAlign: string;
|
|
27
|
-
};
|
|
28
|
-
items: {
|
|
29
|
-
label: string;
|
|
30
|
-
padding: string;
|
|
31
|
-
margin: string;
|
|
32
|
-
listStyleType: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: MenuGroupTheme) => MenuGroupStyle;
|
|
35
14
|
export default generateStyle;
|
|
36
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBAAoB,cAAc,KAAG,cAwBvD,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { WithStyleProps } from '@instructure/emotion';
|
|
2
|
-
import type { PropValidators } from '@instructure/shared-types';
|
|
1
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
2
|
+
import type { PropValidators, MenuSeparatorTheme } from '@instructure/shared-types';
|
|
3
3
|
declare type MenuSeparatorOwnProps = {};
|
|
4
4
|
declare type PropKeys = keyof MenuSeparatorOwnProps;
|
|
5
5
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
6
|
-
declare type MenuSeparatorProps = MenuSeparatorOwnProps & WithStyleProps
|
|
6
|
+
declare type MenuSeparatorProps = MenuSeparatorOwnProps & WithStyleProps<MenuSeparatorTheme, MenuSeparatorStyle>;
|
|
7
|
+
declare type MenuSeparatorStyle = ComponentStyle<'menuItemSeparator'>;
|
|
7
8
|
declare const propTypes: PropValidators<PropKeys>;
|
|
8
9
|
declare const allowedProps: AllowedPropKeys;
|
|
9
|
-
export type { MenuSeparatorProps };
|
|
10
|
+
export type { MenuSeparatorProps, MenuSeparatorStyle };
|
|
10
11
|
export { propTypes, allowedProps };
|
|
11
12
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAIlC,aAAK,qBAAqB,GAAG,EAAE,CAAA;AAE/B,aAAK,QAAQ,GAAG,MAAM,qBAAqB,CAAA;AAE3C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,kBAAkB,GAAG,qBAAqB,GAC7C,cAAc,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAA;AAExD,aAAK,kBAAkB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAA;AAE7D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAAM,CAAA;AAE9C,QAAA,MAAM,YAAY,EAAE,eAAoB,CAAA;AAExC,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { MenuSeparatorTheme } from '@instructure/shared-types';
|
|
1
|
+
import type { MenuSeparatorTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { MenuSeparatorStyle } from './props';
|
|
2
3
|
/**
|
|
3
4
|
* ---
|
|
4
5
|
* private: true
|
|
@@ -9,14 +10,6 @@ import { MenuSeparatorTheme } from '@instructure/shared-types';
|
|
|
9
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
10
11
|
* @return {Object} The final style object, which will be used in the component
|
|
11
12
|
*/
|
|
12
|
-
declare const generateStyle: (componentTheme: MenuSeparatorTheme) =>
|
|
13
|
-
menuItemSeparator: {
|
|
14
|
-
label: string;
|
|
15
|
-
height: string | 0;
|
|
16
|
-
margin: string | 0;
|
|
17
|
-
overflow: string;
|
|
18
|
-
background: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: MenuSeparatorTheme) => MenuSeparatorStyle;
|
|
21
14
|
export default generateStyle;
|
|
22
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,kBAAkB,KACjC,kBAUF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
package/types/Menu/props.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
-
import type { WithStyleProps } from '@instructure/emotion';
|
|
2
|
+
import type { PropValidators, MenuTheme } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
import type { PlacementPropValues, PositionConstraint, PositionMountNode } from '@instructure/ui-position';
|
|
5
5
|
declare type MenuOwnProps = {
|
|
6
6
|
children?: React.ReactNode;
|
|
@@ -33,9 +33,10 @@ declare type MenuOwnProps = {
|
|
|
33
33
|
};
|
|
34
34
|
declare type PropKeys = keyof MenuOwnProps;
|
|
35
35
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
36
|
-
declare type MenuProps = MenuOwnProps & WithStyleProps
|
|
36
|
+
declare type MenuProps = MenuOwnProps & WithStyleProps<MenuTheme, MenuStyle>;
|
|
37
|
+
declare type MenuStyle = ComponentStyle<'menu'>;
|
|
37
38
|
declare const propTypes: PropValidators<PropKeys>;
|
|
38
39
|
declare const allowedProps: AllowedPropKeys;
|
|
39
|
-
export type { MenuProps };
|
|
40
|
+
export type { MenuProps, MenuStyle };
|
|
40
41
|
export { propTypes, allowedProps };
|
|
41
42
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Menu/props.ts"],"names":[],"mappings":";AAgCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Menu/props.ts"],"names":[],"mappings":";AAgCA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AAEjC,aAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,mBAAmB,CAAA;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAChC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACrC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,UAAU,CAAC,EACP,KAAK,CAAC,YAAY,EAAE,GACpB,KAAK,CAAC,YAAY,GAClB,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,YAAY,CAAA;AAElC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAEpE,aAAK,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAEvC,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA0HvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eA4BnB,CAAA;AAED,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
package/types/Menu/styles.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { MenuTheme } from '@instructure/shared-types';
|
|
1
|
+
import type { MenuTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { MenuStyle } from './props';
|
|
2
3
|
/**
|
|
3
4
|
* ---
|
|
4
5
|
* private: true
|
|
@@ -9,38 +10,6 @@ import { MenuTheme } from '@instructure/shared-types';
|
|
|
9
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
10
11
|
* @return {Object} The final style object, which will be used in the component
|
|
11
12
|
*/
|
|
12
|
-
declare const generateStyle: (componentTheme: MenuTheme) =>
|
|
13
|
-
menu: {
|
|
14
|
-
label: string;
|
|
15
|
-
minWidth: string;
|
|
16
|
-
maxWidth: string;
|
|
17
|
-
listStyleType: string;
|
|
18
|
-
margin: string;
|
|
19
|
-
padding: string;
|
|
20
|
-
background: string;
|
|
21
|
-
display: string;
|
|
22
|
-
position: string;
|
|
23
|
-
'&::before': {
|
|
24
|
-
content: string;
|
|
25
|
-
position: string;
|
|
26
|
-
top: string;
|
|
27
|
-
left: string;
|
|
28
|
-
right: string;
|
|
29
|
-
bottom: string;
|
|
30
|
-
border: string;
|
|
31
|
-
borderRadius: string | 0;
|
|
32
|
-
opacity: number;
|
|
33
|
-
transform: string;
|
|
34
|
-
pointerEvents: string;
|
|
35
|
-
};
|
|
36
|
-
'&:focus': {
|
|
37
|
-
outline: string;
|
|
38
|
-
'&::before': {
|
|
39
|
-
opacity: number;
|
|
40
|
-
transform: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: MenuTheme) => MenuStyle;
|
|
45
14
|
export default generateStyle;
|
|
46
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Menu/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Menu/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBAAoB,SAAS,KAAG,SAkClD,CAAA;AAED,eAAe,aAAa,CAAA"}
|