@instructure/ui-modal 8.11.2-snapshot.7 → 8.11.2-snapshot.70

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.
@@ -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
- return true;
74
+ hasCloseButton = true;
74
75
  }
75
76
  });
76
- return false;
77
+ return hasCloseButton;
77
78
  }
78
79
 
79
80
  render() {
@@ -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
- return true;
71
+ hasCloseButton = true;
70
72
  }
71
73
  });
72
74
 
73
- return false;
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.11.2-snapshot.7+2681e145a",
3
+ "version": "8.11.2-snapshot.70+9653a896e",
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.11.2-snapshot.7+2681e145a",
29
- "@instructure/emotion": "8.11.2-snapshot.7+2681e145a",
30
- "@instructure/shared-types": "8.11.2-snapshot.7+2681e145a",
31
- "@instructure/ui-buttons": "8.11.2-snapshot.7+2681e145a",
32
- "@instructure/ui-dialog": "8.11.2-snapshot.7+2681e145a",
33
- "@instructure/ui-motion": "8.11.2-snapshot.7+2681e145a",
34
- "@instructure/ui-overlays": "8.11.2-snapshot.7+2681e145a",
35
- "@instructure/ui-portal": "8.11.2-snapshot.7+2681e145a",
36
- "@instructure/ui-prop-types": "8.11.2-snapshot.7+2681e145a",
37
- "@instructure/ui-react-utils": "8.11.2-snapshot.7+2681e145a",
38
- "@instructure/ui-testable": "8.11.2-snapshot.7+2681e145a",
39
- "@instructure/ui-utils": "8.11.2-snapshot.7+2681e145a",
40
- "@instructure/ui-view": "8.11.2-snapshot.7+2681e145a",
28
+ "@instructure/console": "8.11.2-snapshot.70+9653a896e",
29
+ "@instructure/emotion": "8.11.2-snapshot.70+9653a896e",
30
+ "@instructure/shared-types": "8.11.2-snapshot.70+9653a896e",
31
+ "@instructure/ui-buttons": "8.11.2-snapshot.70+9653a896e",
32
+ "@instructure/ui-dialog": "8.11.2-snapshot.70+9653a896e",
33
+ "@instructure/ui-motion": "8.11.2-snapshot.70+9653a896e",
34
+ "@instructure/ui-overlays": "8.11.2-snapshot.70+9653a896e",
35
+ "@instructure/ui-portal": "8.11.2-snapshot.70+9653a896e",
36
+ "@instructure/ui-prop-types": "8.11.2-snapshot.70+9653a896e",
37
+ "@instructure/ui-react-utils": "8.11.2-snapshot.70+9653a896e",
38
+ "@instructure/ui-testable": "8.11.2-snapshot.70+9653a896e",
39
+ "@instructure/ui-utils": "8.11.2-snapshot.70+9653a896e",
40
+ "@instructure/ui-view": "8.11.2-snapshot.70+9653a896e",
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.11.2-snapshot.7+2681e145a",
48
- "@instructure/ui-color-utils": "8.11.2-snapshot.7+2681e145a",
49
- "@instructure/ui-position": "8.11.2-snapshot.7+2681e145a",
50
- "@instructure/ui-test-locator": "8.11.2-snapshot.7+2681e145a",
51
- "@instructure/ui-test-utils": "8.11.2-snapshot.7+2681e145a",
52
- "@instructure/ui-themes": "8.11.2-snapshot.7+2681e145a"
47
+ "@instructure/ui-babel-preset": "8.11.2-snapshot.70+9653a896e",
48
+ "@instructure/ui-color-utils": "8.11.2-snapshot.70+9653a896e",
49
+ "@instructure/ui-position": "8.11.2-snapshot.70+9653a896e",
50
+ "@instructure/ui-test-locator": "8.11.2-snapshot.70+9653a896e",
51
+ "@instructure/ui-test-utils": "8.11.2-snapshot.70+9653a896e",
52
+ "@instructure/ui-themes": "8.11.2-snapshot.70+9653a896e"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
57
  "sideEffects": false,
58
- "gitHead": "2681e145ad469e1396536d3e9eed75a19995eb8a"
58
+ "gitHead": "9653a896e80ba4d73335225e80807746a232d96d"
59
59
  }
@@ -82,13 +82,15 @@ class ModalHeader extends Component<ModalHeaderProps> {
82
82
  }
83
83
 
84
84
  get usesCloseButton() {
85
- // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value.
85
+ let hasCloseButton = false
86
+
86
87
  React.Children.forEach(this.props.children, (child) => {
87
88
  if (child && matchComponentTypes(child, [CloseButton])) {
88
- return true
89
+ hasCloseButton = true
89
90
  }
90
91
  })
91
- return false
92
+
93
+ return hasCloseButton
92
94
  }
93
95
 
94
96
  render() {
@@ -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,QA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AAE,CAAA"}
@@ -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;