@semcore/modal 3.0.20 → 3.0.22
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 +12 -0
- package/lib/cjs/Modal.js +6 -6
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/es6/Modal.js +6 -6
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/package.json +3 -2
- package/lib/cjs/index.d.ts +0 -37
- package/lib/es6/index.d.ts +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.0.22] - 2022-10-03
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.32.0 ~> 2.32.1]).
|
|
10
|
+
|
|
11
|
+
## [3.0.21] - 2022-10-03
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.31.0 ~> 2.32.0]).
|
|
16
|
+
|
|
5
17
|
## [3.0.20] - 2022-09-29
|
|
6
18
|
|
|
7
19
|
### Changed
|
package/lib/cjs/Modal.js
CHANGED
|
@@ -70,15 +70,15 @@ var style = (
|
|
|
70
70
|
/*__reshadow_css_start__*/
|
|
71
71
|
_core.sstyled.insert(
|
|
72
72
|
/*__inner_css_start__*/
|
|
73
|
-
".
|
|
73
|
+
".___SWindow_uvabr_gg_{position:relative;border-radius:12px;background:#ffffff;box-sizing:border-box;margin:auto;padding:40px;box-shadow:0 3px 8px rgba(25,27,35,.2)}.___SWindow_uvabr_gg_:focus{outline:none}.___SOverlay_uvabr_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;justify-content:center;align-items:center;padding:40px;background:rgba(25,27,35,.7);overflow:auto;z-index:10005;-webkit-overflow-scrolling:touch}.___SOverlay_uvabr_gg_ .___SOverlay_uvabr_gg_{background:rgba(25,27,35,.4)}.___SClose_uvabr_gg_{display:inline-flex;position:absolute;right:0;top:0;padding:12px;color:#a9abb6;cursor:pointer;z-index:1;border:none;background:none;outline:none}.___SClose_uvabr_gg_:hover{color:#8a8e9b}.___SClose_uvabr_gg_.__keyboardFocused_uvabr_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}@media (max-width:767px){.___SWindow_uvabr_gg_{min-width:60%}.___SOverlay_uvabr_gg_{padding:12px}}"
|
|
74
74
|
/*__inner_css_end__*/
|
|
75
|
-
, "
|
|
75
|
+
, "uvabr_gg_")
|
|
76
76
|
/*__reshadow_css_end__*/
|
|
77
77
|
, {
|
|
78
|
-
"__SWindow": "
|
|
79
|
-
"__SOverlay": "
|
|
80
|
-
"__SClose": "
|
|
81
|
-
"_keyboardFocused": "
|
|
78
|
+
"__SWindow": "___SWindow_uvabr_gg_",
|
|
79
|
+
"__SOverlay": "___SOverlay_uvabr_gg_",
|
|
80
|
+
"__SClose": "___SClose_uvabr_gg_",
|
|
81
|
+
"_keyboardFocused": "__keyboardFocused_uvabr_gg_"
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
var ModalRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { IFadeInOutProps } from '@semcore/animation';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IPortalProps } from '@semcore/portal';\nimport { Box, IBoxProps } from '@semcore/flex-box';\n\nexport interface IModalProps extends IPortalProps, IBoxProps, IFadeInOutProps {\n /** Duration of animation, ms\n * @default 200\n */\n duration?: number;\n /** This property is responsible for the visibility of the modal window */\n visible?: boolean;\n /** Function called when the component is hidden */\n onClose?: (\n trigger: 'onOutsideClick' | 'onCloseClick' | 'onEscape',\n e?: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n /** Displaying the close button(x) in the upper-right corner of the modal dialog\n * @default true\n * */\n closable?: boolean;\n}\n\nexport interface IModalContext {\n getOverlayProps: PropGetterFn;\n getWindowProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n}\n\ndeclare const Modal: (<T>(props: CProps<IModalProps & T, IModalContext>) => ReturnEl) & {\n Window: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Overlay: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Close: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n};\n\nexport default Modal;\n"],"mappings":""}
|
package/lib/es6/Modal.js
CHANGED
|
@@ -40,15 +40,15 @@ var style = (
|
|
|
40
40
|
/*__reshadow_css_start__*/
|
|
41
41
|
_sstyled.insert(
|
|
42
42
|
/*__inner_css_start__*/
|
|
43
|
-
".
|
|
43
|
+
".___SWindow_uvabr_gg_{position:relative;border-radius:12px;background:#ffffff;box-sizing:border-box;margin:auto;padding:40px;box-shadow:0 3px 8px rgba(25,27,35,.2)}.___SWindow_uvabr_gg_:focus{outline:none}.___SOverlay_uvabr_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;justify-content:center;align-items:center;padding:40px;background:rgba(25,27,35,.7);overflow:auto;z-index:10005;-webkit-overflow-scrolling:touch}.___SOverlay_uvabr_gg_ .___SOverlay_uvabr_gg_{background:rgba(25,27,35,.4)}.___SClose_uvabr_gg_{display:inline-flex;position:absolute;right:0;top:0;padding:12px;color:#a9abb6;cursor:pointer;z-index:1;border:none;background:none;outline:none}.___SClose_uvabr_gg_:hover{color:#8a8e9b}.___SClose_uvabr_gg_.__keyboardFocused_uvabr_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}@media (max-width:767px){.___SWindow_uvabr_gg_{min-width:60%}.___SOverlay_uvabr_gg_{padding:12px}}"
|
|
44
44
|
/*__inner_css_end__*/
|
|
45
|
-
, "
|
|
45
|
+
, "uvabr_gg_")
|
|
46
46
|
/*__reshadow_css_end__*/
|
|
47
47
|
, {
|
|
48
|
-
"__SWindow": "
|
|
49
|
-
"__SOverlay": "
|
|
50
|
-
"__SClose": "
|
|
51
|
-
"_keyboardFocused": "
|
|
48
|
+
"__SWindow": "___SWindow_uvabr_gg_",
|
|
49
|
+
"__SOverlay": "___SOverlay_uvabr_gg_",
|
|
50
|
+
"__SClose": "___SClose_uvabr_gg_",
|
|
51
|
+
"_keyboardFocused": "__keyboardFocused_uvabr_gg_"
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
var ModalRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { IFadeInOutProps } from '@semcore/animation';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IPortalProps } from '@semcore/portal';\nimport { Box, IBoxProps } from '@semcore/flex-box';\n\nexport interface IModalProps extends IPortalProps, IBoxProps, IFadeInOutProps {\n /** Duration of animation, ms\n * @default 200\n */\n duration?: number;\n /** This property is responsible for the visibility of the modal window */\n visible?: boolean;\n /** Function called when the component is hidden */\n onClose?: (\n trigger: 'onOutsideClick' | 'onCloseClick' | 'onEscape',\n e?: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n /** Displaying the close button(x) in the upper-right corner of the modal dialog\n * @default true\n * */\n closable?: boolean;\n}\n\nexport interface IModalContext {\n getOverlayProps: PropGetterFn;\n getWindowProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n}\n\ndeclare const Modal: (<T>(props: CProps<IModalProps & T, IModalContext>) => ReturnEl) & {\n Window: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Overlay: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Close: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n};\n\nexport default Modal;\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/modal",
|
|
3
3
|
"description": "Semrush Modal Component",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.22",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "pnpm semcore-builder --source=js",
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"directory": "semcore/modal"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
+
"@types/react": "16.8 - 17",
|
|
37
38
|
"@guidepup/playwright": "0.6.1",
|
|
38
39
|
"@playwright/test": "1.25.1",
|
|
39
40
|
"@semcore/jest-preset-ui": "1.0.0"
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { IFadeInOutProps } from '@semcore/animation';
|
|
3
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
4
|
-
import { IPortalProps } from '@semcore/portal';
|
|
5
|
-
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
6
|
-
|
|
7
|
-
export interface IModalProps extends IPortalProps, IBoxProps, IFadeInOutProps {
|
|
8
|
-
/** Duration of animation, ms
|
|
9
|
-
* @default 200
|
|
10
|
-
*/
|
|
11
|
-
duration?: number;
|
|
12
|
-
/** This property is responsible for the visibility of the modal window */
|
|
13
|
-
visible?: boolean;
|
|
14
|
-
/** Function called when the component is hidden */
|
|
15
|
-
onClose?: (
|
|
16
|
-
trigger: 'onOutsideClick' | 'onCloseClick' | 'onEscape',
|
|
17
|
-
e?: React.MouseEvent | React.KeyboardEvent,
|
|
18
|
-
) => void;
|
|
19
|
-
/** Displaying the close button(x) in the upper-right corner of the modal dialog
|
|
20
|
-
* @default true
|
|
21
|
-
* */
|
|
22
|
-
closable?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface IModalContext {
|
|
26
|
-
getOverlayProps: PropGetterFn;
|
|
27
|
-
getWindowProps: PropGetterFn;
|
|
28
|
-
getCloseProps: PropGetterFn;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare const Modal: (<T>(props: CProps<IModalProps & T, IModalContext>) => ReturnEl) & {
|
|
32
|
-
Window: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
33
|
-
Overlay: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
34
|
-
Close: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default Modal;
|
package/lib/es6/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { IFadeInOutProps } from '@semcore/animation';
|
|
3
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
4
|
-
import { IPortalProps } from '@semcore/portal';
|
|
5
|
-
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
6
|
-
|
|
7
|
-
export interface IModalProps extends IPortalProps, IBoxProps, IFadeInOutProps {
|
|
8
|
-
/** Duration of animation, ms
|
|
9
|
-
* @default 200
|
|
10
|
-
*/
|
|
11
|
-
duration?: number;
|
|
12
|
-
/** This property is responsible for the visibility of the modal window */
|
|
13
|
-
visible?: boolean;
|
|
14
|
-
/** Function called when the component is hidden */
|
|
15
|
-
onClose?: (
|
|
16
|
-
trigger: 'onOutsideClick' | 'onCloseClick' | 'onEscape',
|
|
17
|
-
e?: React.MouseEvent | React.KeyboardEvent,
|
|
18
|
-
) => void;
|
|
19
|
-
/** Displaying the close button(x) in the upper-right corner of the modal dialog
|
|
20
|
-
* @default true
|
|
21
|
-
* */
|
|
22
|
-
closable?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface IModalContext {
|
|
26
|
-
getOverlayProps: PropGetterFn;
|
|
27
|
-
getWindowProps: PropGetterFn;
|
|
28
|
-
getCloseProps: PropGetterFn;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare const Modal: (<T>(props: CProps<IModalProps & T, IModalContext>) => ReturnEl) & {
|
|
32
|
-
Window: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
33
|
-
Overlay: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
34
|
-
Close: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default Modal;
|