@semcore/modal 4.43.0 → 4.44.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 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
+ ## [4.44.0] - 2024-08-23
6
+
7
+ ### Changed
8
+
9
+ - Version minor update due to children dependencies update (`@semcore/icon` [4.43.2 ~> 4.44.0]).
10
+
5
11
  ## [4.43.0] - 2024-07-29
6
12
 
7
13
  ### Changed
package/lib/cjs/Modal.js CHANGED
@@ -35,14 +35,14 @@ var _ThemeProvider = require("@semcore/utils/lib/ThemeProvider");
35
35
  var _useColorResolver = require("@semcore/utils/lib/use/useColorResolver");
36
36
  var _zIndexStacking = require("@semcore/utils/lib/zIndexStacking");
37
37
  /*__reshadow-styles__:"./style/modal.shadow.css"*/
38
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWindow_cc9lm_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_cc9lm_gg_:focus{outline:0}.___SWindow_cc9lm_gg_ .___STitle_cc9lm_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_cc9lm_gg_ .___STitle_cc9lm_gg_.__color_cc9lm_gg_{color:var(--color_cc9lm)}.___SWindow_cc9lm_gg_.__ghost_cc9lm_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_cc9lm_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;justify-content:center;align-items:center;padding:var(--intergalactic-spacing-10x, 40px);background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));overflow:auto;-webkit-overflow-scrolling:touch}.___SOverlay_cc9lm_gg_ .___SOverlay_cc9lm_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}.___SClose_cc9lm_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_cc9lm_gg_.__ghost_cc9lm_gg_{right:0;top:0}@media (max-width:767px){.___SWindow_cc9lm_gg_{min-width:60%}.___SOverlay_cc9lm_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "cc9lm_gg_") /*__reshadow_css_end__*/, {
39
- "__SWindow": "___SWindow_cc9lm_gg_",
40
- "_ghost": "__ghost_cc9lm_gg_",
41
- "__SClose": "___SClose_cc9lm_gg_",
42
- "__SOverlay": "___SOverlay_cc9lm_gg_",
43
- "__STitle": "___STitle_cc9lm_gg_",
44
- "_color": "__color_cc9lm_gg_",
45
- "--color": "--color_cc9lm"
38
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWindow_17g4e_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_17g4e_gg_:focus{outline:0}.___SWindow_17g4e_gg_ .___STitle_17g4e_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_17g4e_gg_ .___STitle_17g4e_gg_.__color_17g4e_gg_{color:var(--color_17g4e)}.___SWindow_17g4e_gg_.__ghost_17g4e_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_17g4e_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;justify-content:center;align-items:center;padding:var(--intergalactic-spacing-10x, 40px);background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));overflow:auto;-webkit-overflow-scrolling:touch}.___SOverlay_17g4e_gg_ .___SOverlay_17g4e_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}.___SClose_17g4e_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_17g4e_gg_.__ghost_17g4e_gg_{right:0;top:0}@media (max-width:767px){.___SWindow_17g4e_gg_{min-width:60%}.___SOverlay_17g4e_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "17g4e_gg_") /*__reshadow_css_end__*/, {
39
+ "__SWindow": "___SWindow_17g4e_gg_",
40
+ "_ghost": "__ghost_17g4e_gg_",
41
+ "__SClose": "___SClose_17g4e_gg_",
42
+ "__SOverlay": "___SOverlay_17g4e_gg_",
43
+ "__STitle": "___STitle_17g4e_gg_",
44
+ "_color": "__color_17g4e_gg_",
45
+ "--color": "--color_17g4e"
46
46
  });
47
47
  var ModalRoot = /*#__PURE__*/function (_Component) {
48
48
  (0, _inherits2["default"])(ModalRoot, _Component);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { FadeInOutProps, SlideProps } from '@semcore/animation';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { PortalProps } from '@semcore/portal';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { TextProps } from '@semcore/typography';\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\n locale?: string;\n\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 Box;\n Title: Intergalactic.Component<'div', TextProps>;\n};\n\nexport default Modal;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { FadeInOutProps, SlideProps } from '@semcore/animation';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { PortalProps } from '@semcore/portal';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { TextProps } from '@semcore/typography';\nimport Button from '@semcore/button';\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\n locale?: string;\n\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":""}
package/lib/es6/Modal.js CHANGED
@@ -23,14 +23,14 @@ import usePreventScroll from '@semcore/utils/lib/use/usePreventScroll';
23
23
  import { isAdvanceMode } from '@semcore/utils/lib/findComponent';
24
24
  import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
25
25
  /*__reshadow-styles__:"./style/modal.shadow.css"*/
26
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SWindow_cc9lm_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_cc9lm_gg_:focus{outline:0}.___SWindow_cc9lm_gg_ .___STitle_cc9lm_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_cc9lm_gg_ .___STitle_cc9lm_gg_.__color_cc9lm_gg_{color:var(--color_cc9lm)}.___SWindow_cc9lm_gg_.__ghost_cc9lm_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_cc9lm_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;justify-content:center;align-items:center;padding:var(--intergalactic-spacing-10x, 40px);background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));overflow:auto;-webkit-overflow-scrolling:touch}.___SOverlay_cc9lm_gg_ .___SOverlay_cc9lm_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}.___SClose_cc9lm_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_cc9lm_gg_.__ghost_cc9lm_gg_{right:0;top:0}@media (max-width:767px){.___SWindow_cc9lm_gg_{min-width:60%}.___SOverlay_cc9lm_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "cc9lm_gg_") /*__reshadow_css_end__*/, {
27
- "__SWindow": "___SWindow_cc9lm_gg_",
28
- "_ghost": "__ghost_cc9lm_gg_",
29
- "__SClose": "___SClose_cc9lm_gg_",
30
- "__SOverlay": "___SOverlay_cc9lm_gg_",
31
- "__STitle": "___STitle_cc9lm_gg_",
32
- "_color": "__color_cc9lm_gg_",
33
- "--color": "--color_cc9lm"
26
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SWindow_17g4e_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_17g4e_gg_:focus{outline:0}.___SWindow_17g4e_gg_ .___STitle_17g4e_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_17g4e_gg_ .___STitle_17g4e_gg_.__color_17g4e_gg_{color:var(--color_17g4e)}.___SWindow_17g4e_gg_.__ghost_17g4e_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_17g4e_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;justify-content:center;align-items:center;padding:var(--intergalactic-spacing-10x, 40px);background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));overflow:auto;-webkit-overflow-scrolling:touch}.___SOverlay_17g4e_gg_ .___SOverlay_17g4e_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}.___SClose_17g4e_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_17g4e_gg_.__ghost_17g4e_gg_{right:0;top:0}@media (max-width:767px){.___SWindow_17g4e_gg_{min-width:60%}.___SOverlay_17g4e_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "17g4e_gg_") /*__reshadow_css_end__*/, {
27
+ "__SWindow": "___SWindow_17g4e_gg_",
28
+ "_ghost": "__ghost_17g4e_gg_",
29
+ "__SClose": "___SClose_17g4e_gg_",
30
+ "__SOverlay": "___SOverlay_17g4e_gg_",
31
+ "__STitle": "___STitle_17g4e_gg_",
32
+ "_color": "__color_17g4e_gg_",
33
+ "--color": "--color_17g4e"
34
34
  });
35
35
  import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
36
36
  import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { FadeInOutProps, SlideProps } from '@semcore/animation';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { PortalProps } from '@semcore/portal';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { TextProps } from '@semcore/typography';\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\n locale?: string;\n\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 Box;\n Title: Intergalactic.Component<'div', TextProps>;\n};\n\nexport default Modal;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { FadeInOutProps, SlideProps } from '@semcore/animation';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { PortalProps } from '@semcore/portal';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { TextProps } from '@semcore/typography';\nimport Button from '@semcore/button';\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\n locale?: string;\n\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":""}
@@ -4,6 +4,7 @@ import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
4
4
  import { PortalProps } from '@semcore/portal';
5
5
  import { Box, BoxProps } from '@semcore/flex-box';
6
6
  import { TextProps } from '@semcore/typography';
7
+ import Button from '@semcore/button';
7
8
 
8
9
  /** @deprecated */
9
10
  export interface IModalProps extends ModalProps, UnknownProperties {}
@@ -54,7 +55,7 @@ export type ModalContext = {
54
55
  declare const Modal: Intergalactic.Component<'div', ModalProps, ModalContext> & {
55
56
  Window: Intergalactic.Component<'div', WindowProps>;
56
57
  Overlay: typeof Box;
57
- Close: typeof Box;
58
+ Close: typeof Button;
58
59
  Title: Intergalactic.Component<'div', TextProps>;
59
60
  };
60
61
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/modal",
3
3
  "description": "Semrush Modal Component",
4
- "version": "4.43.0",
4
+ "version": "4.44.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -11,10 +11,10 @@
11
11
  "dependencies": {
12
12
  "@semcore/animation": "2.31.2",
13
13
  "@semcore/flex-box": "5.31.2",
14
- "@semcore/icon": "4.43.2",
14
+ "@semcore/icon": "4.44.0",
15
15
  "@semcore/outside-click": "3.29.2",
16
16
  "@semcore/portal": "3.31.2",
17
- "@semcore/typography": "5.40.2",
17
+ "@semcore/typography": "5.41.0",
18
18
  "@semcore/utils": "4.32.2"
19
19
  },
20
20
  "peerDependencies": {