@semcore/notice 5.47.2-prerelease.0 → 5.48.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.
@@ -6,12 +6,12 @@ import it from "./it.json.mjs";
6
6
  import ja from "./ja.json.mjs";
7
7
  import ko from "./ko.json.mjs";
8
8
  import nl from "./nl.json.mjs";
9
+ import pl from "./pl.json.mjs";
9
10
  import pt from "./pt.json.mjs";
11
+ import sv from "./sv.json.mjs";
10
12
  import tr from "./tr.json.mjs";
11
13
  import vi from "./vi.json.mjs";
12
14
  import zh from "./zh.json.mjs";
13
- import pl from "./pl.json.mjs";
14
- import sv from "./sv.json.mjs";
15
15
  var localizedMessages = {
16
16
  de,
17
17
  en,
@@ -1,23 +1,14 @@
1
- import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
2
- import { Box, BoxProps } from '@semcore/flex-box';
3
- import Button from '@semcore/button';
4
- import { IconProps } from '@semcore/icon';
5
- import { FadeInOutProps } from '@semcore/animation';
6
- import { Text } from '@semcore/typography';
1
+ import type { FadeInOutProps, Box, BoxProps } from '@semcore/base-components';
2
+ import type Button from '@semcore/button';
3
+ import type { PropGetterFn, Intergalactic } from '@semcore/core';
4
+ import type { Text } from '@semcore/typography';
7
5
 
8
6
  export type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | 'muted';
9
- export type NoticeUse = 'primary' | 'secondary';
10
7
 
11
- /** @deprecated */
12
- export interface INoticeProps extends NoticeProps, UnknownProperties {}
13
8
  export type NoticeProps = BoxProps &
14
9
  FadeInOutProps & {
15
10
  /** Property for managing visibility of Notice */
16
11
  hidden?: boolean;
17
- /** Notice type
18
- * @deprecated since version ^4.1.0
19
- */
20
- use?: NoticeUse;
21
12
  /**
22
13
  * Notice theme
23
14
  * @default info
@@ -27,23 +18,18 @@ export type NoticeProps = BoxProps &
27
18
  * @default 250
28
19
  */
29
20
  duration?: number;
21
+ /** Specifies the locale for i18n support */
30
22
  locale?: string;
31
23
  };
32
24
 
33
- /** @deprecated */
34
- export interface INoticeLabelProps extends NoticeLabelProps, UnknownProperties {}
35
25
  export type NoticeLabelProps = BoxProps & {
36
26
  theme?: NoticeTheme;
37
27
  };
38
28
 
39
- /** @deprecated */
40
- export interface INoticeContext extends NoticeContext, UnknownProperties {}
41
29
  export type NoticeContext = {
42
- getLabelProps: PropGetterFn;
30
+ getLabelProps?: PropGetterFn;
43
31
  };
44
32
 
45
- /** @deprecated */
46
- export interface INoticeSmartProps extends NoticeSmartProps, UnknownProperties {}
47
33
  export type NoticeSmartProps = NoticeProps & {
48
34
  /**
49
35
  * A custom element for additional information
@@ -59,6 +45,9 @@ export type NoticeSmartProps = NoticeProps & {
59
45
  * Custom action element
60
46
  */
61
47
  actions?: React.ReactNode;
48
+
49
+ /** A custom element for text */
50
+ text?: React.ReactNode;
62
51
  /**
63
52
  * Adds a Close button
64
53
  */
@@ -75,14 +64,15 @@ declare const Notice: Intergalactic.Component<'div', NoticeProps, NoticeContext>
75
64
  Content: typeof Box;
76
65
  Title: typeof Text;
77
66
  Text: typeof Text;
78
- /**
79
- * @deprecated Use Notice.Close instead of Notice.CloseIcon
80
- */
81
- CloseIcon: Intergalactic.Component<'div', IconProps>;
82
67
  Close: typeof Button;
83
68
  };
84
69
 
85
- declare const NoticeSmart: Intergalactic.Component<'div', NoticeSmartProps>;
70
+ declare const NoticeSmart: (
71
+ props: Intergalactic.InternalTypings.EfficientOmit<
72
+ Intergalactic.InternalTypings.ComponentProps<'div', 'div', NoticeSmartProps>,
73
+ 'children'
74
+ >
75
+ ) => Intergalactic.InternalTypings.ComponentRenderingResults & Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', NoticeSmartProps>;
86
76
 
87
77
  export { NoticeSmart };
88
78
  export default Notice;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/notice",
3
3
  "description": "Semrush Notice Component",
4
- "version": "5.47.2-prerelease.0",
4
+ "version": "5.48.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,16 +14,16 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/animation": "2.41.4-prerelease.0",
18
- "@semcore/utils": "4.48.5-prerelease.0",
19
- "@semcore/button": "5.43.3-prerelease.0",
20
- "@semcore/flex-box": "5.41.4-prerelease.0",
21
- "@semcore/icon": "4.62.1-prerelease.0",
22
- "@semcore/notice-global": "2.62.2-prerelease.0",
23
- "@semcore/typography": "5.53.2-prerelease.0"
17
+ "@semcore/animation": "2.42.0-prerelease.0",
18
+ "@semcore/utils": "4.49.0-prerelease.0",
19
+ "@semcore/button": "5.44.0-prerelease.0",
20
+ "@semcore/flex-box": "5.42.0-prerelease.0",
21
+ "@semcore/icon": "4.63.0-prerelease.0",
22
+ "@semcore/notice-global": "2.63.0-prerelease.0",
23
+ "@semcore/typography": "5.54.0-prerelease.0"
24
24
  },
25
25
  "peerDependencies": {
26
- "@semcore/core": "^2.39.4-prerelease.0",
26
+ "@semcore/core": "^2.40.0-prerelease.0",
27
27
  "react": "16.8 - 18",
28
28
  "react-dom": "16.8 - 18"
29
29
  },