@semcore/modal 4.54.1 → 4.55.0-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 +81 -81
- package/package.json +2 -2
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.0] - 2025-03-28
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version minor update due to children dependencies update (`@semcore/button` [5.42.1 ~> 5.43.0]).
|
|
10
|
+
|
|
5
11
|
## [4.54.1] - 2025-03-20
|
|
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_1vjjl_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_1vjjl_gg_:focus{outline:0}.___SWindow_1vjjl_gg_ .___STitle_1vjjl_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_1vjjl_gg_ .___STitle_1vjjl_gg_.__color_1vjjl_gg_{color:var(--color_1vjjl)}.___SWindow_1vjjl_gg_ .___SClose_1vjjl_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1vjjl_gg_ .___SClose_1vjjl_gg_.__ghost_1vjjl_gg_{right:0;top:0}.___SWindow_1vjjl_gg_.__ghost_1vjjl_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_1vjjl_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_1vjjl_gg_ .___SOverlay_1vjjl_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1vjjl_gg_{min-width:60%}.___SOverlay_1vjjl_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "1vjjl_gg_") /*__reshadow_css_end__*/, {
|
|
39
|
+
"__SWindow": "___SWindow_1vjjl_gg_",
|
|
40
|
+
"_ghost": "__ghost_1vjjl_gg_",
|
|
41
|
+
"__SOverlay": "___SOverlay_1vjjl_gg_",
|
|
42
|
+
"__STitle": "___STitle_1vjjl_gg_",
|
|
43
|
+
"_color": "__color_1vjjl_gg_",
|
|
44
|
+
"--color": "--color_1vjjl",
|
|
45
|
+
"__SClose": "___SClose_1vjjl_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_1vjjl_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_1vjjl_gg_:focus{outline:0}.___SWindow_1vjjl_gg_ .___STitle_1vjjl_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_1vjjl_gg_ .___STitle_1vjjl_gg_.__color_1vjjl_gg_{color:var(--color_1vjjl)}.___SWindow_1vjjl_gg_ .___SClose_1vjjl_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1vjjl_gg_ .___SClose_1vjjl_gg_.__ghost_1vjjl_gg_{right:0;top:0}.___SWindow_1vjjl_gg_.__ghost_1vjjl_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_1vjjl_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_1vjjl_gg_ .___SOverlay_1vjjl_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1vjjl_gg_{min-width:60%}.___SOverlay_1vjjl_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}" /*__inner_css_end__*/, "1vjjl_gg_") /*__reshadow_css_end__*/, {
|
|
27
|
+
"__SWindow": "___SWindow_1vjjl_gg_",
|
|
28
|
+
"_ghost": "__ghost_1vjjl_gg_",
|
|
29
|
+
"__SOverlay": "___SOverlay_1vjjl_gg_",
|
|
30
|
+
"__STitle": "___STitle_1vjjl_gg_",
|
|
31
|
+
"_color": "__color_1vjjl_gg_",
|
|
32
|
+
"--color": "--color_1vjjl",
|
|
33
|
+
"__SClose": "___SClose_1vjjl_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,65 +1,65 @@
|
|
|
1
1
|
import f from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import S from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import P from "@babel/runtime/helpers/esm/createClass";
|
|
4
4
|
import g from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import w from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import k from "@babel/runtime/helpers/esm/createSuper";
|
|
7
7
|
import d from "@babel/runtime/helpers/esm/defineProperty";
|
|
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
|
|
25
|
-
import { useFocusLock as
|
|
8
|
+
import { sstyled as T } from "@semcore/utils/lib/core/index";
|
|
9
|
+
import E, { assignProps as m, Component as O, sstyled as p } from "@semcore/core";
|
|
10
|
+
import n from "react";
|
|
11
|
+
import { Slide as I, FadeInOut as W } from "@semcore/animation";
|
|
12
|
+
import z, { PortalProvider as M } from "@semcore/portal";
|
|
13
|
+
import C from "@semcore/button";
|
|
14
|
+
import D from "@semcore/outside-click";
|
|
15
|
+
import R from "@semcore/icon/Close/l";
|
|
16
|
+
import j from "@semcore/utils/lib/fire";
|
|
17
|
+
import A from "@semcore/utils/lib/use/usePreventScroll";
|
|
18
|
+
import { isAdvanceMode as $ } from "@semcore/utils/lib/findComponent";
|
|
19
|
+
import H from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
|
|
20
|
+
import { localizedMessages as x } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
21
|
+
import N from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
22
|
+
import { Text as F } from "@semcore/typography";
|
|
23
|
+
import K from "@semcore/utils/lib/uniqueID";
|
|
24
|
+
import { cssVariableEnhance as Z } from "@semcore/utils/lib/useCssVariable";
|
|
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
|
+
(T.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
34
|
-
"
|
|
33
|
+
".___SWindow_1vjjl_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_1vjjl_gg_:focus{outline:0}.___SWindow_1vjjl_gg_ .___STitle_1vjjl_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_1vjjl_gg_ .___STitle_1vjjl_gg_.__color_1vjjl_gg_{color:var(--color_1vjjl)}.___SWindow_1vjjl_gg_ .___SClose_1vjjl_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1vjjl_gg_ .___SClose_1vjjl_gg_.__ghost_1vjjl_gg_{right:0;top:0}.___SWindow_1vjjl_gg_.__ghost_1vjjl_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_1vjjl_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_1vjjl_gg_ .___SOverlay_1vjjl_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1vjjl_gg_{min-width:60%}.___SOverlay_1vjjl_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}",
|
|
34
|
+
"1vjjl_gg_"
|
|
35
35
|
), {
|
|
36
|
-
__SWindow: "
|
|
37
|
-
_ghost: "
|
|
38
|
-
__SOverlay: "
|
|
39
|
-
__STitle: "
|
|
40
|
-
_color: "
|
|
41
|
-
"--color": "--
|
|
42
|
-
__SClose: "
|
|
36
|
+
__SWindow: "___SWindow_1vjjl_gg_",
|
|
37
|
+
_ghost: "__ghost_1vjjl_gg_",
|
|
38
|
+
__SOverlay: "___SOverlay_1vjjl_gg_",
|
|
39
|
+
__STitle: "___STitle_1vjjl_gg_",
|
|
40
|
+
_color: "__color_1vjjl_gg_",
|
|
41
|
+
"--color": "--color_1vjjl",
|
|
42
|
+
__SClose: "___SClose_1vjjl_gg_"
|
|
43
43
|
})
|
|
44
|
-
),
|
|
45
|
-
|
|
46
|
-
var c =
|
|
44
|
+
), u = /* @__PURE__ */ function(i) {
|
|
45
|
+
w(r, i);
|
|
46
|
+
var c = k(r);
|
|
47
47
|
function r() {
|
|
48
|
-
var
|
|
49
|
-
|
|
48
|
+
var l;
|
|
49
|
+
S(this, r);
|
|
50
50
|
for (var e = arguments.length, a = new Array(e), t = 0; t < e; t++)
|
|
51
51
|
a[t] = arguments[t];
|
|
52
|
-
return
|
|
52
|
+
return l = c.call.apply(c, [this].concat(a)), d(g(l), "state", {
|
|
53
53
|
hasTitle: !1
|
|
54
|
-
}), d(g(
|
|
55
|
-
o.key === "Escape" && (o.stopPropagation(),
|
|
56
|
-
}), d(g(
|
|
57
|
-
|
|
58
|
-
}), d(g(
|
|
59
|
-
|
|
60
|
-
}),
|
|
54
|
+
}), d(g(l), "handleKeyDown", function(o) {
|
|
55
|
+
o.key === "Escape" && (o.stopPropagation(), j(g(l), "onClose", "onEscape", o));
|
|
56
|
+
}), d(g(l), "handleIconCloseClick", function(o) {
|
|
57
|
+
j(g(l), "onClose", "onCloseClick", o);
|
|
58
|
+
}), d(g(l), "handleOutsideClick", function(o) {
|
|
59
|
+
j(g(l), "onClose", "onOutsideClick", o);
|
|
60
|
+
}), l;
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return P(r, [{
|
|
63
63
|
key: "getOverlayProps",
|
|
64
64
|
value: function() {
|
|
65
65
|
var e = this.asProps, a = e.duration, t = e.visible, o = e.animationsDisabled, s = e.disablePreventScroll;
|
|
@@ -74,13 +74,13 @@ var J = (
|
|
|
74
74
|
}, {
|
|
75
75
|
key: "getWindowProps",
|
|
76
76
|
value: function() {
|
|
77
|
-
var e = this.asProps, a = e.visible, t = e.closable, o = e.getI18nText, s = e.uid, _ = e.duration, h = e.animationsDisabled,
|
|
77
|
+
var e = this.asProps, a = e.visible, t = e.closable, o = e.getI18nText, s = e.uid, _ = e.duration, h = e.animationsDisabled, b = this.state.hasTitle;
|
|
78
78
|
return {
|
|
79
79
|
visible: a,
|
|
80
80
|
closable: t,
|
|
81
81
|
onKeyDown: this.handleKeyDown,
|
|
82
|
-
"aria-label":
|
|
83
|
-
"aria-labelledby":
|
|
82
|
+
"aria-label": b ? void 0 : o("title"),
|
|
83
|
+
"aria-labelledby": b ? "igc-".concat(s, "-title") : void 0,
|
|
84
84
|
duration: _,
|
|
85
85
|
animationsDisabled: h
|
|
86
86
|
};
|
|
@@ -111,31 +111,31 @@ var J = (
|
|
|
111
111
|
}, {
|
|
112
112
|
key: "render",
|
|
113
113
|
value: function() {
|
|
114
|
-
var e = this.asProps, a = this.asProps, t = a.Children, o = a.disablePortal, s = a.forcedAdvancedMode, _ = a.ignorePortalsStacking, h = s ||
|
|
115
|
-
return /* @__PURE__ */
|
|
114
|
+
var e = this.asProps, a = this.asProps, t = a.Children, o = a.disablePortal, s = a.forcedAdvancedMode, _ = a.ignorePortalsStacking, h = s || $(t, [v.Overlay.displayName, v.Window.displayName]);
|
|
115
|
+
return /* @__PURE__ */ n.createElement(z, {
|
|
116
116
|
disablePortal: o,
|
|
117
117
|
ignorePortalsStacking: _
|
|
118
|
-
}, h ? /* @__PURE__ */
|
|
118
|
+
}, h ? /* @__PURE__ */ n.createElement(t, null) : /* @__PURE__ */ n.createElement(v.Overlay, null, /* @__PURE__ */ n.createElement(v.Window, m({}, e))));
|
|
119
119
|
}
|
|
120
120
|
}]), r;
|
|
121
|
-
}(
|
|
122
|
-
d(
|
|
123
|
-
d(
|
|
124
|
-
d(
|
|
121
|
+
}(O);
|
|
122
|
+
d(u, "displayName", "Modal");
|
|
123
|
+
d(u, "style", J);
|
|
124
|
+
d(u, "enhance", [N(x), K(), Z({
|
|
125
125
|
variable: "--intergalactic-duration-modal",
|
|
126
126
|
fallback: "200",
|
|
127
127
|
map: Number.parseInt,
|
|
128
128
|
prop: "duration"
|
|
129
129
|
})]);
|
|
130
|
-
d(
|
|
130
|
+
d(u, "defaultProps", {
|
|
131
131
|
closable: !0,
|
|
132
|
-
i18n:
|
|
132
|
+
i18n: x,
|
|
133
133
|
locale: "en",
|
|
134
134
|
disablePreventScroll: !1
|
|
135
135
|
});
|
|
136
136
|
function Q(i) {
|
|
137
|
-
var c = arguments[0], r,
|
|
138
|
-
return
|
|
137
|
+
var c = arguments[0], r, l = I, e = i.Children, a = i.styles, t = i.visible, o = i.closable, s = i.duration, _ = n.useRef(null);
|
|
138
|
+
return q(_, !0, "auto", !t, !0), r = p(a), /* @__PURE__ */ n.createElement(l, r.cn("SWindow", f({}, m({
|
|
139
139
|
initialAnimation: !0,
|
|
140
140
|
slideOrigin: "top",
|
|
141
141
|
visible: t,
|
|
@@ -143,54 +143,54 @@ function Q(i) {
|
|
|
143
143
|
"aria-modal": !0,
|
|
144
144
|
duration: s,
|
|
145
145
|
ref: _
|
|
146
|
-
}, c))), /* @__PURE__ */
|
|
146
|
+
}, c))), /* @__PURE__ */ n.createElement(V, r.cn("ZIndexStackingContextProvider", {
|
|
147
147
|
designToken: "z-index-modal"
|
|
148
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ n.createElement(M, r.cn("PortalProvider", {
|
|
149
149
|
value: _
|
|
150
|
-
}), o && /* @__PURE__ */
|
|
150
|
+
}), o && /* @__PURE__ */ n.createElement(v.Close, null), /* @__PURE__ */ n.createElement(e, r.cn("Children", {})))));
|
|
151
151
|
}
|
|
152
152
|
function U(i) {
|
|
153
|
-
var c = arguments[0], r,
|
|
154
|
-
|
|
153
|
+
var c = arguments[0], r, l = W, e = i.Children, a = i.styles, t = i.onOutsideClick, o = i.visible, s = n.useRef(null);
|
|
154
|
+
A(o, i.disablePreventScroll), B(s, o);
|
|
155
155
|
var _ = G("z-index-modal");
|
|
156
|
-
return r = p(a), /* @__PURE__ */
|
|
156
|
+
return r = p(a), /* @__PURE__ */ n.createElement(l, r.cn("SOverlay", f({}, m({
|
|
157
157
|
ref: s,
|
|
158
158
|
zIndex: _
|
|
159
|
-
}, c))), /* @__PURE__ */
|
|
159
|
+
}, c))), /* @__PURE__ */ n.createElement(D, r.cn("OutsideClick", {
|
|
160
160
|
root: s,
|
|
161
161
|
onOutsideClick: t
|
|
162
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ n.createElement(e, r.cn("Children", {}))));
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
var c = arguments[0], r,
|
|
166
|
-
return r = p(i.styles), /* @__PURE__ */
|
|
164
|
+
function y(i) {
|
|
165
|
+
var c = arguments[0], r, l = C, e = i.Children, a = i.children, t = i.getI18nText, o = i.ghost;
|
|
166
|
+
return r = p(i.styles), /* @__PURE__ */ n.createElement(l, r.cn("SClose", f({}, m({
|
|
167
167
|
use: "tertiary",
|
|
168
168
|
size: "l",
|
|
169
169
|
theme: o ? "invert" : "muted",
|
|
170
170
|
"aria-label": t("close")
|
|
171
|
-
}, c))), a ? /* @__PURE__ */
|
|
171
|
+
}, c))), a ? /* @__PURE__ */ n.createElement(e, r.cn("Children", {})) : /* @__PURE__ */ n.createElement(C.Addon, {
|
|
172
172
|
ml: "7px",
|
|
173
173
|
mr: "7px"
|
|
174
|
-
}, /* @__PURE__ */
|
|
174
|
+
}, /* @__PURE__ */ n.createElement(R, r.cn("CloseIcon", {
|
|
175
175
|
title: t("close")
|
|
176
176
|
}))));
|
|
177
177
|
}
|
|
178
|
-
|
|
178
|
+
y.enhance = [H()];
|
|
179
179
|
function X(i) {
|
|
180
|
-
var c = arguments[0], r,
|
|
181
|
-
return
|
|
182
|
-
return
|
|
183
|
-
}), r = p(e), /* @__PURE__ */
|
|
180
|
+
var c = arguments[0], r, l = i.setHasTitle, e = i.styles, a = i.color, t = F, o = L();
|
|
181
|
+
return n.useEffect(function() {
|
|
182
|
+
return l();
|
|
183
|
+
}), r = p(e), /* @__PURE__ */ n.createElement(t, r.cn("STitle", f({}, m({
|
|
184
184
|
tag: "h2",
|
|
185
185
|
"use:color": o(a)
|
|
186
186
|
}, c))));
|
|
187
187
|
}
|
|
188
|
-
var
|
|
188
|
+
var v = E(u, {
|
|
189
189
|
Window: Q,
|
|
190
190
|
Overlay: U,
|
|
191
|
-
Close:
|
|
191
|
+
Close: y,
|
|
192
192
|
Title: X
|
|
193
193
|
});
|
|
194
194
|
export {
|
|
195
|
-
|
|
195
|
+
v 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.
|
|
4
|
+
"version": "4.55.0-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,7 +14,7 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "5.
|
|
17
|
+
"@semcore/button": "5.43.0-prerelease.2",
|
|
18
18
|
"@semcore/animation": "2.41.1",
|
|
19
19
|
"@semcore/flex-box": "5.41.1",
|
|
20
20
|
"@semcore/icon": "4.60.1",
|