@semcore/notice-bubble 4.1.5 → 4.1.6

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,6 +2,12 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [4.1.6] - 2022-10-04
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/utils` [3.37.1 ~> 3.37.2], `@semcore/icon` [2.32.1 ~> 2.32.2], `@semcore/flex-box` [4.5.11 ~> 4.5.12], `@semcore/animation` [1.5.10 ~> 1.5.11]).
10
+
5
11
  ## [4.1.5] - 2022-09-29
6
12
 
7
13
  ### Changed
@@ -67,20 +67,20 @@ var style = (
67
67
  /*__reshadow_css_start__*/
68
68
  _core.sstyled.insert(
69
69
  /*__inner_css_start__*/
70
- ".___SInfo_1dowu_gg_,.___SView_1dowu_gg_,.___SWarning_1dowu_gg_{position:relative;margin-bottom:12px;padding:12px 28px 12px 12px;width:100%;min-height:44px;border-radius:6px;overflow:hidden;box-sizing:border-box}.___SInfo_1dowu_gg_{background:#191b23}.___SWarning_1dowu_gg_{background:#ff4953}.___SMessage_1dowu_gg_{font-size:14px;color:#fff;line-height:1.33}.___SDismiss_1dowu_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:8px;color:#ffffff}.___SDismiss_1dowu_gg_:hover{color:#e0e1e9}.___SAction_1dowu_gg_{margin-top:8px}.___SNoticeBubble_1dowu_gg_{width:300px;position:fixed;z-index:1010;right:12px;top:12px}@media (max-width:767px){.___SNoticeBubble_1dowu_gg_{width:calc(100% - 24px)}}@-webkit-keyframes enter_1dowu{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes enter_1dowu{0%{transform:translate(100%)}to{transform:translate(0)}}@-webkit-keyframes exit_1dowu{0%{opacity:1}to{opacity:0}}@keyframes exit_1dowu{0%{opacity:1}to{opacity:0}}"
70
+ ".___SInfo_n6ge4_gg_,.___SView_n6ge4_gg_,.___SWarning_n6ge4_gg_{position:relative;margin-bottom:12px;padding:12px 28px 12px 12px;width:100%;min-height:44px;border-radius:6px;overflow:hidden;box-sizing:border-box}.___SInfo_n6ge4_gg_{background:#191b23}.___SWarning_n6ge4_gg_{background:#ff4953}.___SMessage_n6ge4_gg_{font-size:14px;color:#fff;line-height:1.33}.___SDismiss_n6ge4_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:8px;color:#ffffff}.___SDismiss_n6ge4_gg_:hover{color:#e0e1e9}.___SAction_n6ge4_gg_{margin-top:8px}.___SNoticeBubble_n6ge4_gg_{width:300px;position:fixed;z-index:1010;right:12px;top:12px}@media (max-width:767px){.___SNoticeBubble_n6ge4_gg_{width:calc(100% - 24px)}}@keyframes enter_n6ge4{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes exit_n6ge4{0%{opacity:1}to{opacity:0}}"
71
71
  /*__inner_css_end__*/
72
- , "1dowu_gg_")
72
+ , "n6ge4_gg_")
73
73
  /*__reshadow_css_end__*/
74
74
  , {
75
- "__SInfo": "___SInfo_1dowu_gg_",
76
- "__SView": "___SView_1dowu_gg_",
77
- "__SWarning": "___SWarning_1dowu_gg_",
78
- "__SMessage": "___SMessage_1dowu_gg_",
79
- "__SDismiss": "___SDismiss_1dowu_gg_",
80
- "__SAction": "___SAction_1dowu_gg_",
81
- "__SNoticeBubble": "___SNoticeBubble_1dowu_gg_",
82
- "@enter": "enter_1dowu",
83
- "@exit": "exit_1dowu"
75
+ "__SInfo": "___SInfo_n6ge4_gg_",
76
+ "__SView": "___SView_n6ge4_gg_",
77
+ "__SWarning": "___SWarning_n6ge4_gg_",
78
+ "__SMessage": "___SMessage_n6ge4_gg_",
79
+ "__SDismiss": "___SDismiss_n6ge4_gg_",
80
+ "__SAction": "___SAction_n6ge4_gg_",
81
+ "__SNoticeBubble": "___SNoticeBubble_n6ge4_gg_",
82
+ "@enter": "enter_n6ge4",
83
+ "@exit": "exit_n6ge4"
84
84
  });
85
85
 
86
86
  var Notices = function Notices(props) {
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { IPortalProps } from '@semcore/portal';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {\n /** Manager copy */\n manager?: INoticeBubbleManager;\n}\n\nexport interface INoticeBubbleInfoProps extends INoticeBubbleProps {\n readonly type?: 'info';\n /** Notice display duration\n * @default 5000\n */\n duration?: number;\n}\n\nexport interface INoticeBubbleWarningProps extends INoticeBubbleProps {\n readonly type?: 'warning';\n /**\n * Notice display duration\n * @default 0\n */\n duration?: number;\n}\n\nexport interface INoticeBubbleProps extends IBoxProps {\n /**\n * Manager instance\n * @default NoticeBubbleManager()\n */\n manager?: INoticeBubbleManager;\n /**\n * Notice visibility\n */\n visible?: boolean;\n /** Adds controls (buttons, etc.) */\n action?: React.ReactNode;\n\n /** Triggered when the notice is closed */\n onClose?: (e?: React.SyntheticEvent) => void;\n}\n\nexport interface INoticeBubbleManager {\n /**\n * Adding a notice.\n * Takes the props properties of NoticeBubble.\n * Returns an object with the uid and the update, remove functions.\n * */\n add: (\n props: object,\n ) => {\n uid: string;\n update: (props: object) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates the notice by uid.\n * Takes the uid-unique identifier and the props-properties of NoticeBubble.\n * Returns a successful or unsuccessful update.\n * */\n update: (uid: string, props: object) => boolean;\n /**\n * Deletes the notice by uid.\n * Takes an uid-unique identifier.\n * Returns a successful or unsuccessful deletion.\n * */\n remove: (uid: string) => boolean;\n}\n\ndeclare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;\ndeclare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;\ndeclare const NoticeBubbleContainer: (<T>(\n props: CProps<INoticeBubbleContainerProps & T>,\n) => ReturnEl) & {\n Info: typeof NoticeBubble;\n Warning: typeof NoticeBubbleWarning;\n};\n\ndeclare const manager: INoticeBubbleManager;\n\nexport { NoticeBubbleContainer, NoticeBubble, NoticeBubbleWarning };\nexport default manager;\n"],"mappings":""}
@@ -36,20 +36,20 @@ var style = (
36
36
  /*__reshadow_css_start__*/
37
37
  _sstyled.insert(
38
38
  /*__inner_css_start__*/
39
- ".___SInfo_1dowu_gg_,.___SView_1dowu_gg_,.___SWarning_1dowu_gg_{position:relative;margin-bottom:12px;padding:12px 28px 12px 12px;width:100%;min-height:44px;border-radius:6px;overflow:hidden;box-sizing:border-box}.___SInfo_1dowu_gg_{background:#191b23}.___SWarning_1dowu_gg_{background:#ff4953}.___SMessage_1dowu_gg_{font-size:14px;color:#fff;line-height:1.33}.___SDismiss_1dowu_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:8px;color:#ffffff}.___SDismiss_1dowu_gg_:hover{color:#e0e1e9}.___SAction_1dowu_gg_{margin-top:8px}.___SNoticeBubble_1dowu_gg_{width:300px;position:fixed;z-index:1010;right:12px;top:12px}@media (max-width:767px){.___SNoticeBubble_1dowu_gg_{width:calc(100% - 24px)}}@-webkit-keyframes enter_1dowu{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes enter_1dowu{0%{transform:translate(100%)}to{transform:translate(0)}}@-webkit-keyframes exit_1dowu{0%{opacity:1}to{opacity:0}}@keyframes exit_1dowu{0%{opacity:1}to{opacity:0}}"
39
+ ".___SInfo_n6ge4_gg_,.___SView_n6ge4_gg_,.___SWarning_n6ge4_gg_{position:relative;margin-bottom:12px;padding:12px 28px 12px 12px;width:100%;min-height:44px;border-radius:6px;overflow:hidden;box-sizing:border-box}.___SInfo_n6ge4_gg_{background:#191b23}.___SWarning_n6ge4_gg_{background:#ff4953}.___SMessage_n6ge4_gg_{font-size:14px;color:#fff;line-height:1.33}.___SDismiss_n6ge4_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:8px;color:#ffffff}.___SDismiss_n6ge4_gg_:hover{color:#e0e1e9}.___SAction_n6ge4_gg_{margin-top:8px}.___SNoticeBubble_n6ge4_gg_{width:300px;position:fixed;z-index:1010;right:12px;top:12px}@media (max-width:767px){.___SNoticeBubble_n6ge4_gg_{width:calc(100% - 24px)}}@keyframes enter_n6ge4{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes exit_n6ge4{0%{opacity:1}to{opacity:0}}"
40
40
  /*__inner_css_end__*/
41
- , "1dowu_gg_")
41
+ , "n6ge4_gg_")
42
42
  /*__reshadow_css_end__*/
43
43
  , {
44
- "__SInfo": "___SInfo_1dowu_gg_",
45
- "__SView": "___SView_1dowu_gg_",
46
- "__SWarning": "___SWarning_1dowu_gg_",
47
- "__SMessage": "___SMessage_1dowu_gg_",
48
- "__SDismiss": "___SDismiss_1dowu_gg_",
49
- "__SAction": "___SAction_1dowu_gg_",
50
- "__SNoticeBubble": "___SNoticeBubble_1dowu_gg_",
51
- "@enter": "enter_1dowu",
52
- "@exit": "exit_1dowu"
44
+ "__SInfo": "___SInfo_n6ge4_gg_",
45
+ "__SView": "___SView_n6ge4_gg_",
46
+ "__SWarning": "___SWarning_n6ge4_gg_",
47
+ "__SMessage": "___SMessage_n6ge4_gg_",
48
+ "__SDismiss": "___SDismiss_n6ge4_gg_",
49
+ "__SAction": "___SAction_n6ge4_gg_",
50
+ "__SNoticeBubble": "___SNoticeBubble_n6ge4_gg_",
51
+ "@enter": "enter_n6ge4",
52
+ "@exit": "exit_n6ge4"
53
53
  });
54
54
 
55
55
  var Notices = function Notices(props) {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { IPortalProps } from '@semcore/portal';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {\n /** Manager copy */\n manager?: INoticeBubbleManager;\n}\n\nexport interface INoticeBubbleInfoProps extends INoticeBubbleProps {\n readonly type?: 'info';\n /** Notice display duration\n * @default 5000\n */\n duration?: number;\n}\n\nexport interface INoticeBubbleWarningProps extends INoticeBubbleProps {\n readonly type?: 'warning';\n /**\n * Notice display duration\n * @default 0\n */\n duration?: number;\n}\n\nexport interface INoticeBubbleProps extends IBoxProps {\n /**\n * Manager instance\n * @default NoticeBubbleManager()\n */\n manager?: INoticeBubbleManager;\n /**\n * Notice visibility\n */\n visible?: boolean;\n /** Adds controls (buttons, etc.) */\n action?: React.ReactNode;\n\n /** Triggered when the notice is closed */\n onClose?: (e?: React.SyntheticEvent) => void;\n}\n\nexport interface INoticeBubbleManager {\n /**\n * Adding a notice.\n * Takes the props properties of NoticeBubble.\n * Returns an object with the uid and the update, remove functions.\n * */\n add: (\n props: object,\n ) => {\n uid: string;\n update: (props: object) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates the notice by uid.\n * Takes the uid-unique identifier and the props-properties of NoticeBubble.\n * Returns a successful or unsuccessful update.\n * */\n update: (uid: string, props: object) => boolean;\n /**\n * Deletes the notice by uid.\n * Takes an uid-unique identifier.\n * Returns a successful or unsuccessful deletion.\n * */\n remove: (uid: string) => boolean;\n}\n\ndeclare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;\ndeclare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;\ndeclare const NoticeBubbleContainer: (<T>(\n props: CProps<INoticeBubbleContainerProps & T>,\n) => ReturnEl) & {\n Info: typeof NoticeBubble;\n Warning: typeof NoticeBubbleWarning;\n};\n\ndeclare const manager: INoticeBubbleManager;\n\nexport { NoticeBubbleContainer, NoticeBubble, NoticeBubbleWarning };\nexport default manager;\n"],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/notice-bubble",
3
3
  "description": "Semrush NoticeBubble Component",
4
- "version": "4.1.5",
4
+ "version": "4.1.6",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "sideEffects": false,
10
10
  "license": "MIT",
11
11
  "scripts": {
12
- "build": "build --source=js",
12
+ "build": "pnpm semcore-builder --source=js",
13
13
  "test": "jest"
14
14
  },
15
15
  "dependencies": {
@@ -32,6 +32,7 @@
32
32
  "directory": "semcore/notice-bubble"
33
33
  },
34
34
  "devDependencies": {
35
+ "@types/react": "16.8 - 17",
35
36
  "@semcore/jest-preset-ui": "1.0.0"
36
37
  }
37
38
  }
@@ -1,83 +0,0 @@
1
- import { IPortalProps } from '@semcore/portal';
2
- import { CProps, ReturnEl } from '@semcore/core';
3
- import { IBoxProps } from '@semcore/flex-box';
4
-
5
- export interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {
6
- /** Manager copy */
7
- manager?: INoticeBubbleManager;
8
- }
9
-
10
- export interface INoticeBubbleInfoProps extends INoticeBubbleProps {
11
- readonly type?: 'info';
12
- /** Notice display duration
13
- * @default 5000
14
- */
15
- duration?: number;
16
- }
17
-
18
- export interface INoticeBubbleWarningProps extends INoticeBubbleProps {
19
- readonly type?: 'warning';
20
- /**
21
- * Notice display duration
22
- * @default 0
23
- */
24
- duration?: number;
25
- }
26
-
27
- export interface INoticeBubbleProps extends IBoxProps {
28
- /**
29
- * Manager instance
30
- * @default NoticeBubbleManager()
31
- */
32
- manager?: INoticeBubbleManager;
33
- /**
34
- * Notice visibility
35
- */
36
- visible?: boolean;
37
- /** Adds controls (buttons, etc.) */
38
- action?: React.ReactNode;
39
-
40
- /** Triggered when the notice is closed */
41
- onClose?: (e?: React.SyntheticEvent) => void;
42
- }
43
-
44
- export interface INoticeBubbleManager {
45
- /**
46
- * Adding a notice.
47
- * Takes the props properties of NoticeBubble.
48
- * Returns an object with the uid and the update, remove functions.
49
- * */
50
- add: (
51
- props: object,
52
- ) => {
53
- uid: string;
54
- update: (props: object) => boolean;
55
- remove: () => boolean;
56
- };
57
- /**
58
- * Updates the notice by uid.
59
- * Takes the uid-unique identifier and the props-properties of NoticeBubble.
60
- * Returns a successful or unsuccessful update.
61
- * */
62
- update: (uid: string, props: object) => boolean;
63
- /**
64
- * Deletes the notice by uid.
65
- * Takes an uid-unique identifier.
66
- * Returns a successful or unsuccessful deletion.
67
- * */
68
- remove: (uid: string) => boolean;
69
- }
70
-
71
- declare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;
72
- declare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;
73
- declare const NoticeBubbleContainer: (<T>(
74
- props: CProps<INoticeBubbleContainerProps & T>,
75
- ) => ReturnEl) & {
76
- Info: typeof NoticeBubble;
77
- Warning: typeof NoticeBubbleWarning;
78
- };
79
-
80
- declare const manager: INoticeBubbleManager;
81
-
82
- export { NoticeBubbleContainer, NoticeBubble, NoticeBubbleWarning };
83
- export default manager;
@@ -1,83 +0,0 @@
1
- import { IPortalProps } from '@semcore/portal';
2
- import { CProps, ReturnEl } from '@semcore/core';
3
- import { IBoxProps } from '@semcore/flex-box';
4
-
5
- export interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {
6
- /** Manager copy */
7
- manager?: INoticeBubbleManager;
8
- }
9
-
10
- export interface INoticeBubbleInfoProps extends INoticeBubbleProps {
11
- readonly type?: 'info';
12
- /** Notice display duration
13
- * @default 5000
14
- */
15
- duration?: number;
16
- }
17
-
18
- export interface INoticeBubbleWarningProps extends INoticeBubbleProps {
19
- readonly type?: 'warning';
20
- /**
21
- * Notice display duration
22
- * @default 0
23
- */
24
- duration?: number;
25
- }
26
-
27
- export interface INoticeBubbleProps extends IBoxProps {
28
- /**
29
- * Manager instance
30
- * @default NoticeBubbleManager()
31
- */
32
- manager?: INoticeBubbleManager;
33
- /**
34
- * Notice visibility
35
- */
36
- visible?: boolean;
37
- /** Adds controls (buttons, etc.) */
38
- action?: React.ReactNode;
39
-
40
- /** Triggered when the notice is closed */
41
- onClose?: (e?: React.SyntheticEvent) => void;
42
- }
43
-
44
- export interface INoticeBubbleManager {
45
- /**
46
- * Adding a notice.
47
- * Takes the props properties of NoticeBubble.
48
- * Returns an object with the uid and the update, remove functions.
49
- * */
50
- add: (
51
- props: object,
52
- ) => {
53
- uid: string;
54
- update: (props: object) => boolean;
55
- remove: () => boolean;
56
- };
57
- /**
58
- * Updates the notice by uid.
59
- * Takes the uid-unique identifier and the props-properties of NoticeBubble.
60
- * Returns a successful or unsuccessful update.
61
- * */
62
- update: (uid: string, props: object) => boolean;
63
- /**
64
- * Deletes the notice by uid.
65
- * Takes an uid-unique identifier.
66
- * Returns a successful or unsuccessful deletion.
67
- * */
68
- remove: (uid: string) => boolean;
69
- }
70
-
71
- declare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;
72
- declare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;
73
- declare const NoticeBubbleContainer: (<T>(
74
- props: CProps<INoticeBubbleContainerProps & T>,
75
- ) => ReturnEl) & {
76
- Info: typeof NoticeBubble;
77
- Warning: typeof NoticeBubbleWarning;
78
- };
79
-
80
- declare const manager: INoticeBubbleManager;
81
-
82
- export { NoticeBubbleContainer, NoticeBubble, NoticeBubbleWarning };
83
- export default manager;