@instructure/ui-modal 8.11.2-snapshot.7 → 8.12.0
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 +6 -0
- package/es/Modal/ModalHeader/index.js +3 -2
- package/es/package.json +1 -0
- package/lib/Modal/ModalHeader/index.js +4 -2
- package/package.json +21 -22
- package/src/Modal/ModalHeader/index.tsx +5 -3
- package/src/Modal/README.md +2 -2
- package/types/Modal/ModalHeader/index.d.ts.map +1 -1
- package/types/Modal/index.d.ts +2 -2
- package/LICENSE.md +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **ui-modal:** fix Modal.Header padding when it has CloseButton ([82b8314](https://github.com/instructure/instructure-ui/commit/82b8314a5ce13ef30c3f03125b1e2104ba81c889))
|
|
11
|
+
|
|
6
12
|
## [8.11.1](https://github.com/instructure/instructure-ui/compare/v8.11.0...v8.11.1) (2021-10-19)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @instructure/ui-modal
|
|
@@ -68,12 +68,13 @@ let ModalHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
get usesCloseButton() {
|
|
71
|
+
let hasCloseButton = false;
|
|
71
72
|
React.Children.forEach(this.props.children, child => {
|
|
72
73
|
if (child && matchComponentTypes(child, [CloseButton])) {
|
|
73
|
-
|
|
74
|
+
hasCloseButton = true;
|
|
74
75
|
}
|
|
75
76
|
});
|
|
76
|
-
return
|
|
77
|
+
return hasCloseButton;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
render() {
|
package/es/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -64,13 +64,15 @@ let ModalHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
get usesCloseButton() {
|
|
67
|
+
let hasCloseButton = false;
|
|
68
|
+
|
|
67
69
|
_react.default.Children.forEach(this.props.children, child => {
|
|
68
70
|
if (child && (0, _matchComponentTypes.matchComponentTypes)(child, [_CloseButton.CloseButton])) {
|
|
69
|
-
|
|
71
|
+
hasCloseButton = true;
|
|
70
72
|
}
|
|
71
73
|
});
|
|
72
74
|
|
|
73
|
-
return
|
|
75
|
+
return hasCloseButton;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
render() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-modal",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.12.0",
|
|
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,34 @@
|
|
|
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.12.0",
|
|
29
|
+
"@instructure/emotion": "8.12.0",
|
|
30
|
+
"@instructure/shared-types": "8.12.0",
|
|
31
|
+
"@instructure/ui-buttons": "8.12.0",
|
|
32
|
+
"@instructure/ui-dialog": "8.12.0",
|
|
33
|
+
"@instructure/ui-motion": "8.12.0",
|
|
34
|
+
"@instructure/ui-overlays": "8.12.0",
|
|
35
|
+
"@instructure/ui-portal": "8.12.0",
|
|
36
|
+
"@instructure/ui-prop-types": "8.12.0",
|
|
37
|
+
"@instructure/ui-react-utils": "8.12.0",
|
|
38
|
+
"@instructure/ui-testable": "8.12.0",
|
|
39
|
+
"@instructure/ui-utils": "8.12.0",
|
|
40
|
+
"@instructure/ui-view": "8.12.0",
|
|
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.12.0",
|
|
48
|
+
"@instructure/ui-color-utils": "8.12.0",
|
|
49
|
+
"@instructure/ui-position": "8.12.0",
|
|
50
|
+
"@instructure/ui-test-locator": "8.12.0",
|
|
51
|
+
"@instructure/ui-test-utils": "8.12.0",
|
|
52
|
+
"@instructure/ui-themes": "8.12.0"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"sideEffects": false
|
|
58
|
-
"gitHead": "2681e145ad469e1396536d3e9eed75a19995eb8a"
|
|
57
|
+
"sideEffects": false
|
|
59
58
|
}
|
|
@@ -82,13 +82,15 @@ class ModalHeader extends Component<ModalHeaderProps> {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
get usesCloseButton() {
|
|
85
|
-
|
|
85
|
+
let hasCloseButton = false
|
|
86
|
+
|
|
86
87
|
React.Children.forEach(this.props.children, (child) => {
|
|
87
88
|
if (child && matchComponentTypes(child, [CloseButton])) {
|
|
88
|
-
|
|
89
|
+
hasCloseButton = true
|
|
89
90
|
}
|
|
90
91
|
})
|
|
91
|
-
|
|
92
|
+
|
|
93
|
+
return hasCloseButton
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
render() {
|
package/src/Modal/README.md
CHANGED
|
@@ -483,8 +483,8 @@ class Example extends React.Component {
|
|
|
483
483
|
<Modal.Header spacing={this.state.smallViewport ? 'compact' : 'default'}>
|
|
484
484
|
{this.renderCloseButton()}
|
|
485
485
|
{this.state.smallViewport
|
|
486
|
-
? <
|
|
487
|
-
: <Heading>This is a deafult size Modal</Heading>
|
|
486
|
+
? <Heading as="h2" level="h3" themeOverride={{ h3FontWeight: 400 }}>This Modal is optimized for small viewport</Heading>
|
|
487
|
+
: <Heading as="h2">This is a deafult size Modal</Heading>
|
|
488
488
|
}
|
|
489
489
|
</Modal.Header>
|
|
490
490
|
<Modal.Body>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEtE;;;;;GAKG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;MAIlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,cAAc,QAAO,qBAAqB,CAIzC;IAED,IAAI,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEtE;;;;;GAKG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;MAIlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,cAAc,QAAO,qBAAqB,CAIzC;IAED,IAAI,eAAe,YAUlB;IAED,MAAM;CAaP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/types/Modal/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare class Modal extends Component<ModalProps> {
|
|
|
31
31
|
mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
|
|
32
32
|
insertAt?: "bottom" | "top" | undefined;
|
|
33
33
|
liveRegion?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
|
|
34
|
-
transition?: import("@instructure/ui-motion/types/Transition/props").TransitionType | undefined;
|
|
34
|
+
transition?: import("@instructure/ui-motion/types/Transition/BaseTransition/props").TransitionType | undefined;
|
|
35
35
|
onEnter?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
onEntering?: ((...args: any[]) => any) | undefined;
|
|
37
37
|
onEntered?: ((...args: any[]) => any) | undefined;
|
|
@@ -58,7 +58,7 @@ declare class Modal extends Component<ModalProps> {
|
|
|
58
58
|
mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
|
|
59
59
|
insertAt?: "bottom" | "top" | undefined;
|
|
60
60
|
liveRegion?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
|
|
61
|
-
transition?: import("@instructure/ui-motion/types/Transition/props").TransitionType | undefined;
|
|
61
|
+
transition?: import("@instructure/ui-motion/types/Transition/BaseTransition/props").TransitionType | undefined;
|
|
62
62
|
onEnter?: ((...args: any[]) => any) | undefined;
|
|
63
63
|
onEntering?: ((...args: any[]) => any) | undefined;
|
|
64
64
|
onEntered?: ((...args: any[]) => any) | undefined;
|
package/LICENSE.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: The MIT License (MIT)
|
|
3
|
-
category: Getting Started
|
|
4
|
-
order: 9
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
-
|
|
11
|
-
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions.**
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in all
|
|
19
|
-
copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
-
SOFTWARE.
|