@purpurds/spinner 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 +11 -11
- package/src/spinner.stories.tsx +10 -2
- package/readme.mdx +0 -44
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/spinner",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.1",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/spinner.cjs.js",
|
|
6
6
|
"types": "./dist/spinner.d.ts",
|
|
@@ -15,29 +15,29 @@
|
|
|
15
15
|
"source": "src/spinner.tsx",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"classnames": "~2.5.0",
|
|
18
|
-
"@purpurds/tokens": "5.
|
|
18
|
+
"@purpurds/tokens": "5.11.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@rushstack/eslint-patch": "~1.10.0",
|
|
22
|
-
"@storybook/
|
|
23
|
-
"
|
|
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": "
|
|
31
|
-
"@types/react": "
|
|
30
|
+
"@types/react-dom": "^18.3.0",
|
|
31
|
+
"@types/react": "^18.3.3",
|
|
32
32
|
"eslint-plugin-testing-library": "~6.2.0",
|
|
33
|
-
"eslint": "
|
|
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": "
|
|
38
|
-
"react": "
|
|
39
|
-
"typescript": "
|
|
40
|
-
"vite": "
|
|
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
|
},
|
package/src/spinner.stories.tsx
CHANGED
|
@@ -9,7 +9,7 @@ const adaptiveBackground = (negative?: boolean) => ({
|
|
|
9
9
|
background: negative ? "var(--purpur-color-purple-900)" : "transparent",
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
const meta
|
|
12
|
+
const meta = {
|
|
13
13
|
title: "Components/Spinner",
|
|
14
14
|
component: Spinner,
|
|
15
15
|
parameters: {
|
|
@@ -20,15 +20,23 @@ const meta: Meta<typeof Spinner> = {
|
|
|
20
20
|
url: "https://www.figma.com/file/XEaIIFskrrxIBHMZDkIuIg/Purpur-DS---Component-Library?type=design&node-id=18542%3A11852&mode=design&t=xlTz4vnzzpyUopLt-1",
|
|
21
21
|
},
|
|
22
22
|
],
|
|
23
|
+
docs: {
|
|
24
|
+
description: {
|
|
25
|
+
component:
|
|
26
|
+
"The user of this stepper has to provide a handler for when a step has been clicked. This handler will be called with the index of the step. The consumer then has to set which step is current and send it back to the Stepper. The Stepper also takes two labels. The scrollButtonLabels is for explaining the scroll buttons that are visible when there is horizontal overflow when displaying the steps to screen readers. The completedStepLabel is for screen readers to read that a step is completed, the label is prepended to the step label.",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
23
29
|
},
|
|
24
30
|
argTypes: {
|
|
25
31
|
size: {
|
|
26
32
|
options: spinnerSizes,
|
|
27
33
|
control: { type: "select" },
|
|
34
|
+
table: { type: { summary: spinnerSizes.map((x) => `"${x}"`).join(" | ") } },
|
|
28
35
|
},
|
|
29
36
|
},
|
|
30
37
|
args: { negative: false, disabled: false },
|
|
31
|
-
}
|
|
38
|
+
} satisfies Meta<typeof Spinner>;
|
|
39
|
+
|
|
32
40
|
export default meta;
|
|
33
41
|
|
|
34
42
|
type Story = StoryObj<typeof Spinner>;
|
package/readme.mdx
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
|
|
2
|
-
|
|
3
|
-
import * as SpinnerStories from "./src/spinner.stories";
|
|
4
|
-
import packageInfo from "./package.json";
|
|
5
|
-
|
|
6
|
-
<Meta name="Docs" title="Components/Spinner" of={SpinnerStories} />
|
|
7
|
-
|
|
8
|
-
# Spinner
|
|
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 { Spinner } from "@purpurds/purpur";
|
|
36
|
-
|
|
37
|
-
export const MyComponent = () => {
|
|
38
|
-
return (
|
|
39
|
-
<div>
|
|
40
|
-
<Spinner {...someProps}>Some content</Spinner>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
```
|