@semcore/modal 16.1.6 → 16.1.7-prerelease.2
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 +10 -10
- package/lib/types/index.d.ts +1 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
package/lib/cjs/Modal.js
CHANGED
|
@@ -36,17 +36,17 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
36
36
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
37
37
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
38
38
|
/*!__reshadow-styles__:"./style/modal.shadow.css"*/
|
|
39
|
-
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
39
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SWindow_r53dh_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_r53dh_gg_:focus{outline:0}.___SWindow_r53dh_gg_ .___STitle_r53dh_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_r53dh_gg_ .___STitle_r53dh_gg_.__color_r53dh_gg_{color:var(--color_r53dh)}.___SWindow_r53dh_gg_ .___SClose_r53dh_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_r53dh_gg_ .___SClose_r53dh_gg_.__ghost_r53dh_gg_{right:0;top:0}.___SWindow_r53dh_gg_.__ghost_r53dh_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlayContentWrapper_r53dh_gg_{flex:1;max-width:100%;box-sizing:border-box;padding:var(--intergalactic-spacing-10x, 40px)}.___SOverlay_r53dh_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_r53dh_gg_ .___SOverlay_r53dh_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_r53dh_gg_{min-width:60%}.___SOverlayContentWrapper_r53dh_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}", /*__inner_css_end__*/"r53dh_gg_"),
|
|
40
40
|
/*__reshadow_css_end__*/
|
|
41
41
|
{
|
|
42
|
-
"__SWindow": "
|
|
43
|
-
"_ghost": "
|
|
44
|
-
"__SOverlayContentWrapper": "
|
|
45
|
-
"__STitle": "
|
|
46
|
-
"_color": "
|
|
47
|
-
"--color": "--
|
|
48
|
-
"__SClose": "
|
|
49
|
-
"__SOverlay": "
|
|
42
|
+
"__SWindow": "___SWindow_r53dh_gg_",
|
|
43
|
+
"_ghost": "__ghost_r53dh_gg_",
|
|
44
|
+
"__SOverlayContentWrapper": "___SOverlayContentWrapper_r53dh_gg_",
|
|
45
|
+
"__STitle": "___STitle_r53dh_gg_",
|
|
46
|
+
"_color": "__color_r53dh_gg_",
|
|
47
|
+
"--color": "--color_r53dh",
|
|
48
|
+
"__SClose": "___SClose_r53dh_gg_",
|
|
49
|
+
"__SOverlay": "___SOverlay_r53dh_gg_"
|
|
50
50
|
});
|
|
51
51
|
var ModalRoot = /*#__PURE__*/function (_Component) {
|
|
52
52
|
function ModalRoot() {
|
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 } from '@semcore/animation';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { Box, BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\nimport type { TextProps } from '@semcore/typography';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IModalProps extends ModalProps, UnknownProperties {}\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
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps, SlideProps } from '@semcore/animation';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { Box, BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\nimport type { TextProps } from '@semcore/typography';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IModalProps extends ModalProps, UnknownProperties {}\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\n/** @deprecated */\nexport interface IWindowProps extends WindowProps, UnknownProperties {}\nexport type WindowProps = BoxProps & SlideProps & {};\n\n/** @deprecated */\nexport interface IModalContext extends ModalContext, UnknownProperties {}\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', TextProps>;\n};\n\nexport default Modal;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/Modal.js
CHANGED
|
@@ -33,17 +33,17 @@ import Portal, { PortalProvider } from '@semcore/portal';
|
|
|
33
33
|
import { Text } from '@semcore/typography';
|
|
34
34
|
import React from 'react';
|
|
35
35
|
/*!__reshadow-styles__:"./style/modal.shadow.css"*/
|
|
36
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
36
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SWindow_r53dh_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_r53dh_gg_:focus{outline:0}.___SWindow_r53dh_gg_ .___STitle_r53dh_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_r53dh_gg_ .___STitle_r53dh_gg_.__color_r53dh_gg_{color:var(--color_r53dh)}.___SWindow_r53dh_gg_ .___SClose_r53dh_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_r53dh_gg_ .___SClose_r53dh_gg_.__ghost_r53dh_gg_{right:0;top:0}.___SWindow_r53dh_gg_.__ghost_r53dh_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlayContentWrapper_r53dh_gg_{flex:1;max-width:100%;box-sizing:border-box;padding:var(--intergalactic-spacing-10x, 40px)}.___SOverlay_r53dh_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_r53dh_gg_ .___SOverlay_r53dh_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_r53dh_gg_{min-width:60%}.___SOverlayContentWrapper_r53dh_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}", /*__inner_css_end__*/"r53dh_gg_"),
|
|
37
37
|
/*__reshadow_css_end__*/
|
|
38
38
|
{
|
|
39
|
-
"__SWindow": "
|
|
40
|
-
"_ghost": "
|
|
41
|
-
"__SOverlayContentWrapper": "
|
|
42
|
-
"__STitle": "
|
|
43
|
-
"_color": "
|
|
44
|
-
"--color": "--
|
|
45
|
-
"__SClose": "
|
|
46
|
-
"__SOverlay": "
|
|
39
|
+
"__SWindow": "___SWindow_r53dh_gg_",
|
|
40
|
+
"_ghost": "__ghost_r53dh_gg_",
|
|
41
|
+
"__SOverlayContentWrapper": "___SOverlayContentWrapper_r53dh_gg_",
|
|
42
|
+
"__STitle": "___STitle_r53dh_gg_",
|
|
43
|
+
"_color": "__color_r53dh_gg_",
|
|
44
|
+
"--color": "--color_r53dh",
|
|
45
|
+
"__SClose": "___SClose_r53dh_gg_",
|
|
46
|
+
"__SOverlay": "___SOverlay_r53dh_gg_"
|
|
47
47
|
});
|
|
48
48
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
49
49
|
var ModalRoot = /*#__PURE__*/function (_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 } from '@semcore/animation';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { Box, BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\nimport type { TextProps } from '@semcore/typography';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IModalProps extends ModalProps, UnknownProperties {}\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
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps, SlideProps } from '@semcore/animation';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { Box, BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\nimport type { TextProps } from '@semcore/typography';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IModalProps extends ModalProps, UnknownProperties {}\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\n/** @deprecated */\nexport interface IWindowProps extends WindowProps, UnknownProperties {}\nexport type WindowProps = BoxProps & SlideProps & {};\n\n/** @deprecated */\nexport interface IModalContext extends ModalContext, UnknownProperties {}\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', TextProps>;\n};\n\nexport default Modal;\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/Modal.mjs
CHANGED
|
@@ -34,19 +34,19 @@ var style = (
|
|
|
34
34
|
/*__reshadow_css_start__*/
|
|
35
35
|
(sstyled.insert(
|
|
36
36
|
/*__inner_css_start__*/
|
|
37
|
-
".
|
|
37
|
+
".___SWindow_r53dh_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_r53dh_gg_:focus{outline:0}.___SWindow_r53dh_gg_ .___STitle_r53dh_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_r53dh_gg_ .___STitle_r53dh_gg_.__color_r53dh_gg_{color:var(--color_r53dh)}.___SWindow_r53dh_gg_ .___SClose_r53dh_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_r53dh_gg_ .___SClose_r53dh_gg_.__ghost_r53dh_gg_{right:0;top:0}.___SWindow_r53dh_gg_.__ghost_r53dh_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlayContentWrapper_r53dh_gg_{flex:1;max-width:100%;box-sizing:border-box;padding:var(--intergalactic-spacing-10x, 40px)}.___SOverlay_r53dh_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_r53dh_gg_ .___SOverlay_r53dh_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_r53dh_gg_{min-width:60%}.___SOverlayContentWrapper_r53dh_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}",
|
|
38
38
|
/*__inner_css_end__*/
|
|
39
|
-
"
|
|
39
|
+
"r53dh_gg_"
|
|
40
40
|
), /*__reshadow_css_end__*/
|
|
41
41
|
{
|
|
42
|
-
"__SWindow": "
|
|
43
|
-
"_ghost": "
|
|
44
|
-
"__SOverlayContentWrapper": "
|
|
45
|
-
"__STitle": "
|
|
46
|
-
"_color": "
|
|
47
|
-
"--color": "--
|
|
48
|
-
"__SClose": "
|
|
49
|
-
"__SOverlay": "
|
|
42
|
+
"__SWindow": "___SWindow_r53dh_gg_",
|
|
43
|
+
"_ghost": "__ghost_r53dh_gg_",
|
|
44
|
+
"__SOverlayContentWrapper": "___SOverlayContentWrapper_r53dh_gg_",
|
|
45
|
+
"__STitle": "___STitle_r53dh_gg_",
|
|
46
|
+
"_color": "__color_r53dh_gg_",
|
|
47
|
+
"--color": "--color_r53dh",
|
|
48
|
+
"__SClose": "___SClose_r53dh_gg_",
|
|
49
|
+
"__SOverlay": "___SOverlay_r53dh_gg_"
|
|
50
50
|
})
|
|
51
51
|
);
|
|
52
52
|
var ModalRoot = /* @__PURE__ */ function(_Component) {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -31,9 +31,8 @@ export type ModalProps = PortalProps &
|
|
|
31
31
|
* @default false
|
|
32
32
|
*/
|
|
33
33
|
disablePreventScroll?: boolean;
|
|
34
|
-
|
|
34
|
+
/** Specifies the locale for i18n support */
|
|
35
35
|
locale?: string;
|
|
36
|
-
|
|
37
36
|
/**
|
|
38
37
|
* Props for render modal without background and paddings. Useful in carousel for example
|
|
39
38
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/modal",
|
|
3
3
|
"description": "Semrush Modal Component",
|
|
4
|
-
"version": "16.1.
|
|
4
|
+
"version": "16.1.7-prerelease.2",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "16.0.
|
|
18
|
-
"@semcore/icon": "16.
|
|
19
|
-
"@semcore/typography": "16.2.
|
|
20
|
-
"@semcore/animation": "16.0.
|
|
21
|
-
"@semcore/flex-box": "16.0.
|
|
22
|
-
"@semcore/outside-click": "16.0.
|
|
23
|
-
"@semcore/portal": "16.0.
|
|
17
|
+
"@semcore/button": "16.0.7-prerelease.2",
|
|
18
|
+
"@semcore/icon": "16.6.0-prerelease.2",
|
|
19
|
+
"@semcore/typography": "16.2.1-prerelease.2",
|
|
20
|
+
"@semcore/animation": "16.0.5-prerelease.2",
|
|
21
|
+
"@semcore/flex-box": "16.0.7-prerelease.2",
|
|
22
|
+
"@semcore/outside-click": "16.0.7-prerelease.2",
|
|
23
|
+
"@semcore/portal": "16.0.7-prerelease.2"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@semcore/base-components": "^16.
|
|
26
|
+
"@semcore/base-components": "^16.2.1-prerelease.2"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"directory": "semcore/modal"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@semcore/core": "16.
|
|
34
|
+
"@semcore/core": "16.1.1-prerelease.2",
|
|
35
35
|
"@semcore/testing-utils": "1.0.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|