@semcore/notice 17.0.0-prerelease.30 → 17.0.0-prerelease.31
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 +5 -1
- package/lib/cjs/NoticeSmart.js +3 -7
- package/lib/cjs/NoticeSmart.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/NoticeSmart.js +3 -7
- package/lib/es6/NoticeSmart.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/Notice.mjs +1 -1
- package/lib/esm/NoticeSmart.mjs +3 -7
- package/lib/types/index.d.ts +3 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [17.0.0] - 2026-03-
|
|
5
|
+
## [17.0.0] - 2026-03-27
|
|
6
6
|
|
|
7
7
|
### BREAK
|
|
8
8
|
|
|
9
9
|
- **ellipsis**: New major version.
|
|
10
10
|
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added `text` prop to `NoticeSmart`.
|
|
14
|
+
|
|
11
15
|
## [16.1.12] - 2025-11-17
|
|
12
16
|
|
|
13
17
|
### Changed
|
package/lib/cjs/NoticeSmart.js
CHANGED
|
@@ -15,20 +15,16 @@ class NoticeSmart extends _core.Component {
|
|
|
15
15
|
var _ref = this.asProps;
|
|
16
16
|
const SNoticeSmart = _Notice.default;
|
|
17
17
|
const {
|
|
18
|
-
Children,
|
|
19
18
|
label,
|
|
20
19
|
title,
|
|
21
20
|
actions,
|
|
22
21
|
closable,
|
|
23
|
-
onClose
|
|
22
|
+
onClose,
|
|
23
|
+
text
|
|
24
24
|
} = this.asProps;
|
|
25
|
-
let textContent = /*#__PURE__*/_react.default.createElement(Children, null);
|
|
26
|
-
if (typeof Children.origin === 'string') {
|
|
27
|
-
textContent = (0, _isNode.default)(title) || (0, _isNode.default)(label) || closable ? /*#__PURE__*/_react.default.createElement(_Notice.default.Text, null, /*#__PURE__*/_react.default.createElement(Children, null)) : /*#__PURE__*/_react.default.createElement(Children, null);
|
|
28
|
-
}
|
|
29
25
|
return /*#__PURE__*/_react.default.createElement(SNoticeSmart, (0, _core.assignProps)({
|
|
30
26
|
"__excludeProps": ['title']
|
|
31
|
-
}, _ref), (0, _isNode.default)(label) && /*#__PURE__*/_react.default.createElement(_Notice.default.Label, null, label), /*#__PURE__*/_react.default.createElement(_Notice.default.Content, null, (0, _isNode.default)(title) && /*#__PURE__*/_react.default.createElement(_Notice.default.Title, null, title),
|
|
27
|
+
}, _ref), (0, _isNode.default)(label) && /*#__PURE__*/_react.default.createElement(_Notice.default.Label, null, label), /*#__PURE__*/_react.default.createElement(_Notice.default.Content, null, (0, _isNode.default)(title) && /*#__PURE__*/_react.default.createElement(_Notice.default.Title, null, title), (0, _isNode.default)(text) && /*#__PURE__*/_react.default.createElement(_Notice.default.Text, null, text), (0, _isNode.default)(actions) && /*#__PURE__*/_react.default.createElement(_Notice.default.Actions, null, actions)), closable && /*#__PURE__*/_react.default.createElement(_Notice.default.Close, {
|
|
32
28
|
onClick: onClose
|
|
33
29
|
}));
|
|
34
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoticeSmart.js","names":["_core","require","_isNode","_interopRequireDefault","_react","_Notice","NoticeSmart","Component","render","_ref","asProps","SNoticeSmart","Notice","
|
|
1
|
+
{"version":3,"file":"NoticeSmart.js","names":["_core","require","_isNode","_interopRequireDefault","_react","_Notice","NoticeSmart","Component","render","_ref","asProps","SNoticeSmart","Notice","label","title","actions","closable","onClose","text","default","createElement","assignProps","isNode","Label","Content","Title","Text","Actions","Close","onClick","_defineProperty2","theme","_default","exports","createComponent"],"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 { label, title, actions, closable, onClose, text } = this.asProps;\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 {isNode(text) && <Notice.Text>{text}</Notice.Text>}\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,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,MAAMK,WAAW,SAASC,eAAS,CAAC;EAOlCC,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAC,OAAA;IACP,MAAMC,YAAY,GAIMC,eAAM;IAH9B,MAAM;MAAEC,KAAK;MAAEC,KAAK;MAAEC,OAAO;MAAEC,QAAQ;MAAEC,OAAO;MAAEC;IAAK,CAAC,GAAG,IAAI,CAACR,OAAO;IAEvE,oBACEN,MAAA,CAAAe,OAAA,CAAAC,aAAA,CAACT,YAAY,MAAAX,KAAA,CAAAqB,WAAA;MAAA,kBAAiC,CAAC,OAAO;IAAC,GAAAZ,IAAA,GACpD,IAAAa,eAAM,EAACT,KAAK,CAAC,iBAAIT,MAAA,CAAAe,OAAA,CAAAC,aAAA,CAACf,OAAA,CAAAc,OAAM,CAACI,KAAK,QAAEV,KAAoB,CAAC,eACtDT,MAAA,CAAAe,OAAA,CAAAC,aAAA,CAACf,OAAA,CAAAc,OAAM,CAACK,OAAO,QACZ,IAAAF,eAAM,EAACR,KAAK,CAAC,iBAAIV,MAAA,CAAAe,OAAA,CAAAC,aAAA,CAACf,OAAA,CAAAc,OAAM,CAACM,KAAK,QAAEX,KAAoB,CAAC,EACrD,IAAAQ,eAAM,EAACJ,IAAI,CAAC,iBAAId,MAAA,CAAAe,OAAA,CAAAC,aAAA,CAACf,OAAA,CAAAc,OAAM,CAACO,IAAI,QAAER,IAAkB,CAAC,EACjD,IAAAI,eAAM,EAACP,OAAO,CAAC,iBAAIX,MAAA,CAAAe,OAAA,CAAAC,aAAA,CAACf,OAAA,CAAAc,OAAM,CAACQ,OAAO,QAAEZ,OAAwB,CAC/C,CAAC,EAChBC,QAAQ,iBAAIZ,MAAA,CAAAe,OAAA,CAAAC,aAAA,CAACf,OAAA,CAAAc,OAAM,CAACS,KAAK;MAACC,OAAO,EAAEZ;IAAQ,CAAE,CAClC,CAAC;EAEnB;AACF;AAAC,IAAAa,gBAAA,CAAAX,OAAA,EAvBKb,WAAW,iBACM,aAAa;AAAA,IAAAwB,gBAAA,CAAAX,OAAA,EAD9Bb,WAAW,kBAGO;EACpByB,KAAK,EAAE;AACT,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAoBY,IAAAe,qBAAe,EAAC5B,WAAW,CAAC","ignoreList":[]}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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":[]}
|
|
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 /** A custom element for text */\n text?: 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":[]}
|
package/lib/es6/NoticeSmart.js
CHANGED
|
@@ -9,20 +9,16 @@ class NoticeSmart extends Component {
|
|
|
9
9
|
var _ref = this.asProps;
|
|
10
10
|
const SNoticeSmart = Notice;
|
|
11
11
|
const {
|
|
12
|
-
Children,
|
|
13
12
|
label,
|
|
14
13
|
title,
|
|
15
14
|
actions,
|
|
16
15
|
closable,
|
|
17
|
-
onClose
|
|
16
|
+
onClose,
|
|
17
|
+
text
|
|
18
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);
|
|
22
|
-
}
|
|
23
19
|
return /*#__PURE__*/React.createElement(SNoticeSmart, _assignProps({
|
|
24
20
|
"__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),
|
|
21
|
+
}, _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), isNode(text) && /*#__PURE__*/React.createElement(Notice.Text, null, text), isNode(actions) && /*#__PURE__*/React.createElement(Notice.Actions, null, actions)), closable && /*#__PURE__*/React.createElement(Notice.Close, {
|
|
26
22
|
onClick: onClose
|
|
27
23
|
}));
|
|
28
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoticeSmart.js","names":["createComponent","Component","Root","isNode","React","Notice","NoticeSmart","render","_ref","asProps","SNoticeSmart","
|
|
1
|
+
{"version":3,"file":"NoticeSmart.js","names":["createComponent","Component","Root","isNode","React","Notice","NoticeSmart","render","_ref","asProps","SNoticeSmart","label","title","actions","closable","onClose","text","createElement","_assignProps","Label","Content","Title","Text","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 { label, title, actions, closable, onClose, text } = this.asProps;\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 {isNode(text) && <Notice.Text>{text}</Notice.Text>}\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,GAIML,MAAM;IAH9B,MAAM;MAAEM,KAAK;MAAEC,KAAK;MAAEC,OAAO;MAAEC,QAAQ;MAAEC,OAAO;MAAEC;IAAK,CAAC,GAAG,IAAI,CAACP,OAAO;IAEvE,oBACEL,KAAA,CAAAa,aAAA,CAACP,YAAY,EAAAQ,YAAA;MAAA,kBAAiC,CAAC,OAAO;IAAC,GAAAV,IAAA,GACpDL,MAAM,CAACQ,KAAK,CAAC,iBAAIP,KAAA,CAAAa,aAAA,CAACZ,MAAM,CAACc,KAAK,QAAER,KAAoB,CAAC,eACtDP,KAAA,CAAAa,aAAA,CAACZ,MAAM,CAACe,OAAO,QACZjB,MAAM,CAACS,KAAK,CAAC,iBAAIR,KAAA,CAAAa,aAAA,CAACZ,MAAM,CAACgB,KAAK,QAAET,KAAoB,CAAC,EACrDT,MAAM,CAACa,IAAI,CAAC,iBAAIZ,KAAA,CAAAa,aAAA,CAACZ,MAAM,CAACiB,IAAI,QAAEN,IAAkB,CAAC,EACjDb,MAAM,CAACU,OAAO,CAAC,iBAAIT,KAAA,CAAAa,aAAA,CAACZ,MAAM,CAACkB,OAAO,QAAEV,OAAwB,CAC/C,CAAC,EAChBC,QAAQ,iBAAIV,KAAA,CAAAa,aAAA,CAACZ,MAAM,CAACmB,KAAK;MAACC,OAAO,EAAEV;IAAQ,CAAE,CAClC,CAAC;EAEnB;AACF;AAACW,eAAA,CAvBKpB,WAAW,iBACM,aAAa;AAAAoB,eAAA,CAD9BpB,WAAW,kBAGO;EACpBqB,KAAK,EAAE;AACT,CAAC;AAoBH,eAAe3B,eAAe,CAACM,WAAW,CAAC","ignoreList":[]}
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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":[]}
|
|
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 /** A custom element for text */\n text?: 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":[]}
|
package/lib/esm/Notice.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import {
|
|
2
|
+
import { sstyled, createComponent, Component, assignProps } from "@semcore/core";
|
|
3
3
|
import { FadeInOut, Box } from "@semcore/base-components";
|
|
4
4
|
import Button from "@semcore/button";
|
|
5
5
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
package/lib/esm/NoticeSmart.mjs
CHANGED
|
@@ -8,20 +8,16 @@ class NoticeSmart extends Component {
|
|
|
8
8
|
var _ref = this.asProps;
|
|
9
9
|
const SNoticeSmart = Notice;
|
|
10
10
|
const {
|
|
11
|
-
Children,
|
|
12
11
|
label,
|
|
13
12
|
title,
|
|
14
13
|
actions,
|
|
15
14
|
closable,
|
|
16
|
-
onClose
|
|
15
|
+
onClose,
|
|
16
|
+
text
|
|
17
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);
|
|
21
|
-
}
|
|
22
18
|
return /* @__PURE__ */ React.createElement(SNoticeSmart, assignProps({
|
|
23
19
|
"__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),
|
|
20
|
+
}, _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), isNode(text) && /* @__PURE__ */ React.createElement(Notice.Text, null, text), isNode(actions) && /* @__PURE__ */ React.createElement(Notice.Actions, null, actions)), closable && /* @__PURE__ */ React.createElement(Notice.Close, {
|
|
25
21
|
onClick: onClose
|
|
26
22
|
}));
|
|
27
23
|
}
|
package/lib/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/notice",
|
|
3
3
|
"description": "Semrush Notice Component",
|
|
4
|
-
"version": "17.0.0-prerelease.
|
|
4
|
+
"version": "17.0.0-prerelease.31",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "^17.0.0-prerelease.
|
|
18
|
-
"@semcore/typography": "^17.0.0-prerelease.
|
|
17
|
+
"@semcore/button": "^17.0.0-prerelease.31",
|
|
18
|
+
"@semcore/typography": "^17.0.0-prerelease.31"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@semcore/base-components": "^17.0.0 || ^17.0.0-0",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"directory": "semcore/notice"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@semcore/core": "17.0.0-prerelease.
|
|
31
|
-
"@semcore/base-components": "17.0.0-prerelease.
|
|
32
|
-
"@semcore/
|
|
33
|
-
"@semcore/
|
|
30
|
+
"@semcore/core": "17.0.0-prerelease.31",
|
|
31
|
+
"@semcore/base-components": "17.0.0-prerelease.31",
|
|
32
|
+
"@semcore/testing-utils": "1.0.0",
|
|
33
|
+
"@semcore/icon": "16.7.2-prerelease.31"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|