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,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './header.css';
|
|
3
|
+
type User = {
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
export interface HeaderProps {
|
|
7
|
+
user?: User;
|
|
8
|
+
onLogin?: () => void;
|
|
9
|
+
onLogout?: () => void;
|
|
10
|
+
onCreateAccount?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => React.JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/stories/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,CAAC;AAEtB,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,MAAM,iDAAkD,WAAW,sBAuC/E,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
import './header.css';
|
|
4
|
+
export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (React.createElement("header", null,
|
|
5
|
+
React.createElement("div", { className: "storybook-header" },
|
|
6
|
+
React.createElement("div", null,
|
|
7
|
+
React.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" },
|
|
8
|
+
React.createElement("g", { fill: "none", fillRule: "evenodd" },
|
|
9
|
+
React.createElement("path", { d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z", fill: "#FFF" }),
|
|
10
|
+
React.createElement("path", { d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z", fill: "#555AB9" }),
|
|
11
|
+
React.createElement("path", { d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z", fill: "#91BAF8" }))),
|
|
12
|
+
React.createElement("h1", null, "Acme")),
|
|
13
|
+
React.createElement("div", null, user ? (React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement("span", { className: "welcome" },
|
|
15
|
+
"Welcome, ",
|
|
16
|
+
React.createElement("b", null, user.name),
|
|
17
|
+
"!"),
|
|
18
|
+
React.createElement(Button, { size: "small", onClick: onLogout, label: "Log out" }))) : (React.createElement(React.Fragment, null,
|
|
19
|
+
React.createElement(Button, { size: "small", onClick: onLogin, label: "Log in" }),
|
|
20
|
+
React.createElement(Button, { primary: true, size: "small", onClick: onCreateAccount, label: "Sign up" })))))));
|
|
21
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../src/stories/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,cAAc,CAAC;AAatB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAe,EAAE,EAAE,CAAC,CACnF;IACE,6BAAK,SAAS,EAAC,kBAAkB;QAC/B;YACE,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;gBAChF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;oBAC/B,8BACE,CAAC,EAAC,mFAAmF,EACrF,IAAI,EAAC,MAAM,GACX;oBACF,8BACE,CAAC,EAAC,kEAAkE,EACpE,IAAI,EAAC,SAAS,GACd;oBACF,8BACE,CAAC,EAAC,gEAAgE,EAClE,IAAI,EAAC,SAAS,GACd,CACA,CACA;YACN,uCAAa,CACT;QACN,iCACG,IAAI,CAAC,CAAC,CAAC,CACN;YACE,8BAAM,SAAS,EAAC,SAAS;;gBACd,+BAAI,IAAI,CAAC,IAAI,CAAK;oBACtB;YACP,oBAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,SAAS,GAAG,CACzD,CACJ,CAAC,CAAC,CAAC,CACF;YACE,oBAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAC,QAAQ,GAAG;YACxD,oBAAC,MAAM,IAAC,OAAO,QAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAC,SAAS,GAAG,CACxE,CACJ,CACG,CACF,CACC,CACV,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => import("react").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
args: {
|
|
11
|
+
onLogin: import("@vitest/spy").Mock<[], void>;
|
|
12
|
+
onLogout: import("@vitest/spy").Mock<[], void>;
|
|
13
|
+
onCreateAccount: import("@vitest/spy").Mock<[], void>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const LoggedIn: Story;
|
|
19
|
+
export declare const LoggedOut: Story;
|
|
20
|
+
//# sourceMappingURL=Header.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Header.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;;;;;;;CAcqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { fn } from '@storybook/test';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Example/Header',
|
|
5
|
+
component: Header,
|
|
6
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
10
|
+
layout: 'fullscreen',
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
onLogin: fn(),
|
|
14
|
+
onLogout: fn(),
|
|
15
|
+
onCreateAccount: fn(),
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
export const LoggedIn = {
|
|
20
|
+
args: {
|
|
21
|
+
user: {
|
|
22
|
+
name: 'Jane Doe',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export const LoggedOut = {};
|
|
27
|
+
//# sourceMappingURL=Header.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.stories.js","sourceRoot":"","sources":["../../src/stories/Header.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IACjB,0HAA0H;IAC1H,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,2FAA2F;QAC3F,MAAM,EAAE,YAAY;KACrB;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE,EAAE;QACd,eAAe,EAAE,EAAE,EAAE;KACtB;CAC4B,CAAC;AAEhC,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,IAAI,EAAE,UAAU;SACjB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../src/stories/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,YAAY,CAAC;AAMpB,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EA+DxB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
import './page.css';
|
|
4
|
+
export const Page = () => {
|
|
5
|
+
const [user, setUser] = React.useState();
|
|
6
|
+
return (React.createElement("article", null,
|
|
7
|
+
React.createElement(Header, { user: user, onLogin: () => setUser({ name: 'Jane Doe' }), onLogout: () => setUser(undefined), onCreateAccount: () => setUser({ name: 'Jane Doe' }) }),
|
|
8
|
+
React.createElement("section", { className: "storybook-page" },
|
|
9
|
+
React.createElement("h2", null, "Pages in Storybook"),
|
|
10
|
+
React.createElement("p", null,
|
|
11
|
+
"We recommend building UIs with a",
|
|
12
|
+
' ',
|
|
13
|
+
React.createElement("a", { href: "https://componentdriven.org", target: "_blank", rel: "noopener noreferrer" },
|
|
14
|
+
React.createElement("strong", null, "component-driven")),
|
|
15
|
+
' ',
|
|
16
|
+
"process starting with atomic components and ending with pages."),
|
|
17
|
+
React.createElement("p", null, "Render pages with mock data. This makes it easy to build and review page states without needing to navigate to them in your app. Here are some handy patterns for managing page data in Storybook:"),
|
|
18
|
+
React.createElement("ul", null,
|
|
19
|
+
React.createElement("li", null, "Use a higher-level connected component. Storybook helps you compose such data from the \"args\" of child component stories"),
|
|
20
|
+
React.createElement("li", null, "Assemble data in the page component from your services. You can mock these services out using Storybook.")),
|
|
21
|
+
React.createElement("p", null,
|
|
22
|
+
"Get a guided tutorial on component-driven development at",
|
|
23
|
+
' ',
|
|
24
|
+
React.createElement("a", { href: "https://storybook.js.org/tutorials/", target: "_blank", rel: "noopener noreferrer" }, "Storybook tutorials"),
|
|
25
|
+
". Read more in the",
|
|
26
|
+
' ',
|
|
27
|
+
React.createElement("a", { href: "https://storybook.js.org/docs", target: "_blank", rel: "noopener noreferrer" }, "docs"),
|
|
28
|
+
"."),
|
|
29
|
+
React.createElement("div", { className: "tip-wrapper" },
|
|
30
|
+
React.createElement("span", { className: "tip" }, "Tip"),
|
|
31
|
+
" Adjust the width of the canvas with the",
|
|
32
|
+
' ',
|
|
33
|
+
React.createElement("svg", { width: "10", height: "10", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" },
|
|
34
|
+
React.createElement("g", { fill: "none", fillRule: "evenodd" },
|
|
35
|
+
React.createElement("path", { d: "M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z", id: "a", fill: "#999" }))),
|
|
36
|
+
"Viewports addon in the toolbar"))));
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../src/stories/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,YAAY,CAAC;AAMpB,MAAM,CAAC,MAAM,IAAI,GAAa,GAAG,EAAE;IACjC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAQ,CAAC;IAE/C,OAAO,CACL;QACE,oBAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAC5C,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAClC,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,GACpD;QAEF,iCAAS,SAAS,EAAC,gBAAgB;YACjC,qDAA2B;YAC3B;;gBACmC,GAAG;gBACpC,2BAAG,IAAI,EAAC,6BAA6B,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB;oBAC7E,uDAAiC,CAC/B;gBAAC,GAAG;iFAEN;YACJ,oOAII;YACJ;gBACE,6JAGK;gBACL,2IAGK,CACF;YACL;;gBAC2D,GAAG;gBAC5D,2BAAG,IAAI,EAAC,qCAAqC,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,0BAEnF;;gBACe,GAAG;gBACtB,2BAAG,IAAI,EAAC,+BAA+B,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,WAE7E;oBAEF;YACJ,6BAAK,SAAS,EAAC,aAAa;gBAC1B,8BAAM,SAAS,EAAC,KAAK,UAAW;;gBAAyC,GAAG;gBAC5E,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;oBAChF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;wBAC/B,8BACE,CAAC,EAAC,sOAAsO,EACxO,EAAE,EAAC,GAAG,EACN,IAAI,EAAC,MAAM,GACX,CACA,CACA;iDAEF,CACE,CACF,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<{}>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const LoggedOut: Story;
|
|
13
|
+
export declare const LoggedIn: Story;
|
|
14
|
+
//# sourceMappingURL=Page.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Page.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;CAOmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,SAAS,EAAE,KAAU,CAAC;AAGnC,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { within, userEvent, expect } from '@storybook/test';
|
|
11
|
+
import { Page } from './Page';
|
|
12
|
+
const meta = {
|
|
13
|
+
title: 'Example/Page',
|
|
14
|
+
component: Page,
|
|
15
|
+
parameters: {
|
|
16
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
17
|
+
layout: 'fullscreen',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
export const LoggedOut = {};
|
|
22
|
+
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
23
|
+
export const LoggedIn = {
|
|
24
|
+
play: ({ canvasElement }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
const canvas = within(canvasElement);
|
|
26
|
+
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
|
27
|
+
yield expect(loginButton).toBeInTheDocument();
|
|
28
|
+
yield userEvent.click(loginButton);
|
|
29
|
+
yield expect(loginButton).not.toBeInTheDocument();
|
|
30
|
+
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
|
31
|
+
yield expect(logoutButton).toBeInTheDocument();
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=Page.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.stories.js","sourceRoot":"","sources":["../../src/stories/Page.stories.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,2FAA2F;QAC3F,MAAM,EAAE,YAAY;KACrB;CAC0B,CAAC;AAE9B,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,SAAS,GAAU,EAAE,CAAC;AAEnC,+FAA+F;AAC/F,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,CAAO,EAAE,aAAa,EAAE,EAAE,EAAE;QAChC,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QACrC,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACpE,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAC9C,MAAM,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACnC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAElD,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QACtE,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACjD,CAAC,CAAA;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import ButtonRadiusIcon from './index';
|
|
3
|
+
declare const meta: Meta<typeof ButtonRadiusIcon>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ButtonRadiusIcon>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const PlaygroundTitlePrimary: Story;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonRadiusIconTypes } 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>, ButtonRadiusIconTypes>> & string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import ButtonRound from './index';
|
|
3
|
+
declare const meta: Meta<typeof ButtonRound>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ButtonRound>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const ButtonBadge: Story;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonRoundTypes } 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>, ButtonRoundTypes>> & string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IconWrapperProps {
|
|
3
|
+
src: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
width?: string;
|
|
6
|
+
height?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const IconWrapper: React.FC<IconWrapperProps>;
|
|
11
|
+
export default IconWrapper;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Overlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const ModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ParagraphProps {
|
|
3
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
4
|
+
weight?: 400 | 600 | 700 | 800;
|
|
5
|
+
as?: 'span' | 'div' | 'label' | 'p';
|
|
6
|
+
color?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const Paragraph: React.FC<ParagraphProps>;
|
|
10
|
+
export default Paragraph;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Paragraph from "./index";
|
|
3
|
+
declare const meta: Meta<typeof Paragraph>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const XSmall: Story;
|
|
7
|
+
export declare const Small: Story;
|
|
8
|
+
export declare const Medium: Story;
|
|
9
|
+
export declare const Large: Story;
|
|
10
|
+
export declare const CustomElement: Story;
|
|
11
|
+
export declare const AllSizes: Story;
|
|
12
|
+
export declare const AllWeights: Story;
|
|
13
|
+
export declare const AllElements: Story;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const TabsContainerStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const TabStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
active: boolean;
|
|
5
|
+
}>> & string;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare const spacing: {
|
|
2
|
+
space1: string;
|
|
3
|
+
space2: string;
|
|
4
|
+
space3: string;
|
|
5
|
+
space4: string;
|
|
6
|
+
space5: string;
|
|
7
|
+
space6: string;
|
|
8
|
+
space7: string;
|
|
9
|
+
space8: string;
|
|
10
|
+
space9: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const theme: {
|
|
13
|
+
zIndex: {
|
|
14
|
+
z1: number;
|
|
15
|
+
z2: number;
|
|
16
|
+
z3: number;
|
|
17
|
+
z4: number;
|
|
18
|
+
z5: number;
|
|
19
|
+
z6: number;
|
|
20
|
+
z7: number;
|
|
21
|
+
z8: number;
|
|
22
|
+
z9: number;
|
|
23
|
+
full: number;
|
|
24
|
+
};
|
|
25
|
+
spacing: {
|
|
26
|
+
space1: string;
|
|
27
|
+
space2: string;
|
|
28
|
+
space3: string;
|
|
29
|
+
space4: string;
|
|
30
|
+
space5: string;
|
|
31
|
+
space6: string;
|
|
32
|
+
space7: string;
|
|
33
|
+
space8: string;
|
|
34
|
+
space9: string;
|
|
35
|
+
};
|
|
36
|
+
colors: {
|
|
37
|
+
white: string;
|
|
38
|
+
black: string;
|
|
39
|
+
transparent: string;
|
|
40
|
+
cyan50: string;
|
|
41
|
+
cyan40: string;
|
|
42
|
+
cyan30: string;
|
|
43
|
+
cyan20: string;
|
|
44
|
+
cyan10: string;
|
|
45
|
+
mint40: string;
|
|
46
|
+
mint30: string;
|
|
47
|
+
mint20: string;
|
|
48
|
+
mint10: string;
|
|
49
|
+
honey40: string;
|
|
50
|
+
honey30: string;
|
|
51
|
+
honey20: string;
|
|
52
|
+
honey10: string;
|
|
53
|
+
red40: string;
|
|
54
|
+
red30: string;
|
|
55
|
+
red20: string;
|
|
56
|
+
red10: string;
|
|
57
|
+
shade50: string;
|
|
58
|
+
shade40: string;
|
|
59
|
+
shade30: string;
|
|
60
|
+
shade20: string;
|
|
61
|
+
shade10: string;
|
|
62
|
+
shade05: string;
|
|
63
|
+
yellow30: string;
|
|
64
|
+
yellow20: string;
|
|
65
|
+
yellow10: string;
|
|
66
|
+
};
|
|
67
|
+
fonts: string[];
|
|
68
|
+
title: {
|
|
69
|
+
medium: string;
|
|
70
|
+
large: string;
|
|
71
|
+
};
|
|
72
|
+
paragraph: {
|
|
73
|
+
'x-small': string;
|
|
74
|
+
small: string;
|
|
75
|
+
medium: string;
|
|
76
|
+
large: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Title from "./index";
|
|
3
|
+
declare const meta: Meta<typeof Title>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const LargeBoldTitle: Story;
|
|
7
|
+
export declare const MediumTitle: Story;
|
|
8
|
+
export declare const CustomColorTitle: Story;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type ColorsVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'gray' | 'warning' | 'yellow';
|
|
3
|
+
type ColorsVariantBanner = 'notice' | 'success' | 'danger' | 'warning';
|
|
4
|
+
export interface ButtonTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ColorsVariant;
|
|
6
|
+
icon?: string;
|
|
7
|
+
radius?: boolean;
|
|
8
|
+
outline?: boolean;
|
|
9
|
+
halfLeft?: boolean;
|
|
10
|
+
halfRight?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ButtonRadiusIconTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
variant?: ColorsVariant;
|
|
15
|
+
icon?: string;
|
|
16
|
+
subTitle?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ButtonRoundTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
19
|
+
variant?: ColorsVariant;
|
|
20
|
+
icon?: string;
|
|
21
|
+
outline?: boolean;
|
|
22
|
+
badge?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface BannerTypes extends HTMLAttributes<HTMLDivElement> {
|
|
25
|
+
variant?: ColorsVariantBanner;
|
|
26
|
+
title?: string;
|
|
27
|
+
subTitle?: string;
|
|
28
|
+
onClick?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface ModalTypes extends HTMLAttributes<HTMLDivElement> {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
onClose: () => void;
|
|
33
|
+
footer?: ReactNode | ReactNode[];
|
|
34
|
+
}
|
|
35
|
+
export interface TabsTypes extends HTMLAttributes<HTMLDivElement> {
|
|
36
|
+
tabs: string[];
|
|
37
|
+
defaultActiveTab?: string;
|
|
38
|
+
onTabChange?: (activeTab: string) => void;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Banner } from './Banner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './button.css';
|
|
3
|
+
export interface ButtonTypes {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the principal call to action on the page?
|
|
6
|
+
*/
|
|
7
|
+
primary?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* What background color to use
|
|
10
|
+
*/
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
/**
|
|
13
|
+
* How large should the button be?
|
|
14
|
+
*/
|
|
15
|
+
size?: 'small' | 'medium' | 'large';
|
|
16
|
+
/**
|
|
17
|
+
* Button contents
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional click handler
|
|
22
|
+
*/
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Primary UI component for user interaction
|
|
27
|
+
*/
|
|
28
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonTypes) => React.JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonTypes) => import("react").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
backgroundColor: {
|
|
12
|
+
control: "color";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
args: {
|
|
16
|
+
onClick: import("@vitest/spy").Mock<[], void>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Primary: Story;
|
|
22
|
+
export declare const Secondary: Story;
|
|
23
|
+
export declare const Large: Story;
|
|
24
|
+
export declare const Small: Story;
|