@purpurds/promotion-card 5.11.0 → 5.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/promotion-card",
3
- "version": "5.11.0",
3
+ "version": "5.11.2",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/promotion-card.cjs.js",
6
6
  "types": "./dist/promotion-card.d.ts",
@@ -16,39 +16,39 @@
16
16
  "source": "src/promotion-card.tsx",
17
17
  "dependencies": {
18
18
  "classnames": "~2.5.0",
19
- "@purpurds/badge": "5.11.0",
20
- "@purpurds/icon": "5.11.0",
21
- "@purpurds/tokens": "5.11.0",
22
- "@purpurds/card": "5.11.0",
23
- "@purpurds/heading": "5.11.0"
19
+ "@purpurds/badge": "5.11.2",
20
+ "@purpurds/card": "5.11.2",
21
+ "@purpurds/heading": "5.11.2",
22
+ "@purpurds/tokens": "5.11.2",
23
+ "@purpurds/icon": "5.11.2"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@rushstack/eslint-patch": "~1.10.0",
27
- "@storybook/blocks": "~7.6.0",
28
- "@storybook/react": "~7.6.0",
27
+ "@storybook/react": "^8.2.6",
28
+ "storybook": "^8.2.6",
29
29
  "@telia/base-rig": "~8.2.0",
30
30
  "@telia/react-rig": "~3.2.0",
31
31
  "@testing-library/dom": "~9.3.3",
32
32
  "@testing-library/jest-dom": "~6.4.0",
33
33
  "@testing-library/react": "~14.3.0",
34
34
  "@types/node": "20.12.12",
35
- "@types/react-dom": "~18.3.0",
36
- "@types/react": "~18.3.0",
35
+ "@types/react-dom": "^18.3.0",
36
+ "@types/react": "^18.3.3",
37
37
  "eslint-plugin-testing-library": "~6.2.0",
38
- "eslint": "~8.57.0",
38
+ "eslint": "^8.57.0",
39
39
  "jsdom": "~22.1.0",
40
40
  "lint-staged": "~10.5.3",
41
41
  "prettier": "~2.8.8",
42
- "react-dom": "~18.3.0",
43
- "react": "~18.3.0",
44
- "typescript": "~5.4.2",
45
- "vite": "~5.2.2",
42
+ "react-dom": "^18.3.1",
43
+ "react": "^18.3.1",
44
+ "typescript": "^5.5.4",
45
+ "vite": "5.3.4",
46
46
  "vitest": "~1.5.0",
47
47
  "@purpurds/component-rig": "1.0.0",
48
- "@purpurds/cta-link": "5.11.0",
49
- "@purpurds/text-spacing": "5.11.0",
50
- "@purpurds/paragraph": "5.11.0",
51
- "@purpurds/grid": "5.11.0"
48
+ "@purpurds/cta-link": "5.11.2",
49
+ "@purpurds/paragraph": "5.11.2",
50
+ "@purpurds/text-spacing": "5.11.2",
51
+ "@purpurds/grid": "5.11.2"
52
52
  },
53
53
  "scripts": {
54
54
  "build:dev": "vite",
@@ -136,7 +136,6 @@
136
136
 
137
137
  &--decorative,
138
138
  &--product {
139
-
140
139
  picture,
141
140
  img {
142
141
  display: block;
@@ -179,4 +178,4 @@
179
178
  width: auto;
180
179
  }
181
180
  }
182
- }
181
+ }
@@ -2,6 +2,7 @@
2
2
  import React from "react";
3
3
  import { CtaLink } from "@purpurds/cta-link";
4
4
  import { Grid } from "@purpurds/grid";
5
+ import { HeadingTag, TitleVariant } from "@purpurds/heading";
5
6
  import { IconCheckmark, IconOffering } from "@purpurds/icon";
6
7
  import { Paragraph } from "@purpurds/paragraph";
7
8
  import type { Meta, StoryObj } from "@storybook/react";
@@ -15,7 +16,7 @@ import "@purpurds/icon/styles";
15
16
  import "@purpurds/paragraph/styles";
16
17
  import { PromotionCard, PromotionCardVariant, promotionCardVariants } from "./promotion-card";
17
18
 
18
- const meta: Meta<typeof PromotionCard> = {
19
+ const meta = {
19
20
  title: "Components/PromotionCard",
20
21
  component: PromotionCard,
21
22
  parameters: {
@@ -28,9 +29,35 @@ const meta: Meta<typeof PromotionCard> = {
28
29
  ],
29
30
  },
30
31
  argTypes: {
31
- variant: { control: "select", options: promotionCardVariants },
32
+ variant: {
33
+ control: "select",
34
+ options: promotionCardVariants,
35
+ table: { type: { summary: promotionCardVariants.map((x) => `"${x}"`).join(" | ") } },
36
+ },
37
+ titleTag: {
38
+ control: "select",
39
+ options: Object.values(HeadingTag),
40
+ table: {
41
+ type: {
42
+ summary: Object.values(HeadingTag)
43
+ .map((x) => `"${x}"`)
44
+ .join(" | "),
45
+ },
46
+ },
47
+ },
48
+ titleVariant: {
49
+ control: "select",
50
+ options: Object.values(TitleVariant),
51
+ table: {
52
+ type: {
53
+ summary: Object.values(TitleVariant)
54
+ .map((x) => `"${x}"`)
55
+ .join(" | "),
56
+ },
57
+ },
58
+ },
32
59
  },
33
- };
60
+ } satisfies Meta<typeof PromotionCard>;
34
61
 
35
62
  export default meta;
36
63
  type Story = StoryObj<typeof PromotionCard>;
package/readme.mdx DELETED
@@ -1,60 +0,0 @@
1
- import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
2
-
3
- import * as PromotionCardStories from "./src/promotion-card.stories";
4
- import packageInfo from "./package.json";
5
-
6
- <Meta name="Docs" title="Components/PromotionCard" of={PromotionCardStories} />
7
-
8
- # PromotionCard
9
-
10
- <Subtitle>Version {packageInfo.version}</Subtitle>
11
-
12
- ### Showcase
13
-
14
- <Primary />
15
-
16
- ### Properties
17
-
18
- <ArgTypes />
19
-
20
- ### Installation
21
-
22
- #### Via NPM
23
-
24
- Add the dependency to your consumer app like `"@purpurds/purpur": "^x.y.z"`
25
-
26
- In MyApp.tsx
27
-
28
- ```tsx
29
- import "@purpurds/purpur/styles";
30
- ```
31
-
32
- In MyComponent.tsx
33
-
34
- ```tsx
35
- import { PromotionCard } from "@purpurds/purpur";
36
-
37
- export const MyComponent = () => {
38
- return (
39
- <PromotionCard
40
- variant="primary"
41
- badgeText="Buy now"
42
- badgeIcon={<IconOffering size="sm" />}
43
- title="Promotion title"
44
- hasGradient
45
- decorativeImage={
46
- <img
47
- src="https://www.telia.se/images/i15skfqwpurk/5YYelnwdIJGush05RYsE6A/04d4eeb571bca6d5c72b557f6da92c92/Telia_Company_Reinvention_69.jpg?fit=scale&w=536&fm=jpg&q=70"
48
- alt="Lorem ipsum dolor sit amet consectetur adipisicing elit"
49
- />
50
- }
51
- >
52
- <Paragraph>
53
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Excepturi corporis amet
54
- exercitationem atque consequuntur.
55
- </Paragraph>
56
- <Button variant="primary">Ask us</Button>
57
- </PromotionCard>
58
- );
59
- };
60
- ```