@instructure/ui-modal 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/Modal/ModalBody/index.js +1 -1
- package/es/Modal/props.js +2 -2
- package/lib/Modal/ModalBody/index.js +1 -1
- package/lib/Modal/props.js +2 -2
- package/package.json +21 -21
- package/src/Modal/ModalBody/index.tsx +1 -1
- package/src/Modal/ModalBody/props.ts +15 -4
- package/src/Modal/ModalBody/styles.ts +3 -3
- package/src/Modal/ModalFooter/props.ts +10 -4
- package/src/Modal/ModalFooter/styles.ts +3 -3
- package/src/Modal/ModalHeader/props.ts +10 -4
- package/src/Modal/ModalHeader/styles.ts +7 -3
- package/src/Modal/index.tsx +0 -1
- package/src/Modal/props.ts +12 -6
- package/src/Modal/styles.ts +6 -3
- package/types/Modal/ModalBody/index.d.ts +2 -12
- package/types/Modal/ModalBody/index.d.ts.map +1 -1
- package/types/Modal/ModalBody/props.d.ts +5 -4
- package/types/Modal/ModalBody/props.d.ts.map +1 -1
- package/types/Modal/ModalBody/styles.d.ts +3 -23
- package/types/Modal/ModalBody/styles.d.ts.map +1 -1
- package/types/Modal/ModalFooter/props.d.ts +5 -4
- package/types/Modal/ModalFooter/props.d.ts.map +1 -1
- package/types/Modal/ModalFooter/styles.d.ts +3 -16
- package/types/Modal/ModalFooter/styles.d.ts.map +1 -1
- package/types/Modal/ModalHeader/props.d.ts +5 -4
- package/types/Modal/ModalHeader/props.d.ts.map +1 -1
- package/types/Modal/ModalHeader/styles.d.ts +3 -27
- package/types/Modal/ModalHeader/styles.d.ts.map +1 -1
- package/types/Modal/index.d.ts.map +1 -1
- package/types/Modal/props.d.ts +5 -4
- package/types/Modal/props.d.ts.map +1 -1
- package/types/Modal/styles.d.ts +3 -96
- package/types/Modal/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-modal
|
|
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-modal
|
|
@@ -64,7 +64,7 @@ let ModalBody = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
64
64
|
children = _this$props.children,
|
|
65
65
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
66
66
|
|
|
67
|
-
const passthroughProps = View.omitViewProps(omitProps(rest, ModalBody.
|
|
67
|
+
const passthroughProps = View.omitViewProps(omitProps(rest, ModalBody.allowedProps), ModalBody);
|
|
68
68
|
const isFit = overflow === 'fit';
|
|
69
69
|
return jsx(View, Object.assign({}, passthroughProps, {
|
|
70
70
|
display: "block",
|
package/es/Modal/props.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import PropTypes from 'prop-types';
|
|
25
25
|
import { element, Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
|
|
26
|
-
import {
|
|
26
|
+
import { transitionTypePropType } from '@instructure/ui-motion';
|
|
27
27
|
import { ModalHeader } from './ModalHeader';
|
|
28
28
|
import { ModalBody } from './ModalBody';
|
|
29
29
|
import { ModalFooter } from './ModalFooter';
|
|
@@ -110,7 +110,7 @@ const propTypes = {
|
|
|
110
110
|
* the screen reader when the `<Modal />` is open
|
|
111
111
|
*/
|
|
112
112
|
liveRegion: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element, PropTypes.func]),
|
|
113
|
-
transition:
|
|
113
|
+
transition: transitionTypePropType,
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
116
|
* Callback fired before the <Modal /> transitions in
|
|
@@ -56,7 +56,7 @@ let ModalBody = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
|
56
56
|
children = _this$props.children,
|
|
57
57
|
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
58
58
|
|
|
59
|
-
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(rest, ModalBody.
|
|
59
|
+
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(rest, ModalBody.allowedProps), ModalBody);
|
|
60
60
|
|
|
61
61
|
const isFit = overflow === 'fit';
|
|
62
62
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, passthroughProps, {
|
package/lib/Modal/props.js
CHANGED
|
@@ -13,7 +13,7 @@ var _element = require("@instructure/ui-prop-types/lib/element.js");
|
|
|
13
13
|
|
|
14
14
|
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _uiMotion = require("@instructure/ui-motion");
|
|
17
17
|
|
|
18
18
|
var _ModalHeader = require("./ModalHeader");
|
|
19
19
|
|
|
@@ -127,7 +127,7 @@ const propTypes = {
|
|
|
127
127
|
* the screen reader when the `<Modal />` is open
|
|
128
128
|
*/
|
|
129
129
|
liveRegion: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.element), _propTypes.default.element, _propTypes.default.func]),
|
|
130
|
-
transition:
|
|
130
|
+
transition: _uiMotion.transitionTypePropType,
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Callback fired before the <Modal /> transitions in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-modal",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.1-snapshot.4+6c5c9e653",
|
|
4
4
|
"description": "A component for displaying content in a dialog overlay",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,35 +25,35 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.
|
|
29
|
-
"@instructure/emotion": "8.
|
|
30
|
-
"@instructure/shared-types": "8.
|
|
31
|
-
"@instructure/ui-buttons": "8.
|
|
32
|
-
"@instructure/ui-dialog": "8.
|
|
33
|
-
"@instructure/ui-motion": "8.
|
|
34
|
-
"@instructure/ui-overlays": "8.
|
|
35
|
-
"@instructure/ui-portal": "8.
|
|
36
|
-
"@instructure/ui-prop-types": "8.
|
|
37
|
-
"@instructure/ui-react-utils": "8.
|
|
38
|
-
"@instructure/ui-testable": "8.
|
|
39
|
-
"@instructure/ui-utils": "8.
|
|
40
|
-
"@instructure/ui-view": "8.
|
|
28
|
+
"@instructure/console": "8.10.1-snapshot.4+6c5c9e653",
|
|
29
|
+
"@instructure/emotion": "8.10.1-snapshot.4+6c5c9e653",
|
|
30
|
+
"@instructure/shared-types": "8.10.1-snapshot.4+6c5c9e653",
|
|
31
|
+
"@instructure/ui-buttons": "8.10.1-snapshot.4+6c5c9e653",
|
|
32
|
+
"@instructure/ui-dialog": "8.10.1-snapshot.4+6c5c9e653",
|
|
33
|
+
"@instructure/ui-motion": "8.10.1-snapshot.4+6c5c9e653",
|
|
34
|
+
"@instructure/ui-overlays": "8.10.1-snapshot.4+6c5c9e653",
|
|
35
|
+
"@instructure/ui-portal": "8.10.1-snapshot.4+6c5c9e653",
|
|
36
|
+
"@instructure/ui-prop-types": "8.10.1-snapshot.4+6c5c9e653",
|
|
37
|
+
"@instructure/ui-react-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
38
|
+
"@instructure/ui-testable": "8.10.1-snapshot.4+6c5c9e653",
|
|
39
|
+
"@instructure/ui-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
40
|
+
"@instructure/ui-view": "8.10.1-snapshot.4+6c5c9e653",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8 <=17"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@instructure/ui-babel-preset": "8.
|
|
48
|
-
"@instructure/ui-color-utils": "8.
|
|
49
|
-
"@instructure/ui-position": "8.
|
|
50
|
-
"@instructure/ui-test-locator": "8.
|
|
51
|
-
"@instructure/ui-test-utils": "8.
|
|
52
|
-
"@instructure/ui-themes": "8.
|
|
47
|
+
"@instructure/ui-babel-preset": "8.10.1-snapshot.4+6c5c9e653",
|
|
48
|
+
"@instructure/ui-color-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
49
|
+
"@instructure/ui-position": "8.10.1-snapshot.4+6c5c9e653",
|
|
50
|
+
"@instructure/ui-test-locator": "8.10.1-snapshot.4+6c5c9e653",
|
|
51
|
+
"@instructure/ui-test-utils": "8.10.1-snapshot.4+6c5c9e653",
|
|
52
|
+
"@instructure/ui-themes": "8.10.1-snapshot.4+6c5c9e653"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"sideEffects": false,
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "6c5c9e653f7ce3d239296f4ed19c5679fdddcd5b"
|
|
59
59
|
}
|
|
@@ -27,8 +27,16 @@ import PropTypes from 'prop-types'
|
|
|
27
27
|
|
|
28
28
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
29
29
|
|
|
30
|
-
import type {
|
|
31
|
-
|
|
30
|
+
import type {
|
|
31
|
+
Spacing,
|
|
32
|
+
WithStyleProps,
|
|
33
|
+
ComponentStyle
|
|
34
|
+
} from '@instructure/emotion'
|
|
35
|
+
import type {
|
|
36
|
+
AsElementType,
|
|
37
|
+
PropValidators,
|
|
38
|
+
ModalBodyTheme
|
|
39
|
+
} from '@instructure/shared-types'
|
|
32
40
|
|
|
33
41
|
type ModalBodyOwnProps = {
|
|
34
42
|
children?: React.ReactNode
|
|
@@ -43,7 +51,10 @@ type PropKeys = keyof ModalBodyOwnProps
|
|
|
43
51
|
|
|
44
52
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
45
53
|
|
|
46
|
-
type ModalBodyProps = ModalBodyOwnProps &
|
|
54
|
+
type ModalBodyProps = ModalBodyOwnProps &
|
|
55
|
+
WithStyleProps<ModalBodyTheme, ModalBodyStyle>
|
|
56
|
+
|
|
57
|
+
type ModalBodyStyle = ComponentStyle<'modalBody'>
|
|
47
58
|
|
|
48
59
|
const propTypes: PropValidators<PropKeys> = {
|
|
49
60
|
children: PropTypes.node,
|
|
@@ -63,5 +74,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
63
74
|
'overflow'
|
|
64
75
|
]
|
|
65
76
|
|
|
66
|
-
export type { ModalBodyProps }
|
|
77
|
+
export type { ModalBodyProps, ModalBodyStyle }
|
|
67
78
|
export { propTypes, allowedProps }
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { ModalBodyTheme } from '@instructure/shared-types'
|
|
26
|
-
import { ModalBodyProps } from './props'
|
|
25
|
+
import type { ModalBodyTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { ModalBodyProps, ModalBodyStyle } from './props'
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* ---
|
|
@@ -38,7 +38,7 @@ import { ModalBodyProps } from './props'
|
|
|
38
38
|
const generateStyle = (
|
|
39
39
|
componentTheme: ModalBodyTheme,
|
|
40
40
|
props: ModalBodyProps
|
|
41
|
-
) => {
|
|
41
|
+
): ModalBodyStyle => {
|
|
42
42
|
const { variant } = props
|
|
43
43
|
|
|
44
44
|
const backgroundStyle =
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
import React from 'react'
|
|
26
26
|
import PropTypes from 'prop-types'
|
|
27
27
|
|
|
28
|
-
import type {
|
|
29
|
-
|
|
28
|
+
import type {
|
|
29
|
+
PropValidators,
|
|
30
|
+
ModalFooterTheme
|
|
31
|
+
} from '@instructure/shared-types'
|
|
32
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
30
33
|
|
|
31
34
|
type ModalFooterOwnProps = {
|
|
32
35
|
children?: React.ReactNode
|
|
@@ -37,7 +40,10 @@ type PropKeys = keyof ModalFooterOwnProps
|
|
|
37
40
|
|
|
38
41
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
39
42
|
|
|
40
|
-
type ModalFooterProps = ModalFooterOwnProps &
|
|
43
|
+
type ModalFooterProps = ModalFooterOwnProps &
|
|
44
|
+
WithStyleProps<ModalFooterTheme, ModalFooterStyle>
|
|
45
|
+
|
|
46
|
+
type ModalFooterStyle = ComponentStyle<'modalFooter'>
|
|
41
47
|
|
|
42
48
|
const propTypes: PropValidators<PropKeys> = {
|
|
43
49
|
children: PropTypes.node,
|
|
@@ -46,5 +52,5 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
46
52
|
|
|
47
53
|
const allowedProps: AllowedPropKeys = ['children', 'variant']
|
|
48
54
|
|
|
49
|
-
export type { ModalFooterProps }
|
|
55
|
+
export type { ModalFooterProps, ModalFooterStyle }
|
|
50
56
|
export { propTypes, allowedProps }
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { ModalFooterTheme } from '@instructure/shared-types'
|
|
26
|
-
import { ModalFooterProps } from './props'
|
|
25
|
+
import type { ModalFooterTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { ModalFooterProps, ModalFooterStyle } from './props'
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* ---
|
|
@@ -38,7 +38,7 @@ import { ModalFooterProps } from './props'
|
|
|
38
38
|
const generateStyle = (
|
|
39
39
|
componentTheme: ModalFooterTheme,
|
|
40
40
|
props: ModalFooterProps
|
|
41
|
-
) => {
|
|
41
|
+
): ModalFooterStyle => {
|
|
42
42
|
const { variant } = props
|
|
43
43
|
|
|
44
44
|
const backgroundStyle =
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
import React from 'react'
|
|
26
26
|
import PropTypes from 'prop-types'
|
|
27
27
|
|
|
28
|
-
import type {
|
|
29
|
-
|
|
28
|
+
import type {
|
|
29
|
+
PropValidators,
|
|
30
|
+
ModalHeaderTheme
|
|
31
|
+
} from '@instructure/shared-types'
|
|
32
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
30
33
|
|
|
31
34
|
type ModalHeaderOwnProps = {
|
|
32
35
|
children?: React.ReactNode
|
|
@@ -41,7 +44,10 @@ type PropKeys = keyof ModalHeaderOwnProps
|
|
|
41
44
|
|
|
42
45
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
43
46
|
|
|
44
|
-
type ModalHeaderProps = ModalHeaderOwnProps &
|
|
47
|
+
type ModalHeaderProps = ModalHeaderOwnProps &
|
|
48
|
+
WithStyleProps<ModalHeaderTheme, ModalHeaderStyle>
|
|
49
|
+
|
|
50
|
+
type ModalHeaderStyle = ComponentStyle<'modalHeader'>
|
|
45
51
|
|
|
46
52
|
const propTypes: PropValidators<PropKeys> = {
|
|
47
53
|
children: PropTypes.node,
|
|
@@ -50,5 +56,5 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
50
56
|
|
|
51
57
|
const allowedProps: AllowedPropKeys = ['children', 'variant']
|
|
52
58
|
|
|
53
|
-
export type { ModalHeaderProps, ModalHeaderStyleProps }
|
|
59
|
+
export type { ModalHeaderProps, ModalHeaderStyleProps, ModalHeaderStyle }
|
|
54
60
|
export { propTypes, allowedProps }
|
|
@@ -22,8 +22,12 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { ModalHeaderTheme } from '@instructure/shared-types'
|
|
26
|
-
import {
|
|
25
|
+
import type { ModalHeaderTheme } from '@instructure/shared-types'
|
|
26
|
+
import type {
|
|
27
|
+
ModalHeaderProps,
|
|
28
|
+
ModalHeaderStyleProps,
|
|
29
|
+
ModalHeaderStyle
|
|
30
|
+
} from './props'
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* ---
|
|
@@ -39,7 +43,7 @@ const generateStyle = (
|
|
|
39
43
|
componentTheme: ModalHeaderTheme,
|
|
40
44
|
props: ModalHeaderProps,
|
|
41
45
|
state: ModalHeaderStyleProps
|
|
42
|
-
) => {
|
|
46
|
+
): ModalHeaderStyle => {
|
|
43
47
|
const { variant } = props
|
|
44
48
|
const { withCloseButton } = state
|
|
45
49
|
|
package/src/Modal/index.tsx
CHANGED
|
@@ -223,7 +223,6 @@ class Modal extends Component<ModalProps> {
|
|
|
223
223
|
<Mask
|
|
224
224
|
placement={this.maskPlacement}
|
|
225
225
|
fullscreen={constrain === 'window'}
|
|
226
|
-
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
|
227
226
|
themeOverride={
|
|
228
227
|
isFullScreen ? { borderRadius: '0em', borderWidth: '0em' } : {}
|
|
229
228
|
}
|
package/src/Modal/props.ts
CHANGED
|
@@ -29,16 +29,20 @@ import {
|
|
|
29
29
|
element,
|
|
30
30
|
Children as ChildrenPropTypes
|
|
31
31
|
} from '@instructure/ui-prop-types'
|
|
32
|
-
import {
|
|
32
|
+
import { transitionTypePropType } from '@instructure/ui-motion'
|
|
33
33
|
import { ModalHeader } from './ModalHeader'
|
|
34
34
|
import { ModalBody } from './ModalBody'
|
|
35
35
|
import { ModalFooter } from './ModalFooter'
|
|
36
36
|
|
|
37
|
-
import type {
|
|
37
|
+
import type {
|
|
38
|
+
AsElementType,
|
|
39
|
+
PropValidators,
|
|
40
|
+
ModalTheme
|
|
41
|
+
} from '@instructure/shared-types'
|
|
38
42
|
import type { PortalNode } from '@instructure/ui-portal'
|
|
39
43
|
import type { PositionMountNode } from '@instructure/ui-position'
|
|
40
44
|
import type { TransitionType } from '@instructure/ui-motion'
|
|
41
|
-
import type { WithStyleProps } from '@instructure/emotion'
|
|
45
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
42
46
|
|
|
43
47
|
type ModalOwnProps = {
|
|
44
48
|
label: string
|
|
@@ -75,7 +79,9 @@ type PropKeys = keyof ModalOwnProps
|
|
|
75
79
|
|
|
76
80
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
77
81
|
|
|
78
|
-
type ModalProps = ModalOwnProps & WithStyleProps
|
|
82
|
+
type ModalProps = ModalOwnProps & WithStyleProps<ModalTheme, ModalStyle>
|
|
83
|
+
|
|
84
|
+
type ModalStyle = ComponentStyle<'modal' | 'constrainContext'>
|
|
79
85
|
|
|
80
86
|
const propTypes: PropValidators<PropKeys> = {
|
|
81
87
|
/**
|
|
@@ -169,7 +175,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
169
175
|
PropTypes.func
|
|
170
176
|
]),
|
|
171
177
|
|
|
172
|
-
transition:
|
|
178
|
+
transition: transitionTypePropType,
|
|
173
179
|
|
|
174
180
|
/**
|
|
175
181
|
* Callback fired before the <Modal /> transitions in
|
|
@@ -234,5 +240,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
234
240
|
'overflow'
|
|
235
241
|
]
|
|
236
242
|
|
|
237
|
-
export type { ModalProps }
|
|
243
|
+
export type { ModalProps, ModalStyle }
|
|
238
244
|
export { propTypes, allowedProps }
|
package/src/Modal/styles.ts
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { ModalTheme } from '@instructure/shared-types'
|
|
26
|
-
import { ModalProps } from './props'
|
|
25
|
+
import type { ModalTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { ModalProps, ModalStyle } from './props'
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* ---
|
|
@@ -35,7 +35,10 @@ import { ModalProps } 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: ModalTheme,
|
|
40
|
+
props: ModalProps
|
|
41
|
+
): ModalStyle => {
|
|
39
42
|
const { size, variant, overflow } = props
|
|
40
43
|
|
|
41
44
|
const commonSizeStyleExceptForFullscreen = {
|
|
@@ -15,12 +15,7 @@ declare class ModalBody extends Component<ModalBodyProps> {
|
|
|
15
15
|
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
16
16
|
elementRef?: ((...args: any[]) => any) | undefined;
|
|
17
17
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
18
|
-
variant?: "default" | "inverse" | undefined;
|
|
19
|
-
---
|
|
20
|
-
parent: Modal
|
|
21
|
-
id: Modal.Body
|
|
22
|
-
---
|
|
23
|
-
**/
|
|
18
|
+
variant?: "default" | "inverse" | undefined;
|
|
24
19
|
overflow?: "scroll" | "fit" | undefined;
|
|
25
20
|
}>;
|
|
26
21
|
static allowedProps: readonly (keyof {
|
|
@@ -28,12 +23,7 @@ declare class ModalBody extends Component<ModalBodyProps> {
|
|
|
28
23
|
padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
29
24
|
elementRef?: ((...args: any[]) => any) | undefined;
|
|
30
25
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
31
|
-
variant?: "default" | "inverse" | undefined;
|
|
32
|
-
---
|
|
33
|
-
parent: Modal
|
|
34
|
-
id: Modal.Body
|
|
35
|
-
---
|
|
36
|
-
**/
|
|
26
|
+
variant?: "default" | "inverse" | undefined;
|
|
37
27
|
overflow?: "scroll" | "fit" | undefined;
|
|
38
28
|
})[];
|
|
39
29
|
static defaultProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CAiCP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
|
+
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
+
import type { AsElementType, PropValidators, ModalBodyTheme } from '@instructure/shared-types';
|
|
4
4
|
declare type ModalBodyOwnProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
padding?: Spacing;
|
|
@@ -11,9 +11,10 @@ declare type ModalBodyOwnProps = {
|
|
|
11
11
|
};
|
|
12
12
|
declare type PropKeys = keyof ModalBodyOwnProps;
|
|
13
13
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
14
|
-
declare type ModalBodyProps = ModalBodyOwnProps & WithStyleProps
|
|
14
|
+
declare type ModalBodyProps = ModalBodyOwnProps & WithStyleProps<ModalBodyTheme, ModalBodyStyle>;
|
|
15
|
+
declare type ModalBodyStyle = ComponentStyle<'modalBody'>;
|
|
15
16
|
declare const propTypes: PropValidators<PropKeys>;
|
|
16
17
|
declare const allowedProps: AllowedPropKeys;
|
|
17
|
-
export type { ModalBodyProps };
|
|
18
|
+
export type { ModalBodyProps, ModalBodyStyle };
|
|
18
19
|
export { propTypes, allowedProps };
|
|
19
20
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACf,MAAM,2BAA2B,CAAA;AAElC,aAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;CAC5B,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,WAAW,CAAC,CAAA;AAEjD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAOvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAOnB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModalBodyTheme } from '@instructure/shared-types';
|
|
2
|
-
import { ModalBodyProps } from './props';
|
|
1
|
+
import type { ModalBodyTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { ModalBodyProps, ModalBodyStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,26 +10,6 @@ import { ModalBodyProps } 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: ModalBodyTheme, props: ModalBodyProps) =>
|
|
14
|
-
modalBody: {
|
|
15
|
-
background: string;
|
|
16
|
-
label: string;
|
|
17
|
-
boxSizing: string;
|
|
18
|
-
flex: string;
|
|
19
|
-
overflowY: string;
|
|
20
|
-
'&:focus': {
|
|
21
|
-
outline: string;
|
|
22
|
-
};
|
|
23
|
-
} | {
|
|
24
|
-
background?: undefined;
|
|
25
|
-
label: string;
|
|
26
|
-
boxSizing: string;
|
|
27
|
-
flex: string;
|
|
28
|
-
overflowY: string;
|
|
29
|
-
'&:focus': {
|
|
30
|
-
outline: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: ModalBodyTheme, props: ModalBodyProps) => ModalBodyStyle;
|
|
34
14
|
export default generateStyle;
|
|
35
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7D;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,cAAc,SACvB,cAAc,KACpB,cAsBF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
-
import type { WithStyleProps } from '@instructure/emotion';
|
|
2
|
+
import type { PropValidators, ModalFooterTheme } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
declare type ModalFooterOwnProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
variant?: 'default' | 'inverse';
|
|
7
7
|
};
|
|
8
8
|
declare type PropKeys = keyof ModalFooterOwnProps;
|
|
9
9
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
10
|
-
declare type ModalFooterProps = ModalFooterOwnProps & WithStyleProps
|
|
10
|
+
declare type ModalFooterProps = ModalFooterOwnProps & WithStyleProps<ModalFooterTheme, ModalFooterStyle>;
|
|
11
|
+
declare type ModalFooterStyle = ComponentStyle<'modalFooter'>;
|
|
11
12
|
declare const propTypes: PropValidators<PropKeys>;
|
|
12
13
|
declare const allowedProps: AllowedPropKeys;
|
|
13
|
-
export type { ModalFooterProps };
|
|
14
|
+
export type { ModalFooterProps, ModalFooterStyle };
|
|
14
15
|
export { propTypes, allowedProps };
|
|
15
16
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalFooter/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalFooter/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,mBAAmB,CAAA;AAEzC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,gBAAgB,GAAG,mBAAmB,GACzC,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAA;AAEpD,aAAK,gBAAgB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;AAErD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAyC,CAAA;AAE7D,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModalFooterTheme } from '@instructure/shared-types';
|
|
2
|
-
import { ModalFooterProps } from './props';
|
|
1
|
+
import type { ModalFooterTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { ModalFooterProps, ModalFooterStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,19 +10,6 @@ import { ModalFooterProps } 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: ModalFooterTheme, props: ModalFooterProps) =>
|
|
14
|
-
modalFooter: {
|
|
15
|
-
background: string;
|
|
16
|
-
borderTop: string;
|
|
17
|
-
label: string;
|
|
18
|
-
flex: string;
|
|
19
|
-
boxSizing: string;
|
|
20
|
-
padding: string | 0;
|
|
21
|
-
borderBottomRightRadius: string | 0;
|
|
22
|
-
borderBottomLeftRadius: string | 0;
|
|
23
|
-
display: string;
|
|
24
|
-
justifyContent: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: ModalFooterTheme, props: ModalFooterProps) => ModalFooterStyle;
|
|
27
14
|
export default generateStyle;
|
|
28
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalFooter/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalFooter/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEjE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,gBAAgB,SACzB,gBAAgB,KACtB,gBA2BF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
-
import type { WithStyleProps } from '@instructure/emotion';
|
|
2
|
+
import type { PropValidators, ModalHeaderTheme } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
declare type ModalHeaderOwnProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
variant?: 'default' | 'inverse';
|
|
@@ -10,9 +10,10 @@ declare type ModalHeaderStyleProps = {
|
|
|
10
10
|
};
|
|
11
11
|
declare type PropKeys = keyof ModalHeaderOwnProps;
|
|
12
12
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
13
|
-
declare type ModalHeaderProps = ModalHeaderOwnProps & WithStyleProps
|
|
13
|
+
declare type ModalHeaderProps = ModalHeaderOwnProps & WithStyleProps<ModalHeaderTheme, ModalHeaderStyle>;
|
|
14
|
+
declare type ModalHeaderStyle = ComponentStyle<'modalHeader'>;
|
|
14
15
|
declare const propTypes: PropValidators<PropKeys>;
|
|
15
16
|
declare const allowedProps: AllowedPropKeys;
|
|
16
|
-
export type { ModalHeaderProps, ModalHeaderStyleProps };
|
|
17
|
+
export type { ModalHeaderProps, ModalHeaderStyleProps, ModalHeaderStyle };
|
|
17
18
|
export { propTypes, allowedProps };
|
|
18
19
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,aAAK,qBAAqB,GAAG;IAC3B,eAAe,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,mBAAmB,CAAA;AAEzC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,gBAAgB,GAAG,mBAAmB,GACzC,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAA;AAEpD,aAAK,gBAAgB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;AAErD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAyC,CAAA;AAE7D,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModalHeaderTheme } from '@instructure/shared-types';
|
|
2
|
-
import { ModalHeaderProps, ModalHeaderStyleProps } from './props';
|
|
1
|
+
import type { ModalHeaderTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { ModalHeaderProps, ModalHeaderStyleProps, ModalHeaderStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,30 +10,6 @@ import { ModalHeaderProps, ModalHeaderStyleProps } 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: ModalHeaderTheme, props: ModalHeaderProps, state: ModalHeaderStyleProps) =>
|
|
14
|
-
modalHeader: {
|
|
15
|
-
paddingInlineEnd: string | 0;
|
|
16
|
-
background: string;
|
|
17
|
-
borderBottomColor: string;
|
|
18
|
-
label: string;
|
|
19
|
-
boxSizing: string;
|
|
20
|
-
padding: string | 0;
|
|
21
|
-
paddingInlineStart: string | 0;
|
|
22
|
-
flex: string;
|
|
23
|
-
borderBottomWidth: string;
|
|
24
|
-
borderBottomStyle: string;
|
|
25
|
-
} | {
|
|
26
|
-
paddingInlineEnd: string | 0;
|
|
27
|
-
background: string;
|
|
28
|
-
borderBottomColor: string;
|
|
29
|
-
label: string;
|
|
30
|
-
boxSizing: string;
|
|
31
|
-
padding: string | 0;
|
|
32
|
-
paddingInlineStart: string | 0;
|
|
33
|
-
flex: string;
|
|
34
|
-
borderBottomWidth: string;
|
|
35
|
-
borderBottomStyle: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: ModalHeaderTheme, props: ModalHeaderProps, state: ModalHeaderStyleProps) => ModalHeaderStyle;
|
|
38
14
|
export default generateStyle;
|
|
39
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,gBAAgB,SACzB,gBAAgB,SAChB,qBAAqB,KAC3B,gBAmCF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Modal/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAWzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAM3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC;;;;;GAKG;AACH,cAEM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MA6BlB;IAED,MAAM,CAAC,MAAM,qBAAc;IAC3B,MAAM,CAAC,IAAI,mBAAY;IACvB,MAAM,CAAC,MAAM,qBAAc;gBAGf,KAAK,KAAA;IAQjB,QAAQ,EAAE,UAAU,CAAO;IAE3B,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAWjD,IAAI,mBAAmB,mHAEtB;IAED,IAAI,OAAO,IAYK,UAAU,CAVzB;IAED,IAAI,aAAa,yBAMhB;IAED,IAAI,OAAO,CAAC,EAAE,EAAE,UAAU,EAEzB;IAED,gBAAgB,YAAa,UAAU,UAEtC;IAED,sBAAsB,aAIrB;IAGD,UAAU,oBAMT;IAED,cAAc;IAqBd,YAAY,CAAC,KAAK,KAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Modal/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAWzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAM3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC;;;;;GAKG;AACH,cAEM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MA6BlB;IAED,MAAM,CAAC,MAAM,qBAAc;IAC3B,MAAM,CAAC,IAAI,mBAAY;IACvB,MAAM,CAAC,MAAM,qBAAc;gBAGf,KAAK,KAAA;IAQjB,QAAQ,EAAE,UAAU,CAAO;IAE3B,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAWjD,IAAI,mBAAmB,mHAEtB;IAED,IAAI,OAAO,IAYK,UAAU,CAVzB;IAED,IAAI,aAAa,yBAMhB;IAED,IAAI,OAAO,CAAC,EAAE,EAAE,UAAU,EAEzB;IAED,gBAAgB,YAAa,UAAU,UAEtC;IAED,sBAAsB,aAIrB;IAGD,UAAU,oBAMT;IAED,cAAc;IAqBd,YAAY,CAAC,KAAK,KAAA;IAgDlB,MAAM;CA0DP;AAED,eAAe,KAAK,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,CAAA"}
|
package/types/Modal/props.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
|
+
import type { AsElementType, PropValidators, ModalTheme } from '@instructure/shared-types';
|
|
3
3
|
import type { PortalNode } from '@instructure/ui-portal';
|
|
4
4
|
import type { PositionMountNode } from '@instructure/ui-position';
|
|
5
5
|
import type { TransitionType } from '@instructure/ui-motion';
|
|
6
|
-
import type { WithStyleProps } from '@instructure/emotion';
|
|
6
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
7
7
|
declare type ModalOwnProps = {
|
|
8
8
|
label: string;
|
|
9
9
|
children: React.ReactNode;
|
|
@@ -33,9 +33,10 @@ declare type ModalOwnProps = {
|
|
|
33
33
|
};
|
|
34
34
|
declare type PropKeys = keyof ModalOwnProps;
|
|
35
35
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
36
|
-
declare type ModalProps = ModalOwnProps & WithStyleProps
|
|
36
|
+
declare type ModalProps = ModalOwnProps & WithStyleProps<ModalTheme, ModalStyle>;
|
|
37
|
+
declare type ModalStyle = ComponentStyle<'modal' | 'constrainContext'>;
|
|
37
38
|
declare const propTypes: PropValidators<PropKeys>;
|
|
38
39
|
declare const allowedProps: AllowedPropKeys;
|
|
39
|
-
export type { ModalProps };
|
|
40
|
+
export type { ModalProps, ModalStyle };
|
|
40
41
|
export { propTypes, allowedProps };
|
|
41
42
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Modal/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Modal/props.ts"],"names":[],"mappings":"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"}
|
package/types/Modal/styles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModalTheme } from '@instructure/shared-types';
|
|
2
|
-
import { ModalProps } from './props';
|
|
1
|
+
import type { ModalTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { ModalProps, ModalStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,99 +10,6 @@ import { ModalProps } 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: ModalTheme, props: ModalProps) =>
|
|
14
|
-
modal: {
|
|
15
|
-
background: string;
|
|
16
|
-
color: string;
|
|
17
|
-
transform?: string | undefined;
|
|
18
|
-
maxWidth: string;
|
|
19
|
-
maxHeight: string;
|
|
20
|
-
flex: string;
|
|
21
|
-
minWidth: string;
|
|
22
|
-
label: string;
|
|
23
|
-
fontFamily: string;
|
|
24
|
-
display: string;
|
|
25
|
-
flexDirection: string;
|
|
26
|
-
position: string;
|
|
27
|
-
boxSizing: string;
|
|
28
|
-
boxShadow: string;
|
|
29
|
-
border: string;
|
|
30
|
-
borderRadius: string | 0;
|
|
31
|
-
} | {
|
|
32
|
-
background: string;
|
|
33
|
-
color: string;
|
|
34
|
-
transform?: string | undefined;
|
|
35
|
-
maxWidth: string;
|
|
36
|
-
maxHeight: string;
|
|
37
|
-
flex: string;
|
|
38
|
-
label: string;
|
|
39
|
-
fontFamily: string;
|
|
40
|
-
display: string;
|
|
41
|
-
minWidth: string;
|
|
42
|
-
flexDirection: string;
|
|
43
|
-
position: string;
|
|
44
|
-
boxSizing: string;
|
|
45
|
-
boxShadow: string;
|
|
46
|
-
border: string;
|
|
47
|
-
borderRadius: string | 0;
|
|
48
|
-
} | {
|
|
49
|
-
background: string;
|
|
50
|
-
color: string;
|
|
51
|
-
transform?: string | undefined;
|
|
52
|
-
maxWidth: string;
|
|
53
|
-
maxHeight: string;
|
|
54
|
-
flex: string;
|
|
55
|
-
label: string;
|
|
56
|
-
fontFamily: string;
|
|
57
|
-
display: string;
|
|
58
|
-
minWidth: string;
|
|
59
|
-
flexDirection: string;
|
|
60
|
-
position: string;
|
|
61
|
-
boxSizing: string;
|
|
62
|
-
boxShadow: string;
|
|
63
|
-
border: string;
|
|
64
|
-
borderRadius: string | 0;
|
|
65
|
-
} | {
|
|
66
|
-
background: string;
|
|
67
|
-
color: string;
|
|
68
|
-
transform?: string | undefined;
|
|
69
|
-
maxWidth: string;
|
|
70
|
-
maxHeight: string;
|
|
71
|
-
flex: string;
|
|
72
|
-
label: string;
|
|
73
|
-
fontFamily: string;
|
|
74
|
-
display: string;
|
|
75
|
-
minWidth: string;
|
|
76
|
-
flexDirection: string;
|
|
77
|
-
position: string;
|
|
78
|
-
boxSizing: string;
|
|
79
|
-
boxShadow: string;
|
|
80
|
-
border: string;
|
|
81
|
-
borderRadius: string | 0;
|
|
82
|
-
} | {
|
|
83
|
-
background: string;
|
|
84
|
-
color: string;
|
|
85
|
-
flex: number;
|
|
86
|
-
width: string;
|
|
87
|
-
height: string;
|
|
88
|
-
boxShadow: string;
|
|
89
|
-
border: string;
|
|
90
|
-
borderRadius: number;
|
|
91
|
-
label: string;
|
|
92
|
-
fontFamily: string;
|
|
93
|
-
display: string;
|
|
94
|
-
minWidth: string;
|
|
95
|
-
flexDirection: string;
|
|
96
|
-
position: string;
|
|
97
|
-
boxSizing: string;
|
|
98
|
-
};
|
|
99
|
-
constrainContext: {
|
|
100
|
-
label: string;
|
|
101
|
-
display: string;
|
|
102
|
-
position: string;
|
|
103
|
-
width: string;
|
|
104
|
-
height: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: ModalTheme, props: ModalProps) => ModalStyle;
|
|
107
14
|
export default generateStyle;
|
|
108
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Modal/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Modal/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAErD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,UAAU,SACnB,UAAU,KAChB,UAwEF,CAAA;AAED,eAAe,aAAa,CAAA"}
|