@semcore/notice-bubble 4.9.4 → 5.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [4.9.4] - 2023-06-30
5
+ ## [5.0.0] - 2023-07-15
6
6
 
7
- ### Changed
7
+ ### Break
8
8
 
9
- - Version patch update due to children dependencies update (`@semcore/utils` [3.54.0 ~> 3.54.1], `@semcore/icon` [3.16.0 ~> 3.16.1], `@semcore/flex-box` [4.7.32 ~> 4.7.33], `@semcore/animation` [1.10.20 ~> 1.10.21]).
9
+ - Strict, backward incompatible typings.
10
10
 
11
11
  ## [4.9.3] - 2023-06-28
12
12
 
@@ -31,17 +31,17 @@ var _useCssVariable = require("@semcore/utils/lib/useCssVariable");
31
31
  var _ThemeProvider = require("@semcore/utils/lib/ThemeProvider");
32
32
  var _excluded = ["forwardRef", "styles", "onMouseEnter", "onMouseLeave", "getI18nText", "icon", "children", "action"];
33
33
  /*__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
34
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes enter_198b5{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_198b5{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_198b5_gg_,.___SContent_198b5_gg_,.___SView_198b5_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_198b5_gg_,.___SView_198b5_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px) calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-1x, 4px)) var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-3x, 12px);width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff)}.___SBubble_198b5_gg_._type_info_198b5_gg_,.___SView_198b5_gg_._type_info_198b5_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_198b5_gg_._type_warning_198b5_gg_,.___SView_198b5_gg_._type_warning_198b5_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_198b5_gg_{flex-direction:column;flex:1}.___SMessage_198b5_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_198b5_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SDismiss_198b5_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_198b5_gg_{width:300px;position:fixed;z-index:var(--intergalactic-z-index-notice-bubble, 999);right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_198b5_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_198b5_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "198b5_gg_") /*__reshadow_css_end__*/, {
35
- "__SBubble": "___SBubble_198b5_gg_",
36
- "__SView": "___SView_198b5_gg_",
37
- "_type_info": "_type_info_198b5_gg_",
38
- "_type_warning": "_type_warning_198b5_gg_",
39
- "__SContent": "___SContent_198b5_gg_",
40
- "__SMessage": "___SMessage_198b5_gg_",
41
- "__SDismiss": "___SDismiss_198b5_gg_",
42
- "__SNoticeBubble": "___SNoticeBubble_198b5_gg_",
43
- "@enter": "enter_198b5",
44
- "@exit": "exit_198b5"
34
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes enter_h39bw{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_h39bw{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_h39bw_gg_,.___SContent_h39bw_gg_,.___SView_h39bw_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_h39bw_gg_,.___SView_h39bw_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px) calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-1x, 4px)) var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-3x, 12px);width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff)}.___SBubble_h39bw_gg_._type_info_h39bw_gg_,.___SView_h39bw_gg_._type_info_h39bw_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_h39bw_gg_._type_warning_h39bw_gg_,.___SView_h39bw_gg_._type_warning_h39bw_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_h39bw_gg_{flex-direction:column;flex:1}.___SMessage_h39bw_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_h39bw_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SDismiss_h39bw_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_h39bw_gg_{width:300px;position:fixed;z-index:var(--intergalactic-z-index-notice-bubble, 999);right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_h39bw_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_h39bw_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "h39bw_gg_") /*__reshadow_css_end__*/, {
35
+ "__SBubble": "___SBubble_h39bw_gg_",
36
+ "__SView": "___SView_h39bw_gg_",
37
+ "_type_info": "_type_info_h39bw_gg_",
38
+ "_type_warning": "_type_warning_h39bw_gg_",
39
+ "__SContent": "___SContent_h39bw_gg_",
40
+ "__SMessage": "___SMessage_h39bw_gg_",
41
+ "__SDismiss": "___SDismiss_h39bw_gg_",
42
+ "__SNoticeBubble": "___SNoticeBubble_h39bw_gg_",
43
+ "@enter": "enter_h39bw",
44
+ "@exit": "exit_h39bw"
45
45
  });
46
46
  var Notices = function Notices(props) {
47
47
  var styles = props.styles,
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.noticeBubbleDefaultManager = exports["default"] = void 0;
8
4
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
9
5
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
6
+ /** @deprecated */
7
+ /** @deprecated */
8
+ /** @deprecated */
9
+ /** @deprecated */
10
+ /** @deprecated */
10
11
  /**
11
12
  * @deprecated use `NoticeBubbleManager` instead.
12
13
  * */
@@ -16,11 +17,4 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
16
17
  var NoticeBubbleManager = /*#__PURE__*/(0, _createClass2["default"])(function NoticeBubbleManager() {
17
18
  (0, _classCallCheck2["default"])(this, NoticeBubbleManager);
18
19
  });
19
- var noticeBubbleDefaultManager = new NoticeBubbleManager();
20
- exports.noticeBubbleDefaultManager = noticeBubbleDefaultManager;
21
- /**
22
- * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead
23
- */
24
- var _default = new NoticeBubbleManager();
25
- exports["default"] = _default;
26
20
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass2","_classCallCheck2","noticeBubbleDefaultManager","exports","_default"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { IPortalProps } from '@semcore/portal';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {\n /** Manager copy */\n manager?: INoticeBubbleManager;\n locale?: string;\n}\n\nexport interface INoticeBubbleProps extends IBoxProps {\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}\nexport interface INoticeBubbleInfoProps extends INoticeBubbleProps {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleWarningProps extends INoticeBubbleProps {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add: (props: INoticeBubbleInfoProps | INoticeBubbleWarningProps) => {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n}\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;\ndeclare const NoticeBubbleContainer: (<T>(\n props: CProps<INoticeBubbleContainerProps & T>,\n) => ReturnEl) & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add(props: INoticeBubbleInfoProps | INoticeBubbleWarningProps): {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\nconst noticeBubbleDefaultManager = new NoticeBubbleManager();\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default new NoticeBubbleManager();\n"],"mappings":";;;;;;;;;AA8EA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAiBcA,mBAAmB,oBAAAC,aAAA,sBAAAD,oBAAA;EAAA,IAAAE,gBAAA,mBAAAF,mBAAA;AAAA;AAwBjC,IAAMG,0BAA0B,GAAG,IAAIH,mBAAmB,EAAE;AAACI,OAAA,CAAAD,0BAAA,GAAAA,0BAAA;AAS7D;AACA;AACA;AAFA,IAAAE,QAAA,GAGe,IAAIL,mBAAmB,EAAE;AAAAI,OAAA,cAAAC,QAAA"}
1
+ {"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass2","_classCallCheck2"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PortalProps } from '@semcore/portal';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManager;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\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?: NoticeBubbleManager;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\ntype NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: INoticeBubbleInfoProps | INoticeBubbleWarningProps) => {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\ndeclare const NoticeBubbleContainer: Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements NoticeBubbleManagerClass {\n /**\n * Creates and shows a notice.\n * */\n add(props: INoticeBubbleInfoProps | INoticeBubbleWarningProps): {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\ndeclare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":";;;;;AAIA;AAWA;AAqBA;AAeA;AAeA;AA0BA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAecA,mBAAmB,oBAAAC,aAAA,sBAAAD,oBAAA;EAAA,IAAAE,gBAAA,mBAAAF,mBAAA;AAAA"}
@@ -25,17 +25,17 @@ import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
25
25
  import { useCssVariable } from '@semcore/utils/lib/useCssVariable';
26
26
  import { contextThemeEnhance } from '@semcore/utils/lib/ThemeProvider';
27
27
  /*__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
28
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes enter_198b5{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_198b5{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_198b5_gg_,.___SContent_198b5_gg_,.___SView_198b5_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_198b5_gg_,.___SView_198b5_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px) calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-1x, 4px)) var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-3x, 12px);width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff)}.___SBubble_198b5_gg_._type_info_198b5_gg_,.___SView_198b5_gg_._type_info_198b5_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_198b5_gg_._type_warning_198b5_gg_,.___SView_198b5_gg_._type_warning_198b5_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_198b5_gg_{flex-direction:column;flex:1}.___SMessage_198b5_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_198b5_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SDismiss_198b5_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_198b5_gg_{width:300px;position:fixed;z-index:var(--intergalactic-z-index-notice-bubble, 999);right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_198b5_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_198b5_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "198b5_gg_") /*__reshadow_css_end__*/, {
29
- "__SBubble": "___SBubble_198b5_gg_",
30
- "__SView": "___SView_198b5_gg_",
31
- "_type_info": "_type_info_198b5_gg_",
32
- "_type_warning": "_type_warning_198b5_gg_",
33
- "__SContent": "___SContent_198b5_gg_",
34
- "__SMessage": "___SMessage_198b5_gg_",
35
- "__SDismiss": "___SDismiss_198b5_gg_",
36
- "__SNoticeBubble": "___SNoticeBubble_198b5_gg_",
37
- "@enter": "enter_198b5",
38
- "@exit": "exit_198b5"
28
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes enter_h39bw{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_h39bw{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_h39bw_gg_,.___SContent_h39bw_gg_,.___SView_h39bw_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_h39bw_gg_,.___SView_h39bw_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px) calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-1x, 4px)) var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-3x, 12px);width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff)}.___SBubble_h39bw_gg_._type_info_h39bw_gg_,.___SView_h39bw_gg_._type_info_h39bw_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_h39bw_gg_._type_warning_h39bw_gg_,.___SView_h39bw_gg_._type_warning_h39bw_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_h39bw_gg_{flex-direction:column;flex:1}.___SMessage_h39bw_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_h39bw_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SDismiss_h39bw_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_h39bw_gg_{width:300px;position:fixed;z-index:var(--intergalactic-z-index-notice-bubble, 999);right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_h39bw_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_h39bw_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "h39bw_gg_") /*__reshadow_css_end__*/, {
29
+ "__SBubble": "___SBubble_h39bw_gg_",
30
+ "__SView": "___SView_h39bw_gg_",
31
+ "_type_info": "_type_info_h39bw_gg_",
32
+ "_type_warning": "_type_warning_h39bw_gg_",
33
+ "__SContent": "___SContent_h39bw_gg_",
34
+ "__SMessage": "___SMessage_h39bw_gg_",
35
+ "__SDismiss": "___SDismiss_h39bw_gg_",
36
+ "__SNoticeBubble": "___SNoticeBubble_h39bw_gg_",
37
+ "@enter": "enter_h39bw",
38
+ "@exit": "exit_h39bw"
39
39
  });
40
40
  var Notices = function Notices(props) {
41
41
  var styles = props.styles,
@@ -1,5 +1,10 @@
1
1
  import _createClass from "@babel/runtime/helpers/createClass";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ /** @deprecated */
4
+ /** @deprecated */
5
+ /** @deprecated */
6
+ /** @deprecated */
7
+ /** @deprecated */
3
8
  /**
4
9
  * @deprecated use `NoticeBubbleManager` instead.
5
10
  * */
@@ -9,10 +14,5 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
9
14
  var NoticeBubbleManager = /*#__PURE__*/_createClass(function NoticeBubbleManager() {
10
15
  _classCallCheck(this, NoticeBubbleManager);
11
16
  });
12
- var noticeBubbleDefaultManager = new NoticeBubbleManager();
13
- export { noticeBubbleDefaultManager };
14
- /**
15
- * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead
16
- */
17
- export default new NoticeBubbleManager();
17
+ export {};
18
18
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass","_classCallCheck","noticeBubbleDefaultManager"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { IPortalProps } from '@semcore/portal';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {\n /** Manager copy */\n manager?: INoticeBubbleManager;\n locale?: string;\n}\n\nexport interface INoticeBubbleProps extends IBoxProps {\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}\nexport interface INoticeBubbleInfoProps extends INoticeBubbleProps {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleWarningProps extends INoticeBubbleProps {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add: (props: INoticeBubbleInfoProps | INoticeBubbleWarningProps) => {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n}\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;\ndeclare const NoticeBubbleContainer: (<T>(\n props: CProps<INoticeBubbleContainerProps & T>,\n) => ReturnEl) & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add(props: INoticeBubbleInfoProps | INoticeBubbleWarningProps): {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\nconst noticeBubbleDefaultManager = new NoticeBubbleManager();\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default new NoticeBubbleManager();\n"],"mappings":";;AA8EA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAiBcA,mBAAmB,gBAAAC,YAAA,UAAAD,oBAAA;EAAAE,eAAA,OAAAF,mBAAA;AAAA;AAwBjC,IAAMG,0BAA0B,GAAG,IAAIH,mBAAmB,EAAE;AAE5D,SAKEG,0BAA0B;AAE5B;AACA;AACA;AACA,eAAe,IAAIH,mBAAmB,EAAE"}
1
+ {"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass","_classCallCheck"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PortalProps } from '@semcore/portal';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManager;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\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?: NoticeBubbleManager;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\ntype NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: INoticeBubbleInfoProps | INoticeBubbleWarningProps) => {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\ndeclare const NoticeBubbleContainer: Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements NoticeBubbleManagerClass {\n /**\n * Creates and shows a notice.\n * */\n add(props: INoticeBubbleInfoProps | INoticeBubbleWarningProps): {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\ndeclare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":";;AAIA;AAWA;AAqBA;AAeA;AAeA;AA0BA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAecA,mBAAmB,gBAAAC,YAAA,UAAAD,oBAAA;EAAAE,eAAA,OAAAF,mBAAA;AAAA;AAAA"}
@@ -1,14 +1,21 @@
1
- import { IPortalProps } from '@semcore/portal';
2
- import { CProps, ReturnEl } from '@semcore/core';
3
- import { IBoxProps } from '@semcore/flex-box';
1
+ import { PortalProps } from '@semcore/portal';
2
+ import { UnknownProperties, Intergalactic } from '@semcore/core';
3
+ import { BoxProps } from '@semcore/flex-box';
4
4
 
5
- export interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {
6
- /** Manager copy */
7
- manager?: INoticeBubbleManager;
8
- locale?: string;
9
- }
5
+ /** @deprecated */
6
+ export interface INoticeBubbleContainerProps
7
+ extends NoticeBubbleContainerProps,
8
+ UnknownProperties {}
9
+ export type NoticeBubbleContainerProps = BoxProps &
10
+ PortalProps & {
11
+ /** Manager copy */
12
+ manager?: NoticeBubbleManager;
13
+ locale?: string;
14
+ };
10
15
 
11
- export interface INoticeBubbleProps extends IBoxProps {
16
+ /** @deprecated */
17
+ export interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}
18
+ export type NoticeBubbleProps = BoxProps & {
12
19
  /**
13
20
  * Notice visibility.
14
21
  */
@@ -24,9 +31,12 @@ export interface INoticeBubbleProps extends IBoxProps {
24
31
  /**
25
32
  * Notice content.
26
33
  * */
27
- children: React.ReactNode;
28
- }
29
- export interface INoticeBubbleInfoProps extends INoticeBubbleProps {
34
+ children?: React.ReactNode;
35
+ manager?: NoticeBubbleManager;
36
+ };
37
+ /** @deprecated */
38
+ export interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}
39
+ export type NoticeBubbleInfoProps = NoticeBubbleProps & {
30
40
  readonly type?: 'info';
31
41
  /**
32
42
  * Notice display duration.
@@ -37,9 +47,11 @@ export interface INoticeBubbleInfoProps extends INoticeBubbleProps {
37
47
  * @default false
38
48
  */
39
49
  initialAnimation?: boolean;
40
- }
50
+ };
41
51
 
42
- export interface INoticeBubbleWarningProps extends INoticeBubbleProps {
52
+ /** @deprecated */
53
+ export interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}
54
+ export type NoticeBubbleWarningProps = NoticeBubbleProps & {
43
55
  readonly type?: 'warning';
44
56
  /**
45
57
  * Notice display duration.
@@ -50,9 +62,11 @@ export interface INoticeBubbleWarningProps extends INoticeBubbleProps {
50
62
  * @default false
51
63
  */
52
64
  initialAnimation?: boolean;
53
- }
65
+ };
54
66
 
55
- export interface INoticeBubbleManager {
67
+ /** @deprecated */
68
+ export interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}
69
+ type NoticeBubbleManagerClass = {
56
70
  /**
57
71
  * Creates and shows a notice.
58
72
  * */
@@ -74,19 +88,17 @@ export interface INoticeBubbleManager {
74
88
  * Removes notice by uid.
75
89
  * */
76
90
  remove: (uid: string) => boolean;
77
- }
91
+ };
78
92
 
79
93
  /**
80
94
  * @deprecated use `NoticeBubbleManager` instead.
81
95
  * */
82
- declare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;
96
+ declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;
83
97
  /**
84
98
  * @deprecated use `NoticeBubbleManager` instead.
85
99
  * */
86
- declare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;
87
- declare const NoticeBubbleContainer: (<T>(
88
- props: CProps<INoticeBubbleContainerProps & T>,
89
- ) => ReturnEl) & {
100
+ declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;
101
+ declare const NoticeBubbleContainer: Intergalactic.Component<'div', NoticeBubbleContainerProps> & {
90
102
  /**
91
103
  * @deprecated use `NoticeBubbleManager` instead.
92
104
  * */
@@ -97,7 +109,7 @@ declare const NoticeBubbleContainer: (<T>(
97
109
  * */
98
110
  Warning: typeof NoticeBubbleWarning;
99
111
  };
100
- declare class NoticeBubbleManager implements INoticeBubbleManager {
112
+ declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
101
113
  /**
102
114
  * Creates and shows a notice.
103
115
  * */
@@ -121,7 +133,7 @@ declare class NoticeBubbleManager implements INoticeBubbleManager {
121
133
  remove(uid: string): boolean;
122
134
  }
123
135
 
124
- const noticeBubbleDefaultManager = new NoticeBubbleManager();
136
+ declare const noticeBubbleDefaultManager: NoticeBubbleManager;
125
137
 
126
138
  export {
127
139
  NoticeBubbleContainer,
@@ -133,4 +145,4 @@ export {
133
145
  /**
134
146
  * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead
135
147
  */
136
- export default new NoticeBubbleManager();
148
+ export default noticeBubbleDefaultManager;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/notice-bubble",
3
3
  "description": "Semrush NoticeBubble Component",
4
- "version": "4.9.4",
4
+ "version": "5.0.0-beta.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,14 +9,14 @@
9
9
  "sideEffects": false,
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/utils": "^3.24",
13
- "@semcore/icon": "2.16 - 3",
14
- "@semcore/portal": "^2",
15
- "@semcore/flex-box": "^4",
16
- "@semcore/animation": "^1"
12
+ "@semcore/utils": "4.0.0-beta.1",
13
+ "@semcore/icon": "4.0.0-beta.1",
14
+ "@semcore/portal": "3.0.0-beta.1",
15
+ "@semcore/flex-box": "5.0.0-beta.1",
16
+ "@semcore/animation": "2.0.0-beta.1"
17
17
  },
18
18
  "peerDependencies": {
19
- "@semcore/core": "^1.11",
19
+ "@semcore/core": "2.0.0-beta.1",
20
20
  "react": "16.8 - 18",
21
21
  "react-dom": "16.8 - 18"
22
22
  },