@purpurds/promotion-card 7.11.0 → 7.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/dist/LICENSE.txt +4 -4
- package/dist/promotion-card.cjs.js +13 -13
- package/dist/promotion-card.cjs.js.map +1 -1
- package/dist/promotion-card.d.ts +4 -4
- package/dist/promotion-card.d.ts.map +1 -1
- package/dist/promotion-card.es.js +320 -312
- package/dist/promotion-card.es.js.map +1 -1
- package/package.json +12 -12
- package/src/promotion-card.stories.tsx +9 -5
- package/src/promotion-card.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/promotion-card",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.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,15 +17,15 @@
|
|
|
17
17
|
"source": "src/promotion-card.tsx",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"classnames": "~2.5.0",
|
|
20
|
-
"@purpurds/
|
|
21
|
-
"@purpurds/
|
|
22
|
-
"@purpurds/common-types": "7.
|
|
23
|
-
"@purpurds/
|
|
24
|
-
"@purpurds/cta-link": "7.
|
|
25
|
-
"@purpurds/heading": "7.
|
|
26
|
-
"@purpurds/
|
|
27
|
-
"@purpurds/
|
|
28
|
-
"@purpurds/tokens": "7.
|
|
20
|
+
"@purpurds/button": "7.13.0",
|
|
21
|
+
"@purpurds/card": "7.13.0",
|
|
22
|
+
"@purpurds/common-types": "7.13.0",
|
|
23
|
+
"@purpurds/badge": "7.13.0",
|
|
24
|
+
"@purpurds/cta-link": "7.13.0",
|
|
25
|
+
"@purpurds/heading": "7.13.0",
|
|
26
|
+
"@purpurds/paragraph": "7.13.0",
|
|
27
|
+
"@purpurds/icon": "7.13.0",
|
|
28
|
+
"@purpurds/tokens": "7.13.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@storybook/react-vite": "^9.0.18",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"vite": "^6.2.1",
|
|
47
47
|
"vitest": "^3.1.2",
|
|
48
48
|
"@purpurds/component-rig": "1.0.0",
|
|
49
|
-
"@purpurds/
|
|
50
|
-
"@purpurds/
|
|
49
|
+
"@purpurds/text-spacing": "7.13.0",
|
|
50
|
+
"@purpurds/grid": "7.13.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@types/react": "^18 || ^19",
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Button } from "@purpurds/button";
|
|
3
3
|
import { CtaLink } from "@purpurds/cta-link";
|
|
4
4
|
import { Grid } from "@purpurds/grid";
|
|
5
|
-
import { HeadingTag, TitleVariant } from "@purpurds/heading";
|
|
5
|
+
import { DisplayVariant, HeadingTag, TitleVariant } from "@purpurds/heading";
|
|
6
6
|
import { IconCheckmark } from "@purpurds/icon/checkmark";
|
|
7
7
|
import { IconOffering } from "@purpurds/icon/offering";
|
|
8
8
|
import { Paragraph } from "@purpurds/paragraph";
|
|
@@ -19,6 +19,8 @@ import "@purpurds/icon/styles";
|
|
|
19
19
|
import "@purpurds/paragraph/styles";
|
|
20
20
|
import { PromotionCard, type PromotionCardVariant, promotionCardVariants } from "./promotion-card";
|
|
21
21
|
|
|
22
|
+
const headingVariants = [...Object.values(TitleVariant), ...Object.values(DisplayVariant)];
|
|
23
|
+
|
|
22
24
|
const meta = {
|
|
23
25
|
title: "Layout and Structure/PromotionCard",
|
|
24
26
|
component: PromotionCard,
|
|
@@ -58,12 +60,10 @@ const meta = {
|
|
|
58
60
|
},
|
|
59
61
|
titleVariant: {
|
|
60
62
|
control: "select",
|
|
61
|
-
options:
|
|
63
|
+
options: headingVariants,
|
|
62
64
|
table: {
|
|
63
65
|
type: {
|
|
64
|
-
summary:
|
|
65
|
-
.map((x) => `"${x}"`)
|
|
66
|
-
.join(" | "),
|
|
66
|
+
summary: headingVariants.map((x) => `"${x}"`).join(" | "),
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
},
|
|
@@ -76,6 +76,10 @@ const meta = {
|
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
|
+
actions: { control: false },
|
|
80
|
+
badgeIcon: { control: false },
|
|
81
|
+
decorativeImage: { control: false },
|
|
82
|
+
productImage: { control: false },
|
|
79
83
|
},
|
|
80
84
|
} satisfies Meta<typeof PromotionCard>;
|
|
81
85
|
|
package/src/promotion-card.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React, { forwardRef, type ReactNode } from "react";
|
|
|
2
2
|
import { Badge } from "@purpurds/badge";
|
|
3
3
|
import { Card } from "@purpurds/card";
|
|
4
4
|
import type { BaseProps } from "@purpurds/common-types";
|
|
5
|
-
import { Heading, type HeadingTagType,
|
|
5
|
+
import { Heading, type HeadingTagType,type HeadingVariant } from "@purpurds/heading";
|
|
6
6
|
import { Paragraph } from "@purpurds/paragraph";
|
|
7
7
|
import c from "classnames/bind";
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ export type PromotionCardProps = Omit<BaseProps, "children"> & {
|
|
|
39
39
|
variant?: PromotionCardVariant;
|
|
40
40
|
title: string;
|
|
41
41
|
titleTag?: HeadingTagType;
|
|
42
|
-
titleVariant?:
|
|
42
|
+
titleVariant?: HeadingVariant;
|
|
43
43
|
enableTitleHyphenation?: boolean;
|
|
44
44
|
badgeText?: string;
|
|
45
45
|
badgeIcon?: ReactNode;
|