@sito/dashboard-app 0.0.9 → 0.0.10
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/LICENSE +21 -21
- package/README.md +59 -59
- package/dist/components/Actions/Actions.stories.d.ts +20 -0
- package/dist/components/Actions/ActionsDropdown.stories.d.ts +18 -0
- package/dist/components/Actions/types.d.ts +2 -2
- package/dist/components/Buttons/Button.stories.d.ts +28 -0
- package/dist/components/Buttons/IconButton.stories.d.ts +29 -0
- package/dist/components/Buttons/ToTop.stories.d.ts +9 -0
- package/dist/components/Chip/Chip.d.ts +7 -0
- package/dist/components/Chip/Chip.stories.d.ts +23 -0
- package/dist/components/Chip/DeletableChip.d.ts +2 -0
- package/dist/components/Chip/DeletableChip.stories.d.ts +13 -0
- package/dist/components/Chip/index.d.ts +3 -0
- package/dist/components/Chip/types.d.ts +12 -0
- package/dist/components/Dialog/ConfirmationDialog.stories.d.ts +12 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +14 -0
- package/dist/components/Dialog/FormDialog.stories.d.ts +14 -0
- package/dist/components/Dialog/ImportDialog.stories.d.ts +12 -0
- package/dist/components/Drawer/Drawer.stories.d.ts +10 -0
- package/dist/components/Dropdown/Dropdown.stories.d.ts +9 -0
- package/dist/components/Empty/Empty.stories.d.ts +13 -0
- package/dist/components/Empty/types.d.ts +2 -2
- package/dist/components/Error/Error.stories.d.ts +13 -0
- package/dist/components/Form/ParagraphInput.stories.d.ts +26 -0
- package/dist/components/Form/PasswordInput.stories.d.ts +14 -0
- package/dist/components/Loading/Loading.d.ts +2 -0
- package/dist/components/Loading/Loading.stories.d.ts +13 -0
- package/dist/components/Loading/SplashScreen.stories.d.ts +10 -0
- package/dist/components/Loading/index.d.ts +1 -0
- package/dist/components/Notification/Notification.stories.d.ts +10 -0
- package/dist/components/Onboarding/Onboarding.stories.d.ts +12 -0
- package/dist/components/Page/PageHeader.stories.d.ts +20 -0
- package/dist/components/Page/types.d.ts +5 -5
- package/dist/components/PrettyGrid/PrettyGrid.stories.d.ts +18 -0
- package/dist/components/TabsLayout/TabsLayout.stories.d.ts +16 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/dashboard-app.cjs +1 -1
- package/dist/dashboard-app.js +921 -874
- package/dist/hooks/actions/useEditAction.d.ts +2 -2
- package/dist/hooks/dialogs/types.d.ts +2 -2
- package/dist/hooks/dialogs/useImportDialog.d.ts +1 -1
- package/dist/main.css +1 -1
- package/dist/main.d.ts +0 -1
- package/package.json +103 -90
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Sito
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Sito
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
# @sito/dashboard-app
|
|
2
|
-
|
|
3
|
-
## Features
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
To install the library, use npm or yarn:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Using npm
|
|
11
|
-
npm install @sito/dashboard-app
|
|
12
|
-
|
|
13
|
-
# Using yarn
|
|
14
|
-
yarn add @sito/dashboard-app
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Development
|
|
18
|
-
|
|
19
|
-
Running Locally
|
|
20
|
-
|
|
21
|
-
To run the project locally:
|
|
22
|
-
|
|
23
|
-
1. Clone the repository:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
git clone https://github.com/your-repo/sito-dashboard-app.git
|
|
27
|
-
|
|
28
|
-
cd sito-dashboard-app
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
2. Install dependencies:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
3. Start the development server
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm start
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Building the Library
|
|
44
|
-
|
|
45
|
-
To build the library for production
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
npm run build
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Contributing
|
|
52
|
-
|
|
53
|
-
Contributions are welcome! Please follow these steps:
|
|
54
|
-
1. Fork the repository.
|
|
55
|
-
2. Create a new branch for your feature or bugfix.
|
|
56
|
-
3. Submit a pull request with a detailed description of your changes.
|
|
57
|
-
|
|
58
|
-
## License
|
|
59
|
-
|
|
1
|
+
# @sito/dashboard-app
|
|
2
|
+
|
|
3
|
+
## Features
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
To install the library, use npm or yarn:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Using npm
|
|
11
|
+
npm install @sito/dashboard-app
|
|
12
|
+
|
|
13
|
+
# Using yarn
|
|
14
|
+
yarn add @sito/dashboard-app
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
|
|
19
|
+
Running Locally
|
|
20
|
+
|
|
21
|
+
To run the project locally:
|
|
22
|
+
|
|
23
|
+
1. Clone the repository:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/your-repo/sito-dashboard-app.git
|
|
27
|
+
|
|
28
|
+
cd sito-dashboard-app
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
2. Install dependencies:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
3. Start the development server
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm start
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Building the Library
|
|
44
|
+
|
|
45
|
+
To build the library for production
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm run build
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Contributing
|
|
52
|
+
|
|
53
|
+
Contributions are welcome! Please follow these steps:
|
|
54
|
+
1. Fork the repository.
|
|
55
|
+
2. Create a new branch for your feature or bugfix.
|
|
56
|
+
3. Submit a pull request with a detailed description of your changes.
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
60
|
This project is licensed under the MIT License.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Actions } from './Actions';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Actions;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
showActionTexts: false;
|
|
9
|
+
actions: {
|
|
10
|
+
id: string;
|
|
11
|
+
tooltip: string;
|
|
12
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Basic: Story;
|
|
20
|
+
export declare const WithText: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { BaseEntityDto } from '../../lib';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: <TRow extends BaseEntityDto>(props: import('./types').ActionsContainerPropsType<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
actions: {
|
|
9
|
+
id: string;
|
|
10
|
+
tooltip: string;
|
|
11
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Basic: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Action } from '@sito/dashboard';
|
|
2
2
|
import { BaseEntityDto } from '../../lib';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
export type ActionsContainerPropsType<TRow extends BaseEntityDto> = {
|
|
@@ -7,7 +7,7 @@ export type ActionsContainerPropsType<TRow extends BaseEntityDto> = {
|
|
|
7
7
|
showActionTexts?: boolean;
|
|
8
8
|
showTooltips?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export interface ActionPropsType<TRow extends BaseEntityDto> extends
|
|
10
|
+
export interface ActionPropsType<TRow extends BaseEntityDto> extends Action<TRow> {
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
showText?: boolean;
|
|
13
13
|
showTooltips?: boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').ButtonPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
variant: {
|
|
11
|
+
control: {
|
|
12
|
+
type: "select";
|
|
13
|
+
};
|
|
14
|
+
options: string[];
|
|
15
|
+
};
|
|
16
|
+
color: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select";
|
|
19
|
+
};
|
|
20
|
+
options: string[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
export declare const Text: Story;
|
|
27
|
+
export declare const Outlined: Story;
|
|
28
|
+
export declare const Submit: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').IconButtonPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
icon: import('@fortawesome/fontawesome-common-types').IconDefinition;
|
|
8
|
+
children: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
variant: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "select";
|
|
14
|
+
};
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
17
|
+
color: {
|
|
18
|
+
control: {
|
|
19
|
+
type: "select";
|
|
20
|
+
};
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Default: Story;
|
|
28
|
+
export declare const Primary: Story;
|
|
29
|
+
export declare const DangerOutlined: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof meta>;
|
|
9
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').ChipPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
text: string;
|
|
8
|
+
variant: "primary";
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
variant: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "select";
|
|
14
|
+
};
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Basic: Story;
|
|
22
|
+
export declare const Secondary: Story;
|
|
23
|
+
export declare const WithIcon: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').DeleteChipPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
text: string;
|
|
8
|
+
variant: "primary";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
export interface ChipPropsType extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
+
text?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
icon?: IconProp;
|
|
7
|
+
iconClassName?: string;
|
|
8
|
+
variant?: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark" | "none";
|
|
9
|
+
}
|
|
10
|
+
export interface DeleteChipPropsType extends ChipPropsType {
|
|
11
|
+
onDelete: () => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').ConfirmationDialogPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: import('./types').DialogPropsType) => React.ReactPortal;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
title: string;
|
|
9
|
+
open: true;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: <TInput extends FieldValues, TError extends Error>(props: import('./types').FormDialogPropsType<TInput, TError>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
title: string;
|
|
9
|
+
open: true;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').ImportDialogPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Drawer } from './Drawer';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Drawer;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').DropdownPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof meta>;
|
|
9
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { BaseEntityDto } from '../../lib';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: <TRow extends BaseEntityDto>(props: import('./types').EmptyPropsType<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Basic: Story;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
2
|
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import {
|
|
3
|
+
import { Action, BaseDto } from '@sito/dashboard';
|
|
4
4
|
export type EmptyPropsType<TRow extends BaseDto> = {
|
|
5
5
|
message?: string;
|
|
6
6
|
messageProps?: DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
|
|
7
|
-
action?:
|
|
7
|
+
action?: Action<TRow>;
|
|
8
8
|
iconProps?: FontAwesomeIconProps;
|
|
9
9
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Error as ErrorComponent } from './Error';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ErrorComponent;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
error: Error;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { State } from '@sito/dashboard';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<Omit<import('./types').ParagraphInputPropsType, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
label: string;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
required: false;
|
|
12
|
+
state: State.default;
|
|
13
|
+
};
|
|
14
|
+
argTypes: {
|
|
15
|
+
state: {
|
|
16
|
+
control: {
|
|
17
|
+
type: "select";
|
|
18
|
+
};
|
|
19
|
+
options: string[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Basic: Story;
|
|
26
|
+
export declare const ErrorState: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import('@sito/dashboard').TextInputPropsType, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
label: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Loading } from './Loading';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Loading;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
containerClassName: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { SplashScreen } from './SplashScreen';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof SplashScreen;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Notification } from './Notification';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Notification;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('./types').OnboardingPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
steps: string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { BaseEntityDto } from '../../lib';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: <TEntity extends BaseEntityDto>(props: import('./types').PageHeaderPropsType<TEntity>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
title: string;
|
|
9
|
+
showBackButton: true;
|
|
10
|
+
actions: {
|
|
11
|
+
id: string;
|
|
12
|
+
tooltip: string;
|
|
13
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const Basic: Story;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Action } from '@sito/dashboard';
|
|
3
3
|
import { BaseEntityDto } from '../../lib';
|
|
4
4
|
export type PagePropsType<TRow extends BaseEntityDto> = {
|
|
5
5
|
title?: string;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
isLoading?: boolean;
|
|
8
|
-
addOptions?: Partial<
|
|
9
|
-
filterOptions?: Partial<
|
|
8
|
+
addOptions?: Partial<Action<TRow>>;
|
|
9
|
+
filterOptions?: Partial<Action<TRow>>;
|
|
10
10
|
isAnimated?: boolean;
|
|
11
|
-
actions?:
|
|
11
|
+
actions?: Action<TRow>[];
|
|
12
12
|
showBackButton?: boolean;
|
|
13
13
|
queryKey?: string[];
|
|
14
14
|
};
|
|
15
15
|
export type PageHeaderPropsType<TRow extends BaseEntityDto> = {
|
|
16
16
|
title?: string;
|
|
17
|
-
actions?:
|
|
17
|
+
actions?: Action<TRow>[];
|
|
18
18
|
showBackButton?: boolean;
|
|
19
19
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { BaseEntityDto } from '../../lib';
|
|
3
|
+
interface Item extends BaseEntityDto {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
declare const meta: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: <TDto extends BaseEntityDto>(props: import('./types').PrettyGridPropsType<TDto>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
tags: string[];
|
|
10
|
+
args: {
|
|
11
|
+
data: Item[];
|
|
12
|
+
renderComponent: (item: BaseEntityDto) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Basic: Story;
|
|
18
|
+
export declare const Empty: Story;
|