@purpurds/promotion-card 8.12.2 → 8.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/promotion-card",
3
- "version": "8.12.2",
3
+ "version": "8.13.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/promotion-card.cjs.js",
6
6
  "types": "./dist/promotion-card.d.ts",
@@ -17,41 +17,41 @@
17
17
  "source": "src/promotion-card.tsx",
18
18
  "dependencies": {
19
19
  "classnames": "~2.5.1",
20
- "@purpurds/badge": "8.12.2",
21
- "@purpurds/button": "8.12.2",
22
- "@purpurds/common-types": "8.12.2",
23
- "@purpurds/card": "8.12.2",
24
- "@purpurds/cta-link": "8.12.2",
25
- "@purpurds/heading": "8.12.2",
26
- "@purpurds/icon": "8.12.2",
27
- "@purpurds/paragraph": "8.12.2",
28
- "@purpurds/tokens": "8.12.2"
20
+ "@purpurds/badge": "8.13.0",
21
+ "@purpurds/card": "8.13.0",
22
+ "@purpurds/common-types": "8.13.0",
23
+ "@purpurds/button": "8.13.0",
24
+ "@purpurds/cta-link": "8.13.0",
25
+ "@purpurds/icon": "8.13.0",
26
+ "@purpurds/heading": "8.13.0",
27
+ "@purpurds/paragraph": "8.13.0",
28
+ "@purpurds/tokens": "8.13.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@storybook/react-vite": "^10.0.8",
31
+ "@storybook/react-vite": "10.1.11",
32
32
  "@testing-library/dom": "~10.4.1",
33
33
  "@testing-library/jest-dom": "~6.9.1",
34
34
  "@testing-library/react": "~16.3.0",
35
35
  "@types/node": "22.17",
36
36
  "@types/react-dom": "^19.2.3",
37
37
  "@types/react": "^19.2.6",
38
- "eslint": "9.39.1",
38
+ "eslint": "9.39.2",
39
39
  "jsdom": "~27.2.0",
40
40
  "lint-staged": "16.2.6",
41
41
  "prettier": "~2.8.8",
42
42
  "react-dom": "^19.2.1",
43
43
  "react": "^19.2.1",
44
- "storybook": "^10.0.8",
44
+ "storybook": "10.1.11",
45
45
  "typescript": "^5.9.3",
46
46
  "vite": "^7.2.2",
47
47
  "vitest": "^4.0.10",
48
48
  "@purpurds/component-rig": "1.0.0",
49
- "@purpurds/text-spacing": "8.12.2",
50
- "@purpurds/theme": "8.12.2",
51
- "@purpurds/grid": "8.12.2"
49
+ "@purpurds/grid": "8.13.0",
50
+ "@purpurds/text-spacing": "8.13.0",
51
+ "@purpurds/theme": "8.13.0"
52
52
  },
53
53
  "peerDependencies": {
54
- "@purpurds/theme": "8.12.2",
54
+ "@purpurds/theme": "8.13.0",
55
55
  "@types/react": "^18 || ^19",
56
56
  "@types/react-dom": "^18 || ^19",
57
57
  "react": "^18 || ^19",
@@ -44,11 +44,18 @@ export type PromotionCardProductImage = { productImage?: ReactNode };
44
44
 
45
45
  export type PromotionCardProps = Omit<BaseProps, "children"> & {
46
46
  variant?: PromotionCardVariant;
47
+ beforeTitle?: ReactNode;
47
48
  title: string;
48
49
  titleTag?: HeadingTagType;
49
50
  titleVariant?: HeadingVariant;
50
51
  enableTitleHyphenation?: boolean;
52
+ /**
53
+ * @deprecated Use beforeTitle instead
54
+ */
51
55
  badgeText?: string;
56
+ /**
57
+ * @deprecated Use beforeTitle instead
58
+ */
52
59
  badgeIcon?: ReactNode;
53
60
  actions?: ReactNode;
54
61
  children: ReactNode;
@@ -71,6 +78,7 @@ export const PromotionCard = forwardRef<HTMLDivElement, PromotionCardProps>(
71
78
  variant = "primary",
72
79
  badgeText,
73
80
  badgeIcon,
81
+ beforeTitle,
74
82
  title,
75
83
  titleTag = "h2",
76
84
  titleVariant = "title-300",
@@ -164,6 +172,7 @@ export const PromotionCard = forwardRef<HTMLDivElement, PromotionCardProps>(
164
172
  `${rootClassName}__main-content--${alignment}`
165
173
  )}
166
174
  >
175
+ {beforeTitle}
167
176
  <Heading
168
177
  tag={titleTag}
169
178
  variant={titleVariant}