@purpurds/alert-badge 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/alert-badge",
3
- "version": "5.11.0",
3
+ "version": "5.11.2",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/alert-badge.cjs.js",
6
6
  "types": "./dist/alert-badge.d.ts",
@@ -15,29 +15,29 @@
15
15
  "source": "src/alert-badge.tsx",
16
16
  "dependencies": {
17
17
  "classnames": "~2.5.0",
18
- "@purpurds/tokens": "5.11.0"
18
+ "@purpurds/tokens": "5.11.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@rushstack/eslint-patch": "~1.10.0",
22
- "@storybook/blocks": "~7.6.0",
23
- "@storybook/react": "~7.6.0",
22
+ "@storybook/react": "^8.2.6",
23
+ "storybook": "^8.2.6",
24
24
  "@telia/base-rig": "~8.2.0",
25
25
  "@telia/react-rig": "~3.2.0",
26
26
  "@testing-library/dom": "~9.3.3",
27
27
  "@testing-library/jest-dom": "~6.4.0",
28
28
  "@testing-library/react": "~14.3.0",
29
29
  "@types/node": "20.12.12",
30
- "@types/react-dom": "~18.3.0",
31
- "@types/react": "~18.3.0",
30
+ "@types/react-dom": "^18.3.0",
31
+ "@types/react": "^18.3.3",
32
32
  "eslint-plugin-testing-library": "~6.2.0",
33
- "eslint": "~8.57.0",
33
+ "eslint": "^8.57.0",
34
34
  "jsdom": "~22.1.0",
35
35
  "lint-staged": "~10.5.3",
36
36
  "prettier": "~2.8.8",
37
- "react-dom": "~18.3.0",
38
- "react": "~18.3.0",
39
- "typescript": "~5.4.2",
40
- "vite": "~5.2.2",
37
+ "react-dom": "^18.3.1",
38
+ "react": "^18.3.1",
39
+ "typescript": "^5.5.4",
40
+ "vite": "5.3.4",
41
41
  "vitest": "~1.5.0",
42
42
  "@purpurds/component-rig": "1.0.0"
43
43
  },
@@ -1,16 +1,10 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react";
2
2
 
3
- import { ALERT_BADGE_VARIANT, AlertBadge } from "./alert-badge";
3
+ import { ALERT_BADGE_VARIANT, AlertBadge, alertBadgeVariants } from "./alert-badge";
4
4
 
5
- const meta: Meta<typeof AlertBadge> = {
5
+ const meta = {
6
6
  title: "Components/AlertBadge",
7
7
  component: AlertBadge,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof AlertBadge>;
12
-
13
- export const Showcase: Story = {
14
8
  args: {
15
9
  variant: ALERT_BADGE_VARIANT.SUCCESS,
16
10
  },
@@ -23,4 +17,20 @@ export const Showcase: Story = {
23
17
  },
24
18
  ],
25
19
  },
26
- };
20
+ argTypes: {
21
+ variant: {
22
+ control: "select",
23
+ options: alertBadgeVariants,
24
+ table: {
25
+ type: {
26
+ summary: alertBadgeVariants.map((x) => `"${x}"`).join(" | "),
27
+ },
28
+ },
29
+ },
30
+ },
31
+ } satisfies Meta<typeof AlertBadge>;
32
+
33
+ export default meta;
34
+ type Story = StoryObj<typeof AlertBadge>;
35
+
36
+ export const Showcase: Story = {};
package/readme.mdx DELETED
@@ -1,44 +0,0 @@
1
- import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
2
-
3
- import * as AlertBadgeStories from "./src/alert-badge.stories";
4
- import packageInfo from "./package.json";
5
-
6
- <Meta name="Docs" title="Components/AlertBadge" of={AlertBadgeStories} />
7
-
8
- # AlertBadge
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 { AlertBadge } from "@purpurds/purpur";
36
-
37
- export const MyComponent = () => {
38
- return (
39
- <div>
40
- <AlertBadge {...someProps}>Some content</AlertBadge>
41
- </div>
42
- );
43
- };
44
- ```