adnbn-ui 0.0.2 → 0.1.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/README.md +1057 -0
- package/package.json +19 -3
- package/.prettierignore +0 -3
- package/.prettierrc +0 -28
- package/.storybook/main.ts +0 -22
- package/.storybook/preview.tsx +0 -100
- package/.storybook/styles/custom.scss +0 -59
- package/.storybook/styles/preview.css +0 -58
- package/.storybook/vitest.setup.ts +0 -9
- package/eslint.config.js +0 -39
- package/src/components/Avatar/Avatar.stories.tsx +0 -118
- package/src/components/Button/Button.stories.tsx +0 -148
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -180
- package/src/components/Drawer/Drawer.stories.tsx +0 -89
- package/src/components/Footer/Footer.stories.tsx +0 -118
- package/src/components/Header/Header.stories.tsx +0 -49
- package/src/components/Highlight/Highlight.stories.tsx +0 -83
- package/src/components/IconButton/IconButton.stories.tsx +0 -179
- package/src/components/Layout/Layout.stories.tsx +0 -88
- package/src/components/List/List.stories.tsx +0 -81
- package/src/components/Modal/Modal.stories.tsx +0 -95
- package/src/components/Odometer/Odometer.stories.tsx +0 -66
- package/src/components/ScrollArea/ScrollArea.stories.tsx +0 -58
- package/src/components/Switch/Switch.stories.tsx +0 -25
- package/src/components/Tag/Tag.stories.tsx +0 -157
- package/src/components/TextArea/TextArea.stories.tsx +0 -145
- package/src/components/TextField/TextField.stories.tsx +0 -177
- package/src/components/Toast/Toast.stories.tsx +0 -209
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -80
- package/src/components/View/View.stories.tsx +0 -47
- package/src/components/ViewDrawer/ViewDrawer.stories.tsx +0 -75
- package/src/components/ViewModal/ViewModal.stories.tsx +0 -68
- package/tsconfig.json +0 -18
- package/vite.config.ts +0 -11
- package/vitest.workspace.ts +0 -19
@@ -1,75 +0,0 @@
|
|
1
|
-
import {useState} from "react";
|
2
|
-
import {Meta} from "@storybook/react";
|
3
|
-
|
4
|
-
import {hideInTable} from "../../utils";
|
5
|
-
|
6
|
-
import {Button, DrawerSide} from "../index";
|
7
|
-
|
8
|
-
import ViewDrawerComponent, {ViewDrawerProps} from "./ViewDrawer";
|
9
|
-
|
10
|
-
const sides: DrawerSide[] = [DrawerSide.Left, DrawerSide.Top, DrawerSide.Bottom, DrawerSide.Right];
|
11
|
-
|
12
|
-
const meta: Meta<typeof ViewDrawerComponent> = {
|
13
|
-
title: "Components/ViewDrawer",
|
14
|
-
component: ViewDrawerComponent,
|
15
|
-
tags: ["autodocs"],
|
16
|
-
argTypes: {
|
17
|
-
side: {
|
18
|
-
options: sides,
|
19
|
-
control: {type: "select"},
|
20
|
-
},
|
21
|
-
title: {
|
22
|
-
type: "string",
|
23
|
-
},
|
24
|
-
subtitle: {
|
25
|
-
type: "string",
|
26
|
-
},
|
27
|
-
after: {
|
28
|
-
type: "string",
|
29
|
-
},
|
30
|
-
before: {
|
31
|
-
type: "string",
|
32
|
-
},
|
33
|
-
fullscreen: {
|
34
|
-
type: "boolean",
|
35
|
-
},
|
36
|
-
speed: {
|
37
|
-
type: "number",
|
38
|
-
},
|
39
|
-
children: hideInTable,
|
40
|
-
className: hideInTable,
|
41
|
-
wrapClassName: hideInTable,
|
42
|
-
titleClassName: hideInTable,
|
43
|
-
bodyClassName: hideInTable,
|
44
|
-
headerClassName: hideInTable,
|
45
|
-
beforeClassName: hideInTable,
|
46
|
-
afterClassName: hideInTable,
|
47
|
-
subtitleClassName: hideInTable,
|
48
|
-
childrenClassName: hideInTable,
|
49
|
-
},
|
50
|
-
};
|
51
|
-
|
52
|
-
export default meta;
|
53
|
-
|
54
|
-
export const ViewDrawer = (props: ViewDrawerProps) => {
|
55
|
-
const [open, setOpen] = useState(false);
|
56
|
-
return (
|
57
|
-
<div>
|
58
|
-
<Button onClick={() => setOpen(true)}>Open</Button>
|
59
|
-
<ViewDrawerComponent
|
60
|
-
open={open}
|
61
|
-
onOpenChange={setOpen}
|
62
|
-
title="Volume Up Plus"
|
63
|
-
side={DrawerSide.Right}
|
64
|
-
fullscreen={false}
|
65
|
-
subtitle="Adjust the current tab's volume with the slider. Switch to any audio tab in one click."
|
66
|
-
after="❤️"
|
67
|
-
{...props}
|
68
|
-
>
|
69
|
-
<Button style={{margin: "50px auto", maxWidth: "max-content"}} onClick={() => setOpen(false)}>
|
70
|
-
Close ViewDrawer
|
71
|
-
</Button>
|
72
|
-
</ViewDrawerComponent>
|
73
|
-
</div>
|
74
|
-
);
|
75
|
-
};
|
@@ -1,68 +0,0 @@
|
|
1
|
-
import {useState} from "react";
|
2
|
-
import {Meta} from "@storybook/react";
|
3
|
-
|
4
|
-
import {hideInTable} from "../../utils";
|
5
|
-
|
6
|
-
import {Button} from "../index";
|
7
|
-
|
8
|
-
import ViewModalComponent, {ViewModalProps} from "./ViewModal";
|
9
|
-
|
10
|
-
const meta: Meta<typeof ViewModalComponent> = {
|
11
|
-
title: "Components/ViewModal",
|
12
|
-
component: ViewModalComponent,
|
13
|
-
tags: ["autodocs"],
|
14
|
-
argTypes: {
|
15
|
-
title: {
|
16
|
-
type: "string",
|
17
|
-
},
|
18
|
-
subtitle: {
|
19
|
-
type: "string",
|
20
|
-
},
|
21
|
-
after: {
|
22
|
-
type: "string",
|
23
|
-
},
|
24
|
-
before: {
|
25
|
-
type: "string",
|
26
|
-
},
|
27
|
-
fullscreen: {
|
28
|
-
type: "boolean",
|
29
|
-
},
|
30
|
-
speed: {
|
31
|
-
type: "number",
|
32
|
-
},
|
33
|
-
children: hideInTable,
|
34
|
-
className: hideInTable,
|
35
|
-
wrapClassName: hideInTable,
|
36
|
-
titleClassName: hideInTable,
|
37
|
-
bodyClassName: hideInTable,
|
38
|
-
headerClassName: hideInTable,
|
39
|
-
beforeClassName: hideInTable,
|
40
|
-
afterClassName: hideInTable,
|
41
|
-
subtitleClassName: hideInTable,
|
42
|
-
childrenClassName: hideInTable,
|
43
|
-
},
|
44
|
-
};
|
45
|
-
|
46
|
-
export default meta;
|
47
|
-
|
48
|
-
export const ViewModal = (props: ViewModalProps) => {
|
49
|
-
const [open, setOpen] = useState(false);
|
50
|
-
return (
|
51
|
-
<div>
|
52
|
-
<Button onClick={() => setOpen(true)}>Open</Button>
|
53
|
-
<ViewModalComponent
|
54
|
-
open={open}
|
55
|
-
onOpenChange={setOpen}
|
56
|
-
title="Volume Up Plus"
|
57
|
-
fullscreen={false}
|
58
|
-
subtitle="Adjust the current tab's volume with the slider. Switch to any audio tab in one click."
|
59
|
-
after="❤️"
|
60
|
-
{...props}
|
61
|
-
>
|
62
|
-
<Button style={{margin: "50px auto", maxWidth: "max-content"}} onClick={() => setOpen(false)}>
|
63
|
-
Close ViewModal
|
64
|
-
</Button>
|
65
|
-
</ViewModalComponent>
|
66
|
-
</div>
|
67
|
-
);
|
68
|
-
};
|
package/tsconfig.json
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"target": "ESNext",
|
4
|
-
"module": "ESNext",
|
5
|
-
"jsx": "react-jsx",
|
6
|
-
"strict": true,
|
7
|
-
"moduleResolution": "node",
|
8
|
-
"esModuleInterop": true,
|
9
|
-
"forceConsistentCasingInFileNames": true,
|
10
|
-
"skipLibCheck": true,
|
11
|
-
"allowSyntheticDefaultImports": true,
|
12
|
-
"paths": {
|
13
|
-
"adnbn-ui-config": [
|
14
|
-
"./src/config/default.ts"
|
15
|
-
]
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|
package/vite.config.ts
DELETED
package/vitest.workspace.ts
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import {defineWorkspace} from "vitest/config";
|
2
|
-
|
3
|
-
// More info at: https://storybook.js.org/docs/writing-tests/test-addon
|
4
|
-
export default defineWorkspace([
|
5
|
-
"vite.config.ts",
|
6
|
-
{
|
7
|
-
extends: "vite.config.ts",
|
8
|
-
test: {
|
9
|
-
name: "storybook",
|
10
|
-
browser: {
|
11
|
-
enabled: true,
|
12
|
-
headless: true,
|
13
|
-
name: "chromium",
|
14
|
-
provider: "playwright",
|
15
|
-
},
|
16
|
-
setupFiles: [".storybook/vitest.setup.ts"],
|
17
|
-
},
|
18
|
-
},
|
19
|
-
]);
|