@semcore/notice-bubble 5.0.0 → 5.0.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,7 +2,13 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [5.0.0] - 2023-07-15
5
+ ## [5.0.1] - 2023-07-24
6
+
7
+ ### Fixed
8
+
9
+ - Notice bubble manager methods strictness.
10
+
11
+ ## [5.0.0] - 2023-07-17
6
12
 
7
13
  ### Break
8
14
 
@@ -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_10svn{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_10svn{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_10svn_gg_,.___SContent_10svn_gg_,.___SView_10svn_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_10svn_gg_,.___SView_10svn_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_10svn_gg_._type_info_10svn_gg_,.___SView_10svn_gg_._type_info_10svn_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_10svn_gg_._type_warning_10svn_gg_,.___SView_10svn_gg_._type_warning_10svn_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_10svn_gg_{flex-direction:column;flex:1}.___SMessage_10svn_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_10svn_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_10svn_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_10svn_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_10svn_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_10svn_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "10svn_gg_") /*__reshadow_css_end__*/, {
35
- "__SBubble": "___SBubble_10svn_gg_",
36
- "__SView": "___SView_10svn_gg_",
37
- "_type_info": "_type_info_10svn_gg_",
38
- "_type_warning": "_type_warning_10svn_gg_",
39
- "__SContent": "___SContent_10svn_gg_",
40
- "__SMessage": "___SMessage_10svn_gg_",
41
- "__SDismiss": "___SDismiss_10svn_gg_",
42
- "__SNoticeBubble": "___SNoticeBubble_10svn_gg_",
43
- "@enter": "enter_10svn",
44
- "@exit": "exit_10svn"
34
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes enter_1bggm{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_1bggm{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_1bggm_gg_,.___SContent_1bggm_gg_,.___SView_1bggm_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_1bggm_gg_,.___SView_1bggm_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_1bggm_gg_._type_info_1bggm_gg_,.___SView_1bggm_gg_._type_info_1bggm_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_1bggm_gg_._type_warning_1bggm_gg_,.___SView_1bggm_gg_._type_warning_1bggm_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_1bggm_gg_{flex-direction:column;flex:1}.___SMessage_1bggm_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_1bggm_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_1bggm_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_1bggm_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_1bggm_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_1bggm_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "1bggm_gg_") /*__reshadow_css_end__*/, {
35
+ "__SBubble": "___SBubble_1bggm_gg_",
36
+ "__SView": "___SView_1bggm_gg_",
37
+ "_type_info": "_type_info_1bggm_gg_",
38
+ "_type_warning": "_type_warning_1bggm_gg_",
39
+ "__SContent": "___SContent_1bggm_gg_",
40
+ "__SMessage": "___SMessage_1bggm_gg_",
41
+ "__SDismiss": "___SDismiss_1bggm_gg_",
42
+ "__SNoticeBubble": "___SNoticeBubble_1bggm_gg_",
43
+ "@enter": "enter_1bggm",
44
+ "@exit": "exit_1bggm"
45
45
  });
46
46
  var Notices = function Notices(props) {
47
47
  var styles = props.styles,
@@ -1 +1 @@
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"}
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 icon?: React.ReactElement;\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: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\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: NoticeBubbleInfoProps | NoticeBubbleWarningProps): {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\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;AAsBA;AAeA;AAeA;AAwBA;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_10svn{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_10svn{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_10svn_gg_,.___SContent_10svn_gg_,.___SView_10svn_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_10svn_gg_,.___SView_10svn_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_10svn_gg_._type_info_10svn_gg_,.___SView_10svn_gg_._type_info_10svn_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_10svn_gg_._type_warning_10svn_gg_,.___SView_10svn_gg_._type_warning_10svn_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_10svn_gg_{flex-direction:column;flex:1}.___SMessage_10svn_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_10svn_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_10svn_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_10svn_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_10svn_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_10svn_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "10svn_gg_") /*__reshadow_css_end__*/, {
29
- "__SBubble": "___SBubble_10svn_gg_",
30
- "__SView": "___SView_10svn_gg_",
31
- "_type_info": "_type_info_10svn_gg_",
32
- "_type_warning": "_type_warning_10svn_gg_",
33
- "__SContent": "___SContent_10svn_gg_",
34
- "__SMessage": "___SMessage_10svn_gg_",
35
- "__SDismiss": "___SDismiss_10svn_gg_",
36
- "__SNoticeBubble": "___SNoticeBubble_10svn_gg_",
37
- "@enter": "enter_10svn",
38
- "@exit": "exit_10svn"
28
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes enter_1bggm{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_1bggm{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_1bggm_gg_,.___SContent_1bggm_gg_,.___SView_1bggm_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_1bggm_gg_,.___SView_1bggm_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_1bggm_gg_._type_info_1bggm_gg_,.___SView_1bggm_gg_._type_info_1bggm_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_1bggm_gg_._type_warning_1bggm_gg_,.___SView_1bggm_gg_._type_warning_1bggm_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_1bggm_gg_{flex-direction:column;flex:1}.___SMessage_1bggm_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_1bggm_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_1bggm_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_1bggm_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_1bggm_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_1bggm_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "1bggm_gg_") /*__reshadow_css_end__*/, {
29
+ "__SBubble": "___SBubble_1bggm_gg_",
30
+ "__SView": "___SView_1bggm_gg_",
31
+ "_type_info": "_type_info_1bggm_gg_",
32
+ "_type_warning": "_type_warning_1bggm_gg_",
33
+ "__SContent": "___SContent_1bggm_gg_",
34
+ "__SMessage": "___SMessage_1bggm_gg_",
35
+ "__SDismiss": "___SDismiss_1bggm_gg_",
36
+ "__SNoticeBubble": "___SNoticeBubble_1bggm_gg_",
37
+ "@enter": "enter_1bggm",
38
+ "@exit": "exit_1bggm"
39
39
  });
40
40
  var Notices = function Notices(props) {
41
41
  var styles = props.styles,
@@ -1 +1 @@
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
+ {"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 icon?: React.ReactElement;\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: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\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: NoticeBubbleInfoProps | NoticeBubbleWarningProps): {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\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;AAsBA;AAeA;AAeA;AAwBA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAecA,mBAAmB,gBAAAC,YAAA,UAAAD,oBAAA;EAAAE,eAAA,OAAAF,mBAAA;AAAA;AAAA"}
@@ -33,6 +33,7 @@ export type NoticeBubbleProps = BoxProps & {
33
33
  * */
34
34
  children?: React.ReactNode;
35
35
  manager?: NoticeBubbleManager;
36
+ icon?: React.ReactElement;
36
37
  };
37
38
  /** @deprecated */
38
39
  export interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}
@@ -70,11 +71,9 @@ type NoticeBubbleManagerClass = {
70
71
  /**
71
72
  * Creates and shows a notice.
72
73
  * */
73
- add: (props: INoticeBubbleInfoProps | INoticeBubbleWarningProps) => {
74
+ add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => {
74
75
  uid: string;
75
- update: (
76
- props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,
77
- ) => boolean;
76
+ update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
78
77
  remove: () => boolean;
79
78
  };
80
79
  /**
@@ -82,7 +81,7 @@ type NoticeBubbleManagerClass = {
82
81
  * */
83
82
  update: (
84
83
  uid: string,
85
- props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,
84
+ props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,
86
85
  ) => boolean;
87
86
  /**
88
87
  * Removes notice by uid.
@@ -113,11 +112,9 @@ declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
113
112
  /**
114
113
  * Creates and shows a notice.
115
114
  * */
116
- add(props: INoticeBubbleInfoProps | INoticeBubbleWarningProps): {
115
+ add(props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): {
117
116
  uid: string;
118
- update: (
119
- props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,
120
- ) => boolean;
117
+ update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
121
118
  remove: () => boolean;
122
119
  };
123
120
  /**
@@ -125,7 +122,7 @@ declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
125
122
  * */
126
123
  update(
127
124
  uid: string,
128
- props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,
125
+ props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,
129
126
  ): boolean;
130
127
  /**
131
128
  * Removes notice by uid.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/notice-bubble",
3
3
  "description": "Semrush NoticeBubble Component",
4
- "version": "5.0.0",
4
+ "version": "5.0.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",