@semcore/notice-bubble 16.2.0-prerelease.6 → 16.2.1-prerelease.4
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 +7 -0
- package/lib/cjs/NoticeBubble.js +21 -23
- package/lib/cjs/NoticeBubble.js.map +1 -1
- package/lib/cjs/NoticeBubble.type.js.map +1 -1
- package/lib/es6/NoticeBubble.js +16 -18
- package/lib/es6/NoticeBubble.js.map +1 -1
- package/lib/es6/NoticeBubble.type.js.map +1 -1
- package/lib/esm/NoticeBubble.mjs +17 -19
- package/lib/types/NoticeBubble.type.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [16.2.1] - 2026-01-19
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `containerNode` property type. Added the ability to specify the null
|
|
10
|
+
type.
|
|
11
|
+
|
|
5
12
|
## [16.2.0] - 2025-12-01
|
|
6
13
|
|
|
7
14
|
### Added
|
package/lib/cjs/NoticeBubble.js
CHANGED
|
@@ -26,32 +26,30 @@ var _ThemeProvider = require("@semcore/core/lib/utils/ThemeProvider");
|
|
|
26
26
|
var _useFocusLock = require("@semcore/core/lib/utils/use/useFocusLock");
|
|
27
27
|
var _useCssVariable = require("@semcore/core/lib/utils/useCssVariable");
|
|
28
28
|
var _zIndexStacking = require("@semcore/core/lib/utils/zIndexStacking");
|
|
29
|
-
var _flexBox = require("@semcore/flex-box");
|
|
30
29
|
var _m = _interopRequireDefault(require("@semcore/icon/Close/m"));
|
|
31
|
-
var _portal = _interopRequireDefault(require("@semcore/portal"));
|
|
32
30
|
var _react = _interopRequireDefault(require("react"));
|
|
33
31
|
var _NoticeBubbleManager = _interopRequireDefault(require("./NoticeBubbleManager"));
|
|
34
32
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
35
33
|
var _utils = require("./utils");
|
|
36
34
|
var _excluded = ["focusLock"];
|
|
37
35
|
/*!__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
|
|
38
|
-
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
36
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes enter_3nrqr{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_3nrqr{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_3nrqr_gg_,.___SView_3nrqr_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px);padding-right:calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-1x, 4px));width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_3nrqr_gg_._type_info_3nrqr_gg_,.___SView_3nrqr_gg_._type_info_3nrqr_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_3nrqr_gg_._type_warning_3nrqr_gg_,.___SView_3nrqr_gg_._type_warning_3nrqr_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_3nrqr_gg_{flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);flex:1}.___SMessage_3nrqr_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SDismiss_3nrqr_gg_{cursor:pointer;position:absolute;right:0;top:0;margin-top:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:var(--intergalactic-spacing-2x, 8px);flex-shrink:0;border:0;background:0 0}.___SDismiss_3nrqr_gg_.__use_3nrqr_gg_{padding:0 1px}.___SIcon_3nrqr_gg_{justify-content:center;align-items:center;height:var(--intergalactic-spacing-5x, 20px)}.___SNoticeBubble_3nrqr_gg_{width:300px;position:fixed;right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_3nrqr_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SNoticeBubble_3nrqr_gg_.__disablePortal_3nrqr_gg_{position:sticky;margin-left:auto;height:0}.___SMessage_3nrqr_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}.___SNoticeAriaLiveWrapper_3nrqr_gg_{display:contents}", /*__inner_css_end__*/"3nrqr_gg_"),
|
|
39
37
|
/*__reshadow_css_end__*/
|
|
40
38
|
{
|
|
41
|
-
"__SContent": "
|
|
42
|
-
"__SMessage": "
|
|
43
|
-
"__SDismiss": "
|
|
44
|
-
"_use": "
|
|
45
|
-
"__SIcon": "
|
|
46
|
-
"__SNoticeBubble": "
|
|
47
|
-
"_disablePortal": "
|
|
48
|
-
"__SNoticeAriaLiveWrapper": "
|
|
49
|
-
"@enter": "
|
|
50
|
-
"@exit": "
|
|
51
|
-
"__SBubble": "
|
|
52
|
-
"__SView": "
|
|
53
|
-
"_type_info": "
|
|
54
|
-
"_type_warning": "
|
|
39
|
+
"__SContent": "___SContent_3nrqr_gg_",
|
|
40
|
+
"__SMessage": "___SMessage_3nrqr_gg_",
|
|
41
|
+
"__SDismiss": "___SDismiss_3nrqr_gg_",
|
|
42
|
+
"_use": "__use_3nrqr_gg_",
|
|
43
|
+
"__SIcon": "___SIcon_3nrqr_gg_",
|
|
44
|
+
"__SNoticeBubble": "___SNoticeBubble_3nrqr_gg_",
|
|
45
|
+
"_disablePortal": "__disablePortal_3nrqr_gg_",
|
|
46
|
+
"__SNoticeAriaLiveWrapper": "___SNoticeAriaLiveWrapper_3nrqr_gg_",
|
|
47
|
+
"@enter": "enter_3nrqr",
|
|
48
|
+
"@exit": "exit_3nrqr",
|
|
49
|
+
"__SBubble": "___SBubble_3nrqr_gg_",
|
|
50
|
+
"__SView": "___SView_3nrqr_gg_",
|
|
51
|
+
"_type_info": "_type_info_3nrqr_gg_",
|
|
52
|
+
"_type_warning": "_type_warning_3nrqr_gg_"
|
|
55
53
|
});
|
|
56
54
|
var NoticeBubbleContainerRoot = /*#__PURE__*/function (_Component) {
|
|
57
55
|
function NoticeBubbleContainerRoot() {
|
|
@@ -125,7 +123,7 @@ var NoticeBubbleContainerRoot = /*#__PURE__*/function (_Component) {
|
|
|
125
123
|
});
|
|
126
124
|
return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(_zIndexStacking.ZIndexStackingContextProvider, _ref3.cn("ZIndexStackingContextProvider", {
|
|
127
125
|
"designToken": 'z-index-notice-bubble'
|
|
128
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
126
|
+
}), /*#__PURE__*/_react["default"].createElement(_baseComponents.Portal, _ref3.cn("Portal", {
|
|
129
127
|
"disablePortal": disablePortal
|
|
130
128
|
}), /*#__PURE__*/_react["default"].createElement(SNoticeBubble, _ref3.cn("SNoticeBubble", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
131
129
|
"ref": ref,
|
|
@@ -178,7 +176,7 @@ var FocusLock = /*#__PURE__*/_react["default"].forwardRef(function (props, outer
|
|
|
178
176
|
var innerRef = _react["default"].useRef(null);
|
|
179
177
|
(0, _useFocusLock.useFocusLock)(innerRef, false, 'auto', !focusLock, true);
|
|
180
178
|
var ref = (0, _ref7.useForkRef)(outerRef, innerRef);
|
|
181
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
179
|
+
return /*#__PURE__*/_react["default"].createElement(_baseComponents.Flex, (0, _extends2["default"])({
|
|
182
180
|
ref: ref
|
|
183
181
|
}, other));
|
|
184
182
|
});
|
|
@@ -199,7 +197,7 @@ var PortalForNoticeItem = function PortalForNoticeItem(props) {
|
|
|
199
197
|
if (props.type === 'info') {
|
|
200
198
|
return /*#__PURE__*/_react["default"].createElement(_zIndexStacking.ZIndexStackingContextProvider, {
|
|
201
199
|
designToken: "z-index-notice-bubble"
|
|
202
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
200
|
+
}, /*#__PURE__*/_react["default"].createElement(_baseComponents.Portal, {
|
|
203
201
|
nodeToMount: props.containerNode
|
|
204
202
|
}, /*#__PURE__*/_react["default"].createElement(SNoticeAriaLiveWrapper, {
|
|
205
203
|
"aria-live": "polite"
|
|
@@ -207,7 +205,7 @@ var PortalForNoticeItem = function PortalForNoticeItem(props) {
|
|
|
207
205
|
}
|
|
208
206
|
return /*#__PURE__*/_react["default"].createElement(_zIndexStacking.ZIndexStackingContextProvider, {
|
|
209
207
|
designToken: "z-index-notice-bubble"
|
|
210
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
208
|
+
}, /*#__PURE__*/_react["default"].createElement(_baseComponents.Portal, {
|
|
211
209
|
nodeToMount: props.containerNode
|
|
212
210
|
}, /*#__PURE__*/_react["default"].createElement(Tag, props)));
|
|
213
211
|
};
|
|
@@ -293,10 +291,10 @@ var ViewInfo = /*#__PURE__*/function (_Component2) {
|
|
|
293
291
|
var _ref6;
|
|
294
292
|
var SBubble = FocusLock;
|
|
295
293
|
var SDismiss = _button["default"];
|
|
296
|
-
var SContent =
|
|
294
|
+
var SContent = _baseComponents.Flex;
|
|
297
295
|
var SMessage = 'div';
|
|
298
296
|
var SAction = 'div';
|
|
299
|
-
var SIcon =
|
|
297
|
+
var SIcon = _baseComponents.Flex;
|
|
300
298
|
var _this$props = this.props,
|
|
301
299
|
styles = _this$props.styles,
|
|
302
300
|
getI18nText = _this$props.getI18nText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoticeBubble.js","names":["_core","require","_baseComponents","_button","_interopRequireDefault","_i18nEnhance","_fire","_getFocusableIn","_isNode","_ref7","_ThemeProvider","_useFocusLock","_useCssVariable","_zIndexStacking","_flexBox","_m","_portal","_react","_NoticeBubbleManager","_intergalacticDynamicLocales","_utils","_excluded","style","sstyled","insert","NoticeBubbleContainerRoot","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","notices","infos","warnings","_unsubscribe","setState","forceUpdate","_inherits2","_createClass2","key","value","componentDidMount","asProps","manager","addListener","handleChange","render","_ref","_ref3","SNoticeBubble","Box","SNoticeAriaLiveWrapper","_this$asProps","Children","styles","disablePortal","getI18nText","ref","parentZIndexStacking","duration","containerNode","state","map","notice","_ref2","SView","type","ViewWarning","ViewInfo","createElement","PortalForNoticeItem","cn","_objectSpread2","uid","filter","ZIndexStackingContextProvider","assignProps","_ref4","_ref5","Component","i18nEnhance","localizedMessages","contextThemeEnhance","zIndexStackingEnhance","cssVariableEnhance","variable","fallback","v","Number","parseInt","prop","i18n","locale","FocusLock","React","forwardRef","props","outerRef","focusLock","other","_objectWithoutProperties2","innerRef","useRef","useFocusLock","useForkRef","Flex","_extends2","_React$useState","useState","_React$useState2","_slicedToArray2","showContent","setShowContent","useEffect","setTimeout","Tag","tag","designToken","nodeToMount","_Component2","_this2","_len2","_key2","createRef","e","fire","clearTimer","handleClose","timer","pause","resume","event","_this2$timer","_this2$ref$current","paused","rect","current","getBoundingClientRect","mouseInRect","clientX","left","right","clientY","top","bottom","_this3","Timer","document","body","addEventListener","handleBodyMouseMove","noticeElement","focusableNodes","getFocusableIn","node","closeButtonRef","setFocus","componentWillUnmount","removeEventListener","clear","_ref6","SBubble","SDismiss","Button","SContent","SMessage","SAction","SIcon","_this$props","visible","initialAnimation","animationDuration","icon","children","action","Animation","handleMouseEnter","handleMouseLeave","handleKeydown","undefined","Addon","CloseIcon","color","isNode","Fragment","_ViewInfo2","NoticeBubbleView","_Component3","_this4","_len3","_key3","_notice","add","remove","componentDidUpdate","update","NoticeBubbleWarningView","_NoticeBubbleView2","NoticeBubbleContainer","createComponent","Info","Warning","NoticeBubble","exports","NoticeBubbleWarning","_default"],"sources":["../../src/NoticeBubble.tsx"],"sourcesContent":["import { Animation, Box } from '@semcore/base-components';\nimport Button from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { Intergalactic } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport { getFocusableIn } from '@semcore/core/lib/utils/focus-lock/getFocusableIn';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport { contextThemeEnhance } from '@semcore/core/lib/utils/ThemeProvider';\nimport { useFocusLock, setFocus } from '@semcore/core/lib/utils/use/useFocusLock';\nimport { cssVariableEnhance } from '@semcore/core/lib/utils/useCssVariable';\nimport {\n ZIndexStackingContextProvider,\n zIndexStackingEnhance,\n} from '@semcore/core/lib/utils/zIndexStacking';\nimport { Flex } from '@semcore/flex-box';\nimport CloseIcon from '@semcore/icon/Close/m';\nimport Portal from '@semcore/portal';\nimport React from 'react';\n\nimport type {\n AddedNoticeMeta,\n NoticeBubbleContainerProps,\n NoticeBubbleProps,\n NoticeBubbleViewItemProps, NoticeBubbleWarningProps,\n} from './NoticeBubble.type';\nimport type { NoticeBubbleManager, NoticeItem } from './NoticeBubbleManager';\nimport manager from './NoticeBubbleManager';\nimport style from './style/notice-bubble.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { Timer } from './utils';\n\ntype State = {\n notices: NoticeItem[];\n infos: NoticeItem[];\n warnings: NoticeItem[];\n};\n\nclass NoticeBubbleContainerRoot extends Component<NoticeBubbleContainerProps, {}, State, typeof NoticeBubbleContainerRoot.enhance, typeof NoticeBubbleContainerRoot.defaultProps> {\n static displayName = 'NoticeBubbleContainer';\n static style = style;\n static enhance = [\n i18nEnhance(localizedMessages),\n contextThemeEnhance(),\n zIndexStackingEnhance('z-index-notice-bubble'),\n cssVariableEnhance<'duration', number, number>({\n variable: '--intergalactic-duration-popper',\n fallback: 200,\n map: (v: string) => Number.parseInt(v, 10),\n prop: 'duration',\n }),\n ] as const;\n\n static defaultProps = {\n manager,\n i18n: localizedMessages,\n locale: 'en',\n } as const;\n\n _unsubscribe: (() => void) | null = null;\n\n state: State = {\n notices: [],\n infos: [],\n warnings: [],\n };\n\n componentDidMount() {\n this._unsubscribe = this.asProps.manager.addListener(this.handleChange);\n }\n\n componentWillUnmount = () => {\n if (this._unsubscribe) {\n this._unsubscribe();\n }\n };\n\n handleChange = (notices: NoticeItem[]) => {\n this.setState({ notices });\n this.forceUpdate(); // need this, because somehow this component doesn't rerender event if the notices are different\n };\n\n render() {\n const SNoticeBubble = Root;\n const SNoticeAriaLiveWrapper = 'div';\n const { Children, styles, disablePortal, getI18nText, ref, parentZIndexStacking, duration, containerNode } =\n this.asProps;\n const { notices } = this.state;\n\n if (containerNode) {\n return notices.map((notice) => {\n const SView = notice.type === 'warning' ? ViewWarning : ViewInfo;\n\n return sstyled(styles)(\n <PortalForNoticeItem\n key={notice.uid}\n tag={SView}\n containerNode={containerNode}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n });\n }\n\n const infos = notices.filter((notice) => notice.type === 'info');\n const warnings = notices.filter((notice) => notice.type === 'warning');\n\n return sstyled(styles)(\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal disablePortal={disablePortal}>\n <SNoticeBubble\n render={Box}\n ref={ref}\n tag='section'\n role='region'\n aria-label={getI18nText('notification')}\n zIndex={parentZIndexStacking}\n >\n <Children />\n {warnings.map((notice) => {\n const SView = ViewWarning;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {infos.map((notice) => {\n const SView = ViewInfo;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n </SNoticeAriaLiveWrapper>\n </SNoticeBubble>\n </Portal>\n </ZIndexStackingContextProvider>,\n );\n }\n}\n\nconst FocusLock = React.forwardRef((props: any, outerRef: React.ForwardedRef<HTMLDivElement>) => {\n const { focusLock, ...other } = props;\n const innerRef = React.useRef<HTMLDivElement | null>(null);\n useFocusLock(innerRef, false, 'auto', !focusLock, true);\n const ref = useForkRef(outerRef, innerRef);\n\n return <Flex ref={ref} {...other} />;\n});\n\nconst PortalForNoticeItem = (props: NoticeBubbleViewItemProps & { containerNode: NodeByRef; tag: typeof ViewInfo }) => {\n const [showContent, setShowContent] = React.useState(false);\n\n // Show content for info notice in previously mounted node with aria-live polite\n React.useEffect(() => {\n setTimeout(() => {\n setShowContent(true);\n }, 200);\n }, []);\n\n const SNoticeAriaLiveWrapper = 'div';\n const Tag = props.tag;\n\n if (props.type === 'info') {\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {showContent && <Tag {...props} />}\n </SNoticeAriaLiveWrapper>\n </Portal>\n </ZIndexStackingContextProvider>\n );\n }\n\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <Tag {...props} />\n </Portal>\n </ZIndexStackingContextProvider>\n );\n};\n\nclass ViewInfo extends Component<NoticeBubbleViewItemProps> {\n timer: Timer | null = null;\n ref = React.createRef<HTMLDivElement>();\n closeButtonRef = React.createRef<HTMLButtonElement>();\n\n componentDidMount() {\n const { duration } = this.props;\n if (duration) {\n this.timer = new Timer(this.handleClose, duration);\n document.body.addEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n const noticeElement = this.ref.current;\n\n if (noticeElement) {\n const focusableNodes = getFocusableIn(noticeElement).filter(\n (node) => node !== this.closeButtonRef.current,\n );\n\n if (focusableNodes.length > 0) {\n setTimeout(() => setFocus(noticeElement), 0);\n }\n }\n }\n\n componentWillUnmount() {\n this.clearTimer();\n document.body.removeEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n clearTimer() {\n if (this.timer) {\n this.timer.clear();\n this.timer = null;\n }\n }\n\n handleClose = (e: React.SyntheticEvent) => {\n // because it might be called not only from the close icon click\n fire(this, 'onClose', e);\n this.clearTimer();\n };\n\n handleKeydown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n this.handleClose(e);\n }\n };\n\n handleMouseEnter = () => {\n if (!this.timer) return;\n this.timer.pause();\n };\n\n handleMouseLeave = () => {\n if (!this.timer) return;\n this.timer.resume();\n };\n\n handleBodyMouseMove = (event: MouseEvent) => {\n if (!this.timer?.paused) return;\n const rect = this.ref.current?.getBoundingClientRect();\n if (!rect) return;\n const mouseInRect =\n event.clientX >= rect.left &&\n event.clientX <= rect.right &&\n event.clientY >= rect.top &&\n event.clientY <= rect.bottom;\n if (mouseInRect) return;\n this.timer.resume();\n };\n\n render() {\n const SBubble = FocusLock;\n const SDismiss = Button;\n const SContent = Flex;\n const SMessage = 'div';\n const SAction = 'div';\n const SIcon = Flex;\n const {\n styles,\n getI18nText,\n visible,\n type,\n initialAnimation,\n animationDuration,\n icon,\n children,\n action,\n focusLock,\n } = this.props;\n\n return sstyled(styles)(\n <Animation\n initialAnimation={initialAnimation}\n visible={visible ?? true}\n duration={animationDuration}\n // @ts-ignore\n keyframes={[styles['@enter'], styles['@exit']]}\n >\n <SBubble\n type={type}\n ref={this.ref}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onKeyDown={this.handleKeydown}\n role={type === 'warning' ? 'alert' : undefined}\n focusLock={focusLock}\n >\n <SDismiss\n aria-haspopup={undefined}\n type='button'\n use='tertiary'\n size='m'\n theme='invert'\n onClick={this.handleClose}\n aria-label={getI18nText('close')}\n active={false}\n title={getI18nText('close')}\n ref={this.closeButtonRef}\n data-hide-focus-hover-popper='true'\n >\n <Button.Addon tag={CloseIcon} color='icon-primary-invert' />\n </SDismiss>\n\n {isNode(icon)\n ? (\n <>\n <SIcon>{icon}</SIcon>\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n </>\n )\n : (\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n )}\n </SBubble>\n </Animation>,\n );\n }\n}\n\nclass ViewWarning extends ViewInfo {\n static defaultProps = {\n type: 'warning',\n duration: 0,\n };\n}\n\nclass NoticeBubbleView extends Component<{ manager: NoticeBubbleManager } & (NoticeBubbleProps | NoticeBubbleWarningProps)> {\n static defaultProps = {\n duration: 5000,\n type: 'info',\n manager,\n };\n\n _notice: null | AddedNoticeMeta = null;\n\n componentDidMount() {\n this._notice = this.asProps.manager.add(this.asProps);\n }\n\n componentWillUnmount() {\n if (this._notice) {\n this._notice.remove();\n }\n }\n\n componentDidUpdate() {\n if (this._notice) {\n this._notice.update(this.asProps);\n }\n }\n\n render() {\n return null;\n }\n}\n\nclass NoticeBubbleWarningView extends NoticeBubbleView {\n static defaultProps = {\n duration: 5000,\n type: 'warning',\n manager,\n };\n}\n\nconst NoticeBubbleContainer = createComponent(NoticeBubbleContainerRoot, {\n Info: NoticeBubbleView,\n Warning: NoticeBubbleWarningView,\n}) as Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n Info: typeof NoticeBubbleView;\n Warning: typeof NoticeBubbleWarningView;\n};\n\nconst NoticeBubble = NoticeBubbleContainer.Info;\nconst NoticeBubbleWarning = NoticeBubbleContainer.Warning;\n\nexport { NoticeBubble, NoticeBubbleWarning };\n\nexport default NoticeBubbleContainer;\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAG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D,gBAAA,aAAlC4J,gBAAgB,kBACE;EACpB/H,QAAQ,EAAE,IAAI;EACdO,IAAI,EAAE,MAAM;EACZvB,OAAO,EAAPA;AACF,CAAC;AAAA,IAyBGyJ,uBAAuB,0BAAAC,kBAAA;EAAA,SAAAD,wBAAA;IAAA,IAAA/K,gBAAA,mBAAA+K,uBAAA;IAAA,WAAAxK,WAAA,mBAAAwK,uBAAA,EAAA7K,SAAA;EAAA;EAAA,IAAAc,UAAA,aAAA+J,uBAAA,EAAAC,kBAAA;EAAA,WAAA/J,aAAA,aAAA8J,uBAAA;AAAA,EAASV,gBAAgB;AAAA,IAAA5J,gBAAA,aAAhDsK,uBAAuB,kBACL;EACpBzI,QAAQ,EAAE,IAAI;EACdO,IAAI,EAAE,SAAS;EACfvB,OAAO,EAAPA;AACF,CAAC;AAGH,IAAM2J,qBAAqB,GAAG,IAAAC,qBAAe,EAACrL,yBAAyB,EAAE;EACvEsL,IAAI,EAAEd,gBAAgB;EACtBe,OAAO,EAAEL;AACX,CAAC,CAGA;AAED,IAAMM,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGJ,qBAAqB,CAACE,IAAI;AAC/C,IAAMI,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAGN,qBAAqB,CAACG,OAAO;AAAC,IAAAI,QAAA,GAAAF,OAAA,cAI3CL,qBAAqB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"NoticeBubble.js","names":["_core","require","_baseComponents","_button","_interopRequireDefault","_i18nEnhance","_fire","_getFocusableIn","_isNode","_ref7","_ThemeProvider","_useFocusLock","_useCssVariable","_zIndexStacking","_m","_react","_NoticeBubbleManager","_intergalacticDynamicLocales","_utils","_excluded","style","sstyled","insert","NoticeBubbleContainerRoot","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","notices","infos","warnings","_unsubscribe","setState","forceUpdate","_inherits2","_createClass2","key","value","componentDidMount","asProps","manager","addListener","handleChange","render","_ref","_ref3","SNoticeBubble","Box","SNoticeAriaLiveWrapper","_this$asProps","Children","styles","disablePortal","getI18nText","ref","parentZIndexStacking","duration","containerNode","state","map","notice","_ref2","SView","type","ViewWarning","ViewInfo","createElement","PortalForNoticeItem","cn","_objectSpread2","uid","filter","ZIndexStackingContextProvider","Portal","assignProps","_ref4","_ref5","Component","i18nEnhance","localizedMessages","contextThemeEnhance","zIndexStackingEnhance","cssVariableEnhance","variable","fallback","v","Number","parseInt","prop","i18n","locale","FocusLock","React","forwardRef","props","outerRef","focusLock","other","_objectWithoutProperties2","innerRef","useRef","useFocusLock","useForkRef","Flex","_extends2","_React$useState","useState","_React$useState2","_slicedToArray2","showContent","setShowContent","useEffect","setTimeout","Tag","tag","designToken","nodeToMount","_Component2","_this2","_len2","_key2","createRef","e","fire","clearTimer","handleClose","timer","pause","resume","event","_this2$timer","_this2$ref$current","paused","rect","current","getBoundingClientRect","mouseInRect","clientX","left","right","clientY","top","bottom","_this3","Timer","document","body","addEventListener","handleBodyMouseMove","noticeElement","focusableNodes","getFocusableIn","node","closeButtonRef","setFocus","componentWillUnmount","removeEventListener","clear","_ref6","SBubble","SDismiss","Button","SContent","SMessage","SAction","SIcon","_this$props","visible","initialAnimation","animationDuration","icon","children","action","Animation","handleMouseEnter","handleMouseLeave","handleKeydown","undefined","Addon","CloseIcon","color","isNode","Fragment","_ViewInfo2","NoticeBubbleView","_Component3","_this4","_len3","_key3","_notice","add","remove","componentDidUpdate","update","NoticeBubbleWarningView","_NoticeBubbleView2","NoticeBubbleContainer","createComponent","Info","Warning","NoticeBubble","exports","NoticeBubbleWarning","_default"],"sources":["../../src/NoticeBubble.tsx"],"sourcesContent":["import { Animation, Box, Flex, Portal } from '@semcore/base-components';\nimport Button from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { Intergalactic } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport { getFocusableIn } from '@semcore/core/lib/utils/focus-lock/getFocusableIn';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport { contextThemeEnhance } from '@semcore/core/lib/utils/ThemeProvider';\nimport { useFocusLock, setFocus } from '@semcore/core/lib/utils/use/useFocusLock';\nimport { cssVariableEnhance } from '@semcore/core/lib/utils/useCssVariable';\nimport {\n ZIndexStackingContextProvider,\n zIndexStackingEnhance,\n} from '@semcore/core/lib/utils/zIndexStacking';\nimport CloseIcon from '@semcore/icon/Close/m';\nimport React from 'react';\n\nimport type {\n AddedNoticeMeta,\n NoticeBubbleContainerProps,\n NoticeBubbleProps,\n NoticeBubbleViewItemProps, NoticeBubbleWarningProps,\n} from './NoticeBubble.type';\nimport type { NoticeBubbleManager, NoticeItem } from './NoticeBubbleManager';\nimport manager from './NoticeBubbleManager';\nimport style from './style/notice-bubble.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { Timer } from './utils';\n\ntype State = {\n notices: NoticeItem[];\n infos: NoticeItem[];\n warnings: NoticeItem[];\n};\n\nclass NoticeBubbleContainerRoot extends Component<NoticeBubbleContainerProps, {}, State, typeof NoticeBubbleContainerRoot.enhance, typeof NoticeBubbleContainerRoot.defaultProps> {\n static displayName = 'NoticeBubbleContainer';\n static style = style;\n static enhance = [\n i18nEnhance(localizedMessages),\n contextThemeEnhance(),\n zIndexStackingEnhance('z-index-notice-bubble'),\n cssVariableEnhance<'duration', number, number>({\n variable: '--intergalactic-duration-popper',\n fallback: 200,\n map: (v: string) => Number.parseInt(v, 10),\n prop: 'duration',\n }),\n ] as const;\n\n static defaultProps = {\n manager,\n i18n: localizedMessages,\n locale: 'en',\n } as const;\n\n _unsubscribe: (() => void) | null = null;\n\n state: State = {\n notices: [],\n infos: [],\n warnings: [],\n };\n\n componentDidMount() {\n this._unsubscribe = this.asProps.manager.addListener(this.handleChange);\n }\n\n componentWillUnmount = () => {\n if (this._unsubscribe) {\n this._unsubscribe();\n }\n };\n\n handleChange = (notices: NoticeItem[]) => {\n this.setState({ notices });\n this.forceUpdate(); // need this, because somehow this component doesn't rerender event if the notices are different\n };\n\n render() {\n const SNoticeBubble = Root;\n const SNoticeAriaLiveWrapper = 'div';\n const { Children, styles, disablePortal, getI18nText, ref, parentZIndexStacking, duration, containerNode } =\n this.asProps;\n const { notices } = this.state;\n\n if (containerNode) {\n return notices.map((notice) => {\n const SView = notice.type === 'warning' ? ViewWarning : ViewInfo;\n\n return sstyled(styles)(\n <PortalForNoticeItem\n key={notice.uid}\n tag={SView}\n containerNode={containerNode}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n });\n }\n\n const infos = notices.filter((notice) => notice.type === 'info');\n const warnings = notices.filter((notice) => notice.type === 'warning');\n\n return sstyled(styles)(\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal disablePortal={disablePortal}>\n <SNoticeBubble\n render={Box}\n ref={ref}\n tag='section'\n role='region'\n aria-label={getI18nText('notification')}\n zIndex={parentZIndexStacking}\n >\n <Children />\n {warnings.map((notice) => {\n const SView = ViewWarning;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {infos.map((notice) => {\n const SView = ViewInfo;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n </SNoticeAriaLiveWrapper>\n </SNoticeBubble>\n </Portal>\n </ZIndexStackingContextProvider>,\n );\n }\n}\n\nconst FocusLock = React.forwardRef((props: any, outerRef: React.ForwardedRef<HTMLDivElement>) => {\n const { focusLock, ...other } = props;\n const innerRef = React.useRef<HTMLDivElement | null>(null);\n useFocusLock(innerRef, false, 'auto', !focusLock, true);\n const ref = useForkRef(outerRef, innerRef);\n\n return <Flex ref={ref} {...other} />;\n});\n\nconst PortalForNoticeItem = (props: NoticeBubbleViewItemProps & { containerNode: NodeByRef; tag: typeof ViewInfo }) => {\n const [showContent, setShowContent] = React.useState(false);\n\n // Show content for info notice in previously mounted node with aria-live polite\n React.useEffect(() => {\n setTimeout(() => {\n setShowContent(true);\n }, 200);\n }, []);\n\n const SNoticeAriaLiveWrapper = 'div';\n const Tag = props.tag;\n\n if (props.type === 'info') {\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {showContent && <Tag {...props} />}\n </SNoticeAriaLiveWrapper>\n </Portal>\n </ZIndexStackingContextProvider>\n );\n }\n\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <Tag {...props} />\n </Portal>\n </ZIndexStackingContextProvider>\n );\n};\n\nclass ViewInfo extends Component<NoticeBubbleViewItemProps> {\n timer: Timer | null = null;\n ref = React.createRef<HTMLDivElement>();\n closeButtonRef = React.createRef<HTMLButtonElement>();\n\n componentDidMount() {\n const { duration } = this.props;\n if (duration) {\n this.timer = new Timer(this.handleClose, duration);\n document.body.addEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n const noticeElement = this.ref.current;\n\n if (noticeElement) {\n const focusableNodes = getFocusableIn(noticeElement).filter(\n (node) => node !== this.closeButtonRef.current,\n );\n\n if (focusableNodes.length > 0) {\n setTimeout(() => setFocus(noticeElement), 0);\n }\n }\n }\n\n componentWillUnmount() {\n this.clearTimer();\n document.body.removeEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n clearTimer() {\n if (this.timer) {\n this.timer.clear();\n this.timer = null;\n }\n }\n\n handleClose = (e: React.SyntheticEvent) => {\n // because it might be called not only from the close icon click\n fire(this, 'onClose', e);\n this.clearTimer();\n };\n\n handleKeydown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n this.handleClose(e);\n }\n };\n\n handleMouseEnter = () => {\n if (!this.timer) return;\n this.timer.pause();\n };\n\n handleMouseLeave = () => {\n if (!this.timer) return;\n this.timer.resume();\n };\n\n handleBodyMouseMove = (event: MouseEvent) => {\n if (!this.timer?.paused) return;\n const rect = this.ref.current?.getBoundingClientRect();\n if (!rect) return;\n const mouseInRect =\n event.clientX >= rect.left &&\n event.clientX <= rect.right &&\n event.clientY >= rect.top &&\n event.clientY <= rect.bottom;\n if (mouseInRect) return;\n this.timer.resume();\n };\n\n render() {\n const SBubble = FocusLock;\n const SDismiss = Button;\n const SContent = Flex;\n const SMessage = 'div';\n const SAction = 'div';\n const SIcon = Flex;\n const {\n styles,\n getI18nText,\n visible,\n type,\n initialAnimation,\n animationDuration,\n icon,\n children,\n action,\n focusLock,\n } = this.props;\n\n return sstyled(styles)(\n <Animation\n initialAnimation={initialAnimation}\n visible={visible ?? true}\n duration={animationDuration}\n // @ts-ignore\n keyframes={[styles['@enter'], styles['@exit']]}\n >\n <SBubble\n type={type}\n ref={this.ref}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onKeyDown={this.handleKeydown}\n role={type === 'warning' ? 'alert' : undefined}\n focusLock={focusLock}\n >\n <SDismiss\n aria-haspopup={undefined}\n type='button'\n use='tertiary'\n size='m'\n theme='invert'\n onClick={this.handleClose}\n aria-label={getI18nText('close')}\n active={false}\n title={getI18nText('close')}\n ref={this.closeButtonRef}\n data-hide-focus-hover-popper='true'\n >\n <Button.Addon tag={CloseIcon} color='icon-primary-invert' />\n </SDismiss>\n\n {isNode(icon)\n ? (\n <>\n <SIcon>{icon}</SIcon>\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n </>\n )\n : (\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n )}\n </SBubble>\n </Animation>,\n );\n }\n}\n\nclass ViewWarning extends ViewInfo {\n static defaultProps = {\n type: 'warning',\n duration: 0,\n };\n}\n\nclass NoticeBubbleView extends Component<{ manager: NoticeBubbleManager } & (NoticeBubbleProps | NoticeBubbleWarningProps)> {\n static defaultProps = {\n duration: 5000,\n type: 'info',\n manager,\n };\n\n _notice: null | AddedNoticeMeta = null;\n\n componentDidMount() {\n this._notice = this.asProps.manager.add(this.asProps);\n }\n\n componentWillUnmount() {\n if (this._notice) {\n this._notice.remove();\n }\n }\n\n componentDidUpdate() {\n if (this._notice) {\n this._notice.update(this.asProps);\n }\n }\n\n render() {\n return null;\n }\n}\n\nclass NoticeBubbleWarningView extends NoticeBubbleView {\n static defaultProps = {\n duration: 5000,\n type: 'warning',\n manager,\n };\n}\n\nconst NoticeBubbleContainer = createComponent(NoticeBubbleContainerRoot, {\n Info: NoticeBubbleView,\n Warning: NoticeBubbleWarningView,\n}) as Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n Info: typeof NoticeBubbleView;\n Warning: typeof NoticeBubbleWarningView;\n};\n\nconst NoticeBubble = NoticeBubbleContainer.Info;\nconst NoticeBubbleWarning = NoticeBubbleContainer.Warning;\n\nexport { NoticeBubble, NoticeBubbleWarning };\n\nexport default NoticeBubbleContainer;\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAGA,IAAAI,YAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAEA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,eAAA,GAAAX,OAAA;AACA,IAAAY,e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AA,IAAA7J,gBAAA,aAAhDuK,uBAAuB,kBACL;EACpB1I,QAAQ,EAAE,IAAI;EACdO,IAAI,EAAE,SAAS;EACfvB,OAAO,EAAPA;AACF,CAAC;AAGH,IAAM4J,qBAAqB,GAAG,IAAAC,qBAAe,EAACtL,yBAAyB,EAAE;EACvEuL,IAAI,EAAEd,gBAAgB;EACtBe,OAAO,EAAEL;AACX,CAAC,CAGA;AAED,IAAMM,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGJ,qBAAqB,CAACE,IAAI;AAC/C,IAAMI,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAGN,qBAAqB,CAACG,OAAO;AAAC,IAAAI,QAAA,GAAAF,OAAA,cAI3CL,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoticeBubble.type.js","names":[],"sources":["../../src/NoticeBubble.type.ts"],"sourcesContent":["import type { PortalProps, BoxProps } from '@semcore/base-components';\nimport type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport type { RefObject } from 'react';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\n\n/**\n * @deprecated. Pass noticeBubbleContainer property from window.sm2.getNoticeBubbleContainer()\n */\nexport type NoticeBubbleContainerPortalProps = PortalProps;\n\nexport type NoticeBubbleContainerProps = BoxProps &\n NoticeBubbleContainerPortalProps & {\n /** Ref or element to mount bubbles in. You should use element form window.sm2.getNoticeBubbleContainer() */\n containerNode?: NodeByRef;\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\n /** Specifies the locale for i18n support */\n locale?: string;\n };\n\nexport type NoticeBubbleViewItemProps = NoticeBubbleProps & {\n containerNode?: NodeByRef;\n animationDuration: number;\n getI18nText: ReturnType<typeof useI18n>;\n styles: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement> | undefined;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /** Notice type */\n type?: 'info' | 'warning';\n /**\n * Notice display duration. Set to 0 to disable auto-close.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n /**\n * Use it for complex notices with important controls.\n * If enabled, browser focus will be locked in the notice\n * until it's closed. After close focus should return to the element\n * where it was placed before notice appear.\n */\n focusLock?: boolean;\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManagerClass;\n icon?: React.ReactElement;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n};\n\nexport type AddedNoticeMeta = {\n uid: number;\n update: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => boolean;\n remove: () => boolean;\n ref: RefObject<HTMLElement>;\n focus: () => void;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => AddedNoticeMeta;\n /**\n * Updates notice by uid.\n * @deprecated use replace instead.\n */\n update: (uid: number, props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: number) => boolean;\n /**\n * Replace notice by uid.\n */\n replace: (uid: number, props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n /**\n * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\nexport declare const NoticeBubbleContainer: Intergalactic.Component<\n 'div',\n NoticeBubbleContainerProps\n> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"NoticeBubble.type.js","names":[],"sources":["../../src/NoticeBubble.type.ts"],"sourcesContent":["import type { PortalProps, BoxProps } from '@semcore/base-components';\nimport type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport type { RefObject } from 'react';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\n\n/**\n * @deprecated. Pass noticeBubbleContainer property from window.sm2.getNoticeBubbleContainer()\n */\nexport type NoticeBubbleContainerPortalProps = PortalProps;\n\nexport type NoticeBubbleContainerProps = BoxProps &\n NoticeBubbleContainerPortalProps & {\n /** Ref or element to mount bubbles in. You should use element form window.sm2.getNoticeBubbleContainer() */\n containerNode?: NodeByRef | null;\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\n /** Specifies the locale for i18n support */\n locale?: string;\n };\n\nexport type NoticeBubbleViewItemProps = NoticeBubbleProps & {\n containerNode?: NodeByRef;\n animationDuration: number;\n getI18nText: ReturnType<typeof useI18n>;\n styles: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement> | undefined;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /** Notice type */\n type?: 'info' | 'warning';\n /**\n * Notice display duration. Set to 0 to disable auto-close.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n /**\n * Use it for complex notices with important controls.\n * If enabled, browser focus will be locked in the notice\n * until it's closed. After close focus should return to the element\n * where it was placed before notice appear.\n */\n focusLock?: boolean;\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManagerClass;\n icon?: React.ReactElement;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n};\n\nexport type AddedNoticeMeta = {\n uid: number;\n update: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => boolean;\n remove: () => boolean;\n ref: RefObject<HTMLElement>;\n focus: () => void;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => AddedNoticeMeta;\n /**\n * Updates notice by uid.\n * @deprecated use replace instead.\n */\n update: (uid: number, props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: number) => boolean;\n /**\n * Replace notice by uid.\n */\n replace: (uid: number, props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n /**\n * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\nexport declare const NoticeBubbleContainer: Intergalactic.Component<\n 'div',\n NoticeBubbleContainerProps\n> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/NoticeBubble.js
CHANGED
|
@@ -10,7 +10,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
11
11
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
12
12
|
var _excluded = ["focusLock"];
|
|
13
|
-
import { Animation, Box } from '@semcore/base-components';
|
|
13
|
+
import { Animation, Box, Flex, Portal } from '@semcore/base-components';
|
|
14
14
|
import Button from '@semcore/button';
|
|
15
15
|
import { createComponent, Component, sstyled, Root } from '@semcore/core';
|
|
16
16
|
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
@@ -22,29 +22,27 @@ import { contextThemeEnhance } from '@semcore/core/lib/utils/ThemeProvider';
|
|
|
22
22
|
import { useFocusLock, setFocus } from '@semcore/core/lib/utils/use/useFocusLock';
|
|
23
23
|
import { cssVariableEnhance } from '@semcore/core/lib/utils/useCssVariable';
|
|
24
24
|
import { ZIndexStackingContextProvider, zIndexStackingEnhance } from '@semcore/core/lib/utils/zIndexStacking';
|
|
25
|
-
import { Flex } from '@semcore/flex-box';
|
|
26
25
|
import CloseIcon from '@semcore/icon/Close/m';
|
|
27
|
-
import Portal from '@semcore/portal';
|
|
28
26
|
import React from 'react';
|
|
29
27
|
import manager from './NoticeBubbleManager';
|
|
30
28
|
/*!__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
|
|
31
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
29
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes enter_3nrqr{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_3nrqr{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_3nrqr_gg_,.___SView_3nrqr_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px);padding-right:calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-1x, 4px));width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_3nrqr_gg_._type_info_3nrqr_gg_,.___SView_3nrqr_gg_._type_info_3nrqr_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_3nrqr_gg_._type_warning_3nrqr_gg_,.___SView_3nrqr_gg_._type_warning_3nrqr_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_3nrqr_gg_{flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);flex:1}.___SMessage_3nrqr_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SDismiss_3nrqr_gg_{cursor:pointer;position:absolute;right:0;top:0;margin-top:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:var(--intergalactic-spacing-2x, 8px);flex-shrink:0;border:0;background:0 0}.___SDismiss_3nrqr_gg_.__use_3nrqr_gg_{padding:0 1px}.___SIcon_3nrqr_gg_{justify-content:center;align-items:center;height:var(--intergalactic-spacing-5x, 20px)}.___SNoticeBubble_3nrqr_gg_{width:300px;position:fixed;right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_3nrqr_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SNoticeBubble_3nrqr_gg_.__disablePortal_3nrqr_gg_{position:sticky;margin-left:auto;height:0}.___SMessage_3nrqr_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}.___SNoticeAriaLiveWrapper_3nrqr_gg_{display:contents}", /*__inner_css_end__*/"3nrqr_gg_"),
|
|
32
30
|
/*__reshadow_css_end__*/
|
|
33
31
|
{
|
|
34
|
-
"__SContent": "
|
|
35
|
-
"__SMessage": "
|
|
36
|
-
"__SDismiss": "
|
|
37
|
-
"_use": "
|
|
38
|
-
"__SIcon": "
|
|
39
|
-
"__SNoticeBubble": "
|
|
40
|
-
"_disablePortal": "
|
|
41
|
-
"__SNoticeAriaLiveWrapper": "
|
|
42
|
-
"@enter": "
|
|
43
|
-
"@exit": "
|
|
44
|
-
"__SBubble": "
|
|
45
|
-
"__SView": "
|
|
46
|
-
"_type_info": "
|
|
47
|
-
"_type_warning": "
|
|
32
|
+
"__SContent": "___SContent_3nrqr_gg_",
|
|
33
|
+
"__SMessage": "___SMessage_3nrqr_gg_",
|
|
34
|
+
"__SDismiss": "___SDismiss_3nrqr_gg_",
|
|
35
|
+
"_use": "__use_3nrqr_gg_",
|
|
36
|
+
"__SIcon": "___SIcon_3nrqr_gg_",
|
|
37
|
+
"__SNoticeBubble": "___SNoticeBubble_3nrqr_gg_",
|
|
38
|
+
"_disablePortal": "__disablePortal_3nrqr_gg_",
|
|
39
|
+
"__SNoticeAriaLiveWrapper": "___SNoticeAriaLiveWrapper_3nrqr_gg_",
|
|
40
|
+
"@enter": "enter_3nrqr",
|
|
41
|
+
"@exit": "exit_3nrqr",
|
|
42
|
+
"__SBubble": "___SBubble_3nrqr_gg_",
|
|
43
|
+
"__SView": "___SView_3nrqr_gg_",
|
|
44
|
+
"_type_info": "_type_info_3nrqr_gg_",
|
|
45
|
+
"_type_warning": "_type_warning_3nrqr_gg_"
|
|
48
46
|
});
|
|
49
47
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
50
48
|
import { Timer } from './utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoticeBubble.js","names":["Animation","Box","Button","createComponent","Component","sstyled","Root","i18nEnhance","fire","getFocusableIn","isNode","useForkRef","contextThemeEnhance","useFocusLock","setFocus","cssVariableEnhance","ZIndexStackingContextProvider","zIndexStackingEnhance","Flex","CloseIcon","Portal","React","manager","style","_sstyled","insert","localizedMessages","Timer","NoticeBubbleContainerRoot","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","notices","infos","warnings","_unsubscribe","setState","forceUpdate","_inherits","_createClass","key","value","componentDidMount","asProps","addListener","handleChange","render","_ref","_ref3","SNoticeBubble","SNoticeAriaLiveWrapper","_this$asProps","Children","styles","disablePortal","getI18nText","ref","parentZIndexStacking","duration","containerNode","state","map","notice","_ref2","SView","type","ViewWarning","ViewInfo","createElement","PortalForNoticeItem","cn","_objectSpread","uid","filter","_assignProps","_ref4","_ref5","variable","fallback","v","Number","parseInt","prop","i18n","locale","FocusLock","forwardRef","props","outerRef","focusLock","other","_objectWithoutProperties","_excluded","innerRef","useRef","_extends","_React$useState","useState","_React$useState2","_slicedToArray","showContent","setShowContent","useEffect","setTimeout","Tag","tag","designToken","nodeToMount","_Component2","_this2","_len2","_key2","createRef","e","clearTimer","handleClose","timer","pause","resume","event","_this2$timer","_this2$ref$current","paused","rect","current","getBoundingClientRect","mouseInRect","clientX","left","right","clientY","top","bottom","_this3","document","body","addEventListener","handleBodyMouseMove","noticeElement","focusableNodes","node","closeButtonRef","componentWillUnmount","removeEventListener","clear","_ref6","SBubble","SDismiss","SContent","SMessage","SAction","SIcon","_this$props","visible","initialAnimation","animationDuration","icon","children","action","handleMouseEnter","handleMouseLeave","handleKeydown","undefined","Addon","color","Fragment","_ViewInfo2","NoticeBubbleView","_Component3","_this4","_len3","_key3","_notice","add","remove","componentDidUpdate","update","NoticeBubbleWarningView","_NoticeBubbleView2","NoticeBubbleContainer","Info","Warning","NoticeBubble","NoticeBubbleWarning"],"sources":["../../src/NoticeBubble.tsx"],"sourcesContent":["import { Animation, Box } from '@semcore/base-components';\nimport Button from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { Intergalactic } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport { getFocusableIn } from '@semcore/core/lib/utils/focus-lock/getFocusableIn';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport { contextThemeEnhance } from '@semcore/core/lib/utils/ThemeProvider';\nimport { useFocusLock, setFocus } from '@semcore/core/lib/utils/use/useFocusLock';\nimport { cssVariableEnhance } from '@semcore/core/lib/utils/useCssVariable';\nimport {\n ZIndexStackingContextProvider,\n zIndexStackingEnhance,\n} from '@semcore/core/lib/utils/zIndexStacking';\nimport { Flex } from '@semcore/flex-box';\nimport CloseIcon from '@semcore/icon/Close/m';\nimport Portal from '@semcore/portal';\nimport React from 'react';\n\nimport type {\n AddedNoticeMeta,\n NoticeBubbleContainerProps,\n NoticeBubbleProps,\n NoticeBubbleViewItemProps, NoticeBubbleWarningProps,\n} from './NoticeBubble.type';\nimport type { NoticeBubbleManager, NoticeItem } from './NoticeBubbleManager';\nimport manager from './NoticeBubbleManager';\nimport style from './style/notice-bubble.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { Timer } from './utils';\n\ntype State = {\n notices: NoticeItem[];\n infos: NoticeItem[];\n warnings: NoticeItem[];\n};\n\nclass NoticeBubbleContainerRoot extends Component<NoticeBubbleContainerProps, {}, State, typeof NoticeBubbleContainerRoot.enhance, typeof NoticeBubbleContainerRoot.defaultProps> {\n static displayName = 'NoticeBubbleContainer';\n static style = style;\n static enhance = [\n i18nEnhance(localizedMessages),\n contextThemeEnhance(),\n zIndexStackingEnhance('z-index-notice-bubble'),\n cssVariableEnhance<'duration', number, number>({\n variable: '--intergalactic-duration-popper',\n fallback: 200,\n map: (v: string) => Number.parseInt(v, 10),\n prop: 'duration',\n }),\n ] as const;\n\n static defaultProps = {\n manager,\n i18n: localizedMessages,\n locale: 'en',\n } as const;\n\n _unsubscribe: (() => void) | null = null;\n\n state: State = {\n notices: [],\n infos: [],\n warnings: [],\n };\n\n componentDidMount() {\n this._unsubscribe = this.asProps.manager.addListener(this.handleChange);\n }\n\n componentWillUnmount = () => {\n if (this._unsubscribe) {\n this._unsubscribe();\n }\n };\n\n handleChange = (notices: NoticeItem[]) => {\n this.setState({ notices });\n this.forceUpdate(); // need this, because somehow this component doesn't rerender event if the notices are different\n };\n\n render() {\n const SNoticeBubble = Root;\n const SNoticeAriaLiveWrapper = 'div';\n const { Children, styles, disablePortal, getI18nText, ref, parentZIndexStacking, duration, containerNode } =\n this.asProps;\n const { notices } = this.state;\n\n if (containerNode) {\n return notices.map((notice) => {\n const SView = notice.type === 'warning' ? ViewWarning : ViewInfo;\n\n return sstyled(styles)(\n <PortalForNoticeItem\n key={notice.uid}\n tag={SView}\n containerNode={containerNode}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n });\n }\n\n const infos = notices.filter((notice) => notice.type === 'info');\n const warnings = notices.filter((notice) => notice.type === 'warning');\n\n return sstyled(styles)(\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal disablePortal={disablePortal}>\n <SNoticeBubble\n render={Box}\n ref={ref}\n tag='section'\n role='region'\n aria-label={getI18nText('notification')}\n zIndex={parentZIndexStacking}\n >\n <Children />\n {warnings.map((notice) => {\n const SView = ViewWarning;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {infos.map((notice) => {\n const SView = ViewInfo;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n </SNoticeAriaLiveWrapper>\n </SNoticeBubble>\n </Portal>\n </ZIndexStackingContextProvider>,\n );\n }\n}\n\nconst FocusLock = React.forwardRef((props: any, outerRef: React.ForwardedRef<HTMLDivElement>) => {\n const { focusLock, ...other } = props;\n const innerRef = React.useRef<HTMLDivElement | null>(null);\n useFocusLock(innerRef, false, 'auto', !focusLock, true);\n const ref = useForkRef(outerRef, innerRef);\n\n return <Flex ref={ref} {...other} />;\n});\n\nconst PortalForNoticeItem = (props: NoticeBubbleViewItemProps & { containerNode: NodeByRef; tag: typeof ViewInfo }) => {\n const [showContent, setShowContent] = React.useState(false);\n\n // Show content for info notice in previously mounted node with aria-live polite\n React.useEffect(() => {\n setTimeout(() => {\n setShowContent(true);\n }, 200);\n }, []);\n\n const SNoticeAriaLiveWrapper = 'div';\n const Tag = props.tag;\n\n if (props.type === 'info') {\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {showContent && <Tag {...props} />}\n </SNoticeAriaLiveWrapper>\n </Portal>\n </ZIndexStackingContextProvider>\n );\n }\n\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <Tag {...props} />\n </Portal>\n </ZIndexStackingContextProvider>\n );\n};\n\nclass ViewInfo extends Component<NoticeBubbleViewItemProps> {\n timer: Timer | null = null;\n ref = React.createRef<HTMLDivElement>();\n closeButtonRef = React.createRef<HTMLButtonElement>();\n\n componentDidMount() {\n const { duration } = this.props;\n if (duration) {\n this.timer = new Timer(this.handleClose, duration);\n document.body.addEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n const noticeElement = this.ref.current;\n\n if (noticeElement) {\n const focusableNodes = getFocusableIn(noticeElement).filter(\n (node) => node !== this.closeButtonRef.current,\n );\n\n if (focusableNodes.length > 0) {\n setTimeout(() => setFocus(noticeElement), 0);\n }\n }\n }\n\n componentWillUnmount() {\n this.clearTimer();\n document.body.removeEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n clearTimer() {\n if (this.timer) {\n this.timer.clear();\n this.timer = null;\n }\n }\n\n handleClose = (e: React.SyntheticEvent) => {\n // because it might be called not only from the close icon click\n fire(this, 'onClose', e);\n this.clearTimer();\n };\n\n handleKeydown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n this.handleClose(e);\n }\n };\n\n handleMouseEnter = () => {\n if (!this.timer) return;\n this.timer.pause();\n };\n\n handleMouseLeave = () => {\n if (!this.timer) return;\n this.timer.resume();\n };\n\n handleBodyMouseMove = (event: MouseEvent) => {\n if (!this.timer?.paused) return;\n const rect = this.ref.current?.getBoundingClientRect();\n if (!rect) return;\n const mouseInRect =\n event.clientX >= rect.left &&\n event.clientX <= rect.right &&\n event.clientY >= rect.top &&\n event.clientY <= rect.bottom;\n if (mouseInRect) return;\n this.timer.resume();\n };\n\n render() {\n const SBubble = FocusLock;\n const SDismiss = Button;\n const SContent = Flex;\n const SMessage = 'div';\n const SAction = 'div';\n const SIcon = Flex;\n const {\n styles,\n getI18nText,\n visible,\n type,\n initialAnimation,\n animationDuration,\n icon,\n children,\n action,\n focusLock,\n } = this.props;\n\n return sstyled(styles)(\n <Animation\n initialAnimation={initialAnimation}\n visible={visible ?? true}\n duration={animationDuration}\n // @ts-ignore\n keyframes={[styles['@enter'], styles['@exit']]}\n >\n <SBubble\n type={type}\n ref={this.ref}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onKeyDown={this.handleKeydown}\n role={type === 'warning' ? 'alert' : undefined}\n focusLock={focusLock}\n >\n <SDismiss\n aria-haspopup={undefined}\n type='button'\n use='tertiary'\n size='m'\n theme='invert'\n onClick={this.handleClose}\n aria-label={getI18nText('close')}\n active={false}\n title={getI18nText('close')}\n ref={this.closeButtonRef}\n data-hide-focus-hover-popper='true'\n >\n <Button.Addon tag={CloseIcon} color='icon-primary-invert' />\n </SDismiss>\n\n {isNode(icon)\n ? (\n <>\n <SIcon>{icon}</SIcon>\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n </>\n )\n : (\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n )}\n </SBubble>\n </Animation>,\n );\n }\n}\n\nclass ViewWarning extends ViewInfo {\n static defaultProps = {\n type: 'warning',\n duration: 0,\n };\n}\n\nclass NoticeBubbleView extends Component<{ manager: NoticeBubbleManager } & (NoticeBubbleProps | NoticeBubbleWarningProps)> {\n static defaultProps = {\n duration: 5000,\n type: 'info',\n manager,\n };\n\n _notice: null | AddedNoticeMeta = null;\n\n componentDidMount() {\n this._notice = this.asProps.manager.add(this.asProps);\n }\n\n componentWillUnmount() {\n if (this._notice) {\n this._notice.remove();\n }\n }\n\n componentDidUpdate() {\n if (this._notice) {\n this._notice.update(this.asProps);\n }\n }\n\n render() {\n return null;\n }\n}\n\nclass NoticeBubbleWarningView extends NoticeBubbleView {\n static defaultProps = {\n duration: 5000,\n type: 'warning',\n manager,\n };\n}\n\nconst NoticeBubbleContainer = createComponent(NoticeBubbleContainerRoot, {\n Info: NoticeBubbleView,\n Warning: NoticeBubbleWarningView,\n}) as Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n Info: typeof NoticeBubbleView;\n Warning: typeof NoticeBubbleWarningView;\n};\n\nconst NoticeBubble = NoticeBubbleContainer.Info;\nconst NoticeBubbleWarning = NoticeBubbleContainer.Warning;\n\nexport { NoticeBubble, NoticeBubbleWarning };\n\nexport default NoticeBubbleContainer;\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,SAAS,EAAEC,GAAG,QAAQ,0BAA0B;AACzD,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAEzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,IAAI,MAAM,8BAA8B;AAC/C,SAASC,cAAc,QAAQ,mDAAmD;AAClF,OAAOC,MAAM,MAAM,gCAAgC;AAEnD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SAASC,YAAY,EAAEC,QAAQ,QAAQ,0CAA0C;AACjF,SAASC,kBAAkB,QAAQ,wCAAwC;AAC3E,SACEC,6BAA6B,EAC7BC,qBAAqB,QAChB,wCAAwC;AAC/C,SAASC,IAAI,QAAQ,mBAAmB;AACxC,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,KAAK,MAAM,OAAO;AASzB,OAAOC,OAAO,MAAM,uBAAuB;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAE5C,SAASC,iBAAiB,QAAQ,gDAAgD;AAClF,SAASC,KAAK,QAAQ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AC;AAAA,EA3B4BnD,SAAS;AAAAoC,eAAA,CAAlCwI,gBAAgB,kBACE;EACpB7G,QAAQ,EAAE,IAAI;EACdO,IAAI,EAAE,MAAM;EACZpD,OAAO,EAAPA;AACF,CAAC;AAAA,IAyBGoK,uBAAuB,0BAAAC,kBAAA;EAAA,SAAAD,wBAAA;IAAA3J,eAAA,OAAA2J,uBAAA;IAAA,OAAApJ,UAAA,OAAAoJ,uBAAA,EAAAzJ,SAAA;EAAA;EAAAc,SAAA,CAAA2I,uBAAA,EAAAC,kBAAA;EAAA,OAAA3I,YAAA,CAAA0I,uBAAA;AAAA,EAASV,gBAAgB;AAAAxI,eAAA,CAAhDkJ,uBAAuB,kBACL;EACpBvH,QAAQ,EAAE,IAAI;EACdO,IAAI,EAAE,SAAS;EACfpD,OAAO,EAAPA;AACF,CAAC;AAGH,IAAMsK,qBAAqB,GAAGzL,eAAe,CAACyB,yBAAyB,EAAE;EACvEiK,IAAI,EAAEb,gBAAgB;EACtBc,OAAO,EAAEJ;AACX,CAAC,CAGA;AAED,IAAMK,YAAY,GAAGH,qBAAqB,CAACC,IAAI;AAC/C,IAAMG,mBAAmB,GAAGJ,qBAAqB,CAACE,OAAO;AAEzD,SAASC,YAAY,EAAEC,mBAAmB;AAE1C,eAAeJ,qBAAqB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"NoticeBubble.js","names":["Animation","Box","Flex","Portal","Button","createComponent","Component","sstyled","Root","i18nEnhance","fire","getFocusableIn","isNode","useForkRef","contextThemeEnhance","useFocusLock","setFocus","cssVariableEnhance","ZIndexStackingContextProvider","zIndexStackingEnhance","CloseIcon","React","manager","style","_sstyled","insert","localizedMessages","Timer","NoticeBubbleContainerRoot","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","notices","infos","warnings","_unsubscribe","setState","forceUpdate","_inherits","_createClass","key","value","componentDidMount","asProps","addListener","handleChange","render","_ref","_ref3","SNoticeBubble","SNoticeAriaLiveWrapper","_this$asProps","Children","styles","disablePortal","getI18nText","ref","parentZIndexStacking","duration","containerNode","state","map","notice","_ref2","SView","type","ViewWarning","ViewInfo","createElement","PortalForNoticeItem","cn","_objectSpread","uid","filter","_assignProps","_ref4","_ref5","variable","fallback","v","Number","parseInt","prop","i18n","locale","FocusLock","forwardRef","props","outerRef","focusLock","other","_objectWithoutProperties","_excluded","innerRef","useRef","_extends","_React$useState","useState","_React$useState2","_slicedToArray","showContent","setShowContent","useEffect","setTimeout","Tag","tag","designToken","nodeToMount","_Component2","_this2","_len2","_key2","createRef","e","clearTimer","handleClose","timer","pause","resume","event","_this2$timer","_this2$ref$current","paused","rect","current","getBoundingClientRect","mouseInRect","clientX","left","right","clientY","top","bottom","_this3","document","body","addEventListener","handleBodyMouseMove","noticeElement","focusableNodes","node","closeButtonRef","componentWillUnmount","removeEventListener","clear","_ref6","SBubble","SDismiss","SContent","SMessage","SAction","SIcon","_this$props","visible","initialAnimation","animationDuration","icon","children","action","handleMouseEnter","handleMouseLeave","handleKeydown","undefined","Addon","color","Fragment","_ViewInfo2","NoticeBubbleView","_Component3","_this4","_len3","_key3","_notice","add","remove","componentDidUpdate","update","NoticeBubbleWarningView","_NoticeBubbleView2","NoticeBubbleContainer","Info","Warning","NoticeBubble","NoticeBubbleWarning"],"sources":["../../src/NoticeBubble.tsx"],"sourcesContent":["import { Animation, Box, Flex, Portal } from '@semcore/base-components';\nimport Button from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { Intergalactic } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport { getFocusableIn } from '@semcore/core/lib/utils/focus-lock/getFocusableIn';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport { contextThemeEnhance } from '@semcore/core/lib/utils/ThemeProvider';\nimport { useFocusLock, setFocus } from '@semcore/core/lib/utils/use/useFocusLock';\nimport { cssVariableEnhance } from '@semcore/core/lib/utils/useCssVariable';\nimport {\n ZIndexStackingContextProvider,\n zIndexStackingEnhance,\n} from '@semcore/core/lib/utils/zIndexStacking';\nimport CloseIcon from '@semcore/icon/Close/m';\nimport React from 'react';\n\nimport type {\n AddedNoticeMeta,\n NoticeBubbleContainerProps,\n NoticeBubbleProps,\n NoticeBubbleViewItemProps, NoticeBubbleWarningProps,\n} from './NoticeBubble.type';\nimport type { NoticeBubbleManager, NoticeItem } from './NoticeBubbleManager';\nimport manager from './NoticeBubbleManager';\nimport style from './style/notice-bubble.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { Timer } from './utils';\n\ntype State = {\n notices: NoticeItem[];\n infos: NoticeItem[];\n warnings: NoticeItem[];\n};\n\nclass NoticeBubbleContainerRoot extends Component<NoticeBubbleContainerProps, {}, State, typeof NoticeBubbleContainerRoot.enhance, typeof NoticeBubbleContainerRoot.defaultProps> {\n static displayName = 'NoticeBubbleContainer';\n static style = style;\n static enhance = [\n i18nEnhance(localizedMessages),\n contextThemeEnhance(),\n zIndexStackingEnhance('z-index-notice-bubble'),\n cssVariableEnhance<'duration', number, number>({\n variable: '--intergalactic-duration-popper',\n fallback: 200,\n map: (v: string) => Number.parseInt(v, 10),\n prop: 'duration',\n }),\n ] as const;\n\n static defaultProps = {\n manager,\n i18n: localizedMessages,\n locale: 'en',\n } as const;\n\n _unsubscribe: (() => void) | null = null;\n\n state: State = {\n notices: [],\n infos: [],\n warnings: [],\n };\n\n componentDidMount() {\n this._unsubscribe = this.asProps.manager.addListener(this.handleChange);\n }\n\n componentWillUnmount = () => {\n if (this._unsubscribe) {\n this._unsubscribe();\n }\n };\n\n handleChange = (notices: NoticeItem[]) => {\n this.setState({ notices });\n this.forceUpdate(); // need this, because somehow this component doesn't rerender event if the notices are different\n };\n\n render() {\n const SNoticeBubble = Root;\n const SNoticeAriaLiveWrapper = 'div';\n const { Children, styles, disablePortal, getI18nText, ref, parentZIndexStacking, duration, containerNode } =\n this.asProps;\n const { notices } = this.state;\n\n if (containerNode) {\n return notices.map((notice) => {\n const SView = notice.type === 'warning' ? ViewWarning : ViewInfo;\n\n return sstyled(styles)(\n <PortalForNoticeItem\n key={notice.uid}\n tag={SView}\n containerNode={containerNode}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n });\n }\n\n const infos = notices.filter((notice) => notice.type === 'info');\n const warnings = notices.filter((notice) => notice.type === 'warning');\n\n return sstyled(styles)(\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal disablePortal={disablePortal}>\n <SNoticeBubble\n render={Box}\n ref={ref}\n tag='section'\n role='region'\n aria-label={getI18nText('notification')}\n zIndex={parentZIndexStacking}\n >\n <Children />\n {warnings.map((notice) => {\n const SView = ViewWarning;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {infos.map((notice) => {\n const SView = ViewInfo;\n return sstyled(styles)(\n <SView\n key={notice.uid}\n animationDuration={duration}\n styles={styles}\n getI18nText={getI18nText}\n {...notice}\n />,\n );\n })}\n </SNoticeAriaLiveWrapper>\n </SNoticeBubble>\n </Portal>\n </ZIndexStackingContextProvider>,\n );\n }\n}\n\nconst FocusLock = React.forwardRef((props: any, outerRef: React.ForwardedRef<HTMLDivElement>) => {\n const { focusLock, ...other } = props;\n const innerRef = React.useRef<HTMLDivElement | null>(null);\n useFocusLock(innerRef, false, 'auto', !focusLock, true);\n const ref = useForkRef(outerRef, innerRef);\n\n return <Flex ref={ref} {...other} />;\n});\n\nconst PortalForNoticeItem = (props: NoticeBubbleViewItemProps & { containerNode: NodeByRef; tag: typeof ViewInfo }) => {\n const [showContent, setShowContent] = React.useState(false);\n\n // Show content for info notice in previously mounted node with aria-live polite\n React.useEffect(() => {\n setTimeout(() => {\n setShowContent(true);\n }, 200);\n }, []);\n\n const SNoticeAriaLiveWrapper = 'div';\n const Tag = props.tag;\n\n if (props.type === 'info') {\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <SNoticeAriaLiveWrapper aria-live='polite'>\n {showContent && <Tag {...props} />}\n </SNoticeAriaLiveWrapper>\n </Portal>\n </ZIndexStackingContextProvider>\n );\n }\n\n return (\n <ZIndexStackingContextProvider designToken='z-index-notice-bubble'>\n <Portal nodeToMount={props.containerNode}>\n <Tag {...props} />\n </Portal>\n </ZIndexStackingContextProvider>\n );\n};\n\nclass ViewInfo extends Component<NoticeBubbleViewItemProps> {\n timer: Timer | null = null;\n ref = React.createRef<HTMLDivElement>();\n closeButtonRef = React.createRef<HTMLButtonElement>();\n\n componentDidMount() {\n const { duration } = this.props;\n if (duration) {\n this.timer = new Timer(this.handleClose, duration);\n document.body.addEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n const noticeElement = this.ref.current;\n\n if (noticeElement) {\n const focusableNodes = getFocusableIn(noticeElement).filter(\n (node) => node !== this.closeButtonRef.current,\n );\n\n if (focusableNodes.length > 0) {\n setTimeout(() => setFocus(noticeElement), 0);\n }\n }\n }\n\n componentWillUnmount() {\n this.clearTimer();\n document.body.removeEventListener('mousemove', this.handleBodyMouseMove);\n }\n\n clearTimer() {\n if (this.timer) {\n this.timer.clear();\n this.timer = null;\n }\n }\n\n handleClose = (e: React.SyntheticEvent) => {\n // because it might be called not only from the close icon click\n fire(this, 'onClose', e);\n this.clearTimer();\n };\n\n handleKeydown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n this.handleClose(e);\n }\n };\n\n handleMouseEnter = () => {\n if (!this.timer) return;\n this.timer.pause();\n };\n\n handleMouseLeave = () => {\n if (!this.timer) return;\n this.timer.resume();\n };\n\n handleBodyMouseMove = (event: MouseEvent) => {\n if (!this.timer?.paused) return;\n const rect = this.ref.current?.getBoundingClientRect();\n if (!rect) return;\n const mouseInRect =\n event.clientX >= rect.left &&\n event.clientX <= rect.right &&\n event.clientY >= rect.top &&\n event.clientY <= rect.bottom;\n if (mouseInRect) return;\n this.timer.resume();\n };\n\n render() {\n const SBubble = FocusLock;\n const SDismiss = Button;\n const SContent = Flex;\n const SMessage = 'div';\n const SAction = 'div';\n const SIcon = Flex;\n const {\n styles,\n getI18nText,\n visible,\n type,\n initialAnimation,\n animationDuration,\n icon,\n children,\n action,\n focusLock,\n } = this.props;\n\n return sstyled(styles)(\n <Animation\n initialAnimation={initialAnimation}\n visible={visible ?? true}\n duration={animationDuration}\n // @ts-ignore\n keyframes={[styles['@enter'], styles['@exit']]}\n >\n <SBubble\n type={type}\n ref={this.ref}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onKeyDown={this.handleKeydown}\n role={type === 'warning' ? 'alert' : undefined}\n focusLock={focusLock}\n >\n <SDismiss\n aria-haspopup={undefined}\n type='button'\n use='tertiary'\n size='m'\n theme='invert'\n onClick={this.handleClose}\n aria-label={getI18nText('close')}\n active={false}\n title={getI18nText('close')}\n ref={this.closeButtonRef}\n data-hide-focus-hover-popper='true'\n >\n <Button.Addon tag={CloseIcon} color='icon-primary-invert' />\n </SDismiss>\n\n {isNode(icon)\n ? (\n <>\n <SIcon>{icon}</SIcon>\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n </>\n )\n : (\n <SContent>\n <SMessage>{children}</SMessage>\n {isNode(action) ? <SAction>{action}</SAction> : null}\n </SContent>\n )}\n </SBubble>\n </Animation>,\n );\n }\n}\n\nclass ViewWarning extends ViewInfo {\n static defaultProps = {\n type: 'warning',\n duration: 0,\n };\n}\n\nclass NoticeBubbleView extends Component<{ manager: NoticeBubbleManager } & (NoticeBubbleProps | NoticeBubbleWarningProps)> {\n static defaultProps = {\n duration: 5000,\n type: 'info',\n manager,\n };\n\n _notice: null | AddedNoticeMeta = null;\n\n componentDidMount() {\n this._notice = this.asProps.manager.add(this.asProps);\n }\n\n componentWillUnmount() {\n if (this._notice) {\n this._notice.remove();\n }\n }\n\n componentDidUpdate() {\n if (this._notice) {\n this._notice.update(this.asProps);\n }\n }\n\n render() {\n return null;\n }\n}\n\nclass NoticeBubbleWarningView extends NoticeBubbleView {\n static defaultProps = {\n duration: 5000,\n type: 'warning',\n manager,\n };\n}\n\nconst NoticeBubbleContainer = createComponent(NoticeBubbleContainerRoot, {\n Info: NoticeBubbleView,\n Warning: NoticeBubbleWarningView,\n}) as Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n Info: typeof NoticeBubbleView;\n Warning: typeof NoticeBubbleWarningView;\n};\n\nconst NoticeBubble = NoticeBubbleContainer.Info;\nconst NoticeBubbleWarning = NoticeBubbleContainer.Warning;\n\nexport { NoticeBubble, NoticeBubbleWarning };\n\nexport default NoticeBubbleContainer;\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,SAAS,EAAEC,GAAG,EAAEC,IAAI,EAAEC,MAAM,QAAQ,0BAA0B;AACvE,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAEzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,IAAI,MAAM,8BAA8B;AAC/C,SAASC,cAAc,QAAQ,mDAAmD;AAClF,OAAOC,MAAM,MAAM,gCAAgC;AAEnD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SAASC,YAAY,EAAEC,QAAQ,QAAQ,0CAA0C;AACjF,SAASC,kBAAkB,QAAQ,wCAAwC;AAC3E,SACEC,6BAA6B,EAC7BC,qBAAqB,QAChB,wCAAwC;AAC/C,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,KAAK,MAAM,OAAO;AASzB,OAAOC,OAAO,MAAM,uBAAuB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AkBA,CAAA,EAAG;MACnB,IAAI,IAAI,CAACH,OAAO,EAAE;QAChB,IAAI,CAACA,OAAO,CAACI,MAAM,CAAC,IAAI,CAACrI,OAAO,CAAC;MACnC;IACF;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAK,MAAMA,CAAA,EAAG;MACP,OAAO,IAAI;IACb;EAAC;AAAA,EA3B4BjD,SAAS;AAAAkC,eAAA,CAAlCwI,gBAAgB,kBACE;EACpB7G,QAAQ,EAAE,IAAI;EACdO,IAAI,EAAE,MAAM;EACZpD,OAAO,EAAPA;AACF,CAAC;AAAA,IAyBGoK,uBAAuB,0BAAAC,kBAAA;EAAA,SAAAD,wBAAA;IAAA3J,eAAA,OAAA2J,uBAAA;IAAA,OAAApJ,UAAA,OAAAoJ,uBAAA,EAAAzJ,SAAA;EAAA;EAAAc,SAAA,CAAA2I,uBAAA,EAAAC,kBAAA;EAAA,OAAA3I,YAAA,CAAA0I,uBAAA;AAAA,EAASV,gBAAgB;AAAAxI,eAAA,CAAhDkJ,uBAAuB,kBACL;EACpBvH,QAAQ,EAAE,IAAI;EACdO,IAAI,EAAE,SAAS;EACfpD,OAAO,EAAPA;AACF,CAAC;AAGH,IAAMsK,qBAAqB,GAAGvL,eAAe,CAACuB,yBAAyB,EAAE;EACvEiK,IAAI,EAAEb,gBAAgB;EACtBc,OAAO,EAAEJ;AACX,CAAC,CAGA;AAED,IAAMK,YAAY,GAAGH,qBAAqB,CAACC,IAAI;AAC/C,IAAMG,mBAAmB,GAAGJ,qBAAqB,CAACE,OAAO;AAEzD,SAASC,YAAY,EAAEC,mBAAmB;AAE1C,eAAeJ,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoticeBubble.type.js","names":[],"sources":["../../src/NoticeBubble.type.ts"],"sourcesContent":["import type { PortalProps, BoxProps } from '@semcore/base-components';\nimport type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport type { RefObject } from 'react';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\n\n/**\n * @deprecated. Pass noticeBubbleContainer property from window.sm2.getNoticeBubbleContainer()\n */\nexport type NoticeBubbleContainerPortalProps = PortalProps;\n\nexport type NoticeBubbleContainerProps = BoxProps &\n NoticeBubbleContainerPortalProps & {\n /** Ref or element to mount bubbles in. You should use element form window.sm2.getNoticeBubbleContainer() */\n containerNode?: NodeByRef;\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\n /** Specifies the locale for i18n support */\n locale?: string;\n };\n\nexport type NoticeBubbleViewItemProps = NoticeBubbleProps & {\n containerNode?: NodeByRef;\n animationDuration: number;\n getI18nText: ReturnType<typeof useI18n>;\n styles: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement> | undefined;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /** Notice type */\n type?: 'info' | 'warning';\n /**\n * Notice display duration. Set to 0 to disable auto-close.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n /**\n * Use it for complex notices with important controls.\n * If enabled, browser focus will be locked in the notice\n * until it's closed. After close focus should return to the element\n * where it was placed before notice appear.\n */\n focusLock?: boolean;\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManagerClass;\n icon?: React.ReactElement;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n};\n\nexport type AddedNoticeMeta = {\n uid: number;\n update: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => boolean;\n remove: () => boolean;\n ref: RefObject<HTMLElement>;\n focus: () => void;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => AddedNoticeMeta;\n /**\n * Updates notice by uid.\n * @deprecated use replace instead.\n */\n update: (uid: number, props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: number) => boolean;\n /**\n * Replace notice by uid.\n */\n replace: (uid: number, props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n /**\n * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\nexport declare const NoticeBubbleContainer: Intergalactic.Component<\n 'div',\n NoticeBubbleContainerProps\n> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"NoticeBubble.type.js","names":[],"sources":["../../src/NoticeBubble.type.ts"],"sourcesContent":["import type { PortalProps, BoxProps } from '@semcore/base-components';\nimport type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';\nimport type { NodeByRef } from '@semcore/core/lib/utils/ref';\nimport type { RefObject } from 'react';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\n\n/**\n * @deprecated. Pass noticeBubbleContainer property from window.sm2.getNoticeBubbleContainer()\n */\nexport type NoticeBubbleContainerPortalProps = PortalProps;\n\nexport type NoticeBubbleContainerProps = BoxProps &\n NoticeBubbleContainerPortalProps & {\n /** Ref or element to mount bubbles in. You should use element form window.sm2.getNoticeBubbleContainer() */\n containerNode?: NodeByRef | null;\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\n /** Specifies the locale for i18n support */\n locale?: string;\n };\n\nexport type NoticeBubbleViewItemProps = NoticeBubbleProps & {\n containerNode?: NodeByRef;\n animationDuration: number;\n getI18nText: ReturnType<typeof useI18n>;\n styles: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement> | undefined;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /** Notice type */\n type?: 'info' | 'warning';\n /**\n * Notice display duration. Set to 0 to disable auto-close.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n /**\n * Use it for complex notices with important controls.\n * If enabled, browser focus will be locked in the notice\n * until it's closed. After close focus should return to the element\n * where it was placed before notice appear.\n */\n focusLock?: boolean;\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManagerClass;\n icon?: React.ReactElement;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n};\n\nexport type AddedNoticeMeta = {\n uid: number;\n update: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => boolean;\n remove: () => boolean;\n ref: RefObject<HTMLElement>;\n focus: () => void;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => AddedNoticeMeta;\n /**\n * Updates notice by uid.\n * @deprecated use replace instead.\n */\n update: (uid: number, props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: number) => boolean;\n /**\n * Replace notice by uid.\n */\n replace: (uid: number, props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n /**\n * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\nexport declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\nexport declare const NoticeBubbleContainer: Intergalactic.Component<\n 'div',\n NoticeBubbleContainerProps\n> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/NoticeBubble.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
|
8
8
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
10
|
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
11
|
-
import { Box, Animation } from "@semcore/base-components";
|
|
11
|
+
import { Portal, Box, Animation, Flex } from "@semcore/base-components";
|
|
12
12
|
import Button from "@semcore/button";
|
|
13
13
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
14
14
|
import fire from "@semcore/core/lib/utils/fire";
|
|
@@ -19,9 +19,7 @@ import { contextThemeEnhance } from "@semcore/core/lib/utils/ThemeProvider";
|
|
|
19
19
|
import { setFocus, useFocusLock } from "@semcore/core/lib/utils/use/useFocusLock";
|
|
20
20
|
import { cssVariableEnhance } from "@semcore/core/lib/utils/useCssVariable";
|
|
21
21
|
import { ZIndexStackingContextProvider, zIndexStackingEnhance } from "@semcore/core/lib/utils/zIndexStacking";
|
|
22
|
-
import { Flex } from "@semcore/flex-box";
|
|
23
22
|
import CloseIcon from "@semcore/icon/Close/m";
|
|
24
|
-
import Portal from "@semcore/portal";
|
|
25
23
|
import React from "react";
|
|
26
24
|
import noticeBubbleDefaultManager from "./NoticeBubbleManager.mjs";
|
|
27
25
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
@@ -32,25 +30,25 @@ var style = (
|
|
|
32
30
|
/*__reshadow_css_start__*/
|
|
33
31
|
(sstyled.insert(
|
|
34
32
|
/*__inner_css_start__*/
|
|
35
|
-
"@keyframes
|
|
33
|
+
"@keyframes enter_3nrqr{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_3nrqr{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_3nrqr_gg_,.___SView_3nrqr_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px);padding-right:calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-1x, 4px));width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_3nrqr_gg_._type_info_3nrqr_gg_,.___SView_3nrqr_gg_._type_info_3nrqr_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_3nrqr_gg_._type_warning_3nrqr_gg_,.___SView_3nrqr_gg_._type_warning_3nrqr_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_3nrqr_gg_{flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);flex:1}.___SMessage_3nrqr_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SDismiss_3nrqr_gg_{cursor:pointer;position:absolute;right:0;top:0;margin-top:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:var(--intergalactic-spacing-2x, 8px);flex-shrink:0;border:0;background:0 0}.___SDismiss_3nrqr_gg_.__use_3nrqr_gg_{padding:0 1px}.___SIcon_3nrqr_gg_{justify-content:center;align-items:center;height:var(--intergalactic-spacing-5x, 20px)}.___SNoticeBubble_3nrqr_gg_{width:300px;position:fixed;right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_3nrqr_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SNoticeBubble_3nrqr_gg_.__disablePortal_3nrqr_gg_{position:sticky;margin-left:auto;height:0}.___SMessage_3nrqr_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}.___SNoticeAriaLiveWrapper_3nrqr_gg_{display:contents}",
|
|
36
34
|
/*__inner_css_end__*/
|
|
37
|
-
"
|
|
35
|
+
"3nrqr_gg_"
|
|
38
36
|
), /*__reshadow_css_end__*/
|
|
39
37
|
{
|
|
40
|
-
"__SContent": "
|
|
41
|
-
"__SMessage": "
|
|
42
|
-
"__SDismiss": "
|
|
43
|
-
"_use": "
|
|
44
|
-
"__SIcon": "
|
|
45
|
-
"__SNoticeBubble": "
|
|
46
|
-
"_disablePortal": "
|
|
47
|
-
"__SNoticeAriaLiveWrapper": "
|
|
48
|
-
"@enter": "
|
|
49
|
-
"@exit": "
|
|
50
|
-
"__SBubble": "
|
|
51
|
-
"__SView": "
|
|
52
|
-
"_type_info": "
|
|
53
|
-
"_type_warning": "
|
|
38
|
+
"__SContent": "___SContent_3nrqr_gg_",
|
|
39
|
+
"__SMessage": "___SMessage_3nrqr_gg_",
|
|
40
|
+
"__SDismiss": "___SDismiss_3nrqr_gg_",
|
|
41
|
+
"_use": "__use_3nrqr_gg_",
|
|
42
|
+
"__SIcon": "___SIcon_3nrqr_gg_",
|
|
43
|
+
"__SNoticeBubble": "___SNoticeBubble_3nrqr_gg_",
|
|
44
|
+
"_disablePortal": "__disablePortal_3nrqr_gg_",
|
|
45
|
+
"__SNoticeAriaLiveWrapper": "___SNoticeAriaLiveWrapper_3nrqr_gg_",
|
|
46
|
+
"@enter": "enter_3nrqr",
|
|
47
|
+
"@exit": "exit_3nrqr",
|
|
48
|
+
"__SBubble": "___SBubble_3nrqr_gg_",
|
|
49
|
+
"__SView": "___SView_3nrqr_gg_",
|
|
50
|
+
"_type_info": "_type_info_3nrqr_gg_",
|
|
51
|
+
"_type_warning": "_type_warning_3nrqr_gg_"
|
|
54
52
|
})
|
|
55
53
|
);
|
|
56
54
|
var NoticeBubbleContainerRoot = /* @__PURE__ */ (function(_Component) {
|
|
@@ -12,7 +12,7 @@ export interface INoticeBubbleContainerProps extends NoticeBubbleContainerProps,
|
|
|
12
12
|
export type NoticeBubbleContainerPortalProps = PortalProps;
|
|
13
13
|
export type NoticeBubbleContainerProps = BoxProps & NoticeBubbleContainerPortalProps & {
|
|
14
14
|
/** Ref or element to mount bubbles in. You should use element form window.sm2.getNoticeBubbleContainer() */
|
|
15
|
-
containerNode?: NodeByRef;
|
|
15
|
+
containerNode?: NodeByRef | null;
|
|
16
16
|
/** Manager copy */
|
|
17
17
|
manager?: NoticeBubbleManagerClass;
|
|
18
18
|
/** Specifies the locale for i18n support */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/notice-bubble",
|
|
3
3
|
"description": "Semrush NoticeBubble Component",
|
|
4
|
-
"version": "16.2.
|
|
4
|
+
"version": "16.2.1-prerelease.4",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/icon": "16.7.
|
|
17
|
+
"@semcore/icon": "16.7.4-prerelease.4",
|
|
18
18
|
"@semcore/portal": "16.0.11",
|
|
19
19
|
"@semcore/flex-box": "16.0.11",
|
|
20
20
|
"@semcore/animation": "16.0.7",
|
|
21
21
|
"@semcore/button": "16.0.12"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^16.
|
|
24
|
+
"@semcore/base-components": "^16.0.0"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"directory": "semcore/notice-bubble"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@semcore/
|
|
33
|
-
"@semcore/
|
|
34
|
-
"@semcore/
|
|
32
|
+
"@semcore/core": "16.5.1",
|
|
33
|
+
"@semcore/base-components": "16.4.2",
|
|
34
|
+
"@semcore/testing-utils": "1.0.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "pnpm semcore-builder && pnpm vite build"
|