@semcore/link 17.0.0-prerelease.27 → 17.0.0-prerelease.29
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 +1 -1
- package/lib/cjs/Link.js +1 -1
- package/lib/cjs/Link.js.map +1 -1
- package/lib/es6/Link.js +1 -1
- package/lib/es6/Link.js.map +1 -1
- package/lib/esm/Link.mjs +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/lib/cjs/Link.js
CHANGED
|
@@ -83,7 +83,7 @@ class RootLink extends _core.Component {
|
|
|
83
83
|
"text-color": resolveColor(color),
|
|
84
84
|
"tag": 'a',
|
|
85
85
|
"ref": this.containerRef,
|
|
86
|
-
"__excludeProps": ['disabled', 'aria-disabled'],
|
|
86
|
+
"__excludeProps": ['disabled', 'aria-disabled', 'title'],
|
|
87
87
|
"aria-label": showHint ? hintContent : undefined
|
|
88
88
|
}, _ref)
|
|
89
89
|
}), /*#__PURE__*/_react.default.createElement(SInner, _ref4.cn("SInner", {
|
package/lib/cjs/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","names":["_core","require","_baseComponents","_addonTextChildren","_interopRequireDefault","_resolveColorEnhance","_hasLabels","_logger","_typography","_react","style","sstyled","insert","RootLink","Component","constructor","args","_defineProperty2","default","React","createRef","ariaLabelledByContent","componentDidMount","process","env","NODE_ENV","logger","warn","containerRef","current","hasLabels","asProps","displayName","setTimeout","setState","document","getElementById","textContent","render","_ref","_ref4","styles","color","resolveColor","disabled","href","children","addonLeft","AddonLeft","addonRight","AddonRight","Children","title","ariaLabel","hintPlacement","Link","CORE_INSTANCE","SLink","Text","SInner","Box","hintContent","state","showHint","undefined","createElement","Fragment","cn","assignProps","Addon","addonTextChildren","Hint","resolveColorEnhance","LinkText","props","_ref2","arguments[0]","_ref5","SText","_ref3","_ref6","SAddon","createComponent","_default","exports"],"sources":["../../src/Link.tsx"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport { Flex, Box, Hint } from '@semcore/base-components';\nimport type { Intergalactic, IRootComponentProps } from '@semcore/core';\nimport { createComponent, Component, Root, sstyled, CORE_INSTANCE } from '@semcore/core';\nimport addonTextChildren from '@semcore/core/lib/utils/addonTextChildren';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport logger from '@semcore/core/lib/utils/logger';\nimport type { TextProps } from '@semcore/typography';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type { LinkProps } from './Link.types';\nimport style from './style/link.shadow.css';\n\ntype State = {\n ariaLabelledByContent: string;\n};\n\nclass RootLink extends Component<LinkProps, typeof RootLink.enhance, never, {}, State> {\n static displayName = 'Link';\n\n static style = style;\n static enhance = [resolveColorEnhance()] as const;\n containerRef = React.createRef<HTMLElement | null>();\n\n state: State = {\n ariaLabelledByContent: '',\n };\n\n componentDidMount() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n this.containerRef.current && !hasLabels(this.containerRef.current),\n `'title' or 'aria-label' or 'aria-labelledby' are required props for links without text content`,\n this.asProps['data-ui-name'] || RootLink.displayName,\n );\n }\n\n if (this.asProps['aria-labelledby']) {\n setTimeout(() => {\n this.setState({\n ariaLabelledByContent:\n document.getElementById(this.asProps['aria-labelledby'])?.textContent ?? '',\n });\n }, 0);\n }\n }\n\n render() {\n const {\n styles,\n color,\n resolveColor,\n disabled,\n href,\n children,\n addonLeft: AddonLeft,\n addonRight: AddonRight,\n Children,\n title,\n 'aria-label': ariaLabel,\n hintPlacement,\n } = this.asProps;\n // @ts-ignore\n const Link = this[CORE_INSTANCE];\n const SLink = Root;\n const SInner = Box;\n const hintContent = title ?? ariaLabel ?? this.state.ariaLabelledByContent ?? '';\n const showHint = children === undefined || title;\n return sstyled(styles)(\n <>\n <SLink\n role='link'\n tabIndex={disabled ? -1 : 0}\n use:href={disabled ? undefined : href}\n visually-disabled={disabled}\n render={Text}\n text-color={resolveColor(color)}\n tag='a'\n ref={this.containerRef}\n __excludeProps={['disabled', 'aria-disabled']}\n aria-label={showHint ? hintContent : undefined}\n >\n <SInner\n tag='span'\n data-ui-name={`${this.asProps['data-ui-name']}.InnerWrapper`}\n >\n {AddonLeft\n ? (\n <Link.Addon>\n <AddonLeft />\n </Link.Addon>\n )\n : null}\n {addonTextChildren(Children, Link.Text, Link.Addon)}\n {AddonRight\n ? (\n <Link.Addon>\n <AddonRight />\n </Link.Addon>\n )\n : null}\n </SInner>\n </SLink>\n {showHint && (\n <Hint\n triggerRef={this.containerRef}\n timeout={[250, 50]}\n placement={hintPlacement}\n >\n {hintContent}\n </Hint>\n )}\n </>,\n );\n }\n}\n\nfunction LinkText(props: IRootComponentProps) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Text} tag='span' />);\n}\n\nfunction Addon(props: IRootComponentProps) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag='span' />);\n}\n\nconst Link = createComponent(RootLink, {\n Text: LinkText,\n Addon,\n}) as Intergalactic.Component<'a', LinkProps, {}, typeof RootLink.enhance> & {\n Text: Intergalactic.Component<'span', TextProps>;\n Addon: Intergalactic.Component<'span', BoxProps>;\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AAGA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,OAAA,GAAAH,sBAAA,CAAAH,OAAA;AAEA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAL,sBAAA,CAAAH,OAAA;AAA0B;AAAA,MAAAS,KAAA,8BAAAV,KAAA,CAAAW,OAAA,CAAAC,MAAA;A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IAChB;IACA,MAAMwB,IAAI,GAAG,IAAI,CAACC,mBAAa,CAAC;IAChC,MAAMC,KAAK,GAWGC,gBAAI;IAVlB,MAAMC,MAAM,GAAGC,mBAAG;IAClB,MAAMC,WAAW,GAAGT,KAAK,IAAIC,SAAS,IAAI,IAAI,CAACS,KAAK,CAACzC,qBAAqB,IAAI,EAAE;IAChF,MAAM0C,QAAQ,GAAGjB,QAAQ,KAAKkB,SAAS,IAAIZ,KAAK;IAChD,OAAAZ,KAAA,GAAO,IAAA7B,aAAO,EAAC8B,MAAM,CAAC,eACpBhC,MAAA,CAAAS,OAAA,CAAA+C,aAAA,CAAAxD,MAAA,CAAAS,OAAA,CAAAgD,QAAA,qBACEzD,MAAA,CAAAS,OAAA,CAAA+C,aAAA,CAACR,KAAK,EAAAjB,KAAA,CAAA2B,EAAA;MAAA,OAAAnE,KAAA,CAAAoE,WAAA;QAAA,QACC,MAAM;QAAA,YACDxB,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC;QAAA,YACjBA,QAAQ,GAAGoB,SAAS,GAAGnB,IAAI;QAAA,qBAClBD,QAAQ;QAAA,cAEfD,YAAY,CAACD,KAAK,CAAC;QAAA,OAC3B,GAAG;QAAA,OACF,IAAI,CAACd,YAAY;QAAA,kBACN,CAAC,UAAU,EAAE,eAAe,CAAC;QAAA,
|
|
1
|
+
{"version":3,"file":"Link.js","names":["_core","require","_baseComponents","_addonTextChildren","_interopRequireDefault","_resolveColorEnhance","_hasLabels","_logger","_typography","_react","style","sstyled","insert","RootLink","Component","constructor","args","_defineProperty2","default","React","createRef","ariaLabelledByContent","componentDidMount","process","env","NODE_ENV","logger","warn","containerRef","current","hasLabels","asProps","displayName","setTimeout","setState","document","getElementById","textContent","render","_ref","_ref4","styles","color","resolveColor","disabled","href","children","addonLeft","AddonLeft","addonRight","AddonRight","Children","title","ariaLabel","hintPlacement","Link","CORE_INSTANCE","SLink","Text","SInner","Box","hintContent","state","showHint","undefined","createElement","Fragment","cn","assignProps","Addon","addonTextChildren","Hint","resolveColorEnhance","LinkText","props","_ref2","arguments[0]","_ref5","SText","_ref3","_ref6","SAddon","createComponent","_default","exports"],"sources":["../../src/Link.tsx"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport { Flex, Box, Hint } from '@semcore/base-components';\nimport type { Intergalactic, IRootComponentProps } from '@semcore/core';\nimport { createComponent, Component, Root, sstyled, CORE_INSTANCE } from '@semcore/core';\nimport addonTextChildren from '@semcore/core/lib/utils/addonTextChildren';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport logger from '@semcore/core/lib/utils/logger';\nimport type { TextProps } from '@semcore/typography';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type { LinkProps } from './Link.types';\nimport style from './style/link.shadow.css';\n\ntype State = {\n ariaLabelledByContent: string;\n};\n\nclass RootLink extends Component<LinkProps, typeof RootLink.enhance, never, {}, State> {\n static displayName = 'Link';\n\n static style = style;\n static enhance = [resolveColorEnhance()] as const;\n containerRef = React.createRef<HTMLElement | null>();\n\n state: State = {\n ariaLabelledByContent: '',\n };\n\n componentDidMount() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n this.containerRef.current && !hasLabels(this.containerRef.current),\n `'title' or 'aria-label' or 'aria-labelledby' are required props for links without text content`,\n this.asProps['data-ui-name'] || RootLink.displayName,\n );\n }\n\n if (this.asProps['aria-labelledby']) {\n setTimeout(() => {\n this.setState({\n ariaLabelledByContent:\n document.getElementById(this.asProps['aria-labelledby'])?.textContent ?? '',\n });\n }, 0);\n }\n }\n\n render() {\n const {\n styles,\n color,\n resolveColor,\n disabled,\n href,\n children,\n addonLeft: AddonLeft,\n addonRight: AddonRight,\n Children,\n title,\n 'aria-label': ariaLabel,\n hintPlacement,\n } = this.asProps;\n // @ts-ignore\n const Link = this[CORE_INSTANCE];\n const SLink = Root;\n const SInner = Box;\n const hintContent = title ?? ariaLabel ?? this.state.ariaLabelledByContent ?? '';\n const showHint = children === undefined || title;\n return sstyled(styles)(\n <>\n <SLink\n role='link'\n tabIndex={disabled ? -1 : 0}\n use:href={disabled ? undefined : href}\n visually-disabled={disabled}\n render={Text}\n text-color={resolveColor(color)}\n tag='a'\n ref={this.containerRef}\n __excludeProps={['disabled', 'aria-disabled', 'title']}\n aria-label={showHint ? hintContent : undefined}\n >\n <SInner\n tag='span'\n data-ui-name={`${this.asProps['data-ui-name']}.InnerWrapper`}\n >\n {AddonLeft\n ? (\n <Link.Addon>\n <AddonLeft />\n </Link.Addon>\n )\n : null}\n {addonTextChildren(Children, Link.Text, Link.Addon)}\n {AddonRight\n ? (\n <Link.Addon>\n <AddonRight />\n </Link.Addon>\n )\n : null}\n </SInner>\n </SLink>\n {showHint && (\n <Hint\n triggerRef={this.containerRef}\n timeout={[250, 50]}\n placement={hintPlacement}\n >\n {hintContent}\n </Hint>\n )}\n </>,\n );\n }\n}\n\nfunction LinkText(props: IRootComponentProps) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Text} tag='span' />);\n}\n\nfunction Addon(props: IRootComponentProps) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag='span' />);\n}\n\nconst Link = createComponent(RootLink, {\n Text: LinkText,\n Addon,\n}) as Intergalactic.Component<'a', LinkProps, {}, typeof RootLink.enhance> & {\n Text: Intergalactic.Component<'span', TextProps>;\n Addon: Intergalactic.Component<'span', BoxProps>;\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AAGA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,OAAA,GAAAH,sBAAA,CAAAH,OAAA;AAEA,IAAAO,WAAA,G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nE,KAAA,CAAAoE,WAAA;MAAA,OAAmB;IAAM,GAAAO,KAAA;EAAA,EAAE,CAAC;AAC3D;AAEA,SAASN,KAAKA,CAACK,KAA0B,EAAE;EAAA,IAAAK,KAAA,GAAAH,YAAA;IAAAI,KAAA;EACzC,MAAMC,MAAM,GAE2BrB,mBAAG;EAD1C,MAAM;IAAEnB;EAAO,CAAC,GAAGiC,KAAK;EACxB,OAAAM,KAAA,GAAO,IAAArE,aAAO,EAAC8B,MAAM,CAAC,eAAChC,MAAA,CAAAS,OAAA,CAAA+C,aAAA,CAACgB,MAAM,EAAAD,KAAA,CAAAb,EAAA;IAAA,OAAAnE,KAAA,CAAAoE,WAAA;MAAA,OAAkB;IAAM,GAAAW,KAAA;EAAA,EAAE,CAAC;AAC3D;AAEA,MAAMxB,IAAI,GAAG,IAAA2B,qBAAe,EAACrE,QAAQ,EAAE;EACrC6C,IAAI,EAAEe,QAAQ;EACdJ;AACF,CAAC,CAGA;AAAC,IAAAc,QAAA,GAAAC,OAAA,CAAAlE,OAAA,GAEaqC,IAAI","ignoreList":[]}
|
package/lib/es6/Link.js
CHANGED
|
@@ -80,7 +80,7 @@ class RootLink extends Component {
|
|
|
80
80
|
"text-color": resolveColor(color),
|
|
81
81
|
"tag": 'a',
|
|
82
82
|
"ref": this.containerRef,
|
|
83
|
-
"__excludeProps": ['disabled', 'aria-disabled'],
|
|
83
|
+
"__excludeProps": ['disabled', 'aria-disabled', 'title'],
|
|
84
84
|
"aria-label": showHint ? hintContent : undefined
|
|
85
85
|
}, _ref)
|
|
86
86
|
}), /*#__PURE__*/React.createElement(SInner, _ref4.cn("SInner", {
|
package/lib/es6/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","names":["Box","Hint","createComponent","Component","Root","sstyled","CORE_INSTANCE","addonTextChildren","resolveColorEnhance","hasLabels","logger","Text","React","style","_sstyled","insert","RootLink","constructor","args","_defineProperty","createRef","ariaLabelledByContent","componentDidMount","process","env","NODE_ENV","warn","containerRef","current","asProps","displayName","setTimeout","setState","document","getElementById","textContent","render","_ref","_ref4","styles","color","resolveColor","disabled","href","children","addonLeft","AddonLeft","addonRight","AddonRight","Children","title","ariaLabel","hintPlacement","Link","SLink","SInner","hintContent","state","showHint","undefined","createElement","Fragment","cn","_assignProps","Addon","LinkText","props","_ref2","arguments[0]","_ref5","SText","_assignProps2","_ref3","_ref6","SAddon","_assignProps3"],"sources":["../../src/Link.tsx"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport { Flex, Box, Hint } from '@semcore/base-components';\nimport type { Intergalactic, IRootComponentProps } from '@semcore/core';\nimport { createComponent, Component, Root, sstyled, CORE_INSTANCE } from '@semcore/core';\nimport addonTextChildren from '@semcore/core/lib/utils/addonTextChildren';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport logger from '@semcore/core/lib/utils/logger';\nimport type { TextProps } from '@semcore/typography';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type { LinkProps } from './Link.types';\nimport style from './style/link.shadow.css';\n\ntype State = {\n ariaLabelledByContent: string;\n};\n\nclass RootLink extends Component<LinkProps, typeof RootLink.enhance, never, {}, State> {\n static displayName = 'Link';\n\n static style = style;\n static enhance = [resolveColorEnhance()] as const;\n containerRef = React.createRef<HTMLElement | null>();\n\n state: State = {\n ariaLabelledByContent: '',\n };\n\n componentDidMount() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n this.containerRef.current && !hasLabels(this.containerRef.current),\n `'title' or 'aria-label' or 'aria-labelledby' are required props for links without text content`,\n this.asProps['data-ui-name'] || RootLink.displayName,\n );\n }\n\n if (this.asProps['aria-labelledby']) {\n setTimeout(() => {\n this.setState({\n ariaLabelledByContent:\n document.getElementById(this.asProps['aria-labelledby'])?.textContent ?? '',\n });\n }, 0);\n }\n }\n\n render() {\n const {\n styles,\n color,\n resolveColor,\n disabled,\n href,\n children,\n addonLeft: AddonLeft,\n addonRight: AddonRight,\n Children,\n title,\n 'aria-label': ariaLabel,\n hintPlacement,\n } = this.asProps;\n // @ts-ignore\n const Link = this[CORE_INSTANCE];\n const SLink = Root;\n const SInner = Box;\n const hintContent = title ?? ariaLabel ?? this.state.ariaLabelledByContent ?? '';\n const showHint = children === undefined || title;\n return sstyled(styles)(\n <>\n <SLink\n role='link'\n tabIndex={disabled ? -1 : 0}\n use:href={disabled ? undefined : href}\n visually-disabled={disabled}\n render={Text}\n text-color={resolveColor(color)}\n tag='a'\n ref={this.containerRef}\n __excludeProps={['disabled', 'aria-disabled']}\n aria-label={showHint ? hintContent : undefined}\n >\n <SInner\n tag='span'\n data-ui-name={`${this.asProps['data-ui-name']}.InnerWrapper`}\n >\n {AddonLeft\n ? (\n <Link.Addon>\n <AddonLeft />\n </Link.Addon>\n )\n : null}\n {addonTextChildren(Children, Link.Text, Link.Addon)}\n {AddonRight\n ? (\n <Link.Addon>\n <AddonRight />\n </Link.Addon>\n )\n : null}\n </SInner>\n </SLink>\n {showHint && (\n <Hint\n triggerRef={this.containerRef}\n timeout={[250, 50]}\n placement={hintPlacement}\n >\n {hintContent}\n </Hint>\n )}\n </>,\n );\n }\n}\n\nfunction LinkText(props: IRootComponentProps) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Text} tag='span' />);\n}\n\nfunction Addon(props: IRootComponentProps) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag='span' />);\n}\n\nconst Link = createComponent(RootLink, {\n Text: LinkText,\n Addon,\n}) as Intergalactic.Component<'a', LinkProps, {}, typeof RootLink.enhance> & {\n Text: Intergalactic.Component<'span', TextProps>;\n Addon: Intergalactic.Component<'span', BoxProps>;\n};\n\nexport default Link;\n"],"mappings":";;;;;AACA,SAAeA,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AAE1D,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,EAAEC,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A;MAAAS,KAAA;IACP,MAAM;MACJC,MAAM;MACNC,KAAK;MACLC,YAAY;MACZC,QAAQ;MACRC,IAAI;MACJC,QAAQ;MACRC,SAAS,EAAEC,SAAS;MACpBC,UAAU,EAAEC,UAAU;MACtBC,QAAQ;MACRC,KAAK;MACL,YAAY,EAAEC,SAAS;MACvBC;IACF,CAAC,GAAG,IAAI,CAACvB,OAAO;IAChB;IACA,MAAMwB,IAAI,GAAG,IAAI,CAAC/C,aAAa,CAAC;IAChC,MAAMgD,KAAK,GAWG3C,IAAI;IAVlB,MAAM4C,MAAM,GAAGvD,GAAG;IAClB,MAAMwD,WAAW,GAAGN,KAAK,IAAIC,SAAS,IAAI,IAAI,CAACM,KAAK,CAACpC,qBAAqB,IAAI,EAAE;IAChF,MAAMqC,QAAQ,GAAGd,QAAQ,KAAKe,SAAS,IAAIT,KAAK;IAChD,OAAAZ,KAAA,GAAOjC,OAAO,CAACkC,MAAM,CAAC,eACpB3B,KAAA,CAAAgD,aAAA,CAAAhD,KAAA,CAAAiD,QAAA,qBACEjD,KAAA,CAAAgD,aAAA,CAACN,KAAK,EAAAhB,KAAA,CAAAwB,EAAA;MAAA,GAAAC,YAAA;QAAA,QACC,MAAM;QAAA,YACDrB,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC;QAAA,YACjBA,QAAQ,GAAGiB,SAAS,GAAGhB,IAAI;QAAA,qBAClBD,QAAQ;QAAA,cAEfD,YAAY,CAACD,KAAK,CAAC;QAAA,OAC3B,GAAG;QAAA,OACF,IAAI,CAACb,YAAY;QAAA,kBACN,CAAC,UAAU,EAAE,eAAe,CAAC;QAAA,
|
|
1
|
+
{"version":3,"file":"Link.js","names":["Box","Hint","createComponent","Component","Root","sstyled","CORE_INSTANCE","addonTextChildren","resolveColorEnhance","hasLabels","logger","Text","React","style","_sstyled","insert","RootLink","constructor","args","_defineProperty","createRef","ariaLabelledByContent","componentDidMount","process","env","NODE_ENV","warn","containerRef","current","asProps","displayName","setTimeout","setState","document","getElementById","textContent","render","_ref","_ref4","styles","color","resolveColor","disabled","href","children","addonLeft","AddonLeft","addonRight","AddonRight","Children","title","ariaLabel","hintPlacement","Link","SLink","SInner","hintContent","state","showHint","undefined","createElement","Fragment","cn","_assignProps","Addon","LinkText","props","_ref2","arguments[0]","_ref5","SText","_assignProps2","_ref3","_ref6","SAddon","_assignProps3"],"sources":["../../src/Link.tsx"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport { Flex, Box, Hint } from '@semcore/base-components';\nimport type { Intergalactic, IRootComponentProps } from '@semcore/core';\nimport { createComponent, Component, Root, sstyled, CORE_INSTANCE } from '@semcore/core';\nimport addonTextChildren from '@semcore/core/lib/utils/addonTextChildren';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport logger from '@semcore/core/lib/utils/logger';\nimport type { TextProps } from '@semcore/typography';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type { LinkProps } from './Link.types';\nimport style from './style/link.shadow.css';\n\ntype State = {\n ariaLabelledByContent: string;\n};\n\nclass RootLink extends Component<LinkProps, typeof RootLink.enhance, never, {}, State> {\n static displayName = 'Link';\n\n static style = style;\n static enhance = [resolveColorEnhance()] as const;\n containerRef = React.createRef<HTMLElement | null>();\n\n state: State = {\n ariaLabelledByContent: '',\n };\n\n componentDidMount() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n this.containerRef.current && !hasLabels(this.containerRef.current),\n `'title' or 'aria-label' or 'aria-labelledby' are required props for links without text content`,\n this.asProps['data-ui-name'] || RootLink.displayName,\n );\n }\n\n if (this.asProps['aria-labelledby']) {\n setTimeout(() => {\n this.setState({\n ariaLabelledByContent:\n document.getElementById(this.asProps['aria-labelledby'])?.textContent ?? '',\n });\n }, 0);\n }\n }\n\n render() {\n const {\n styles,\n color,\n resolveColor,\n disabled,\n href,\n children,\n addonLeft: AddonLeft,\n addonRight: AddonRight,\n Children,\n title,\n 'aria-label': ariaLabel,\n hintPlacement,\n } = this.asProps;\n // @ts-ignore\n const Link = this[CORE_INSTANCE];\n const SLink = Root;\n const SInner = Box;\n const hintContent = title ?? ariaLabel ?? this.state.ariaLabelledByContent ?? '';\n const showHint = children === undefined || title;\n return sstyled(styles)(\n <>\n <SLink\n role='link'\n tabIndex={disabled ? -1 : 0}\n use:href={disabled ? undefined : href}\n visually-disabled={disabled}\n render={Text}\n text-color={resolveColor(color)}\n tag='a'\n ref={this.containerRef}\n __excludeProps={['disabled', 'aria-disabled', 'title']}\n aria-label={showHint ? hintContent : undefined}\n >\n <SInner\n tag='span'\n data-ui-name={`${this.asProps['data-ui-name']}.InnerWrapper`}\n >\n {AddonLeft\n ? (\n <Link.Addon>\n <AddonLeft />\n </Link.Addon>\n )\n : null}\n {addonTextChildren(Children, Link.Text, Link.Addon)}\n {AddonRight\n ? (\n <Link.Addon>\n <AddonRight />\n </Link.Addon>\n )\n : null}\n </SInner>\n </SLink>\n {showHint && (\n <Hint\n triggerRef={this.containerRef}\n timeout={[250, 50]}\n placement={hintPlacement}\n >\n {hintContent}\n </Hint>\n )}\n </>,\n );\n }\n}\n\nfunction LinkText(props: IRootComponentProps) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Text} tag='span' />);\n}\n\nfunction Addon(props: IRootComponentProps) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag='span' />);\n}\n\nconst Link = createComponent(RootLink, {\n Text: LinkText,\n Addon,\n}) as Intergalactic.Component<'a', LinkProps, {}, typeof RootLink.enhance> & {\n Text: Intergalactic.Component<'span', TextProps>;\n Addon: Intergalactic.Component<'span', BoxProps>;\n};\n\nexport default Link;\n"],"mappings":";;;;;AACA,SAAeA,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AAE1D,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,EAAEC,OAAO,EAAEC,aAAa,QAAQ,eAAe;AACxF,OAAOC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,GAE2B1E,GAAG;EAD1C,MAAM;IAAEuC;EAAO,CAAC,GAAG2B,KAAK;EACxB,OAAAO,KAAA,GAAOpE,OAAO,CAACkC,MAAM,CAAC,eAAC3B,KAAA,CAAAgD,aAAA,CAACc,MAAM,EAAAD,KAAA,CAAAX,EAAA;IAAA,GAAAa,aAAA;MAAA,OAAkB;IAAM,GAAAH,KAAA;EAAA,EAAE,CAAC;AAC3D;AAEA,MAAMnB,IAAI,GAAGnD,eAAe,CAACc,QAAQ,EAAE;EACrCL,IAAI,EAAEsD,QAAQ;EACdD;AACF,CAAC,CAGA;AAED,eAAeX,IAAI","ignoreList":[]}
|
package/lib/esm/Link.mjs
CHANGED
|
@@ -82,7 +82,7 @@ class RootLink extends Component {
|
|
|
82
82
|
"text-color": resolveColor(color),
|
|
83
83
|
"tag": "a",
|
|
84
84
|
"ref": this.containerRef,
|
|
85
|
-
"__excludeProps": ["disabled", "aria-disabled"],
|
|
85
|
+
"__excludeProps": ["disabled", "aria-disabled", "title"],
|
|
86
86
|
"aria-label": showHint ? hintContent : void 0
|
|
87
87
|
}, _ref)
|
|
88
88
|
}), /* @__PURE__ */ React.createElement(SInner, _ref4.cn("SInner", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/link",
|
|
3
3
|
"description": "Semrush Link Component",
|
|
4
|
-
"version": "17.0.0-prerelease.
|
|
4
|
+
"version": "17.0.0-prerelease.29",
|
|
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/tooltip": "^17.0.0-prerelease.
|
|
18
|
-
"@semcore/typography": "^17.0.0-prerelease.
|
|
17
|
+
"@semcore/tooltip": "^17.0.0-prerelease.29",
|
|
18
|
+
"@semcore/typography": "^17.0.0-prerelease.29"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@semcore/base-components": "^17.0.0 || ^17.0.0-0"
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"directory": "semcore/link"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@semcore/base-components": "17.0.0-prerelease.
|
|
29
|
+
"@semcore/base-components": "17.0.0-prerelease.29",
|
|
30
|
+
"@semcore/core": "17.0.0-prerelease.29",
|
|
30
31
|
"@semcore/testing-utils": "1.0.0",
|
|
31
|
-
"@semcore/
|
|
32
|
-
"@semcore/icon": "16.7.2-prerelease.27"
|
|
32
|
+
"@semcore/icon": "16.7.2-prerelease.29"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "pnpm semcore-builder && pnpm vite build"
|