@dadehkav/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/README.md +123 -0
- package/dist/App.d.ts +2 -0
- package/dist/components/Buttons/ClearableSubmitButton/index.d.ts +14 -0
- package/dist/components/Buttons/CollapseButton/index.d.ts +4 -0
- package/dist/components/Buttons/ConfirmButton/index.d.ts +11 -0
- package/dist/components/Buttons/SimpleButton/index.d.ts +17 -0
- package/dist/components/Buttons/StepperSubmitButton/index.d.ts +12 -0
- package/dist/components/Buttons/SubmitButton/index.d.ts +7 -0
- package/dist/components/Buttons/XButton/index.d.ts +8 -0
- package/dist/components/Card/index.d.ts +14 -0
- package/dist/components/Divider/LinearDivider/index.d.ts +11 -0
- package/dist/components/Divider/SectionDivider/index.d.ts +12 -0
- package/dist/components/FilePreview/index.d.ts +8 -0
- package/dist/components/Form/Checkbox/index.d.ts +9 -0
- package/dist/components/Form/DatePicker/index.d.ts +21 -0
- package/dist/components/Form/DropZone/index.d.ts +17 -0
- package/dist/components/Form/FieldArray/index.d.ts +19 -0
- package/dist/components/Form/FieldLabel/index.d.ts +11 -0
- package/dist/components/Form/FormField/index.d.ts +19 -0
- package/dist/components/Form/Formik/index.d.ts +14 -0
- package/dist/components/Form/SelectOption/BasicSelectOption/index.d.ts +23 -0
- package/dist/components/Form/SelectOption/MultiSelectOption/index.d.ts +26 -0
- package/dist/components/Form/TextArea/index.d.ts +22 -0
- package/dist/components/Form/TextInput/index.d.ts +28 -0
- package/dist/components/Form/Toggle/index.d.ts +5 -0
- package/dist/components/Icons/Components/ArrowLeft/index.d.ts +4 -0
- package/dist/components/Icons/Components/ArrowRight.tsx/index.d.ts +4 -0
- package/dist/components/Icons/Components/ChevronLeft/index.d.ts +4 -0
- package/dist/components/Icons/Components/ChevronRight/index.d.ts +4 -0
- package/dist/components/Icons/Components/Info/index.d.ts +4 -0
- package/dist/components/Icons/Components/Search/index.d.ts +4 -0
- package/dist/components/Icons/Components/X/index.d.ts +4 -0
- package/dist/components/Icons/index.d.ts +10 -0
- package/dist/components/InfoPopover/index.d.ts +9 -0
- package/dist/components/Layout/Grid/index.d.ts +14 -0
- package/dist/components/ListGridDetails/AdvanceListGridDetails/index.d.ts +12 -0
- package/dist/components/ListGridDetails/SimpleListGridDetails/index.d.ts +11 -0
- package/dist/components/Loading/DotLoader/index.d.ts +9 -0
- package/dist/components/Loading/Loader/index.d.ts +13 -0
- package/dist/components/Modal/index.d.ts +24 -0
- package/dist/components/NotFoundData/index.d.ts +12 -0
- package/dist/components/OverlayLoading/index.d.ts +8 -0
- package/dist/components/SimpleToggle/index.d.ts +17 -0
- package/dist/components/SweetAlert/index.d.ts +14 -0
- package/dist/components/Table/MergeTable/index.d.ts +28 -0
- package/dist/components/Table/SplitHeader/index.d.ts +19 -0
- package/dist/components/Table/Table/index.d.ts +23 -0
- package/dist/components/Timeline/index.d.ts +17 -0
- package/dist/components/ToggleWithContent/index.d.ts +15 -0
- package/dist/core/enums/Icon.enum.d.ts +9 -0
- package/dist/core/types/enum.model.d.ts +4 -0
- package/dist/core/types/icon.model.d.ts +6 -0
- package/dist/core/types/option.model.d.ts +4 -0
- package/dist/core/types/react-strap.model.d.ts +2 -0
- package/dist/core/types/table.model.d.ts +6 -0
- package/dist/core/utils/append-form-data.d.ts +10 -0
- package/dist/core/utils/calculate-sum-key-of-array.d.ts +12 -0
- package/dist/core/utils/convert-digits.d.ts +2 -0
- package/dist/core/utils/convert.d.ts +7 -0
- package/dist/core/utils/create-cell.d.ts +4 -0
- package/dist/core/utils/date-helper.d.ts +22 -0
- package/dist/core/utils/duplicate.d.ts +11 -0
- package/dist/core/utils/english-to-persian-number.d.ts +1 -0
- package/dist/core/utils/enum.d.ts +1 -0
- package/dist/core/utils/file.d.ts +4 -0
- package/dist/core/utils/filter-object.d.ts +3 -0
- package/dist/core/utils/find-by-key.d.ts +1 -0
- package/dist/core/utils/format-value.d.ts +2 -0
- package/dist/core/utils/generate-id.d.ts +4 -0
- package/dist/core/utils/generate-year-options.d.ts +2 -0
- package/dist/core/utils/get-file-postfix.d.ts +1 -0
- package/dist/core/utils/get-icon-component.d.ts +3 -0
- package/dist/core/utils/get-numeric-enum-values.d.ts +1 -0
- package/dist/core/utils/get-values-from-array.d.ts +18 -0
- package/dist/core/utils/join-with-separator.d.ts +1 -0
- package/dist/core/utils/lazy-with-retry.d.ts +7 -0
- package/dist/core/utils/money.d.ts +10 -0
- package/dist/core/utils/option.d.ts +19 -0
- package/dist/core/utils/regex.d.ts +13 -0
- package/dist/core/utils/scroll.d.ts +6 -0
- package/dist/core/utils/serve-file.d.ts +4 -0
- package/dist/core/utils/shift-map-indexes.d.ts +1 -0
- package/dist/core/utils/show-toast.d.ts +17 -0
- package/dist/core/utils/string-shorter.d.ts +1 -0
- package/dist/core/utils/to-query-string.d.ts +1 -0
- package/dist/core/utils/touch-all-fields-with-errors.d.ts +1 -0
- package/dist/core/utils/update-or-add-list.d.ts +3 -0
- package/dist/core/utils/url.d.ts +4 -0
- package/dist/core/utils/useSafeFormikContext.d.ts +6 -0
- package/dist/core/utils/validation.d.ts +3 -0
- package/dist/index.cjs +390 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.es.js +39281 -0
- package/dist/main.d.ts +0 -0
- package/dist/ui.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# @dadeKav/ui
|
|
2
|
+
|
|
3
|
+
A reusable **React UI component library** built with **TypeScript**, **Bootstrap**, and **Vite**.
|
|
4
|
+
Designed for real-world applications such as dashboards, admin panels, and form-heavy systems.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ✨ Features
|
|
9
|
+
|
|
10
|
+
- ⚛️ React 19 compatible
|
|
11
|
+
- 🧩 Fully typed components (TypeScript)
|
|
12
|
+
- 🎨 Bootstrap-based styling
|
|
13
|
+
- 📦 ES Module & CommonJS builds
|
|
14
|
+
- 🌳 Tree-shakable
|
|
15
|
+
- 📚 Storybook for development & documentation
|
|
16
|
+
- 🚫 Storybook not included in published package
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 📥 Installation
|
|
21
|
+
|
|
22
|
+
npm install @dadeKav/ui
|
|
23
|
+
# or
|
|
24
|
+
yarn add @dadeKav/ui
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ⚠️ Peer Dependencies
|
|
29
|
+
|
|
30
|
+
You must have these installed in your project:
|
|
31
|
+
|
|
32
|
+
npm install react react-dom bootstrap
|
|
33
|
+
|
|
34
|
+
> Make sure `react` and `react-dom` versions match your project.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🎨 Styling
|
|
39
|
+
|
|
40
|
+
This library uses **Bootstrap styles**, but does **not automatically include Bootstrap CSS**.
|
|
41
|
+
Import Bootstrap in your project:
|
|
42
|
+
|
|
43
|
+
import "bootstrap/dist/css/bootstrap.min.css";
|
|
44
|
+
|
|
45
|
+
### Customize Bootstrap colors
|
|
46
|
+
|
|
47
|
+
Create `custom.scss`:
|
|
48
|
+
|
|
49
|
+
$primary: #519257;
|
|
50
|
+
$success: #519257;
|
|
51
|
+
$warning: #d29f58;
|
|
52
|
+
$info: #6bc9cc;
|
|
53
|
+
$danger: #ea5455;
|
|
54
|
+
|
|
55
|
+
@import "bootstrap/scss/bootstrap";
|
|
56
|
+
|
|
57
|
+
Then import it:
|
|
58
|
+
|
|
59
|
+
import "./custom.scss";
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🚀 Basic Usage
|
|
64
|
+
|
|
65
|
+
import { SimpleButton } from "@dadeKav/ui";
|
|
66
|
+
|
|
67
|
+
function App() {
|
|
68
|
+
return <SimpleButton btnText="Click me" />;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default App;
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 🧠 TypeScript
|
|
76
|
+
|
|
77
|
+
- Fully typed components and utilities
|
|
78
|
+
- Type definitions included in package
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 📚 Storybook
|
|
83
|
+
|
|
84
|
+
For development & documentation:
|
|
85
|
+
|
|
86
|
+
npm run storybook
|
|
87
|
+
|
|
88
|
+
> Storybook files are **not published**.
|
|
89
|
+
> You can view the components locally by running the above command, or check the hosted Storybook at: `https://docdadehkavui.dadehkavdehghan.ir`
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 📂 Published Package Contents
|
|
94
|
+
|
|
95
|
+
- dist/ → compiled JS and CSS
|
|
96
|
+
- .d.ts type declarations
|
|
97
|
+
- Only production-ready files included
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 🛠 Tech Stack
|
|
102
|
+
|
|
103
|
+
- React
|
|
104
|
+
- TypeScript
|
|
105
|
+
- Vite
|
|
106
|
+
- Bootstrap
|
|
107
|
+
- Reactstrap
|
|
108
|
+
- Storybook
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🏷 Versioning
|
|
113
|
+
|
|
114
|
+
Semantic versioning:
|
|
115
|
+
|
|
116
|
+
- 0.x.x — early development
|
|
117
|
+
- 1.0.0 — first stable release
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## ❤️ Contributing
|
|
122
|
+
|
|
123
|
+
Feedback and improvements are welcome. Open an issue or PR.
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TReactStrapColor } from '../../../core/types/react-strap.model';
|
|
3
|
+
import { ISubmitButtonProps } from '../SubmitButton';
|
|
4
|
+
export interface IClearableSubmitButtonProps extends ISubmitButtonProps {
|
|
5
|
+
clearable?: boolean;
|
|
6
|
+
clearableText?: string;
|
|
7
|
+
clearBtnColor?: TReactStrapColor;
|
|
8
|
+
clearableDisabled?: boolean;
|
|
9
|
+
isClearableLoading?: boolean;
|
|
10
|
+
clearBtnOutLine?: boolean;
|
|
11
|
+
onClear?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ClearableSubmitButton: FC<IClearableSubmitButtonProps>;
|
|
14
|
+
export { ClearableSubmitButton };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, ReactElement } from 'react';
|
|
2
|
+
import { ISweetAlertProps } from '../../SweetAlert';
|
|
3
|
+
import { ISimpleButtonProps } from '../SimpleButton';
|
|
4
|
+
interface IProps extends Pick<ISweetAlertProps, "title" | "icon" | "content" | "onConfirm" | "onCancel" | "onClose" | "loading"> {
|
|
5
|
+
children?: ReactElement<{
|
|
6
|
+
onClick?: (e: MouseEvent) => void;
|
|
7
|
+
}>;
|
|
8
|
+
buttonProps?: Omit<ISimpleButtonProps, "onClick">;
|
|
9
|
+
}
|
|
10
|
+
declare const ConfirmButton: FC<IProps>;
|
|
11
|
+
export { ConfirmButton };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
import { TReactStrapColor } from '../../../core/types/react-strap.model';
|
|
3
|
+
export interface ISimpleButtonProps {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
btnText?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
outline?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
type?: "button" | "submit" | "reset";
|
|
12
|
+
color?: TReactStrapColor;
|
|
13
|
+
size?: "sm" | "md" | "lg";
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const SimpleButton: FC<ISimpleButtonProps>;
|
|
17
|
+
export { SimpleButton };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TReactStrapColor } from '../../../core/types/react-strap.model';
|
|
3
|
+
import { IClearableSubmitButtonProps } from '../ClearableSubmitButton';
|
|
4
|
+
interface IProps extends IClearableSubmitButtonProps {
|
|
5
|
+
nextTo?: string;
|
|
6
|
+
backTo?: string;
|
|
7
|
+
backToText?: string;
|
|
8
|
+
nextToText?: string;
|
|
9
|
+
navigationBtnsColor?: TReactStrapColor;
|
|
10
|
+
}
|
|
11
|
+
declare const StepperSubmitButton: FC<IProps>;
|
|
12
|
+
export { StepperSubmitButton };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
text?: string;
|
|
4
|
+
cardClassName?: string;
|
|
5
|
+
headerClassName?: string;
|
|
6
|
+
titleClassName?: string;
|
|
7
|
+
bodyClassName?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
variant?: "bordered" | "shadow";
|
|
11
|
+
headerVariant?: "default" | "plain";
|
|
12
|
+
}
|
|
13
|
+
declare const Card: FC<IProps>;
|
|
14
|
+
export { Card };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
text?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
borderColor?: string;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
fontSize?: string | number;
|
|
8
|
+
textStyle?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
declare const LinearDivider: FC<IProps>;
|
|
11
|
+
export { LinearDivider };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
textHeader?: string;
|
|
5
|
+
classNames?: string;
|
|
6
|
+
borderColor?: string;
|
|
7
|
+
headerBgColor?: string;
|
|
8
|
+
contentPadding?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare const SectionDivider: FC<IProps>;
|
|
12
|
+
export { SectionDivider };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DayValue } from '@hassanmojab/react-modern-calendar-datepicker';
|
|
2
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
3
|
+
import { IInfoPopoverProps } from '../../InfoPopover';
|
|
4
|
+
interface IProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
labelText?: string;
|
|
8
|
+
significant?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
customLabelStyle?: CSSProperties;
|
|
12
|
+
customInputStyle?: CSSProperties;
|
|
13
|
+
generalStyle?: Record<string, string>;
|
|
14
|
+
infoPopover?: IInfoPopoverProps;
|
|
15
|
+
leftIcon?: ReactNode;
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
minimumDate?: DayValue;
|
|
18
|
+
maximumDate?: DayValue;
|
|
19
|
+
}
|
|
20
|
+
export declare const DatePicker: FC<IProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export type MimeImage = "image/jpeg" | "image/jpg" | "image/png" | "image/gif" | "image/webp" | "image/tif" | "image/tiff";
|
|
3
|
+
export type MimeDocument = "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
4
|
+
export type AllowedMimeType = MimeImage | MimeDocument;
|
|
5
|
+
export type DropzoneAccept = AllowedMimeType | AllowedMimeType[];
|
|
6
|
+
export interface IProps {
|
|
7
|
+
name: string;
|
|
8
|
+
significant?: boolean;
|
|
9
|
+
labelText?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
isSingle?: boolean;
|
|
12
|
+
toggleModal?: () => void;
|
|
13
|
+
acceptedFileTypes?: DropzoneAccept;
|
|
14
|
+
showSelectedFiles?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const DropZone: FC<IProps>;
|
|
17
|
+
export { DropZone };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { FieldArrayRenderProps } from 'formik';
|
|
3
|
+
interface IProps<T = {}> {
|
|
4
|
+
name: string;
|
|
5
|
+
newSampleItem?: T;
|
|
6
|
+
headerTitle?: string;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
hideRemoveFor?: boolean[];
|
|
9
|
+
canAdd?: boolean;
|
|
10
|
+
canRemove?: boolean;
|
|
11
|
+
onRemove?: (index: number) => void;
|
|
12
|
+
classNames?: string;
|
|
13
|
+
children: ReactElement<{
|
|
14
|
+
index?: number;
|
|
15
|
+
arrayHelpers?: FieldArrayRenderProps;
|
|
16
|
+
}> | ((index: number, arrayHelpers: FieldArrayRenderProps) => ReactNode);
|
|
17
|
+
}
|
|
18
|
+
declare function FieldArray<T = {}>({ name, newSampleItem, headerTitle, isDisabled, hideRemoveFor, canAdd, canRemove, onRemove, children, classNames, }: IProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { FieldArray };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { IInfoPopoverProps } from '../../InfoPopover';
|
|
3
|
+
interface IProps {
|
|
4
|
+
significant: boolean;
|
|
5
|
+
labelText?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
infoPopover?: IInfoPopoverProps;
|
|
8
|
+
customStyle?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
declare const FieldLabel: FC<IProps>;
|
|
11
|
+
export { FieldLabel };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FieldProps } from 'formik';
|
|
2
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
3
|
+
import { IInfoPopoverProps } from '../../InfoPopover';
|
|
4
|
+
interface IProps {
|
|
5
|
+
name: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
labelText?: string;
|
|
8
|
+
significant?: boolean;
|
|
9
|
+
customLabelStyle?: CSSProperties;
|
|
10
|
+
infoPopover?: IInfoPopoverProps;
|
|
11
|
+
generalStyle?: Record<string, string>;
|
|
12
|
+
leftIcon?: ReactNode;
|
|
13
|
+
rightIcon?: ReactNode;
|
|
14
|
+
type?: string;
|
|
15
|
+
value?: any;
|
|
16
|
+
children: (props: FieldProps) => ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const FormField: FC<IProps>;
|
|
19
|
+
export { FormField };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FormikConfig, FormikHelpers, FormikProps, FormikValues } from 'formik';
|
|
3
|
+
interface IProps<TValues extends FormikValues> {
|
|
4
|
+
children: ReactNode | ((form: FormikProps<TValues>) => ReactNode);
|
|
5
|
+
initialValues: TValues;
|
|
6
|
+
validationSchema?: FormikConfig<TValues>["validationSchema"];
|
|
7
|
+
enableReinitialize?: boolean;
|
|
8
|
+
onSubmit: (values: TValues, formikHelpers: FormikHelpers<TValues>) => void | Promise<any>;
|
|
9
|
+
className?: string;
|
|
10
|
+
noValidate?: boolean;
|
|
11
|
+
noEnter?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Formik: <TValues extends FormikValues>({ children, initialValues, validationSchema, enableReinitialize, onSubmit, className, noValidate, noEnter, }: IProps<TValues>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { Formik };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties, FC, FocusEventHandler } from 'react';
|
|
2
|
+
import { GroupBase, OptionsOrGroups } from 'react-select';
|
|
3
|
+
import { TOption } from '../../../../core/types/option.model';
|
|
4
|
+
import { IInfoPopoverProps } from '../../../InfoPopover';
|
|
5
|
+
export interface IProps {
|
|
6
|
+
id?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
significant?: boolean;
|
|
9
|
+
labelText?: string;
|
|
10
|
+
options: OptionsOrGroups<TOption, GroupBase<TOption>>;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
selectedDefault?: TOption;
|
|
13
|
+
placeHolder?: string;
|
|
14
|
+
onChange?: (opt: TOption | null, e: any) => void;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
isClearable?: boolean;
|
|
17
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
18
|
+
generalStyle?: Record<string, string>;
|
|
19
|
+
infoPopover?: IInfoPopoverProps;
|
|
20
|
+
customLabelStyle?: CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
declare const BasicSelectOption: FC<IProps>;
|
|
23
|
+
export default BasicSelectOption;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CSSProperties, FC, FocusEventHandler } from 'react';
|
|
2
|
+
import { GroupBase, MultiValue, OptionsOrGroups } from 'react-select';
|
|
3
|
+
import { TOption } from '../../../../core/types/option.model';
|
|
4
|
+
import { IInfoPopoverProps } from '../../../InfoPopover';
|
|
5
|
+
interface IProps {
|
|
6
|
+
options: OptionsOrGroups<TOption, GroupBase<TOption>>;
|
|
7
|
+
id?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
placeHolder?: string;
|
|
10
|
+
labelText?: string;
|
|
11
|
+
significant?: boolean;
|
|
12
|
+
selectedDefault?: TOption[];
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
onChange?: (opt: MultiValue<{
|
|
16
|
+
value: string | number;
|
|
17
|
+
label: string | number;
|
|
18
|
+
}> | null) => void;
|
|
19
|
+
isClearable?: boolean;
|
|
20
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
21
|
+
generalStyle?: Record<string, string>;
|
|
22
|
+
infoPopover?: IInfoPopoverProps;
|
|
23
|
+
customLabelStyle?: CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
declare const MultiSelectOption: FC<IProps>;
|
|
26
|
+
export { MultiSelectOption };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
import { IInfoPopoverProps } from '../../InfoPopover';
|
|
3
|
+
interface IProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
significant?: boolean;
|
|
7
|
+
labelText?: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
value?: string | number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
singleSpace?: boolean;
|
|
13
|
+
onChange?: (val: string | number) => void;
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
leftIcon?: ReactNode;
|
|
16
|
+
customLabelStyle?: CSSProperties;
|
|
17
|
+
customInputStyle?: CSSProperties;
|
|
18
|
+
generalStyle?: Record<string, string>;
|
|
19
|
+
infoPopover?: IInfoPopoverProps;
|
|
20
|
+
}
|
|
21
|
+
declare const TextArea: FC<IProps>;
|
|
22
|
+
export { TextArea };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode, Ref } from 'react';
|
|
2
|
+
import { TextInputType } from '../../../core/types/react-strap.model';
|
|
3
|
+
import { IInfoPopoverProps } from '../../InfoPopover';
|
|
4
|
+
type Size = "sm" | "lg";
|
|
5
|
+
interface IProps {
|
|
6
|
+
passRef?: Ref<HTMLInputElement>;
|
|
7
|
+
id?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
significant?: boolean;
|
|
10
|
+
size?: Size;
|
|
11
|
+
labelText?: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
type?: TextInputType;
|
|
14
|
+
value?: string | number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
novalidate?: boolean;
|
|
18
|
+
singleSpace?: boolean;
|
|
19
|
+
onChange?: (val: string | number) => void;
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
leftIcon?: ReactNode;
|
|
22
|
+
customLabelStyle?: CSSProperties;
|
|
23
|
+
customInputStyle?: CSSProperties;
|
|
24
|
+
generalStyle?: Record<string, string>;
|
|
25
|
+
infoPopover?: IInfoPopoverProps;
|
|
26
|
+
}
|
|
27
|
+
declare const TextInput: FC<IProps>;
|
|
28
|
+
export { TextInput };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, SVGProps } from 'react';
|
|
2
|
+
import { IconEnum } from '../../core/enums/Icon.enum';
|
|
3
|
+
interface IProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
name: IconEnum;
|
|
5
|
+
size?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Icon: FC<IProps>;
|
|
10
|
+
export { Icon };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
rowClassName?: string;
|
|
5
|
+
colClassName?: string;
|
|
6
|
+
xs?: number | string;
|
|
7
|
+
sm?: number | string;
|
|
8
|
+
md?: number | string;
|
|
9
|
+
lg?: number | string;
|
|
10
|
+
xl?: number | string;
|
|
11
|
+
gap?: number | string;
|
|
12
|
+
}
|
|
13
|
+
declare const Grid: FC<IProps>;
|
|
14
|
+
export { Grid };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type ValueType = string | number | boolean | null | undefined;
|
|
2
|
+
export interface IAdvanceInfoItem<T> {
|
|
3
|
+
path?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
format?: (value: ValueType, data?: T) => string;
|
|
6
|
+
}
|
|
7
|
+
interface IProps<T> {
|
|
8
|
+
data: T;
|
|
9
|
+
items: IAdvanceInfoItem<T>[][];
|
|
10
|
+
}
|
|
11
|
+
export declare const AdvanceListGridDetails: <T>({ data, items }: IProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface ISimpleInfoItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value?: string | number | boolean | ReactNode | null;
|
|
5
|
+
}
|
|
6
|
+
interface IProps {
|
|
7
|
+
data: ISimpleInfoItem[];
|
|
8
|
+
showEmptyValues?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const SimpleListGridDetails: FC<IProps>;
|
|
11
|
+
export { SimpleListGridDetails };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC, CSSProperties } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
type?: "circular" | "dots";
|
|
4
|
+
size?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
position?: "center" | "flex-start" | "flex-end";
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare const Loader: FC<IProps>;
|
|
13
|
+
export { Loader };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
toggle?: () => void;
|
|
5
|
+
title: string;
|
|
6
|
+
subTitle?: string;
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
8
|
+
fullscreen?: boolean;
|
|
9
|
+
showBackButton?: boolean;
|
|
10
|
+
BackButton?: boolean;
|
|
11
|
+
titleClassName?: string;
|
|
12
|
+
subTitleClassName?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const Modal: FC<IProps> & {
|
|
17
|
+
Body: FC<{
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}>;
|
|
20
|
+
Footer: FC<{
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
export { Modal };
|