@semcore/feature-highlight 17.0.0-prerelease.29 → 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 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-02-27
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), this.renderContent(), (0, _isNode.default)(actions) && /*#__PURE__*/_react.default.createElement(_notice.default.Actions, null, actions)), closable && /*#__PURE__*/_react.default.createElement(_notice.default.Close, {
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","renderContent","Children","label","title","closable","asProps","textContent","default","createElement","origin","isNode","Text","renderSmartMode","actions","onClose","Fragment","Label","Content","Title","Actions","Close","onClick","renderAdvancedMode","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 renderContent() {\n const { Children, label, title, closable } = 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 textContent;\n }\n\n renderSmartMode() {\n const { label, title, 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 {this.renderContent()}\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,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAF,sBAAA,CAAAH,OAAA;AAA0B;AAAA,MAAAM,KAAA,8BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA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AA,CAAAW,EAAA;MAAA,OAAAhD,KAAA,CAAAiD,WAAA;QAAA,oBAAmCH,gBAAgB;QAAA,kBAAkB,CAAC,OAAO,CAAC;QAAA,aAAaC;MAAS,GAAAX,IAAA;IAAA,IACpHM,YAAY,GAAG,IAAI,CAACR,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAACV,eAAe,CAAC,CAC/C,CAAC;EAEzB;AACF;AAAC,IAAA0B,gBAAA,CAAA/B,OAAA,EAnEKT,YAAY,iBACK,UAAU;AAAA,IAAAwC,gBAAA,CAAA/B,OAAA,EAD3BT,YAAY,WAEDH,KAAK;AAmEf,MAAMqC,QAAQ,GAAAO,OAAA,CAAAP,QAAA,GAAG,IAAAQ,qBAAe,EAAC1C,YAAY,EAAE;EACpDkB,KAAK,EAAEW,eAAM,CAACX,KAAK;EACnBG,OAAO,EAAEQ,eAAM,CAACR,OAAO;EACvBF,OAAO,EAAEU,eAAM,CAACV,OAAO;EACvBC,KAAK,EAAES,eAAM,CAACT,KAAK;EACnBP,IAAI,EAAEgB,eAAM,CAAChB,IAAI;EACjBS,KAAK,EAAEO,eAAM,CAACP;AAChB,CAAC,CAA+B","ignoreList":[]}
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.Content,\n Title: Notice.Title,\n Text: Notice.Text,\n Close: Notice.Close,\n}) as HighlightedNoticeComponent;\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAF,sBAAA,CAAAH,OAAA;AAA0B;AA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,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), this.renderContent(), isNode(actions) && /*#__PURE__*/React.createElement(Notice.Actions, null, actions)), closable && /*#__PURE__*/React.createElement(Notice.Close, {
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","renderContent","Children","label","title","closable","asProps","textContent","createElement","origin","Text","renderSmartMode","actions","onClose","Fragment","Label","Content","Title","Actions","Close","onClick","renderAdvancedMode","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 renderContent() {\n const { Children, label, title, closable } = 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 textContent;\n }\n\n renderSmartMode() {\n const { label, title, 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 {this.renderContent()}\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;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAK1B,MAAMC,YAAY,SAASV,SAAS,CAAmB;EAIrDW,aAAaA,CAAA,EAAG;IACd,MAAM;MAAEC,QAAQ;MAAEC,KAAK;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,OAAO;IACzD,IAAIC,WAAW,gBAAGX,KAAA,CAAAY,aAAA,CAACN,QAAQ,MAAE,CAAC;IAE9B,IAAI,OAAOA,QAAQ,CAACO,MAAM,KAAK,QAAQ,EAAE;MACvCF,WAAW,GACHb,MAAM,CAACU,KAAK,CAAC,IAAIV,MAAM,CAACS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 {"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;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAK1B,MAAMC,YAAY,SAASV,SAAS,CAAmB;EAIrDW,eAAeA,CAAA,EAAG;IAChB,MAAM;MAAEC,KAAK;MAAEC,KAAK;MAAEC,IAAI;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAQ,CAAC,GAAG,IAAI,CAACC,OAAO;IAEvE,oBACEZ,KAAA,CAAAa,aAAA,CAAAb,KAAA,CAAAc,QAAA,QACGhB,MAAM,CAACQ,KAAK,CAAC,iBAAIN,KAAA,CAAAa,aAAA,CAACd,MAAM,CAACgB,KAAK,QAAET,KAAoB,CAAC,eACtDN,KAAA,CAAAa,aAAA,CAACd,MAAM,CAACiB,OAAO,QACZlB,MAAM,CAACS,KAAK,CAAC,iBAAIP,KAAA,CAAAa,aAAA,CAACd,MAAM,CAACkB,KAAK,QAAEV,KAAoB,CAAC,EACrDT,MAAM,CAACU,IAAI,CAAC,iBAAIR,KAAA,CAAAa,aAAA,CAACd,MAAM,CAACmB,IAAI,QAAEV,IAAkB,CAAC,EACjDV,MAAM,CAACW,OAAO,CAAC,iBAAIT,KAAA,CAAAa,aAAA,CA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AAC,CAC/C,CAAC;EAEzB;AACF;AAACgC,eAAA,CA/CKjC,YAAY,iBACK,UAAU;AAAAiC,eAAA,CAD3BjC,YAAY,WAEDH,KAAK;AA+CtB,OAAO,MAAM8B,QAAQ,GAAGtC,eAAe,CAACW,YAAY,EAAE;EACpDW,KAAK,EAAEhB,MAAM,CAACgB,KAAK;EACnBI,OAAO,EAAEpB,MAAM,CAACoB,OAAO;EACvBH,OAAO,EAAEjB,MAAM,CAACiB,OAAO;EACvBC,KAAK,EAAElB,MAAM,CAACkB,KAAK;EACnBC,IAAI,EAAEnB,MAAM,CAACmB,IAAI;EACjBE,KAAK,EAAErB,MAAM,CAACqB;AAChB,CAAC,CAA+B","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
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), this.renderContent(), isNode(actions) && /* @__PURE__ */ React.createElement(Notice.Actions, null, actions)), closable && /* @__PURE__ */ React.createElement(Notice.Close, {
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.29",
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.29",
20
- "@semcore/base-trigger": "^17.0.0-prerelease.29",
21
- "@semcore/button": "^17.0.0-prerelease.29",
22
- "@semcore/checkbox": "^17.0.0-prerelease.29",
23
- "@semcore/input": "^17.0.0-prerelease.29",
24
- "@semcore/notice": "^17.0.0-prerelease.29",
25
- "@semcore/pills": "^17.0.0-prerelease.29",
26
- "@semcore/radio": "^17.0.0-prerelease.29",
27
- "@semcore/select": "^17.0.0-prerelease.29",
28
- "@semcore/switch": "^17.0.0-prerelease.29",
29
- "@semcore/tab-line": "^17.0.0-prerelease.29",
30
- "@semcore/typography": "^17.0.0-prerelease.29"
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,8 +38,8 @@
38
38
  "directory": "semcore/feature-highlight"
39
39
  },
40
40
  "devDependencies": {
41
- "@semcore/base-components": "17.0.0-prerelease.29",
42
- "@semcore/core": "17.0.0-prerelease.29",
41
+ "@semcore/base-components": "17.0.0-prerelease.31",
42
+ "@semcore/core": "17.0.0-prerelease.31",
43
43
  "@semcore/testing-utils": "1.0.0"
44
44
  },
45
45
  "scripts": {