@semcore/modal 4.56.2 → 4.57.0-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 +56 -61
- package/lib/cjs/Modal.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/modal.shadow.css +19 -12
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/Modal.js +50 -52
- package/lib/es6/Modal.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/modal.shadow.css +19 -12
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/Modal.mjs +54 -57
- package/lib/esm/style/modal.shadow.css +19 -12
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/types/index.d.ts +7 -16
- package/package.json +10 -10
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
SWindow {
|
|
2
2
|
position: relative;
|
|
3
|
-
border-radius: var(--intergalactic-modal-rounded, 12px);
|
|
4
|
-
background: var(--intergalactic-bg-primary-neutral,
|
|
3
|
+
border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px));
|
|
4
|
+
background: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
margin: auto;
|
|
7
7
|
padding: var(--intergalactic-spacing-10x, 40px);
|
|
8
|
-
box-shadow: var(--intergalactic-box-shadow-modal, 0px
|
|
9
|
-
color: var(--intergalactic-text-primary,
|
|
8
|
+
box-shadow: var(--intergalactic-box-shadow-modal, 0px 1px 5px 0px oklch(0.176 0.033 175.7 / 0.07));
|
|
9
|
+
color: var(--intergalactic-text-primary, oklch(0.1 0.03 137 / 0.899));
|
|
10
10
|
|
|
11
11
|
&:focus {
|
|
12
12
|
outline: none;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
STitle {
|
|
16
|
-
color: var(--intergalactic-text-primary,
|
|
16
|
+
color: var(--intergalactic-text-primary, oklch(0.1 0.03 137 / 0.899));
|
|
17
17
|
font-size: var(--intergalactic-fs-500, 24px);
|
|
18
18
|
line-height: var(--intergalactic-lh-500, 117%);
|
|
19
19
|
font-weight: var(--intergalactic-semi-bold, 600);
|
|
@@ -43,24 +43,31 @@ SWindow[ghost] {
|
|
|
43
43
|
box-shadow: none;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
SOverlayContentWrapper {
|
|
47
|
+
flex: 1;
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
padding: var(--intergalactic-spacing-10x, 40px);
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
SOverlay {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
flex-wrap: wrap;
|
|
47
57
|
position: fixed;
|
|
48
58
|
top: 0;
|
|
49
59
|
bottom: 0;
|
|
50
60
|
left: 0;
|
|
51
61
|
right: 0;
|
|
52
62
|
margin: 0;
|
|
53
|
-
|
|
54
|
-
justify-content: center;
|
|
55
|
-
align-items: center;
|
|
56
|
-
padding: var(--intergalactic-spacing-10x, 40px);
|
|
57
|
-
background: var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));
|
|
63
|
+
background: var(--intergalactic-overlay-primary, oklch(0.109 0.023 165.5 / 0.337));
|
|
58
64
|
overflow: auto;
|
|
59
65
|
-webkit-overflow-scrolling: touch;
|
|
60
66
|
|
|
61
67
|
& SOverlay {
|
|
62
|
-
background: var(--intergalactic-overlay-secondary,
|
|
68
|
+
background: var(--intergalactic-overlay-secondary, oklch(0.118 0.023 170.1 / 0.262));
|
|
63
69
|
}
|
|
70
|
+
|
|
64
71
|
}
|
|
65
72
|
|
|
66
73
|
@media (max-width: 767px) {
|
|
@@ -68,7 +75,7 @@ SOverlay {
|
|
|
68
75
|
min-width: 60%;
|
|
69
76
|
}
|
|
70
77
|
|
|
71
|
-
|
|
78
|
+
SOverlayContentWrapper {
|
|
72
79
|
padding: var(--intergalactic-spacing-3x, 12px);
|
|
73
80
|
}
|
|
74
81
|
}
|
|
@@ -6,12 +6,12 @@ import it from "./it.json.mjs";
|
|
|
6
6
|
import ja from "./ja.json.mjs";
|
|
7
7
|
import ko from "./ko.json.mjs";
|
|
8
8
|
import nl from "./nl.json.mjs";
|
|
9
|
+
import pl from "./pl.json.mjs";
|
|
9
10
|
import pt from "./pt.json.mjs";
|
|
11
|
+
import sv from "./sv.json.mjs";
|
|
10
12
|
import tr from "./tr.json.mjs";
|
|
11
13
|
import vi from "./vi.json.mjs";
|
|
12
14
|
import zh from "./zh.json.mjs";
|
|
13
|
-
import pl from "./pl.json.mjs";
|
|
14
|
-
import sv from "./sv.json.mjs";
|
|
15
15
|
var localizedMessages = {
|
|
16
16
|
de,
|
|
17
17
|
en,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { PropGetterFn,
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { TextProps } from '@semcore/typography';
|
|
7
|
-
import Button from '@semcore/button';
|
|
1
|
+
import type { FadeInOutProps, SlideProps, Box, BoxProps, PortalProps } from '@semcore/base-components';
|
|
2
|
+
import type Button from '@semcore/button';
|
|
3
|
+
import type { PropGetterFn, Intergalactic } from '@semcore/core';
|
|
4
|
+
import type { NSText } from '@semcore/typography';
|
|
5
|
+
import type React from 'react';
|
|
8
6
|
|
|
9
|
-
/** @deprecated */
|
|
10
|
-
export interface IModalProps extends ModalProps, UnknownProperties {}
|
|
11
7
|
export type ModalProps = PortalProps &
|
|
12
8
|
BoxProps &
|
|
13
9
|
FadeInOutProps & {
|
|
@@ -31,21 +27,16 @@ export type ModalProps = PortalProps &
|
|
|
31
27
|
* @default false
|
|
32
28
|
*/
|
|
33
29
|
disablePreventScroll?: boolean;
|
|
34
|
-
|
|
30
|
+
/** Specifies the locale for i18n support */
|
|
35
31
|
locale?: string;
|
|
36
|
-
|
|
37
32
|
/**
|
|
38
33
|
* Props for render modal without background and paddings. Useful in carousel for example
|
|
39
34
|
*/
|
|
40
35
|
ghost?: boolean;
|
|
41
36
|
};
|
|
42
37
|
|
|
43
|
-
/** @deprecated */
|
|
44
|
-
export interface IWindowProps extends WindowProps, UnknownProperties {}
|
|
45
38
|
export type WindowProps = BoxProps & SlideProps & {};
|
|
46
39
|
|
|
47
|
-
/** @deprecated */
|
|
48
|
-
export interface IModalContext extends ModalContext, UnknownProperties {}
|
|
49
40
|
export type ModalContext = {
|
|
50
41
|
getOverlayProps: PropGetterFn;
|
|
51
42
|
getWindowProps: PropGetterFn;
|
|
@@ -56,7 +47,7 @@ declare const Modal: Intergalactic.Component<'div', ModalProps, ModalContext> &
|
|
|
56
47
|
Window: Intergalactic.Component<'div', WindowProps>;
|
|
57
48
|
Overlay: typeof Box;
|
|
58
49
|
Close: typeof Button;
|
|
59
|
-
Title: Intergalactic.Component<'div',
|
|
50
|
+
Title: Intergalactic.Component<'div', NSText.Props>;
|
|
60
51
|
};
|
|
61
52
|
|
|
62
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": "4.
|
|
4
|
+
"version": "4.57.0-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,17 +14,17 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "5.
|
|
18
|
-
"@semcore/animation": "2.
|
|
19
|
-
"@semcore/flex-box": "5.
|
|
20
|
-
"@semcore/icon": "4.
|
|
21
|
-
"@semcore/outside-click": "3.
|
|
22
|
-
"@semcore/portal": "3.
|
|
23
|
-
"@semcore/typography": "5.
|
|
24
|
-
"@semcore/utils": "4.
|
|
17
|
+
"@semcore/button": "5.44.0-prerelease.0",
|
|
18
|
+
"@semcore/animation": "2.42.0-prerelease.0",
|
|
19
|
+
"@semcore/flex-box": "5.42.0-prerelease.0",
|
|
20
|
+
"@semcore/icon": "4.63.0-prerelease.0",
|
|
21
|
+
"@semcore/outside-click": "3.41.0-prerelease.0",
|
|
22
|
+
"@semcore/portal": "3.42.0-prerelease.0",
|
|
23
|
+
"@semcore/typography": "5.54.0-prerelease.0",
|
|
24
|
+
"@semcore/utils": "4.49.0-prerelease.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@semcore/core": "^2.
|
|
27
|
+
"@semcore/core": "^2.40.0-prerelease.0",
|
|
28
28
|
"react": "16.8 - 18",
|
|
29
29
|
"react-dom": "16.8 - 18"
|
|
30
30
|
},
|