@semcore/card 17.0.0 → 17.0.2-prerelease.0

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,6 +2,18 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [17.0.2] - 2026-04-29
6
+
7
+ ### Fixed
8
+
9
+ - Deprecated atomic types. Atomic parts are part of `NSCard` namespace.
10
+
11
+ ## [17.0.1] - 2026-04-16
12
+
13
+ ### Fixed
14
+
15
+ - Build processing to correct extract styles.
16
+
5
17
  ## [17.0.0] - 2026-04-15
6
18
 
7
19
  ### BREAK
package/lib/cjs/Card.js CHANGED
@@ -15,15 +15,15 @@ var _tooltip = require("@semcore/tooltip");
15
15
  var _typography = require("@semcore/typography");
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
  /*!__reshadow-styles__:"./style/card.shadow.css"*/
18
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SCard_iw1w6_gg_{box-sizing:border-box;background:var(--intergalactic-bg-primary-neutral, #ffffff);padding:0;border:0;border-radius:var(--intergalactic-surface-rounded, 6px);box-shadow:var(--intergalactic-box-shadow-card,\n 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 1px 2px 0px rgba(25, 27, 35, 0.12)\n )}.___SCard_iw1w6_gg_ .___STitle_iw1w6_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SCard_iw1w6_gg_ .___SInfoTrigger_iw1w6_gg_{margin-right:var(--intergalactic-spacing-1x, 4px);vertical-align:.5px;margin-top:-1px}.___SCard_iw1w6_gg_ .___SDescription_iw1w6_gg_{display:block;margin-bottom:0;margin-top:var(--intergalactic-spacing-2x, 8px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-secondary, #6c6e79)}.___SCard_iw1w6_gg_ .___SBody_iw1w6_gg_,.___SCard_iw1w6_gg_ .___SHeader_iw1w6_gg_{padding-left:var(--intergalactic-spacing-5x, 20px);padding-right:var(--intergalactic-spacing-5x, 20px)}.___SCard_iw1w6_gg_ .___SHeader_iw1w6_gg_{padding-top:var(--intergalactic-spacing-2x, 8px);padding-bottom:var(--intergalactic-spacing-2x, 8px);box-shadow:inset 0-1px 0 var(--intergalactic-border-secondary, #e0e1e9)}.___SCard_iw1w6_gg_ .___SBody_iw1w6_gg_{color:var(--intergalactic-text-primary, #191b23);padding-bottom:var(--intergalactic-spacing-5x, 20px);padding-top:var(--intergalactic-spacing-5x, 20px)}", /*__inner_css_end__*/"iw1w6_gg_"),
18
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SCard_qo0gr_gg_{box-sizing:border-box;background:var(--intergalactic-bg-primary-neutral, #ffffff);padding:0;border:0;border-radius:var(--intergalactic-surface-rounded, 6px);box-shadow:var(--intergalactic-box-shadow-card,\n 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 1px 2px 0px rgba(25, 27, 35, 0.12)\n )}.___SCard_qo0gr_gg_ .___STitle_qo0gr_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SCard_qo0gr_gg_ .___SInfoTrigger_qo0gr_gg_{margin-right:var(--intergalactic-spacing-1x, 4px);vertical-align:.5px;margin-top:-1px}.___SCard_qo0gr_gg_ .___SDescription_qo0gr_gg_{display:block;margin-bottom:0;margin-top:var(--intergalactic-spacing-2x, 8px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-secondary, #6c6e79)}.___SCard_qo0gr_gg_ .___SBody_qo0gr_gg_,.___SCard_qo0gr_gg_ .___SHeader_qo0gr_gg_{padding-left:var(--intergalactic-spacing-5x, 20px);padding-right:var(--intergalactic-spacing-5x, 20px)}.___SCard_qo0gr_gg_ .___SHeader_qo0gr_gg_{padding-top:var(--intergalactic-spacing-2x, 8px);padding-bottom:var(--intergalactic-spacing-2x, 8px);box-shadow:inset 0-1px 0 var(--intergalactic-border-secondary, #e0e1e9)}.___SCard_qo0gr_gg_ .___SBody_qo0gr_gg_{color:var(--intergalactic-text-primary, #191b23);padding-bottom:var(--intergalactic-spacing-5x, 20px);padding-top:var(--intergalactic-spacing-5x, 20px)}", /*__inner_css_end__*/"qo0gr_gg_"),
19
19
  /*__reshadow_css_end__*/
20
20
  {
21
- "__SCard": "___SCard_iw1w6_gg_",
22
- "__STitle": "___STitle_iw1w6_gg_",
23
- "__SInfoTrigger": "___SInfoTrigger_iw1w6_gg_",
24
- "__SDescription": "___SDescription_iw1w6_gg_",
25
- "__SHeader": "___SHeader_iw1w6_gg_",
26
- "__SBody": "___SBody_iw1w6_gg_"
21
+ "__SCard": "___SCard_qo0gr_gg_",
22
+ "__STitle": "___STitle_qo0gr_gg_",
23
+ "__SInfoTrigger": "___SInfoTrigger_qo0gr_gg_",
24
+ "__SDescription": "___SDescription_qo0gr_gg_",
25
+ "__SHeader": "___SHeader_qo0gr_gg_",
26
+ "__SBody": "___SBody_qo0gr_gg_"
27
27
  });
28
28
  class CardRoot extends _core.Component {
29
29
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","names":["_core","require","_baseComponents","_button","_findComponent","_m","_interopRequireDefault","_tooltip","_typography","_react","style","sstyled","insert","CardRoot","Component","render","_ref","asProps","_ref6","SCard","Box","Children","styles","advancedMode","isAdvanceMode","Card","Header","displayName","Body","default","createElement","cn","assignProps","_defineProperty2","Title","props","_ref2","arguments[0]","_ref7","innerHint","innerHintAriaLabel","hintAfterAriaLabel","hintAfter","STitle","Text","SInfo","DescriptionTooltip","SInfoTrigger","Trigger","Fragment","ButtonLink","Addon","Popper","Description","_ref3","_ref8","SDescription","_ref4","_ref9","SHeader","_ref5","_ref0","SBody","createComponent","_default","exports"],"sources":["../../src/Card.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport InfoM from '@semcore/icon/Info/m';\nimport { DescriptionTooltip } from '@semcore/tooltip';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type {\n CardComponent,\n CardRootComponent,\n CardTitleComponent,\n CardDescriptionComponent,\n CardHeaderComponent,\n CardBodyComponent,\n} from './Card.type';\nimport style from './style/card.shadow.css';\n\nclass CardRoot extends Component<\n Intergalactic.InternalTypings.InferComponentProps<CardRootComponent>\n> {\n static displayName = 'Card';\n\n static style = style;\n\n render() {\n const SCard = Root;\n const { Children, styles } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);\n\n return sstyled(styles)(\n <SCard render={Box}>\n {advancedMode\n ? (\n <Children />\n )\n : (\n <Card.Body>\n <Children />\n </Card.Body>\n )}\n </SCard>,\n );\n }\n}\n\nfunction Title(\n props: Intergalactic.InternalTypings.InferComponentProps<CardTitleComponent>,\n) {\n const { styles, innerHint, innerHintAriaLabel, hintAfterAriaLabel, Children } = props;\n const hintAfter = props.hintAfter;\n const STitle = Root;\n const SInfo = DescriptionTooltip;\n const SInfoTrigger = SInfo.Trigger;\n\n return sstyled(styles)(\n <>\n <STitle render={Text}>\n <Children />\n {innerHint && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n ml={1}\n use='secondary'\n size={300}\n aria-label={innerHintAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={innerHintAriaLabel as string}>{innerHint}</SInfo.Popper>\n </SInfo>\n )}\n </STitle>\n {hintAfter && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n use='secondary'\n size={300}\n aria-label={hintAfterAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={hintAfterAriaLabel as string}>{hintAfter}</SInfo.Popper>\n </SInfo>\n )}\n </>,\n );\n}\n\nfunction Description(props: Intergalactic.InternalTypings.InferComponentProps<CardDescriptionComponent>) {\n const { styles } = props;\n const SDescription = Root;\n return sstyled(styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Header(props: Intergalactic.InternalTypings.InferComponentProps<CardHeaderComponent>) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(<SHeader render={Box} {...props} />);\n}\n\nfunction Body(props: Intergalactic.InternalTypings.InferComponentProps<CardBodyComponent>) {\n const { styles } = props;\n const SBody = Root;\n return sstyled(styles)(<SBody render={Box} {...props} />);\n}\n\nconst Card = createComponent(CardRoot, {\n Title,\n Description,\n Header,\n Body,\n}) as CardComponent;\n\nexport default Card;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAGA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,EAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAH,sBAAA,CAAAL,OAAA;AAA0B;AAAA,MAAAS,KAAA,8BAAAV,KAAA,CAAAW,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAY1B,MAAMC,QAAQ,SAASC,eAA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SAAS7B,IAAIA,CAACO,KAA2E,EAAE;EAAA,IAAAyB,KAAA,GAAAvB,YAAA;IAAAwB,KAAA;EACzF,MAAM;IAAEvC;EAAO,CAAC,GAAGa,KAAK;EACxB,MAAM2B,KAAK,GAC2B1C,mBAAG;EAAzC,OAAAyC,KAAA,GAAO,IAAAlD,aAAO,EAACW,MAAM,CAAC,eAACb,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAACgC,KAAK,EAAAD,KAAA,CAAA9B,EAAA;IAAA,OAAA/B,KAAA,CAAAgC,WAAA;MAAA,GAAkBG;IAAK,GAAAyB,KAAA;EAAA,EAAG,CAAC;AAC1D;AAEA,MAAMnC,IAAI,GAAG,IAAAsC,qBAAe,EAAClD,QAAQ,EAAE;EACrCqB,KAAK;EACLmB,WAAW;EACX3B,MAAM;EACNE;AACF,CAAC,CAAkB;AAAC,IAAAoC,QAAA,GAAAC,OAAA,CAAApC,OAAA,GAELJ,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"Card.js","names":["_core","require","_baseComponents","_button","_findComponent","_m","_interopRequireDefault","_tooltip","_typography","_react","style","sstyled","insert","CardRoot","Component","render","_ref","asProps","_ref6","SCard","Box","Children","styles","advancedMode","isAdvanceMode","Card","Header","displayName","Body","default","createElement","cn","assignProps","_defineProperty2","Title","props","_ref2","arguments[0]","_ref7","innerHint","innerHintAriaLabel","hintAfterAriaLabel","hintAfter","STitle","Text","SInfo","DescriptionTooltip","SInfoTrigger","Trigger","Fragment","ButtonLink","Addon","Popper","Description","_ref3","_ref8","SDescription","_ref4","_ref9","SHeader","_ref5","_ref0","SBody","createComponent","_default","exports"],"sources":["../../src/Card.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport InfoM from '@semcore/icon/Info/m';\nimport { DescriptionTooltip } from '@semcore/tooltip';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type { NSCard } from './Card.type';\nimport style from './style/card.shadow.css';\n\nclass CardRoot extends Component<\n Intergalactic.InternalTypings.InferComponentProps<NSCard.Component>\n> {\n static displayName = 'Card';\n\n static style = style;\n\n render() {\n const SCard = Root;\n const { Children, styles } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);\n\n return sstyled(styles)(\n <SCard render={Box}>\n {advancedMode\n ? (\n <Children />\n )\n : (\n <Card.Body>\n <Children />\n </Card.Body>\n )}\n </SCard>,\n );\n }\n}\n\nfunction Title(\n props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Title.Component>,\n) {\n const { styles, innerHint, innerHintAriaLabel, hintAfterAriaLabel, Children } = props;\n const hintAfter = props.hintAfter;\n const STitle = Root;\n const SInfo = DescriptionTooltip;\n const SInfoTrigger = SInfo.Trigger;\n\n return sstyled(styles)(\n <>\n <STitle render={Text}>\n <Children />\n {innerHint && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n ml={1}\n use='secondary'\n size={300}\n aria-label={innerHintAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={innerHintAriaLabel as string}>{innerHint}</SInfo.Popper>\n </SInfo>\n )}\n </STitle>\n {hintAfter && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n use='secondary'\n size={300}\n aria-label={hintAfterAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={hintAfterAriaLabel as string}>{hintAfter}</SInfo.Popper>\n </SInfo>\n )}\n </>,\n );\n}\n\nfunction Description(props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Description.Component>) {\n const { styles } = props;\n const SDescription = Root;\n return sstyled(styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Header(props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Header.Component>) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(<SHeader render={Box} {...props} />);\n}\n\nfunction Body(props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Body.Component>) {\n const { styles } = props;\n const SBody = Root;\n return sstyled(styles)(<SBody render={Box} {...props} />);\n}\n\nconst Card = createComponent(CardRoot, {\n Title,\n Description,\n Header,\n Body,\n}) as NSCard.Component;\n\nexport default Card;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAGA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,EAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAH,sBAAA,CAAAL,OAAA;AAA0B;AAAA,MAAAS,KAAA,8BAAAV,KAAA,CAAAW,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAK1B,MAAMC,QAAQ,SAASC,eAAS,CAE9B;EAKAC,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAC,OAAA;MAAAC,KAAA;IACP,MAAMC,KAAK,GAMMC,mBAAG;IALpB,MAAM;MAAEC,QAAQ;MAAEC;IAAO,CAAC,GAAG,IAAI,CAACL,OAAO;IAEzC,MAAMM,YAAY,GAAG,IAAAC,4BAAa,EAACH,QAAQ,EAAE,CAACI,IAAI,CAACC,MAAM,CAACC,WAAW,EAAEF,IAAI,CAACG,IAAI,CAACD,WAAW,CAAC,CAAC;IAE9F,OAAAT,KAAA,GAAO,IAAAP,aAAO,EAACW,MAAM,CAAC,eACpBb,MAAA,CAAAoB,OAAA,CAAAC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I,GAAG,IAAAsC,qBAAe,EAAClD,QAAQ,EAAE;EACrCqB,KAAK;EACLmB,WAAW;EACX3B,MAAM;EACNE;AACF,CAAC,CAAqB;AAAC,IAAAoC,QAAA,GAAAC,OAAA,CAAApC,OAAA,GAERJ,IAAI","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.type.js","names":[],"sources":["../../src/Card.type.ts"],"sourcesContent":["import type { Box, BoxProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type { Text, TextProps } from '@semcore/typography';\nimport type React from 'react';\n\nexport type CardProps = BoxProps;\n\nexport type TitleProps = TextProps & {\n /**\n * Content of the Informer that's displayed in the end of the title. Use it if you don't need Title with Ellipsis.\n */\n innerHint?: React.ReactNode;\n /**\n * Content of the Informer that's displayed right after the title. Useful in case of using Title with Ellipsis.\n */\n hintAfter?: React.ReactNode;\n /** Aria-label for the InnerHint icon */\n innerHintAriaLabel?: string;\n /** Aria-label for the HintAfter icon */\n hintAfterAriaLabel?: string;\n};\n\nexport type CardRootComponent = Intergalactic.Component<'div', CardProps>;\nexport type CardTitleComponent = Intergalactic.Component<'div', TitleProps>;\nexport type CardDescriptionComponent = typeof Text;\nexport type CardHeaderComponent = typeof Box;\nexport type CardBodyComponent = typeof Box;\n\nexport type CardComponent = CardRootComponent & {\n Title: CardTitleComponent;\n Description: CardDescriptionComponent;\n Header: CardHeaderComponent;\n Body: CardBodyComponent;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Card.type.js","names":[],"sources":["../../src/Card.type.ts"],"sourcesContent":["import type { Box, BoxProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type { Text, NSText } from '@semcore/typography';\nimport type React from 'react';\n\ndeclare namespace NSCard {\n type Props = BoxProps;\n\n namespace Title {\n type Props = NSText.Props & {\n /**\n * Content of the Informer that's displayed in the end of the title. Use it if you don't need Title with Ellipsis.\n */\n innerHint?: React.ReactNode;\n /**\n * Content of the Informer that's displayed right after the title. Useful in case of using Title with Ellipsis.\n */\n hintAfter?: React.ReactNode;\n /** Aria-label for the InnerHint icon */\n innerHintAriaLabel?: string;\n /** Aria-label for the HintAfter icon */\n hintAfterAriaLabel?: string;\n };\n type Component = Intergalactic.Component<'div', Props>;\n }\n\n namespace Description {\n type Component = typeof Text;\n }\n\n namespace Header {\n type Component = typeof Box;\n }\n\n namespace Body {\n type Component = typeof Box;\n }\n\n type Component = Intergalactic.Component<'div', Props> & {\n Title: Title.Component;\n Description: Description.Component;\n Header: Header.Component;\n Body: Body.Component;\n };\n}\n\n/** @deprecated It will be removed in v18. */\nexport type CardProps = NSCard.Props;\n/** @deprecated It will be removed in v18. */\nexport type TitleProps = NSCard.Title.Props;\n\nexport type { NSCard };\n"],"mappings":"","ignoreList":[]}
package/lib/es6/Card.js CHANGED
@@ -14,15 +14,15 @@ import { DescriptionTooltip } from '@semcore/tooltip';
14
14
  import { Text } from '@semcore/typography';
15
15
  import React from 'react';
16
16
  /*!__reshadow-styles__:"./style/card.shadow.css"*/
17
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCard_iw1w6_gg_{box-sizing:border-box;background:var(--intergalactic-bg-primary-neutral, #ffffff);padding:0;border:0;border-radius:var(--intergalactic-surface-rounded, 6px);box-shadow:var(--intergalactic-box-shadow-card,\n 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 1px 2px 0px rgba(25, 27, 35, 0.12)\n )}.___SCard_iw1w6_gg_ .___STitle_iw1w6_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SCard_iw1w6_gg_ .___SInfoTrigger_iw1w6_gg_{margin-right:var(--intergalactic-spacing-1x, 4px);vertical-align:.5px;margin-top:-1px}.___SCard_iw1w6_gg_ .___SDescription_iw1w6_gg_{display:block;margin-bottom:0;margin-top:var(--intergalactic-spacing-2x, 8px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-secondary, #6c6e79)}.___SCard_iw1w6_gg_ .___SBody_iw1w6_gg_,.___SCard_iw1w6_gg_ .___SHeader_iw1w6_gg_{padding-left:var(--intergalactic-spacing-5x, 20px);padding-right:var(--intergalactic-spacing-5x, 20px)}.___SCard_iw1w6_gg_ .___SHeader_iw1w6_gg_{padding-top:var(--intergalactic-spacing-2x, 8px);padding-bottom:var(--intergalactic-spacing-2x, 8px);box-shadow:inset 0-1px 0 var(--intergalactic-border-secondary, #e0e1e9)}.___SCard_iw1w6_gg_ .___SBody_iw1w6_gg_{color:var(--intergalactic-text-primary, #191b23);padding-bottom:var(--intergalactic-spacing-5x, 20px);padding-top:var(--intergalactic-spacing-5x, 20px)}", /*__inner_css_end__*/"iw1w6_gg_"),
17
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCard_qo0gr_gg_{box-sizing:border-box;background:var(--intergalactic-bg-primary-neutral, #ffffff);padding:0;border:0;border-radius:var(--intergalactic-surface-rounded, 6px);box-shadow:var(--intergalactic-box-shadow-card,\n 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 1px 2px 0px rgba(25, 27, 35, 0.12)\n )}.___SCard_qo0gr_gg_ .___STitle_qo0gr_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SCard_qo0gr_gg_ .___SInfoTrigger_qo0gr_gg_{margin-right:var(--intergalactic-spacing-1x, 4px);vertical-align:.5px;margin-top:-1px}.___SCard_qo0gr_gg_ .___SDescription_qo0gr_gg_{display:block;margin-bottom:0;margin-top:var(--intergalactic-spacing-2x, 8px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-secondary, #6c6e79)}.___SCard_qo0gr_gg_ .___SBody_qo0gr_gg_,.___SCard_qo0gr_gg_ .___SHeader_qo0gr_gg_{padding-left:var(--intergalactic-spacing-5x, 20px);padding-right:var(--intergalactic-spacing-5x, 20px)}.___SCard_qo0gr_gg_ .___SHeader_qo0gr_gg_{padding-top:var(--intergalactic-spacing-2x, 8px);padding-bottom:var(--intergalactic-spacing-2x, 8px);box-shadow:inset 0-1px 0 var(--intergalactic-border-secondary, #e0e1e9)}.___SCard_qo0gr_gg_ .___SBody_qo0gr_gg_{color:var(--intergalactic-text-primary, #191b23);padding-bottom:var(--intergalactic-spacing-5x, 20px);padding-top:var(--intergalactic-spacing-5x, 20px)}", /*__inner_css_end__*/"qo0gr_gg_"),
18
18
  /*__reshadow_css_end__*/
19
19
  {
20
- "__SCard": "___SCard_iw1w6_gg_",
21
- "__STitle": "___STitle_iw1w6_gg_",
22
- "__SInfoTrigger": "___SInfoTrigger_iw1w6_gg_",
23
- "__SDescription": "___SDescription_iw1w6_gg_",
24
- "__SHeader": "___SHeader_iw1w6_gg_",
25
- "__SBody": "___SBody_iw1w6_gg_"
20
+ "__SCard": "___SCard_qo0gr_gg_",
21
+ "__STitle": "___STitle_qo0gr_gg_",
22
+ "__SInfoTrigger": "___SInfoTrigger_qo0gr_gg_",
23
+ "__SDescription": "___SDescription_qo0gr_gg_",
24
+ "__SHeader": "___SHeader_qo0gr_gg_",
25
+ "__SBody": "___SBody_qo0gr_gg_"
26
26
  });
27
27
  class CardRoot extends Component {
28
28
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","names":["Box","ButtonLink","createComponent","Component","sstyled","Root","isAdvanceMode","InfoM","DescriptionTooltip","Text","React","style","_sstyled","insert","CardRoot","render","_ref","asProps","_ref6","SCard","Children","styles","advancedMode","Card","Header","displayName","Body","createElement","cn","_assignProps","_defineProperty","Title","props","_ref2","arguments[0]","_ref7","innerHint","innerHintAriaLabel","hintAfterAriaLabel","hintAfter","STitle","SInfo","SInfoTrigger","Trigger","Fragment","_assignProps2","Addon","Popper","Description","_ref3","_ref8","SDescription","_assignProps3","_ref4","_ref9","SHeader","_assignProps4","_ref5","_ref0","SBody","_assignProps5"],"sources":["../../src/Card.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport InfoM from '@semcore/icon/Info/m';\nimport { DescriptionTooltip } from '@semcore/tooltip';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type {\n CardComponent,\n CardRootComponent,\n CardTitleComponent,\n CardDescriptionComponent,\n CardHeaderComponent,\n CardBodyComponent,\n} from './Card.type';\nimport style from './style/card.shadow.css';\n\nclass CardRoot extends Component<\n Intergalactic.InternalTypings.InferComponentProps<CardRootComponent>\n> {\n static displayName = 'Card';\n\n static style = style;\n\n render() {\n const SCard = Root;\n const { Children, styles } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);\n\n return sstyled(styles)(\n <SCard render={Box}>\n {advancedMode\n ? (\n <Children />\n )\n : (\n <Card.Body>\n <Children />\n </Card.Body>\n )}\n </SCard>,\n );\n }\n}\n\nfunction Title(\n props: Intergalactic.InternalTypings.InferComponentProps<CardTitleComponent>,\n) {\n const { styles, innerHint, innerHintAriaLabel, hintAfterAriaLabel, Children } = props;\n const hintAfter = props.hintAfter;\n const STitle = Root;\n const SInfo = DescriptionTooltip;\n const SInfoTrigger = SInfo.Trigger;\n\n return sstyled(styles)(\n <>\n <STitle render={Text}>\n <Children />\n {innerHint && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n ml={1}\n use='secondary'\n size={300}\n aria-label={innerHintAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={innerHintAriaLabel as string}>{innerHint}</SInfo.Popper>\n </SInfo>\n )}\n </STitle>\n {hintAfter && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n use='secondary'\n size={300}\n aria-label={hintAfterAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={hintAfterAriaLabel as string}>{hintAfter}</SInfo.Popper>\n </SInfo>\n )}\n </>,\n );\n}\n\nfunction Description(props: Intergalactic.InternalTypings.InferComponentProps<CardDescriptionComponent>) {\n const { styles } = props;\n const SDescription = Root;\n return sstyled(styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Header(props: Intergalactic.InternalTypings.InferComponentProps<CardHeaderComponent>) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(<SHeader render={Box} {...props} />);\n}\n\nfunction Body(props: Intergalactic.InternalTypings.InferComponentProps<CardBodyComponent>) {\n const { styles } = props;\n const SBody = Root;\n return sstyled(styles)(<SBody render={Box} {...props} />);\n}\n\nconst Card = createComponent(CardRoot, {\n Title,\n Description,\n Header,\n Body,\n}) as CardComponent;\n\nexport default Card;\n"],"mappings":";;;;;;;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAE5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,aAAa,QAAQ,uCAAuC;AACrE,OAAOC,KAAK,MAAM,sBAAsB;AACxC,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAY1B,MA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EACrCiB,KAAK;EACLiB,WAAW;EACXxB,MAAM;EACNE;AACF,CAAC,CAAkB;AAEnB,eAAeH,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"Card.js","names":["Box","ButtonLink","createComponent","Component","sstyled","Root","isAdvanceMode","InfoM","DescriptionTooltip","Text","React","style","_sstyled","insert","CardRoot","render","_ref","asProps","_ref6","SCard","Children","styles","advancedMode","Card","Header","displayName","Body","createElement","cn","_assignProps","_defineProperty","Title","props","_ref2","arguments[0]","_ref7","innerHint","innerHintAriaLabel","hintAfterAriaLabel","hintAfter","STitle","SInfo","SInfoTrigger","Trigger","Fragment","_assignProps2","Addon","Popper","Description","_ref3","_ref8","SDescription","_assignProps3","_ref4","_ref9","SHeader","_assignProps4","_ref5","_ref0","SBody","_assignProps5"],"sources":["../../src/Card.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport { isAdvanceMode } from '@semcore/core/lib/utils/findComponent';\nimport InfoM from '@semcore/icon/Info/m';\nimport { DescriptionTooltip } from '@semcore/tooltip';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type { NSCard } from './Card.type';\nimport style from './style/card.shadow.css';\n\nclass CardRoot extends Component<\n Intergalactic.InternalTypings.InferComponentProps<NSCard.Component>\n> {\n static displayName = 'Card';\n\n static style = style;\n\n render() {\n const SCard = Root;\n const { Children, styles } = this.asProps;\n\n const advancedMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);\n\n return sstyled(styles)(\n <SCard render={Box}>\n {advancedMode\n ? (\n <Children />\n )\n : (\n <Card.Body>\n <Children />\n </Card.Body>\n )}\n </SCard>,\n );\n }\n}\n\nfunction Title(\n props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Title.Component>,\n) {\n const { styles, innerHint, innerHintAriaLabel, hintAfterAriaLabel, Children } = props;\n const hintAfter = props.hintAfter;\n const STitle = Root;\n const SInfo = DescriptionTooltip;\n const SInfoTrigger = SInfo.Trigger;\n\n return sstyled(styles)(\n <>\n <STitle render={Text}>\n <Children />\n {innerHint && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n ml={1}\n use='secondary'\n size={300}\n aria-label={innerHintAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={innerHintAriaLabel as string}>{innerHint}</SInfo.Popper>\n </SInfo>\n )}\n </STitle>\n {hintAfter && (\n <SInfo>\n <SInfoTrigger\n tag={ButtonLink}\n use='secondary'\n size={300}\n aria-label={hintAfterAriaLabel}\n color='--intergalactic-icon-secondary-neutral'\n >\n <ButtonLink.Addon>\n <InfoM />\n </ButtonLink.Addon>\n </SInfoTrigger>\n <SInfo.Popper aria-label={hintAfterAriaLabel as string}>{hintAfter}</SInfo.Popper>\n </SInfo>\n )}\n </>,\n );\n}\n\nfunction Description(props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Description.Component>) {\n const { styles } = props;\n const SDescription = Root;\n return sstyled(styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Header(props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Header.Component>) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(<SHeader render={Box} {...props} />);\n}\n\nfunction Body(props: Intergalactic.InternalTypings.InferComponentProps<NSCard.Body.Component>) {\n const { styles } = props;\n const SBody = Root;\n return sstyled(styles)(<SBody render={Box} {...props} />);\n}\n\nconst Card = createComponent(CardRoot, {\n Title,\n Description,\n Header,\n Body,\n}) as NSCard.Component;\n\nexport default Card;\n"],"mappings":";;;;;;;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAE5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE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,KAAK,GAC2B3D,GAAG;EAAzC,OAAA0D,KAAA,GAAOtD,OAAO,CAACiB,MAAM,CAAC,eAACX,KAAA,CAAAiB,aAAA,CAACgC,KAAK,EAAAD,KAAA,CAAA9B,EAAA;IAAA,GAAAgC,aAAA;MAAA,GAAkB5B;IAAK,GAAAyB,KAAA;EAAA,EAAG,CAAC;AAC1D;AAEA,MAAMlC,IAAI,GAAGrB,eAAe,CAACY,QAAQ,EAAE;EACrCiB,KAAK;EACLiB,WAAW;EACXxB,MAAM;EACNE;AACF,CAAC,CAAqB;AAEtB,eAAeH,IAAI","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.type.js","names":[],"sources":["../../src/Card.type.ts"],"sourcesContent":["import type { Box, BoxProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type { Text, TextProps } from '@semcore/typography';\nimport type React from 'react';\n\nexport type CardProps = BoxProps;\n\nexport type TitleProps = TextProps & {\n /**\n * Content of the Informer that's displayed in the end of the title. Use it if you don't need Title with Ellipsis.\n */\n innerHint?: React.ReactNode;\n /**\n * Content of the Informer that's displayed right after the title. Useful in case of using Title with Ellipsis.\n */\n hintAfter?: React.ReactNode;\n /** Aria-label for the InnerHint icon */\n innerHintAriaLabel?: string;\n /** Aria-label for the HintAfter icon */\n hintAfterAriaLabel?: string;\n};\n\nexport type CardRootComponent = Intergalactic.Component<'div', CardProps>;\nexport type CardTitleComponent = Intergalactic.Component<'div', TitleProps>;\nexport type CardDescriptionComponent = typeof Text;\nexport type CardHeaderComponent = typeof Box;\nexport type CardBodyComponent = typeof Box;\n\nexport type CardComponent = CardRootComponent & {\n Title: CardTitleComponent;\n Description: CardDescriptionComponent;\n Header: CardHeaderComponent;\n Body: CardBodyComponent;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Card.type.js","names":[],"sources":["../../src/Card.type.ts"],"sourcesContent":["import type { Box, BoxProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type { Text, NSText } from '@semcore/typography';\nimport type React from 'react';\n\ndeclare namespace NSCard {\n type Props = BoxProps;\n\n namespace Title {\n type Props = NSText.Props & {\n /**\n * Content of the Informer that's displayed in the end of the title. Use it if you don't need Title with Ellipsis.\n */\n innerHint?: React.ReactNode;\n /**\n * Content of the Informer that's displayed right after the title. Useful in case of using Title with Ellipsis.\n */\n hintAfter?: React.ReactNode;\n /** Aria-label for the InnerHint icon */\n innerHintAriaLabel?: string;\n /** Aria-label for the HintAfter icon */\n hintAfterAriaLabel?: string;\n };\n type Component = Intergalactic.Component<'div', Props>;\n }\n\n namespace Description {\n type Component = typeof Text;\n }\n\n namespace Header {\n type Component = typeof Box;\n }\n\n namespace Body {\n type Component = typeof Box;\n }\n\n type Component = Intergalactic.Component<'div', Props> & {\n Title: Title.Component;\n Description: Description.Component;\n Header: Header.Component;\n Body: Body.Component;\n };\n}\n\n/** @deprecated It will be removed in v18. */\nexport type CardProps = NSCard.Props;\n/** @deprecated It will be removed in v18. */\nexport type TitleProps = NSCard.Title.Props;\n\nexport type { NSCard };\n"],"mappings":"","ignoreList":[]}
package/lib/esm/Card.mjs CHANGED
@@ -7,21 +7,22 @@ import InfoM from "@semcore/icon/Info/m";
7
7
  import { DescriptionTooltip } from "@semcore/tooltip";
8
8
  import { Text } from "@semcore/typography";
9
9
  import React from "react";
10
+ /*!__reshadow-styles__:"./style/card.shadow.css"*/
10
11
  const style = (
11
12
  /*__reshadow_css_start__*/
12
13
  (sstyled.insert(
13
14
  /*__inner_css_start__*/
14
- ".___SCard_iw1w6_gg_{box-sizing:border-box;background:var(--intergalactic-bg-primary-neutral, #ffffff);padding:0;border:0;border-radius:var(--intergalactic-surface-rounded, 6px);box-shadow:var(--intergalactic-box-shadow-card,\n 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 1px 2px 0px rgba(25, 27, 35, 0.12)\n )}.___SCard_iw1w6_gg_ .___STitle_iw1w6_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SCard_iw1w6_gg_ .___SInfoTrigger_iw1w6_gg_{margin-right:var(--intergalactic-spacing-1x, 4px);vertical-align:.5px;margin-top:-1px}.___SCard_iw1w6_gg_ .___SDescription_iw1w6_gg_{display:block;margin-bottom:0;margin-top:var(--intergalactic-spacing-2x, 8px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-secondary, #6c6e79)}.___SCard_iw1w6_gg_ .___SBody_iw1w6_gg_,.___SCard_iw1w6_gg_ .___SHeader_iw1w6_gg_{padding-left:var(--intergalactic-spacing-5x, 20px);padding-right:var(--intergalactic-spacing-5x, 20px)}.___SCard_iw1w6_gg_ .___SHeader_iw1w6_gg_{padding-top:var(--intergalactic-spacing-2x, 8px);padding-bottom:var(--intergalactic-spacing-2x, 8px);box-shadow:inset 0-1px 0 var(--intergalactic-border-secondary, #e0e1e9)}.___SCard_iw1w6_gg_ .___SBody_iw1w6_gg_{color:var(--intergalactic-text-primary, #191b23);padding-bottom:var(--intergalactic-spacing-5x, 20px);padding-top:var(--intergalactic-spacing-5x, 20px)}",
15
+ ".___SCard_qo0gr_gg_{box-sizing:border-box;background:var(--intergalactic-bg-primary-neutral, #ffffff);padding:0;border:0;border-radius:var(--intergalactic-surface-rounded, 6px);box-shadow:var(--intergalactic-box-shadow-card,\n 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 1px 2px 0px rgba(25, 27, 35, 0.12)\n )}.___SCard_qo0gr_gg_ .___STitle_qo0gr_gg_{color:var(--intergalactic-text-primary, #191b23);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SCard_qo0gr_gg_ .___SInfoTrigger_qo0gr_gg_{margin-right:var(--intergalactic-spacing-1x, 4px);vertical-align:.5px;margin-top:-1px}.___SCard_qo0gr_gg_ .___SDescription_qo0gr_gg_{display:block;margin-bottom:0;margin-top:var(--intergalactic-spacing-2x, 8px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-secondary, #6c6e79)}.___SCard_qo0gr_gg_ .___SBody_qo0gr_gg_,.___SCard_qo0gr_gg_ .___SHeader_qo0gr_gg_{padding-left:var(--intergalactic-spacing-5x, 20px);padding-right:var(--intergalactic-spacing-5x, 20px)}.___SCard_qo0gr_gg_ .___SHeader_qo0gr_gg_{padding-top:var(--intergalactic-spacing-2x, 8px);padding-bottom:var(--intergalactic-spacing-2x, 8px);box-shadow:inset 0-1px 0 var(--intergalactic-border-secondary, #e0e1e9)}.___SCard_qo0gr_gg_ .___SBody_qo0gr_gg_{color:var(--intergalactic-text-primary, #191b23);padding-bottom:var(--intergalactic-spacing-5x, 20px);padding-top:var(--intergalactic-spacing-5x, 20px)}",
15
16
  /*__inner_css_end__*/
16
- "iw1w6_gg_"
17
+ "qo0gr_gg_"
17
18
  ), /*__reshadow_css_end__*/
18
19
  {
19
- "__SCard": "___SCard_iw1w6_gg_",
20
- "__STitle": "___STitle_iw1w6_gg_",
21
- "__SInfoTrigger": "___SInfoTrigger_iw1w6_gg_",
22
- "__SDescription": "___SDescription_iw1w6_gg_",
23
- "__SHeader": "___SHeader_iw1w6_gg_",
24
- "__SBody": "___SBody_iw1w6_gg_"
20
+ "__SCard": "___SCard_qo0gr_gg_",
21
+ "__STitle": "___STitle_qo0gr_gg_",
22
+ "__SInfoTrigger": "___SInfoTrigger_qo0gr_gg_",
23
+ "__SDescription": "___SDescription_qo0gr_gg_",
24
+ "__SHeader": "___SHeader_qo0gr_gg_",
25
+ "__SBody": "___SBody_qo0gr_gg_"
25
26
  })
26
27
  );
27
28
  class CardRoot extends Component {
@@ -1,3 +1,3 @@
1
- import type { CardComponent } from './Card.type';
2
- declare const Card: CardComponent;
1
+ import type { NSCard } from './Card.type';
2
+ declare const Card: NSCard.Component;
3
3
  export default Card;
@@ -1,30 +1,44 @@
1
1
  import type { Box, BoxProps } from '@semcore/base-components';
2
2
  import type { Intergalactic } from '@semcore/core';
3
- import type { Text, TextProps } from '@semcore/typography';
3
+ import type { Text, NSText } from '@semcore/typography';
4
4
  import type React from 'react';
5
- export type CardProps = BoxProps;
6
- export type TitleProps = TextProps & {
7
- /**
8
- * Content of the Informer that's displayed in the end of the title. Use it if you don't need Title with Ellipsis.
9
- */
10
- innerHint?: React.ReactNode;
11
- /**
12
- * Content of the Informer that's displayed right after the title. Useful in case of using Title with Ellipsis.
13
- */
14
- hintAfter?: React.ReactNode;
15
- /** Aria-label for the InnerHint icon */
16
- innerHintAriaLabel?: string;
17
- /** Aria-label for the HintAfter icon */
18
- hintAfterAriaLabel?: string;
19
- };
20
- export type CardRootComponent = Intergalactic.Component<'div', CardProps>;
21
- export type CardTitleComponent = Intergalactic.Component<'div', TitleProps>;
22
- export type CardDescriptionComponent = typeof Text;
23
- export type CardHeaderComponent = typeof Box;
24
- export type CardBodyComponent = typeof Box;
25
- export type CardComponent = CardRootComponent & {
26
- Title: CardTitleComponent;
27
- Description: CardDescriptionComponent;
28
- Header: CardHeaderComponent;
29
- Body: CardBodyComponent;
30
- };
5
+ declare namespace NSCard {
6
+ type Props = BoxProps;
7
+ namespace Title {
8
+ type Props = NSText.Props & {
9
+ /**
10
+ * Content of the Informer that's displayed in the end of the title. Use it if you don't need Title with Ellipsis.
11
+ */
12
+ innerHint?: React.ReactNode;
13
+ /**
14
+ * Content of the Informer that's displayed right after the title. Useful in case of using Title with Ellipsis.
15
+ */
16
+ hintAfter?: React.ReactNode;
17
+ /** Aria-label for the InnerHint icon */
18
+ innerHintAriaLabel?: string;
19
+ /** Aria-label for the HintAfter icon */
20
+ hintAfterAriaLabel?: string;
21
+ };
22
+ type Component = Intergalactic.Component<'div', Props>;
23
+ }
24
+ namespace Description {
25
+ type Component = typeof Text;
26
+ }
27
+ namespace Header {
28
+ type Component = typeof Box;
29
+ }
30
+ namespace Body {
31
+ type Component = typeof Box;
32
+ }
33
+ type Component = Intergalactic.Component<'div', Props> & {
34
+ Title: Title.Component;
35
+ Description: Description.Component;
36
+ Header: Header.Component;
37
+ Body: Body.Component;
38
+ };
39
+ }
40
+ /** @deprecated It will be removed in v18. */
41
+ export type CardProps = NSCard.Props;
42
+ /** @deprecated It will be removed in v18. */
43
+ export type TitleProps = NSCard.Title.Props;
44
+ export type { NSCard };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/card",
3
3
  "description": "Semrush Card Component",
4
- "version": "17.0.0",
4
+ "version": "17.0.2-prerelease.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,13 +14,13 @@
14
14
  "require": "./lib/cjs/index.js"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/typography": "^17.0.0",
18
- "@semcore/tooltip": "^17.0.0",
19
- "@semcore/button": "^17.0.0"
17
+ "@semcore/typography": "^17.0.2-prerelease.0",
18
+ "@semcore/tooltip": "^17.0.1-prerelease.0",
19
+ "@semcore/button": "^17.0.1-prerelease.0"
20
20
  },
21
21
  "peerDependencies": {
22
- "@semcore/base-components": "^17.0.0 || ^17.0.0-0",
23
- "@semcore/icon": "^17.0.0 || ^17.0.0-0"
22
+ "@semcore/base-components": "^17.0.2",
23
+ "@semcore/icon": "^17.0.1"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
@@ -28,11 +28,11 @@
28
28
  "directory": "semcore/card"
29
29
  },
30
30
  "devDependencies": {
31
- "@semcore/core": "17.0.0",
32
- "@semcore/base-components": "17.0.0",
33
- "@semcore/typography": "17.0.0",
34
- "@semcore/testing-utils": "1.0.0",
35
- "@semcore/icon": "17.0.0"
31
+ "@semcore/core": "17.0.1",
32
+ "@semcore/typography": "17.0.2-prerelease.0",
33
+ "@semcore/base-components": "17.0.2-prerelease.0",
34
+ "@semcore/icon": "17.0.1-prerelease.0",
35
+ "@semcore/testing-utils": "1.0.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "pnpm semcore-builder && pnpm vite build"