@semcore/side-panel 16.1.1-prerelease.4 → 16.1.2-prerelease.1
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/README.md +1 -31
- package/lib/cjs/SidePanel.js +81 -82
- package/lib/cjs/SidePanel.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/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/SidePanel.js +79 -79
- package/lib/es6/SidePanel.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/SidePanel.mjs +79 -77
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/types/index.d.ts +7 -7
- package/package.json +10 -10
package/lib/esm/SidePanel.mjs
CHANGED
|
@@ -1,84 +1,87 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
7
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
7
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import Portal, { PortalProvider } from "@semcore/portal";
|
|
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 { isAdvanceMode } from "@semcore/core/lib/utils/findComponent";
|
|
9
|
+
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
10
|
+
import { Slide, FadeInOut } from "@semcore/animation";
|
|
11
|
+
import Button, { ButtonLink } from "@semcore/button";
|
|
12
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
17
13
|
import keyboardFocusEnhance from "@semcore/core/lib/utils/enhances/keyboardFocusEnhance";
|
|
14
|
+
import { isAdvanceMode } from "@semcore/core/lib/utils/findComponent";
|
|
15
|
+
import fire from "@semcore/core/lib/utils/fire";
|
|
16
|
+
import logger from "@semcore/core/lib/utils/logger";
|
|
17
|
+
import { useContextTheme } from "@semcore/core/lib/utils/ThemeProvider";
|
|
18
|
+
import { useFocusLock } from "@semcore/core/lib/utils/use/useFocusLock";
|
|
18
19
|
import usePreventScroll from "@semcore/core/lib/utils/use/usePreventScroll";
|
|
19
|
-
import { Text } from "@semcore/typography";
|
|
20
|
-
import ArrowLeft from "@semcore/icon/ArrowLeft/m";
|
|
21
|
-
import Button, { ButtonLink } from "@semcore/button";
|
|
22
20
|
import { cssVariableEnhance } from "@semcore/core/lib/utils/useCssVariable";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import
|
|
21
|
+
import { ZIndexStackingContextProvider, useZIndexStacking } from "@semcore/core/lib/utils/zIndexStacking";
|
|
22
|
+
import { Box, Flex } from "@semcore/flex-box";
|
|
23
|
+
import ArrowLeft from "@semcore/icon/ArrowLeft/m";
|
|
24
|
+
import CloseIcon from "@semcore/icon/Close/l";
|
|
25
|
+
import OutsideClick from "@semcore/outside-click";
|
|
26
|
+
import Portal, { PortalProvider } from "@semcore/portal";
|
|
27
|
+
import { Text } from "@semcore/typography";
|
|
28
|
+
import React from "react";
|
|
27
29
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
28
|
-
|
|
30
|
+
function _callSuper(t, o, e) {
|
|
31
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
32
|
+
}
|
|
29
33
|
/*!__reshadow-styles__:"./style/side-panel.shadow.css"*/
|
|
30
34
|
var style = (
|
|
31
35
|
/*__reshadow_css_start__*/
|
|
32
36
|
(sstyled.insert(
|
|
33
37
|
/*__inner_css_start__*/
|
|
34
|
-
".
|
|
38
|
+
".___SOverlay_1ojli_gg_{position:fixed;top:0;bottom:0;left:0;right:0;margin:0;display:flex;overflow:hidden;background:var(--intergalactic-overlay-primary, rgba(25, 27, 35, 0.7));-webkit-overflow-scrolling:touch;color:var(--intergalactic-text-primary, #191b23)}.___SPanel_1ojli_gg_{display:flex;flex-direction:column;width:260px;outline:0;font-family:inherit;position:fixed;box-sizing:border-box;will-change:transform;background:var(--intergalactic-bg-primary-neutral, #ffffff);z-index:1}.___SPanel_1ojli_gg_._placement_right_1ojli_gg_,.___SPanel_1ojli_gg_._placement_top_1ojli_gg_{box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));top:0}.___SPanel_1ojli_gg_._placement_top_1ojli_gg_{width:100%;margin-bottom:auto;left:0}.___SPanel_1ojli_gg_._placement_right_1ojli_gg_{height:100vh;margin-left:auto;right:0}.___SPanel_1ojli_gg_._placement_bottom_1ojli_gg_,.___SPanel_1ojli_gg_._placement_left_1ojli_gg_{box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));left:0}.___SPanel_1ojli_gg_._placement_bottom_1ojli_gg_{width:100%;margin-top:auto;bottom:0}.___SPanel_1ojli_gg_._placement_left_1ojli_gg_{height:100vh;margin-right:auto;top:0}.___SClose_1ojli_gg_{position:absolute;z-index:1;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_1ojli_gg_ .___SAddon_1ojli_gg_:only-child{margin-left:calc(var(--intergalactic-spacing-2x, 8px) - 1px);margin-right:calc(var(--intergalactic-spacing-2x, 8px) - 1px)}.___SBack_1ojli_gg_{max-width:100%}.___SBack_1ojli_gg_ .___SInner_1ojli_gg_{display:flex}.___SBack_1ojli_gg_ .___SBackText_1ojli_gg_,.___STitle_1ojli_gg_{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___STitle_1ojli_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);color:var(--intergalactic-text-primary, #191b23)}.___SHeader_1ojli_gg_{padding-left:var(--intergalactic-spacing-6x, 24px);margin-bottom:var(--intergalactic-spacing-1x, 4px);padding-right:calc(var(--intergalactic-spacing-10x, 40px) + var(--intergalactic-spacing-4x, 16px));margin-top:var(--intergalactic-spacing-1x, 4px);min-height:calc(var(--intergalactic-spacing-10x, 40px) + var(--intergalactic-spacing-3x, 12px));box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, #c4c7cf);box-sizing:border-box}.___SFooter_1ojli_gg_{min-height:44px;box-shadow:inset 0 1px 0 var(--intergalactic-border-primary, #c4c7cf);box-sizing:border-box}.___SBody_1ojli_gg_{height:100%;overflow:auto;padding-left:var(--intergalactic-spacing-6x, 24px);padding-bottom:var(--intergalactic-spacing-4x, 16px);padding-right:var(--intergalactic-spacing-6x, 24px);padding-top:var(--intergalactic-spacing-4x, 16px)}",
|
|
35
39
|
/*__inner_css_end__*/
|
|
36
|
-
"
|
|
40
|
+
"1ojli_gg_"
|
|
37
41
|
), /*__reshadow_css_end__*/
|
|
38
42
|
{
|
|
39
|
-
"__SOverlay": "
|
|
40
|
-
"__SPanel": "
|
|
41
|
-
"_placement_top": "
|
|
42
|
-
"_placement_right": "
|
|
43
|
-
"_placement_bottom": "
|
|
44
|
-
"_placement_left": "
|
|
45
|
-
"__STitle": "
|
|
46
|
-
"__SHeader": "
|
|
47
|
-
"__SFooter": "
|
|
48
|
-
"__SBody": "
|
|
49
|
-
"__SClose": "
|
|
50
|
-
"__SAddon": "
|
|
51
|
-
"__SBack": "
|
|
52
|
-
"__SInner": "
|
|
53
|
-
"__SBackText": "
|
|
43
|
+
"__SOverlay": "___SOverlay_1ojli_gg_",
|
|
44
|
+
"__SPanel": "___SPanel_1ojli_gg_",
|
|
45
|
+
"_placement_top": "_placement_top_1ojli_gg_",
|
|
46
|
+
"_placement_right": "_placement_right_1ojli_gg_",
|
|
47
|
+
"_placement_bottom": "_placement_bottom_1ojli_gg_",
|
|
48
|
+
"_placement_left": "_placement_left_1ojli_gg_",
|
|
49
|
+
"__STitle": "___STitle_1ojli_gg_",
|
|
50
|
+
"__SHeader": "___SHeader_1ojli_gg_",
|
|
51
|
+
"__SFooter": "___SFooter_1ojli_gg_",
|
|
52
|
+
"__SBody": "___SBody_1ojli_gg_",
|
|
53
|
+
"__SClose": "___SClose_1ojli_gg_",
|
|
54
|
+
"__SAddon": "___SAddon_1ojli_gg_",
|
|
55
|
+
"__SBack": "___SBack_1ojli_gg_",
|
|
56
|
+
"__SInner": "___SInner_1ojli_gg_",
|
|
57
|
+
"__SBackText": "___SBackText_1ojli_gg_"
|
|
54
58
|
})
|
|
55
59
|
);
|
|
56
60
|
var RootSidePanel = /* @__PURE__ */ function(_Component) {
|
|
57
|
-
_inherits(RootSidePanel2, _Component);
|
|
58
|
-
var _super = _createSuper(RootSidePanel2);
|
|
59
61
|
function RootSidePanel2() {
|
|
60
62
|
var _this;
|
|
61
63
|
_classCallCheck(this, RootSidePanel2);
|
|
62
64
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
63
65
|
args[_key] = arguments[_key];
|
|
64
66
|
}
|
|
65
|
-
_this =
|
|
66
|
-
_defineProperty(
|
|
67
|
-
_defineProperty(
|
|
67
|
+
_this = _callSuper(this, RootSidePanel2, [].concat(args));
|
|
68
|
+
_defineProperty(_this, "sidebarRef", /* @__PURE__ */ React.createRef());
|
|
69
|
+
_defineProperty(_this, "handleSidebarKeyDown", function(e) {
|
|
68
70
|
if (e.key === "Escape") {
|
|
69
71
|
e.stopPropagation();
|
|
70
|
-
fire(
|
|
72
|
+
fire(_this, "onClose", "onEscape", e);
|
|
71
73
|
}
|
|
72
74
|
});
|
|
73
|
-
_defineProperty(
|
|
74
|
-
fire(
|
|
75
|
+
_defineProperty(_this, "handleIconCloseClick", function(e) {
|
|
76
|
+
fire(_this, "onClose", "onCloseClick", e);
|
|
75
77
|
});
|
|
76
|
-
_defineProperty(
|
|
77
|
-
fire(
|
|
78
|
+
_defineProperty(_this, "handleOutsideClick", function(e) {
|
|
79
|
+
fire(_this, "onClose", "onOutsideClick", e);
|
|
78
80
|
});
|
|
79
81
|
return _this;
|
|
80
82
|
}
|
|
81
|
-
|
|
83
|
+
_inherits(RootSidePanel2, _Component);
|
|
84
|
+
return _createClass(RootSidePanel2, [{
|
|
82
85
|
key: "isAdvanceMode",
|
|
83
86
|
value: function isAdvanceMode$1() {
|
|
84
87
|
return isAdvanceMode(this.asProps.Children, [SidePanel.Overlay.displayName, SidePanel.Panel.displayName]);
|
|
@@ -107,10 +110,10 @@ var RootSidePanel = /* @__PURE__ */ function(_Component) {
|
|
|
107
110
|
visible,
|
|
108
111
|
placement,
|
|
109
112
|
closable,
|
|
110
|
-
duration: duration + duration / 2,
|
|
111
|
-
disableEnforceFocus: !this.isUsedOverlay(),
|
|
112
|
-
onOutsideClick: this.handleOutsideClick,
|
|
113
|
-
onKeyDown: this.handleSidebarKeyDown,
|
|
113
|
+
"duration": duration + duration / 2,
|
|
114
|
+
"disableEnforceFocus": !this.isUsedOverlay(),
|
|
115
|
+
"onOutsideClick": this.handleOutsideClick,
|
|
116
|
+
"onKeyDown": this.handleSidebarKeyDown,
|
|
114
117
|
animationsDisabled,
|
|
115
118
|
"aria-label": ariaLabel,
|
|
116
119
|
"aria-labelledby": ariaLabelledBy
|
|
@@ -135,7 +138,6 @@ var RootSidePanel = /* @__PURE__ */ function(_Component) {
|
|
|
135
138
|
}, this.isAdvanceMode() ? /* @__PURE__ */ React.createElement(Children, null) : /* @__PURE__ */ React.createElement(SidePanel.Overlay, null, /* @__PURE__ */ React.createElement(SidePanel.Panel, assignProps({}, _ref))));
|
|
136
139
|
}
|
|
137
140
|
}]);
|
|
138
|
-
return RootSidePanel2;
|
|
139
141
|
}(Component);
|
|
140
142
|
_defineProperty(RootSidePanel, "displayName", "SidePanel");
|
|
141
143
|
_defineProperty(RootSidePanel, "style", style);
|
|
@@ -151,19 +153,19 @@ _defineProperty(RootSidePanel, "defaultProps", {
|
|
|
151
153
|
disablePreventScroll: false
|
|
152
154
|
});
|
|
153
155
|
function Overlay(props) {
|
|
154
|
-
var _ref2 = arguments[0],
|
|
156
|
+
var _ref2 = arguments[0], _ref0;
|
|
155
157
|
var SOverlay = FadeInOut;
|
|
156
158
|
var overlayRef = React.useRef(null);
|
|
157
159
|
usePreventScroll(props.visible, props.disablePreventScroll);
|
|
158
160
|
useContextTheme(overlayRef, props.visible);
|
|
159
161
|
var zIndex = useZIndexStacking("z-index-modal");
|
|
160
|
-
return
|
|
162
|
+
return _ref0 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SOverlay, _ref0.cn("SOverlay", _objectSpread({}, assignProps({
|
|
161
163
|
"ref": overlayRef,
|
|
162
164
|
"zIndex": zIndex
|
|
163
165
|
}, _ref2))));
|
|
164
166
|
}
|
|
165
167
|
function Panel(props) {
|
|
166
|
-
var _ref3 = arguments[0],
|
|
168
|
+
var _ref3 = arguments[0], _ref1;
|
|
167
169
|
var SPanel = Slide;
|
|
168
170
|
var Children = props.Children, styles = props.styles, visible = props.visible, closable = props.closable, placement = props.placement, onOutsideClick = props.onOutsideClick, forcedAdvancedMode = props.forcedAdvancedMode;
|
|
169
171
|
var advancedMode = forcedAdvancedMode || isAdvanceMode(Children, [SidePanel.Header.displayName, SidePanel.Body.displayName, SidePanel.Footer.displayName]);
|
|
@@ -171,74 +173,74 @@ function Panel(props) {
|
|
|
171
173
|
useFocusLock(sidebarRef, true, "auto", !visible, true);
|
|
172
174
|
var hasLabel = Boolean(props["aria-label"] || props["aria-labelledby"]);
|
|
173
175
|
logger.warn(!hasLabel, "'aria-label' or 'aria-labelledby' are required for SidePanel component", props["data-ui-name"] || Panel.displayName);
|
|
174
|
-
return
|
|
176
|
+
return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, visible && /* @__PURE__ */ React.createElement(OutsideClick, _ref1.cn("OutsideClick", {
|
|
175
177
|
"onOutsideClick": onOutsideClick,
|
|
176
178
|
"excludeRefs": [sidebarRef]
|
|
177
|
-
})), /* @__PURE__ */ React.createElement(SPanel,
|
|
179
|
+
})), /* @__PURE__ */ React.createElement(SPanel, _ref1.cn("SPanel", _objectSpread({}, assignProps({
|
|
178
180
|
"visible": visible,
|
|
179
181
|
"initialAnimation": true,
|
|
180
182
|
"slideOrigin": placement,
|
|
181
183
|
"ref": sidebarRef,
|
|
182
184
|
"role": "dialog",
|
|
183
185
|
"aria-modal": "true"
|
|
184
|
-
}, _ref3))), /* @__PURE__ */ React.createElement(ZIndexStackingContextProvider,
|
|
186
|
+
}, _ref3))), /* @__PURE__ */ React.createElement(ZIndexStackingContextProvider, _ref1.cn("ZIndexStackingContextProvider", {
|
|
185
187
|
"designToken": "z-index-modal"
|
|
186
|
-
}), /* @__PURE__ */ React.createElement(PortalProvider,
|
|
188
|
+
}), /* @__PURE__ */ React.createElement(PortalProvider, _ref1.cn("PortalProvider", {
|
|
187
189
|
"value": sidebarRef
|
|
188
|
-
}), closable && /* @__PURE__ */ React.createElement(SidePanel.Close, null), advancedMode ? /* @__PURE__ */ React.createElement(Children,
|
|
190
|
+
}), closable && /* @__PURE__ */ React.createElement(SidePanel.Close, null), advancedMode ? /* @__PURE__ */ React.createElement(Children, _ref1.cn("Children", {})) : /* @__PURE__ */ React.createElement(SidePanel.Body, null, /* @__PURE__ */ React.createElement(Children, _ref1.cn("Children", {})))))));
|
|
189
191
|
}
|
|
190
192
|
function Footer(props) {
|
|
191
|
-
var _ref4 = arguments[0],
|
|
193
|
+
var _ref4 = arguments[0], _ref10;
|
|
192
194
|
var SFooter = Flex;
|
|
193
|
-
return
|
|
195
|
+
return _ref10 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SFooter, _ref10.cn("SFooter", _objectSpread({}, assignProps({
|
|
194
196
|
"tag": "footer"
|
|
195
197
|
}, _ref4))));
|
|
196
198
|
}
|
|
197
|
-
function Close(
|
|
198
|
-
var _ref5 = arguments[0],
|
|
199
|
-
var styles =
|
|
199
|
+
function Close(_ref16) {
|
|
200
|
+
var _ref5 = arguments[0], _ref11;
|
|
201
|
+
var styles = _ref16.styles, hasChildren = _ref16.children, Children = _ref16.Children, getI18nText = _ref16.getI18nText;
|
|
200
202
|
var SClose = Button;
|
|
201
|
-
return
|
|
203
|
+
return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SClose, _ref11.cn("SClose", _objectSpread({}, assignProps({
|
|
202
204
|
"aria-label": getI18nText("close"),
|
|
203
205
|
"use": "tertiary",
|
|
204
206
|
"theme": "muted",
|
|
205
207
|
"size": "l",
|
|
206
208
|
"addonLeft": hasChildren ? void 0 : CloseIcon
|
|
207
|
-
}, _ref5))), hasChildren ? /* @__PURE__ */ React.createElement(Children,
|
|
209
|
+
}, _ref5))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref11.cn("Children", {})) : void 0);
|
|
208
210
|
}
|
|
209
211
|
Close.enhance = [keyboardFocusEnhance()];
|
|
210
212
|
function Title(props) {
|
|
211
|
-
var _ref6 = arguments[0],
|
|
213
|
+
var _ref6 = arguments[0], _ref12;
|
|
212
214
|
var STitle = Text;
|
|
213
|
-
return
|
|
215
|
+
return _ref12 = sstyled(props.styles), /* @__PURE__ */ React.createElement(STitle, _ref12.cn("STitle", _objectSpread({}, assignProps({
|
|
214
216
|
"tag": "h6"
|
|
215
217
|
}, _ref6))));
|
|
216
218
|
}
|
|
217
219
|
function Back(props) {
|
|
218
|
-
var _ref7 = arguments[0],
|
|
220
|
+
var _ref7 = arguments[0], _ref13;
|
|
219
221
|
var SBack = ButtonLink;
|
|
220
222
|
var SBackText = ButtonLink.Text;
|
|
221
223
|
var Children = props.Children, styles = props.styles;
|
|
222
|
-
return
|
|
224
|
+
return _ref13 = sstyled(styles), /* @__PURE__ */ React.createElement(SBack, _ref13.cn("SBack", _objectSpread({}, assignProps({
|
|
223
225
|
"color": "text-hint",
|
|
224
226
|
"size": 100,
|
|
225
227
|
"addonLeft": ArrowLeft
|
|
226
|
-
}, _ref7))), /* @__PURE__ */ React.createElement(SBackText,
|
|
228
|
+
}, _ref7))), /* @__PURE__ */ React.createElement(SBackText, _ref13.cn("SBackText", {}), /* @__PURE__ */ React.createElement(Children, _ref13.cn("Children", {}))));
|
|
227
229
|
}
|
|
228
230
|
function Body(props) {
|
|
229
|
-
var _ref8 = arguments[0],
|
|
231
|
+
var _ref8 = arguments[0], _ref14;
|
|
230
232
|
var SBody = Box;
|
|
231
|
-
return
|
|
233
|
+
return _ref14 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SBody, _ref14.cn("SBody", _objectSpread({}, assignProps({}, _ref8))));
|
|
232
234
|
}
|
|
233
235
|
function Header(props) {
|
|
234
|
-
var _ref9 = arguments[0],
|
|
236
|
+
var _ref9 = arguments[0], _ref15;
|
|
235
237
|
var SHeader = Box;
|
|
236
238
|
var Children = props.Children, styles = props.styles, title = props.title;
|
|
237
|
-
return
|
|
239
|
+
return _ref15 = sstyled(styles), /* @__PURE__ */ React.createElement(SHeader, _ref15.cn("SHeader", _objectSpread({}, assignProps({
|
|
238
240
|
"tag": "header"
|
|
239
241
|
}, _ref9))), title && /* @__PURE__ */ React.createElement(SidePanel.Title, {
|
|
240
242
|
children: title
|
|
241
|
-
}), /* @__PURE__ */ React.createElement(Children,
|
|
243
|
+
}), /* @__PURE__ */ React.createElement(Children, _ref15.cn("Children", {})));
|
|
242
244
|
}
|
|
243
245
|
var SidePanel = createComponent(RootSidePanel, {
|
|
244
246
|
Overlay,
|
|
@@ -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,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Text } from '@semcore/typography';
|
|
7
|
-
import
|
|
1
|
+
import type { FadeInOutProps, SlideProps } from '@semcore/animation';
|
|
2
|
+
import type Button from '@semcore/button';
|
|
3
|
+
import type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
|
|
4
|
+
import type { Box, BoxProps, Flex } from '@semcore/flex-box';
|
|
5
|
+
import type { PortalProps } from '@semcore/portal';
|
|
6
|
+
import type { Text } from '@semcore/typography';
|
|
7
|
+
import type React from 'react';
|
|
8
8
|
|
|
9
9
|
export type OnCloseTriggerType = 'onOutsideClick' | 'onEscape' | 'onCloseClick';
|
|
10
10
|
export type OnCloseType = (
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/side-panel",
|
|
3
3
|
"description": "Semrush SidePanel Component",
|
|
4
|
-
"version": "16.1.
|
|
4
|
+
"version": "16.1.2-prerelease.1",
|
|
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/animation": "16.0.
|
|
18
|
-
"@semcore/button": "16.0.
|
|
19
|
-
"@semcore/flex-box": "16.0.
|
|
20
|
-
"@semcore/portal": "16.0.
|
|
21
|
-
"@semcore/outside-click": "16.0.
|
|
22
|
-
"@semcore/typography": "16.1.
|
|
23
|
-
"@semcore/icon": "16.2.
|
|
17
|
+
"@semcore/animation": "16.0.2-prerelease.1",
|
|
18
|
+
"@semcore/button": "16.0.2-prerelease.1",
|
|
19
|
+
"@semcore/flex-box": "16.0.2-prerelease.1",
|
|
20
|
+
"@semcore/portal": "16.0.2-prerelease.1",
|
|
21
|
+
"@semcore/outside-click": "16.0.2-prerelease.1",
|
|
22
|
+
"@semcore/typography": "16.1.2-prerelease.1",
|
|
23
|
+
"@semcore/icon": "16.2.1-prerelease.1"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@semcore/base-components": "^16.0.
|
|
26
|
+
"@semcore/base-components": "^16.0.2-prerelease.1"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"directory": "semcore/side-panel"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@
|
|
34
|
+
"@semcore/core": "16.0.0",
|
|
35
35
|
"@semcore/testing-utils": "1.0.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|