@semcore/notice-bubble 16.1.6 → 16.1.7-prerelease.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/NoticeBubble.js +15 -15
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/NoticeBubble.js +15 -15
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/NoticeBubble.mjs +16 -16
- package/lib/types/index.d.ts +1 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
package/lib/cjs/NoticeBubble.js
CHANGED
|
@@ -39,23 +39,23 @@ var _excluded = ["focusLock"],
|
|
|
39
39
|
_excluded2 = ["forwardRef", "styles", "onMouseEnter", "onMouseLeave", "getI18nText", "icon", "children", "action", "type"];
|
|
40
40
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
41
41
|
/*!__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
|
|
42
|
-
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
42
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes enter_1a9hv{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_1a9hv{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_1a9hv_gg_,.___SView_1a9hv_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_1a9hv_gg_._type_info_1a9hv_gg_,.___SView_1a9hv_gg_._type_info_1a9hv_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_1a9hv_gg_._type_warning_1a9hv_gg_,.___SView_1a9hv_gg_._type_warning_1a9hv_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_1a9hv_gg_{flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);flex:1}.___SMessage_1a9hv_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SDismiss_1a9hv_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_1a9hv_gg_.__use_1a9hv_gg_{padding:0 1px}.___SIcon_1a9hv_gg_{justify-content:center;align-items:center;height:var(--intergalactic-spacing-5x, 20px)}.___SNoticeBubble_1a9hv_gg_{width:300px;position:fixed;right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_1a9hv_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SNoticeBubble_1a9hv_gg_.__disablePortal_1a9hv_gg_{position:sticky;margin-left:auto;height:0}.___SMessage_1a9hv_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}.___SNoticeAriaLiveWrapper_1a9hv_gg_{display:contents}", /*__inner_css_end__*/"1a9hv_gg_"),
|
|
43
43
|
/*__reshadow_css_end__*/
|
|
44
44
|
{
|
|
45
|
-
"__SContent": "
|
|
46
|
-
"__SMessage": "
|
|
47
|
-
"__SDismiss": "
|
|
48
|
-
"_use": "
|
|
49
|
-
"__SIcon": "
|
|
50
|
-
"__SNoticeBubble": "
|
|
51
|
-
"_disablePortal": "
|
|
52
|
-
"__SNoticeAriaLiveWrapper": "
|
|
53
|
-
"@enter": "
|
|
54
|
-
"@exit": "
|
|
55
|
-
"__SBubble": "
|
|
56
|
-
"__SView": "
|
|
57
|
-
"_type_info": "
|
|
58
|
-
"_type_warning": "
|
|
45
|
+
"__SContent": "___SContent_1a9hv_gg_",
|
|
46
|
+
"__SMessage": "___SMessage_1a9hv_gg_",
|
|
47
|
+
"__SDismiss": "___SDismiss_1a9hv_gg_",
|
|
48
|
+
"_use": "__use_1a9hv_gg_",
|
|
49
|
+
"__SIcon": "___SIcon_1a9hv_gg_",
|
|
50
|
+
"__SNoticeBubble": "___SNoticeBubble_1a9hv_gg_",
|
|
51
|
+
"_disablePortal": "__disablePortal_1a9hv_gg_",
|
|
52
|
+
"__SNoticeAriaLiveWrapper": "___SNoticeAriaLiveWrapper_1a9hv_gg_",
|
|
53
|
+
"@enter": "enter_1a9hv",
|
|
54
|
+
"@exit": "exit_1a9hv",
|
|
55
|
+
"__SBubble": "___SBubble_1a9hv_gg_",
|
|
56
|
+
"__SView": "___SView_1a9hv_gg_",
|
|
57
|
+
"_type_info": "_type_info_1a9hv_gg_",
|
|
58
|
+
"_type_warning": "_type_warning_1a9hv_gg_"
|
|
59
59
|
});
|
|
60
60
|
var Notices = function Notices(props) {
|
|
61
61
|
var styles = props.styles,
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\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. 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\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 * 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\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * 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};\nexport declare 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n}\n\nexport declare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\n /** Specifies the locale for i18n support */\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. 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\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 * 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\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * 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};\nexport declare 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n}\n\nexport declare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/NoticeBubble.js
CHANGED
|
@@ -32,23 +32,23 @@ import Portal from '@semcore/portal';
|
|
|
32
32
|
import React from 'react';
|
|
33
33
|
import manager from './NoticeBubbleManager';
|
|
34
34
|
/*!__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
|
|
35
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
35
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes enter_1a9hv{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_1a9hv{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_1a9hv_gg_,.___SView_1a9hv_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_1a9hv_gg_._type_info_1a9hv_gg_,.___SView_1a9hv_gg_._type_info_1a9hv_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_1a9hv_gg_._type_warning_1a9hv_gg_,.___SView_1a9hv_gg_._type_warning_1a9hv_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_1a9hv_gg_{flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);flex:1}.___SMessage_1a9hv_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SDismiss_1a9hv_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_1a9hv_gg_.__use_1a9hv_gg_{padding:0 1px}.___SIcon_1a9hv_gg_{justify-content:center;align-items:center;height:var(--intergalactic-spacing-5x, 20px)}.___SNoticeBubble_1a9hv_gg_{width:300px;position:fixed;right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_1a9hv_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SNoticeBubble_1a9hv_gg_.__disablePortal_1a9hv_gg_{position:sticky;margin-left:auto;height:0}.___SMessage_1a9hv_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}.___SNoticeAriaLiveWrapper_1a9hv_gg_{display:contents}", /*__inner_css_end__*/"1a9hv_gg_"),
|
|
36
36
|
/*__reshadow_css_end__*/
|
|
37
37
|
{
|
|
38
|
-
"__SContent": "
|
|
39
|
-
"__SMessage": "
|
|
40
|
-
"__SDismiss": "
|
|
41
|
-
"_use": "
|
|
42
|
-
"__SIcon": "
|
|
43
|
-
"__SNoticeBubble": "
|
|
44
|
-
"_disablePortal": "
|
|
45
|
-
"__SNoticeAriaLiveWrapper": "
|
|
46
|
-
"@enter": "
|
|
47
|
-
"@exit": "
|
|
48
|
-
"__SBubble": "
|
|
49
|
-
"__SView": "
|
|
50
|
-
"_type_info": "
|
|
51
|
-
"_type_warning": "
|
|
38
|
+
"__SContent": "___SContent_1a9hv_gg_",
|
|
39
|
+
"__SMessage": "___SMessage_1a9hv_gg_",
|
|
40
|
+
"__SDismiss": "___SDismiss_1a9hv_gg_",
|
|
41
|
+
"_use": "__use_1a9hv_gg_",
|
|
42
|
+
"__SIcon": "___SIcon_1a9hv_gg_",
|
|
43
|
+
"__SNoticeBubble": "___SNoticeBubble_1a9hv_gg_",
|
|
44
|
+
"_disablePortal": "__disablePortal_1a9hv_gg_",
|
|
45
|
+
"__SNoticeAriaLiveWrapper": "___SNoticeAriaLiveWrapper_1a9hv_gg_",
|
|
46
|
+
"@enter": "enter_1a9hv",
|
|
47
|
+
"@exit": "exit_1a9hv",
|
|
48
|
+
"__SBubble": "___SBubble_1a9hv_gg_",
|
|
49
|
+
"__SView": "___SView_1a9hv_gg_",
|
|
50
|
+
"_type_info": "_type_info_1a9hv_gg_",
|
|
51
|
+
"_type_warning": "_type_warning_1a9hv_gg_"
|
|
52
52
|
});
|
|
53
53
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
54
54
|
import { Timer } from './utils';
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\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. 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\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 * 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\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * 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};\nexport declare 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n}\n\nexport declare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { PortalProps } from '@semcore/portal';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManagerClass;\n /** Specifies the locale for i18n support */\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. 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\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 * 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\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\nexport type 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * 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};\nexport declare 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 ref: React.RefObject<HTMLDivElement>;\n focus: () => void;\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 * Replace last notice (if it is existing)\n */\n replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;\n}\n\nexport declare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/NoticeBubble.mjs
CHANGED
|
@@ -37,25 +37,25 @@ var style = (
|
|
|
37
37
|
/*__reshadow_css_start__*/
|
|
38
38
|
(sstyled.insert(
|
|
39
39
|
/*__inner_css_start__*/
|
|
40
|
-
"@keyframes
|
|
40
|
+
"@keyframes enter_1a9hv{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_1a9hv{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_1a9hv_gg_,.___SView_1a9hv_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_1a9hv_gg_._type_info_1a9hv_gg_,.___SView_1a9hv_gg_._type_info_1a9hv_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_1a9hv_gg_._type_warning_1a9hv_gg_,.___SView_1a9hv_gg_._type_warning_1a9hv_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_1a9hv_gg_{flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);flex:1}.___SMessage_1a9hv_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SDismiss_1a9hv_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_1a9hv_gg_.__use_1a9hv_gg_{padding:0 1px}.___SIcon_1a9hv_gg_{justify-content:center;align-items:center;height:var(--intergalactic-spacing-5x, 20px)}.___SNoticeBubble_1a9hv_gg_{width:300px;position:fixed;right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_1a9hv_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SNoticeBubble_1a9hv_gg_.__disablePortal_1a9hv_gg_{position:sticky;margin-left:auto;height:0}.___SMessage_1a9hv_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}.___SNoticeAriaLiveWrapper_1a9hv_gg_{display:contents}",
|
|
41
41
|
/*__inner_css_end__*/
|
|
42
|
-
"
|
|
42
|
+
"1a9hv_gg_"
|
|
43
43
|
), /*__reshadow_css_end__*/
|
|
44
44
|
{
|
|
45
|
-
"__SContent": "
|
|
46
|
-
"__SMessage": "
|
|
47
|
-
"__SDismiss": "
|
|
48
|
-
"_use": "
|
|
49
|
-
"__SIcon": "
|
|
50
|
-
"__SNoticeBubble": "
|
|
51
|
-
"_disablePortal": "
|
|
52
|
-
"__SNoticeAriaLiveWrapper": "
|
|
53
|
-
"@enter": "
|
|
54
|
-
"@exit": "
|
|
55
|
-
"__SBubble": "
|
|
56
|
-
"__SView": "
|
|
57
|
-
"_type_info": "
|
|
58
|
-
"_type_warning": "
|
|
45
|
+
"__SContent": "___SContent_1a9hv_gg_",
|
|
46
|
+
"__SMessage": "___SMessage_1a9hv_gg_",
|
|
47
|
+
"__SDismiss": "___SDismiss_1a9hv_gg_",
|
|
48
|
+
"_use": "__use_1a9hv_gg_",
|
|
49
|
+
"__SIcon": "___SIcon_1a9hv_gg_",
|
|
50
|
+
"__SNoticeBubble": "___SNoticeBubble_1a9hv_gg_",
|
|
51
|
+
"_disablePortal": "__disablePortal_1a9hv_gg_",
|
|
52
|
+
"__SNoticeAriaLiveWrapper": "___SNoticeAriaLiveWrapper_1a9hv_gg_",
|
|
53
|
+
"@enter": "enter_1a9hv",
|
|
54
|
+
"@exit": "exit_1a9hv",
|
|
55
|
+
"__SBubble": "___SBubble_1a9hv_gg_",
|
|
56
|
+
"__SView": "___SView_1a9hv_gg_",
|
|
57
|
+
"_type_info": "_type_info_1a9hv_gg_",
|
|
58
|
+
"_type_warning": "_type_warning_1a9hv_gg_"
|
|
59
59
|
})
|
|
60
60
|
);
|
|
61
61
|
var Notices = function Notices2(props) {
|
package/lib/types/index.d.ts
CHANGED
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.1.
|
|
4
|
+
"version": "16.1.7-prerelease.2",
|
|
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.
|
|
18
|
-
"@semcore/portal": "16.0.
|
|
19
|
-
"@semcore/flex-box": "16.0.
|
|
20
|
-
"@semcore/animation": "16.0.
|
|
21
|
-
"@semcore/button": "16.0.
|
|
17
|
+
"@semcore/icon": "16.6.0-prerelease.2",
|
|
18
|
+
"@semcore/portal": "16.0.7-prerelease.2",
|
|
19
|
+
"@semcore/flex-box": "16.0.7-prerelease.2",
|
|
20
|
+
"@semcore/animation": "16.0.5-prerelease.2",
|
|
21
|
+
"@semcore/button": "16.0.7-prerelease.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^16.
|
|
24
|
+
"@semcore/base-components": "^16.2.1-prerelease.2"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"directory": "semcore/notice-bubble"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@semcore/core": "16.
|
|
32
|
+
"@semcore/core": "16.1.1-prerelease.2",
|
|
33
33
|
"@semcore/testing-utils": "1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|