@taikai/rocket-kit 2.0.0-beta.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 -0
- package/README.md +164 -0
- package/dist/atoms/avatar-image/index.d.ts +13 -0
- package/dist/atoms/avatar-image/stories/avatar-image.stories.d.ts +48 -0
- package/dist/atoms/avatar-image/styles.d.ts +6 -0
- package/dist/atoms/button/index.d.ts +22 -0
- package/dist/atoms/button/styles.d.ts +11 -0
- package/dist/atoms/button/types.d.ts +2 -0
- package/dist/atoms/button-dropdown/index.d.ts +19 -0
- package/dist/atoms/button-dropdown/styles.d.ts +5 -0
- package/dist/atoms/button-dropdown/types.d.ts +8 -0
- package/dist/atoms/button-link/index.d.ts +22 -0
- package/dist/atoms/button-link/styles.d.ts +10 -0
- package/dist/atoms/checkbox/index.d.ts +15 -0
- package/dist/atoms/checkbox/styles.d.ts +11 -0
- package/dist/atoms/checkbox-button/index.d.ts +14 -0
- package/dist/atoms/checkbox-button/stories/checkbox-button.stories.d.ts +24 -0
- package/dist/atoms/checkbox-button/styles.d.ts +9 -0
- package/dist/atoms/error-field/index.d.ts +10 -0
- package/dist/atoms/error-field/styles.d.ts +6 -0
- package/dist/atoms/error-field/types.d.ts +1 -0
- package/dist/atoms/file-picker/index.d.ts +17 -0
- package/dist/atoms/file-picker/stories/file-picker.stories.d.ts +23 -0
- package/dist/atoms/file-picker/styles.d.ts +7 -0
- package/dist/atoms/icon/index.d.ts +9 -0
- package/dist/atoms/icon/stories/icon.stories.d.ts +40 -0
- package/dist/atoms/icon/stories/styles.d.ts +1 -0
- package/dist/atoms/label/index.d.ts +9 -0
- package/dist/atoms/label/styles.d.ts +1 -0
- package/dist/atoms/progress-bar/index.d.ts +7 -0
- package/dist/atoms/progress-bar/stories/progress-bar.stories.d.ts +15 -0
- package/dist/atoms/progress-bar/styles.d.ts +9 -0
- package/dist/atoms/select/index.d.ts +17 -0
- package/dist/atoms/select/stories/select.stories.d.ts +37 -0
- package/dist/atoms/select/styles.d.ts +6 -0
- package/dist/atoms/select-interactive/components/index.d.ts +6 -0
- package/dist/atoms/select-interactive/index.d.ts +4 -0
- package/dist/atoms/select-interactive/stories/select-interactive.stories.d.ts +54 -0
- package/dist/atoms/select-interactive/styles.d.ts +4 -0
- package/dist/atoms/select-interactive/types.d.ts +34 -0
- package/dist/atoms/slideshow/index.d.ts +13 -0
- package/dist/atoms/slideshow/stories/slideshow.stories.d.ts +22 -0
- package/dist/atoms/slideshow/styles.d.ts +5 -0
- package/dist/atoms/spinner/index.d.ts +9 -0
- package/dist/atoms/spinner/styles.d.ts +6 -0
- package/dist/atoms/tag/index.d.ts +11 -0
- package/dist/atoms/tag/styles.d.ts +7 -0
- package/dist/atoms/tag/types.d.ts +2 -0
- package/dist/atoms/tag-number/index.d.ts +9 -0
- package/dist/atoms/tag-number/stories/tag-number.stories.d.ts +15 -0
- package/dist/atoms/tag-number/styles.d.ts +1 -0
- package/dist/atoms/text-area/index.d.ts +21 -0
- package/dist/atoms/text-area/stories/text-area.stories.d.ts +93 -0
- package/dist/atoms/text-area/styles.d.ts +11 -0
- package/dist/atoms/text-field/index.d.ts +23 -0
- package/dist/atoms/text-field/styles.d.ts +7 -0
- package/dist/atoms/text-field/types.d.ts +1 -0
- package/dist/atoms/text-field-appendix/index.d.ts +22 -0
- package/dist/atoms/text-field-appendix/stories/text-field-appendix.stories.d.ts +43 -0
- package/dist/atoms/text-field-appendix/styles.d.ts +10 -0
- package/dist/atoms/toggle/index.d.ts +4 -0
- package/dist/atoms/toggle/stories/toogle.stories.d.ts +18 -0
- package/dist/atoms/toggle/styles.d.ts +1 -0
- package/dist/atoms/toggle/types.d.ts +16 -0
- package/dist/atoms/truncate-line/index.d.ts +9 -0
- package/dist/atoms/truncate-line/stories/truncate-line.stories.d.ts +14 -0
- package/dist/atoms/truncate-line/styles.d.ts +1 -0
- package/dist/atoms/video-player/index.d.ts +12 -0
- package/dist/atoms/video-player/stories/video-player.stories.d.ts +24 -0
- package/dist/atoms/video-player/styles.d.ts +1 -0
- package/dist/globalStyles.d.ts +2 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +8 -0
- package/dist/ions/breakpoints.d.ts +9 -0
- package/dist/ions/icon-empty-data.d.ts +3 -0
- package/dist/ions/icon-login-only.d.ts +3 -0
- package/dist/ions/icons.d.ts +5 -0
- package/dist/ions/variables.d.ts +25 -0
- package/dist/molecules/actions-menu/index.d.ts +19 -0
- package/dist/molecules/actions-menu/styles.d.ts +6 -0
- package/dist/molecules/actions-menu/types.d.ts +10 -0
- package/dist/molecules/alert-notification/index.d.ts +11 -0
- package/dist/molecules/alert-notification/stories/alert-notification.stories.d.ts +25 -0
- package/dist/molecules/alert-notification/styles.d.ts +5 -0
- package/dist/molecules/card-value/index.d.ts +13 -0
- package/dist/molecules/card-value/styles.d.ts +2 -0
- package/dist/molecules/checkbox-group/index.d.ts +23 -0
- package/dist/molecules/checkbox-group/stories/checkbox-group.stories.d.ts +33 -0
- package/dist/molecules/checkbox-group/styles.d.ts +6 -0
- package/dist/molecules/data-warning/index.d.ts +7 -0
- package/dist/molecules/data-warning/stories/data-warning.stories.d.ts +22 -0
- package/dist/molecules/data-warning/styles.d.ts +5 -0
- package/dist/molecules/empty-table/index.d.ts +8 -0
- package/dist/molecules/empty-table/stories/empty-table.stories.d.ts +17 -0
- package/dist/molecules/empty-table/styles.d.ts +10 -0
- package/dist/molecules/error/index.d.ts +7 -0
- package/dist/molecules/error/stories/error.stories.d.ts +22 -0
- package/dist/molecules/error/styles.d.ts +5 -0
- package/dist/molecules/field-with-button/index.d.ts +20 -0
- package/dist/molecules/field-with-button/stories/field-with-button.stories.d.ts +26 -0
- package/dist/molecules/field-with-button/styles.d.ts +2 -0
- package/dist/molecules/form-group/index.d.ts +9 -0
- package/dist/molecules/form-group/stories/form-group.stories.d.ts +28 -0
- package/dist/molecules/form-group/styles.d.ts +5 -0
- package/dist/molecules/modal-footer/index.d.ts +11 -0
- package/dist/molecules/modal-footer/stories/modal-footer.stories.d.ts +22 -0
- package/dist/molecules/modal-footer/styles.d.ts +1 -0
- package/dist/molecules/note-card/index.d.ts +12 -0
- package/dist/molecules/note-card/styles.d.ts +7 -0
- package/dist/molecules/note-card/types.d.ts +1 -0
- package/dist/molecules/number-input-spinner/index.d.ts +13 -0
- package/dist/molecules/number-input-spinner/stories/number-input-spinner.stories.d.ts +39 -0
- package/dist/molecules/number-input-spinner/styles.d.ts +7 -0
- package/dist/molecules/pagination-control/index.d.ts +11 -0
- package/dist/molecules/pagination-control/stories/pagination-control.stories.d.ts +42 -0
- package/dist/molecules/pagination-control/styles.d.ts +5 -0
- package/dist/molecules/radio-group/index.d.ts +20 -0
- package/dist/molecules/radio-group/stories/radio-group.stories.d.ts +34 -0
- package/dist/molecules/radio-group/styles.d.ts +13 -0
- package/dist/molecules/table/index.d.ts +32 -0
- package/dist/molecules/table/stories/table.stories.d.ts +28 -0
- package/dist/molecules/table/styles.d.ts +7 -0
- package/dist/molecules/table-dnd/index.d.ts +33 -0
- package/dist/molecules/table-dnd/stories/table-dnd.stories.d.ts +23 -0
- package/dist/molecules/table-dnd/styles.d.ts +8 -0
- package/dist/molecules/wizard-steps/index.d.ts +14 -0
- package/dist/molecules/wizard-steps/stories/wizard-steps.stories.d.ts +14 -0
- package/dist/molecules/wizard-steps/styles.d.ts +6 -0
- package/dist/organisms/grid-container/grid-col.d.ts +8 -0
- package/dist/organisms/grid-container/grid-row.d.ts +4 -0
- package/dist/organisms/grid-container/index.d.ts +7 -0
- package/dist/organisms/grid-container/stories/grid-container.stories.d.ts +10 -0
- package/dist/organisms/grid-container/styles.d.ts +6 -0
- package/dist/organisms/horizontal-nav/index.d.ts +9 -0
- package/dist/organisms/horizontal-nav/stories/horizontal-nav.stories.d.ts +20 -0
- package/dist/organisms/horizontal-nav/styles.d.ts +6 -0
- package/dist/organisms/loading-state/index.d.ts +12 -0
- package/dist/organisms/loading-state/stories/loading-state.stories.d.ts +28 -0
- package/dist/organisms/loading-state/styles.d.ts +9 -0
- package/dist/organisms/modal/index.d.ts +12 -0
- package/dist/organisms/modal/stories/modal.stories.d.ts +25 -0
- package/dist/organisms/modal/styles.d.ts +9 -0
- package/dist/organisms/modal-drawer/index.d.ts +13 -0
- package/dist/organisms/modal-drawer/stories/modal-drawer.stories.d.ts +26 -0
- package/dist/organisms/modal-drawer/styles.d.ts +9 -0
- package/dist/organisms/tabs-panel/index.d.ts +14 -0
- package/dist/organisms/tabs-panel/stories/tabs-panel.stories.d.ts +20 -0
- package/dist/organisms/tabs-panel/styles.d.ts +1 -0
- package/dist/rocket-kit.cjs.development.js +6429 -0
- package/dist/rocket-kit.cjs.development.js.map +1 -0
- package/dist/rocket-kit.cjs.production.min.js +1694 -0
- package/dist/rocket-kit.cjs.production.min.js.map +1 -0
- package/dist/rocket-kit.esm.js +6373 -0
- package/dist/rocket-kit.esm.js.map +1 -0
- package/dist/utils/filters/has-value.d.ts +1 -0
- package/dist/utils/hooks/use-mouse-move-effect.d.ts +5 -0
- package/dist/utils/hooks/use-visible.d.ts +6 -0
- package/package.json +122 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 TAIKAI
|
|
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
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# TAIKAI Design System
|
|
2
|
+
|
|
3
|
+
Check our components in [StoryBook](https://main--600c295ccb36300021e7d82f.chromatic.com) or in [Chromatic library](https://chromatic.com/library?appId=600c295ccb36300021e7d82f&branch=main)
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.
|
|
8
|
+
|
|
9
|
+
The recommended workflow is to run TSDX in one terminal:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm start # or yarn start
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
|
|
16
|
+
|
|
17
|
+
Then run either Storybook or the example playground:
|
|
18
|
+
|
|
19
|
+
### Storybook
|
|
20
|
+
|
|
21
|
+
Run inside another terminal:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
yarn storybook
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This loads the stories from `./stories`.
|
|
28
|
+
|
|
29
|
+
> NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
|
|
30
|
+
|
|
31
|
+
### Example
|
|
32
|
+
|
|
33
|
+
Then run the example inside another:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd example
|
|
37
|
+
npm i # or yarn to install dependencies
|
|
38
|
+
npm start # or yarn start
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, we use [Parcel's aliasing](https://parceljs.org/module_resolution.html#aliases).
|
|
42
|
+
|
|
43
|
+
To do a one-off build, use `npm run build` or `yarn build`.
|
|
44
|
+
|
|
45
|
+
To run tests, use `npm test` or `yarn test`.
|
|
46
|
+
|
|
47
|
+
## Configuration
|
|
48
|
+
|
|
49
|
+
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
|
|
50
|
+
|
|
51
|
+
### Jest
|
|
52
|
+
|
|
53
|
+
Jest tests are set up to run with `npm test` or `yarn test`.
|
|
54
|
+
|
|
55
|
+
To debug tests
|
|
56
|
+
```
|
|
57
|
+
import { screen } from '@testing-library/react';
|
|
58
|
+
screen.logTestingPlaygroundURL();
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Bundle analysis
|
|
62
|
+
|
|
63
|
+
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.
|
|
64
|
+
|
|
65
|
+
### Rollup
|
|
66
|
+
|
|
67
|
+
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
|
|
68
|
+
|
|
69
|
+
### TypeScript
|
|
70
|
+
|
|
71
|
+
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
|
|
72
|
+
|
|
73
|
+
## Continuous Integration
|
|
74
|
+
|
|
75
|
+
### GitHub Actions
|
|
76
|
+
|
|
77
|
+
Two actions are added by default:
|
|
78
|
+
|
|
79
|
+
- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
|
|
80
|
+
- `size` which comments cost comparison of your library on every pull request using [size-limit](https://github.com/ai/size-limit)
|
|
81
|
+
|
|
82
|
+
## Optimizations
|
|
83
|
+
|
|
84
|
+
Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
// ./types/index.d.ts
|
|
88
|
+
declare var __DEV__: boolean;
|
|
89
|
+
|
|
90
|
+
// inside your code...
|
|
91
|
+
if (__DEV__) {
|
|
92
|
+
console.log('foo');
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
|
|
97
|
+
|
|
98
|
+
## Deploying the Example Playground
|
|
99
|
+
|
|
100
|
+
The Playground is just a simple [Parcel](https://parceljs.org) app, you can deploy it anywhere you would normally deploy that. Here are some guidelines for **manually** deploying with the Netlify CLI (`npm i -g netlify-cli`):
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cd example # if not already in the example folder
|
|
104
|
+
npm run build # builds to dist
|
|
105
|
+
netlify deploy # deploy the dist folder
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Alternatively, if you already have a git repo connected, you can set up continuous deployment with Netlify:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
netlify init
|
|
112
|
+
# build command: yarn build && cd example && yarn && yarn build
|
|
113
|
+
# directory to deploy: example/dist
|
|
114
|
+
# pick yes for netlify.toml
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Compiling Locally
|
|
118
|
+
When it is published or compiled locally, it allows to rapidly test the design system as would the final developer
|
|
119
|
+
|
|
120
|
+
* Change the `package.json` version property. For instance, if the version is currently at `2.0.0-beta.10`, change it to `2.0.0-beta.11`
|
|
121
|
+
* Run the command `npm run pack`, and you will find a file with the name `taikai-taikai-design-system-2.0.0-beta.11.tgz` at the root of your project. Copy the filepath of this file and move to the next step
|
|
122
|
+
* Now, in one of your separated projects, run `npm i [filepath-copied-above]`
|
|
123
|
+
|
|
124
|
+
## Publishing to Github Package Registry
|
|
125
|
+
|
|
126
|
+
We are using [np](https://github.com/sindresorhus/np)
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npm install --global np
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Get Github Personnal Access Token
|
|
133
|
+
|
|
134
|
+
Follow this guide:
|
|
135
|
+
https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
|
|
136
|
+
|
|
137
|
+
you need the following scopes (read:packages, write:packages, delete:packages, repo).
|
|
138
|
+
|
|
139
|
+
Once you get the TOKEN, you can login:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
$ npm login --scope=@OWNER --registry=https://npm.pkg.github.com
|
|
143
|
+
|
|
144
|
+
> Username: USERNAME
|
|
145
|
+
> Password: TOKEN
|
|
146
|
+
> Email: PUBLIC-EMAIL-ADDRESS
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## ESLint configuration for VSCode
|
|
151
|
+
|
|
152
|
+
Add the following config to the file: .vscode/settings.json
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
{
|
|
156
|
+
"eslint.options": {
|
|
157
|
+
"configFile": ".eslintrc.js"
|
|
158
|
+
},
|
|
159
|
+
"eslint.validate": ["typescript", "typescriptreact"],
|
|
160
|
+
"editor.codeActionsOnSave": {
|
|
161
|
+
"source.fixAll.eslint": true
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface AvatarProps {
|
|
3
|
+
style?: CSSProperties;
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: number;
|
|
6
|
+
url?: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
boring?: boolean;
|
|
9
|
+
boringType?: 'marble' | 'beam' | 'pixel' | 'sunset' | 'ring' | 'bauhaus';
|
|
10
|
+
square?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const AvatarImage: (props: AvatarProps) => JSX.Element;
|
|
13
|
+
export default AvatarImage;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AvatarProps } from '..';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: AvatarProps) => JSX.Element;
|
|
6
|
+
argTypes: {
|
|
7
|
+
boringType: {
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
options: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const PNG: {
|
|
17
|
+
(args: AvatarProps): JSX.Element;
|
|
18
|
+
args: {
|
|
19
|
+
size: number;
|
|
20
|
+
boring: boolean;
|
|
21
|
+
boringType: string;
|
|
22
|
+
square: boolean;
|
|
23
|
+
alt: string;
|
|
24
|
+
url: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const SVG: {
|
|
28
|
+
(args: AvatarProps): JSX.Element;
|
|
29
|
+
args: {
|
|
30
|
+
size: number;
|
|
31
|
+
boring: boolean;
|
|
32
|
+
boringType: string;
|
|
33
|
+
square: boolean;
|
|
34
|
+
alt: string;
|
|
35
|
+
url: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare const BoringAvatar: {
|
|
39
|
+
(args: AvatarProps): JSX.Element;
|
|
40
|
+
args: {
|
|
41
|
+
size: number;
|
|
42
|
+
boring: boolean;
|
|
43
|
+
boringType: string;
|
|
44
|
+
square: boolean;
|
|
45
|
+
alt: string;
|
|
46
|
+
url: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { ButtonColor, ButtonVariant } from './types';
|
|
3
|
+
export interface ButtonProps {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
circle?: boolean;
|
|
6
|
+
color?: ButtonColor;
|
|
7
|
+
value?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
querySelector?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
action?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
dataTestId?: string;
|
|
15
|
+
eventId?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
iconPosition?: 'left' | 'right';
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
type?: 'submit' | 'reset' | 'button';
|
|
20
|
+
}
|
|
21
|
+
declare const Button: (props: ButtonProps) => JSX.Element;
|
|
22
|
+
export default Button;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonColor, ButtonVariant } from './types';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
variant?: ButtonVariant;
|
|
4
|
+
circle?: boolean;
|
|
5
|
+
color?: ButtonColor;
|
|
6
|
+
value?: String;
|
|
7
|
+
iconPosition?: 'left' | 'right';
|
|
8
|
+
}
|
|
9
|
+
export declare const pulseKeyframes: import("styled-components").Keyframes;
|
|
10
|
+
export declare const ButtonWrapper: import("styled-components").StyledComponent<"button", any, ButtonProps, never>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ButtonColor, ButtonVariant } from '../button/types';
|
|
3
|
+
import { ActionMenu } from './types';
|
|
4
|
+
interface ActionsMenuInterface<T> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
color?: ButtonColor;
|
|
7
|
+
value: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
actions: ActionMenu<T>[];
|
|
13
|
+
data?: T;
|
|
14
|
+
dataTestId?: string;
|
|
15
|
+
startsOpen?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const ButtonDropdown: <T>(props: ActionsMenuInterface<T>) => JSX.Element;
|
|
19
|
+
export default ButtonDropdown;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ActionMenu<T> {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
visibilityFunc?: (data: T) => boolean;
|
|
6
|
+
url?: string;
|
|
7
|
+
action?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | React.ChangeEvent<HTMLSelectElement>, data: T | null) => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { ButtonColor, ButtonVariant } from '../button/types';
|
|
3
|
+
export interface ButtonLinkProps {
|
|
4
|
+
url: string;
|
|
5
|
+
blank?: boolean;
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
circle?: boolean;
|
|
8
|
+
color?: ButtonColor;
|
|
9
|
+
value?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
querySelector?: string;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
action?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
14
|
+
dataTestId?: string;
|
|
15
|
+
eventId?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
iconPosition?: 'left' | 'right';
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
rel?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const ButtonLink: (props: ButtonLinkProps) => JSX.Element;
|
|
22
|
+
export default ButtonLink;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonColor, ButtonVariant } from '../button/types';
|
|
2
|
+
interface ButtonStyleProps {
|
|
3
|
+
variant?: ButtonVariant;
|
|
4
|
+
circle?: boolean;
|
|
5
|
+
color?: ButtonColor;
|
|
6
|
+
value?: String;
|
|
7
|
+
iconPosition?: 'left' | 'right';
|
|
8
|
+
}
|
|
9
|
+
export declare const ButtonLinkStyle: import("styled-components").StyledComponent<"a", any, ButtonStyleProps, never>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
value: string;
|
|
4
|
+
label?: string | React.ReactNode;
|
|
5
|
+
checked?: boolean | undefined;
|
|
6
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
dataTestId?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Checkbox: (props: Props) => JSX.Element;
|
|
15
|
+
export default Checkbox;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface CheckboxErrorProps {
|
|
2
|
+
error?: boolean;
|
|
3
|
+
}
|
|
4
|
+
interface CheckboxWrapperProps extends CheckboxErrorProps {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const CheckboxWrapper: import("styled-components").StyledComponent<"label", any, CheckboxWrapperProps, never>;
|
|
8
|
+
export declare const CheckboxLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
9
|
+
export declare const CheckboxInput: import("styled-components").StyledComponent<"input", any, CheckboxWrapperProps, never>;
|
|
10
|
+
export declare const Checkmark: import("styled-components").StyledComponent<"span", any, CheckboxErrorProps, never>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export interface CheckboxButtonProps {
|
|
3
|
+
label?: string | React.ReactNode;
|
|
4
|
+
value: string;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
onChange?: () => {};
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const CheckboxButton: (props: CheckboxButtonProps) => JSX.Element;
|
|
14
|
+
export default CheckboxButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CheckboxButtonProps } from '..';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: CheckboxButtonProps) => JSX.Element;
|
|
6
|
+
argTypes: {
|
|
7
|
+
onChange: {
|
|
8
|
+
action: () => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const CheckboxButtonComponent: {
|
|
14
|
+
(args: CheckboxButtonProps): JSX.Element;
|
|
15
|
+
storyName: string;
|
|
16
|
+
args: {
|
|
17
|
+
label: string;
|
|
18
|
+
value: string;
|
|
19
|
+
checked: boolean;
|
|
20
|
+
className: string;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface CheckboxWrapperProps {
|
|
2
|
+
checked?: boolean;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const CheckboxWrapper: import("styled-components").StyledComponent<"label", any, CheckboxWrapperProps, never>;
|
|
6
|
+
export declare const CheckboxLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
|
+
export declare const CheckboxInput: import("styled-components").StyledComponent<"input", any, CheckboxWrapperProps, never>;
|
|
8
|
+
export declare const Checkmark: import("styled-components").StyledComponent<"span", any, CheckboxWrapperProps, never>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ErrorFieldColor } from './types';
|
|
3
|
+
interface ErrorFieldProps {
|
|
4
|
+
color?: ErrorFieldColor;
|
|
5
|
+
error: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const ErrorField: (props: ErrorFieldProps) => JSX.Element;
|
|
10
|
+
export default ErrorField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type ErrorFieldColor = 'success' | 'red';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FilePickerProps {
|
|
3
|
+
minimal?: boolean;
|
|
4
|
+
name: string;
|
|
5
|
+
accept?: string;
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
pluralText?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
value?: string;
|
|
13
|
+
buttonText?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const FilePicker: (props: FilePickerProps) => JSX.Element;
|
|
17
|
+
export default FilePicker;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilePickerProps } from '..';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: FilePickerProps) => JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const FilePickerComponent: {
|
|
9
|
+
(args: FilePickerProps): JSX.Element;
|
|
10
|
+
story: {
|
|
11
|
+
name: string;
|
|
12
|
+
args: {
|
|
13
|
+
minimal: boolean;
|
|
14
|
+
multiple: boolean;
|
|
15
|
+
name: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
pluralText: string;
|
|
18
|
+
error: string;
|
|
19
|
+
buttonText: string;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconProps } from '..';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: IconProps) => JSX.Element;
|
|
6
|
+
argTypes: {
|
|
7
|
+
fill: {
|
|
8
|
+
control: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Icons: {
|
|
14
|
+
(args: IconProps): JSX.Element;
|
|
15
|
+
story: {
|
|
16
|
+
name: string;
|
|
17
|
+
args: {
|
|
18
|
+
fill: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const IconComponent: {
|
|
23
|
+
(args: IconProps): JSX.Element;
|
|
24
|
+
story: {
|
|
25
|
+
name: string;
|
|
26
|
+
args: {
|
|
27
|
+
icon: string;
|
|
28
|
+
fill: string;
|
|
29
|
+
};
|
|
30
|
+
argTypes: {
|
|
31
|
+
icon: {
|
|
32
|
+
control: {
|
|
33
|
+
type: string;
|
|
34
|
+
options: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const List: import("styled-components").StyledComponent<"ul", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LabelStyle: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProgressBarProps } from '..';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: ProgressBarProps) => JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const ProgressBarComponent: {
|
|
9
|
+
(args: ProgressBarProps): JSX.Element;
|
|
10
|
+
storyName: string;
|
|
11
|
+
args: {
|
|
12
|
+
progress: number;
|
|
13
|
+
value: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ProgressBarProps {
|
|
2
|
+
progress: number;
|
|
3
|
+
value?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const Bar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const Progress: import("styled-components").StyledComponent<"div", any, ProgressBarProps, never>;
|
|
8
|
+
export declare const Value: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export interface SelectProps {
|
|
3
|
+
minimal?: boolean;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
options: any;
|
|
6
|
+
defaultValue?: string | number;
|
|
7
|
+
value?: string | number;
|
|
8
|
+
name?: string;
|
|
9
|
+
onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
10
|
+
error?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
dataTestId?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
declare const Select: (props: SelectProps) => JSX.Element;
|
|
17
|
+
export default Select;
|