torgbox-ui 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/torgbox-ui.cjs.js +54 -0
- package/dist/torgbox-ui.css +1 -0
- package/dist/torgbox-ui.es.js +9875 -0
- package/dist/types/.storybook/decorators/ReduxDecorator.d.ts +2 -0
- package/dist/types/.storybook/decorators/RouterDecorator.d.ts +2 -0
- package/dist/types/.storybook/decorators/index.d.ts +2 -0
- package/dist/types/src/Inputs/Button/Button.d.ts +17 -0
- package/dist/types/src/Inputs/Button/Button.stories.d.ts +21 -0
- package/dist/types/src/Inputs/Button/Icon.stories.d.ts +20 -0
- package/dist/types/src/Inputs/Button/index.d.ts +1 -0
- package/dist/types/src/Inputs/Checkbox/Checkbox.d.ts +11 -0
- package/dist/types/src/Inputs/Checkbox/Checkbox.stories.d.ts +11 -0
- package/dist/types/src/Inputs/Checkbox/index.d.ts +1 -0
- package/dist/types/src/Inputs/EmailField/EmailField.d.ts +7 -0
- package/dist/types/src/Inputs/EmailField/EmailField.stories.d.ts +8 -0
- package/dist/types/src/Inputs/EmailField/ErrorMessages.d.ts +3 -0
- package/dist/types/src/Inputs/EmailField/index.d.ts +2 -0
- package/dist/types/src/Inputs/InnField/ErrorMessages.d.ts +1 -0
- package/dist/types/src/Inputs/InnField/InnField.d.ts +6 -0
- package/dist/types/src/Inputs/InnField/InnField.stories.d.ts +8 -0
- package/dist/types/src/Inputs/InnField/index.d.ts +2 -0
- package/dist/types/src/Inputs/NameField/ErrorMessages.d.ts +8 -0
- package/dist/types/src/Inputs/NameField/NameField.d.ts +9 -0
- package/dist/types/src/Inputs/NameField/NameField.stories.d.ts +8 -0
- package/dist/types/src/Inputs/NameField/index.d.ts +2 -0
- package/dist/types/src/Inputs/OtpInput/ErrorMessages.d.ts +1 -0
- package/dist/types/src/Inputs/OtpInput/OtpInput.d.ts +9 -0
- package/dist/types/src/Inputs/OtpInput/OtpInput.stories.d.ts +8 -0
- package/dist/types/src/Inputs/OtpInput/index.d.ts +2 -0
- package/dist/types/src/Inputs/PasswordField/ErrorMessages.d.ts +2 -0
- package/dist/types/src/Inputs/PasswordField/PasswordField.d.ts +7 -0
- package/dist/types/src/Inputs/PasswordField/PasswordField.stories.d.ts +8 -0
- package/dist/types/src/Inputs/PasswordField/index.d.ts +2 -0
- package/dist/types/src/Inputs/PhoneField/ErrorMessages.d.ts +2 -0
- package/dist/types/src/Inputs/PhoneField/PhoneField.d.ts +6 -0
- package/dist/types/src/Inputs/PhoneField/PhoneField.stories.d.ts +8 -0
- package/dist/types/src/Inputs/PhoneField/index.d.ts +2 -0
- package/dist/types/src/Inputs/RepeatPasswordField/ErrorMessages.d.ts +2 -0
- package/dist/types/src/Inputs/RepeatPasswordField/RepeatPasswordField.d.ts +6 -0
- package/dist/types/src/Inputs/RepeatPasswordField/index.d.ts +2 -0
- package/dist/types/src/Inputs/Selector/Collapse.d.ts +12 -0
- package/dist/types/src/Inputs/Selector/Collapse.stories.d.ts +8 -0
- package/dist/types/src/Inputs/Selector/Dropdown.d.ts +13 -0
- package/dist/types/src/Inputs/Selector/Dropdown.stories.d.ts +9 -0
- package/dist/types/src/Inputs/Selector/Option/Option.d.ts +13 -0
- package/dist/types/src/Inputs/Selector/Option/Option.stories.d.ts +9 -0
- package/dist/types/src/Inputs/Selector/index.d.ts +3 -0
- package/dist/types/src/Inputs/TextField/TextField.d.ts +25 -0
- package/dist/types/src/Inputs/TextField/TextField.stories.d.ts +12 -0
- package/dist/types/src/Inputs/TextField/index.d.ts +1 -0
- package/dist/types/src/Inputs/index.d.ts +11 -0
- package/dist/types/src/Pages/ContentPage/ContentPage.d.ts +6 -0
- package/dist/types/src/Pages/ContentPage/ContentPage.stories.d.ts +6 -0
- package/dist/types/src/Pages/ContentPage/index.d.ts +1 -0
- package/dist/types/src/Pages/CreatePasswordPage/CreatePasswordPage.d.ts +1 -0
- package/dist/types/src/Pages/CreatePasswordPage/CreatePasswordPage.stories.d.ts +7 -0
- package/dist/types/src/Pages/CreatePasswordPage/index.d.ts +1 -0
- package/dist/types/src/Pages/CreateTeamPage/CreateTeamPage.d.ts +4 -0
- package/dist/types/src/Pages/CreateTeamPage/CreateTeamPage.stories.d.ts +7 -0
- package/dist/types/src/Pages/CreateTeamPage/index.d.ts +1 -0
- package/dist/types/src/Pages/EmailConfirmationPage/EmailConfirmationPage.d.ts +4 -0
- package/dist/types/src/Pages/EmailConfirmationPage/EmailConfirmationPage.stories.d.ts +8 -0
- package/dist/types/src/Pages/EmailConfirmationPage/index.d.ts +1 -0
- package/dist/types/src/Pages/JoinTeamPage/JoinTeamPage.d.ts +1 -0
- package/dist/types/src/Pages/JoinTeamPage/JoinTeamPage.stories.d.ts +7 -0
- package/dist/types/src/Pages/JoinTeamPage/index.d.ts +1 -0
- package/dist/types/src/Pages/LoginPage/LoginPage.d.ts +1 -0
- package/dist/types/src/Pages/LoginPage/LoginPage.stories.d.ts +7 -0
- package/dist/types/src/Pages/LoginPage/index.d.ts +1 -0
- package/dist/types/src/Pages/RegisterPage/RegisterPage.d.ts +1 -0
- package/dist/types/src/Pages/RegisterPage/RegisterPage.stories.d.ts +7 -0
- package/dist/types/src/Pages/RegisterPage/index.d.ts +1 -0
- package/dist/types/src/Pages/ResetPasswordPage/ResetPasswordPage.d.ts +1 -0
- package/dist/types/src/Pages/ResetPasswordPage/ResetPasswordPage.stories.d.ts +7 -0
- package/dist/types/src/Pages/ResetPasswordPage/index.d.ts +1 -0
- package/dist/types/src/Pages/StartPage/StartPage.d.ts +4 -0
- package/dist/types/src/Pages/StartPage/StartPage.stories.d.ts +7 -0
- package/dist/types/src/Pages/StartPage/index.d.ts +1 -0
- package/dist/types/src/Pages/index.d.ts +6 -0
- package/dist/types/src/Utils/Divider/Divider.d.ts +1 -0
- package/dist/types/src/Utils/ErrorBanner/ErrorBanner.d.ts +4 -0
- package/dist/types/src/Utils/ErrorBanner/index.d.ts +1 -0
- package/dist/types/src/Utils/Link/Link.d.ts +7 -0
- package/dist/types/src/Utils/Link/Link.stories.d.ts +8 -0
- package/dist/types/src/Utils/Link/index.d.ts +1 -0
- package/dist/types/src/Utils/Modal/Modal.d.ts +8 -0
- package/dist/types/src/Utils/Modal/Modal.stories.d.ts +6 -0
- package/dist/types/src/Utils/Modal/index.d.ts +1 -0
- package/dist/types/src/Utils/Portal/Portal.d.ts +7 -0
- package/dist/types/src/Utils/SectionPlaceholder/SectionPlaceholder.d.ts +5 -0
- package/dist/types/src/Utils/Spinner/Spinner.d.ts +5 -0
- package/dist/types/src/Utils/api.d.ts +1 -0
- package/dist/types/src/Utils/index.d.ts +7 -0
- package/dist/types/src/Widgets/Header/Header.d.ts +7 -0
- package/dist/types/src/Widgets/Header/Header.stories.d.ts +6 -0
- package/dist/types/src/Widgets/Header/index.d.ts +1 -0
- package/dist/types/src/Widgets/Sidebar/Sidebar.d.ts +9 -0
- package/dist/types/src/Widgets/Sidebar/Sidebar.stories.d.ts +6 -0
- package/dist/types/src/Widgets/Sidebar/index.d.ts +1 -0
- package/dist/types/src/Widgets/index.d.ts +2 -0
- package/dist/types/src/app/main.d.ts +1 -0
- package/dist/types/src/app/routes/AppRouter.d.ts +1 -0
- package/dist/types/src/app/routes/index.d.ts +1 -0
- package/dist/types/src/app/store/index.d.ts +1 -0
- package/dist/types/src/app/store/store.d.ts +14 -0
- package/dist/types/src/entities/user/api/api.d.ts +648 -0
- package/dist/types/src/entities/user/api/index.d.ts +1 -0
- package/dist/types/src/entities/user/index.d.ts +2 -0
- package/dist/types/src/entities/user/model/index.d.ts +3 -0
- package/dist/types/src/entities/user/model/selectors.d.ts +4 -0
- package/dist/types/src/entities/user/model/slice.d.ts +10 -0
- package/dist/types/src/entities/user/model/types.d.ts +17 -0
- package/dist/{index.d.ts → types/src/index.d.ts} +1 -1
- package/dist/types/src/shared/model/api.d.ts +6 -0
- package/dist/types/src/shared/model/constants.d.ts +1 -0
- package/dist/types/src/shared/model/index.d.ts +2 -0
- package/dist/types/src/shared/ui/Avatar/Avatar.d.ts +8 -0
- package/dist/types/src/shared/ui/Avatar/Avatar.stories.d.ts +6 -0
- package/dist/types/src/shared/ui/Avatar/index.d.ts +1 -0
- package/dist/types/src/shared/ui/index.d.ts +1 -0
- package/dist/types/src/tools/customValidators.d.ts +5 -0
- package/dist/types/src/tools/getCoords.d.ts +12 -0
- package/dist/types/src/tools/regExp.d.ts +5 -0
- package/package.json +83 -23
- package/dist/Inputs/Button/Button.d.ts +0 -14
- package/dist/Inputs/Button/Button.js +0 -11
- package/dist/Inputs/Button/button.css +0 -30
- package/dist/Inputs/Button/index.d.ts +0 -1
- package/dist/Inputs/Button/index.js +0 -1
- package/dist/Inputs/index.css +0 -30
- package/dist/Inputs/index.d.ts +0 -1
- package/dist/Inputs/index.js +0 -1
- package/dist/Pages/InnerPage/InnerPage.d.ts +0 -2
- package/dist/Pages/InnerPage/InnerPage.js +0 -36
- package/dist/Pages/InnerPage/index.d.ts +0 -1
- package/dist/Pages/InnerPage/index.js +0 -1
- package/dist/Pages/InnerPage/innerPage.css +0 -69
- package/dist/Pages/index.css +0 -69
- package/dist/Pages/index.d.ts +0 -1
- package/dist/Pages/index.js +0 -1
- package/dist/Sections/Header/Header.d.ts +0 -12
- package/dist/Sections/Header/Header.js +0 -16
- package/dist/Sections/Header/header.css +0 -32
- package/dist/Sections/Header/index.d.ts +0 -1
- package/dist/Sections/Header/index.js +0 -1
- package/dist/Sections/index.css +0 -32
- package/dist/Sections/index.d.ts +0 -1
- package/dist/Sections/index.js +0 -1
- package/dist/index.css +0 -133
- package/dist/index.js +0 -3
- package/torgbox-ui-1.0.2.tgz +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface User {
|
|
2
|
+
email: string;
|
|
3
|
+
name: string;
|
|
4
|
+
lastName: string;
|
|
5
|
+
phoneNumber: string;
|
|
6
|
+
}
|
|
7
|
+
export interface EmailCode {
|
|
8
|
+
email: string;
|
|
9
|
+
code: string;
|
|
10
|
+
}
|
|
11
|
+
export interface LoginFormData {
|
|
12
|
+
email: string;
|
|
13
|
+
password: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ResponseAuthData {
|
|
16
|
+
user: User;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BASE_URL = "http://localhost:4000";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar } from './Avatar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar } from './Avatar';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const emailValidator: (value: string) => boolean;
|
|
2
|
+
export declare const nameValidator: (value: string | string[]) => boolean;
|
|
3
|
+
export declare const phoneValidator: (value: string) => boolean;
|
|
4
|
+
export declare const passwordValidator: (value: string) => boolean;
|
|
5
|
+
export declare const innValidator: (value: string) => boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export interface ICoords {
|
|
3
|
+
leftViewport: number;
|
|
4
|
+
topViewport: number;
|
|
5
|
+
bottomViewport: number;
|
|
6
|
+
leftDocument: number;
|
|
7
|
+
topDocument: number;
|
|
8
|
+
bottomDocument: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const getCoords: (ref: RefObject<Element>) => ICoords | null;
|
package/package.json
CHANGED
|
@@ -1,28 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "torgbox-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"readme": "README.md",
|
|
5
5
|
"description": "UI-Kit команды проекта Torgbox",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ui"
|
|
8
8
|
],
|
|
9
|
-
"main": "dist/
|
|
10
|
-
"
|
|
9
|
+
"main": "dist/torgbox-ui.cjs.js",
|
|
10
|
+
"module": "dist/torgbox-ui.es.js",
|
|
11
|
+
"types": "dist/types/src/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/types/src/index.d.ts",
|
|
15
|
+
"import": "./dist/torgbox-ui.es.js",
|
|
16
|
+
"require": "./dist/torgbox-ui.cjs.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
11
22
|
"scripts": {
|
|
12
23
|
"test": "react-scripts test --setupFiles ./setupFile.js",
|
|
13
24
|
"prebuild": "rm -rf dist",
|
|
14
25
|
"build:ts": "tsc --build",
|
|
15
26
|
"build:scss": "sass --no-source-map ./src:./dist",
|
|
16
|
-
"build": "
|
|
27
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
28
|
+
"build:vite": "vite build",
|
|
29
|
+
"build": "rm -rf dist && npm run build:vite && npm run build:types",
|
|
17
30
|
"prepack": "npm run build",
|
|
18
31
|
"clean": "tsc --build --clean",
|
|
19
32
|
"typecheck": "tsc --noEmit",
|
|
20
33
|
"start": "storybook dev -p 8000",
|
|
21
|
-
"storybook-test": "test-storybook",
|
|
34
|
+
"storybook-test": "test-storybook --url http://localhost:8000",
|
|
35
|
+
"storybook-test-watch": "test-storybook --url http://localhost:8000 -- --watch",
|
|
22
36
|
"storybook-test-cov": "test-storybook -- --coverage",
|
|
23
37
|
"build-storybook": "storybook build",
|
|
24
38
|
"storybook-docs": "storybook dev --docs",
|
|
25
|
-
"chromatic": "npx chromatic"
|
|
39
|
+
"chromatic": "npx chromatic",
|
|
40
|
+
"stylelint": "npx stylelint \"**/*.scss\" --fix",
|
|
41
|
+
"prettier": "npx prettier --write \"**/*.{ts,tsx,json,scss}\"",
|
|
42
|
+
"eslint": "eslint \"./src/**/*.{ts,tsx}\"\n",
|
|
43
|
+
"eslint:fix": "eslint \"./src/**/*.{ts,tsx}\" --fix",
|
|
44
|
+
"start-dev": "concurrently \"npm --prefix server run start\" \"vite\""
|
|
26
45
|
},
|
|
27
46
|
"repository": {
|
|
28
47
|
"type": "git",
|
|
@@ -49,34 +68,75 @@
|
|
|
49
68
|
"not ie <= 8"
|
|
50
69
|
],
|
|
51
70
|
"dependencies": {
|
|
52
|
-
"
|
|
53
|
-
"
|
|
71
|
+
"@reduxjs/toolkit": "^2.6.1",
|
|
72
|
+
"classnames": "^2.3.2"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"lodash": "^4.17.21",
|
|
76
|
+
"react": ">=16.14.0 <19.0.0",
|
|
77
|
+
"react-dom": ">=16.14.0 <19.0.0",
|
|
78
|
+
"react-redux": ">=7.2.0 <10.0.0",
|
|
79
|
+
"react-router-dom": "^6.0.0"
|
|
54
80
|
},
|
|
55
81
|
"devDependencies": {
|
|
56
82
|
"@babel/preset-env": "^7.22.7",
|
|
57
83
|
"@babel/preset-react": "^7.22.5",
|
|
58
84
|
"@babel/preset-typescript": "^7.22.5",
|
|
59
|
-
"@storybook/addon-a11y": "^
|
|
60
|
-
"@storybook/addon-coverage": "^
|
|
61
|
-
"@storybook/addon-
|
|
62
|
-
"@storybook/addon-
|
|
63
|
-
"@storybook/addon-
|
|
64
|
-
"@storybook/addon-
|
|
65
|
-
"@storybook/
|
|
66
|
-
"@storybook/
|
|
67
|
-
"@storybook/
|
|
68
|
-
"@storybook/
|
|
69
|
-
"@storybook/
|
|
70
|
-
"@storybook/
|
|
71
|
-
"@storybook/
|
|
85
|
+
"@storybook/addon-a11y": "^8.1.1",
|
|
86
|
+
"@storybook/addon-coverage": "^1.0.3",
|
|
87
|
+
"@storybook/addon-designs": "^8.0.1",
|
|
88
|
+
"@storybook/addon-essentials": "^8.1.1",
|
|
89
|
+
"@storybook/addon-interactions": "^8.1.1",
|
|
90
|
+
"@storybook/addon-links": "^8.1.1",
|
|
91
|
+
"@storybook/addon-styling-webpack": "^1.0.0",
|
|
92
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
93
|
+
"@storybook/blocks": "^8.1.1",
|
|
94
|
+
"@storybook/manager-api": "^8.1.1",
|
|
95
|
+
"@storybook/react": "^8.1.1",
|
|
96
|
+
"@storybook/react-webpack5": "^8.1.1",
|
|
97
|
+
"@storybook/test": "^8.1.1",
|
|
98
|
+
"@storybook/test-runner": "^0.18.1",
|
|
99
|
+
"@storybook/theming": "^8.1.1",
|
|
100
|
+
"@svgr/webpack": "^8.1.0",
|
|
72
101
|
"@testing-library/react": "^14.0.0",
|
|
102
|
+
"@types/babel__core": "^7.20.5",
|
|
103
|
+
"@types/lodash": "^4.17.16",
|
|
73
104
|
"@types/node": "^20.3.3",
|
|
74
105
|
"@types/react": "^18.2.14",
|
|
75
106
|
"@types/react-dom": "^18.2.6",
|
|
107
|
+
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
108
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
76
109
|
"chromatic": "^6.19.9",
|
|
110
|
+
"concurrently": "^9.1.2",
|
|
111
|
+
"css-loader": "^7.1.1",
|
|
112
|
+
"eslint": "^8.48.0",
|
|
113
|
+
"eslint-config-prettier": "^9.0.0",
|
|
114
|
+
"eslint-config-standard-with-typescript": "^39.0.0",
|
|
115
|
+
"eslint-plugin-import": "^2.28.1",
|
|
116
|
+
"eslint-plugin-n": "^16.0.2",
|
|
117
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
118
|
+
"eslint-plugin-react": "^7.33.2",
|
|
119
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
120
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
121
|
+
"eslint-plugin-vertical-straight-align": "^0.0.3",
|
|
122
|
+
"prettier": "3.0.3",
|
|
77
123
|
"prop-types": "^15.8.1",
|
|
124
|
+
"react": "^18.2.0",
|
|
125
|
+
"react-dom": "^18.2.0",
|
|
126
|
+
"react-redux": "^9.2.0",
|
|
127
|
+
"react-router-dom": "^7.4.0",
|
|
78
128
|
"sass": "^1.63.6",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
129
|
+
"sass-loader": "^14.2.1",
|
|
130
|
+
"storybook": "^8.1.1",
|
|
131
|
+
"storybook-addon-pseudo-states": "^3.1.1",
|
|
132
|
+
"style-loader": "^4.0.0",
|
|
133
|
+
"stylelint": "^16.5.0",
|
|
134
|
+
"stylelint-config-clean-order": "^5.4.2",
|
|
135
|
+
"stylelint-config-standard": "^36.0.0",
|
|
136
|
+
"stylelint-config-standard-scss": "^13.1.0",
|
|
137
|
+
"stylelint-order": "^6.0.4",
|
|
138
|
+
"typescript": "^5.2.2",
|
|
139
|
+
"vite": "^6.2.3",
|
|
140
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
81
141
|
}
|
|
82
142
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare enum ButtonSize {
|
|
3
|
-
small = "small",
|
|
4
|
-
medium = "medium",
|
|
5
|
-
large = "large"
|
|
6
|
-
}
|
|
7
|
-
export interface ButtonProps {
|
|
8
|
-
primary?: boolean;
|
|
9
|
-
backgroundColor?: string;
|
|
10
|
-
size?: ButtonSize;
|
|
11
|
-
label: string;
|
|
12
|
-
onClick?: () => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => React.JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export var ButtonSize;
|
|
3
|
-
(function (ButtonSize) {
|
|
4
|
-
ButtonSize["small"] = "small";
|
|
5
|
-
ButtonSize["medium"] = "medium";
|
|
6
|
-
ButtonSize["large"] = "large";
|
|
7
|
-
})(ButtonSize || (ButtonSize = {}));
|
|
8
|
-
export const Button = ({ primary = false, size = ButtonSize.medium, backgroundColor, label, ...props }) => {
|
|
9
|
-
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
10
|
-
return (React.createElement("button", { type: 'button', className: ['storybook-button', `storybook-button--${size}`, mode].join(' '), style: { backgroundColor }, ...props }, label));
|
|
11
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.storybook-button {
|
|
2
|
-
font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
3
|
-
font-weight: 700;
|
|
4
|
-
border: 0;
|
|
5
|
-
border-radius: 3em;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
line-height: 1;
|
|
9
|
-
}
|
|
10
|
-
.storybook-button--primary {
|
|
11
|
-
color: white;
|
|
12
|
-
background-color: #1ea7fd;
|
|
13
|
-
}
|
|
14
|
-
.storybook-button--secondary {
|
|
15
|
-
color: #333;
|
|
16
|
-
background-color: transparent;
|
|
17
|
-
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
|
|
18
|
-
}
|
|
19
|
-
.storybook-button--small {
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
padding: 10px 16px;
|
|
22
|
-
}
|
|
23
|
-
.storybook-button--medium {
|
|
24
|
-
font-size: 14px;
|
|
25
|
-
padding: 11px 20px;
|
|
26
|
-
}
|
|
27
|
-
.storybook-button--large {
|
|
28
|
-
font-size: 16px;
|
|
29
|
-
padding: 12px 24px;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button, ButtonSize } from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button, ButtonSize } from './Button';
|
package/dist/Inputs/index.css
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.storybook-button {
|
|
2
|
-
font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
3
|
-
font-weight: 700;
|
|
4
|
-
border: 0;
|
|
5
|
-
border-radius: 3em;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
line-height: 1;
|
|
9
|
-
}
|
|
10
|
-
.storybook-button--primary {
|
|
11
|
-
color: white;
|
|
12
|
-
background-color: #1ea7fd;
|
|
13
|
-
}
|
|
14
|
-
.storybook-button--secondary {
|
|
15
|
-
color: #333;
|
|
16
|
-
background-color: transparent;
|
|
17
|
-
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
|
|
18
|
-
}
|
|
19
|
-
.storybook-button--small {
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
padding: 10px 16px;
|
|
22
|
-
}
|
|
23
|
-
.storybook-button--medium {
|
|
24
|
-
font-size: 14px;
|
|
25
|
-
padding: 11px 20px;
|
|
26
|
-
}
|
|
27
|
-
.storybook-button--large {
|
|
28
|
-
font-size: 16px;
|
|
29
|
-
padding: 12px 24px;
|
|
30
|
-
}
|
package/dist/Inputs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button } from './Button';
|
package/dist/Inputs/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button } from './Button';
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Header } from '../../Sections/Header';
|
|
3
|
-
export const InnerPage = () => {
|
|
4
|
-
const [user, setUser] = React.useState();
|
|
5
|
-
return (React.createElement("article", null,
|
|
6
|
-
React.createElement(Header, { user: user, onLogin: () => setUser({ name: 'Jane Doe' }), onLogout: () => setUser(undefined), onCreateAccount: () => setUser({ name: 'Jane Doe' }) }),
|
|
7
|
-
React.createElement("section", { className: "storybook-page" },
|
|
8
|
-
React.createElement("h2", null, "Pages in Storybook"),
|
|
9
|
-
React.createElement("p", null,
|
|
10
|
-
"We recommend building UIs with a",
|
|
11
|
-
' ',
|
|
12
|
-
React.createElement("a", { href: "https://componentdriven.org", target: "_blank", rel: "noopener noreferrer" },
|
|
13
|
-
React.createElement("strong", null, "component-driven")),
|
|
14
|
-
' ',
|
|
15
|
-
"process starting with atomic components and ending with pages."),
|
|
16
|
-
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:"),
|
|
17
|
-
React.createElement("ul", null,
|
|
18
|
-
React.createElement("li", null, "Use a higher-level connected component. Storybook helps you compose such data from the \"args\" of child component stories"),
|
|
19
|
-
React.createElement("li", null, "Assemble data in the page component from your services. You can mock these services out using Storybook.")),
|
|
20
|
-
React.createElement("p", null,
|
|
21
|
-
"Get a guided tutorial on component-driven development at",
|
|
22
|
-
' ',
|
|
23
|
-
React.createElement("a", { href: "https://storybook.js.org/tutorials/", target: "_blank", rel: "noopener noreferrer" }, "Storybook tutorials"),
|
|
24
|
-
". Read more in the",
|
|
25
|
-
' ',
|
|
26
|
-
React.createElement("a", { href: "https://storybook.js.org/docs", target: "_blank", rel: "noopener noreferrer" }, "docs"),
|
|
27
|
-
"."),
|
|
28
|
-
React.createElement("div", { className: "tip-wrapper" },
|
|
29
|
-
React.createElement("span", { className: "tip" }, "Tip"),
|
|
30
|
-
" Adjust the width of the canvas with the",
|
|
31
|
-
' ',
|
|
32
|
-
React.createElement("svg", { width: "10", height: "10", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" },
|
|
33
|
-
React.createElement("g", { fill: "none", fillRule: "evenodd" },
|
|
34
|
-
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" }))),
|
|
35
|
-
"Viewports addon in the toolbar"))));
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { InnerPage } from './InnerPage';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { InnerPage } from './InnerPage';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
.storybook-page {
|
|
2
|
-
font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
3
|
-
font-size: 14px;
|
|
4
|
-
line-height: 24px;
|
|
5
|
-
padding: 48px 20px;
|
|
6
|
-
margin: 0 auto;
|
|
7
|
-
max-width: 600px;
|
|
8
|
-
color: #333;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.storybook-page h2 {
|
|
12
|
-
font-weight: 700;
|
|
13
|
-
font-size: 32px;
|
|
14
|
-
line-height: 1;
|
|
15
|
-
margin: 0 0 4px;
|
|
16
|
-
display: inline-block;
|
|
17
|
-
vertical-align: top;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.storybook-page p {
|
|
21
|
-
margin: 1em 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.storybook-page a {
|
|
25
|
-
text-decoration: none;
|
|
26
|
-
color: #1ea7fd;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.storybook-page ul {
|
|
30
|
-
padding-left: 30px;
|
|
31
|
-
margin: 1em 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.storybook-page li {
|
|
35
|
-
margin-bottom: 8px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.storybook-page .tip {
|
|
39
|
-
display: inline-block;
|
|
40
|
-
border-radius: 1em;
|
|
41
|
-
font-size: 11px;
|
|
42
|
-
line-height: 12px;
|
|
43
|
-
font-weight: 700;
|
|
44
|
-
background: #e7fdd8;
|
|
45
|
-
color: #66bf3c;
|
|
46
|
-
padding: 4px 12px;
|
|
47
|
-
margin-right: 10px;
|
|
48
|
-
vertical-align: top;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.storybook-page .tip-wrapper {
|
|
52
|
-
font-size: 13px;
|
|
53
|
-
line-height: 20px;
|
|
54
|
-
margin-top: 40px;
|
|
55
|
-
margin-bottom: 40px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.storybook-page .tip-wrapper svg {
|
|
59
|
-
display: inline-block;
|
|
60
|
-
height: 12px;
|
|
61
|
-
width: 12px;
|
|
62
|
-
margin-right: 4px;
|
|
63
|
-
vertical-align: top;
|
|
64
|
-
margin-top: 3px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.storybook-page .tip-wrapper svg path {
|
|
68
|
-
fill: #1ea7fd;
|
|
69
|
-
}
|
package/dist/Pages/index.css
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
.storybook-page {
|
|
2
|
-
font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
3
|
-
font-size: 14px;
|
|
4
|
-
line-height: 24px;
|
|
5
|
-
padding: 48px 20px;
|
|
6
|
-
margin: 0 auto;
|
|
7
|
-
max-width: 600px;
|
|
8
|
-
color: #333;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.storybook-page h2 {
|
|
12
|
-
font-weight: 700;
|
|
13
|
-
font-size: 32px;
|
|
14
|
-
line-height: 1;
|
|
15
|
-
margin: 0 0 4px;
|
|
16
|
-
display: inline-block;
|
|
17
|
-
vertical-align: top;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.storybook-page p {
|
|
21
|
-
margin: 1em 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.storybook-page a {
|
|
25
|
-
text-decoration: none;
|
|
26
|
-
color: #1ea7fd;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.storybook-page ul {
|
|
30
|
-
padding-left: 30px;
|
|
31
|
-
margin: 1em 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.storybook-page li {
|
|
35
|
-
margin-bottom: 8px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.storybook-page .tip {
|
|
39
|
-
display: inline-block;
|
|
40
|
-
border-radius: 1em;
|
|
41
|
-
font-size: 11px;
|
|
42
|
-
line-height: 12px;
|
|
43
|
-
font-weight: 700;
|
|
44
|
-
background: #e7fdd8;
|
|
45
|
-
color: #66bf3c;
|
|
46
|
-
padding: 4px 12px;
|
|
47
|
-
margin-right: 10px;
|
|
48
|
-
vertical-align: top;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.storybook-page .tip-wrapper {
|
|
52
|
-
font-size: 13px;
|
|
53
|
-
line-height: 20px;
|
|
54
|
-
margin-top: 40px;
|
|
55
|
-
margin-bottom: 40px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.storybook-page .tip-wrapper svg {
|
|
59
|
-
display: inline-block;
|
|
60
|
-
height: 12px;
|
|
61
|
-
width: 12px;
|
|
62
|
-
margin-right: 4px;
|
|
63
|
-
vertical-align: top;
|
|
64
|
-
margin-top: 3px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.storybook-page .tip-wrapper svg path {
|
|
68
|
-
fill: #1ea7fd;
|
|
69
|
-
}
|
package/dist/Pages/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { InnerPage } from './InnerPage';
|
package/dist/Pages/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { InnerPage } from './InnerPage';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type User = {
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
5
|
-
interface HeaderProps {
|
|
6
|
-
user?: User;
|
|
7
|
-
onLogin: () => void;
|
|
8
|
-
onLogout: () => void;
|
|
9
|
-
onCreateAccount: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button, ButtonSize } from '../../Inputs/Button';
|
|
3
|
-
import Logo from '../../assets/logo.svg';
|
|
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("img", { src: Logo, alt: "Logo" }),
|
|
8
|
-
React.createElement("h1", null, "Torgbox")),
|
|
9
|
-
React.createElement("div", null, user ? (React.createElement(React.Fragment, null,
|
|
10
|
-
React.createElement("span", { className: "welcome" },
|
|
11
|
-
"Welcome, ",
|
|
12
|
-
React.createElement("b", null, user.name),
|
|
13
|
-
"!"),
|
|
14
|
-
React.createElement(Button, { size: ButtonSize.small, onClick: onLogout, label: 'Log out' }))) : (React.createElement(React.Fragment, null,
|
|
15
|
-
React.createElement(Button, { size: ButtonSize.small, onClick: onLogin, label: 'Log in' }),
|
|
16
|
-
React.createElement(Button, { size: ButtonSize.small, onClick: onCreateAccount, label: 'Sign up', primary: true })))))));
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.storybook-header {
|
|
2
|
-
font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
3
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
4
|
-
padding: 15px 20px;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.storybook-header svg {
|
|
11
|
-
display: inline-block;
|
|
12
|
-
vertical-align: top;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.storybook-header h1 {
|
|
16
|
-
font-weight: 700;
|
|
17
|
-
font-size: 20px;
|
|
18
|
-
line-height: 1;
|
|
19
|
-
margin: 6px 0 6px 10px;
|
|
20
|
-
display: inline-block;
|
|
21
|
-
vertical-align: top;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.storybook-header button + button {
|
|
25
|
-
margin-left: 10px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.storybook-header .welcome {
|
|
29
|
-
color: #333;
|
|
30
|
-
font-size: 14px;
|
|
31
|
-
margin-right: 10px;
|
|
32
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header } from './Header';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header } from './Header';
|
package/dist/Sections/index.css
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.storybook-header {
|
|
2
|
-
font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
3
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
4
|
-
padding: 15px 20px;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.storybook-header svg {
|
|
11
|
-
display: inline-block;
|
|
12
|
-
vertical-align: top;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.storybook-header h1 {
|
|
16
|
-
font-weight: 700;
|
|
17
|
-
font-size: 20px;
|
|
18
|
-
line-height: 1;
|
|
19
|
-
margin: 6px 0 6px 10px;
|
|
20
|
-
display: inline-block;
|
|
21
|
-
vertical-align: top;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.storybook-header button + button {
|
|
25
|
-
margin-left: 10px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.storybook-header .welcome {
|
|
29
|
-
color: #333;
|
|
30
|
-
font-size: 14px;
|
|
31
|
-
margin-right: 10px;
|
|
32
|
-
}
|
package/dist/Sections/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header } from './Header';
|
package/dist/Sections/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header } from './Header';
|