@semcore/modal 16.0.0-prerelease.4 → 16.0.0-prerelease.7
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/lib/esm/Modal.mjs +171 -141
- package/lib/esm/index.mjs +2 -2
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +30 -30
- package/lib/esm/translations/de.json.mjs +8 -6
- package/lib/esm/translations/en.json.mjs +8 -6
- package/lib/esm/translations/es.json.mjs +8 -6
- package/lib/esm/translations/fr.json.mjs +8 -6
- package/lib/esm/translations/it.json.mjs +8 -6
- package/lib/esm/translations/ja.json.mjs +8 -6
- package/lib/esm/translations/ko.json.mjs +8 -6
- package/lib/esm/translations/nl.json.mjs +8 -6
- package/lib/esm/translations/pl.json.mjs +8 -6
- package/lib/esm/translations/pt.json.mjs +8 -6
- package/lib/esm/translations/sv.json.mjs +8 -6
- package/lib/esm/translations/tr.json.mjs +8 -6
- package/lib/esm/translations/vi.json.mjs +8 -6
- package/lib/esm/translations/zh.json.mjs +8 -6
- package/package.json +9 -9
package/lib/esm/Modal.mjs
CHANGED
|
@@ -1,193 +1,223 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { sstyled
|
|
9
|
-
import
|
|
10
|
-
import { Slide
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { isAdvanceMode
|
|
18
|
-
import { localizedMessages
|
|
19
|
-
import
|
|
20
|
-
import { Text
|
|
21
|
-
import
|
|
22
|
-
import { cssVariableEnhance
|
|
23
|
-
import { useFocusLock
|
|
24
|
-
import { useContextTheme
|
|
25
|
-
import { useColorResolver
|
|
26
|
-
import { ZIndexStackingContextProvider
|
|
27
|
-
var
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import { sstyled, createComponent, assignProps, Component } from "@semcore/core";
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { Slide, FadeInOut } from "@semcore/animation";
|
|
11
|
+
import Portal, { PortalProvider } from "@semcore/portal";
|
|
12
|
+
import Button from "@semcore/button";
|
|
13
|
+
import OutsideClick from "@semcore/outside-click";
|
|
14
|
+
import CloseIcon from "@semcore/icon/Close/l";
|
|
15
|
+
import fire from "@semcore/core/lib/utils/fire";
|
|
16
|
+
import usePreventScroll from "@semcore/core/lib/utils/use/usePreventScroll";
|
|
17
|
+
import { isAdvanceMode } from "@semcore/core/lib/utils/findComponent";
|
|
18
|
+
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
19
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
20
|
+
import { Text } from "@semcore/typography";
|
|
21
|
+
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
22
|
+
import { cssVariableEnhance } from "@semcore/core/lib/utils/useCssVariable";
|
|
23
|
+
import { useFocusLock } from "@semcore/core/lib/utils/use/useFocusLock";
|
|
24
|
+
import { useContextTheme } from "@semcore/core/lib/utils/ThemeProvider";
|
|
25
|
+
import { useColorResolver } from "@semcore/core/lib/utils/use/useColorResolver";
|
|
26
|
+
import { ZIndexStackingContextProvider, useZIndexStacking } from "@semcore/core/lib/utils/zIndexStacking";
|
|
27
|
+
var style = (
|
|
28
28
|
/*__reshadow_css_start__*/
|
|
29
|
-
(
|
|
29
|
+
(sstyled.insert(
|
|
30
30
|
/*__inner_css_start__*/
|
|
31
31
|
".___SWindow_1galp_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_1galp_gg_:focus{outline:0}.___SWindow_1galp_gg_ .___STitle_1galp_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_1galp_gg_ .___STitle_1galp_gg_.__color_1galp_gg_{color:var(--color_1galp)}.___SWindow_1galp_gg_ .___SClose_1galp_gg_{display:inline-flex;position:absolute;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SWindow_1galp_gg_ .___SClose_1galp_gg_.__ghost_1galp_gg_{right:0;top:0}.___SWindow_1galp_gg_.__ghost_1galp_gg_{background:0 0;padding:0;box-shadow:none}.___SOverlay_1galp_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_1galp_gg_ .___SOverlay_1galp_gg_{background:var(--intergalactic-overlay-secondary, rgba(25, 27, 35, 0.4))}@media (max-width:767px){.___SWindow_1galp_gg_{min-width:60%}.___SOverlay_1galp_gg_{padding:var(--intergalactic-spacing-3x, 12px)}}",
|
|
32
32
|
"1galp_gg_"
|
|
33
33
|
), {
|
|
34
|
-
__SWindow: "___SWindow_1galp_gg_",
|
|
35
|
-
_ghost: "__ghost_1galp_gg_",
|
|
36
|
-
__SOverlay: "___SOverlay_1galp_gg_",
|
|
37
|
-
__STitle: "___STitle_1galp_gg_",
|
|
38
|
-
_color: "__color_1galp_gg_",
|
|
34
|
+
"__SWindow": "___SWindow_1galp_gg_",
|
|
35
|
+
"_ghost": "__ghost_1galp_gg_",
|
|
36
|
+
"__SOverlay": "___SOverlay_1galp_gg_",
|
|
37
|
+
"__STitle": "___STitle_1galp_gg_",
|
|
38
|
+
"_color": "__color_1galp_gg_",
|
|
39
39
|
"--color": "--color_1galp",
|
|
40
|
-
__SClose: "___SClose_1galp_gg_"
|
|
40
|
+
"__SClose": "___SClose_1galp_gg_"
|
|
41
41
|
})
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
);
|
|
43
|
+
var ModalRoot = /* @__PURE__ */ function(_Component) {
|
|
44
|
+
_inherits(ModalRoot2, _Component);
|
|
45
|
+
var _super = _createSuper(ModalRoot2);
|
|
46
|
+
function ModalRoot2() {
|
|
47
|
+
var _this;
|
|
48
|
+
_classCallCheck(this, ModalRoot2);
|
|
49
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
|
+
args[_key] = arguments[_key];
|
|
51
|
+
}
|
|
52
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
53
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
54
|
+
hasTitle: false
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function(e) {
|
|
57
|
+
if (e.key === "Escape") {
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
fire(_assertThisInitialized(_this), "onClose", "onEscape", e);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
_defineProperty(_assertThisInitialized(_this), "handleIconCloseClick", function(e) {
|
|
63
|
+
fire(_assertThisInitialized(_this), "onClose", "onCloseClick", e);
|
|
64
|
+
});
|
|
65
|
+
_defineProperty(_assertThisInitialized(_this), "handleOutsideClick", function(e) {
|
|
66
|
+
fire(_assertThisInitialized(_this), "onClose", "onOutsideClick", e);
|
|
67
|
+
});
|
|
68
|
+
return _this;
|
|
59
69
|
}
|
|
60
|
-
|
|
70
|
+
_createClass(ModalRoot2, [{
|
|
61
71
|
key: "getOverlayProps",
|
|
62
|
-
value: function() {
|
|
63
|
-
var
|
|
72
|
+
value: function getOverlayProps() {
|
|
73
|
+
var _this$asProps = this.asProps, duration = _this$asProps.duration, visible = _this$asProps.visible, animationsDisabled = _this$asProps.animationsDisabled, disablePreventScroll = _this$asProps.disablePreventScroll;
|
|
64
74
|
return {
|
|
65
|
-
duration
|
|
66
|
-
visible
|
|
75
|
+
duration,
|
|
76
|
+
visible,
|
|
67
77
|
onOutsideClick: this.handleOutsideClick,
|
|
68
|
-
animationsDisabled
|
|
69
|
-
disablePreventScroll
|
|
78
|
+
animationsDisabled,
|
|
79
|
+
disablePreventScroll
|
|
70
80
|
};
|
|
71
81
|
}
|
|
72
82
|
}, {
|
|
73
83
|
key: "getWindowProps",
|
|
74
|
-
value: function() {
|
|
75
|
-
var
|
|
84
|
+
value: function getWindowProps() {
|
|
85
|
+
var _this$asProps2 = this.asProps, visible = _this$asProps2.visible, closable = _this$asProps2.closable, getI18nText = _this$asProps2.getI18nText, uid = _this$asProps2.uid, duration = _this$asProps2.duration, animationsDisabled = _this$asProps2.animationsDisabled;
|
|
86
|
+
var hasTitle = this.state.hasTitle;
|
|
76
87
|
return {
|
|
77
|
-
visible
|
|
78
|
-
closable
|
|
88
|
+
visible,
|
|
89
|
+
closable,
|
|
79
90
|
onKeyDown: this.handleKeyDown,
|
|
80
|
-
"aria-label":
|
|
81
|
-
"aria-labelledby":
|
|
82
|
-
duration
|
|
83
|
-
animationsDisabled
|
|
91
|
+
"aria-label": hasTitle ? void 0 : getI18nText("title"),
|
|
92
|
+
"aria-labelledby": hasTitle ? "igc-".concat(uid, "-title") : void 0,
|
|
93
|
+
duration,
|
|
94
|
+
animationsDisabled
|
|
84
95
|
};
|
|
85
96
|
}
|
|
86
97
|
}, {
|
|
87
98
|
key: "getCloseProps",
|
|
88
|
-
value: function() {
|
|
89
|
-
var
|
|
99
|
+
value: function getCloseProps() {
|
|
100
|
+
var _this$asProps3 = this.asProps, getI18nText = _this$asProps3.getI18nText, ghost = _this$asProps3.ghost;
|
|
90
101
|
return {
|
|
91
102
|
onClick: this.handleIconCloseClick,
|
|
92
|
-
getI18nText
|
|
93
|
-
ghost
|
|
103
|
+
getI18nText,
|
|
104
|
+
ghost
|
|
94
105
|
};
|
|
95
106
|
}
|
|
96
107
|
}, {
|
|
97
108
|
key: "getTitleProps",
|
|
98
|
-
value: function() {
|
|
99
|
-
var
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
value: function getTitleProps() {
|
|
110
|
+
var _this2 = this;
|
|
111
|
+
var uid = this.asProps.uid;
|
|
112
|
+
var setHasTitle = function setHasTitle2() {
|
|
113
|
+
return _this2.setState({
|
|
114
|
+
hasTitle: true
|
|
102
115
|
});
|
|
103
116
|
};
|
|
104
117
|
return {
|
|
105
|
-
id: "igc-".concat(
|
|
106
|
-
setHasTitle
|
|
118
|
+
id: "igc-".concat(uid, "-title"),
|
|
119
|
+
setHasTitle
|
|
107
120
|
};
|
|
108
121
|
}
|
|
109
122
|
}, {
|
|
110
123
|
key: "render",
|
|
111
|
-
value: function() {
|
|
112
|
-
var
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
value: function render() {
|
|
125
|
+
var _ref = this.asProps;
|
|
126
|
+
var _this$asProps4 = this.asProps, Children = _this$asProps4.Children, disablePortal = _this$asProps4.disablePortal, forcedAdvancedMode = _this$asProps4.forcedAdvancedMode, ignorePortalsStacking = _this$asProps4.ignorePortalsStacking;
|
|
127
|
+
var advancedMode = forcedAdvancedMode || isAdvanceMode(Children, [Modal.Overlay.displayName, Modal.Window.displayName]);
|
|
128
|
+
return /* @__PURE__ */ React.createElement(Portal, {
|
|
129
|
+
disablePortal,
|
|
130
|
+
ignorePortalsStacking
|
|
131
|
+
}, advancedMode ? /* @__PURE__ */ React.createElement(Children, null) : /* @__PURE__ */ React.createElement(Modal.Overlay, null, /* @__PURE__ */ React.createElement(Modal.Window, assignProps({}, _ref))));
|
|
117
132
|
}
|
|
118
|
-
}])
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
}]);
|
|
134
|
+
return ModalRoot2;
|
|
135
|
+
}(Component);
|
|
136
|
+
_defineProperty(ModalRoot, "displayName", "Modal");
|
|
137
|
+
_defineProperty(ModalRoot, "style", style);
|
|
138
|
+
_defineProperty(ModalRoot, "enhance", [i18nEnhance(localizedMessages), uniqueIDEnhancement(), cssVariableEnhance({
|
|
123
139
|
variable: "--intergalactic-duration-modal",
|
|
124
140
|
fallback: "200",
|
|
125
141
|
map: Number.parseInt,
|
|
126
142
|
prop: "duration"
|
|
127
143
|
})]);
|
|
128
|
-
|
|
129
|
-
closable:
|
|
130
|
-
i18n:
|
|
144
|
+
_defineProperty(ModalRoot, "defaultProps", {
|
|
145
|
+
closable: true,
|
|
146
|
+
i18n: localizedMessages,
|
|
131
147
|
locale: "en",
|
|
132
|
-
disablePreventScroll:
|
|
148
|
+
disablePreventScroll: false
|
|
133
149
|
});
|
|
134
|
-
function
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
150
|
+
function Window(props) {
|
|
151
|
+
var _ref2 = arguments[0], _ref6;
|
|
152
|
+
var SWindow = Slide;
|
|
153
|
+
var Children = props.Children, styles = props.styles, visible = props.visible, closable = props.closable, duration = props.duration;
|
|
154
|
+
var windowRef = React.useRef(null);
|
|
155
|
+
useFocusLock(windowRef, true, "auto", !visible, true);
|
|
156
|
+
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SWindow, _ref6.cn("SWindow", _objectSpread({}, assignProps({
|
|
157
|
+
"initialAnimation": true,
|
|
158
|
+
"slideOrigin": "top",
|
|
159
|
+
"visible": visible,
|
|
160
|
+
"role": "dialog",
|
|
161
|
+
"aria-modal": true,
|
|
162
|
+
"duration": duration,
|
|
163
|
+
"ref": windowRef
|
|
164
|
+
}, _ref2))), /* @__PURE__ */ React.createElement(ZIndexStackingContextProvider, _ref6.cn("ZIndexStackingContextProvider", {
|
|
165
|
+
"designToken": "z-index-modal"
|
|
166
|
+
}), /* @__PURE__ */ React.createElement(PortalProvider, _ref6.cn("PortalProvider", {
|
|
167
|
+
"value": windowRef
|
|
168
|
+
}), closable && /* @__PURE__ */ React.createElement(Modal.Close, null), /* @__PURE__ */ React.createElement(Children, _ref6.cn("Children", {})))));
|
|
149
169
|
}
|
|
150
|
-
function
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
170
|
+
function Overlay(props) {
|
|
171
|
+
var _ref3 = arguments[0], _ref7;
|
|
172
|
+
var SOverlay = FadeInOut;
|
|
173
|
+
var Children = props.Children, styles = props.styles, onOutsideClick = props.onOutsideClick, visible = props.visible;
|
|
174
|
+
var overlayRef = React.useRef(null);
|
|
175
|
+
usePreventScroll(visible, props.disablePreventScroll);
|
|
176
|
+
useContextTheme(overlayRef, visible);
|
|
177
|
+
var zIndex = useZIndexStacking("z-index-modal");
|
|
178
|
+
return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SOverlay, _ref7.cn("SOverlay", _objectSpread({}, assignProps({
|
|
179
|
+
"ref": overlayRef,
|
|
180
|
+
"zIndex": zIndex
|
|
181
|
+
}, _ref3))), /* @__PURE__ */ React.createElement(OutsideClick, _ref7.cn("OutsideClick", {
|
|
182
|
+
"root": overlayRef,
|
|
183
|
+
"onOutsideClick": onOutsideClick
|
|
184
|
+
}), /* @__PURE__ */ React.createElement(Children, _ref7.cn("Children", {}))));
|
|
161
185
|
}
|
|
162
|
-
function
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"
|
|
169
|
-
|
|
186
|
+
function Close(props) {
|
|
187
|
+
var _ref4 = arguments[0], _ref8;
|
|
188
|
+
var SClose = Button;
|
|
189
|
+
var Children = props.Children, hasChildren = props.children, getI18nText = props.getI18nText, ghost = props.ghost;
|
|
190
|
+
return _ref8 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SClose, _ref8.cn("SClose", _objectSpread({}, assignProps({
|
|
191
|
+
"use": "tertiary",
|
|
192
|
+
"size": "l",
|
|
193
|
+
"theme": ghost ? "invert" : "muted",
|
|
194
|
+
"aria-label": getI18nText("close")
|
|
195
|
+
}, _ref4))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {})) : /* @__PURE__ */ React.createElement(Button.Addon, {
|
|
170
196
|
ml: "7px",
|
|
171
197
|
mr: "7px"
|
|
172
|
-
}, /* @__PURE__ */
|
|
173
|
-
title:
|
|
198
|
+
}, /* @__PURE__ */ React.createElement(CloseIcon, _ref8.cn("CloseIcon", {
|
|
199
|
+
"title": getI18nText("close")
|
|
174
200
|
}))));
|
|
175
201
|
}
|
|
176
|
-
function
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
202
|
+
function Title(props) {
|
|
203
|
+
var _ref5 = arguments[0], _ref9;
|
|
204
|
+
var setHasTitle = props.setHasTitle, styles = props.styles, color = props.color;
|
|
205
|
+
var STitle = Text;
|
|
206
|
+
var resolveColor = useColorResolver();
|
|
207
|
+
React.useEffect(function() {
|
|
208
|
+
return setHasTitle();
|
|
209
|
+
});
|
|
210
|
+
return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref9.cn("STitle", _objectSpread({}, assignProps({
|
|
211
|
+
"tag": "h2",
|
|
212
|
+
"use:color": resolveColor(color)
|
|
213
|
+
}, _ref5))));
|
|
184
214
|
}
|
|
185
|
-
var
|
|
186
|
-
Window
|
|
187
|
-
Overlay
|
|
188
|
-
Close
|
|
189
|
-
Title
|
|
215
|
+
var Modal = createComponent(ModalRoot, {
|
|
216
|
+
Window,
|
|
217
|
+
Overlay,
|
|
218
|
+
Close,
|
|
219
|
+
Title
|
|
190
220
|
});
|
|
191
221
|
export {
|
|
192
|
-
|
|
222
|
+
Modal as default
|
|
193
223
|
};
|
package/lib/esm/index.mjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
var
|
|
16
|
-
de
|
|
17
|
-
en
|
|
18
|
-
es
|
|
19
|
-
fr
|
|
20
|
-
it
|
|
21
|
-
ja
|
|
22
|
-
ko
|
|
23
|
-
nl
|
|
24
|
-
pt
|
|
25
|
-
tr
|
|
26
|
-
vi
|
|
27
|
-
zh
|
|
28
|
-
pl
|
|
29
|
-
sv
|
|
1
|
+
import de from "./de.json.mjs";
|
|
2
|
+
import en from "./en.json.mjs";
|
|
3
|
+
import es from "./es.json.mjs";
|
|
4
|
+
import fr from "./fr.json.mjs";
|
|
5
|
+
import it from "./it.json.mjs";
|
|
6
|
+
import ja from "./ja.json.mjs";
|
|
7
|
+
import ko from "./ko.json.mjs";
|
|
8
|
+
import nl from "./nl.json.mjs";
|
|
9
|
+
import pt from "./pt.json.mjs";
|
|
10
|
+
import tr from "./tr.json.mjs";
|
|
11
|
+
import vi from "./vi.json.mjs";
|
|
12
|
+
import zh from "./zh.json.mjs";
|
|
13
|
+
import pl from "./pl.json.mjs";
|
|
14
|
+
import sv from "./sv.json.mjs";
|
|
15
|
+
var localizedMessages = {
|
|
16
|
+
de,
|
|
17
|
+
en,
|
|
18
|
+
es,
|
|
19
|
+
fr,
|
|
20
|
+
it,
|
|
21
|
+
ja,
|
|
22
|
+
ko,
|
|
23
|
+
nl,
|
|
24
|
+
pt,
|
|
25
|
+
tr,
|
|
26
|
+
vi,
|
|
27
|
+
zh,
|
|
28
|
+
pl,
|
|
29
|
+
sv
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
localizedMessages
|
|
33
33
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Dialogfenster";
|
|
2
|
+
const close = "Schließen";
|
|
3
|
+
const de = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
de as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Modal window";
|
|
2
|
+
const close = "Close";
|
|
3
|
+
const en = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
en as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Ventana modal";
|
|
2
|
+
const close = "Cerrar";
|
|
3
|
+
const es = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
es as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Fenêtre modale";
|
|
2
|
+
const close = "Fermer";
|
|
3
|
+
const fr = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
fr as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Finestra modale";
|
|
2
|
+
const close = "Chiudi";
|
|
3
|
+
const it = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
it as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Modaal venster";
|
|
2
|
+
const close = "Sluiten";
|
|
3
|
+
const nl = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
nl as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Okno modalne";
|
|
2
|
+
const close = "Zamknij";
|
|
3
|
+
const pl = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
pl as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Janela modal";
|
|
2
|
+
const close = "Fechar";
|
|
3
|
+
const pt = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
pt as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Modalt fönster";
|
|
2
|
+
const close = "Stäng";
|
|
3
|
+
const sv = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
sv as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Modal pencere";
|
|
2
|
+
const close = "Kapat";
|
|
3
|
+
const tr = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
tr as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const title = "Cửa sổ phương thức";
|
|
2
|
+
const close = "Đóng";
|
|
3
|
+
const vi = {
|
|
4
|
+
title,
|
|
5
|
+
close
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
close,
|
|
9
|
+
vi as default,
|
|
10
|
+
title
|
|
9
11
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/modal",
|
|
3
3
|
"description": "Semrush Modal Component",
|
|
4
|
-
"version": "16.0.0-prerelease.
|
|
4
|
+
"version": "16.0.0-prerelease.7",
|
|
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.0-prerelease.
|
|
18
|
-
"@semcore/icon": "16.0.0-prerelease.
|
|
19
|
-
"@semcore/typography": "16.0.0-prerelease.
|
|
20
|
-
"@semcore/animation": "16.0.0-prerelease.
|
|
21
|
-
"@semcore/flex-box": "16.0.0-prerelease.
|
|
22
|
-
"@semcore/outside-click": "16.0.0-prerelease.
|
|
23
|
-
"@semcore/portal": "16.0.0-prerelease.
|
|
17
|
+
"@semcore/button": "16.0.0-prerelease.7",
|
|
18
|
+
"@semcore/icon": "16.0.0-prerelease.7",
|
|
19
|
+
"@semcore/typography": "16.0.0-prerelease.7",
|
|
20
|
+
"@semcore/animation": "16.0.0-prerelease.7",
|
|
21
|
+
"@semcore/flex-box": "16.0.0-prerelease.7",
|
|
22
|
+
"@semcore/outside-click": "16.0.0-prerelease.7",
|
|
23
|
+
"@semcore/portal": "16.0.0-prerelease.7"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@semcore/base-components": "^16.0.0-prerelease.
|
|
26
|
+
"@semcore/base-components": "^16.0.0-prerelease.7"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|