@semcore/feature-highlight 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/components/notice/Notice.js +2 -14
- package/lib/cjs/components/notice/Notice.js.map +1 -1
- package/lib/es6/components/notice/Notice.js +2 -14
- package/lib/es6/components/notice/Notice.js.map +1 -1
- package/lib/esm/components/button/Button.mjs +1 -1
- package/lib/esm/components/notice/Notice.mjs +2 -14
- package/package.json +16 -16
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
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Updated `NoticeFH` to be compatible with `NoticeSmart`.
|
|
14
|
+
|
|
11
15
|
## [16.3.0] - 2026-02-10
|
|
12
16
|
|
|
13
17
|
### Added
|
|
@@ -22,28 +22,16 @@ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_star
|
|
|
22
22
|
"__SCloseIcon": "___SCloseIcon_1agzh_gg_"
|
|
23
23
|
});
|
|
24
24
|
class NoticeFHRoot extends _core.Component {
|
|
25
|
-
renderContent() {
|
|
26
|
-
const {
|
|
27
|
-
Children,
|
|
28
|
-
label,
|
|
29
|
-
title,
|
|
30
|
-
closable
|
|
31
|
-
} = this.asProps;
|
|
32
|
-
let textContent = /*#__PURE__*/_react.default.createElement(Children, null);
|
|
33
|
-
if (typeof Children.origin === 'string') {
|
|
34
|
-
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);
|
|
35
|
-
}
|
|
36
|
-
return textContent;
|
|
37
|
-
}
|
|
38
25
|
renderSmartMode() {
|
|
39
26
|
const {
|
|
40
27
|
label,
|
|
41
28
|
title,
|
|
29
|
+
text,
|
|
42
30
|
actions,
|
|
43
31
|
closable,
|
|
44
32
|
onClose
|
|
45
33
|
} = this.asProps;
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (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),
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (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, {
|
|
47
35
|
onClick: onClose
|
|
48
36
|
}));
|
|
49
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notice.js","names":["_core","require","_findComponent","_isNode","_interopRequireDefault","_notice","_react","style","sstyled","insert","NoticeFHRoot","Component","
|
|
1
|
+
{"version":3,"file":"Notice.js","names":["_core","require","_findComponent","_isNode","_interopRequireDefault","_notice","_react","style","sstyled","insert","NoticeFHRoot","Component","renderSmartMode","label","title","text","actions","closable","onClose","asProps","default","createElement","Fragment","isNode","Label","Content","Title","Text","Actions","Close","onClick","renderAdvancedMode","Children","render","_ref","_ref2","SHighlightedNotice","Notice","styles","visible","advancedMode","isAdvanceMode","NoticeFH","displayName","beforeVisibility","undefined","cn","assignProps","_defineProperty2","exports","createComponent"],"sources":["../../../../src/components/notice/Notice.tsx"],"sourcesContent":["import { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NoticeSmartProps } from '@semcore/notice';\nimport Notice from '@semcore/notice';\nimport React from 'react';\n\nimport style from './notice.shadow.css';\nimport type { HighlightedNoticeComponent } from './Notice.type';\n\nclass NoticeFHRoot extends Component<NoticeSmartProps> {\n static displayName = 'NoticeFH';\n static style = style;\n\n renderSmartMode() {\n const { label, title, text, actions, closable, onClose } = this.asProps;\n\n return (\n <>\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 </>\n );\n }\n\n renderAdvancedMode() {\n const { Children } = this.asProps;\n\n return <Children />;\n }\n\n render() {\n const SHighlightedNotice = Root;\n const { styles, Children, visible } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [\n NoticeFH.Label.displayName,\n NoticeFH.Actions.displayName,\n NoticeFH.Content.displayName,\n NoticeFH.Title.displayName,\n NoticeFH.Text.displayName,\n NoticeFH.Close.displayName,\n ]);\n\n const beforeVisibility = visible === undefined || visible ? 'visible' : 'hidden';\n\n return sstyled(styles)(\n <SHighlightedNotice render={Notice} beforeVisibility={beforeVisibility} __excludeProps={['title']} use:theme={undefined}>\n {advancedMode ? this.renderAdvancedMode() : this.renderSmartMode()}\n </SHighlightedNotice>,\n );\n }\n}\n\nexport const NoticeFH = createComponent(NoticeFHRoot, {\n Label: Notice.Label,\n Actions: Notice.Actions,\n Content: Notice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,CAAC;QAAA,aAAaC;MAAS,GAAAX,IAAA;IAAA,IACpHM,YAAY,GAAG,IAAI,CAACT,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAACnB,eAAe,CAAC,CAC/C,CAAC;EAEzB;AACF;AAAC,IAAAoC,gBAAA,CAAA5B,OAAA,EA/CKV,YAAY,iBACK,UAAU;AAAA,IAAAsC,gBAAA,CAAA5B,OAAA,EAD3BV,YAAY,WAEDH,KAAK;AA+Cf,MAAMmC,QAAQ,GAAAO,OAAA,CAAAP,QAAA,GAAG,IAAAQ,qBAAe,EAACxC,YAAY,EAAE;EACpDc,KAAK,EAAEa,eAAM,CAACb,KAAK;EACnBI,OAAO,EAAES,eAAM,CAACT,OAAO;EACvBH,OAAO,EAAEY,eAAM,CAACZ,OAAO;EACvBC,KAAK,EAAEW,eAAM,CAACX,KAAK;EACnBC,IAAI,EAAEU,eAAM,CAACV,IAAI;EACjBE,KAAK,EAAEQ,eAAM,CAACR;AAChB,CAAC,CAA+B","ignoreList":[]}
|
|
@@ -17,28 +17,16 @@ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/
|
|
|
17
17
|
"__SCloseIcon": "___SCloseIcon_1agzh_gg_"
|
|
18
18
|
});
|
|
19
19
|
class NoticeFHRoot extends Component {
|
|
20
|
-
renderContent() {
|
|
21
|
-
const {
|
|
22
|
-
Children,
|
|
23
|
-
label,
|
|
24
|
-
title,
|
|
25
|
-
closable
|
|
26
|
-
} = this.asProps;
|
|
27
|
-
let textContent = /*#__PURE__*/React.createElement(Children, null);
|
|
28
|
-
if (typeof Children.origin === 'string') {
|
|
29
|
-
textContent = isNode(title) || isNode(label) || closable ? /*#__PURE__*/React.createElement(Notice.Text, null, /*#__PURE__*/React.createElement(Children, null)) : /*#__PURE__*/React.createElement(Children, null);
|
|
30
|
-
}
|
|
31
|
-
return textContent;
|
|
32
|
-
}
|
|
33
20
|
renderSmartMode() {
|
|
34
21
|
const {
|
|
35
22
|
label,
|
|
36
23
|
title,
|
|
24
|
+
text,
|
|
37
25
|
actions,
|
|
38
26
|
closable,
|
|
39
27
|
onClose
|
|
40
28
|
} = this.asProps;
|
|
41
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, isNode(label) && /*#__PURE__*/React.createElement(Notice.Label, null, label), /*#__PURE__*/React.createElement(Notice.Content, null, isNode(title) && /*#__PURE__*/React.createElement(Notice.Title, null, title),
|
|
29
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, 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, {
|
|
42
30
|
onClick: onClose
|
|
43
31
|
}));
|
|
44
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notice.js","names":["createComponent","Component","Root","sstyled","isAdvanceMode","isNode","Notice","React","style","_sstyled","insert","NoticeFHRoot","
|
|
1
|
+
{"version":3,"file":"Notice.js","names":["createComponent","Component","Root","sstyled","isAdvanceMode","isNode","Notice","React","style","_sstyled","insert","NoticeFHRoot","renderSmartMode","label","title","text","actions","closable","onClose","asProps","createElement","Fragment","Label","Content","Title","Text","Actions","Close","onClick","renderAdvancedMode","Children","render","_ref","_ref2","SHighlightedNotice","styles","visible","advancedMode","NoticeFH","displayName","beforeVisibility","undefined","cn","_assignProps","_defineProperty"],"sources":["../../../../src/components/notice/Notice.tsx"],"sourcesContent":["import { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport isNode from '@semcore/core/lib/utils/isNode';\nimport type { NoticeSmartProps } from '@semcore/notice';\nimport Notice from '@semcore/notice';\nimport React from 'react';\n\nimport style from './notice.shadow.css';\nimport type { HighlightedNoticeComponent } from './Notice.type';\n\nclass NoticeFHRoot extends Component<NoticeSmartProps> {\n static displayName = 'NoticeFH';\n static style = style;\n\n renderSmartMode() {\n const { label, title, text, actions, closable, onClose } = this.asProps;\n\n return (\n <>\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 </>\n );\n }\n\n renderAdvancedMode() {\n const { Children } = this.asProps;\n\n return <Children />;\n }\n\n render() {\n const SHighlightedNotice = Root;\n const { styles, Children, visible } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [\n NoticeFH.Label.displayName,\n NoticeFH.Actions.displayName,\n NoticeFH.Content.displayName,\n NoticeFH.Title.displayName,\n NoticeFH.Text.displayName,\n NoticeFH.Close.displayName,\n ]);\n\n const beforeVisibility = visible === undefined || visible ? 'visible' : 'hidden';\n\n return sstyled(styles)(\n <SHighlightedNotice render={Notice} beforeVisibility={beforeVisibility} __excludeProps={['title']} use:theme={undefined}>\n {advancedMode ? this.renderAdvancedMode() : this.renderSmartMode()}\n </SHighlightedNotice>,\n );\n }\n}\n\nexport const NoticeFH = createComponent(NoticeFHRoot, {\n Label: Notice.Label,\n Actions: Notice.Actions,\n Content: Notice.Content,\n Title: Notice.Title,\n Text: Notice.Text,\n Close: Notice.Close,\n}) as HighlightedNoticeComponent;\n"],"mappings":";;;AAAA,SAASA,eAAe,EAAEC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,aAAa,QAAQ,uCAAuC;AACrE,OAAOC,MAAM,MAAM,gCAAgC;AAEnD,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;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perty";
|
|
2
|
-
import {
|
|
2
|
+
import { sstyled, createComponent, Component, assignProps } from "@semcore/core";
|
|
3
3
|
import Button from "@semcore/button";
|
|
4
4
|
import SummaryAI from "@semcore/icon/SummaryAI/m";
|
|
5
5
|
import React from "react";
|
|
@@ -22,28 +22,16 @@ const style = (
|
|
|
22
22
|
})
|
|
23
23
|
);
|
|
24
24
|
class NoticeFHRoot extends Component {
|
|
25
|
-
renderContent() {
|
|
26
|
-
const {
|
|
27
|
-
Children,
|
|
28
|
-
label,
|
|
29
|
-
title,
|
|
30
|
-
closable
|
|
31
|
-
} = this.asProps;
|
|
32
|
-
let textContent = /* @__PURE__ */ React.createElement(Children, null);
|
|
33
|
-
if (typeof Children.origin === "string") {
|
|
34
|
-
textContent = isNode(title) || isNode(label) || closable ? /* @__PURE__ */ React.createElement(Notice.Text, null, /* @__PURE__ */ React.createElement(Children, null)) : /* @__PURE__ */ React.createElement(Children, null);
|
|
35
|
-
}
|
|
36
|
-
return textContent;
|
|
37
|
-
}
|
|
38
25
|
renderSmartMode() {
|
|
39
26
|
const {
|
|
40
27
|
label,
|
|
41
28
|
title,
|
|
29
|
+
text,
|
|
42
30
|
actions,
|
|
43
31
|
closable,
|
|
44
32
|
onClose
|
|
45
33
|
} = this.asProps;
|
|
46
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, isNode(label) && /* @__PURE__ */ React.createElement(Notice.Label, null, label), /* @__PURE__ */ React.createElement(Notice.Content, null, isNode(title) && /* @__PURE__ */ React.createElement(Notice.Title, null, title),
|
|
34
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, 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, {
|
|
47
35
|
onClick: onClose
|
|
48
36
|
}));
|
|
49
37
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/feature-highlight",
|
|
3
3
|
"description": "Semrush toolkit for accent features",
|
|
4
|
-
"version": "17.0.0-prerelease.
|
|
4
|
+
"version": "17.0.0-prerelease.31",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.mjs",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@semcore/badge": "^17.0.0-prerelease.
|
|
20
|
-
"@semcore/base-trigger": "^17.0.0-prerelease.
|
|
21
|
-
"@semcore/button": "^17.0.0-prerelease.
|
|
22
|
-
"@semcore/checkbox": "^17.0.0-prerelease.
|
|
23
|
-
"@semcore/input": "^17.0.0-prerelease.
|
|
24
|
-
"@semcore/notice": "^17.0.0-prerelease.
|
|
25
|
-
"@semcore/pills": "^17.0.0-prerelease.
|
|
26
|
-
"@semcore/radio": "^17.0.0-prerelease.
|
|
27
|
-
"@semcore/select": "^17.0.0-prerelease.
|
|
28
|
-
"@semcore/switch": "^17.0.0-prerelease.
|
|
29
|
-
"@semcore/tab-line": "^17.0.0-prerelease.
|
|
30
|
-
"@semcore/typography": "^17.0.0-prerelease.
|
|
19
|
+
"@semcore/badge": "^17.0.0-prerelease.31",
|
|
20
|
+
"@semcore/base-trigger": "^17.0.0-prerelease.31",
|
|
21
|
+
"@semcore/button": "^17.0.0-prerelease.31",
|
|
22
|
+
"@semcore/checkbox": "^17.0.0-prerelease.31",
|
|
23
|
+
"@semcore/input": "^17.0.0-prerelease.31",
|
|
24
|
+
"@semcore/notice": "^17.0.0-prerelease.31",
|
|
25
|
+
"@semcore/pills": "^17.0.0-prerelease.31",
|
|
26
|
+
"@semcore/radio": "^17.0.0-prerelease.31",
|
|
27
|
+
"@semcore/select": "^17.0.0-prerelease.31",
|
|
28
|
+
"@semcore/switch": "^17.0.0-prerelease.31",
|
|
29
|
+
"@semcore/tab-line": "^17.0.0-prerelease.31",
|
|
30
|
+
"@semcore/typography": "^17.0.0-prerelease.31"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@semcore/base-components": "^17.0.0 || ^17.0.0-0"
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"directory": "semcore/feature-highlight"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@semcore/base-components": "17.0.0-prerelease.
|
|
42
|
-
"@semcore/
|
|
43
|
-
"@semcore/
|
|
41
|
+
"@semcore/base-components": "17.0.0-prerelease.31",
|
|
42
|
+
"@semcore/core": "17.0.0-prerelease.31",
|
|
43
|
+
"@semcore/testing-utils": "1.0.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "pnpm semcore-builder && pnpm vite build"
|