@crystaltech/hsms-shared-ui 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/LICENSE +21 -0
- package/README.md +133 -0
- package/dist/App.d.ts +65 -0
- package/dist/components/Cards.d.ts +2 -0
- package/dist/components/ColorPickerManageWithLabel.d.ts +7 -0
- package/dist/components/ColorSettings.d.ts +2 -0
- package/dist/components/CustomAutoComplete.d.ts +11 -0
- package/dist/components/CustomFilter.d.ts +9 -0
- package/dist/components/DataTable.d.ts +23 -0
- package/dist/components/DynamicTable.d.ts +10 -0
- package/dist/components/Lists.d.ts +2 -0
- package/dist/components/Logo.d.ts +8 -0
- package/dist/components/ManageCheckbox.d.ts +2 -0
- package/dist/components/MultiDynamicTable/AddNewField.d.ts +10 -0
- package/dist/components/MultiDynamicTable/ColumnVisibilityManage.d.ts +7 -0
- package/dist/components/MultiDynamicTable/FieldContent.d.ts +7 -0
- package/dist/components/MultiDynamicTable/MultiDynamicTable.d.ts +5 -0
- package/dist/components/ProfilePage.d.ts +15 -0
- package/dist/components/ProfilePages.d.ts +2 -0
- package/dist/components/TableSetting.d.ts +2 -0
- package/dist/components/Tables.d.ts +23 -0
- package/dist/components/ThemeSetting.d.ts +2 -0
- package/dist/components/ThemeToggler.d.ts +2 -0
- package/dist/components/TypographySettings.d.ts +3 -0
- package/dist/components/UiFiles.d.ts +2 -0
- package/dist/components/layout/Customization/ThemeColorSet.d.ts +2 -0
- package/dist/components/layout/Customization/index.d.ts +2 -0
- package/dist/components/layout/MainLayout/index.d.ts +21 -0
- package/dist/components/layout/MainlayoutWithWrapper.d.ts +4 -0
- package/dist/components/layout/dummyData.d.ts +15 -0
- package/dist/components/styled-components/index.d.ts +3 -0
- package/dist/components/ui/AsyncAutocomplete.d.ts +10 -0
- package/dist/components/ui/CheckboxListWithAvatar.d.ts +11 -0
- package/dist/components/ui/ControlledDatePicker.d.ts +9 -0
- package/dist/components/ui/CustomButton.d.ts +9 -0
- package/dist/components/ui/CustomCheckbox.d.ts +8 -0
- package/dist/components/ui/CustomColorPicker.d.ts +7 -0
- package/dist/components/ui/CustomDatePicker.d.ts +9 -0
- package/dist/components/ui/CustomIconButton.d.ts +6 -0
- package/dist/components/ui/CustomInput.d.ts +10 -0
- package/dist/components/ui/CustomRadioGroup.d.ts +12 -0
- package/dist/components/ui/CustomScrollbar.d.ts +8 -0
- package/dist/components/ui/CustomSelect.d.ts +13 -0
- package/dist/components/ui/CustomSelectableList.d.ts +11 -0
- package/dist/components/ui/CustomSwitch.d.ts +6 -0
- package/dist/components/ui/CustomTabs.d.ts +12 -0
- package/dist/components/ui/CustomTextfield.d.ts +8 -0
- package/dist/components/ui/Footer.d.ts +6 -0
- package/dist/components/ui/Navbar.d.ts +33 -0
- package/dist/components/ui/SideDrawer.d.ts +22 -0
- package/dist/components/ui/StatCard.d.ts +8 -0
- package/dist/contexts/ThemeContext.d.ts +12 -0
- package/dist/contexts/ThemeContextProvider.d.ts +7 -0
- package/dist/hooks/useManageTheme.d.ts +8 -0
- package/dist/images/logo.png +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +9113 -0
- package/dist/index.js +211 -0
- package/dist/main.d.ts +0 -0
- package/dist/manifest.webmanifest +1 -0
- package/dist/registerSW.js +1 -0
- package/dist/routes/index.d.ts +1 -0
- package/dist/sw.js +1 -0
- package/dist/theme/ThemeCustomization.d.ts +6 -0
- package/dist/theme/base-theme-options.d.ts +2 -0
- package/dist/theme/dark-theme-options.d.ts +19 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/light-theme-options.d.ts +43 -0
- package/dist/utils/Utils.d.ts +0 -0
- package/dist/vite.svg +1 -0
- package/dist/workbox-3e8df8c8.js +1 -0
- package/package.json +77 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Crystal Tech Developers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# hsms-shared-ui
|
|
2
|
+
|
|
3
|
+
## HSMS-UI Documentation
|
|
4
|
+
|
|
5
|
+
### Overview
|
|
6
|
+
|
|
7
|
+
`@anwarhossain1/hsms-ui` is a customizable UI component library built with React and Material-UI. It provides a structured layout system with a `MainLayout` component, theme customization, and configurable navigation options for web applications.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
To install the package, run:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install @anwarhossain1/hsms-ui@latest
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
or using Yarn:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
yarn add @anwarhossain1/hsms-ui@latest
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Importing Components
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { MainLayout, ThemeCustomization } from "@anwarhossain1/hsms-ui";
|
|
33
|
+
import { Box } from "@mui/material";
|
|
34
|
+
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
|
35
|
+
|
|
36
|
+
import { menuConfig, settingsConfig } from "./dummyData";
|
|
37
|
+
|
|
38
|
+
const layoutConfig = {
|
|
39
|
+
navbar: {
|
|
40
|
+
showHamburgerInMobile: true,
|
|
41
|
+
themeToggler: false,
|
|
42
|
+
},
|
|
43
|
+
sideDrawer: {
|
|
44
|
+
menuConfig,
|
|
45
|
+
settingsConfig: settingsConfig,
|
|
46
|
+
isMinimized: false,
|
|
47
|
+
drawerWidth: 240,
|
|
48
|
+
},
|
|
49
|
+
footerText: settingsConfig.footerText,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
function App() {
|
|
53
|
+
return (
|
|
54
|
+
<BrowserRouter>
|
|
55
|
+
<Box
|
|
56
|
+
sx={{ minHeight: "100vh", transition: "background-color 0.3s ease" }}
|
|
57
|
+
>
|
|
58
|
+
<ThemeCustomization>
|
|
59
|
+
<MainLayout layoutConfig={layoutConfig}>
|
|
60
|
+
<Routes>{/* Your routes with components */}</Routes>
|
|
61
|
+
</MainLayout>
|
|
62
|
+
</ThemeCustomization>
|
|
63
|
+
</Box>
|
|
64
|
+
</BrowserRouter>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default App;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Components
|
|
74
|
+
|
|
75
|
+
### 1. `MainLayout`
|
|
76
|
+
|
|
77
|
+
A flexible layout component that includes a Navbar, Sidebar, and Footer.
|
|
78
|
+
|
|
79
|
+
**Props:**
|
|
80
|
+
|
|
81
|
+
| Prop | Type | Description |
|
|
82
|
+
| -------------- | ------ | --------------------------------------- |
|
|
83
|
+
| `layoutConfig` | Object | Configures navbar, sidebar, and footer. |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### 2. `ThemeCustomization`
|
|
88
|
+
|
|
89
|
+
A wrapper component that provides theme customization for Material-UI.
|
|
90
|
+
|
|
91
|
+
**Usage:**
|
|
92
|
+
Wrap your application inside `<ThemeCustomization>` to apply global styles.
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
<ThemeCustomization>
|
|
96
|
+
<MainLayout layoutConfig={layoutConfig}>{/* Your content here */}</MainLayout>
|
|
97
|
+
</ThemeCustomization>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Configuration Options
|
|
103
|
+
|
|
104
|
+
The `layoutConfig` object provides the following options:
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
const layoutConfig = {
|
|
108
|
+
navbar: {
|
|
109
|
+
showHamburgerInMobile: true,
|
|
110
|
+
themeToggler: false,
|
|
111
|
+
},
|
|
112
|
+
sideDrawer: {
|
|
113
|
+
menuConfig,
|
|
114
|
+
settingsConfig,
|
|
115
|
+
isMinimized: false,
|
|
116
|
+
drawerWidth: 240,
|
|
117
|
+
},
|
|
118
|
+
footerText: "Your Footer Text Here",
|
|
119
|
+
};
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
This package is licensed under the **MIT License**.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Author
|
|
131
|
+
|
|
132
|
+
Developed by **Anwar Hossain**.
|
|
133
|
+
For questions or contributions, reach out via **GitHub**.
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface ITheme {
|
|
2
|
+
palette: {
|
|
3
|
+
mode: string;
|
|
4
|
+
navbar: {
|
|
5
|
+
background: string;
|
|
6
|
+
foreground: string;
|
|
7
|
+
};
|
|
8
|
+
sidebar: {
|
|
9
|
+
background: string;
|
|
10
|
+
foreground: string;
|
|
11
|
+
};
|
|
12
|
+
primary: {
|
|
13
|
+
main: string;
|
|
14
|
+
};
|
|
15
|
+
secondary: {
|
|
16
|
+
main: string;
|
|
17
|
+
};
|
|
18
|
+
background: {
|
|
19
|
+
default: string;
|
|
20
|
+
paper: string;
|
|
21
|
+
};
|
|
22
|
+
text: {
|
|
23
|
+
primary: string;
|
|
24
|
+
secondary: string;
|
|
25
|
+
};
|
|
26
|
+
neutral: {
|
|
27
|
+
100: string;
|
|
28
|
+
200: string;
|
|
29
|
+
300: string;
|
|
30
|
+
400: string;
|
|
31
|
+
500: string;
|
|
32
|
+
600: string;
|
|
33
|
+
700: string;
|
|
34
|
+
800: string;
|
|
35
|
+
900: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
typography: {
|
|
39
|
+
fontFamily: string;
|
|
40
|
+
h1: TypographyStyle;
|
|
41
|
+
h2: TypographyStyle;
|
|
42
|
+
h3: TypographyStyle;
|
|
43
|
+
h4: TypographyStyle;
|
|
44
|
+
h5: TypographyStyle;
|
|
45
|
+
h6: TypographyStyle;
|
|
46
|
+
subtitle1: TypographyStyle;
|
|
47
|
+
subtitle2: TypographyStyle;
|
|
48
|
+
body1: TypographyStyle;
|
|
49
|
+
body2: TypographyStyle;
|
|
50
|
+
button: TypographyStyle & {
|
|
51
|
+
textTransform: "uppercase" | "none";
|
|
52
|
+
};
|
|
53
|
+
caption: TypographyStyle;
|
|
54
|
+
overline: TypographyStyle & {
|
|
55
|
+
textTransform: "uppercase" | "none";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
interface TypographyStyle {
|
|
60
|
+
fontSize: string;
|
|
61
|
+
fontWeight: number;
|
|
62
|
+
lineHeight: string;
|
|
63
|
+
}
|
|
64
|
+
declare function App(): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export default App;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CustomColorPickerProps } from './ui/CustomColorPicker';
|
|
3
|
+
interface ColorPickerManageWithLabelProps extends CustomColorPickerProps {
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
declare const ColorPickerManageWithLabel: React.FC<ColorPickerManageWithLabelProps>;
|
|
7
|
+
export default ColorPickerManageWithLabel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface CustomAutoCompleteProps<T> {
|
|
2
|
+
options: T[];
|
|
3
|
+
defaultValue?: T[];
|
|
4
|
+
label: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
getOptionLabel: (option: T) => string;
|
|
8
|
+
onChange: (value: T[] | T | null) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const CustomAutoComplete: <T>({ options, defaultValue, label, placeholder, multiple, getOptionLabel, onChange, }: CustomAutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default CustomAutoComplete;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
interface FilterOptionsProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TableConfig<T = Record<string, string | number | boolean>> {
|
|
7
|
+
tableName: string;
|
|
8
|
+
headers: string[];
|
|
9
|
+
isSearchable: boolean;
|
|
10
|
+
showFilter: boolean;
|
|
11
|
+
filterOptions: FilterOptionsProps[];
|
|
12
|
+
searchBy?: string;
|
|
13
|
+
actions?: {
|
|
14
|
+
label: string;
|
|
15
|
+
onClick: (row: T) => void;
|
|
16
|
+
icon: JSX.Element;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
export default function DynamicTable({ config, data, }: {
|
|
20
|
+
config: TableConfig;
|
|
21
|
+
data: Array<Record<string, string | number | boolean>>;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function DynamicTable({ onSave, }: {
|
|
2
|
+
onSave: (config: {
|
|
3
|
+
tableName: string;
|
|
4
|
+
headers: string[];
|
|
5
|
+
isSearchable: boolean;
|
|
6
|
+
showFilter: boolean;
|
|
7
|
+
searchBy: string;
|
|
8
|
+
filterOptions: string[];
|
|
9
|
+
}) => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface FieldData {
|
|
2
|
+
fieldName: string;
|
|
3
|
+
fieldContent: string;
|
|
4
|
+
}
|
|
5
|
+
interface AddNewFieldProps {
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onSubmit: (addNewContentObj: FieldData) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const AddNewField: React.FC<AddNewFieldProps>;
|
|
10
|
+
export default AddNewField;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataStructure } from '../Tables';
|
|
2
|
+
interface ColumnVisibilityManageProps {
|
|
3
|
+
data: DataStructure;
|
|
4
|
+
handleColumnVisibility: (columnVisibilityData: DataStructure) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const ColumnVisibilityManage: React.FC<ColumnVisibilityManageProps>;
|
|
7
|
+
export default ColumnVisibilityManage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface ProfileData {
|
|
3
|
+
imageUrl: string;
|
|
4
|
+
name: string;
|
|
5
|
+
bio: string;
|
|
6
|
+
email: string;
|
|
7
|
+
location: string;
|
|
8
|
+
phoneNumber: string;
|
|
9
|
+
}
|
|
10
|
+
interface ProfileProps {
|
|
11
|
+
profileData: ProfileData;
|
|
12
|
+
onEditClick?: () => void;
|
|
13
|
+
}
|
|
14
|
+
declare const ProfilePage: React.FC<ProfileProps>;
|
|
15
|
+
export default ProfilePage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface DatePickerProps {
|
|
2
|
+
date: string;
|
|
3
|
+
onChange: (parentItem: FieldItem, timeValue: Date) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface FieldContentActionsProps {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: (data: FieldItem) => void;
|
|
8
|
+
icon: React.ReactNode;
|
|
9
|
+
variant: "contained" | "outlined";
|
|
10
|
+
}
|
|
11
|
+
export interface FieldItem {
|
|
12
|
+
id: number;
|
|
13
|
+
fieldName: string;
|
|
14
|
+
fieldType: string;
|
|
15
|
+
fieldContent: string | FieldContentActionsProps[] | DatePickerProps;
|
|
16
|
+
isDefault: boolean;
|
|
17
|
+
isVisible: boolean;
|
|
18
|
+
to?: string;
|
|
19
|
+
}
|
|
20
|
+
export type FieldItemArray = FieldItem[];
|
|
21
|
+
export type DataStructure = FieldItemArray[];
|
|
22
|
+
declare const Tables: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Tables;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IMenuConfig, ISettingsConfig } from '../dummyData';
|
|
3
|
+
interface LayoutConfig {
|
|
4
|
+
navbar: {
|
|
5
|
+
showHamburgerInMobile: boolean;
|
|
6
|
+
themeToggler: boolean;
|
|
7
|
+
};
|
|
8
|
+
sideDrawer: {
|
|
9
|
+
menuConfig: IMenuConfig[];
|
|
10
|
+
settingsConfig: ISettingsConfig;
|
|
11
|
+
isMinimized: boolean;
|
|
12
|
+
drawerWidth: number;
|
|
13
|
+
};
|
|
14
|
+
footerText: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IMainLayout {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
layoutConfig: LayoutConfig;
|
|
19
|
+
}
|
|
20
|
+
declare const MainLayout: React.FC<IMainLayout>;
|
|
21
|
+
export default MainLayout;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SvgIconProps } from '@mui/material';
|
|
2
|
+
export interface MenuItem {
|
|
3
|
+
label: string;
|
|
4
|
+
icon: React.ReactElement<SvgIconProps>;
|
|
5
|
+
link: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IMenuConfig {
|
|
8
|
+
items: MenuItem[];
|
|
9
|
+
}
|
|
10
|
+
export interface ISettingsConfig {
|
|
11
|
+
logo: string;
|
|
12
|
+
footerText: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const menuConfig: IMenuConfig[];
|
|
15
|
+
export declare const settingsConfig: ISettingsConfig;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface AutocompleteProps<T> {
|
|
2
|
+
label: string;
|
|
3
|
+
multiple?: boolean;
|
|
4
|
+
fetchOptions: () => Promise<T[]>;
|
|
5
|
+
getOptionLabel: (option: T) => string;
|
|
6
|
+
isOptionEqualToValue: (option: T, value: T) => boolean;
|
|
7
|
+
onChange?: (selectedOption: T | T[] | null) => void;
|
|
8
|
+
}
|
|
9
|
+
declare function AsyncAutocomplete<T>({ label, multiple, fetchOptions, getOptionLabel, isOptionEqualToValue, onChange, }: AutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default AsyncAutocomplete;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface CheckboxListWithAvatarProps {
|
|
2
|
+
items: {
|
|
3
|
+
id: number;
|
|
4
|
+
label: string;
|
|
5
|
+
avatarSrc?: string;
|
|
6
|
+
}[];
|
|
7
|
+
checkedItems?: number[];
|
|
8
|
+
onChange: (checked: number[]) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const CheckboxListWithAvatar: ({ items, checkedItems, onChange, }: CheckboxListWithAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default CheckboxListWithAvatar;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type ControlledDatePickerProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
initialValue?: string;
|
|
6
|
+
onChange?: (date: Dayjs | null) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const ControlledDatePicker: React.FC<ControlledDatePickerProps>;
|
|
9
|
+
export default ControlledDatePicker;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material/Button';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface CustomButtonProps extends ButtonProps {
|
|
4
|
+
startIcon?: React.ReactNode;
|
|
5
|
+
endIcon?: React.ReactNode;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const CustomButton: React.FC<CustomButtonProps>;
|
|
9
|
+
export default CustomButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface CustomDatePickerProps {
|
|
4
|
+
label: string;
|
|
5
|
+
value: Dayjs | null;
|
|
6
|
+
onChange: (date: Dayjs | null | undefined) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const CustomDatePicker: React.FC<CustomDatePickerProps>;
|
|
9
|
+
export default CustomDatePicker;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface CustomInputProps {
|
|
3
|
+
startIcon?: React.ReactNode;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
count?: number;
|
|
7
|
+
onClear?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const CustomInput: React.FC<CustomInputProps>;
|
|
10
|
+
export default CustomInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface RadioOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
interface CustomRadioGroupProps {
|
|
6
|
+
label: string;
|
|
7
|
+
options: RadioOption[];
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare function CustomRadioGroup({ label, options, value, onChange, }: CustomRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default CustomRadioGroup;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SelectChangeEvent } from '@mui/material/Select';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface CustomSelectProps {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
options: {
|
|
7
|
+
value: string | number;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
onChange: (event: SelectChangeEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const CustomSelect: React.FC<CustomSelectProps>;
|
|
13
|
+
export default CustomSelect;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface ListItem {
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface CustomSelectableListProps {
|
|
7
|
+
items: ListItem[];
|
|
8
|
+
onSelect?: (index: number) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const CustomSelectableList: React.FC<CustomSelectableListProps>;
|
|
11
|
+
export default CustomSelectableList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TabsProps } from '@mui/material/Tabs';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface CustomTabsProps extends TabsProps {
|
|
4
|
+
tabs: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}[];
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (event: React.SyntheticEvent, value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const CustomTabs: React.FC<CustomTabsProps>;
|
|
12
|
+
export default CustomTabs;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
|
+
type CustomTextFieldProps = Omit<TextFieldProps, "onChange" | "value"> & {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function CustomTextField({ value, onChange, label, ...props }: CustomTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CustomTextField;
|