@purpurds/notification 5.10.1 → 5.11.1

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/notification",
3
- "version": "5.10.1",
3
+ "version": "5.11.1",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/notification.cjs.js",
6
6
  "types": "./dist/notification.d.ts",
@@ -15,34 +15,34 @@
15
15
  "source": "src/notification.tsx",
16
16
  "dependencies": {
17
17
  "classnames": "~2.5.0",
18
- "@purpurds/button": "5.10.1",
19
- "@purpurds/icon": "5.10.1",
20
- "@purpurds/tokens": "5.10.1",
21
- "@purpurds/heading": "5.10.1",
22
- "@purpurds/paragraph": "5.10.1"
18
+ "@purpurds/button": "5.11.1",
19
+ "@purpurds/heading": "5.11.1",
20
+ "@purpurds/paragraph": "5.11.1",
21
+ "@purpurds/tokens": "5.11.1",
22
+ "@purpurds/icon": "5.11.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@rushstack/eslint-patch": "~1.10.0",
26
- "@storybook/blocks": "~7.6.0",
27
- "@storybook/client-api": "~7.6.0",
28
- "@storybook/react": "~7.6.0",
26
+ "@storybook/preview-api": "^8.2.6",
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
48
  },
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { Button } from "@purpurds/button";
3
- import { useArgs } from "@storybook/client-api";
3
+ import { HeadingTag } from "@purpurds/heading";
4
+ import { useArgs } from "@storybook/preview-api";
4
5
  import type { Meta, StoryObj } from "@storybook/react";
5
6
 
6
7
  import "@purpurds/icon/styles";
@@ -14,16 +15,9 @@ import {
14
15
  notificationStatuses,
15
16
  } from "./notification";
16
17
 
17
- const meta: Meta<typeof Notification> = {
18
+ const meta = {
18
19
  title: "Components/Notification",
19
20
  component: Notification,
20
- };
21
-
22
- export default meta;
23
- type Story = StoryObj<typeof Notification>;
24
-
25
- export const NotificationWithoutCloseButton: Story = {
26
- name: "Notification without close button",
27
21
  parameters: {
28
22
  design: [
29
23
  {
@@ -35,15 +29,44 @@ export const NotificationWithoutCloseButton: Story = {
35
29
  },
36
30
  argTypes: {
37
31
  status: {
38
- options: [undefined, ...notificationStatuses],
32
+ table: { type: { summary: notificationStatuses.map((x) => `"${x}"`).join(" | ") } },
33
+ },
34
+ ["aria-live"]: {
35
+ table: { type: { summary: notificationAriaLiveValues.map((x) => `"${x}"`).join(" | ") } },
36
+ },
37
+ role: {
38
+ table: { type: { summary: notificationRoles.map((x) => `"${x}"`).join(" | ") } },
39
+ },
40
+ headingTag: {
41
+ control: "select",
42
+ options: Object.values(HeadingTag),
43
+ table: {
44
+ type: {
45
+ summary: Object.values(HeadingTag)
46
+ .map((x) => `"${x}"`)
47
+ .join(" | "),
48
+ },
49
+ },
50
+ },
51
+ },
52
+ } satisfies Meta<typeof Notification>;
53
+
54
+ export default meta;
55
+ type Story = StoryObj<typeof Notification>;
56
+
57
+ export const NotificationWithoutCloseButton: Story = {
58
+ name: "Notification without close button",
59
+ argTypes: {
60
+ status: {
61
+ options: notificationStatuses,
39
62
  control: "select",
40
63
  },
41
64
  ["aria-live"]: {
42
- options: [undefined, ...notificationAriaLiveValues],
65
+ options: notificationAriaLiveValues,
43
66
  control: "select",
44
67
  },
45
68
  role: {
46
- options: [undefined, ...notificationRoles],
69
+ options: notificationRoles,
47
70
  control: "select",
48
71
  },
49
72
  },
package/readme.mdx DELETED
@@ -1,44 +0,0 @@
1
- import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
2
-
3
- import * as NotificationStories from "./src/notification.stories";
4
- import packageInfo from "./package.json";
5
-
6
- <Meta name="Docs" title="Components/Notification" of={NotificationStories} />
7
-
8
- # Notification
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 { Notification } from "@purpurds/purpur";
36
-
37
- export const MyComponent = () => {
38
- return (
39
- <div>
40
- <Notification {...someProps}>Some content</Notification>
41
- </div>
42
- );
43
- };
44
- ```