@semcore/modal 17.0.0-prerelease.43 → 17.0.1-prerelease.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/lib/cjs/Modal.js +9 -9
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/Modal.js +9 -9
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/Modal.mjs +11 -10
- package/lib/types/index.d.ts +2 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
package/lib/cjs/Modal.js
CHANGED
|
@@ -24,17 +24,17 @@ var _typography = require("@semcore/typography");
|
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
25
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
26
26
|
/*!__reshadow-styles__:"./style/modal.shadow.css"*/
|
|
27
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
27
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SWindow_1kkiv_gg_{position:relative;border-radius:var(--intergalactic-modal-rounded, 12px);background:var(--intergalactic-bg-primary-neutral, #ffffff);box-sizing:border-box;margin:auto;padding:var(--intergalactic-spacing-10x, 40px);box-shadow:var(--intergalactic-box-shadow-modal, 0px 3px 8px 0px rgba(25, 27, 35, 0.2));color:var(--intergalactic-text-primary, #191b23)}.___SWindow_1kkiv_gg_:focus{outline:0}.___SWindow_1kkiv_gg_ .___STitle_1kkiv_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%);font-weight:var(--intergalactic-semi-bold, 600);margin-bottom:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-4x, 16px)}.___SWindow_1kkiv_gg_ .___STitle_1kkiv_gg_.__color_1kkiv_gg_{color:var(--color_1kkiv)}.___SWindow_1kkiv_gg_ .___SClose_1kkiv_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1kkiv_gg_ .___SClose_1kkiv_gg_.__ghost_1kkiv_gg_{right:0;top:0}.___SWindow_1kkiv_gg_.__ghost_1kkiv_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlayContentWrapper_1kkiv_gg_{flex:1;max-width:100%;box-sizing:border-box;padding:var(--intergalactic-spacing-10x, 40px)}.___SOverlay_1kkiv_gg_{display:flex;justify-content:center;flex-wrap:wrap;position:fixed;top:0;bottom:0;left:0;right:0;margin:0;background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));overflow:auto;-webkit-overflow-scrolling:touch}.___SOverlay_1kkiv_gg_ .___SOverlay_1kkiv_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1kkiv_gg_{min-width:60%}.___SOverlayContentWrapper_1kkiv_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}", /*__inner_css_end__*/"1kkiv_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SWindow": "
|
|
31
|
-
"_ghost": "
|
|
32
|
-
"__SOverlayContentWrapper": "
|
|
33
|
-
"__STitle": "
|
|
34
|
-
"_color": "
|
|
35
|
-
"--color": "--
|
|
36
|
-
"__SClose": "
|
|
37
|
-
"__SOverlay": "
|
|
30
|
+
"__SWindow": "___SWindow_1kkiv_gg_",
|
|
31
|
+
"_ghost": "__ghost_1kkiv_gg_",
|
|
32
|
+
"__SOverlayContentWrapper": "___SOverlayContentWrapper_1kkiv_gg_",
|
|
33
|
+
"__STitle": "___STitle_1kkiv_gg_",
|
|
34
|
+
"_color": "__color_1kkiv_gg_",
|
|
35
|
+
"--color": "--color_1kkiv",
|
|
36
|
+
"__SClose": "___SClose_1kkiv_gg_",
|
|
37
|
+
"__SOverlay": "___SOverlay_1kkiv_gg_"
|
|
38
38
|
});
|
|
39
39
|
class ModalRoot extends _core.Component {
|
|
40
40
|
constructor(...args) {
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps, SlideProps, Box, BoxProps, PortalProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps, SlideProps, Box, BoxProps, PortalProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSText } from '@semcore/typography';\nimport type React from 'react';\n\nexport type ModalProps = PortalProps &\n BoxProps &\n FadeInOutProps & {\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 * Setting `true` disables mechanism that hides document body scrollbar when Modal is visible\n * @default false\n */\n disablePreventScroll?: boolean;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Props for render modal without background and paddings. Useful in carousel for example\n */\n ghost?: boolean;\n };\n\nexport type WindowProps = BoxProps & SlideProps & {};\n\nexport type ModalContext = {\n getOverlayProps: PropGetterFn;\n getWindowProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n};\n\ndeclare const Modal: Intergalactic.Component<'div', ModalProps, ModalContext> & {\n Window: Intergalactic.Component<'div', WindowProps>;\n Overlay: typeof Box;\n Close: typeof Button;\n Title: Intergalactic.Component<'div', NSText.Props>;\n};\n\nexport default Modal;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/Modal.js
CHANGED
|
@@ -22,17 +22,17 @@ import CloseIcon from '@semcore/icon/Close/l';
|
|
|
22
22
|
import { Text } from '@semcore/typography';
|
|
23
23
|
import React from 'react';
|
|
24
24
|
/*!__reshadow-styles__:"./style/modal.shadow.css"*/
|
|
25
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
25
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SWindow_1kkiv_gg_{position:relative;border-radius:var(--intergalactic-modal-rounded, 12px);background:var(--intergalactic-bg-primary-neutral, #ffffff);box-sizing:border-box;margin:auto;padding:var(--intergalactic-spacing-10x, 40px);box-shadow:var(--intergalactic-box-shadow-modal, 0px 3px 8px 0px rgba(25, 27, 35, 0.2));color:var(--intergalactic-text-primary, #191b23)}.___SWindow_1kkiv_gg_:focus{outline:0}.___SWindow_1kkiv_gg_ .___STitle_1kkiv_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%);font-weight:var(--intergalactic-semi-bold, 600);margin-bottom:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-4x, 16px)}.___SWindow_1kkiv_gg_ .___STitle_1kkiv_gg_.__color_1kkiv_gg_{color:var(--color_1kkiv)}.___SWindow_1kkiv_gg_ .___SClose_1kkiv_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1kkiv_gg_ .___SClose_1kkiv_gg_.__ghost_1kkiv_gg_{right:0;top:0}.___SWindow_1kkiv_gg_.__ghost_1kkiv_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlayContentWrapper_1kkiv_gg_{flex:1;max-width:100%;box-sizing:border-box;padding:var(--intergalactic-spacing-10x, 40px)}.___SOverlay_1kkiv_gg_{display:flex;justify-content:center;flex-wrap:wrap;position:fixed;top:0;bottom:0;left:0;right:0;margin:0;background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));overflow:auto;-webkit-overflow-scrolling:touch}.___SOverlay_1kkiv_gg_ .___SOverlay_1kkiv_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1kkiv_gg_{min-width:60%}.___SOverlayContentWrapper_1kkiv_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}", /*__inner_css_end__*/"1kkiv_gg_"),
|
|
26
26
|
/*__reshadow_css_end__*/
|
|
27
27
|
{
|
|
28
|
-
"__SWindow": "
|
|
29
|
-
"_ghost": "
|
|
30
|
-
"__SOverlayContentWrapper": "
|
|
31
|
-
"__STitle": "
|
|
32
|
-
"_color": "
|
|
33
|
-
"--color": "--
|
|
34
|
-
"__SClose": "
|
|
35
|
-
"__SOverlay": "
|
|
28
|
+
"__SWindow": "___SWindow_1kkiv_gg_",
|
|
29
|
+
"_ghost": "__ghost_1kkiv_gg_",
|
|
30
|
+
"__SOverlayContentWrapper": "___SOverlayContentWrapper_1kkiv_gg_",
|
|
31
|
+
"__STitle": "___STitle_1kkiv_gg_",
|
|
32
|
+
"_color": "__color_1kkiv_gg_",
|
|
33
|
+
"--color": "--color_1kkiv",
|
|
34
|
+
"__SClose": "___SClose_1kkiv_gg_",
|
|
35
|
+
"__SOverlay": "___SOverlay_1kkiv_gg_"
|
|
36
36
|
});
|
|
37
37
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
38
38
|
class ModalRoot extends Component {
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps, SlideProps, Box, BoxProps, PortalProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps, SlideProps, Box, BoxProps, PortalProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSText } from '@semcore/typography';\nimport type React from 'react';\n\nexport type ModalProps = PortalProps &\n BoxProps &\n FadeInOutProps & {\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 * Setting `true` disables mechanism that hides document body scrollbar when Modal is visible\n * @default false\n */\n disablePreventScroll?: boolean;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Props for render modal without background and paddings. Useful in carousel for example\n */\n ghost?: boolean;\n };\n\nexport type WindowProps = BoxProps & SlideProps & {};\n\nexport type ModalContext = {\n getOverlayProps: PropGetterFn;\n getWindowProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n};\n\ndeclare const Modal: Intergalactic.Component<'div', ModalProps, ModalContext> & {\n Window: Intergalactic.Component<'div', WindowProps>;\n Overlay: typeof Box;\n Close: typeof Button;\n Title: Intergalactic.Component<'div', NSText.Props>;\n};\n\nexport default Modal;\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/Modal.mjs
CHANGED
|
@@ -16,23 +16,24 @@ import CloseIcon from "@semcore/icon/Close/l";
|
|
|
16
16
|
import { Text } from "@semcore/typography";
|
|
17
17
|
import React from "react";
|
|
18
18
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
19
|
+
/*!__reshadow-styles__:"./style/modal.shadow.css"*/
|
|
19
20
|
const style = (
|
|
20
21
|
/*__reshadow_css_start__*/
|
|
21
22
|
(sstyled.insert(
|
|
22
23
|
/*__inner_css_start__*/
|
|
23
|
-
".
|
|
24
|
+
".___SWindow_1kkiv_gg_{position:relative;border-radius:var(--intergalactic-modal-rounded, 12px);background:var(--intergalactic-bg-primary-neutral, #ffffff);box-sizing:border-box;margin:auto;padding:var(--intergalactic-spacing-10x, 40px);box-shadow:var(--intergalactic-box-shadow-modal, 0px 3px 8px 0px rgba(25, 27, 35, 0.2));color:var(--intergalactic-text-primary, #191b23)}.___SWindow_1kkiv_gg_:focus{outline:0}.___SWindow_1kkiv_gg_ .___STitle_1kkiv_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%);font-weight:var(--intergalactic-semi-bold, 600);margin-bottom:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-4x, 16px)}.___SWindow_1kkiv_gg_ .___STitle_1kkiv_gg_.__color_1kkiv_gg_{color:var(--color_1kkiv)}.___SWindow_1kkiv_gg_ .___SClose_1kkiv_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1kkiv_gg_ .___SClose_1kkiv_gg_.__ghost_1kkiv_gg_{right:0;top:0}.___SWindow_1kkiv_gg_.__ghost_1kkiv_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlayContentWrapper_1kkiv_gg_{flex:1;max-width:100%;box-sizing:border-box;padding:var(--intergalactic-spacing-10x, 40px)}.___SOverlay_1kkiv_gg_{display:flex;justify-content:center;flex-wrap:wrap;position:fixed;top:0;bottom:0;left:0;right:0;margin:0;background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));overflow:auto;-webkit-overflow-scrolling:touch}.___SOverlay_1kkiv_gg_ .___SOverlay_1kkiv_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1kkiv_gg_{min-width:60%}.___SOverlayContentWrapper_1kkiv_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}",
|
|
24
25
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
26
|
+
"1kkiv_gg_"
|
|
26
27
|
), /*__reshadow_css_end__*/
|
|
27
28
|
{
|
|
28
|
-
"__SWindow": "
|
|
29
|
-
"_ghost": "
|
|
30
|
-
"__SOverlayContentWrapper": "
|
|
31
|
-
"__STitle": "
|
|
32
|
-
"_color": "
|
|
33
|
-
"--color": "--
|
|
34
|
-
"__SClose": "
|
|
35
|
-
"__SOverlay": "
|
|
29
|
+
"__SWindow": "___SWindow_1kkiv_gg_",
|
|
30
|
+
"_ghost": "__ghost_1kkiv_gg_",
|
|
31
|
+
"__SOverlayContentWrapper": "___SOverlayContentWrapper_1kkiv_gg_",
|
|
32
|
+
"__STitle": "___STitle_1kkiv_gg_",
|
|
33
|
+
"_color": "__color_1kkiv_gg_",
|
|
34
|
+
"--color": "--color_1kkiv",
|
|
35
|
+
"__SClose": "___SClose_1kkiv_gg_",
|
|
36
|
+
"__SOverlay": "___SOverlay_1kkiv_gg_"
|
|
36
37
|
})
|
|
37
38
|
);
|
|
38
39
|
class ModalRoot extends Component {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FadeInOutProps, SlideProps, Box, BoxProps, PortalProps } from '@semcore/base-components';
|
|
2
2
|
import type Button from '@semcore/button';
|
|
3
3
|
import type { PropGetterFn, Intergalactic } from '@semcore/core';
|
|
4
|
-
import type {
|
|
4
|
+
import type { NSText } from '@semcore/typography';
|
|
5
5
|
import type React from 'react';
|
|
6
6
|
|
|
7
7
|
export type ModalProps = PortalProps &
|
|
@@ -47,7 +47,7 @@ declare const Modal: Intergalactic.Component<'div', ModalProps, ModalContext> &
|
|
|
47
47
|
Window: Intergalactic.Component<'div', WindowProps>;
|
|
48
48
|
Overlay: typeof Box;
|
|
49
49
|
Close: typeof Button;
|
|
50
|
-
Title: Intergalactic.Component<'div',
|
|
50
|
+
Title: Intergalactic.Component<'div', NSText.Props>;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export default Modal;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/modal",
|
|
3
3
|
"description": "Semrush Modal Component",
|
|
4
|
-
"version": "17.0.
|
|
4
|
+
"version": "17.0.1-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"require": "./lib/cjs/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "^17.0.
|
|
18
|
-
"@semcore/typography": "^17.0.
|
|
17
|
+
"@semcore/button": "^17.0.1-prerelease.0",
|
|
18
|
+
"@semcore/typography": "^17.0.2-prerelease.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@semcore/base-components": "^17.0.
|
|
22
|
-
"@semcore/icon": "^17.0.
|
|
21
|
+
"@semcore/base-components": "^17.0.2",
|
|
22
|
+
"@semcore/icon": "^17.0.1"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"directory": "semcore/modal"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@semcore/core": "17.0.
|
|
31
|
-
"@semcore/base-components": "17.0.
|
|
30
|
+
"@semcore/core": "17.0.1",
|
|
31
|
+
"@semcore/base-components": "17.0.2-prerelease.0",
|
|
32
32
|
"@semcore/testing-utils": "1.0.0",
|
|
33
|
-
"@semcore/icon": "17.0.
|
|
33
|
+
"@semcore/icon": "17.0.1-prerelease.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|