@purpurds/promotion-card 5.8.2 → 5.9.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/dist/LICENSE.txt +3 -3
- package/dist/promotion-card.cjs.js +11 -11
- package/dist/promotion-card.cjs.js.map +1 -1
- package/dist/promotion-card.d.ts +2 -1
- package/dist/promotion-card.d.ts.map +1 -1
- package/dist/promotion-card.es.js +336 -343
- package/dist/promotion-card.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +10 -10
- package/src/promotion-card.module.scss +1 -5
- package/src/promotion-card.tsx +4 -5
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._purpur-promotion-
|
|
1
|
+
._purpur-promotion-card_hmb27_1{position:relative;width:100%;height:100%;color:var(--promotion-card-color);box-sizing:border-box}._purpur-promotion-card--without-image_hmb27_8:before{content:"";position:absolute;z-index:-1;width:100%;height:100%;background:var(--promotion-card-background-image) right 50% center;background-size:cover;transform:rotateY(180deg)}@container promotion-card (min-width: 600px){._purpur-promotion-card--without-image_hmb27_8:before{background-position:center center}}@container promotion-card (min-width: 1024px){._purpur-promotion-card--without-image_hmb27_8:before{transform:rotateY(0)}}._purpur-promotion-card--with-image_hmb27_28{display:grid;grid-template-areas:"image" "body";grid-template-rows:auto 1fr;background:var(--promotion-card-background)}@container promotion-card (min-width: 600px){._purpur-promotion-card--with-image_hmb27_28{grid-template-areas:"body image";grid-template-columns:repeat(2,1fr)}}._purpur-promotion-card__card_hmb27_40{container:promotion-card/inline-size;height:100%}._purpur-promotion-card__image-gradient_hmb27_44{position:absolute;bottom:0;width:100%;height:100%;background:linear-gradient(0,var(--promotion-card-background),transparent 75%)}@container promotion-card (min-width: 600px){._purpur-promotion-card__image-gradient_hmb27_44{left:0;top:0;width:100%;height:100%;background:linear-gradient(90deg,var(--promotion-card-background),transparent 75%)}}._purpur-promotion-card__content_hmb27_60{grid-area:body;display:flex;flex-direction:column;justify-content:flex-end;height:100%;padding:var(--purpur-spacing-400);box-sizing:border-box}@container promotion-card (min-width: 1024px){._purpur-promotion-card__content--without-image_hmb27_70{padding:var(--purpur-spacing-600)}._purpur-promotion-card__content--without-image_hmb27_70 ._purpur-promotion-card__main-content_hmb27_73{display:flex;gap:var(--purpur-spacing-300)}._purpur-promotion-card__content--without-image_hmb27_70 ._purpur-promotion-card__heading_hmb27_77{width:100%}}@container promotion-card (min-width: 600px){._purpur-promotion-card__content--with-image_hmb27_82{flex-direction:column;justify-content:center;padding:var(--purpur-spacing-600) var(--purpur-spacing-400)}}@container promotion-card (min-width: 1024px){._purpur-promotion-card__content--with-image_hmb27_82{padding:var(--purpur-spacing-1200) var(--purpur-spacing-600)}}._purpur-promotion-card__badge-wrapper_hmb27_93{width:100%;padding-bottom:var(--purpur-spacing-200)}._purpur-promotion-card__heading_hmb27_77,._purpur-promotion-card__body_hmb27_97{width:100%}._purpur-promotion-card__heading_hmb27_77{margin-bottom:var(--purpur-spacing-150);color:var(--promotion-card-color)}._purpur-promotion-card__body_hmb27_97{display:flex;flex-direction:column}._purpur-promotion-card__body_hmb27_97,._purpur-promotion-card__body_hmb27_97 p,._purpur-promotion-card__body_hmb27_97 h1,._purpur-promotion-card__body_hmb27_97 h2,._purpur-promotion-card__body_hmb27_97 h3,._purpur-promotion-card__body_hmb27_97 h4,._purpur-promotion-card__body_hmb27_97 h5,._purpur-promotion-card__body_hmb27_97 h6,._purpur-promotion-card__body_hmb27_97 ul,._purpur-promotion-card__body_hmb27_97 ol{color:var(--promotion-card-color)}._purpur-promotion-card__image-wrapper_hmb27_120{grid-area:image}._purpur-promotion-card__image-wrapper--decorative_hmb27_123 picture,._purpur-promotion-card__image-wrapper--decorative_hmb27_123 img,._purpur-promotion-card__image-wrapper--product_hmb27_124 picture,._purpur-promotion-card__image-wrapper--product_hmb27_124 img{display:block;width:100%;height:auto}._purpur-promotion-card__image-wrapper--decorative_hmb27_123 img,._purpur-promotion-card__image-wrapper--product_hmb27_124 img{object-fit:cover}._purpur-promotion-card__image-wrapper--decorative_hmb27_123{position:relative;width:100%;aspect-ratio:3/2}@container promotion-card (min-width: 600px){._purpur-promotion-card__image-wrapper--decorative_hmb27_123{aspect-ratio:unset}._purpur-promotion-card__image-wrapper--decorative_hmb27_123 img{height:100%}}._purpur-promotion-card__image-wrapper--product_hmb27_124{display:flex;justify-content:center;align-items:center;padding:var(--purpur-spacing-400)}._purpur-promotion-card_hmb27_1 [class*=_purpur-cta-link_],._purpur-promotion-card_hmb27_1 [class*=_purpur-button_]{width:100%}@container promotion-card (min-width: 600px){._purpur-promotion-card_hmb27_1 [class*=_purpur-cta-link_],._purpur-promotion-card_hmb27_1 [class*=_purpur-button_]{width:auto}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/promotion-card",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/promotion-card.cjs.js",
|
|
6
6
|
"types": "./dist/promotion-card.d.ts",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"source": "src/promotion-card.tsx",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"classnames": "~2.5.0",
|
|
19
|
-
"@purpurds/badge": "5.
|
|
20
|
-
"@purpurds/
|
|
21
|
-
"@purpurds/
|
|
22
|
-
"@purpurds/
|
|
23
|
-
"@purpurds/tokens": "5.
|
|
19
|
+
"@purpurds/badge": "5.9.0",
|
|
20
|
+
"@purpurds/card": "5.9.0",
|
|
21
|
+
"@purpurds/icon": "5.9.0",
|
|
22
|
+
"@purpurds/heading": "5.9.0",
|
|
23
|
+
"@purpurds/tokens": "5.9.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@rushstack/eslint-patch": "~1.10.0",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"vite": "~5.2.2",
|
|
46
46
|
"vitest": "~1.5.0",
|
|
47
47
|
"@purpurds/component-rig": "1.0.0",
|
|
48
|
-
"@purpurds/cta-link": "5.
|
|
49
|
-
"@purpurds/
|
|
50
|
-
"@purpurds/
|
|
51
|
-
"@purpurds/
|
|
48
|
+
"@purpurds/cta-link": "5.9.0",
|
|
49
|
+
"@purpurds/text-spacing": "5.9.0",
|
|
50
|
+
"@purpurds/grid": "5.9.0",
|
|
51
|
+
"@purpurds/paragraph": "5.9.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build:dev": "vite",
|
package/src/promotion-card.tsx
CHANGED
|
@@ -39,6 +39,7 @@ export type PromotionCardProps = {
|
|
|
39
39
|
title: string;
|
|
40
40
|
titleTag?: HeadingTagType;
|
|
41
41
|
titleVariant?: TitleVariantType;
|
|
42
|
+
enableTitleHyphenation?: boolean;
|
|
42
43
|
badgeText?: string;
|
|
43
44
|
badgeIcon?: ReactNode;
|
|
44
45
|
className?: string;
|
|
@@ -56,6 +57,7 @@ export const PromotionCard = ({
|
|
|
56
57
|
title,
|
|
57
58
|
titleTag = "h2",
|
|
58
59
|
titleVariant = "title-300",
|
|
60
|
+
enableTitleHyphenation = true,
|
|
59
61
|
className,
|
|
60
62
|
children,
|
|
61
63
|
style,
|
|
@@ -88,10 +90,7 @@ export const PromotionCard = ({
|
|
|
88
90
|
} as React.CSSProperties;
|
|
89
91
|
|
|
90
92
|
return (
|
|
91
|
-
<Card
|
|
92
|
-
className={cx(`${rootClassName}__card`)}
|
|
93
|
-
containerClassName={cx(`${rootClassName}__card-container`)}
|
|
94
|
-
>
|
|
93
|
+
<Card className={cx(`${rootClassName}__card`)}>
|
|
95
94
|
<div
|
|
96
95
|
data-testid={dataTestid}
|
|
97
96
|
style={{
|
|
@@ -131,7 +130,7 @@ export const PromotionCard = ({
|
|
|
131
130
|
<Heading
|
|
132
131
|
tag={titleTag}
|
|
133
132
|
variant={titleVariant}
|
|
134
|
-
enableHyphenation
|
|
133
|
+
enableHyphenation={enableTitleHyphenation}
|
|
135
134
|
className={cx(`${rootClassName}__heading`)}
|
|
136
135
|
>
|
|
137
136
|
{title}
|