@semcore/notice-bubble 16.1.12-prerelease.1 → 16.2.0-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/cjs/NoticeBubble.js +131 -91
- package/lib/cjs/NoticeBubble.js.map +1 -1
- package/lib/cjs/NoticeBubble.type.js +2 -0
- package/lib/cjs/NoticeBubble.type.js.map +1 -0
- package/lib/cjs/NoticeBubbleManager.js +32 -25
- package/lib/cjs/NoticeBubbleManager.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils.js +17 -4
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/NoticeBubble.js +131 -91
- package/lib/es6/NoticeBubble.js.map +1 -1
- package/lib/es6/NoticeBubble.type.js +2 -0
- package/lib/es6/NoticeBubble.type.js.map +1 -0
- package/lib/es6/NoticeBubbleManager.js +32 -25
- package/lib/es6/NoticeBubbleManager.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/utils.js +17 -4
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/NoticeBubble.mjs +120 -80
- package/lib/esm/NoticeBubbleManager.mjs +32 -25
- package/lib/esm/utils.mjs +17 -4
- package/lib/types/NoticeBubble.d.ts +33 -0
- package/lib/types/NoticeBubble.type.d.ts +130 -0
- package/lib/types/NoticeBubbleManager.d.ts +24 -0
- package/lib/types/index.d.ts +7 -167
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +58 -0
- package/lib/types/utils.d.ts +14 -0
- package/package.json +6 -5
- package/lib/cjs/index.d.js +0 -2
- package/lib/cjs/index.d.js.map +0 -1
- package/lib/es6/index.d.js +0 -2
- package/lib/es6/index.d.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { NoticeBubbleManagerClass, NoticeBubbleInfoProps, NoticeBubbleWarningProps, AddedNoticeMeta } from './NoticeBubble.type';
|
|
3
|
+
export type NoticeItem = (NoticeBubbleInfoProps | NoticeBubbleWarningProps) & {
|
|
4
|
+
uid: number;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
forwardRef: RefObject<HTMLElement>;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
10
|
+
private items;
|
|
11
|
+
private emitter;
|
|
12
|
+
private counter;
|
|
13
|
+
private replaceTimer;
|
|
14
|
+
addListener(fn: (items: NoticeItem[]) => void): () => void;
|
|
15
|
+
private emit;
|
|
16
|
+
add(props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): AddedNoticeMeta;
|
|
17
|
+
update(uid: number, props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): boolean;
|
|
18
|
+
replace(uid: number, props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): void;
|
|
19
|
+
replaceLast(props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): void;
|
|
20
|
+
remove(uid: number): boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const noticeBubbleDefaultManager: NoticeBubbleManager;
|
|
23
|
+
export { NoticeBubbleManager };
|
|
24
|
+
export default noticeBubbleDefaultManager;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,168 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export interface INoticeBubbleContainerProps
|
|
7
|
-
extends NoticeBubbleContainerProps,
|
|
8
|
-
UnknownProperties {}
|
|
9
|
-
export type NoticeBubbleContainerProps = BoxProps &
|
|
10
|
-
PortalProps & {
|
|
11
|
-
/** Manager copy */
|
|
12
|
-
manager?: NoticeBubbleManagerClass;
|
|
13
|
-
/** Specifies the locale for i18n support */
|
|
14
|
-
locale?: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** @deprecated */
|
|
18
|
-
export interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}
|
|
19
|
-
export type NoticeBubbleProps = BoxProps & {
|
|
20
|
-
/**
|
|
21
|
-
* Notice visibility.
|
|
22
|
-
*/
|
|
23
|
-
visible?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Control under the notice children.
|
|
26
|
-
* */
|
|
27
|
-
action?: React.ReactNode;
|
|
28
|
-
/**
|
|
29
|
-
* Callback triggered by "Close" icon click.
|
|
30
|
-
* */
|
|
31
|
-
onClose?: (e?: React.SyntheticEvent) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Notice content.
|
|
34
|
-
* */
|
|
35
|
-
children?: React.ReactNode;
|
|
36
|
-
manager?: NoticeBubbleManager;
|
|
37
|
-
icon?: React.ReactElement;
|
|
38
|
-
};
|
|
39
|
-
/** @deprecated */
|
|
40
|
-
export interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}
|
|
41
|
-
export type NoticeBubbleInfoProps = NoticeBubbleProps & {
|
|
42
|
-
readonly type?: 'info';
|
|
43
|
-
/**
|
|
44
|
-
* Notice display duration. Set to 0 to disable auto-close.
|
|
45
|
-
*/
|
|
46
|
-
duration?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Enables animation on first rendering.
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
initialAnimation?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Use it for complex notices with important controls.
|
|
54
|
-
* If enabled, browser focus will be locked in the notice
|
|
55
|
-
* until it's closed. After close focus should return to the element
|
|
56
|
-
* where it was placed before notice appear.
|
|
57
|
-
*/
|
|
58
|
-
focusLock?: boolean;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/** @deprecated */
|
|
62
|
-
export interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}
|
|
63
|
-
export type NoticeBubbleWarningProps = NoticeBubbleProps & {
|
|
64
|
-
readonly type?: 'warning';
|
|
65
|
-
/**
|
|
66
|
-
* Notice display duration.
|
|
67
|
-
*/
|
|
68
|
-
duration?: number;
|
|
69
|
-
/**
|
|
70
|
-
* Enables animation on first rendering.
|
|
71
|
-
* @default false
|
|
72
|
-
*/
|
|
73
|
-
initialAnimation?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Use it for complex notices with important controls.
|
|
76
|
-
* If enabled, browser focus will be locked in the notice
|
|
77
|
-
* until it's closed. After close focus should return to the element
|
|
78
|
-
* where it was placed before notice appear.
|
|
79
|
-
*/
|
|
80
|
-
focusLock?: boolean;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/** @deprecated */
|
|
84
|
-
export interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}
|
|
85
|
-
export type NoticeBubbleManagerClass = {
|
|
86
|
-
/**
|
|
87
|
-
* Creates and shows a notice.
|
|
88
|
-
* */
|
|
89
|
-
add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => {
|
|
90
|
-
uid: string;
|
|
91
|
-
update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
|
|
92
|
-
remove: () => boolean;
|
|
93
|
-
ref: React.RefObject<HTMLDivElement>;
|
|
94
|
-
focus: () => void;
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* Updates notice by uid.
|
|
98
|
-
* */
|
|
99
|
-
update: (
|
|
100
|
-
uid: string,
|
|
101
|
-
props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,
|
|
102
|
-
) => boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Removes notice by uid.
|
|
105
|
-
* */
|
|
106
|
-
remove: (uid: string) => boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Replace last notice (if it is existing)
|
|
109
|
-
*/
|
|
110
|
-
replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @deprecated use `NoticeBubbleManager` instead.
|
|
115
|
-
* */
|
|
116
|
-
export declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;
|
|
117
|
-
/**
|
|
118
|
-
* @deprecated use `NoticeBubbleManager` instead.
|
|
119
|
-
* */
|
|
120
|
-
export declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;
|
|
121
|
-
export declare const NoticeBubbleContainer: Intergalactic.Component<
|
|
122
|
-
'div',
|
|
123
|
-
NoticeBubbleContainerProps
|
|
124
|
-
> & {
|
|
125
|
-
/**
|
|
126
|
-
* @deprecated use `NoticeBubbleManager` instead.
|
|
127
|
-
* */
|
|
128
|
-
Info: typeof NoticeBubble;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @deprecated use `NoticeBubbleManager` instead.
|
|
132
|
-
* */
|
|
133
|
-
Warning: typeof NoticeBubbleWarning;
|
|
134
|
-
};
|
|
135
|
-
export declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
136
|
-
/**
|
|
137
|
-
* Creates and shows a notice.
|
|
138
|
-
* */
|
|
139
|
-
add(props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): {
|
|
140
|
-
uid: string;
|
|
141
|
-
update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
|
|
142
|
-
remove: () => boolean;
|
|
143
|
-
ref: React.RefObject<HTMLDivElement>;
|
|
144
|
-
focus: () => void;
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* Updates notice by uid.
|
|
148
|
-
* */
|
|
149
|
-
update(
|
|
150
|
-
uid: string,
|
|
151
|
-
props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,
|
|
152
|
-
): boolean;
|
|
153
|
-
/**
|
|
154
|
-
* Removes notice by uid.
|
|
155
|
-
* */
|
|
156
|
-
remove(uid: string): boolean;
|
|
157
|
-
/**
|
|
158
|
-
* Replace last notice (if it is existing)
|
|
159
|
-
*/
|
|
160
|
-
replaceLast: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => void;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export declare const noticeBubbleDefaultManager: NoticeBubbleManager;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead
|
|
167
|
-
*/
|
|
1
|
+
import { default as NoticeBubbleContainer } from './NoticeBubble';
|
|
2
|
+
import type { NoticeBubbleContainerProps, NoticeBubbleInfoProps, NoticeBubbleWarningProps, AddedNoticeMeta } from './NoticeBubble.type';
|
|
3
|
+
import { default as noticeBubbleDefaultManager } from './NoticeBubbleManager';
|
|
4
|
+
export * from './NoticeBubble';
|
|
5
|
+
export * from './NoticeBubbleManager';
|
|
168
6
|
export default noticeBubbleDefaultManager;
|
|
7
|
+
export { NoticeBubbleContainer, noticeBubbleDefaultManager };
|
|
8
|
+
export type { NoticeBubbleContainerProps, NoticeBubbleInfoProps, NoticeBubbleWarningProps, AddedNoticeMeta, };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const localizedMessages: {
|
|
2
|
+
de: {
|
|
3
|
+
close: string;
|
|
4
|
+
notification: string;
|
|
5
|
+
};
|
|
6
|
+
en: {
|
|
7
|
+
close: string;
|
|
8
|
+
notification: string;
|
|
9
|
+
};
|
|
10
|
+
es: {
|
|
11
|
+
close: string;
|
|
12
|
+
notification: string;
|
|
13
|
+
};
|
|
14
|
+
fr: {
|
|
15
|
+
close: string;
|
|
16
|
+
notification: string;
|
|
17
|
+
};
|
|
18
|
+
it: {
|
|
19
|
+
close: string;
|
|
20
|
+
notification: string;
|
|
21
|
+
};
|
|
22
|
+
ja: {
|
|
23
|
+
close: string;
|
|
24
|
+
notification: string;
|
|
25
|
+
};
|
|
26
|
+
ko: {
|
|
27
|
+
close: string;
|
|
28
|
+
notification: string;
|
|
29
|
+
};
|
|
30
|
+
nl: {
|
|
31
|
+
close: string;
|
|
32
|
+
notification: string;
|
|
33
|
+
};
|
|
34
|
+
pt: {
|
|
35
|
+
close: string;
|
|
36
|
+
notification: string;
|
|
37
|
+
};
|
|
38
|
+
tr: {
|
|
39
|
+
close: string;
|
|
40
|
+
notification: string;
|
|
41
|
+
};
|
|
42
|
+
vi: {
|
|
43
|
+
close: string;
|
|
44
|
+
notification: string;
|
|
45
|
+
};
|
|
46
|
+
zh: {
|
|
47
|
+
close: string;
|
|
48
|
+
notification: string;
|
|
49
|
+
};
|
|
50
|
+
pl: {
|
|
51
|
+
close: string;
|
|
52
|
+
notification: string;
|
|
53
|
+
};
|
|
54
|
+
sv: {
|
|
55
|
+
close: string;
|
|
56
|
+
notification: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare class Timer {
|
|
2
|
+
private readonly delay;
|
|
3
|
+
private readonly callback;
|
|
4
|
+
private remaining;
|
|
5
|
+
private timerId;
|
|
6
|
+
private start;
|
|
7
|
+
paused: boolean;
|
|
8
|
+
constructor(callback: Function, delay: number);
|
|
9
|
+
pause(): void;
|
|
10
|
+
resume(): void;
|
|
11
|
+
reset(): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
}
|
|
14
|
+
export { Timer };
|
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.
|
|
4
|
+
"version": "16.2.0-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/icon": "16.7.3-prerelease.
|
|
17
|
+
"@semcore/icon": "16.7.3-prerelease.0",
|
|
18
18
|
"@semcore/portal": "16.0.11",
|
|
19
19
|
"@semcore/flex-box": "16.0.11",
|
|
20
20
|
"@semcore/animation": "16.0.7",
|
|
21
|
-
"@semcore/button": "16.0.12
|
|
21
|
+
"@semcore/button": "16.0.12"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^16.
|
|
24
|
+
"@semcore/base-components": "^16.4.2-prerelease.0"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -30,9 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@semcore/core": "16.5.1",
|
|
33
|
+
"@semcore/base-components": "16.4.2-prerelease.0",
|
|
33
34
|
"@semcore/testing-utils": "1.0.0"
|
|
34
35
|
},
|
|
35
36
|
"scripts": {
|
|
36
|
-
"build": "pnpm semcore-builder
|
|
37
|
+
"build": "pnpm semcore-builder && pnpm vite build"
|
|
37
38
|
}
|
|
38
39
|
}
|
package/lib/cjs/index.d.js
DELETED
package/lib/cjs/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/index.d.js
DELETED
package/lib/es6/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|