@porsche-design-system/components-react 3.10.0-rc.1 → 3.10.0-rc.3

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
@@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
14
14
 
15
15
  ### [Unreleased]
16
16
 
17
+ ### [3.10.0-rc.3] - 2023-12-12
18
+
19
+ ### [3.10.0-rc.2] - 2023-12-12
20
+
17
21
  ### [3.10.0-rc.1] - 2023-12-11
18
22
 
19
23
  #### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porsche-design-system/components-react",
3
- "version": "3.10.0-rc.1",
3
+ "version": "3.10.0-rc.3",
4
4
  "description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
5
5
  "keywords": [
6
6
  "porsche",
@@ -17,7 +17,7 @@
17
17
  "license": "SEE LICENSE IN LICENSE",
18
18
  "homepage": "https://designsystem.porsche.com",
19
19
  "dependencies": {
20
- "@porsche-design-system/components-js": "3.10.0-rc.1"
20
+ "@porsche-design-system/components-js": "3.10.0-rc.3"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=17.0.0 <19.0.0",
@@ -5884,7 +5884,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
5884
5884
  }),
5885
5885
  }),
5886
5886
  '::slotted(:is(h1, h2, h3, h4, h5, h6):not(:first-child))': addImportantToEachRule({
5887
- margin: `${spacingFluidSmall} 0 0`,
5887
+ margin: `calc(${spacingFluidMedium} - ${spacingFluidXSmall}) 0 0`, // spacingFluidXSmall to compensate default gap
5888
5888
  }),
5889
5889
  '::slotted(p)': addImportantToEachRule({
5890
5890
  ...textSmallStyle,
@@ -5898,6 +5898,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
5898
5898
  '::slotted(a)': {
5899
5899
  ...addImportantToEachRule({
5900
5900
  ...textSmallStyle,
5901
+ alignSelf: 'flex-start',
5901
5902
  display: 'block',
5902
5903
  textDecoration: 'none',
5903
5904
  cursor: 'pointer',
@@ -6660,9 +6661,23 @@ const getComponentCss$E = (aspectRatio, weight, direction, hasDescription) => {
6660
6661
  };
6661
6662
 
6662
6663
  const slottedAnchorSelector = `a[slot='${anchorSlot}']`;
6664
+ const anchorJssStyle = {
6665
+ position: 'absolute',
6666
+ ...getInsetJssStyle(),
6667
+ zIndex: 1,
6668
+ borderRadius: borderRadiusMedium,
6669
+ };
6670
+ const getMultilineEllipsis = (lineClamp) => {
6671
+ return {
6672
+ display: '-webkit-box',
6673
+ WebkitLineClamp: lineClamp,
6674
+ WebkitBoxOrient: 'vertical',
6675
+ overflow: 'hidden',
6676
+ };
6677
+ };
6663
6678
  const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme) => {
6664
- const { primaryColor, contrastHighColor, backgroundSurfaceColor } = getThemedColors(theme);
6665
- const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
6679
+ const { primaryColor, contrastHighColor, backgroundSurfaceColor, focusColor } = getThemedColors(theme);
6680
+ const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
6666
6681
  return getCss({
6667
6682
  '@global': {
6668
6683
  ':host': {
@@ -6673,127 +6688,119 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
6673
6688
  ...hostHiddenStyles,
6674
6689
  }),
6675
6690
  },
6691
+ [`slot[name="${headerSlot}"]`]: {
6692
+ display: 'block', // to ensure correct like button positioning when slot is unused
6693
+ },
6676
6694
  ...addImportantToEachRule({
6677
6695
  '::slotted': {
6678
- '&(img), &(picture)': {
6679
- display: 'block',
6680
- width: '100%',
6681
- height: '100%',
6682
- objectFit: 'cover',
6683
- overflow: 'hidden',
6684
- borderRadius: borderRadiusLarge,
6685
- },
6686
6696
  ...(hasSlottedAnchor && {
6687
6697
  [`&(${slottedAnchorSelector})`]: {
6688
- position: 'absolute',
6689
- borderRadius: borderRadiusMedium,
6690
- ...getInsetJssStyle(),
6691
- zIndex: 1,
6692
- textIndent: '-999999px', // Hide anchor label visually but still usable for a11y
6698
+ ...anchorJssStyle,
6699
+ textIndent: '-999999px', // hide anchor label visually but still usable for a11y (only works in RTL-mode because of `overflow: hidden;` parent)
6693
6700
  },
6694
6701
  // TODO: Refactor getFocusStyles to support slotted selector
6695
6702
  [`&(${slottedAnchorSelector}:focus)`]: {
6696
- outline: `${borderWidthBase} solid ${themeLightStateFocus}`,
6703
+ outline: `${borderWidthBase} solid ${focusColor}`,
6697
6704
  outlineOffset: '2px',
6705
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6706
+ outlineColor: focusColorDark,
6707
+ }),
6698
6708
  },
6699
6709
  [`&(${slottedAnchorSelector}:focus:not(:focus-visible))`]: {
6700
6710
  outlineColor: 'transparent',
6701
6711
  },
6702
6712
  }),
6713
+ [`&([slot="${headerSlot}"])`]: {
6714
+ display: 'flex',
6715
+ flexWrap: 'wrap',
6716
+ gap: spacingFluidXSmall,
6717
+ },
6718
+ '&(img), &(picture)': {
6719
+ display: 'block',
6720
+ width: '100%',
6721
+ height: '100%',
6722
+ objectFit: 'cover',
6723
+ borderRadius: borderRadiusLarge,
6724
+ overflow: 'hidden', // needed for picture > img to have correct border-radius
6725
+ },
6703
6726
  },
6704
6727
  }),
6705
6728
  },
6706
- ...(!hasSlottedAnchor && {
6707
- 'link-overlay': {
6708
- position: 'absolute',
6709
- ...getInsetJssStyle(),
6710
- ...getFocusStyle({ borderRadius: 'medium' }),
6711
- },
6712
- }),
6713
6729
  root: {
6714
6730
  display: 'flex',
6715
6731
  flexDirection: 'column',
6716
- aspectRatio: '3 / 4',
6717
- ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6718
- aspectRatio: ratio.replace(':', ' / '),
6719
- })),
6732
+ aspectRatio: '3/4',
6720
6733
  overflow: 'hidden',
6721
6734
  boxSizing: 'border-box',
6722
6735
  borderRadius: borderRadiusMedium,
6723
6736
  padding: spacingFluidSmall,
6724
6737
  color: primaryColor,
6725
6738
  backgroundColor: backgroundSurfaceColor,
6739
+ ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6740
+ aspectRatio: ratio.replace(':', '/'),
6741
+ })),
6726
6742
  ...prefersColorSchemeDarkMediaQuery(theme, {
6727
6743
  color: primaryColorDark,
6728
6744
  backgroundColor: backgroundSurfaceColorDark,
6729
6745
  }),
6730
- ...hoverMediaQuery({
6731
- '&:hover .image-container': {
6732
- transform: 'scale3d(1.05,1.05,1.05)',
6733
- },
6734
- }),
6735
6746
  },
6747
+ ...(!hasSlottedAnchor && {
6748
+ anchor: {
6749
+ ...anchorJssStyle,
6750
+ ...getFocusStyle({ borderRadius: 'medium' }),
6751
+ },
6752
+ }),
6736
6753
  header: {
6737
6754
  display: 'flex',
6755
+ gap: spacingFluidSmall,
6738
6756
  justifyContent: 'space-between',
6739
- fontSize: fontSizeTextXSmall,
6740
- [`& slot[name="${headerSlot}"]`]: {
6741
- display: 'block', // To ensure button positioning when slot is unused
6742
- },
6757
+ alignItems: 'flex-start',
6743
6758
  },
6744
6759
  ...(hasLikeButton && {
6745
- 'like-button': {
6746
- height: 'fit-content',
6760
+ button: {
6747
6761
  position: 'relative',
6748
- zIndex: 2,
6749
- ...hoverMediaQuery({
6750
- '&:hover': {
6751
- cursor: 'pointer',
6752
- },
6753
- }),
6762
+ zIndex: 2, // Necessary to be on top of anchor link
6754
6763
  },
6755
6764
  }),
6756
- 'text-container': {
6765
+ image: {
6766
+ aspectRatio: '8/9',
6767
+ margin: `${spacingFluidSmall} auto ${spacingFluidXSmall}`,
6768
+ overflow: 'hidden',
6769
+ transition: getTransition('transform', 'moderate'),
6770
+ [getMediaQueryMin('s')]: {
6771
+ padding: `0 ${spacingFluidMedium}`, // ensures image is not getting to large
6772
+ },
6773
+ ...hoverMediaQuery({
6774
+ '.root:hover &': {
6775
+ transform: 'scale3d(1.05,1.05,1.05)',
6776
+ },
6777
+ }),
6778
+ },
6779
+ wrapper: {
6757
6780
  display: 'flex',
6758
- justifyContent: 'center',
6759
6781
  flexDirection: 'column',
6760
6782
  margin: 'auto',
6761
- },
6762
- text: {
6763
6783
  textAlign: 'center',
6764
- margin: 0,
6765
- '&__heading': {
6766
- ...headingSmallStyle,
6767
- paddingBottom: '2px',
6768
- minHeight: `calc(${fontLineHeight} * 2)`,
6769
- display: 'flex',
6770
- justifyContent: 'center',
6771
- alignItems: 'flex-end',
6772
- },
6773
- '&__price, &__description': {
6774
- fontWeight: fontWeightRegular,
6775
- },
6776
- '&__price': {
6777
- ...textXSmallStyle,
6778
- },
6779
- '&__description': {
6780
- ...textXXSmallStyle,
6781
- color: contrastHighColor,
6782
- ...prefersColorSchemeDarkMediaQuery(theme, {
6783
- color: contrastHighColorDark,
6784
- }),
6785
- },
6786
6784
  },
6787
- 'image-container': {
6788
- margin: `${spacingFluidSmall} auto ${spacingFluidXSmall} auto`,
6789
- padding: 0,
6790
- [getMediaQueryMin('s')]: {
6791
- padding: `0 ${spacingFluidMedium}`,
6792
- },
6793
- overflow: 'hidden',
6794
- aspectRatio: '8 / 9',
6795
- transition: getTransition('transform', 'moderate'),
6796
- maxHeight: '100%',
6785
+ heading: {
6786
+ ...headingSmallStyle,
6787
+ ...fontHyphenationStyle,
6788
+ ...getMultilineEllipsis(3),
6789
+ margin: '0 0 2px',
6790
+ },
6791
+ price: {
6792
+ ...textXSmallStyle,
6793
+ ...getMultilineEllipsis(2),
6794
+ margin: 0, // ua-style reset
6795
+ },
6796
+ description: {
6797
+ ...textXXSmallStyle,
6798
+ ...getMultilineEllipsis(2),
6799
+ margin: 0,
6800
+ color: contrastHighColor,
6801
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6802
+ color: contrastHighColorDark,
6803
+ }),
6797
6804
  },
6798
6805
  });
6799
6806
  };
@@ -85,7 +85,7 @@ class DSRLinkTileProduct extends react.Component {
85
85
  const priceId = 'price';
86
86
  const descriptionId = 'description';
87
87
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getLinkTileProductCss(this.props.likeButton, !this.props.href, this.props.aspectRatio, this.props.theme)));
88
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsxs("div", { id: headerId, className: "header", children: [jsxRuntime.jsx("slot", { name: utilsEntry.headerSlot }), this.props.likeButton && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "like-button", type: "button", icon: this.props.liked ? 'heart-filled' : 'heart', hideLabel: true, theme: this.props.theme, children: this.props.liked ? 'Heart Filled icon' : 'Heart icon' }))] }), jsxRuntime.jsx("div", { className: "image-container", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsxs("div", { className: "text-container", children: [jsxRuntime.jsx("h3", { id: headingId, className: "text text__heading", children: this.props.heading }), jsxRuntime.jsx("p", { id: priceId, className: "text text__price", children: this.props.price }), jsxRuntime.jsx("p", { id: descriptionId, className: "text text__description", children: this.props.description })] }), this.props.href ? (jsxRuntime.jsx("a", { className: "link-overlay", href: this.props.href, target: this.props.target, rel: this.props.rel, "aria-labelledby": `${headingId} ${priceId}`, "aria-describedby": `${headerId} ${descriptionId}` })) : (jsxRuntime.jsx("slot", { name: utilsEntry.anchorSlot }))] }) })] }), this.props.children] }));
88
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [this.props.href ? (jsxRuntime.jsx("a", { className: "anchor", href: this.props.href, target: this.props.target, rel: this.props.rel, "aria-labelledby": `${headingId} ${priceId}`, "aria-describedby": `${headerId} ${descriptionId}` })) : (jsxRuntime.jsx("slot", { name: utilsEntry.anchorSlot })), jsxRuntime.jsxs("div", { id: headerId, className: "header", children: [jsxRuntime.jsx("slot", { name: utilsEntry.headerSlot }), this.props.likeButton && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "button", type: "button", icon: this.props.liked ? 'heart-filled' : 'heart', hideLabel: true, theme: this.props.theme, children: this.props.liked ? 'Remove from wishlist' : 'Add to wishlist' }))] }), jsxRuntime.jsx("div", { className: "image", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("h3", { id: headingId, className: "heading", children: this.props.heading }), jsxRuntime.jsx("p", { id: priceId, className: "price", children: this.props.price }), jsxRuntime.jsx("p", { id: descriptionId, className: "description", children: this.props.description })] })] })] }), this.props.children] }));
89
89
  }
90
90
  }
91
91
 
@@ -5882,7 +5882,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
5882
5882
  }),
5883
5883
  }),
5884
5884
  '::slotted(:is(h1, h2, h3, h4, h5, h6):not(:first-child))': addImportantToEachRule({
5885
- margin: `${spacingFluidSmall} 0 0`,
5885
+ margin: `calc(${spacingFluidMedium} - ${spacingFluidXSmall}) 0 0`, // spacingFluidXSmall to compensate default gap
5886
5886
  }),
5887
5887
  '::slotted(p)': addImportantToEachRule({
5888
5888
  ...textSmallStyle,
@@ -5896,6 +5896,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
5896
5896
  '::slotted(a)': {
5897
5897
  ...addImportantToEachRule({
5898
5898
  ...textSmallStyle,
5899
+ alignSelf: 'flex-start',
5899
5900
  display: 'block',
5900
5901
  textDecoration: 'none',
5901
5902
  cursor: 'pointer',
@@ -6658,9 +6659,23 @@ const getComponentCss$E = (aspectRatio, weight, direction, hasDescription) => {
6658
6659
  };
6659
6660
 
6660
6661
  const slottedAnchorSelector = `a[slot='${anchorSlot}']`;
6662
+ const anchorJssStyle = {
6663
+ position: 'absolute',
6664
+ ...getInsetJssStyle(),
6665
+ zIndex: 1,
6666
+ borderRadius: borderRadiusMedium,
6667
+ };
6668
+ const getMultilineEllipsis = (lineClamp) => {
6669
+ return {
6670
+ display: '-webkit-box',
6671
+ WebkitLineClamp: lineClamp,
6672
+ WebkitBoxOrient: 'vertical',
6673
+ overflow: 'hidden',
6674
+ };
6675
+ };
6661
6676
  const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme) => {
6662
- const { primaryColor, contrastHighColor, backgroundSurfaceColor } = getThemedColors(theme);
6663
- const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
6677
+ const { primaryColor, contrastHighColor, backgroundSurfaceColor, focusColor } = getThemedColors(theme);
6678
+ const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
6664
6679
  return getCss({
6665
6680
  '@global': {
6666
6681
  ':host': {
@@ -6671,127 +6686,119 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
6671
6686
  ...hostHiddenStyles,
6672
6687
  }),
6673
6688
  },
6689
+ [`slot[name="${headerSlot}"]`]: {
6690
+ display: 'block', // to ensure correct like button positioning when slot is unused
6691
+ },
6674
6692
  ...addImportantToEachRule({
6675
6693
  '::slotted': {
6676
- '&(img), &(picture)': {
6677
- display: 'block',
6678
- width: '100%',
6679
- height: '100%',
6680
- objectFit: 'cover',
6681
- overflow: 'hidden',
6682
- borderRadius: borderRadiusLarge,
6683
- },
6684
6694
  ...(hasSlottedAnchor && {
6685
6695
  [`&(${slottedAnchorSelector})`]: {
6686
- position: 'absolute',
6687
- borderRadius: borderRadiusMedium,
6688
- ...getInsetJssStyle(),
6689
- zIndex: 1,
6690
- textIndent: '-999999px', // Hide anchor label visually but still usable for a11y
6696
+ ...anchorJssStyle,
6697
+ textIndent: '-999999px', // hide anchor label visually but still usable for a11y (only works in RTL-mode because of `overflow: hidden;` parent)
6691
6698
  },
6692
6699
  // TODO: Refactor getFocusStyles to support slotted selector
6693
6700
  [`&(${slottedAnchorSelector}:focus)`]: {
6694
- outline: `${borderWidthBase} solid ${themeLightStateFocus}`,
6701
+ outline: `${borderWidthBase} solid ${focusColor}`,
6695
6702
  outlineOffset: '2px',
6703
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6704
+ outlineColor: focusColorDark,
6705
+ }),
6696
6706
  },
6697
6707
  [`&(${slottedAnchorSelector}:focus:not(:focus-visible))`]: {
6698
6708
  outlineColor: 'transparent',
6699
6709
  },
6700
6710
  }),
6711
+ [`&([slot="${headerSlot}"])`]: {
6712
+ display: 'flex',
6713
+ flexWrap: 'wrap',
6714
+ gap: spacingFluidXSmall,
6715
+ },
6716
+ '&(img), &(picture)': {
6717
+ display: 'block',
6718
+ width: '100%',
6719
+ height: '100%',
6720
+ objectFit: 'cover',
6721
+ borderRadius: borderRadiusLarge,
6722
+ overflow: 'hidden', // needed for picture > img to have correct border-radius
6723
+ },
6701
6724
  },
6702
6725
  }),
6703
6726
  },
6704
- ...(!hasSlottedAnchor && {
6705
- 'link-overlay': {
6706
- position: 'absolute',
6707
- ...getInsetJssStyle(),
6708
- ...getFocusStyle({ borderRadius: 'medium' }),
6709
- },
6710
- }),
6711
6727
  root: {
6712
6728
  display: 'flex',
6713
6729
  flexDirection: 'column',
6714
- aspectRatio: '3 / 4',
6715
- ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6716
- aspectRatio: ratio.replace(':', ' / '),
6717
- })),
6730
+ aspectRatio: '3/4',
6718
6731
  overflow: 'hidden',
6719
6732
  boxSizing: 'border-box',
6720
6733
  borderRadius: borderRadiusMedium,
6721
6734
  padding: spacingFluidSmall,
6722
6735
  color: primaryColor,
6723
6736
  backgroundColor: backgroundSurfaceColor,
6737
+ ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6738
+ aspectRatio: ratio.replace(':', '/'),
6739
+ })),
6724
6740
  ...prefersColorSchemeDarkMediaQuery(theme, {
6725
6741
  color: primaryColorDark,
6726
6742
  backgroundColor: backgroundSurfaceColorDark,
6727
6743
  }),
6728
- ...hoverMediaQuery({
6729
- '&:hover .image-container': {
6730
- transform: 'scale3d(1.05,1.05,1.05)',
6731
- },
6732
- }),
6733
6744
  },
6745
+ ...(!hasSlottedAnchor && {
6746
+ anchor: {
6747
+ ...anchorJssStyle,
6748
+ ...getFocusStyle({ borderRadius: 'medium' }),
6749
+ },
6750
+ }),
6734
6751
  header: {
6735
6752
  display: 'flex',
6753
+ gap: spacingFluidSmall,
6736
6754
  justifyContent: 'space-between',
6737
- fontSize: fontSizeTextXSmall,
6738
- [`& slot[name="${headerSlot}"]`]: {
6739
- display: 'block', // To ensure button positioning when slot is unused
6740
- },
6755
+ alignItems: 'flex-start',
6741
6756
  },
6742
6757
  ...(hasLikeButton && {
6743
- 'like-button': {
6744
- height: 'fit-content',
6758
+ button: {
6745
6759
  position: 'relative',
6746
- zIndex: 2,
6747
- ...hoverMediaQuery({
6748
- '&:hover': {
6749
- cursor: 'pointer',
6750
- },
6751
- }),
6760
+ zIndex: 2, // Necessary to be on top of anchor link
6752
6761
  },
6753
6762
  }),
6754
- 'text-container': {
6763
+ image: {
6764
+ aspectRatio: '8/9',
6765
+ margin: `${spacingFluidSmall} auto ${spacingFluidXSmall}`,
6766
+ overflow: 'hidden',
6767
+ transition: getTransition('transform', 'moderate'),
6768
+ [getMediaQueryMin('s')]: {
6769
+ padding: `0 ${spacingFluidMedium}`, // ensures image is not getting to large
6770
+ },
6771
+ ...hoverMediaQuery({
6772
+ '.root:hover &': {
6773
+ transform: 'scale3d(1.05,1.05,1.05)',
6774
+ },
6775
+ }),
6776
+ },
6777
+ wrapper: {
6755
6778
  display: 'flex',
6756
- justifyContent: 'center',
6757
6779
  flexDirection: 'column',
6758
6780
  margin: 'auto',
6759
- },
6760
- text: {
6761
6781
  textAlign: 'center',
6762
- margin: 0,
6763
- '&__heading': {
6764
- ...headingSmallStyle,
6765
- paddingBottom: '2px',
6766
- minHeight: `calc(${fontLineHeight} * 2)`,
6767
- display: 'flex',
6768
- justifyContent: 'center',
6769
- alignItems: 'flex-end',
6770
- },
6771
- '&__price, &__description': {
6772
- fontWeight: fontWeightRegular,
6773
- },
6774
- '&__price': {
6775
- ...textXSmallStyle,
6776
- },
6777
- '&__description': {
6778
- ...textXXSmallStyle,
6779
- color: contrastHighColor,
6780
- ...prefersColorSchemeDarkMediaQuery(theme, {
6781
- color: contrastHighColorDark,
6782
- }),
6783
- },
6784
6782
  },
6785
- 'image-container': {
6786
- margin: `${spacingFluidSmall} auto ${spacingFluidXSmall} auto`,
6787
- padding: 0,
6788
- [getMediaQueryMin('s')]: {
6789
- padding: `0 ${spacingFluidMedium}`,
6790
- },
6791
- overflow: 'hidden',
6792
- aspectRatio: '8 / 9',
6793
- transition: getTransition('transform', 'moderate'),
6794
- maxHeight: '100%',
6783
+ heading: {
6784
+ ...headingSmallStyle,
6785
+ ...fontHyphenationStyle,
6786
+ ...getMultilineEllipsis(3),
6787
+ margin: '0 0 2px',
6788
+ },
6789
+ price: {
6790
+ ...textXSmallStyle,
6791
+ ...getMultilineEllipsis(2),
6792
+ margin: 0, // ua-style reset
6793
+ },
6794
+ description: {
6795
+ ...textXXSmallStyle,
6796
+ ...getMultilineEllipsis(2),
6797
+ margin: 0,
6798
+ color: contrastHighColor,
6799
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6800
+ color: contrastHighColorDark,
6801
+ }),
6795
6802
  },
6796
6803
  });
6797
6804
  };
@@ -71,7 +71,7 @@ import { Component } from 'react';
71
71
  import { minifyCss } from '../../minifyCss.mjs';
72
72
  import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
73
73
  import { getLinkTileProductCss as getComponentCss$D } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
74
- import { headerSlot, anchorSlot } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
74
+ import { anchorSlot, headerSlot } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
75
75
 
76
76
  /** __Experimental__ */
77
77
  class DSRLinkTileProduct extends Component {
@@ -83,7 +83,7 @@ class DSRLinkTileProduct extends Component {
83
83
  const priceId = 'price';
84
84
  const descriptionId = 'description';
85
85
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$D(this.props.likeButton, !this.props.href, this.props.aspectRatio, this.props.theme)));
86
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { className: "root", children: [jsxs("div", { id: headerId, className: "header", children: [jsx("slot", { name: headerSlot }), this.props.likeButton && (jsx(PButtonPure, { className: "like-button", type: "button", icon: this.props.liked ? 'heart-filled' : 'heart', hideLabel: true, theme: this.props.theme, children: this.props.liked ? 'Heart Filled icon' : 'Heart icon' }))] }), jsx("div", { className: "image-container", children: jsx("slot", {}) }), jsxs("div", { className: "text-container", children: [jsx("h3", { id: headingId, className: "text text__heading", children: this.props.heading }), jsx("p", { id: priceId, className: "text text__price", children: this.props.price }), jsx("p", { id: descriptionId, className: "text text__description", children: this.props.description })] }), this.props.href ? (jsx("a", { className: "link-overlay", href: this.props.href, target: this.props.target, rel: this.props.rel, "aria-labelledby": `${headingId} ${priceId}`, "aria-describedby": `${headerId} ${descriptionId}` })) : (jsx("slot", { name: anchorSlot }))] }) })] }), this.props.children] }));
86
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [this.props.href ? (jsx("a", { className: "anchor", href: this.props.href, target: this.props.target, rel: this.props.rel, "aria-labelledby": `${headingId} ${priceId}`, "aria-describedby": `${headerId} ${descriptionId}` })) : (jsx("slot", { name: anchorSlot })), jsxs("div", { id: headerId, className: "header", children: [jsx("slot", { name: headerSlot }), this.props.likeButton && (jsx(PButtonPure, { className: "button", type: "button", icon: this.props.liked ? 'heart-filled' : 'heart', hideLabel: true, theme: this.props.theme, children: this.props.liked ? 'Remove from wishlist' : 'Add to wishlist' }))] }), jsx("div", { className: "image", children: jsx("slot", {}) }), jsxs("div", { className: "wrapper", children: [jsx("h3", { id: headingId, className: "heading", children: this.props.heading }), jsx("p", { id: priceId, className: "price", children: this.props.price }), jsx("p", { id: descriptionId, className: "description", children: this.props.description })] })] })] }), this.props.children] }));
87
87
  }
88
88
  }
89
89