@scbt-ecom/ui 0.0.2
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 +47 -0
- package/dist/index.d.ts +6 -0
- package/dist/shared/constants/api.d.ts +2 -0
- package/dist/shared/constants/designSystem/colors.d.ts +120 -0
- package/dist/shared/constants/designSystem/index.d.ts +3 -0
- package/dist/shared/constants/designSystem/others.d.ts +8 -0
- package/dist/shared/constants/designSystem/typography.d.ts +75 -0
- package/dist/shared/constants/index.d.ts +2 -0
- package/dist/shared/hooks/index.d.ts +4 -0
- package/dist/shared/hooks/useBoolean.d.ts +3 -0
- package/dist/shared/hooks/useClickOutside.d.ts +2 -0
- package/dist/shared/hooks/useControlledForm.d.ts +7 -0
- package/dist/shared/hooks/useDebounce.d.ts +3 -0
- package/dist/shared/ui/Badge.d.ts +6 -0
- package/dist/shared/ui/Breadcrumbs.d.ts +15 -0
- package/dist/shared/ui/ButtonIcon.d.ts +17 -0
- package/dist/shared/ui/CustomLink.d.ts +15 -0
- package/dist/shared/ui/Heading.d.ts +12 -0
- package/dist/shared/ui/Hint.d.ts +21 -0
- package/dist/shared/ui/Loader.d.ts +12 -0
- package/dist/shared/ui/PhoneView.d.ts +5 -0
- package/dist/shared/ui/Portal.d.ts +7 -0
- package/dist/shared/ui/ResponsiveContainer.d.ts +6 -0
- package/dist/shared/ui/Section.d.ts +6 -0
- package/dist/shared/ui/accordion/Accordion.d.ts +7 -0
- package/dist/shared/ui/accordion/index.d.ts +1 -0
- package/dist/shared/ui/accordion/model/types.d.ts +16 -0
- package/dist/shared/ui/accordion/ui/AccordionHeader.d.ts +8 -0
- package/dist/shared/ui/brandLogos.d.ts +5 -0
- package/dist/shared/ui/button/Button.d.ts +17 -0
- package/dist/shared/ui/button/index.d.ts +1 -0
- package/dist/shared/ui/button/model/helpers.d.ts +2 -0
- package/dist/shared/ui/formControlElements/CheckboxControl.d.ts +11 -0
- package/dist/shared/ui/formControlElements/FormControl.d.ts +3 -0
- package/dist/shared/ui/formControlElements/InputControl.d.ts +6 -0
- package/dist/shared/ui/formControlElements/InputControlMask.d.ts +10 -0
- package/dist/shared/ui/formControlElements/RadioControl.d.ts +26 -0
- package/dist/shared/ui/formControlElements/dadata/DadataInputControl.d.ts +14 -0
- package/dist/shared/ui/formControlElements/dadata/index.d.ts +1 -0
- package/dist/shared/ui/formControlElements/dadata/model/api.d.ts +2 -0
- package/dist/shared/ui/formControlElements/dadata/model/helpers.d.ts +7 -0
- package/dist/shared/ui/formControlElements/dadata/model/types.d.ts +42 -0
- package/dist/shared/ui/formControlElements/dadata/model/useDadata.d.ts +6 -0
- package/dist/shared/ui/formControlElements/index.d.ts +6 -0
- package/dist/shared/ui/formControlElements/model/classes-types.d.ts +18 -0
- package/dist/shared/ui/formControlElements/model/index.d.ts +2 -0
- package/dist/shared/ui/formControlElements/model/props-types.d.ts +18 -0
- package/dist/shared/ui/formControlElements/ui/FieldAttachment.d.ts +8 -0
- package/dist/shared/ui/formControlElements/ui/FieldContainer.d.ts +13 -0
- package/dist/shared/ui/formControlElements/ui/FieldWrapper.d.ts +13 -0
- package/dist/shared/ui/formControlElements/ui/MessageView.d.ts +13 -0
- package/dist/shared/ui/formControlElements/ui/index.d.ts +4 -0
- package/dist/shared/ui/icon/Icon.d.ts +10 -0
- package/dist/shared/ui/icon/index.d.ts +2 -0
- package/dist/shared/ui/icon/sprite.gen.d.ts +14 -0
- package/dist/shared/ui/index.d.ts +16 -0
- package/dist/shared/ui/popover/Popover.d.ts +23 -0
- package/dist/shared/ui/popover/index.d.ts +1 -0
- package/dist/shared/utils/capitalize.d.ts +1 -0
- package/dist/shared/utils/capitalize.test.d.ts +1 -0
- package/dist/shared/utils/cn.d.ts +2 -0
- package/dist/shared/utils/deepCompare.d.ts +1 -0
- package/dist/shared/utils/index.d.ts +4 -0
- package/dist/shared/utils/isClient.d.ts +1 -0
- package/dist/shared/validation/index.d.ts +3 -0
- package/dist/shared/validation/messages.d.ts +10 -0
- package/dist/shared/validation/regExp.d.ts +3 -0
- package/dist/shared/validation/zodValidation/dadataFio.d.ts +6 -0
- package/dist/shared/validation/zodValidation/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/ui.es.js +35759 -0
- package/dist/ui.umd.js +287 -0
- package/dist/widgets/Advantages.d.ts +8 -0
- package/dist/widgets/banner/Banner.d.ts +11 -0
- package/dist/widgets/banner/index.d.ts +1 -0
- package/dist/widgets/banner/model/helpers.d.ts +3 -0
- package/dist/widgets/banner/ui/BannerButtonsGroup.d.ts +6 -0
- package/dist/widgets/index.d.ts +3 -0
- package/dist/widgets/pageHeader/PageHeader.d.ts +16 -0
- package/dist/widgets/pageHeader/index.d.ts +1 -0
- package/package.json +128 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IButtonProps } from '../../shared/ui';
|
|
2
|
+
export type TButtonsConfig = {
|
|
3
|
+
primary: IButtonProps;
|
|
4
|
+
secondary?: IButtonProps;
|
|
5
|
+
};
|
|
6
|
+
export interface IBannerProps {
|
|
7
|
+
headTitle: string;
|
|
8
|
+
subtitle: string;
|
|
9
|
+
buttonsConfig: TButtonsConfig;
|
|
10
|
+
}
|
|
11
|
+
export declare const Banner: ({ headTitle, subtitle, buttonsConfig }: IBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Banner } from './Banner';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TBrandLogoVariant } from '../../shared/ui';
|
|
2
|
+
export interface ICommonHeaderProps {
|
|
3
|
+
logoPath?: string;
|
|
4
|
+
logoType?: TBrandLogoVariant;
|
|
5
|
+
}
|
|
6
|
+
interface IHeaderWithPhone extends ICommonHeaderProps {
|
|
7
|
+
variant: 'withPhone';
|
|
8
|
+
phone: string;
|
|
9
|
+
phoneText: string;
|
|
10
|
+
}
|
|
11
|
+
interface IHeaderWithButton extends ICommonHeaderProps {
|
|
12
|
+
variant: 'withButton';
|
|
13
|
+
}
|
|
14
|
+
type THeaderContentVariant = IHeaderWithButton | IHeaderWithPhone;
|
|
15
|
+
export declare const PageHeader: (props: THeaderContentVariant) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageHeader } from './PageHeader';
|
package/package.json
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scbt-ecom/ui",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/ui.es.ts",
|
|
8
|
+
"require": "./dist/ui.umd.ts"
|
|
9
|
+
},
|
|
10
|
+
"./dist/style.css": "./dist/style.css"
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/ui.umd.cjs",
|
|
13
|
+
"module": "./dist/ui.es.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "vite",
|
|
20
|
+
"build": "tsc -b && vite build",
|
|
21
|
+
"lint": "eslint . --quiet",
|
|
22
|
+
"test": "vitest",
|
|
23
|
+
"preview": "vite preview",
|
|
24
|
+
"start:sb": "storybook dev -p 6006 --no-open",
|
|
25
|
+
"build-storybook": "storybook build",
|
|
26
|
+
"start": "npm run start:sb",
|
|
27
|
+
"test-storybook": "test-storybook",
|
|
28
|
+
"prepare": "husky",
|
|
29
|
+
"pre-commit": "npm run lint",
|
|
30
|
+
"chromatic": "npx chromatic --project-token=chpt_9468dafcf1bf3e3 --only-changed --files='src/stories/**/*.stories.@(tsx)'",
|
|
31
|
+
"pre-deploy": "npm run lint && npm run test -- --watch=false"
|
|
32
|
+
},
|
|
33
|
+
"peerDependecies": {
|
|
34
|
+
"react": "^18.3.1",
|
|
35
|
+
"react-dom": "^18.3.1"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@storybook/builder-vite": "^8.2.6"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@chromatic-com/storybook": "^1.6.1",
|
|
42
|
+
"@headlessui/react": "^2.1.2",
|
|
43
|
+
"@hookform/resolvers": "^3.9.0",
|
|
44
|
+
"@neodx/svg": "^0.7.1",
|
|
45
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
46
|
+
"@radix-ui/react-checkbox": "^1.1.1",
|
|
47
|
+
"@radix-ui/react-popover": "^1.1.1",
|
|
48
|
+
"@radix-ui/react-radio-group": "^1.2.0",
|
|
49
|
+
"@radix-ui/react-tooltip": "^1.1.2",
|
|
50
|
+
"@storybook/addon-console": "^3.0.0",
|
|
51
|
+
"@storybook/addon-coverage": "^1.0.4",
|
|
52
|
+
"@storybook/addon-essentials": "^8.2.6",
|
|
53
|
+
"@storybook/addon-interactions": "^8.2.6",
|
|
54
|
+
"@storybook/addon-links": "^8.2.6",
|
|
55
|
+
"@storybook/addon-onboarding": "^8.2.6",
|
|
56
|
+
"@storybook/blocks": "^8.2.6",
|
|
57
|
+
"@storybook/react": "^8.2.6",
|
|
58
|
+
"@storybook/react-vite": "^8.2.6",
|
|
59
|
+
"@storybook/test": "^8.2.6",
|
|
60
|
+
"@storybook/test-runner": "^0.19.1",
|
|
61
|
+
"@storybook/testing-library": "^0.2.2",
|
|
62
|
+
"@testing-library/jest-dom": "^6.4.8",
|
|
63
|
+
"@testing-library/react": "^16.0.0",
|
|
64
|
+
"@testing-library/user-event": "^14.5.2",
|
|
65
|
+
"@types/react": "^18.3.3",
|
|
66
|
+
"@types/react-dom": "^18.3.0",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
|
68
|
+
"@typescript-eslint/parser": "^7.15.0",
|
|
69
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
70
|
+
"autoprefixer": "^10.4.19",
|
|
71
|
+
"chromatic": "^11.7.1",
|
|
72
|
+
"class-variance-authority": "^0.7.0",
|
|
73
|
+
"clsx": "^2.1.1",
|
|
74
|
+
"eslint": "^8.57.0",
|
|
75
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
76
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
77
|
+
"eslint-config-next": "14.2.3",
|
|
78
|
+
"eslint-config-prettier": "^9.1.0",
|
|
79
|
+
"eslint-config-react-app": "^7.0.1",
|
|
80
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
81
|
+
"eslint-plugin-check-file": "^2.8.0",
|
|
82
|
+
"eslint-plugin-flowtype": "^8.0.3",
|
|
83
|
+
"eslint-plugin-import": "^2.29.1",
|
|
84
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
85
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
86
|
+
"eslint-plugin-promise": "^6.2.0",
|
|
87
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
88
|
+
"eslint-plugin-react-refresh": "^0.4.7",
|
|
89
|
+
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
90
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
91
|
+
"eslint-plugin-unused-imports": "^3.2.0",
|
|
92
|
+
"husky": "^9.1.4",
|
|
93
|
+
"jsdom": "^24.1.1",
|
|
94
|
+
"postcss": "^8.4.40",
|
|
95
|
+
"react": "^18.3.1",
|
|
96
|
+
"react-dom": "^18.3.1",
|
|
97
|
+
"react-hook-form": "^7.52.2",
|
|
98
|
+
"react-hot-toast": "^2.4.1",
|
|
99
|
+
"react-number-format": "^5.4.0",
|
|
100
|
+
"storybook": "^8.2.6",
|
|
101
|
+
"tailwind-merge": "^2.4.0",
|
|
102
|
+
"tailwindcss": "^3.4.7",
|
|
103
|
+
"tailwindcss-animate": "^1.0.7",
|
|
104
|
+
"ts-node": "^10.9.2",
|
|
105
|
+
"typescript": "^5.2.2",
|
|
106
|
+
"vite": "^5.3.4",
|
|
107
|
+
"vite-plugin-checker": "^0.7.2",
|
|
108
|
+
"vite-plugin-dts": "^4.0.2",
|
|
109
|
+
"vitest": "^2.0.5",
|
|
110
|
+
"zod": "^3.23.8"
|
|
111
|
+
},
|
|
112
|
+
"sideEffects": [
|
|
113
|
+
"**/*.css"
|
|
114
|
+
],
|
|
115
|
+
"directories": {
|
|
116
|
+
"lib": "lib"
|
|
117
|
+
},
|
|
118
|
+
"repository": {
|
|
119
|
+
"type": "git",
|
|
120
|
+
"url": "git+https://github.com/scbt-ecom/ui.git"
|
|
121
|
+
},
|
|
122
|
+
"author": "",
|
|
123
|
+
"license": "ISC",
|
|
124
|
+
"bugs": {
|
|
125
|
+
"url": "https://github.com/scbt-ecom/ui/issues"
|
|
126
|
+
},
|
|
127
|
+
"homepage": "https://github.com/scbt-ecom/ui#readme"
|
|
128
|
+
}
|