@semcore/notice 4.6.4 → 5.0.0-beta.1

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,11 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [4.6.4] - 2023-06-30
5
+ ## [5.0.0] - 2023-07-15
6
6
 
7
- ### Changed
7
+ ### Break
8
8
 
9
- - Version patch update due to children dependencies update (`@semcore/animation` [1.10.20 ~> 1.10.21], `@semcore/utils` [3.54.0 ~> 3.54.1], `@semcore/flex-box` [4.7.32 ~> 4.7.33], `@semcore/icon` [3.16.0 ~> 3.16.1]).
9
+ - Strict, backward incompatible typings.
10
10
 
11
11
  ## [4.6.3] - 2023-06-28
12
12
 
package/lib/cjs/Notice.js CHANGED
@@ -24,19 +24,19 @@ var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynam
24
24
  var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
25
25
  var _useCssVariable = require("@semcore/utils/lib/useCssVariable");
26
26
  /*__reshadow-styles__:"./style/notice.shadow.css"*/
27
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SNotice_1ys4g_gg_{display:flex;padding:var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);box-sizing:border-box;border-style:solid;border-width:1px;border-radius:var(--intergalactic-surface-rounded, 6px);color:var(--intergalactic-text-primary, #191b23)}.___SNotice_1ys4g_gg_._theme_info_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_1ys4g_gg_._theme_info_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_info_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #484a54)}}.___SNotice_1ys4g_gg_._theme_danger_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_1ys4g_gg_._theme_danger_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_danger_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #d1002f)}}.___SNotice_1ys4g_gg_._theme_warning_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_1ys4g_gg_._theme_warning_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_warning_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #c33909)}}.___SNotice_1ys4g_gg_._theme_success_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_1ys4g_gg_._theme_success_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_success_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #007c65)}}.___SContent_1ys4g_gg_{flex:1 1 auto;width:100%}.___SActions_1ys4g_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_1ys4g_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex}.___SLabel_1ys4g_gg_._theme_info_1ys4g_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_1ys4g_gg_._theme_danger_1ys4g_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_1ys4g_gg_._theme_warning_1ys4g_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_1ys4g_gg_._theme_success_1ys4g_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_1ys4g_gg_._theme_custom_1ys4g_gg_{color:var(--color_1ys4g)}.___SCloseIcon_1ys4g_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_1ys4g_gg_._theme_custom_1ys4g_gg_{background-color:var(--backgroundColor_1ys4g);border-color:var(--backgroundColor_1ys4g)}" /*__inner_css_end__*/, "1ys4g_gg_") /*__reshadow_css_end__*/, {
28
- "__SNotice": "___SNotice_1ys4g_gg_",
29
- "_theme_info": "_theme_info_1ys4g_gg_",
30
- "__SCloseIcon": "___SCloseIcon_1ys4g_gg_",
31
- "_theme_danger": "_theme_danger_1ys4g_gg_",
32
- "_theme_warning": "_theme_warning_1ys4g_gg_",
33
- "_theme_success": "_theme_success_1ys4g_gg_",
34
- "__SContent": "___SContent_1ys4g_gg_",
35
- "__SActions": "___SActions_1ys4g_gg_",
36
- "__SLabel": "___SLabel_1ys4g_gg_",
37
- "_theme_custom": "_theme_custom_1ys4g_gg_",
38
- "--color": "--color_1ys4g",
39
- "--backgroundColor": "--backgroundColor_1ys4g"
27
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SNotice_o5d4a_gg_{display:flex;padding:var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);box-sizing:border-box;border-style:solid;border-width:1px;border-radius:var(--intergalactic-surface-rounded, 6px);color:var(--intergalactic-text-primary, #191b23)}.___SNotice_o5d4a_gg_._theme_info_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_o5d4a_gg_._theme_info_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_info_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #484a54)}}.___SNotice_o5d4a_gg_._theme_danger_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_o5d4a_gg_._theme_danger_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_danger_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #d1002f)}}.___SNotice_o5d4a_gg_._theme_warning_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_o5d4a_gg_._theme_warning_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_warning_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #c33909)}}.___SNotice_o5d4a_gg_._theme_success_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_o5d4a_gg_._theme_success_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_success_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #007c65)}}.___SContent_o5d4a_gg_{flex:1 1 auto;width:100%}.___SActions_o5d4a_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_o5d4a_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex}.___SLabel_o5d4a_gg_._theme_info_o5d4a_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_o5d4a_gg_._theme_danger_o5d4a_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_o5d4a_gg_._theme_warning_o5d4a_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_o5d4a_gg_._theme_success_o5d4a_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_o5d4a_gg_._theme_custom_o5d4a_gg_{color:var(--color_o5d4a)}.___SCloseIcon_o5d4a_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_o5d4a_gg_._theme_custom_o5d4a_gg_{background-color:var(--backgroundColor_o5d4a);border-color:var(--backgroundColor_o5d4a)}" /*__inner_css_end__*/, "o5d4a_gg_") /*__reshadow_css_end__*/, {
28
+ "__SNotice": "___SNotice_o5d4a_gg_",
29
+ "_theme_info": "_theme_info_o5d4a_gg_",
30
+ "__SCloseIcon": "___SCloseIcon_o5d4a_gg_",
31
+ "_theme_danger": "_theme_danger_o5d4a_gg_",
32
+ "_theme_warning": "_theme_warning_o5d4a_gg_",
33
+ "_theme_success": "_theme_success_o5d4a_gg_",
34
+ "__SContent": "___SContent_o5d4a_gg_",
35
+ "__SActions": "___SActions_o5d4a_gg_",
36
+ "__SLabel": "___SLabel_o5d4a_gg_",
37
+ "_theme_custom": "_theme_custom_o5d4a_gg_",
38
+ "--color": "--color_o5d4a",
39
+ "--backgroundColor": "--backgroundColor_o5d4a"
40
40
  });
41
41
  function isCustomTheme(theme) {
42
42
  return !['danger', 'warning', 'success', 'info'].includes(theme);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport { IIconProps } from '@semcore/icon';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;\nexport type NoticeUse = 'primary' | 'secondary';\n\nexport interface INoticeProps extends IBoxProps, IFadeInOutProps {\n /** Property for managing visibility of Notice */\n hidden?: boolean;\n /** Notice type\n * @deprecated since version ^4.1.0\n */\n use?: NoticeUse;\n /**\n * Notice theme\n * @default info\n */\n theme?: NoticeTheme;\n /** Duration of animation, ms\n * @default 250\n */\n duration?: number;\n locale?: string;\n}\n\nexport interface INoticeLabelProps extends IBoxProps {\n theme?: NoticeTheme;\n}\n\nexport interface INoticeContext {\n getLabelProps: PropGetterFn;\n}\n\nexport interface INoticeSmartProps extends INoticeProps {\n /**\n * A custom element for additional information\n */\n label?: React.ReactNode;\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close icon\n */\n closable?: boolean;\n /**\n * Callback on a click on the close button\n */\n onClose?: (event: React.SyntheticEvent) => void;\n}\n\ndeclare const Notice: (<T>(props: CProps<INoticeProps & T, INoticeContext>) => ReturnEl) & {\n Label: <T>(props: INoticeLabelProps & T) => ReturnEl;\n Actions: typeof Box;\n Content: typeof Box;\n CloseIcon: <T>(props: IIconProps & T) => ReturnEl;\n};\n\ndeclare const NoticeSmart: <T>(props: CProps<INoticeSmartProps & T>) => ReturnEl;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { IconProps } from '@semcore/icon';\nimport { FadeInOutProps } from '@semcore/animation';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;\nexport type NoticeUse = 'primary' | 'secondary';\n\n/** @deprecated */\nexport interface INoticeProps extends NoticeProps, UnknownProperties {}\nexport type NoticeProps = BoxProps &\n FadeInOutProps & {\n /** Property for managing visibility of Notice */\n hidden?: boolean;\n /** Notice type\n * @deprecated since version ^4.1.0\n */\n use?: NoticeUse;\n /**\n * Notice theme\n * @default info\n */\n theme?: NoticeTheme;\n /** Duration of animation, ms\n * @default 250\n */\n duration?: number;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeLabelProps extends NoticeLabelProps, UnknownProperties {}\nexport type NoticeLabelProps = BoxProps & {\n theme?: NoticeTheme;\n};\n\n/** @deprecated */\nexport interface INoticeContext extends NoticeContext, UnknownProperties {}\nexport type NoticeContext = {\n getLabelProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface INoticeSmartProps extends NoticeSmartProps, UnknownProperties {}\nexport type NoticeSmartProps = NoticeProps & {\n /**\n * A custom element for additional information\n */\n label?: React.ReactNode;\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close icon\n */\n closable?: boolean;\n /**\n * Callback on a click on the close button\n */\n onClose?: (event: React.SyntheticEvent) => void;\n};\n\ndeclare const Notice: Intergalactic.Component<'div', NoticeProps, NoticeContext> & {\n Label: Intergalactic.Component<'div', NoticeLabelProps>;\n Actions: typeof Box;\n Content: typeof Box;\n CloseIcon: Intergalactic.Component<'div', IconProps>;\n};\n\ndeclare const NoticeSmart: Intergalactic.Component<'div', NoticeSmartProps>;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":""}
package/lib/es6/Notice.js CHANGED
@@ -22,19 +22,19 @@ import { localizedMessages } from './translations/__intergalactic-dynamic-locale
22
22
  import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
23
23
  import { cssVariableEnhance } from '@semcore/utils/lib/useCssVariable';
24
24
  /*__reshadow-styles__:"./style/notice.shadow.css"*/
25
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SNotice_1ys4g_gg_{display:flex;padding:var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);box-sizing:border-box;border-style:solid;border-width:1px;border-radius:var(--intergalactic-surface-rounded, 6px);color:var(--intergalactic-text-primary, #191b23)}.___SNotice_1ys4g_gg_._theme_info_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_1ys4g_gg_._theme_info_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_info_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #484a54)}}.___SNotice_1ys4g_gg_._theme_danger_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_1ys4g_gg_._theme_danger_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_danger_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #d1002f)}}.___SNotice_1ys4g_gg_._theme_warning_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_1ys4g_gg_._theme_warning_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_warning_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #c33909)}}.___SNotice_1ys4g_gg_._theme_success_1ys4g_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_1ys4g_gg_._theme_success_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_1ys4g_gg_._theme_success_1ys4g_gg_ .___SCloseIcon_1ys4g_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #007c65)}}.___SContent_1ys4g_gg_{flex:1 1 auto;width:100%}.___SActions_1ys4g_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_1ys4g_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex}.___SLabel_1ys4g_gg_._theme_info_1ys4g_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_1ys4g_gg_._theme_danger_1ys4g_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_1ys4g_gg_._theme_warning_1ys4g_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_1ys4g_gg_._theme_success_1ys4g_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_1ys4g_gg_._theme_custom_1ys4g_gg_{color:var(--color_1ys4g)}.___SCloseIcon_1ys4g_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_1ys4g_gg_._theme_custom_1ys4g_gg_{background-color:var(--backgroundColor_1ys4g);border-color:var(--backgroundColor_1ys4g)}" /*__inner_css_end__*/, "1ys4g_gg_") /*__reshadow_css_end__*/, {
26
- "__SNotice": "___SNotice_1ys4g_gg_",
27
- "_theme_info": "_theme_info_1ys4g_gg_",
28
- "__SCloseIcon": "___SCloseIcon_1ys4g_gg_",
29
- "_theme_danger": "_theme_danger_1ys4g_gg_",
30
- "_theme_warning": "_theme_warning_1ys4g_gg_",
31
- "_theme_success": "_theme_success_1ys4g_gg_",
32
- "__SContent": "___SContent_1ys4g_gg_",
33
- "__SActions": "___SActions_1ys4g_gg_",
34
- "__SLabel": "___SLabel_1ys4g_gg_",
35
- "_theme_custom": "_theme_custom_1ys4g_gg_",
36
- "--color": "--color_1ys4g",
37
- "--backgroundColor": "--backgroundColor_1ys4g"
25
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SNotice_o5d4a_gg_{display:flex;padding:var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);box-sizing:border-box;border-style:solid;border-width:1px;border-radius:var(--intergalactic-surface-rounded, 6px);color:var(--intergalactic-text-primary, #191b23)}.___SNotice_o5d4a_gg_._theme_info_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_o5d4a_gg_._theme_info_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_info_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #484a54)}}.___SNotice_o5d4a_gg_._theme_danger_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_o5d4a_gg_._theme_danger_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_danger_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #d1002f)}}.___SNotice_o5d4a_gg_._theme_warning_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_o5d4a_gg_._theme_warning_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_warning_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #c33909)}}.___SNotice_o5d4a_gg_._theme_success_o5d4a_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_o5d4a_gg_._theme_success_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_o5d4a_gg_._theme_success_o5d4a_gg_ .___SCloseIcon_o5d4a_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #007c65)}}.___SContent_o5d4a_gg_{flex:1 1 auto;width:100%}.___SActions_o5d4a_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_o5d4a_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex}.___SLabel_o5d4a_gg_._theme_info_o5d4a_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_o5d4a_gg_._theme_danger_o5d4a_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_o5d4a_gg_._theme_warning_o5d4a_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_o5d4a_gg_._theme_success_o5d4a_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_o5d4a_gg_._theme_custom_o5d4a_gg_{color:var(--color_o5d4a)}.___SCloseIcon_o5d4a_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_o5d4a_gg_._theme_custom_o5d4a_gg_{background-color:var(--backgroundColor_o5d4a);border-color:var(--backgroundColor_o5d4a)}" /*__inner_css_end__*/, "o5d4a_gg_") /*__reshadow_css_end__*/, {
26
+ "__SNotice": "___SNotice_o5d4a_gg_",
27
+ "_theme_info": "_theme_info_o5d4a_gg_",
28
+ "__SCloseIcon": "___SCloseIcon_o5d4a_gg_",
29
+ "_theme_danger": "_theme_danger_o5d4a_gg_",
30
+ "_theme_warning": "_theme_warning_o5d4a_gg_",
31
+ "_theme_success": "_theme_success_o5d4a_gg_",
32
+ "__SContent": "___SContent_o5d4a_gg_",
33
+ "__SActions": "___SActions_o5d4a_gg_",
34
+ "__SLabel": "___SLabel_o5d4a_gg_",
35
+ "_theme_custom": "_theme_custom_o5d4a_gg_",
36
+ "--color": "--color_o5d4a",
37
+ "--backgroundColor": "--backgroundColor_o5d4a"
38
38
  });
39
39
  function isCustomTheme(theme) {
40
40
  return !['danger', 'warning', 'success', 'info'].includes(theme);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport { IIconProps } from '@semcore/icon';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;\nexport type NoticeUse = 'primary' | 'secondary';\n\nexport interface INoticeProps extends IBoxProps, IFadeInOutProps {\n /** Property for managing visibility of Notice */\n hidden?: boolean;\n /** Notice type\n * @deprecated since version ^4.1.0\n */\n use?: NoticeUse;\n /**\n * Notice theme\n * @default info\n */\n theme?: NoticeTheme;\n /** Duration of animation, ms\n * @default 250\n */\n duration?: number;\n locale?: string;\n}\n\nexport interface INoticeLabelProps extends IBoxProps {\n theme?: NoticeTheme;\n}\n\nexport interface INoticeContext {\n getLabelProps: PropGetterFn;\n}\n\nexport interface INoticeSmartProps extends INoticeProps {\n /**\n * A custom element for additional information\n */\n label?: React.ReactNode;\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close icon\n */\n closable?: boolean;\n /**\n * Callback on a click on the close button\n */\n onClose?: (event: React.SyntheticEvent) => void;\n}\n\ndeclare const Notice: (<T>(props: CProps<INoticeProps & T, INoticeContext>) => ReturnEl) & {\n Label: <T>(props: INoticeLabelProps & T) => ReturnEl;\n Actions: typeof Box;\n Content: typeof Box;\n CloseIcon: <T>(props: IIconProps & T) => ReturnEl;\n};\n\ndeclare const NoticeSmart: <T>(props: CProps<INoticeSmartProps & T>) => ReturnEl;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { IconProps } from '@semcore/icon';\nimport { FadeInOutProps } from '@semcore/animation';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;\nexport type NoticeUse = 'primary' | 'secondary';\n\n/** @deprecated */\nexport interface INoticeProps extends NoticeProps, UnknownProperties {}\nexport type NoticeProps = BoxProps &\n FadeInOutProps & {\n /** Property for managing visibility of Notice */\n hidden?: boolean;\n /** Notice type\n * @deprecated since version ^4.1.0\n */\n use?: NoticeUse;\n /**\n * Notice theme\n * @default info\n */\n theme?: NoticeTheme;\n /** Duration of animation, ms\n * @default 250\n */\n duration?: number;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeLabelProps extends NoticeLabelProps, UnknownProperties {}\nexport type NoticeLabelProps = BoxProps & {\n theme?: NoticeTheme;\n};\n\n/** @deprecated */\nexport interface INoticeContext extends NoticeContext, UnknownProperties {}\nexport type NoticeContext = {\n getLabelProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface INoticeSmartProps extends NoticeSmartProps, UnknownProperties {}\nexport type NoticeSmartProps = NoticeProps & {\n /**\n * A custom element for additional information\n */\n label?: React.ReactNode;\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close icon\n */\n closable?: boolean;\n /**\n * Callback on a click on the close button\n */\n onClose?: (event: React.SyntheticEvent) => void;\n};\n\ndeclare const Notice: Intergalactic.Component<'div', NoticeProps, NoticeContext> & {\n Label: Intergalactic.Component<'div', NoticeLabelProps>;\n Actions: typeof Box;\n Content: typeof Box;\n CloseIcon: Intergalactic.Component<'div', IconProps>;\n};\n\ndeclare const NoticeSmart: Intergalactic.Component<'div', NoticeSmartProps>;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":""}
@@ -1,39 +1,48 @@
1
- import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
2
- import { Box, IBoxProps } from '@semcore/flex-box';
3
- import { IIconProps } from '@semcore/icon';
4
- import { IFadeInOutProps } from '@semcore/animation';
1
+ import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
2
+ import { Box, BoxProps } from '@semcore/flex-box';
3
+ import { IconProps } from '@semcore/icon';
4
+ import { FadeInOutProps } from '@semcore/animation';
5
5
 
6
6
  export type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;
7
7
  export type NoticeUse = 'primary' | 'secondary';
8
8
 
9
- export interface INoticeProps extends IBoxProps, IFadeInOutProps {
10
- /** Property for managing visibility of Notice */
11
- hidden?: boolean;
12
- /** Notice type
13
- * @deprecated since version ^4.1.0
14
- */
15
- use?: NoticeUse;
16
- /**
17
- * Notice theme
18
- * @default info
19
- */
20
- theme?: NoticeTheme;
21
- /** Duration of animation, ms
22
- * @default 250
23
- */
24
- duration?: number;
25
- locale?: string;
26
- }
9
+ /** @deprecated */
10
+ export interface INoticeProps extends NoticeProps, UnknownProperties {}
11
+ export type NoticeProps = BoxProps &
12
+ FadeInOutProps & {
13
+ /** Property for managing visibility of Notice */
14
+ hidden?: boolean;
15
+ /** Notice type
16
+ * @deprecated since version ^4.1.0
17
+ */
18
+ use?: NoticeUse;
19
+ /**
20
+ * Notice theme
21
+ * @default info
22
+ */
23
+ theme?: NoticeTheme;
24
+ /** Duration of animation, ms
25
+ * @default 250
26
+ */
27
+ duration?: number;
28
+ locale?: string;
29
+ };
27
30
 
28
- export interface INoticeLabelProps extends IBoxProps {
31
+ /** @deprecated */
32
+ export interface INoticeLabelProps extends NoticeLabelProps, UnknownProperties {}
33
+ export type NoticeLabelProps = BoxProps & {
29
34
  theme?: NoticeTheme;
30
- }
35
+ };
31
36
 
32
- export interface INoticeContext {
37
+ /** @deprecated */
38
+ export interface INoticeContext extends NoticeContext, UnknownProperties {}
39
+ export type NoticeContext = {
33
40
  getLabelProps: PropGetterFn;
34
- }
41
+ };
35
42
 
36
- export interface INoticeSmartProps extends INoticeProps {
43
+ /** @deprecated */
44
+ export interface INoticeSmartProps extends NoticeSmartProps, UnknownProperties {}
45
+ export type NoticeSmartProps = NoticeProps & {
37
46
  /**
38
47
  * A custom element for additional information
39
48
  */
@@ -50,16 +59,16 @@ export interface INoticeSmartProps extends INoticeProps {
50
59
  * Callback on a click on the close button
51
60
  */
52
61
  onClose?: (event: React.SyntheticEvent) => void;
53
- }
62
+ };
54
63
 
55
- declare const Notice: (<T>(props: CProps<INoticeProps & T, INoticeContext>) => ReturnEl) & {
56
- Label: <T>(props: INoticeLabelProps & T) => ReturnEl;
64
+ declare const Notice: Intergalactic.Component<'div', NoticeProps, NoticeContext> & {
65
+ Label: Intergalactic.Component<'div', NoticeLabelProps>;
57
66
  Actions: typeof Box;
58
67
  Content: typeof Box;
59
- CloseIcon: <T>(props: IIconProps & T) => ReturnEl;
68
+ CloseIcon: Intergalactic.Component<'div', IconProps>;
60
69
  };
61
70
 
62
- declare const NoticeSmart: <T>(props: CProps<INoticeSmartProps & T>) => ReturnEl;
71
+ declare const NoticeSmart: Intergalactic.Component<'div', NoticeSmartProps>;
63
72
 
64
73
  export { NoticeSmart };
65
74
  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": "4.6.4",
4
+ "version": "5.0.0-beta.1",
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
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/animation": "^1",
13
- "@semcore/utils": "^3.15",
14
- "@semcore/flex-box": "^4",
15
- "@semcore/icon": "2.16 - 3",
16
- "@semcore/notice-global": "^1"
12
+ "@semcore/animation": "2.0.0-beta.1",
13
+ "@semcore/utils": "4.0.0-beta.1",
14
+ "@semcore/flex-box": "5.0.0-beta.1",
15
+ "@semcore/icon": "4.0.0-beta.1",
16
+ "@semcore/notice-global": "2.0.0-beta.1"
17
17
  },
18
18
  "peerDependencies": {
19
- "@semcore/core": "^1.11",
19
+ "@semcore/core": "2.0.0-beta.1",
20
20
  "react": "16.8 - 18",
21
21
  "react-dom": "16.8 - 18"
22
22
  },