w-design-system 0.0.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/.storybook/main.ts +19 -0
- package/.storybook/preview.ts +14 -0
- package/README.md +46 -0
- package/README.old.md +1 -0
- package/dist/App.d.ts +5 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +9 -0
- package/dist/App.js.map +1 -0
- package/dist/App.test.d.ts +2 -0
- package/dist/App.test.d.ts.map +1 -0
- package/dist/App.test.js +9 -0
- package/dist/App.test.js.map +1 -0
- package/dist/assets/icon/index.d.ts +7 -0
- package/dist/assets/icon/index.d.ts.map +1 -0
- package/dist/assets/icon/index.js +7 -0
- package/dist/assets/icon/index.js.map +1 -0
- package/dist/components/Banner/index.d.ts +5 -0
- package/dist/components/Banner/index.d.ts.map +1 -0
- package/dist/components/Banner/index.js +33 -0
- package/dist/components/Banner/index.js.map +1 -0
- package/dist/components/Banner/stories.d.ts +7 -0
- package/dist/components/Banner/stories.d.ts.map +1 -0
- package/dist/components/Banner/stories.js +25 -0
- package/dist/components/Banner/stories.js.map +1 -0
- package/dist/components/Banner/styles.d.ts +4 -0
- package/dist/components/Banner/styles.d.ts.map +1 -0
- package/dist/components/Banner/styles.js +55 -0
- package/dist/components/Banner/styles.js.map +1 -0
- package/dist/components/Button /index.d.ts +5 -0
- package/dist/components/Button /index.d.ts.map +1 -0
- package/dist/components/Button /index.js +22 -0
- package/dist/components/Button /index.js.map +1 -0
- package/dist/components/Button /stories.d.ts +14 -0
- package/dist/components/Button /stories.d.ts.map +1 -0
- package/dist/components/Button /stories.js +88 -0
- package/dist/components/Button /stories.js.map +1 -0
- package/dist/components/Button /styles.d.ts +4 -0
- package/dist/components/Button /styles.d.ts.map +1 -0
- package/dist/components/Button /styles.js +194 -0
- package/dist/components/Button /styles.js.map +1 -0
- package/dist/components/Button /test.d.ts +2 -0
- package/dist/components/Button /test.d.ts.map +1 -0
- package/dist/components/Button /test.js +33 -0
- package/dist/components/Button /test.js.map +1 -0
- package/dist/components/ButtonRadiusIcon/index.d.ts +5 -0
- package/dist/components/ButtonRadiusIcon/index.d.ts.map +1 -0
- package/dist/components/ButtonRadiusIcon/index.js +26 -0
- package/dist/components/ButtonRadiusIcon/index.js.map +1 -0
- package/dist/components/ButtonRadiusIcon/stories.d.ts +8 -0
- package/dist/components/ButtonRadiusIcon/stories.d.ts.map +1 -0
- package/dist/components/ButtonRadiusIcon/stories.js +42 -0
- package/dist/components/ButtonRadiusIcon/stories.js.map +1 -0
- package/dist/components/ButtonRadiusIcon/styles.d.ts +4 -0
- package/dist/components/ButtonRadiusIcon/styles.d.ts.map +1 -0
- package/dist/components/ButtonRadiusIcon/styles.js +137 -0
- package/dist/components/ButtonRadiusIcon/styles.js.map +1 -0
- package/dist/components/ButtonRound/index.d.ts +5 -0
- package/dist/components/ButtonRound/index.d.ts.map +1 -0
- package/dist/components/ButtonRound/index.js +22 -0
- package/dist/components/ButtonRound/index.js.map +1 -0
- package/dist/components/ButtonRound/stories.d.ts +8 -0
- package/dist/components/ButtonRound/stories.d.ts.map +1 -0
- package/dist/components/ButtonRound/stories.js +44 -0
- package/dist/components/ButtonRound/stories.js.map +1 -0
- package/dist/components/ButtonRound/styles.d.ts +4 -0
- package/dist/components/ButtonRound/styles.d.ts.map +1 -0
- package/dist/components/ButtonRound/styles.js +134 -0
- package/dist/components/ButtonRound/styles.js.map +1 -0
- package/dist/components/IconWrapper/index.d.ts +12 -0
- package/dist/components/IconWrapper/index.d.ts.map +1 -0
- package/dist/components/IconWrapper/index.js +24 -0
- package/dist/components/IconWrapper/index.js.map +1 -0
- package/dist/components/Modal/index.d.ts +5 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.js +32 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/stories.d.ts +7 -0
- package/dist/components/Modal/stories.d.ts.map +1 -0
- package/dist/components/Modal/stories.js +24 -0
- package/dist/components/Modal/stories.js.map +1 -0
- package/dist/components/Modal/styles.d.ts +4 -0
- package/dist/components/Modal/styles.d.ts.map +1 -0
- package/dist/components/Modal/styles.js +48 -0
- package/dist/components/Modal/styles.js.map +1 -0
- package/dist/components/Paragraph/index.d.ts +11 -0
- package/dist/components/Paragraph/index.d.ts.map +1 -0
- package/dist/components/Paragraph/index.js +28 -0
- package/dist/components/Paragraph/index.js.map +1 -0
- package/dist/components/Paragraph/stories.d.ts +14 -0
- package/dist/components/Paragraph/stories.d.ts.map +1 -0
- package/dist/components/Paragraph/stories.js +95 -0
- package/dist/components/Paragraph/stories.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +5 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +14 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tabs/stories.d.ts +7 -0
- package/dist/components/Tabs/stories.d.ts.map +1 -0
- package/dist/components/Tabs/stories.js +31 -0
- package/dist/components/Tabs/stories.js.map +1 -0
- package/dist/components/Tabs/styles.d.ts +6 -0
- package/dist/components/Tabs/styles.d.ts.map +1 -0
- package/dist/components/Tabs/styles.js +22 -0
- package/dist/components/Tabs/styles.js.map +1 -0
- package/dist/components/Themes/index.d.ts +79 -0
- package/dist/components/Themes/index.d.ts.map +1 -0
- package/dist/components/Themes/index.js +83 -0
- package/dist/components/Themes/index.js.map +1 -0
- package/dist/components/Title/index.d.ts +11 -0
- package/dist/components/Title/index.d.ts.map +1 -0
- package/dist/components/Title/index.js +18 -0
- package/dist/components/Title/index.js.map +1 -0
- package/dist/components/Title/stories.d.ts +9 -0
- package/dist/components/Title/stories.d.ts.map +1 -0
- package/dist/components/Title/stories.js +61 -0
- package/dist/components/Title/stories.js.map +1 -0
- package/dist/components/Types/index.d.ts +41 -0
- package/dist/components/Types/index.d.ts.map +1 -0
- package/dist/components/Types/index.js +2 -0
- package/dist/components/Types/index.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/prettier.config.d.ts +10 -0
- package/dist/prettier.config.d.ts.map +1 -0
- package/dist/prettier.config.js +13 -0
- package/dist/prettier.config.js.map +1 -0
- package/dist/reportWebVitals.d.ts +4 -0
- package/dist/reportWebVitals.d.ts.map +1 -0
- package/dist/reportWebVitals.js +14 -0
- package/dist/reportWebVitals.js.map +1 -0
- package/dist/setupTests.d.ts +2 -0
- package/dist/setupTests.d.ts.map +1 -0
- package/dist/setupTests.js +6 -0
- package/dist/setupTests.js.map +1 -0
- package/dist/src/globalStyles.d.ts +4 -0
- package/dist/src/globalStyles.d.ts.map +1 -0
- package/dist/src/globalStyles.js +10 -0
- package/dist/src/globalStyles.js.map +1 -0
- package/dist/stories/Button.d.ts +29 -0
- package/dist/stories/Button.d.ts.map +1 -0
- package/dist/stories/Button.js +22 -0
- package/dist/stories/Button.js.map +1 -0
- package/dist/stories/Button.stories.d.ts +25 -0
- package/dist/stories/Button.stories.d.ts.map +1 -0
- package/dist/stories/Button.stories.js +45 -0
- package/dist/stories/Button.stories.js.map +1 -0
- package/dist/stories/Header.d.ts +14 -0
- package/dist/stories/Header.d.ts.map +1 -0
- package/dist/stories/Header.js +21 -0
- package/dist/stories/Header.js.map +1 -0
- package/dist/stories/Header.stories.d.ts +20 -0
- package/dist/stories/Header.stories.d.ts.map +1 -0
- package/dist/stories/Header.stories.js +27 -0
- package/dist/stories/Header.stories.js.map +1 -0
- package/dist/stories/Page.d.ts +4 -0
- package/dist/stories/Page.d.ts.map +1 -0
- package/dist/stories/Page.js +38 -0
- package/dist/stories/Page.js.map +1 -0
- package/dist/stories/Page.stories.d.ts +14 -0
- package/dist/stories/Page.stories.d.ts.map +1 -0
- package/dist/stories/Page.stories.js +34 -0
- package/dist/stories/Page.stories.js.map +1 -0
- package/dist/types/App.d.ts +4 -0
- package/dist/types/App.test.d.ts +1 -0
- package/dist/types/assets/icon/index.d.ts +6 -0
- package/dist/types/components/Banner/index.d.ts +4 -0
- package/dist/types/components/Banner/stories.d.ts +6 -0
- package/dist/types/components/Banner/styles.d.ts +3 -0
- package/dist/types/components/Button /index.d.ts +4 -0
- package/dist/types/components/Button /stories.d.ts +13 -0
- package/dist/types/components/Button /styles.d.ts +3 -0
- package/dist/types/components/Button /test.d.ts +1 -0
- package/dist/types/components/ButtonRadiusIcon/index.d.ts +4 -0
- package/dist/types/components/ButtonRadiusIcon/stories.d.ts +7 -0
- package/dist/types/components/ButtonRadiusIcon/styles.d.ts +3 -0
- package/dist/types/components/ButtonRound/index.d.ts +4 -0
- package/dist/types/components/ButtonRound/stories.d.ts +7 -0
- package/dist/types/components/ButtonRound/styles.d.ts +3 -0
- package/dist/types/components/IconWrapper/index.d.ts +11 -0
- package/dist/types/components/Modal/index.d.ts +4 -0
- package/dist/types/components/Modal/stories.d.ts +6 -0
- package/dist/types/components/Modal/styles.d.ts +3 -0
- package/dist/types/components/Paragraph/index.d.ts +10 -0
- package/dist/types/components/Paragraph/stories.d.ts +13 -0
- package/dist/types/components/Tabs/index.d.ts +4 -0
- package/dist/types/components/Tabs/stories.d.ts +6 -0
- package/dist/types/components/Tabs/styles.d.ts +5 -0
- package/dist/types/components/Themes/index.d.ts +78 -0
- package/dist/types/components/Title/index.d.ts +10 -0
- package/dist/types/components/Title/stories.d.ts +8 -0
- package/dist/types/components/Types/index.d.ts +40 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/reportWebVitals.d.ts +3 -0
- package/dist/types/setupTests.d.ts +1 -0
- package/dist/types/src/globalStyles.d.ts +3 -0
- package/dist/types/stories/Button.d.ts +28 -0
- package/dist/types/stories/Button.stories.d.ts +24 -0
- package/dist/types/stories/Header.d.ts +13 -0
- package/dist/types/stories/Header.stories.d.ts +19 -0
- package/dist/types/stories/Page.d.ts +3 -0
- package/dist/types/stories/Page.stories.d.ts +13 -0
- package/dist/types/utils/constanst.d.ts +2 -0
- package/dist/utils/constanst.d.ts +3 -0
- package/dist/utils/constanst.d.ts.map +1 -0
- package/dist/utils/constanst.js +3 -0
- package/dist/utils/constanst.js.map +1 -0
- package/package.json +69 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.css +39 -0
- package/src/App.test.tsx +9 -0
- package/src/App.tsx +14 -0
- package/src/assets/icon/alert.svg +3 -0
- package/src/assets/icon/close.svg +10 -0
- package/src/assets/icon/comment.svg +10 -0
- package/src/assets/icon/doc-check.svg +10 -0
- package/src/assets/icon/image.svg +3 -0
- package/src/assets/icon/index.ts +6 -0
- package/src/assets/icon/svg.d.ts +4 -0
- package/src/components/Banner/index.tsx +49 -0
- package/src/components/Banner/stories.tsx +31 -0
- package/src/components/Banner/styles.ts +58 -0
- package/src/components/Button /index.tsx +33 -0
- package/src/components/Button /stories.tsx +98 -0
- package/src/components/Button /styles.ts +198 -0
- package/src/components/Button /test.tsx +36 -0
- package/src/components/ButtonRadiusIcon/index.tsx +24 -0
- package/src/components/ButtonRadiusIcon/stories.tsx +47 -0
- package/src/components/ButtonRadiusIcon/styles.ts +139 -0
- package/src/components/ButtonRound/index.tsx +27 -0
- package/src/components/ButtonRound/stories.tsx +50 -0
- package/src/components/ButtonRound/styles.ts +136 -0
- package/src/components/IconWrapper/index.tsx +45 -0
- package/src/components/Modal/index.tsx +32 -0
- package/src/components/Modal/stories.tsx +53 -0
- package/src/components/Modal/styles.ts +51 -0
- package/src/components/Paragraph/index.tsx +44 -0
- package/src/components/Paragraph/stories.tsx +107 -0
- package/src/components/Tabs/index.tsx +26 -0
- package/src/components/Tabs/stories.tsx +74 -0
- package/src/components/Tabs/styles.ts +23 -0
- package/src/components/Themes/index.ts +99 -0
- package/src/components/Title/index.tsx +35 -0
- package/src/components/Title/stories.tsx +70 -0
- package/src/components/Types/index.ts +45 -0
- package/src/components/index.ts +1 -0
- package/src/index.css +13 -0
- package/src/index.tsx +19 -0
- package/src/logo.svg +1 -0
- package/src/prettier.config.js +11 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/reportWebVitals.ts +16 -0
- package/src/setupTests.ts +5 -0
- package/src/src/globalStyles.ts +11 -0
- package/src/stories/Button.stories.ts +52 -0
- package/src/stories/Button.tsx +42 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +33 -0
- package/src/stories/Header.tsx +56 -0
- package/src/stories/Page.stories.ts +32 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/src/utils/constanst.ts +2 -0
- package/tsconfig.json +38 -0
- package/webpack.config.js +12 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StorybookConfig } from "@storybook/react-webpack5";
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: ['../src/components/**/stories.tsx', '../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
5
|
+
addons: [
|
|
6
|
+
"@storybook/preset-create-react-app",
|
|
7
|
+
"@storybook/addon-onboarding",
|
|
8
|
+
"@storybook/addon-links",
|
|
9
|
+
"@storybook/addon-essentials",
|
|
10
|
+
"@chromatic-com/storybook",
|
|
11
|
+
"@storybook/addon-interactions",
|
|
12
|
+
],
|
|
13
|
+
framework: {
|
|
14
|
+
name: "@storybook/react-webpack5",
|
|
15
|
+
options: {},
|
|
16
|
+
},
|
|
17
|
+
staticDirs: ["../public"],
|
|
18
|
+
};
|
|
19
|
+
export default config;
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Getting Started with Create React App
|
|
2
|
+
|
|
3
|
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
4
|
+
|
|
5
|
+
## Available Scripts
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run:
|
|
8
|
+
|
|
9
|
+
### `npm start`
|
|
10
|
+
|
|
11
|
+
Runs the app in the development mode.\
|
|
12
|
+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
13
|
+
|
|
14
|
+
The page will reload if you make edits.\
|
|
15
|
+
You will also see any lint errors in the console.
|
|
16
|
+
|
|
17
|
+
### `npm test`
|
|
18
|
+
|
|
19
|
+
Launches the test runner in the interactive watch mode.\
|
|
20
|
+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
21
|
+
|
|
22
|
+
### `npm run build`
|
|
23
|
+
|
|
24
|
+
Builds the app for production to the `build` folder.\
|
|
25
|
+
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
26
|
+
|
|
27
|
+
The build is minified and the filenames include the hashes.\
|
|
28
|
+
Your app is ready to be deployed!
|
|
29
|
+
|
|
30
|
+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
|
31
|
+
|
|
32
|
+
### `npm run eject`
|
|
33
|
+
|
|
34
|
+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
|
35
|
+
|
|
36
|
+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
|
37
|
+
|
|
38
|
+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
|
39
|
+
|
|
40
|
+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
|
41
|
+
|
|
42
|
+
## Learn More
|
|
43
|
+
|
|
44
|
+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
|
45
|
+
|
|
46
|
+
To learn React, check out the [React documentation](https://reactjs.org/).
|
package/README.old.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# w-design-system
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,WAAW,CAAA;AAGlB,iBAAS,GAAG,sBAMX;AAED,eAAe,GAAG,CAAA"}
|
package/dist/App.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './App.css';
|
|
3
|
+
import Button from './components/Button ';
|
|
4
|
+
function App() {
|
|
5
|
+
return (React.createElement("div", { className: "App" },
|
|
6
|
+
React.createElement(Button, { variant: 'primary', children: 'Button', id: '10', onClick: () => console.log('Button') })));
|
|
7
|
+
}
|
|
8
|
+
export default App;
|
|
9
|
+
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,WAAW,CAAA;AAClB,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAEzC,SAAS,GAAG;IACV,OAAO,CACL,6BAAK,SAAS,EAAC,KAAK;QAClB,oBAAC,MAAM,IAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAI,CAC9F,CACP,CAAA;AACH,CAAC;AAED,eAAe,GAAG,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.test.d.ts","sourceRoot":"","sources":["../src/App.test.tsx"],"names":[],"mappings":""}
|
package/dist/App.test.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import App from './App';
|
|
4
|
+
test('renders learn react link', () => {
|
|
5
|
+
render(React.createElement(App, null));
|
|
6
|
+
const linkElement = screen.getByText(/learn react/i);
|
|
7
|
+
expect(linkElement).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=App.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.test.js","sourceRoot":"","sources":["../src/App.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACpC,MAAM,CAAC,oBAAC,GAAG,OAAG,CAAC,CAAC;IAChB,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACrD,MAAM,CAAC,WAAW,CAAC,CAAC,iBAAiB,EAAE,CAAC;AAC1C,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import docCheckSVG from './doc-check.svg';
|
|
2
|
+
import alertSVG from './alert.svg';
|
|
3
|
+
import commentSVG from './comment.svg';
|
|
4
|
+
import imageSVG from './image.svg';
|
|
5
|
+
import closeSVG from './close.svg';
|
|
6
|
+
export { docCheckSVG, alertSVG, commentSVG, imageSVG, closeSVG };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,iBAAiB,CAAA;AACzC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,UAAU,MAAM,eAAe,CAAA;AACtC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import docCheckSVG from './doc-check.svg';
|
|
2
|
+
import alertSVG from './alert.svg';
|
|
3
|
+
import commentSVG from './comment.svg';
|
|
4
|
+
import imageSVG from './image.svg';
|
|
5
|
+
import closeSVG from './close.svg';
|
|
6
|
+
export { docCheckSVG, alertSVG, commentSVG, imageSVG, closeSVG };
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,iBAAiB,CAAA;AACzC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,UAAU,MAAM,eAAe,CAAA;AACtC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAQtC,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAoCjC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BannerStyled } from './styles';
|
|
3
|
+
import { docCheckSVG, alertSVG, commentSVG, closeSVG } from '../../assets/icon';
|
|
4
|
+
import IconWrapper from '../IconWrapper';
|
|
5
|
+
import Paragraph from '../Paragraph';
|
|
6
|
+
import { theme } from '../Themes';
|
|
7
|
+
const { colors: { cyan40, mint40, honey40, red40, shade40, shade30 }, } = theme;
|
|
8
|
+
const Banner = ({ title, onClick, variant, subTitle }) => {
|
|
9
|
+
const searchIcon = () => {
|
|
10
|
+
switch (variant) {
|
|
11
|
+
case 'notice':
|
|
12
|
+
return { icon: commentSVG, color: cyan40 };
|
|
13
|
+
case 'success':
|
|
14
|
+
return { icon: docCheckSVG, color: mint40 };
|
|
15
|
+
case 'warning':
|
|
16
|
+
return { icon: alertSVG, color: honey40 };
|
|
17
|
+
case 'danger':
|
|
18
|
+
return { icon: alertSVG, color: red40 };
|
|
19
|
+
default:
|
|
20
|
+
return { icon: commentSVG, color: cyan40 };
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const { icon, color } = searchIcon();
|
|
24
|
+
return (React.createElement(BannerStyled, { variant: variant },
|
|
25
|
+
React.createElement("div", { className: 'bannerWrapper' },
|
|
26
|
+
React.createElement(IconWrapper, { src: icon, className: 'buttonRadiusWrapperIcon' }),
|
|
27
|
+
React.createElement("span", null,
|
|
28
|
+
React.createElement(Paragraph, { size: 'medium', color: color }, title),
|
|
29
|
+
subTitle && (React.createElement(Paragraph, { size: 'small', color: shade40 }, subTitle)))),
|
|
30
|
+
React.createElement(IconWrapper, { src: closeSVG, width: '14px', height: '14px', color: shade30, onClick: onClick })));
|
|
31
|
+
};
|
|
32
|
+
export default Banner;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Banner/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC/E,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,MAAM,EACJ,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAC7D,GAAG,KAAK,CAAA;AACT,MAAM,MAAM,GAA0B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9E,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,QAAQ,OAAO,EAAE;YACf,KAAK,QAAQ;gBACX,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;YAC5C,KAAK,SAAS;gBACZ,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;YAC7C,KAAK,SAAS;gBACZ,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;YAC3C,KAAK,QAAQ;gBACX,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;YACzC;gBACE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;SAC7C;IACH,CAAC,CAAA;IAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CAAA;IAEpC,OAAO,CACL,oBAAC,YAAY,IAAC,OAAO,EAAE,OAAO;QAC5B,6BAAK,SAAS,EAAE,eAAe;YAC7B,oBAAC,WAAW,IAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,yBAAyB,GAAI;YAChE;gBACE,oBAAC,SAAS,IAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,IACpC,KAAK,CACI;gBACX,QAAQ,IAAI,CACX,oBAAC,SAAS,IAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,IACrC,QAAQ,CACC,CACb,CACI,CACH;QACN,oBAAC,WAAW,IAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAI,CAClF,CAChB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Banner from './index';
|
|
3
|
+
declare const meta: Meta<typeof Banner>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Banner>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
//# sourceMappingURL=stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGjD,OAAO,MAAM,MAAM,SAAS,CAAA;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAcC,CAAA;AAE/B,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAEpC,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VARIANTS_TYPES_BANNER } from '../../utils/constanst';
|
|
2
|
+
import Banner from './index';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Components/Banner',
|
|
5
|
+
component: Banner,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
variant: {
|
|
9
|
+
control: {
|
|
10
|
+
type: 'select',
|
|
11
|
+
options: VARIANTS_TYPES_BANNER,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
onClick: { action: 'clicked' },
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
export const Playground = {
|
|
19
|
+
args: {
|
|
20
|
+
variant: 'success',
|
|
21
|
+
title: 'Sucesso!',
|
|
22
|
+
subTitle: 'Mensagem de sucesso.',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/Banner/stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,MAAM,MAAM,SAAS,CAAA;AAE5B,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,qBAAqB;aAC/B;SACF;QAED,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;KAC/B;CAC4B,CAAA;AAE/B,eAAe,IAAI,CAAA;AAGnB,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,sBAAsB;KACjC;CACF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BannerTypes } from '../Types';
|
|
3
|
+
export declare const BannerStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BannerTypes>> & string;
|
|
4
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAoCtC,eAAO,MAAM,YAAY,gPAkBxB,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { theme } from '../Themes';
|
|
3
|
+
const { colors } = theme;
|
|
4
|
+
const buttonRadiusWrapperIconStyles = (color) => css `
|
|
5
|
+
.buttonRadiusWrapperIcon {
|
|
6
|
+
svg {
|
|
7
|
+
fill: ${color};
|
|
8
|
+
path {
|
|
9
|
+
fill: ${color};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
const colorScheme = {
|
|
15
|
+
notice: css `
|
|
16
|
+
background: ${colors.cyan10};
|
|
17
|
+
border-color: ${colors.cyan40};
|
|
18
|
+
${buttonRadiusWrapperIconStyles(colors.cyan40)};
|
|
19
|
+
`,
|
|
20
|
+
danger: css `
|
|
21
|
+
background: ${colors.red10};
|
|
22
|
+
border-color: ${colors.red40};
|
|
23
|
+
${buttonRadiusWrapperIconStyles(colors.red40)};
|
|
24
|
+
`,
|
|
25
|
+
warning: css `
|
|
26
|
+
background: ${colors.honey10};
|
|
27
|
+
border-color: ${colors.honey40};
|
|
28
|
+
${buttonRadiusWrapperIconStyles(colors.honey40)};
|
|
29
|
+
`,
|
|
30
|
+
success: css `
|
|
31
|
+
background: ${colors.mint10};
|
|
32
|
+
border-color: ${colors.mint40};
|
|
33
|
+
${buttonRadiusWrapperIconStyles(colors.mint40)};
|
|
34
|
+
`,
|
|
35
|
+
};
|
|
36
|
+
export const BannerStyled = styled.div `
|
|
37
|
+
display: flex;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
align-items: center;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
min-height: 56px;
|
|
44
|
+
padding: 12px 24px;
|
|
45
|
+
border-radius: 16px;
|
|
46
|
+
border: 1px dashed;
|
|
47
|
+
${({ variant = 'notice' }) => colorScheme[variant]};
|
|
48
|
+
|
|
49
|
+
.bannerWrapper {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: 12px;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Banner/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAIjC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAA;AACxB,MAAM,6BAA6B,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,CAAA;;;cAG9C,KAAK;;gBAEH,KAAK;;;;CAIpB,CAAA;AACD,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,GAAG,CAAA;kBACK,MAAM,CAAC,MAAM;oBACX,MAAM,CAAC,MAAM;MAC3B,6BAA6B,CAAC,MAAM,CAAC,MAAM,CAAC;GAC/C;IACD,MAAM,EAAE,GAAG,CAAA;kBACK,MAAM,CAAC,KAAK;oBACV,MAAM,CAAC,KAAK;MAC1B,6BAA6B,CAAC,MAAM,CAAC,KAAK,CAAC;GAC9C;IACD,OAAO,EAAE,GAAG,CAAA;kBACI,MAAM,CAAC,OAAO;oBACZ,MAAM,CAAC,OAAO;MAC5B,6BAA6B,CAAC,MAAM,CAAC,OAAO,CAAC;GAChD;IACD,OAAO,EAAE,GAAG,CAAA;kBACI,MAAM,CAAC,MAAM;oBACX,MAAM,CAAC,MAAM;MAC3B,6BAA6B,CAAC,MAAM,CAAC,MAAM,CAAC;GAC/C;CACO,CAAA;AAEV,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAa;;;;;;;;;;;IAW/C,CAAC,EAAE,OAAO,GAAG,QAAQ,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;;;;;;CAOnD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button /index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAyBjC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import IconWrapper from '../IconWrapper';
|
|
14
|
+
import { ButtonStyled } from './styles';
|
|
15
|
+
const Button = (_a) => {
|
|
16
|
+
var { variant = 'primary', children, disabled = false, icon, radius, outline, halfLeft, halfRight, fullWidth } = _a, props = __rest(_a, ["variant", "children", "disabled", "icon", "radius", "outline", "halfLeft", "halfRight", "fullWidth"]);
|
|
17
|
+
return (React.createElement(ButtonStyled, Object.assign({ variant: variant, disabled: disabled, radius: radius, outline: outline, halfLeft: halfLeft, halfRight: halfRight, fullWidth: fullWidth }, props),
|
|
18
|
+
icon && React.createElement(IconWrapper, { src: icon, color: 'white', className: 'buttonRadiusWrapperIcon' }),
|
|
19
|
+
children));
|
|
20
|
+
};
|
|
21
|
+
export default Button;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button /index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGvC,MAAM,MAAM,GAA0B,CAAC,EAWtC,EAAE,EAAE;QAXkC,EACrC,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,EACT,SAAS,OAEV,EADI,KAAK,cAV6B,sGAWtC,CADS;IACJ,OAAA,CACJ,oBAAC,YAAY,kBACX,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,IAChB,KAAK;QAER,IAAI,IAAI,oBAAC,WAAW,IAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,yBAAyB,GAAI;QACxF,QAAQ,CACI,CAChB,CAAA;CAAA,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Button from './index';
|
|
3
|
+
declare const meta: Meta<typeof Button>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Button>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const ButtonDefault: Story;
|
|
8
|
+
export declare const ButtonOutilne: Story;
|
|
9
|
+
export declare const ButtonRadius: Story;
|
|
10
|
+
export declare const ButtonDisabled: Story;
|
|
11
|
+
export declare const ButtonIcon: Story;
|
|
12
|
+
export declare const ButtonIconHalfRightOutiline: Story;
|
|
13
|
+
export declare const ButtonIconHalfLeft: Story;
|
|
14
|
+
//# sourceMappingURL=stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../../src/components/Button /stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,MAAM,MAAM,SAAS,CAAA;AAG5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAsBC,CAAA;AAE/B,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAEpC,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAA;AACD,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,KAQzC,CAAA;AACD,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import exampleIcon from '../../assets/icon/image.svg';
|
|
2
|
+
import Button from './index';
|
|
3
|
+
import { VARIANTS_TYPES } from '../../utils/constanst';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Button',
|
|
6
|
+
component: Button,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
argTypes: {
|
|
9
|
+
variant: {
|
|
10
|
+
control: {
|
|
11
|
+
type: 'select',
|
|
12
|
+
options: VARIANTS_TYPES,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
disabled: {
|
|
16
|
+
control: 'boolean',
|
|
17
|
+
},
|
|
18
|
+
icon: {
|
|
19
|
+
control: 'object',
|
|
20
|
+
options: [exampleIcon],
|
|
21
|
+
description: exampleIcon,
|
|
22
|
+
},
|
|
23
|
+
onClick: { action: 'clicked' },
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
export const Playground = {
|
|
28
|
+
args: {
|
|
29
|
+
variant: 'primary',
|
|
30
|
+
children: 'ButtonPlayground',
|
|
31
|
+
disabled: false,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export const ButtonDefault = {
|
|
35
|
+
args: {
|
|
36
|
+
variant: 'secondary',
|
|
37
|
+
children: 'ButtonPlayground',
|
|
38
|
+
disabled: false,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
export const ButtonOutilne = {
|
|
42
|
+
args: {
|
|
43
|
+
variant: 'secondary',
|
|
44
|
+
children: 'ButtonPlayground',
|
|
45
|
+
disabled: false,
|
|
46
|
+
outline: true,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
export const ButtonRadius = {
|
|
50
|
+
args: {
|
|
51
|
+
variant: 'success',
|
|
52
|
+
children: 'ButtonPlayground',
|
|
53
|
+
disabled: false,
|
|
54
|
+
radius: true,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
export const ButtonDisabled = {
|
|
58
|
+
args: {
|
|
59
|
+
variant: 'danger',
|
|
60
|
+
children: 'ButtonPlayground',
|
|
61
|
+
disabled: true,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
export const ButtonIcon = {
|
|
65
|
+
args: {
|
|
66
|
+
variant: 'primary',
|
|
67
|
+
children: 'ButtonPlayground',
|
|
68
|
+
icon: exampleIcon,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
export const ButtonIconHalfRightOutiline = {
|
|
72
|
+
args: {
|
|
73
|
+
variant: 'success',
|
|
74
|
+
children: 'ButtonPlayground',
|
|
75
|
+
icon: exampleIcon,
|
|
76
|
+
halfRight: true,
|
|
77
|
+
outline: true,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
export const ButtonIconHalfLeft = {
|
|
81
|
+
args: {
|
|
82
|
+
variant: 'success',
|
|
83
|
+
children: 'ButtonPlayground',
|
|
84
|
+
icon: exampleIcon,
|
|
85
|
+
halfLeft: true,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/Button /stories.tsx"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,6BAA6B,CAAA;AACrD,OAAO,MAAM,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,cAAc;aACxB;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;SACnB;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,WAAW,CAAC;YACtB,WAAW,EAAE,WAAW;SACzB;QAED,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;KAC/B;CAC4B,CAAA;AAE/B,eAAe,IAAI,CAAA;AAGnB,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,KAAK;KAChB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,KAAK;KAChB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;KACd;CACF,CAAA;AACD,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;KACb;CACF,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,IAAI,EAAE;QACJ,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,IAAI;KACf;CACF,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,WAAW;KAClB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAU;IAChD,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;KACd;CACF,CAAA;AACD,MAAM,CAAC,MAAM,kBAAkB,GAAU;IACvC,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,IAAI;KACf;CACF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonTypes } from '../Types';
|
|
3
|
+
export declare const ButtonStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ButtonTypes>> & string;
|
|
4
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button /styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAsKtC,eAAO,MAAM,YAAY,4PA6BxB,CAAA"}
|