@semcore/fullscreen-modal 1.6.3 → 1.6.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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [1.6.4] - 2022-04-28
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/icon` [2.20.0 ~> 2.21.0]).
10
+
5
11
  ## [1.6.3] - 2022-03-21
6
12
 
7
13
  ### Changed
@@ -119,7 +119,7 @@ var FullscreenModalRoot = /*#__PURE__*/function (_Component) {
119
119
  }, {
120
120
  key: "render",
121
121
  value: function render() {
122
- var _ref = this ? this.asProps : arguments[0],
122
+ var _ref = this.asProps,
123
123
  _ref10;
124
124
 
125
125
  var SFullscreenModal = _modal["default"].Window;
@@ -153,7 +153,7 @@ var FullscreenModalRoot = /*#__PURE__*/function (_Component) {
153
153
  (0, _defineProperty2["default"])(FullscreenModalRoot, "style", style);
154
154
 
155
155
  function Header(props) {
156
- var _ref2 = this ? this.asProps : arguments[0],
156
+ var _ref2 = arguments[0],
157
157
  _ref11;
158
158
 
159
159
  var SHeader = _flexBox.Box;
@@ -170,7 +170,7 @@ function Header(props) {
170
170
  }
171
171
 
172
172
  function Body(props) {
173
- var _ref3 = this ? this.asProps : arguments[0],
173
+ var _ref3 = arguments[0],
174
174
  _ref12;
175
175
 
176
176
  var SBody = _flexBox.Box;
@@ -178,7 +178,7 @@ function Body(props) {
178
178
  }
179
179
 
180
180
  function Section(props) {
181
- var _ref4 = this ? this.asProps : arguments[0],
181
+ var _ref4 = arguments[0],
182
182
  _ref13;
183
183
 
184
184
  var SSection = _flexBox.Box;
@@ -186,7 +186,7 @@ function Section(props) {
186
186
  }
187
187
 
188
188
  function Footer(props) {
189
- var _ref5 = this ? this.asProps : arguments[0],
189
+ var _ref5 = arguments[0],
190
190
  _ref14;
191
191
 
192
192
  var SFooter = _flexBox.Box;
@@ -194,7 +194,7 @@ function Footer(props) {
194
194
  }
195
195
 
196
196
  function Close(props) {
197
- var _ref6 = this ? this.asProps : arguments[0],
197
+ var _ref6 = arguments[0],
198
198
  _ref15;
199
199
 
200
200
  var SClose = _l["default"];
@@ -202,7 +202,7 @@ function Close(props) {
202
202
  }
203
203
 
204
204
  function Title(props) {
205
- var _ref7 = this ? this.asProps : arguments[0],
205
+ var _ref7 = arguments[0],
206
206
  _ref16;
207
207
 
208
208
  var STitle = _typography.Text;
@@ -212,7 +212,7 @@ function Title(props) {
212
212
  }
213
213
 
214
214
  function Description(props) {
215
- var _ref8 = this ? this.asProps : arguments[0],
215
+ var _ref8 = arguments[0],
216
216
  _ref17;
217
217
 
218
218
  var SDescription = _typography.Text;
@@ -220,7 +220,7 @@ function Description(props) {
220
220
  }
221
221
 
222
222
  function Back(props) {
223
- var _ref9 = this ? this.asProps : arguments[0],
223
+ var _ref9 = arguments[0],
224
224
  _ref18;
225
225
 
226
226
  var SBack = _flexBox.Box;
@@ -0,0 +1,41 @@
1
+ import { ComponentProps } from 'react';
2
+ import { ReturnEl, CProps, PropGetterFn } from '@semcore/core';
3
+ import { IModalProps } from '@semcore/modal';
4
+ import { Box, IBoxProps } from '@semcore/flex-box';
5
+ import { IIconProps } from '@semcore/icon';
6
+ import { Text } from '@semcore/typography';
7
+
8
+ export interface IFullscreenModalProps extends IModalProps {
9
+ /** This property is responsible for the visibility of the modal window */
10
+ hidden?: boolean;
11
+ /** Function that is invoked when hiding a component */
12
+ onClose?: (
13
+ trigger: 'onBackClick' | 'onCloseClick' | 'onEscape' | 'onOutsideClick',
14
+ e?: React.MouseEvent | React.KeyboardEvent,
15
+ ) => void;
16
+ }
17
+
18
+ export interface IFullscreenModalHeaderProps extends IBoxProps {
19
+ title?: React.ReactNode;
20
+ description?: React.ReactNode;
21
+ }
22
+
23
+ export interface IFullscreenModalContext {
24
+ getBackProps: PropGetterFn;
25
+ getCloseProps: PropGetterFn;
26
+ }
27
+
28
+ declare const FullscreenModal: (<T>(
29
+ props: CProps<IFullscreenModalProps & T, IFullscreenModalContext>,
30
+ ) => ReturnEl) & {
31
+ Header: <T>(props: IFullscreenModalHeaderProps & T) => ReturnEl;
32
+ Footer: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
33
+ Close: <T>(props: IIconProps & T) => ReturnEl;
34
+ Back: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
35
+ Body: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
36
+ Section: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
37
+ Title: <T>(props: ComponentProps<typeof Text> & T) => ReturnEl;
38
+ Description: <T>(props: ComponentProps<typeof Text> & T) => ReturnEl;
39
+ };
40
+
41
+ export default FullscreenModal;
package/lib/cjs/index.js CHANGED
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _typeof = require("@babel/runtime/helpers/typeof");
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- var _exportNames = {};
9
8
  Object.defineProperty(exports, "default", {
10
9
  enumerable: true,
11
10
  get: function get() {
@@ -13,21 +12,5 @@ Object.defineProperty(exports, "default", {
13
12
  }
14
13
  });
15
14
 
16
- var _FullscreenModal = _interopRequireWildcard(require("./FullscreenModal"));
17
-
18
- Object.keys(_FullscreenModal).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
21
- if (key in exports && exports[key] === _FullscreenModal[key]) return;
22
- Object.defineProperty(exports, key, {
23
- enumerable: true,
24
- get: function get() {
25
- return _FullscreenModal[key];
26
- }
27
- });
28
- });
29
-
30
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
-
32
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ var _FullscreenModal = _interopRequireDefault(require("./FullscreenModal"));
33
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export { default } from './FullscreenModal';\nexport * from './FullscreenModal';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './FullscreenModal';\n"],"file":"index.js"}
@@ -102,7 +102,7 @@ var FullscreenModalRoot = /*#__PURE__*/function (_Component) {
102
102
  }, {
103
103
  key: "render",
104
104
  value: function render() {
105
- var _ref = this ? this.asProps : arguments[0],
105
+ var _ref = this.asProps,
106
106
  _ref10;
107
107
 
108
108
  var SFullscreenModal = Modal.Window;
@@ -136,7 +136,7 @@ _defineProperty(FullscreenModalRoot, "displayName", 'FullscreenModal');
136
136
  _defineProperty(FullscreenModalRoot, "style", style);
137
137
 
138
138
  function Header(props) {
139
- var _ref2 = this ? this.asProps : arguments[0],
139
+ var _ref2 = arguments[0],
140
140
  _ref11;
141
141
 
142
142
  var SHeader = Box;
@@ -153,7 +153,7 @@ function Header(props) {
153
153
  }
154
154
 
155
155
  function Body(props) {
156
- var _ref3 = this ? this.asProps : arguments[0],
156
+ var _ref3 = arguments[0],
157
157
  _ref12;
158
158
 
159
159
  var SBody = Box;
@@ -161,7 +161,7 @@ function Body(props) {
161
161
  }
162
162
 
163
163
  function Section(props) {
164
- var _ref4 = this ? this.asProps : arguments[0],
164
+ var _ref4 = arguments[0],
165
165
  _ref13;
166
166
 
167
167
  var SSection = Box;
@@ -169,7 +169,7 @@ function Section(props) {
169
169
  }
170
170
 
171
171
  function Footer(props) {
172
- var _ref5 = this ? this.asProps : arguments[0],
172
+ var _ref5 = arguments[0],
173
173
  _ref14;
174
174
 
175
175
  var SFooter = Box;
@@ -177,7 +177,7 @@ function Footer(props) {
177
177
  }
178
178
 
179
179
  function Close(props) {
180
- var _ref6 = this ? this.asProps : arguments[0],
180
+ var _ref6 = arguments[0],
181
181
  _ref15;
182
182
 
183
183
  var SClose = CloseIcon;
@@ -185,7 +185,7 @@ function Close(props) {
185
185
  }
186
186
 
187
187
  function Title(props) {
188
- var _ref7 = this ? this.asProps : arguments[0],
188
+ var _ref7 = arguments[0],
189
189
  _ref16;
190
190
 
191
191
  var STitle = Text;
@@ -195,7 +195,7 @@ function Title(props) {
195
195
  }
196
196
 
197
197
  function Description(props) {
198
- var _ref8 = this ? this.asProps : arguments[0],
198
+ var _ref8 = arguments[0],
199
199
  _ref17;
200
200
 
201
201
  var SDescription = Text;
@@ -203,7 +203,7 @@ function Description(props) {
203
203
  }
204
204
 
205
205
  function Back(props) {
206
- var _ref9 = this ? this.asProps : arguments[0],
206
+ var _ref9 = arguments[0],
207
207
  _ref18;
208
208
 
209
209
  var SBack = Box;
@@ -0,0 +1,41 @@
1
+ import { ComponentProps } from 'react';
2
+ import { ReturnEl, CProps, PropGetterFn } from '@semcore/core';
3
+ import { IModalProps } from '@semcore/modal';
4
+ import { Box, IBoxProps } from '@semcore/flex-box';
5
+ import { IIconProps } from '@semcore/icon';
6
+ import { Text } from '@semcore/typography';
7
+
8
+ export interface IFullscreenModalProps extends IModalProps {
9
+ /** This property is responsible for the visibility of the modal window */
10
+ hidden?: boolean;
11
+ /** Function that is invoked when hiding a component */
12
+ onClose?: (
13
+ trigger: 'onBackClick' | 'onCloseClick' | 'onEscape' | 'onOutsideClick',
14
+ e?: React.MouseEvent | React.KeyboardEvent,
15
+ ) => void;
16
+ }
17
+
18
+ export interface IFullscreenModalHeaderProps extends IBoxProps {
19
+ title?: React.ReactNode;
20
+ description?: React.ReactNode;
21
+ }
22
+
23
+ export interface IFullscreenModalContext {
24
+ getBackProps: PropGetterFn;
25
+ getCloseProps: PropGetterFn;
26
+ }
27
+
28
+ declare const FullscreenModal: (<T>(
29
+ props: CProps<IFullscreenModalProps & T, IFullscreenModalContext>,
30
+ ) => ReturnEl) & {
31
+ Header: <T>(props: IFullscreenModalHeaderProps & T) => ReturnEl;
32
+ Footer: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
33
+ Close: <T>(props: IIconProps & T) => ReturnEl;
34
+ Back: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
35
+ Body: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
36
+ Section: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
37
+ Title: <T>(props: ComponentProps<typeof Text> & T) => ReturnEl;
38
+ Description: <T>(props: ComponentProps<typeof Text> & T) => ReturnEl;
39
+ };
40
+
41
+ export default FullscreenModal;
package/lib/es6/index.js CHANGED
@@ -1,3 +1,2 @@
1
1
  export { default } from './FullscreenModal';
2
- export * from './FullscreenModal';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,mBAAxB;AACA,cAAc,mBAAd","sourcesContent":["export { default } from './FullscreenModal';\nexport * from './FullscreenModal';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,mBAAxB","sourcesContent":["export { default } from './FullscreenModal';\n"],"file":"index.js"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/fullscreen-modal",
3
3
  "description": "SEMRush FullscreenModal Component",
4
- "version": "1.6.3",
4
+ "version": "1.6.4",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -30,5 +30,8 @@
30
30
  "type": "git",
31
31
  "url": "https://github.com/semrush/intergalactic.git",
32
32
  "directory": "semcore/fullscreen-modal"
33
+ },
34
+ "devDependencies": {
35
+ "@semcore/jest-preset-ui": "1.0.0"
33
36
  }
34
37
  }
package/src/index.js CHANGED
@@ -1,2 +1 @@
1
1
  export { default } from './FullscreenModal';
2
- export * from './FullscreenModal';