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

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,8 @@ 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.2] - 2023-12-12
18
+
17
19
  ### [3.10.0-rc.1] - 2023-12-11
18
20
 
19
21
  #### 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.2",
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.2"
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,
@@ -6022,7 +6022,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
6022
6022
  color: primaryColorDark,
6023
6023
  }),
6024
6024
  },
6025
- content: mergeDeep(getContentJssStyle(), fadeInOutTransition),
6025
+ content: mergeDeep(getContentJssStyle(), fadeInOutTransition, { alignItems: 'flex-start' }),
6026
6026
  });
6027
6027
  };
6028
6028
 
@@ -6660,9 +6660,23 @@ const getComponentCss$E = (aspectRatio, weight, direction, hasDescription) => {
6660
6660
  };
6661
6661
 
6662
6662
  const slottedAnchorSelector = `a[slot='${anchorSlot}']`;
6663
+ const anchorJssStyle = {
6664
+ position: 'absolute',
6665
+ ...getInsetJssStyle(),
6666
+ zIndex: 1,
6667
+ borderRadius: borderRadiusMedium,
6668
+ };
6669
+ const getMultilineEllipsis = (lineClamp) => {
6670
+ return {
6671
+ display: '-webkit-box',
6672
+ WebkitLineClamp: lineClamp,
6673
+ WebkitBoxOrient: 'vertical',
6674
+ overflow: 'hidden',
6675
+ };
6676
+ };
6663
6677
  const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme) => {
6664
- const { primaryColor, contrastHighColor, backgroundSurfaceColor } = getThemedColors(theme);
6665
- const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
6678
+ const { primaryColor, contrastHighColor, backgroundSurfaceColor, focusColor } = getThemedColors(theme);
6679
+ const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
6666
6680
  return getCss({
6667
6681
  '@global': {
6668
6682
  ':host': {
@@ -6673,127 +6687,119 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
6673
6687
  ...hostHiddenStyles,
6674
6688
  }),
6675
6689
  },
6690
+ [`slot[name="${headerSlot}"]`]: {
6691
+ display: 'block', // to ensure correct like button positioning when slot is unused
6692
+ },
6676
6693
  ...addImportantToEachRule({
6677
6694
  '::slotted': {
6678
- '&(img), &(picture)': {
6679
- display: 'block',
6680
- width: '100%',
6681
- height: '100%',
6682
- objectFit: 'cover',
6683
- overflow: 'hidden',
6684
- borderRadius: borderRadiusLarge,
6685
- },
6686
6695
  ...(hasSlottedAnchor && {
6687
6696
  [`&(${slottedAnchorSelector})`]: {
6688
- position: 'absolute',
6689
- borderRadius: borderRadiusMedium,
6690
- ...getInsetJssStyle(),
6691
- zIndex: 1,
6692
- textIndent: '-999999px', // Hide anchor label visually but still usable for a11y
6697
+ ...anchorJssStyle,
6698
+ textIndent: '-999999px', // hide anchor label visually but still usable for a11y (only works in RTL-mode because of `overflow: hidden;` parent)
6693
6699
  },
6694
6700
  // TODO: Refactor getFocusStyles to support slotted selector
6695
6701
  [`&(${slottedAnchorSelector}:focus)`]: {
6696
- outline: `${borderWidthBase} solid ${themeLightStateFocus}`,
6702
+ outline: `${borderWidthBase} solid ${focusColor}`,
6697
6703
  outlineOffset: '2px',
6704
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6705
+ outlineColor: focusColorDark,
6706
+ }),
6698
6707
  },
6699
6708
  [`&(${slottedAnchorSelector}:focus:not(:focus-visible))`]: {
6700
6709
  outlineColor: 'transparent',
6701
6710
  },
6702
6711
  }),
6712
+ [`&([slot="${headerSlot}"])`]: {
6713
+ display: 'flex',
6714
+ flexWrap: 'wrap',
6715
+ gap: spacingFluidXSmall,
6716
+ },
6717
+ '&(img), &(picture)': {
6718
+ display: 'block',
6719
+ width: '100%',
6720
+ height: '100%',
6721
+ objectFit: 'cover',
6722
+ borderRadius: borderRadiusLarge,
6723
+ overflow: 'hidden', // needed for picture > img to have correct border-radius
6724
+ },
6703
6725
  },
6704
6726
  }),
6705
6727
  },
6706
- ...(!hasSlottedAnchor && {
6707
- 'link-overlay': {
6708
- position: 'absolute',
6709
- ...getInsetJssStyle(),
6710
- ...getFocusStyle({ borderRadius: 'medium' }),
6711
- },
6712
- }),
6713
6728
  root: {
6714
6729
  display: 'flex',
6715
6730
  flexDirection: 'column',
6716
- aspectRatio: '3 / 4',
6717
- ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6718
- aspectRatio: ratio.replace(':', ' / '),
6719
- })),
6731
+ aspectRatio: '3/4',
6720
6732
  overflow: 'hidden',
6721
6733
  boxSizing: 'border-box',
6722
6734
  borderRadius: borderRadiusMedium,
6723
6735
  padding: spacingFluidSmall,
6724
6736
  color: primaryColor,
6725
6737
  backgroundColor: backgroundSurfaceColor,
6738
+ ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6739
+ aspectRatio: ratio.replace(':', '/'),
6740
+ })),
6726
6741
  ...prefersColorSchemeDarkMediaQuery(theme, {
6727
6742
  color: primaryColorDark,
6728
6743
  backgroundColor: backgroundSurfaceColorDark,
6729
6744
  }),
6730
- ...hoverMediaQuery({
6731
- '&:hover .image-container': {
6732
- transform: 'scale3d(1.05,1.05,1.05)',
6733
- },
6734
- }),
6735
6745
  },
6746
+ ...(!hasSlottedAnchor && {
6747
+ anchor: {
6748
+ ...anchorJssStyle,
6749
+ ...getFocusStyle({ borderRadius: 'medium' }),
6750
+ },
6751
+ }),
6736
6752
  header: {
6737
6753
  display: 'flex',
6754
+ gap: spacingFluidSmall,
6738
6755
  justifyContent: 'space-between',
6739
- fontSize: fontSizeTextXSmall,
6740
- [`& slot[name="${headerSlot}"]`]: {
6741
- display: 'block', // To ensure button positioning when slot is unused
6742
- },
6756
+ alignItems: 'flex-start',
6743
6757
  },
6744
6758
  ...(hasLikeButton && {
6745
- 'like-button': {
6746
- height: 'fit-content',
6759
+ button: {
6747
6760
  position: 'relative',
6748
- zIndex: 2,
6749
- ...hoverMediaQuery({
6750
- '&:hover': {
6751
- cursor: 'pointer',
6752
- },
6753
- }),
6761
+ zIndex: 2, // Necessary to be on top of anchor link
6754
6762
  },
6755
6763
  }),
6756
- 'text-container': {
6764
+ image: {
6765
+ aspectRatio: '8/9',
6766
+ margin: `${spacingFluidSmall} auto ${spacingFluidXSmall}`,
6767
+ overflow: 'hidden',
6768
+ transition: getTransition('transform', 'moderate'),
6769
+ [getMediaQueryMin('s')]: {
6770
+ padding: `0 ${spacingFluidMedium}`, // ensures image is not getting to large
6771
+ },
6772
+ ...hoverMediaQuery({
6773
+ '.root:hover &': {
6774
+ transform: 'scale3d(1.05,1.05,1.05)',
6775
+ },
6776
+ }),
6777
+ },
6778
+ wrapper: {
6757
6779
  display: 'flex',
6758
- justifyContent: 'center',
6759
6780
  flexDirection: 'column',
6760
6781
  margin: 'auto',
6761
- },
6762
- text: {
6763
6782
  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
6783
  },
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%',
6784
+ heading: {
6785
+ ...headingSmallStyle,
6786
+ ...fontHyphenationStyle,
6787
+ ...getMultilineEllipsis(3),
6788
+ margin: '0 0 2px',
6789
+ },
6790
+ price: {
6791
+ ...textXSmallStyle,
6792
+ ...getMultilineEllipsis(2),
6793
+ margin: 0, // ua-style reset
6794
+ },
6795
+ description: {
6796
+ ...textXXSmallStyle,
6797
+ ...getMultilineEllipsis(2),
6798
+ margin: 0,
6799
+ color: contrastHighColor,
6800
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6801
+ color: contrastHighColorDark,
6802
+ }),
6797
6803
  },
6798
6804
  });
6799
6805
  };
@@ -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,
@@ -6020,7 +6020,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
6020
6020
  color: primaryColorDark,
6021
6021
  }),
6022
6022
  },
6023
- content: mergeDeep(getContentJssStyle(), fadeInOutTransition),
6023
+ content: mergeDeep(getContentJssStyle(), fadeInOutTransition, { alignItems: 'flex-start' }),
6024
6024
  });
6025
6025
  };
6026
6026
 
@@ -6658,9 +6658,23 @@ const getComponentCss$E = (aspectRatio, weight, direction, hasDescription) => {
6658
6658
  };
6659
6659
 
6660
6660
  const slottedAnchorSelector = `a[slot='${anchorSlot}']`;
6661
+ const anchorJssStyle = {
6662
+ position: 'absolute',
6663
+ ...getInsetJssStyle(),
6664
+ zIndex: 1,
6665
+ borderRadius: borderRadiusMedium,
6666
+ };
6667
+ const getMultilineEllipsis = (lineClamp) => {
6668
+ return {
6669
+ display: '-webkit-box',
6670
+ WebkitLineClamp: lineClamp,
6671
+ WebkitBoxOrient: 'vertical',
6672
+ overflow: 'hidden',
6673
+ };
6674
+ };
6661
6675
  const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme) => {
6662
- const { primaryColor, contrastHighColor, backgroundSurfaceColor } = getThemedColors(theme);
6663
- const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
6676
+ const { primaryColor, contrastHighColor, backgroundSurfaceColor, focusColor } = getThemedColors(theme);
6677
+ const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
6664
6678
  return getCss({
6665
6679
  '@global': {
6666
6680
  ':host': {
@@ -6671,127 +6685,119 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
6671
6685
  ...hostHiddenStyles,
6672
6686
  }),
6673
6687
  },
6688
+ [`slot[name="${headerSlot}"]`]: {
6689
+ display: 'block', // to ensure correct like button positioning when slot is unused
6690
+ },
6674
6691
  ...addImportantToEachRule({
6675
6692
  '::slotted': {
6676
- '&(img), &(picture)': {
6677
- display: 'block',
6678
- width: '100%',
6679
- height: '100%',
6680
- objectFit: 'cover',
6681
- overflow: 'hidden',
6682
- borderRadius: borderRadiusLarge,
6683
- },
6684
6693
  ...(hasSlottedAnchor && {
6685
6694
  [`&(${slottedAnchorSelector})`]: {
6686
- position: 'absolute',
6687
- borderRadius: borderRadiusMedium,
6688
- ...getInsetJssStyle(),
6689
- zIndex: 1,
6690
- textIndent: '-999999px', // Hide anchor label visually but still usable for a11y
6695
+ ...anchorJssStyle,
6696
+ textIndent: '-999999px', // hide anchor label visually but still usable for a11y (only works in RTL-mode because of `overflow: hidden;` parent)
6691
6697
  },
6692
6698
  // TODO: Refactor getFocusStyles to support slotted selector
6693
6699
  [`&(${slottedAnchorSelector}:focus)`]: {
6694
- outline: `${borderWidthBase} solid ${themeLightStateFocus}`,
6700
+ outline: `${borderWidthBase} solid ${focusColor}`,
6695
6701
  outlineOffset: '2px',
6702
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6703
+ outlineColor: focusColorDark,
6704
+ }),
6696
6705
  },
6697
6706
  [`&(${slottedAnchorSelector}:focus:not(:focus-visible))`]: {
6698
6707
  outlineColor: 'transparent',
6699
6708
  },
6700
6709
  }),
6710
+ [`&([slot="${headerSlot}"])`]: {
6711
+ display: 'flex',
6712
+ flexWrap: 'wrap',
6713
+ gap: spacingFluidXSmall,
6714
+ },
6715
+ '&(img), &(picture)': {
6716
+ display: 'block',
6717
+ width: '100%',
6718
+ height: '100%',
6719
+ objectFit: 'cover',
6720
+ borderRadius: borderRadiusLarge,
6721
+ overflow: 'hidden', // needed for picture > img to have correct border-radius
6722
+ },
6701
6723
  },
6702
6724
  }),
6703
6725
  },
6704
- ...(!hasSlottedAnchor && {
6705
- 'link-overlay': {
6706
- position: 'absolute',
6707
- ...getInsetJssStyle(),
6708
- ...getFocusStyle({ borderRadius: 'medium' }),
6709
- },
6710
- }),
6711
6726
  root: {
6712
6727
  display: 'flex',
6713
6728
  flexDirection: 'column',
6714
- aspectRatio: '3 / 4',
6715
- ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6716
- aspectRatio: ratio.replace(':', ' / '),
6717
- })),
6729
+ aspectRatio: '3/4',
6718
6730
  overflow: 'hidden',
6719
6731
  boxSizing: 'border-box',
6720
6732
  borderRadius: borderRadiusMedium,
6721
6733
  padding: spacingFluidSmall,
6722
6734
  color: primaryColor,
6723
6735
  backgroundColor: backgroundSurfaceColor,
6736
+ ...buildResponsiveStyles(aspectRatio, (ratio) => ({
6737
+ aspectRatio: ratio.replace(':', '/'),
6738
+ })),
6724
6739
  ...prefersColorSchemeDarkMediaQuery(theme, {
6725
6740
  color: primaryColorDark,
6726
6741
  backgroundColor: backgroundSurfaceColorDark,
6727
6742
  }),
6728
- ...hoverMediaQuery({
6729
- '&:hover .image-container': {
6730
- transform: 'scale3d(1.05,1.05,1.05)',
6731
- },
6732
- }),
6733
6743
  },
6744
+ ...(!hasSlottedAnchor && {
6745
+ anchor: {
6746
+ ...anchorJssStyle,
6747
+ ...getFocusStyle({ borderRadius: 'medium' }),
6748
+ },
6749
+ }),
6734
6750
  header: {
6735
6751
  display: 'flex',
6752
+ gap: spacingFluidSmall,
6736
6753
  justifyContent: 'space-between',
6737
- fontSize: fontSizeTextXSmall,
6738
- [`& slot[name="${headerSlot}"]`]: {
6739
- display: 'block', // To ensure button positioning when slot is unused
6740
- },
6754
+ alignItems: 'flex-start',
6741
6755
  },
6742
6756
  ...(hasLikeButton && {
6743
- 'like-button': {
6744
- height: 'fit-content',
6757
+ button: {
6745
6758
  position: 'relative',
6746
- zIndex: 2,
6747
- ...hoverMediaQuery({
6748
- '&:hover': {
6749
- cursor: 'pointer',
6750
- },
6751
- }),
6759
+ zIndex: 2, // Necessary to be on top of anchor link
6752
6760
  },
6753
6761
  }),
6754
- 'text-container': {
6762
+ image: {
6763
+ aspectRatio: '8/9',
6764
+ margin: `${spacingFluidSmall} auto ${spacingFluidXSmall}`,
6765
+ overflow: 'hidden',
6766
+ transition: getTransition('transform', 'moderate'),
6767
+ [getMediaQueryMin('s')]: {
6768
+ padding: `0 ${spacingFluidMedium}`, // ensures image is not getting to large
6769
+ },
6770
+ ...hoverMediaQuery({
6771
+ '.root:hover &': {
6772
+ transform: 'scale3d(1.05,1.05,1.05)',
6773
+ },
6774
+ }),
6775
+ },
6776
+ wrapper: {
6755
6777
  display: 'flex',
6756
- justifyContent: 'center',
6757
6778
  flexDirection: 'column',
6758
6779
  margin: 'auto',
6759
- },
6760
- text: {
6761
6780
  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
6781
  },
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%',
6782
+ heading: {
6783
+ ...headingSmallStyle,
6784
+ ...fontHyphenationStyle,
6785
+ ...getMultilineEllipsis(3),
6786
+ margin: '0 0 2px',
6787
+ },
6788
+ price: {
6789
+ ...textXSmallStyle,
6790
+ ...getMultilineEllipsis(2),
6791
+ margin: 0, // ua-style reset
6792
+ },
6793
+ description: {
6794
+ ...textXXSmallStyle,
6795
+ ...getMultilineEllipsis(2),
6796
+ margin: 0,
6797
+ color: contrastHighColor,
6798
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6799
+ color: contrastHighColorDark,
6800
+ }),
6795
6801
  },
6796
6802
  });
6797
6803
  };
@@ -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