@semcore/modal 4.55.0 → 4.55.1-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 +8 -8
- package/lib/es6/Modal.js +8 -8
- package/lib/esm/Modal.mjs +111 -111
- package/package.json +10 -10
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.55.1] - 2025-04-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/button` [5.43.0 ~> 5.43.1], `@semcore/animation` [2.41.1 ~> 2.41.2], `@semcore/flex-box` [5.41.1 ~> 5.41.2], `@semcore/icon` [4.60.1 ~> 4.60.2], `@semcore/outside-click` [3.39.1 ~> 3.40.0], `@semcore/utils` [4.48.1 ~> 4.48.2], `@semcore/core` [2.39.1 ~> 2.39.2]).
|
|
10
|
+
|
|
5
11
|
## [4.55.0] - 2025-03-28
|
|
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__*/".
|
|
39
|
-
"__SWindow": "
|
|
40
|
-
"_ghost": "
|
|
41
|
-
"__SOverlay": "
|
|
42
|
-
"__STitle": "
|
|
43
|
-
"_color": "
|
|
44
|
-
"--color": "--
|
|
45
|
-
"__SClose": "
|
|
38
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWindow_1a6da_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_1a6da_gg_:focus{outline:0}.___SWindow_1a6da_gg_ .___STitle_1a6da_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_1a6da_gg_ .___STitle_1a6da_gg_.__color_1a6da_gg_{color:var(--color_1a6da)}.___SWindow_1a6da_gg_ .___SClose_1a6da_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1a6da_gg_ .___SClose_1a6da_gg_.__ghost_1a6da_gg_{right:0;top:0}.___SWindow_1a6da_gg_.__ghost_1a6da_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_1a6da_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_1a6da_gg_ .___SOverlay_1a6da_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1a6da_gg_{min-width:60%}.___SOverlay_1a6da_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "1a6da_gg_") /*__reshadow_css_end__*/, {
|
|
39
|
+
"__SWindow": "___SWindow_1a6da_gg_",
|
|
40
|
+
"_ghost": "__ghost_1a6da_gg_",
|
|
41
|
+
"__SOverlay": "___SOverlay_1a6da_gg_",
|
|
42
|
+
"__STitle": "___STitle_1a6da_gg_",
|
|
43
|
+
"_color": "__color_1a6da_gg_",
|
|
44
|
+
"--color": "--color_1a6da",
|
|
45
|
+
"__SClose": "___SClose_1a6da_gg_"
|
|
46
46
|
});
|
|
47
47
|
var ModalRoot = /*#__PURE__*/function (_Component) {
|
|
48
48
|
(0, _inherits2["default"])(ModalRoot, _Component);
|
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__*/".
|
|
27
|
-
"__SWindow": "
|
|
28
|
-
"_ghost": "
|
|
29
|
-
"__SOverlay": "
|
|
30
|
-
"__STitle": "
|
|
31
|
-
"_color": "
|
|
32
|
-
"--color": "--
|
|
33
|
-
"__SClose": "
|
|
26
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SWindow_1a6da_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_1a6da_gg_:focus{outline:0}.___SWindow_1a6da_gg_ .___STitle_1a6da_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_1a6da_gg_ .___STitle_1a6da_gg_.__color_1a6da_gg_{color:var(--color_1a6da)}.___SWindow_1a6da_gg_ .___SClose_1a6da_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1a6da_gg_ .___SClose_1a6da_gg_.__ghost_1a6da_gg_{right:0;top:0}.___SWindow_1a6da_gg_.__ghost_1a6da_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_1a6da_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_1a6da_gg_ .___SOverlay_1a6da_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1a6da_gg_{min-width:60%}.___SOverlay_1a6da_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "1a6da_gg_") /*__reshadow_css_end__*/, {
|
|
27
|
+
"__SWindow": "___SWindow_1a6da_gg_",
|
|
28
|
+
"_ghost": "__ghost_1a6da_gg_",
|
|
29
|
+
"__SOverlay": "___SOverlay_1a6da_gg_",
|
|
30
|
+
"__STitle": "___STitle_1a6da_gg_",
|
|
31
|
+
"_color": "__color_1a6da_gg_",
|
|
32
|
+
"--color": "--color_1a6da",
|
|
33
|
+
"__SClose": "___SClose_1a6da_gg_"
|
|
34
34
|
});
|
|
35
35
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
36
36
|
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
package/lib/esm/Modal.mjs
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
import f from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import P from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import w from "@babel/runtime/helpers/esm/createClass";
|
|
4
4
|
import g from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { sstyled as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { Slide as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { isAdvanceMode as
|
|
19
|
-
import
|
|
20
|
-
import { localizedMessages as
|
|
21
|
-
import
|
|
22
|
-
import { Text as
|
|
23
|
-
import
|
|
24
|
-
import { cssVariableEnhance as
|
|
5
|
+
import k from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import T from "@babel/runtime/helpers/esm/createSuper";
|
|
7
|
+
import _ from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import { sstyled as E } from "@semcore/utils/lib/core/index";
|
|
9
|
+
import O, { assignProps as u, Component as I, sstyled as p } from "@semcore/core";
|
|
10
|
+
import l from "react";
|
|
11
|
+
import { Slide as W, FadeInOut as z } from "@semcore/animation";
|
|
12
|
+
import M, { PortalProvider as D } from "@semcore/portal";
|
|
13
|
+
import x from "@semcore/button";
|
|
14
|
+
import R from "@semcore/outside-click";
|
|
15
|
+
import A from "@semcore/icon/Close/l";
|
|
16
|
+
import b from "@semcore/utils/lib/fire";
|
|
17
|
+
import $ from "@semcore/utils/lib/use/usePreventScroll";
|
|
18
|
+
import { isAdvanceMode as H } from "@semcore/utils/lib/findComponent";
|
|
19
|
+
import N from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
|
|
20
|
+
import { localizedMessages as y } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
21
|
+
import F from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
22
|
+
import { Text as K } from "@semcore/typography";
|
|
23
|
+
import Z from "@semcore/utils/lib/uniqueID";
|
|
24
|
+
import { cssVariableEnhance as j } from "@semcore/utils/lib/useCssVariable";
|
|
25
25
|
import { useFocusLock as q } from "@semcore/utils/lib/use/useFocusLock";
|
|
26
26
|
import { useContextTheme as B } from "@semcore/utils/lib/ThemeProvider";
|
|
27
27
|
import { useColorResolver as L } from "@semcore/utils/lib/use/useColorResolver";
|
|
28
28
|
import { ZIndexStackingContextProvider as V, useZIndexStacking as G } from "@semcore/utils/lib/zIndexStacking";
|
|
29
29
|
var J = (
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
|
-
(
|
|
31
|
+
(E.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
34
|
-
"
|
|
33
|
+
".___SWindow_1a6da_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_1a6da_gg_:focus{outline:0}.___SWindow_1a6da_gg_ .___STitle_1a6da_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_1a6da_gg_ .___STitle_1a6da_gg_.__color_1a6da_gg_{color:var(--color_1a6da)}.___SWindow_1a6da_gg_ .___SClose_1a6da_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1a6da_gg_ .___SClose_1a6da_gg_.__ghost_1a6da_gg_{right:0;top:0}.___SWindow_1a6da_gg_.__ghost_1a6da_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_1a6da_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_1a6da_gg_ .___SOverlay_1a6da_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1a6da_gg_{min-width:60%}.___SOverlay_1a6da_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}",
|
|
34
|
+
"1a6da_gg_"
|
|
35
35
|
), {
|
|
36
|
-
__SWindow: "
|
|
37
|
-
_ghost: "
|
|
38
|
-
__SOverlay: "
|
|
39
|
-
__STitle: "
|
|
40
|
-
_color: "
|
|
41
|
-
"--color": "--
|
|
42
|
-
__SClose: "
|
|
36
|
+
__SWindow: "___SWindow_1a6da_gg_",
|
|
37
|
+
_ghost: "__ghost_1a6da_gg_",
|
|
38
|
+
__SOverlay: "___SOverlay_1a6da_gg_",
|
|
39
|
+
__STitle: "___STitle_1a6da_gg_",
|
|
40
|
+
_color: "__color_1a6da_gg_",
|
|
41
|
+
"--color": "--color_1a6da",
|
|
42
|
+
__SClose: "___SClose_1a6da_gg_"
|
|
43
43
|
})
|
|
44
|
-
),
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
for (var e = arguments.length,
|
|
51
|
-
a
|
|
52
|
-
return
|
|
44
|
+
), v = /* @__PURE__ */ function(r) {
|
|
45
|
+
k(t, r);
|
|
46
|
+
var d = T(t);
|
|
47
|
+
function t() {
|
|
48
|
+
var n;
|
|
49
|
+
P(this, t);
|
|
50
|
+
for (var e = arguments.length, i = new Array(e), a = 0; a < e; a++)
|
|
51
|
+
i[a] = arguments[a];
|
|
52
|
+
return n = d.call.apply(d, [this].concat(i)), _(g(n), "state", {
|
|
53
53
|
hasTitle: !1
|
|
54
|
-
}),
|
|
55
|
-
o.key === "Escape" && (o.stopPropagation(),
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
}),
|
|
59
|
-
|
|
60
|
-
}),
|
|
54
|
+
}), _(g(n), "handleKeyDown", function(o) {
|
|
55
|
+
o.key === "Escape" && (o.stopPropagation(), b(g(n), "onClose", "onEscape", o));
|
|
56
|
+
}), _(g(n), "handleIconCloseClick", function(o) {
|
|
57
|
+
b(g(n), "onClose", "onCloseClick", o);
|
|
58
|
+
}), _(g(n), "handleOutsideClick", function(o) {
|
|
59
|
+
b(g(n), "onClose", "onOutsideClick", o);
|
|
60
|
+
}), n;
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return w(t, [{
|
|
63
63
|
key: "getOverlayProps",
|
|
64
64
|
value: function() {
|
|
65
|
-
var e = this.asProps,
|
|
65
|
+
var e = this.asProps, i = e.duration, a = e.visible, o = e.animationsDisabled, s = e.disablePreventScroll;
|
|
66
66
|
return {
|
|
67
|
-
duration:
|
|
68
|
-
visible:
|
|
67
|
+
duration: i,
|
|
68
|
+
visible: a,
|
|
69
69
|
onOutsideClick: this.handleOutsideClick,
|
|
70
70
|
animationsDisabled: o,
|
|
71
71
|
disablePreventScroll: s
|
|
@@ -74,123 +74,123 @@ var J = (
|
|
|
74
74
|
}, {
|
|
75
75
|
key: "getWindowProps",
|
|
76
76
|
value: function() {
|
|
77
|
-
var e = this.asProps,
|
|
77
|
+
var e = this.asProps, i = e.visible, a = e.closable, o = e.getI18nText, s = e.uid, c = e.duration, h = e.animationsDisabled, C = this.state.hasTitle;
|
|
78
78
|
return {
|
|
79
|
-
visible:
|
|
80
|
-
closable:
|
|
79
|
+
visible: i,
|
|
80
|
+
closable: a,
|
|
81
81
|
onKeyDown: this.handleKeyDown,
|
|
82
|
-
"aria-label":
|
|
83
|
-
"aria-labelledby":
|
|
84
|
-
duration:
|
|
82
|
+
"aria-label": C ? void 0 : o("title"),
|
|
83
|
+
"aria-labelledby": C ? "igc-".concat(s, "-title") : void 0,
|
|
84
|
+
duration: c,
|
|
85
85
|
animationsDisabled: h
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
}, {
|
|
89
89
|
key: "getCloseProps",
|
|
90
90
|
value: function() {
|
|
91
|
-
var e = this.asProps,
|
|
91
|
+
var e = this.asProps, i = e.getI18nText, a = e.ghost;
|
|
92
92
|
return {
|
|
93
93
|
onClick: this.handleIconCloseClick,
|
|
94
|
-
getI18nText:
|
|
95
|
-
ghost:
|
|
94
|
+
getI18nText: i,
|
|
95
|
+
ghost: a
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
}, {
|
|
99
99
|
key: "getTitleProps",
|
|
100
100
|
value: function() {
|
|
101
|
-
var e = this,
|
|
101
|
+
var e = this, i = this.asProps.uid, a = function() {
|
|
102
102
|
return e.setState({
|
|
103
103
|
hasTitle: !0
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
106
|
return {
|
|
107
|
-
id: "igc-".concat(
|
|
108
|
-
setHasTitle:
|
|
107
|
+
id: "igc-".concat(i, "-title"),
|
|
108
|
+
setHasTitle: a
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
}, {
|
|
112
112
|
key: "render",
|
|
113
113
|
value: function() {
|
|
114
|
-
var e = this.asProps,
|
|
115
|
-
return /* @__PURE__ */
|
|
114
|
+
var e = this.asProps, i = this.asProps, a = i.Children, o = i.disablePortal, s = i.forcedAdvancedMode, c = i.ignorePortalsStacking, h = s || H(a, [m.Overlay.displayName, m.Window.displayName]);
|
|
115
|
+
return /* @__PURE__ */ l.createElement(M, {
|
|
116
116
|
disablePortal: o,
|
|
117
|
-
ignorePortalsStacking:
|
|
118
|
-
}, h ? /* @__PURE__ */
|
|
117
|
+
ignorePortalsStacking: c
|
|
118
|
+
}, h ? /* @__PURE__ */ l.createElement(a, null) : /* @__PURE__ */ l.createElement(m.Overlay, null, /* @__PURE__ */ l.createElement(m.Window, u({}, e))));
|
|
119
119
|
}
|
|
120
|
-
}]),
|
|
121
|
-
}(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
}]), t;
|
|
121
|
+
}(I);
|
|
122
|
+
_(v, "displayName", "Modal");
|
|
123
|
+
_(v, "style", J);
|
|
124
|
+
_(v, "enhance", [F(y), Z(), j({
|
|
125
125
|
variable: "--intergalactic-duration-modal",
|
|
126
126
|
fallback: "200",
|
|
127
127
|
map: Number.parseInt,
|
|
128
128
|
prop: "duration"
|
|
129
129
|
})]);
|
|
130
|
-
|
|
130
|
+
_(v, "defaultProps", {
|
|
131
131
|
closable: !0,
|
|
132
|
-
i18n:
|
|
132
|
+
i18n: y,
|
|
133
133
|
locale: "en",
|
|
134
134
|
disablePreventScroll: !1
|
|
135
135
|
});
|
|
136
|
-
function Q(
|
|
137
|
-
var
|
|
138
|
-
return q(
|
|
136
|
+
function Q(r) {
|
|
137
|
+
var d = arguments[0], t, n = W, e = r.Children, i = r.styles, a = r.visible, o = r.closable, s = r.duration, c = l.useRef(null);
|
|
138
|
+
return q(c, !0, "auto", !a, !0), t = p(i), /* @__PURE__ */ l.createElement(n, t.cn("SWindow", f({}, u({
|
|
139
139
|
initialAnimation: !0,
|
|
140
140
|
slideOrigin: "top",
|
|
141
|
-
visible:
|
|
141
|
+
visible: a,
|
|
142
142
|
role: "dialog",
|
|
143
143
|
"aria-modal": !0,
|
|
144
144
|
duration: s,
|
|
145
|
-
ref:
|
|
146
|
-
},
|
|
145
|
+
ref: c
|
|
146
|
+
}, d))), /* @__PURE__ */ l.createElement(V, t.cn("ZIndexStackingContextProvider", {
|
|
147
147
|
designToken: "z-index-modal"
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
-
value:
|
|
150
|
-
}), o && /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ l.createElement(D, t.cn("PortalProvider", {
|
|
149
|
+
value: c
|
|
150
|
+
}), o && /* @__PURE__ */ l.createElement(m.Close, null), /* @__PURE__ */ l.createElement(e, t.cn("Children", {})))));
|
|
151
151
|
}
|
|
152
|
-
function U(
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
var
|
|
156
|
-
return
|
|
152
|
+
function U(r) {
|
|
153
|
+
var d = arguments[0], t, n = z, e = r.Children, i = r.styles, a = r.onOutsideClick, o = r.visible, s = l.useRef(null);
|
|
154
|
+
$(o, r.disablePreventScroll), B(s, o);
|
|
155
|
+
var c = G("z-index-modal");
|
|
156
|
+
return t = p(i), /* @__PURE__ */ l.createElement(n, t.cn("SOverlay", f({}, u({
|
|
157
157
|
ref: s,
|
|
158
|
-
zIndex:
|
|
159
|
-
},
|
|
158
|
+
zIndex: c
|
|
159
|
+
}, d))), /* @__PURE__ */ l.createElement(R, t.cn("OutsideClick", {
|
|
160
160
|
root: s,
|
|
161
|
-
onOutsideClick:
|
|
162
|
-
}), /* @__PURE__ */
|
|
161
|
+
onOutsideClick: a
|
|
162
|
+
}), /* @__PURE__ */ l.createElement(e, t.cn("Children", {}))));
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
var
|
|
166
|
-
return
|
|
164
|
+
function S(r) {
|
|
165
|
+
var d = arguments[0], t, n = x, e = r.Children, i = r.children, a = r.getI18nText, o = r.ghost;
|
|
166
|
+
return t = p(r.styles), /* @__PURE__ */ l.createElement(n, t.cn("SClose", f({}, u({
|
|
167
167
|
use: "tertiary",
|
|
168
168
|
size: "l",
|
|
169
169
|
theme: o ? "invert" : "muted",
|
|
170
|
-
"aria-label":
|
|
171
|
-
},
|
|
170
|
+
"aria-label": a("close")
|
|
171
|
+
}, d))), i ? /* @__PURE__ */ l.createElement(e, t.cn("Children", {})) : /* @__PURE__ */ l.createElement(x.Addon, {
|
|
172
172
|
ml: "7px",
|
|
173
173
|
mr: "7px"
|
|
174
|
-
}, /* @__PURE__ */
|
|
175
|
-
title:
|
|
174
|
+
}, /* @__PURE__ */ l.createElement(A, t.cn("CloseIcon", {
|
|
175
|
+
title: a("close")
|
|
176
176
|
}))));
|
|
177
177
|
}
|
|
178
|
-
|
|
179
|
-
function X(
|
|
180
|
-
var
|
|
181
|
-
return
|
|
182
|
-
return
|
|
183
|
-
}),
|
|
178
|
+
S.enhance = [N()];
|
|
179
|
+
function X(r) {
|
|
180
|
+
var d = arguments[0], t, n = r.setHasTitle, e = r.styles, i = r.color, a = K, o = L();
|
|
181
|
+
return l.useEffect(function() {
|
|
182
|
+
return n();
|
|
183
|
+
}), t = p(e), /* @__PURE__ */ l.createElement(a, t.cn("STitle", f({}, u({
|
|
184
184
|
tag: "h2",
|
|
185
|
-
"use:color": o(
|
|
186
|
-
},
|
|
185
|
+
"use:color": o(i)
|
|
186
|
+
}, d))));
|
|
187
187
|
}
|
|
188
|
-
var
|
|
188
|
+
var m = O(v, {
|
|
189
189
|
Window: Q,
|
|
190
190
|
Overlay: U,
|
|
191
|
-
Close:
|
|
191
|
+
Close: S,
|
|
192
192
|
Title: X
|
|
193
193
|
});
|
|
194
194
|
export {
|
|
195
|
-
|
|
195
|
+
m as default
|
|
196
196
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/modal",
|
|
3
3
|
"description": "Semrush Modal Component",
|
|
4
|
-
"version": "4.55.
|
|
4
|
+
"version": "4.55.1-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,17 +14,17 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "5.43.
|
|
18
|
-
"@semcore/animation": "2.41.
|
|
19
|
-
"@semcore/flex-box": "5.41.
|
|
20
|
-
"@semcore/icon": "4.60.
|
|
21
|
-
"@semcore/outside-click": "3.
|
|
22
|
-
"@semcore/portal": "3.41.
|
|
23
|
-
"@semcore/typography": "5.52.
|
|
24
|
-
"@semcore/utils": "4.48.
|
|
17
|
+
"@semcore/button": "5.43.1-prerelease.2",
|
|
18
|
+
"@semcore/animation": "2.41.2-prerelease.2",
|
|
19
|
+
"@semcore/flex-box": "5.41.2-prerelease.2",
|
|
20
|
+
"@semcore/icon": "4.60.2-prerelease.2",
|
|
21
|
+
"@semcore/outside-click": "3.40.0-prerelease.2",
|
|
22
|
+
"@semcore/portal": "3.41.2-prerelease.2",
|
|
23
|
+
"@semcore/typography": "5.52.2-prerelease.2",
|
|
24
|
+
"@semcore/utils": "4.48.2-prerelease.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@semcore/core": "^2.
|
|
27
|
+
"@semcore/core": "^2.39.2-prerelease.2",
|
|
28
28
|
"react": "16.8 - 18",
|
|
29
29
|
"react-dom": "16.8 - 18"
|
|
30
30
|
},
|