@semcore/notice 16.1.12 → 17.0.0-prerelease.17

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.
@@ -1,43 +1,32 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _callSuper from "@babel/runtime/helpers/callSuper";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
2
  import { assignProps as _assignProps } from "@semcore/core";
7
3
  import { createComponent, Component, Root } from '@semcore/core';
8
4
  import isNode from '@semcore/core/lib/utils/isNode';
9
5
  import React from 'react';
10
6
  import Notice from './Notice';
11
- var NoticeSmart = /*#__PURE__*/function (_Component) {
12
- function NoticeSmart() {
13
- _classCallCheck(this, NoticeSmart);
14
- return _callSuper(this, NoticeSmart, arguments);
15
- }
16
- _inherits(NoticeSmart, _Component);
17
- return _createClass(NoticeSmart, [{
18
- key: "render",
19
- value: function render() {
20
- var _ref = this.asProps;
21
- var SNoticeSmart = Notice;
22
- var _this$asProps = this.asProps,
23
- Children = _this$asProps.Children,
24
- label = _this$asProps.label,
25
- title = _this$asProps.title,
26
- actions = _this$asProps.actions,
27
- closable = _this$asProps.closable,
28
- onClose = _this$asProps.onClose;
29
- var textContent = /*#__PURE__*/React.createElement(Children, null);
30
- if (typeof Children.origin === 'string') {
31
- textContent = isNode(title) || isNode(label) || closable ? /*#__PURE__*/React.createElement(Notice.Text, null, /*#__PURE__*/React.createElement(Children, null)) : /*#__PURE__*/React.createElement(Children, null);
32
- }
33
- return /*#__PURE__*/React.createElement(SNoticeSmart, _assignProps({
34
- "__excludeProps": ['title']
35
- }, _ref), isNode(label) && /*#__PURE__*/React.createElement(Notice.Label, null, label), /*#__PURE__*/React.createElement(Notice.Content, null, isNode(title) && /*#__PURE__*/React.createElement(Notice.Title, null, title), textContent, isNode(actions) && /*#__PURE__*/React.createElement(Notice.Actions, null, actions)), closable && /*#__PURE__*/React.createElement(Notice.Close, {
36
- onClick: onClose
37
- }));
7
+ class NoticeSmart extends Component {
8
+ render() {
9
+ var _ref = this.asProps;
10
+ const SNoticeSmart = Notice;
11
+ const {
12
+ Children,
13
+ label,
14
+ title,
15
+ actions,
16
+ closable,
17
+ onClose
18
+ } = this.asProps;
19
+ let textContent = /*#__PURE__*/React.createElement(Children, null);
20
+ if (typeof Children.origin === 'string') {
21
+ textContent = isNode(title) || isNode(label) || closable ? /*#__PURE__*/React.createElement(Notice.Text, null, /*#__PURE__*/React.createElement(Children, null)) : /*#__PURE__*/React.createElement(Children, null);
38
22
  }
39
- }]);
40
- }(Component);
23
+ return /*#__PURE__*/React.createElement(SNoticeSmart, _assignProps({
24
+ "__excludeProps": ['title']
25
+ }, _ref), isNode(label) && /*#__PURE__*/React.createElement(Notice.Label, null, label), /*#__PURE__*/React.createElement(Notice.Content, null, isNode(title) && /*#__PURE__*/React.createElement(Notice.Title, null, title), textContent, isNode(actions) && /*#__PURE__*/React.createElement(Notice.Actions, null, actions)), closable && /*#__PURE__*/React.createElement(Notice.Close, {
26
+ onClick: onClose
27
+ }));
28
+ }
29
+ }
41
30
  _defineProperty(NoticeSmart, "displayName", 'NoticeSmart');
42
31
  _defineProperty(NoticeSmart, "defaultProps", {
43
32
  theme: 'info'
@@ -1 +1 @@
1
- {"version":3,"file":"NoticeSmart.js","names":["createComponent","Component","Root","isNode","React","Notice","NoticeSmart","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","render","_ref","asProps","SNoticeSmart","_this$asProps","Children","label","title","actions","closable","onClose","textContent","createElement","origin","Text","_assignProps","Label","Content","Title","Actions","Close","onClick","_defineProperty","theme"],"sources":["../../src/NoticeSmart.jsx"],"sourcesContent":["import { createComponent, Component, Root } from '@semcore/core';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport React from 'react';\n\nimport Notice from './Notice';\n\nclass NoticeSmart extends Component {\n static displayName = 'NoticeSmart';\n\n static defaultProps = {\n theme: 'info',\n };\n\n render() {\n const SNoticeSmart = Root;\n const { Children, label, title, actions, closable, onClose } = this.asProps;\n let textContent = <Children />;\n\n if (typeof Children.origin === 'string') {\n textContent =\n isNode(title) || isNode(label) || closable\n ? (\n <Notice.Text>\n <Children />\n </Notice.Text>\n )\n : (\n <Children />\n );\n }\n\n return (\n <SNoticeSmart render={Notice} __excludeProps={['title']}>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n {isNode(title) && <Notice.Title>{title}</Notice.Title>}\n {textContent}\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.Close onClick={onClose} />}\n </SNoticeSmart>\n );\n }\n}\n\nexport default createComponent(NoticeSmart);\n"],"mappings":";;;;;;AAAA,SAASA,eAAe,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAChE,OAAOC,MAAM,MAAM,gCAAgC;AACnD,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,UAAU;AAAC,IAExBC,WAAW,0BAAAC,UAAA;EAAA,SAAAD,YAAA;IAAAE,eAAA,OAAAF,WAAA;IAAA,OAAAG,UAAA,OAAAH,WAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,WAAA,EAAAC,UAAA;EAAA,OAAAK,YAAA,CAAAN,WAAA;IAAAO,GAAA;IAAAC,KAAA,EAOf,SAAAC,MAAMA,CAAA,EAAG;MAAA,IAAAC,IAAA,QAAAC,OAAA;MACP,IAAMC,YAAY,GAkBMb,MAAM;MAjB9B,IAAAc,aAAA,GAA+D,IAAI,CAACF,OAAO;QAAnEG,QAAQ,GAAAD,aAAA,CAARC,QAAQ;QAAEC,KAAK,GAAAF,aAAA,CAALE,KAAK;QAAEC,KAAK,GAAAH,aAAA,CAALG,KAAK;QAAEC,OAAO,GAAAJ,aAAA,CAAPI,OAAO;QAAEC,QAAQ,GAAAL,aAAA,CAARK,QAAQ;QAAEC,OAAO,GAAAN,aAAA,CAAPM,OAAO;MAC1D,IAAIC,WAAW,gBAAGtB,KAAA,CAAAuB,aAAA,CAACP,QAAQ,MAAE,CAAC;MAE9B,IAAI,OAAOA,QAAQ,CAACQ,MAAM,KAAK,QAAQ,EAAE;QACvCF,WAAW,GACTvB,MAAM,CAACmB,KAAK,CAAC,IAAInB,MAAM,CAACkB,KAAK,CAAC,IAAIG,QAAQ,gBAEpCpB,KAAA,CAAAuB,aAAA,CAACtB,MAAM,CAACwB,IAAI,qBACVzB,KAAA,CAAAuB,aAAA,CAACP,QAAQ,MAAE,CACA,CAAC,gBAGdhB,KAAA,CAAAuB,aAAA,CAACP,QAAQ,MAAE,CACZ;MACT;MAEA,oBACEhB,KAAA,CAAAuB,aAAA,CAACT,YAAY,EAAAY,YAAA;QAAA,kBAAiC,CAAC,OAAO;MAAC,GAAAd,IAAA,GACpDb,MAAM,CAACkB,KAAK,CAAC,iBAAIjB,KAAA,CAAAuB,aAAA,CAACtB,MAAM,CAAC0B,KAAK,QAAEV,KAAoB,CAAC,eACtDjB,KAAA,CAAAuB,aAAA,CAACtB,MAAM,CAAC2B,OAAO,QACZ7B,MAAM,CAACmB,KAAK,CAAC,iBAAIlB,KAAA,CAAAuB,aAAA,CAACtB,MAAM,CAAC4B,KAAK,QAAEX,KAAoB,CAAC,EACrDI,WAAW,EACXvB,MAAM,CAACoB,OAAO,CAAC,iBAAInB,KAAA,CAAAuB,aAAA,CAACtB,MAAM,CAAC6B,OAAO,QAAEX,OAAwB,CAC/C,CAAC,EAChBC,QAAQ,iBAAIpB,KAAA,CAAAuB,aAAA,CAACtB,MAAM,CAAC8B,KAAK;QAACC,OAAO,EAAEX;MAAQ,CAAE,CAClC,CAAC;IAEnB;EAAC;AAAA,EApCuBxB,SAAS;AAAAoC,eAAA,CAA7B/B,WAAW,iBACM,aAAa;AAAA+B,eAAA,CAD9B/B,WAAW,kBAGO;EACpBgC,KAAK,EAAE;AACT,CAAC;AAkCH,eAAetC,eAAe,CAACM,WAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"NoticeSmart.js","names":["createComponent","Component","Root","isNode","React","Notice","NoticeSmart","render","_ref","asProps","SNoticeSmart","Children","label","title","actions","closable","onClose","textContent","createElement","origin","Text","_assignProps","Label","Content","Title","Actions","Close","onClick","_defineProperty","theme"],"sources":["../../src/NoticeSmart.jsx"],"sourcesContent":["import { createComponent, Component, Root } from '@semcore/core';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport React from 'react';\n\nimport Notice from './Notice';\n\nclass NoticeSmart extends Component {\n static displayName = 'NoticeSmart';\n\n static defaultProps = {\n theme: 'info',\n };\n\n render() {\n const SNoticeSmart = Root;\n const { Children, label, title, actions, closable, onClose } = this.asProps;\n let textContent = <Children />;\n\n if (typeof Children.origin === 'string') {\n textContent =\n isNode(title) || isNode(label) || closable\n ? (\n <Notice.Text>\n <Children />\n </Notice.Text>\n )\n : (\n <Children />\n );\n }\n\n return (\n <SNoticeSmart render={Notice} __excludeProps={['title']}>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n {isNode(title) && <Notice.Title>{title}</Notice.Title>}\n {textContent}\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.Close onClick={onClose} />}\n </SNoticeSmart>\n );\n }\n}\n\nexport default createComponent(NoticeSmart);\n"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAChE,OAAOC,MAAM,MAAM,gCAAgC;AACnD,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,UAAU;AAE7B,MAAMC,WAAW,SAASL,SAAS,CAAC;EAOlCM,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAC,OAAA;IACP,MAAMC,YAAY,GAkBML,MAAM;IAjB9B,MAAM;MAAEM,QAAQ;MAAEC,KAAK;MAAEC,KAAK;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAQ,CAAC,GAAG,IAAI,CAACP,OAAO;IAC3E,IAAIQ,WAAW,gBAAGb,KAAA,CAAAc,aAAA,CAACP,QAAQ,MAAE,CAAC;IAE9B,IAAI,OAAOA,QAAQ,CAACQ,MAAM,KAAK,QAAQ,EAAE;MACvCF,WAAW,GACTd,MAAM,CAACU,KAAK,CAAC,IAAIV,MAAM,CAACS,KAAK,CAAC,IAAIG,QAAQ,gBAEpCX,KAAA,CAAAc,aAAA,CAACb,MAAM,CAACe,IAAI,qBACVhB,KAAA,CAAAc,aAAA,CAACP,QAAQ,MAAE,CACA,CAAC,gBAGdP,KAAA,CAAAc,aAAA,CAACP,QAAQ,MAAE,CACZ;IACT;IAEA,oBACEP,KAAA,CAAAc,aAAA,CAACR,YAAY,EAAAW,YAAA;MAAA,kBAAiC,CAAC,OAAO;IAAC,GAAAb,IAAA,GACpDL,MAAM,CAACS,KAAK,CAAC,iBAAIR,KAAA,CAAAc,aAAA,CAACb,MAAM,CAACiB,KAAK,QAAEV,KAAoB,CAAC,eACtDR,KAAA,CAAAc,aAAA,CAACb,MAAM,CAACkB,OAAO,QACZpB,MAAM,CAACU,KAAK,CAAC,iBAAIT,KAAA,CAAAc,aAAA,CAACb,MAAM,CAACmB,KAAK,QAAEX,KAAoB,CAAC,EACrDI,WAAW,EACXd,MAAM,CAACW,OAAO,CAAC,iBAAIV,KAAA,CAAAc,aAAA,CAACb,MAAM,CAACoB,OAAO,QAAEX,OAAwB,CAC/C,CAAC,EAChBC,QAAQ,iBAAIX,KAAA,CAAAc,aAAA,CAACb,MAAM,CAACqB,KAAK;MAACC,OAAO,EAAEX;IAAQ,CAAE,CAClC,CAAC;EAEnB;AACF;AAACY,eAAA,CArCKtB,WAAW,iBACM,aAAa;AAAAsB,eAAA,CAD9BtB,WAAW,kBAGO;EACpBuB,KAAK,EAAE;AACT,CAAC;AAkCH,eAAe7B,eAAe,CAACM,WAAW,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps } from '@semcore/animation';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { Box, BoxProps } from '@semcore/flex-box';\nimport type { IconProps } from '@semcore/icon';\nimport type { Text } from '@semcore/typography';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | 'muted';\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 /** Specifies the locale for i18n support */\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 /**\n * A custom element for title\n */\n title?: React.ReactNode;\n\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close button\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 Title: typeof Text;\n Text: typeof Text;\n /**\n * @deprecated Use Notice.Close instead of Notice.CloseIcon\n */\n CloseIcon: Intergalactic.Component<'div', IconProps>;\n Close: typeof Button;\n};\n\ndeclare const NoticeSmart: Intergalactic.Component<'div', NoticeSmartProps>;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { FadeInOutProps, Box, BoxProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { Text } from '@semcore/typography';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | 'muted';\n\nexport type NoticeProps = BoxProps &\n FadeInOutProps & {\n /** Property for managing visibility of Notice */\n hidden?: boolean;\n /**\n * Notice theme\n * @default info\n */\n theme?: NoticeTheme;\n /** Duration of animation, ms\n * @default 250\n */\n duration?: number;\n /** Specifies the locale for i18n support */\n locale?: string;\n };\n\nexport type NoticeLabelProps = BoxProps & {\n theme?: NoticeTheme;\n};\n\nexport type NoticeContext = {\n getLabelProps: PropGetterFn;\n};\n\nexport type NoticeSmartProps = NoticeProps & {\n /**\n * A custom element for additional information\n */\n label?: React.ReactNode;\n\n /**\n * A custom element for title\n */\n title?: React.ReactNode;\n\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close button\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 Title: typeof Text;\n Text: typeof Text;\n Close: typeof Button;\n};\n\ndeclare const NoticeSmart: Intergalactic.Component<'div', NoticeSmartProps>;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":"","ignoreList":[]}
@@ -12,20 +12,20 @@ import sv from './sv.json';
12
12
  import tr from './tr.json';
13
13
  import vi from './vi.json';
14
14
  import zh from './zh.json';
15
- export var localizedMessages = {
16
- de: de,
17
- en: en,
18
- es: es,
19
- fr: fr,
20
- it: it,
21
- ja: ja,
22
- ko: ko,
23
- nl: nl,
24
- pt: pt,
25
- tr: tr,
26
- vi: vi,
27
- zh: zh,
28
- pl: pl,
29
- sv: sv
15
+ export const localizedMessages = {
16
+ de,
17
+ en,
18
+ es,
19
+ fr,
20
+ it,
21
+ ja,
22
+ ko,
23
+ nl,
24
+ pt,
25
+ tr,
26
+ vi,
27
+ zh,
28
+ pl,
29
+ sv
30
30
  };
31
31
  //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bd,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFL,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,MAAMC,iBAAiB,GAAG;EAC/Bd,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFE,EAAE;EACFE,EAAE;EACFC,EAAE;EACFC,EAAE;EACFL,EAAE;EACFE;AACF,CAAC","ignoreList":[]}
@@ -1,130 +1,117 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
5
- import _inherits from "@babel/runtime/helpers/esm/inherits";
6
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
- import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
8
- import { FadeInOut } from "@semcore/animation";
2
+ import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
3
+ import { FadeInOut, Box } from "@semcore/base-components";
9
4
  import Button from "@semcore/button";
10
5
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
11
6
  import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
12
7
  import logger from "@semcore/core/lib/utils/logger";
13
8
  import { cssVariableEnhance } from "@semcore/core/lib/utils/useCssVariable";
14
- import { Box } from "@semcore/flex-box";
15
9
  import CloseIconM from "@semcore/icon/Close/m";
16
- import NoticeGlobal from "@semcore/notice-global";
17
10
  import { Text } from "@semcore/typography";
18
11
  import React from "react";
19
12
  import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
20
13
  /*!__reshadow-styles__:"./style/notice.shadow.css"*/
21
- var style = (
14
+ const style = (
22
15
  /*__reshadow_css_start__*/
23
16
  (sstyled.insert(
24
17
  /*__inner_css_start__*/
25
- ".___SNotice_u0evg_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_u0evg_gg_._theme_info_u0evg_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_u0evg_gg_._theme_info_u0evg_gg_ .___SCloseIcon_u0evg_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_u0evg_gg_._theme_info_u0evg_gg_ .___SCloseIcon_u0evg_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SNotice_u0evg_gg_._theme_danger_u0evg_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_u0evg_gg_._theme_danger_u0evg_gg_ .___SCloseIcon_u0evg_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_u0evg_gg_._theme_danger_u0evg_gg_ .___SCloseIcon_u0evg_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #CC3A42)}}.___SNotice_u0evg_gg_._theme_warning_u0evg_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_u0evg_gg_._theme_warning_u0evg_gg_ .___SCloseIcon_u0evg_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_u0evg_gg_._theme_warning_u0evg_gg_ .___SCloseIcon_u0evg_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #CC5024)}}.___SNotice_u0evg_gg_._theme_success_u0evg_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_u0evg_gg_._theme_success_u0evg_gg_ .___SCloseIcon_u0evg_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_u0evg_gg_._theme_success_u0evg_gg_ .___SCloseIcon_u0evg_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #037E68)}}.___SNotice_u0evg_gg_._theme_muted_u0evg_gg_{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9);border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SLabel_u0evg_gg_._theme_info_u0evg_gg_,.___SNotice_u0evg_gg_._theme_muted_u0evg_gg_ .___SCloseIcon_u0evg_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_u0evg_gg_._theme_muted_u0evg_gg_ .___SCloseIcon_u0evg_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SContent_u0evg_gg_{flex:1 1 auto;width:100%}.___SActions_u0evg_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_u0evg_gg_{min-height:var(--intergalactic-form-control-m, 28px);height:-moz-fit-content;height:fit-content;margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex;align-items:center}.___SLabel_u0evg_gg_._theme_danger_u0evg_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_u0evg_gg_._theme_warning_u0evg_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_u0evg_gg_._theme_success_u0evg_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_u0evg_gg_._theme_muted_u0evg_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_u0evg_gg_._theme_custom_u0evg_gg_{color:var(--color_u0evg)}.___SCloseIcon_u0evg_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_u0evg_gg_._theme_custom_u0evg_gg_{background-color:var(--backgroundColor_u0evg);border-color:var(--backgroundColor_u0evg)}.___STitle_u0evg_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-bottom:var(--intergalactic-spacing-05x, 2px)}.___SText_u0evg_gg_{margin-top:var(--intergalactic-spacing-1x, 4px);margin-bottom:var(--intergalactic-spacing-1x, 4px)}",
18
+ ".___SNotice_1qegg_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_1qegg_gg_._theme_info_1qegg_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_1qegg_gg_._theme_info_1qegg_gg_ .___SCloseIcon_1qegg_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1qegg_gg_._theme_info_1qegg_gg_ .___SCloseIcon_1qegg_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SNotice_1qegg_gg_._theme_danger_1qegg_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_1qegg_gg_._theme_danger_1qegg_gg_ .___SCloseIcon_1qegg_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_1qegg_gg_._theme_danger_1qegg_gg_ .___SCloseIcon_1qegg_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #CC3A42)}}.___SNotice_1qegg_gg_._theme_warning_1qegg_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_1qegg_gg_._theme_warning_1qegg_gg_ .___SCloseIcon_1qegg_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_1qegg_gg_._theme_warning_1qegg_gg_ .___SCloseIcon_1qegg_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #CC5024)}}.___SNotice_1qegg_gg_._theme_success_1qegg_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_1qegg_gg_._theme_success_1qegg_gg_ .___SCloseIcon_1qegg_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_1qegg_gg_._theme_success_1qegg_gg_ .___SCloseIcon_1qegg_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #037E68)}}.___SNotice_1qegg_gg_._theme_muted_1qegg_gg_{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9);border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SLabel_1qegg_gg_._theme_info_1qegg_gg_,.___SNotice_1qegg_gg_._theme_muted_1qegg_gg_ .___SCloseIcon_1qegg_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1qegg_gg_._theme_muted_1qegg_gg_ .___SCloseIcon_1qegg_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SContent_1qegg_gg_{flex:1 1 auto;width:100%}.___SActions_1qegg_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_1qegg_gg_{min-height:var(--intergalactic-form-control-m, 28px);height:-moz-fit-content;height:fit-content;margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex;align-items:center}.___SLabel_1qegg_gg_._theme_danger_1qegg_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_1qegg_gg_._theme_warning_1qegg_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_1qegg_gg_._theme_success_1qegg_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_1qegg_gg_._theme_muted_1qegg_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_1qegg_gg_._theme_custom_1qegg_gg_{color:var(--color_1qegg)}.___SCloseIcon_1qegg_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_1qegg_gg_._theme_custom_1qegg_gg_{background-color:var(--backgroundColor_1qegg);border-color:var(--backgroundColor_1qegg)}.___STitle_1qegg_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-bottom:var(--intergalactic-spacing-05x, 2px)}.___SText_1qegg_gg_{margin-top:var(--intergalactic-spacing-1x, 4px);margin-bottom:var(--intergalactic-spacing-1x, 4px)}",
26
19
  /*__inner_css_end__*/
27
- "u0evg_gg_"
20
+ "1qegg_gg_"
28
21
  ), /*__reshadow_css_end__*/
29
22
  {
30
- "__SNotice": "___SNotice_u0evg_gg_",
31
- "__SContent": "___SContent_u0evg_gg_",
32
- "__SActions": "___SActions_u0evg_gg_",
33
- "__SLabel": "___SLabel_u0evg_gg_",
34
- "_theme_info": "_theme_info_u0evg_gg_",
35
- "_theme_danger": "_theme_danger_u0evg_gg_",
36
- "_theme_warning": "_theme_warning_u0evg_gg_",
37
- "_theme_success": "_theme_success_u0evg_gg_",
38
- "_theme_muted": "_theme_muted_u0evg_gg_",
39
- "_theme_custom": "_theme_custom_u0evg_gg_",
40
- "--color": "--color_u0evg",
41
- "__SCloseIcon": "___SCloseIcon_u0evg_gg_",
42
- "--backgroundColor": "--backgroundColor_u0evg",
43
- "__STitle": "___STitle_u0evg_gg_",
44
- "__SText": "___SText_u0evg_gg_"
23
+ "__SNotice": "___SNotice_1qegg_gg_",
24
+ "__SContent": "___SContent_1qegg_gg_",
25
+ "__SActions": "___SActions_1qegg_gg_",
26
+ "__SLabel": "___SLabel_1qegg_gg_",
27
+ "_theme_info": "_theme_info_1qegg_gg_",
28
+ "_theme_danger": "_theme_danger_1qegg_gg_",
29
+ "_theme_warning": "_theme_warning_1qegg_gg_",
30
+ "_theme_success": "_theme_success_1qegg_gg_",
31
+ "_theme_muted": "_theme_muted_1qegg_gg_",
32
+ "_theme_custom": "_theme_custom_1qegg_gg_",
33
+ "--color": "--color_1qegg",
34
+ "__SCloseIcon": "___SCloseIcon_1qegg_gg_",
35
+ "--backgroundColor": "--backgroundColor_1qegg",
36
+ "__STitle": "___STitle_1qegg_gg_",
37
+ "__SText": "___SText_1qegg_gg_"
45
38
  })
46
39
  );
47
40
  function isCustomTheme(theme) {
48
41
  return !["danger", "warning", "success", "info", "muted"].includes(theme);
49
42
  }
50
- var RootNotice = /* @__PURE__ */ (function(_Component) {
51
- function RootNotice2() {
52
- var _this;
53
- _classCallCheck(this, RootNotice2);
54
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
55
- args[_key] = arguments[_key];
56
- }
57
- _this = _callSuper(this, RootNotice2, [].concat(args));
58
- _defineProperty(_this, "ref", /* @__PURE__ */ React.createRef());
59
- return _this;
43
+ class RootNotice extends Component {
44
+ constructor(...args) {
45
+ super(...args);
46
+ _defineProperty(this, "ref", /* @__PURE__ */ React.createRef());
60
47
  }
61
- _inherits(RootNotice2, _Component);
62
- return _createClass(RootNotice2, [{
63
- key: "componentDidMount",
64
- value: function componentDidMount() {
65
- if (this.ref.current && process.env.NODE_ENV !== "production" && !["muted", "danger"].includes(this.props.theme)) {
66
- var hasTitle = function hasTitle2(node) {
67
- if (node.hasAttribute("aria-label")) return true;
68
- if (node.hasAttribute("aria-labelledby")) return true;
69
- if (node.hasAttribute("title")) return true;
70
- return false;
71
- };
72
- logger.warn(!hasTitle(this.ref.current), "Provide unique 'title' or 'aria-label' or 'aria-labelledby' to help identify the type and importance of notification", this.props["data-ui-name"] || RootNotice2.displayName);
73
- }
74
- }
75
- }, {
76
- key: "getLabelProps",
77
- value: function getLabelProps() {
78
- var _this$asProps = this.asProps, theme = _this$asProps.theme, resolveColor = _this$asProps.resolveColor;
79
- return {
80
- theme,
81
- resolveColor
82
- };
83
- }
84
- }, {
85
- key: "getCloseIconProps",
86
- value: function getCloseIconProps() {
87
- var getI18nText = this.asProps.getI18nText;
88
- return {
89
- getI18nText
48
+ componentDidMount() {
49
+ if (this.ref.current && process.env.NODE_ENV !== "production" && !["muted", "danger"].includes(this.props.theme)) {
50
+ const hasTitle = (node) => {
51
+ if (node.hasAttribute("aria-label")) return true;
52
+ if (node.hasAttribute("aria-labelledby")) return true;
53
+ if (node.hasAttribute("title")) return true;
54
+ return false;
90
55
  };
56
+ logger.warn(!hasTitle(this.ref.current), `Provide unique 'title' or 'aria-label' or 'aria-labelledby' to help identify the type and importance of notification`, this.props["data-ui-name"] || RootNotice.displayName);
91
57
  }
92
- }, {
93
- key: "getCloseProps",
94
- value: function getCloseProps() {
95
- var getI18nText = this.asProps.getI18nText;
96
- return {
97
- getI18nText
98
- };
58
+ }
59
+ getLabelProps() {
60
+ const {
61
+ theme,
62
+ resolveColor
63
+ } = this.asProps;
64
+ return {
65
+ theme,
66
+ resolveColor
67
+ };
68
+ }
69
+ getCloseIconProps() {
70
+ const {
71
+ getI18nText
72
+ } = this.asProps;
73
+ return {
74
+ getI18nText
75
+ };
76
+ }
77
+ getCloseProps() {
78
+ const {
79
+ getI18nText
80
+ } = this.asProps;
81
+ return {
82
+ getI18nText
83
+ };
84
+ }
85
+ render() {
86
+ var _ref = this.asProps, _ref8;
87
+ const SNotice = FadeInOut;
88
+ const {
89
+ Children,
90
+ styles,
91
+ hidden,
92
+ theme,
93
+ resolveColor,
94
+ getI18nText
95
+ } = this.asProps;
96
+ const color = resolveColor(theme);
97
+ const useTheme = isCustomTheme(theme) ? "custom" : theme;
98
+ let ariaLabel = getI18nText(theme === "danger" ? "criticalNotification" : "notification");
99
+ if (theme === "muted") {
100
+ ariaLabel = void 0;
99
101
  }
100
- }, {
101
- key: "render",
102
- value: function render() {
103
- var _ref = this.asProps, _ref9;
104
- var SNotice = FadeInOut;
105
- var _this$asProps2 = this.asProps, Children = _this$asProps2.Children, styles = _this$asProps2.styles, hidden = _this$asProps2.hidden, theme = _this$asProps2.theme, use = _this$asProps2.use, resolveColor = _this$asProps2.resolveColor, getI18nText = _this$asProps2.getI18nText;
106
- var color = resolveColor(theme);
107
- var useTheme = isCustomTheme(theme) ? "custom" : theme;
108
- if (use === "primary") {
109
- logger.warn(true, 'Deprecated property-value pair "use=primary", use component <NoticeGlobal/> instead', RootNotice2.displayName);
110
- return /* @__PURE__ */ React.createElement(NoticeGlobal, this.asProps);
111
- }
112
- var ariaLabel = getI18nText(theme === "danger" ? "criticalNotification" : "notification");
113
- if (theme === "muted") {
114
- ariaLabel = void 0;
115
- }
116
- var role = theme === "muted" ? void 0 : "region";
117
- return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SNotice, _ref9.cn("SNotice", _objectSpread({}, assignProps({
102
+ const role = theme === "muted" ? void 0 : "region";
103
+ return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SNotice, _ref8.cn("SNotice", {
104
+ ...assignProps({
118
105
  "visible": !hidden,
119
106
  "use:theme": useTheme,
120
107
  "backgroundColor": color,
121
108
  "role": role,
122
109
  "aria-label": ariaLabel,
123
110
  "ref": this.ref
124
- }, _ref))), /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {})));
125
- }
126
- }]);
127
- })(Component);
111
+ }, _ref)
112
+ }), /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {})));
113
+ }
114
+ }
128
115
  _defineProperty(RootNotice, "displayName", "Notice");
129
116
  _defineProperty(RootNotice, "style", style);
130
117
  _defineProperty(RootNotice, "enhance", [i18nEnhance(localizedMessages), cssVariableEnhance({
@@ -138,75 +125,85 @@ _defineProperty(RootNotice, "defaultProps", {
138
125
  i18n: localizedMessages,
139
126
  locale: "en"
140
127
  });
141
- function Label(_ref15) {
142
- var _ref2 = arguments[0], _ref0;
143
- var styles = _ref15.styles, theme = _ref15.theme, resolveColor = _ref15.resolveColor;
144
- var SLabel = Box;
145
- var useTheme = isCustomTheme(theme) ? "custom" : theme;
146
- var color = resolveColor(theme);
147
- return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SLabel, _ref0.cn("SLabel", _objectSpread({}, assignProps({
148
- "use:theme": useTheme,
149
- "color": color
150
- }, _ref2))));
151
- }
152
- function Title(_ref16) {
153
- var _ref3 = arguments[0], _ref1;
154
- var styles = _ref16.styles;
155
- var STitle = Text;
156
- return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref1.cn("STitle", _objectSpread({}, assignProps({
157
- "tag": "div",
158
- "size": 300,
159
- "fontWeight": "bold"
160
- }, _ref3))));
128
+ function Label({
129
+ styles,
130
+ theme,
131
+ resolveColor
132
+ }) {
133
+ var _ref2 = arguments[0], _ref9;
134
+ const SLabel = Box;
135
+ const useTheme = isCustomTheme(theme) ? "custom" : theme;
136
+ const color = resolveColor(theme);
137
+ return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SLabel, _ref9.cn("SLabel", {
138
+ ...assignProps({
139
+ "use:theme": useTheme,
140
+ "color": color
141
+ }, _ref2)
142
+ }));
161
143
  }
162
- function NoticeText(_ref17) {
163
- var _ref4 = arguments[0], _ref10;
164
- var styles = _ref17.styles;
165
- var SText = Text;
166
- return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(SText, _ref10.cn("SText", _objectSpread({}, assignProps({
167
- "tag": "div"
168
- }, _ref4))));
144
+ function Title({
145
+ styles
146
+ }) {
147
+ var _ref3 = arguments[0], _ref0;
148
+ const STitle = Text;
149
+ return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref0.cn("STitle", {
150
+ ...assignProps({
151
+ "tag": "div",
152
+ "size": 300,
153
+ "fontWeight": "bold"
154
+ }, _ref3)
155
+ }));
169
156
  }
170
- function Actions(_ref18) {
171
- var _ref5 = arguments[0], _ref11;
172
- var styles = _ref18.styles;
173
- var SActions = Box;
174
- return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SActions, _ref11.cn("SActions", _objectSpread({}, assignProps({}, _ref5))));
157
+ function NoticeText({
158
+ styles
159
+ }) {
160
+ var _ref4 = arguments[0], _ref1;
161
+ const SText = Text;
162
+ return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(SText, _ref1.cn("SText", {
163
+ ...assignProps({
164
+ "tag": "div"
165
+ }, _ref4)
166
+ }));
175
167
  }
176
- function Content(_ref19) {
177
- var _ref6 = arguments[0], _ref12;
178
- var styles = _ref19.styles;
179
- var SContent = Box;
180
- return _ref12 = sstyled(styles), /* @__PURE__ */ React.createElement(SContent, _ref12.cn("SContent", _objectSpread({}, assignProps({}, _ref6))));
168
+ function Actions({
169
+ styles
170
+ }) {
171
+ var _ref5 = arguments[0], _ref10;
172
+ const SActions = Box;
173
+ return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(SActions, _ref10.cn("SActions", {
174
+ ...assignProps({}, _ref5)
175
+ }));
181
176
  }
182
- function CloseIcon(_ref20) {
183
- var _ref7 = arguments[0], _ref13;
184
- var styles = _ref20.styles, getI18nText = _ref20.getI18nText;
185
- var SCloseIcon = Box;
186
- return _ref13 = sstyled(styles), /* @__PURE__ */ React.createElement(SCloseIcon, _ref13.cn("SCloseIcon", _objectSpread({}, assignProps({
187
- "tag": CloseIconM,
188
- "interactive": true,
189
- "aria-label": getI18nText("close")
190
- }, _ref7))));
177
+ function Content({
178
+ styles
179
+ }) {
180
+ var _ref6 = arguments[0], _ref11;
181
+ const SContent = Box;
182
+ return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SContent, _ref11.cn("SContent", {
183
+ ...assignProps({}, _ref6)
184
+ }));
191
185
  }
192
- function Close(_ref21) {
193
- var _ref8 = arguments[0], _ref14;
194
- var styles = _ref21.styles, getI18nText = _ref21.getI18nText;
195
- var SCloseIcon = Button;
196
- return _ref14 = sstyled(styles), /* @__PURE__ */ React.createElement(SCloseIcon, _ref14.cn("SCloseIcon", _objectSpread({}, assignProps({
197
- "addonLeft": CloseIconM,
198
- "use": "tertiary",
199
- "theme": "muted",
200
- "aria-label": getI18nText("close")
201
- }, _ref8))));
186
+ function Close({
187
+ styles,
188
+ getI18nText
189
+ }) {
190
+ var _ref7 = arguments[0], _ref12;
191
+ const SCloseIcon = Button;
192
+ return _ref12 = sstyled(styles), /* @__PURE__ */ React.createElement(SCloseIcon, _ref12.cn("SCloseIcon", {
193
+ ...assignProps({
194
+ "addonLeft": CloseIconM,
195
+ "use": "tertiary",
196
+ "theme": "muted",
197
+ "aria-label": getI18nText("close")
198
+ }, _ref7)
199
+ }));
202
200
  }
203
- var Notice = createComponent(RootNotice, {
201
+ const Notice = createComponent(RootNotice, {
204
202
  Label,
205
203
  Title,
206
204
  Text: NoticeText,
207
205
  Actions,
208
206
  Content,
209
- CloseIcon,
210
207
  Close
211
208
  });
212
209
  export {
@@ -1,41 +1,36 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
4
- import _inherits from "@babel/runtime/helpers/esm/inherits";
5
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
- import { createComponent, assignProps, Component } from "@semcore/core";
2
+ import { createComponent, Component, assignProps } from "@semcore/core";
7
3
  import isNode from "@semcore/core/lib/utils/isNode";
8
4
  import React from "react";
9
5
  import Notice from "./Notice.mjs";
10
- var NoticeSmart = /* @__PURE__ */ (function(_Component) {
11
- function NoticeSmart2() {
12
- _classCallCheck(this, NoticeSmart2);
13
- return _callSuper(this, NoticeSmart2, arguments);
14
- }
15
- _inherits(NoticeSmart2, _Component);
16
- return _createClass(NoticeSmart2, [{
17
- key: "render",
18
- value: function render() {
19
- var _ref = this.asProps;
20
- var SNoticeSmart = Notice;
21
- var _this$asProps = this.asProps, Children = _this$asProps.Children, label = _this$asProps.label, title = _this$asProps.title, actions = _this$asProps.actions, closable = _this$asProps.closable, onClose = _this$asProps.onClose;
22
- var textContent = /* @__PURE__ */ React.createElement(Children, null);
23
- if (typeof Children.origin === "string") {
24
- textContent = isNode(title) || isNode(label) || closable ? /* @__PURE__ */ React.createElement(Notice.Text, null, /* @__PURE__ */ React.createElement(Children, null)) : /* @__PURE__ */ React.createElement(Children, null);
25
- }
26
- return /* @__PURE__ */ React.createElement(SNoticeSmart, assignProps({
27
- "__excludeProps": ["title"]
28
- }, _ref), isNode(label) && /* @__PURE__ */ React.createElement(Notice.Label, null, label), /* @__PURE__ */ React.createElement(Notice.Content, null, isNode(title) && /* @__PURE__ */ React.createElement(Notice.Title, null, title), textContent, isNode(actions) && /* @__PURE__ */ React.createElement(Notice.Actions, null, actions)), closable && /* @__PURE__ */ React.createElement(Notice.Close, {
29
- onClick: onClose
30
- }));
6
+ class NoticeSmart extends Component {
7
+ render() {
8
+ var _ref = this.asProps;
9
+ const SNoticeSmart = Notice;
10
+ const {
11
+ Children,
12
+ label,
13
+ title,
14
+ actions,
15
+ closable,
16
+ onClose
17
+ } = this.asProps;
18
+ let textContent = /* @__PURE__ */ React.createElement(Children, null);
19
+ if (typeof Children.origin === "string") {
20
+ textContent = isNode(title) || isNode(label) || closable ? /* @__PURE__ */ React.createElement(Notice.Text, null, /* @__PURE__ */ React.createElement(Children, null)) : /* @__PURE__ */ React.createElement(Children, null);
31
21
  }
32
- }]);
33
- })(Component);
22
+ return /* @__PURE__ */ React.createElement(SNoticeSmart, assignProps({
23
+ "__excludeProps": ["title"]
24
+ }, _ref), isNode(label) && /* @__PURE__ */ React.createElement(Notice.Label, null, label), /* @__PURE__ */ React.createElement(Notice.Content, null, isNode(title) && /* @__PURE__ */ React.createElement(Notice.Title, null, title), textContent, isNode(actions) && /* @__PURE__ */ React.createElement(Notice.Actions, null, actions)), closable && /* @__PURE__ */ React.createElement(Notice.Close, {
25
+ onClick: onClose
26
+ }));
27
+ }
28
+ }
34
29
  _defineProperty(NoticeSmart, "displayName", "NoticeSmart");
35
30
  _defineProperty(NoticeSmart, "defaultProps", {
36
31
  theme: "info"
37
32
  });
38
- const NoticeSmart$1 = createComponent(NoticeSmart);
33
+ const NoticeSmart_default = createComponent(NoticeSmart);
39
34
  export {
40
- NoticeSmart$1 as default
35
+ NoticeSmart_default as default
41
36
  };
@@ -12,7 +12,7 @@ import sv from "./sv.json.mjs";
12
12
  import tr from "./tr.json.mjs";
13
13
  import vi from "./vi.json.mjs";
14
14
  import zh from "./zh.json.mjs";
15
- var localizedMessages = {
15
+ const localizedMessages = {
16
16
  de,
17
17
  en,
18
18
  es,