@semcore/notice-bubble 5.35.0 → 5.36.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 +6 -0
- package/lib/cjs/NoticeBubble.js +60 -34
- package/lib/cjs/NoticeBubble.js.map +1 -1
- package/lib/cjs/NoticeBubbleManager.js +13 -2
- package/lib/cjs/NoticeBubbleManager.js.map +1 -1
- package/lib/cjs/index.d.js +0 -18
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/style/notice-bubble.shadow.css +9 -5
- package/lib/cjs/translations/de.json +2 -1
- package/lib/cjs/translations/en.json +2 -1
- package/lib/cjs/translations/es.json +2 -1
- package/lib/cjs/translations/fr.json +2 -1
- package/lib/cjs/translations/it.json +2 -1
- package/lib/cjs/translations/ja.json +2 -1
- package/lib/cjs/translations/ko.json +2 -1
- package/lib/cjs/translations/nl.json +2 -1
- package/lib/cjs/translations/pl.json +2 -1
- package/lib/cjs/translations/pt.json +2 -1
- package/lib/cjs/translations/sv.json +2 -1
- package/lib/cjs/translations/tr.json +2 -1
- package/lib/cjs/translations/vi.json +2 -1
- package/lib/cjs/translations/zh.json +2 -1
- package/lib/es6/NoticeBubble.js +61 -35
- package/lib/es6/NoticeBubble.js.map +1 -1
- package/lib/es6/NoticeBubbleManager.js +13 -2
- package/lib/es6/NoticeBubbleManager.js.map +1 -1
- package/lib/es6/index.d.js +0 -16
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/notice-bubble.shadow.css +9 -5
- package/lib/es6/translations/de.json +2 -1
- package/lib/es6/translations/en.json +2 -1
- package/lib/es6/translations/es.json +2 -1
- package/lib/es6/translations/fr.json +2 -1
- package/lib/es6/translations/it.json +2 -1
- package/lib/es6/translations/ja.json +2 -1
- package/lib/es6/translations/ko.json +2 -1
- package/lib/es6/translations/nl.json +2 -1
- package/lib/es6/translations/pl.json +2 -1
- package/lib/es6/translations/pt.json +2 -1
- package/lib/es6/translations/sv.json +2 -1
- package/lib/es6/translations/tr.json +2 -1
- package/lib/es6/translations/vi.json +2 -1
- package/lib/es6/translations/zh.json +2 -1
- package/lib/types/index.d.ts +27 -13
- package/package.json +7 -7
package/lib/types/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownPr
|
|
|
40
40
|
export type NoticeBubbleInfoProps = NoticeBubbleProps & {
|
|
41
41
|
readonly type?: 'info';
|
|
42
42
|
/**
|
|
43
|
-
* Notice display duration.
|
|
43
|
+
* Notice display duration. Set to 0 to disable auto-close.
|
|
44
44
|
*/
|
|
45
45
|
duration?: number;
|
|
46
46
|
/**
|
|
@@ -48,6 +48,13 @@ export type NoticeBubbleInfoProps = NoticeBubbleProps & {
|
|
|
48
48
|
* @default false
|
|
49
49
|
*/
|
|
50
50
|
initialAnimation?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Use it for complex notices with important controls.
|
|
53
|
+
* If enabled, browser focus will be locked in the notice
|
|
54
|
+
* until it's closed. After close focus should return to the element
|
|
55
|
+
* where it was placed before notice appear.
|
|
56
|
+
*/
|
|
57
|
+
focusLock?: boolean;
|
|
51
58
|
};
|
|
52
59
|
|
|
53
60
|
/** @deprecated */
|
|
@@ -63,6 +70,13 @@ export type NoticeBubbleWarningProps = NoticeBubbleProps & {
|
|
|
63
70
|
* @default false
|
|
64
71
|
*/
|
|
65
72
|
initialAnimation?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Use it for complex notices with important controls.
|
|
75
|
+
* If enabled, browser focus will be locked in the notice
|
|
76
|
+
* until it's closed. After close focus should return to the element
|
|
77
|
+
* where it was placed before notice appear.
|
|
78
|
+
*/
|
|
79
|
+
focusLock?: boolean;
|
|
66
80
|
};
|
|
67
81
|
|
|
68
82
|
/** @deprecated */
|
|
@@ -75,6 +89,8 @@ export type NoticeBubbleManagerClass = {
|
|
|
75
89
|
uid: string;
|
|
76
90
|
update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
|
|
77
91
|
remove: () => boolean;
|
|
92
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
93
|
+
focus: () => void;
|
|
78
94
|
};
|
|
79
95
|
/**
|
|
80
96
|
* Updates notice by uid.
|
|
@@ -92,12 +108,15 @@ export type NoticeBubbleManagerClass = {
|
|
|
92
108
|
/**
|
|
93
109
|
* @deprecated use `NoticeBubbleManager` instead.
|
|
94
110
|
* */
|
|
95
|
-
declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;
|
|
111
|
+
export declare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;
|
|
96
112
|
/**
|
|
97
113
|
* @deprecated use `NoticeBubbleManager` instead.
|
|
98
114
|
* */
|
|
99
|
-
declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;
|
|
100
|
-
declare const NoticeBubbleContainer: Intergalactic.Component<
|
|
115
|
+
export declare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;
|
|
116
|
+
export declare const NoticeBubbleContainer: Intergalactic.Component<
|
|
117
|
+
'div',
|
|
118
|
+
NoticeBubbleContainerProps
|
|
119
|
+
> & {
|
|
101
120
|
/**
|
|
102
121
|
* @deprecated use `NoticeBubbleManager` instead.
|
|
103
122
|
* */
|
|
@@ -108,7 +127,7 @@ declare const NoticeBubbleContainer: Intergalactic.Component<'div', NoticeBubble
|
|
|
108
127
|
* */
|
|
109
128
|
Warning: typeof NoticeBubbleWarning;
|
|
110
129
|
};
|
|
111
|
-
declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
130
|
+
export declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
112
131
|
/**
|
|
113
132
|
* Creates and shows a notice.
|
|
114
133
|
* */
|
|
@@ -116,6 +135,8 @@ declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
|
116
135
|
uid: string;
|
|
117
136
|
update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
|
|
118
137
|
remove: () => boolean;
|
|
138
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
139
|
+
focus: () => void;
|
|
119
140
|
};
|
|
120
141
|
/**
|
|
121
142
|
* Updates notice by uid.
|
|
@@ -130,15 +151,8 @@ declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
|
130
151
|
remove(uid: string): boolean;
|
|
131
152
|
}
|
|
132
153
|
|
|
133
|
-
declare const noticeBubbleDefaultManager: NoticeBubbleManager;
|
|
154
|
+
export declare const noticeBubbleDefaultManager: NoticeBubbleManager;
|
|
134
155
|
|
|
135
|
-
export {
|
|
136
|
-
NoticeBubbleContainer,
|
|
137
|
-
NoticeBubble,
|
|
138
|
-
NoticeBubbleWarning,
|
|
139
|
-
NoticeBubbleManager,
|
|
140
|
-
noticeBubbleDefaultManager,
|
|
141
|
-
};
|
|
142
156
|
/**
|
|
143
157
|
* @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead
|
|
144
158
|
*/
|
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.
|
|
4
|
+
"version": "5.36.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",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/utils": "4.
|
|
13
|
-
"@semcore/icon": "4.
|
|
14
|
-
"@semcore/portal": "3.
|
|
15
|
-
"@semcore/flex-box": "5.
|
|
16
|
-
"@semcore/animation": "2.
|
|
12
|
+
"@semcore/utils": "4.30.0-prerelease.0",
|
|
13
|
+
"@semcore/icon": "4.39.1-prerelease.0",
|
|
14
|
+
"@semcore/portal": "3.29.0-prerelease.0",
|
|
15
|
+
"@semcore/flex-box": "5.29.0-prerelease.0",
|
|
16
|
+
"@semcore/animation": "2.29.0-prerelease.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@semcore/core": "^2.
|
|
19
|
+
"@semcore/core": "^2.27.0-prerelease.0",
|
|
20
20
|
"react": "16.8 - 18",
|
|
21
21
|
"react-dom": "16.8 - 18"
|
|
22
22
|
},
|