master-components-react-ts 1.0.0
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 +8 -0
- package/dist/App.d.ts +2 -0
- package/dist/assets/Icons/IconArrowUp.d.ts +7 -0
- package/dist/assets/Icons/IconBoldArrow.d.ts +7 -0
- package/dist/assets/Icons/IconCalendar.d.ts +7 -0
- package/dist/assets/Icons/IconCheckCircle.d.ts +7 -0
- package/dist/assets/Icons/IconCheckFillCircle.d.ts +7 -0
- package/dist/assets/Icons/IconCheckmark.d.ts +7 -0
- package/dist/assets/Icons/IconCircle.d.ts +7 -0
- package/dist/assets/Icons/IconClock.d.ts +7 -0
- package/dist/assets/Icons/IconClose.d.ts +15 -0
- package/dist/assets/Icons/IconConfigure.d.ts +7 -0
- package/dist/assets/Icons/IconCopy.d.ts +7 -0
- package/dist/assets/Icons/IconDot.d.ts +7 -0
- package/dist/assets/Icons/IconDown.d.ts +7 -0
- package/dist/assets/Icons/IconDrag.d.ts +7 -0
- package/dist/assets/Icons/IconEdit.d.ts +7 -0
- package/dist/assets/Icons/IconEmoji.d.ts +7 -0
- package/dist/assets/Icons/IconErrorDash.d.ts +7 -0
- package/dist/assets/Icons/IconFile.d.ts +6 -0
- package/dist/assets/Icons/IconHelpCircle.d.ts +7 -0
- package/dist/assets/Icons/IconInfoCircle.d.ts +6 -0
- package/dist/assets/Icons/IconLeft.d.ts +6 -0
- package/dist/assets/Icons/IconLoading.d.ts +7 -0
- package/dist/assets/Icons/IconLoadingButton.d.ts +5 -0
- package/dist/assets/Icons/IconMail.d.ts +7 -0
- package/dist/assets/Icons/IconMinus.d.ts +7 -0
- package/dist/assets/Icons/IconMinusWithCircle.d.ts +6 -0
- package/dist/assets/Icons/IconMunus.d.ts +6 -0
- package/dist/assets/Icons/IconPlus.d.ts +6 -0
- package/dist/assets/Icons/IconRedCircleMinus.d.ts +6 -0
- package/dist/assets/Icons/IconRight.d.ts +7 -0
- package/dist/assets/Icons/IconSave.d.ts +6 -0
- package/dist/assets/Icons/IconSearch.d.ts +6 -0
- package/dist/assets/Icons/IconSuccess.d.ts +6 -0
- package/dist/assets/Icons/IconTrash.d.ts +6 -0
- package/dist/assets/Icons/IconUpload.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +14 -0
- package/dist/components/DatePicker/Calendar.d.ts +3 -0
- package/dist/components/DatePicker/Calendar.types.d.ts +39 -0
- package/dist/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +50 -0
- package/dist/components/FormInput/FormInput.d.ts +3 -0
- package/dist/components/FormInput/FormInput.types.d.ts +68 -0
- package/dist/components/MainButton/MainButton.d.ts +3 -0
- package/dist/components/MainButton/MainButton.types.d.ts +21 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.types.d.ts +20 -0
- package/dist/components/Textarea/Textarea.d.ts +3 -0
- package/dist/components/Textarea/Textarea.types.d.ts +31 -0
- package/dist/components/Toggle/Textarea.types.d.ts +17 -0
- package/dist/components/Toggle/Toggle.d.ts +3 -0
- package/dist/context/NamespaceContext.d.ts +3 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/main.d.ts +0 -0
- package/dist/master-components-react-ts.cjs.js +53 -0
- package/dist/master-components-react-ts.es.js +2235 -0
- package/dist/utils/Countries.d.ts +15 -0
- package/dist/utils/Data.d.ts +50 -0
- package/dist/utils/Helpers.d.ts +8 -0
- package/dist/utils/getEmojies.d.ts +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# React + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface IconCloseProps {
|
|
2
|
+
width?: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
xmlns?: string;
|
|
6
|
+
viewBox?: string;
|
|
7
|
+
fill?: string;
|
|
8
|
+
d?: string;
|
|
9
|
+
stroke?: string;
|
|
10
|
+
strokeWidth?: string;
|
|
11
|
+
strokeLinecap?: 'round' | 'inherit' | 'butt' | 'square';
|
|
12
|
+
strokeLinejoin?: 'round' | 'inherit' | 'miter' | 'bevel';
|
|
13
|
+
}
|
|
14
|
+
export declare const IconClose: ({ width, height, color, xmlns, viewBox, fill, d, stroke, strokeWidth, strokeLinecap, strokeLinejoin, }: IconCloseProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**Checkbox Component Props */
|
|
3
|
+
export interface CheckboxProps {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
change?: (e: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
multipleChecked?: boolean;
|
|
9
|
+
size?: 'sm' | 'md';
|
|
10
|
+
activeStyle?: CSSProperties;
|
|
11
|
+
checkBoxStyle?: CSSProperties;
|
|
12
|
+
withActive?: boolean;
|
|
13
|
+
theme?: 'light' | 'dark';
|
|
14
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CalendarProps } from './Calendar.types';
|
|
2
|
+
declare const Calendar: ({ valueFormat, quickPick, onChange, CurrentMonth, setCurrentMonth, SelectedDate, namespace, customYears, setSelectedDate, IsFocused, setIsFocused, mode, RangeSelection, setRangeSelection, type, disabledDatesRange, disabledDatesTill, disabledDatesFrom, CalendarRef, defaultValue, selectedStyle, endDateStyle, startDateStyle, inRangeStyle, otherMonthStyle, todayStyle, weekDayStyle, quickPickStyle, monthStyle, theme, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Calendar;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Dayjs } from 'dayjs';
|
|
3
|
+
import { PickerValue, RangeValue, SingleValue } from './DatePicker.types';
|
|
4
|
+
/**Calendar Component Props */
|
|
5
|
+
export interface CalendarProps {
|
|
6
|
+
valueFormat: string;
|
|
7
|
+
quickPick: boolean;
|
|
8
|
+
onChange: (value: PickerValue) => void;
|
|
9
|
+
CurrentMonth: Dayjs;
|
|
10
|
+
setCurrentMonth: React.Dispatch<React.SetStateAction<Dayjs>>;
|
|
11
|
+
SelectedDate: SingleValue;
|
|
12
|
+
namespace: string;
|
|
13
|
+
customYears: SingleValue[];
|
|
14
|
+
setSelectedDate: React.Dispatch<React.SetStateAction<SingleValue>>;
|
|
15
|
+
IsFocused: boolean;
|
|
16
|
+
setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
|
+
mode: 'single' | 'range';
|
|
18
|
+
RangeSelection: RangeValue;
|
|
19
|
+
setRangeSelection: React.Dispatch<React.SetStateAction<RangeValue>>;
|
|
20
|
+
type: 'single' | 'dual';
|
|
21
|
+
disabledDatesRange: [SingleValue, SingleValue];
|
|
22
|
+
disabledDatesTill: SingleValue;
|
|
23
|
+
disabledDatesFrom: SingleValue;
|
|
24
|
+
CalendarRef: React.RefObject<HTMLDivElement>;
|
|
25
|
+
defaultValue: {
|
|
26
|
+
state: boolean;
|
|
27
|
+
value: PickerValue;
|
|
28
|
+
};
|
|
29
|
+
selectedStyle: CSSProperties;
|
|
30
|
+
endDateStyle: CSSProperties;
|
|
31
|
+
startDateStyle: CSSProperties;
|
|
32
|
+
inRangeStyle: CSSProperties;
|
|
33
|
+
otherMonthStyle: CSSProperties;
|
|
34
|
+
todayStyle: CSSProperties;
|
|
35
|
+
weekDayStyle: CSSProperties;
|
|
36
|
+
quickPickStyle: CSSProperties;
|
|
37
|
+
monthStyle: CSSProperties;
|
|
38
|
+
theme: 'light' | 'dark';
|
|
39
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DatePickerProps } from './DatePicker.types';
|
|
2
|
+
declare const DatePicker: ({ label, required, msg, defaultValue, size, valueFormat, onChange, onBlur, onFocus, customYears, fixedDropdown, disabledDatesFrom, disabledDatesTill, disabledDatesRange, datepickerStyle, placeholder, datepickerLabelStyle, requiredStyle, datepickerHelperTextStyle, selectedStyle, endDateStyle, startDateStyle, inRangeStyle, otherMonthStyle, todayStyle, weekDayStyle, quickPickStyle, monthStyle, quickPick, mode, type, theme, disabled, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default DatePicker;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Dayjs } from 'dayjs';
|
|
3
|
+
export type DateOrString = Dayjs | Date | string | null;
|
|
4
|
+
export type SingleValue = DateOrString;
|
|
5
|
+
export type RangeValue = {
|
|
6
|
+
start: DateOrString;
|
|
7
|
+
end: DateOrString;
|
|
8
|
+
};
|
|
9
|
+
export type PickerValue = SingleValue | RangeValue;
|
|
10
|
+
/**DatePicker Component Props */
|
|
11
|
+
export interface DatePickerProps {
|
|
12
|
+
label?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
msg?: {
|
|
15
|
+
error?: string;
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
text?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
};
|
|
20
|
+
defaultValue?: PickerValue;
|
|
21
|
+
size?: 'sm' | 'md';
|
|
22
|
+
valueFormat?: string;
|
|
23
|
+
onChange?: (value: PickerValue) => void;
|
|
24
|
+
onBlur?: () => void;
|
|
25
|
+
onFocus?: () => void;
|
|
26
|
+
customYears?: SingleValue[];
|
|
27
|
+
fixedDropdown?: boolean;
|
|
28
|
+
disabledDatesFrom?: SingleValue;
|
|
29
|
+
disabledDatesTill?: SingleValue;
|
|
30
|
+
disabledDatesRange?: [SingleValue, SingleValue];
|
|
31
|
+
datepickerStyle?: CSSProperties;
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
datepickerLabelStyle?: CSSProperties;
|
|
34
|
+
requiredStyle?: CSSProperties;
|
|
35
|
+
datepickerHelperTextStyle?: CSSProperties;
|
|
36
|
+
selectedStyle?: CSSProperties;
|
|
37
|
+
endDateStyle?: CSSProperties;
|
|
38
|
+
startDateStyle?: CSSProperties;
|
|
39
|
+
inRangeStyle?: CSSProperties;
|
|
40
|
+
otherMonthStyle?: CSSProperties;
|
|
41
|
+
todayStyle?: CSSProperties;
|
|
42
|
+
weekDayStyle?: CSSProperties;
|
|
43
|
+
quickPickStyle?: CSSProperties;
|
|
44
|
+
monthStyle?: CSSProperties;
|
|
45
|
+
quickPick?: boolean;
|
|
46
|
+
mode?: 'single' | 'range';
|
|
47
|
+
type?: 'single' | 'dual';
|
|
48
|
+
theme?: 'light' | 'dark';
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FormInputProps } from './FormInput.types';
|
|
2
|
+
declare const FormInput: ({ label, placeholder, required, disabled, type, size, onChange, onFocus, onBlur, msg, readOnly, maxLength, onlyText, tagValues, customAction, onRightIconIconClick, onRightIconIconMouseEnter, onRightIconIconMouseLeave, onLeftIconIconClick, onLeftIconIconMouseEnter, onLeftIconIconMouseLeave, onPressEnter, rightIcon, leftIcon, value, fixedDropdown, withDropDown, dropdownData, dropDownPosition, onSelectData, withTags, tagProps, withLink, withCopy, onCopy, inputWrapperStyle, inputLabelStyle, requiredStyle, inputContainerStyle, leftIconStyle, customActionStyle, inputDropDownStyle, ulStyle, liStyle, httpStyle, inputStyle, rightIconStyle, withCopyStyle, inputHelperTextStyle, theme, }: FormInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FormInput;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TagProps } from '../Tag/Tag.types';
|
|
3
|
+
/**Button Component Props */
|
|
4
|
+
export interface FormInputProps {
|
|
5
|
+
label?: string | React.ReactNode;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
type?: string;
|
|
10
|
+
size?: string;
|
|
11
|
+
onChange?: (e: any) => void;
|
|
12
|
+
onFocus?: (e: any) => void;
|
|
13
|
+
onBlur?: (e: any) => void;
|
|
14
|
+
msg?: {
|
|
15
|
+
error?: string;
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
text?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
};
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
onlyText?: boolean;
|
|
23
|
+
tagValues?: string[];
|
|
24
|
+
customAction?: React.ReactNode;
|
|
25
|
+
onRightIconIconClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
26
|
+
onRightIconIconMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
27
|
+
onRightIconIconMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
28
|
+
onLeftIconIconClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
29
|
+
onLeftIconIconMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
30
|
+
onLeftIconIconMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
31
|
+
onPressEnter?: (e: string) => void;
|
|
32
|
+
rightIcon?: React.ReactNode;
|
|
33
|
+
leftIcon?: React.ReactNode;
|
|
34
|
+
value?: string;
|
|
35
|
+
fixedDropdown?: boolean;
|
|
36
|
+
withDropDown?: boolean;
|
|
37
|
+
dropdownData?: {
|
|
38
|
+
id: number;
|
|
39
|
+
label: string;
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}[];
|
|
42
|
+
dropDownPosition?: 'left' | 'right';
|
|
43
|
+
onSelectData?: (e: {
|
|
44
|
+
id: number;
|
|
45
|
+
label: string;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}) => void;
|
|
48
|
+
withTags?: boolean;
|
|
49
|
+
tagProps?: TagProps;
|
|
50
|
+
withLink?: boolean;
|
|
51
|
+
withCopy?: boolean;
|
|
52
|
+
onCopy?: (e: any) => void;
|
|
53
|
+
inputWrapperStyle?: CSSProperties;
|
|
54
|
+
inputLabelStyle?: CSSProperties;
|
|
55
|
+
requiredStyle?: CSSProperties;
|
|
56
|
+
inputContainerStyle?: CSSProperties;
|
|
57
|
+
leftIconStyle?: CSSProperties;
|
|
58
|
+
customActionStyle?: CSSProperties;
|
|
59
|
+
inputDropDownStyle?: CSSProperties;
|
|
60
|
+
ulStyle?: CSSProperties;
|
|
61
|
+
liStyle?: CSSProperties;
|
|
62
|
+
httpStyle?: CSSProperties;
|
|
63
|
+
inputStyle?: CSSProperties;
|
|
64
|
+
rightIconStyle?: CSSProperties;
|
|
65
|
+
withCopyStyle?: CSSProperties;
|
|
66
|
+
inputHelperTextStyle?: CSSProperties;
|
|
67
|
+
theme?: 'light' | 'dark';
|
|
68
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ButtonProps } from './MainButton.types';
|
|
2
|
+
declare const MainButton: ({ label, type, buttonType, size, disabled, loading, withIcons, iconOne, iconTwo, onlyIcon, buttonStyle, labelStyle, disabledButtonStyle, buttonSlotStyle, loadingColor, theme, onClick, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default MainButton;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**Button Component Props */
|
|
3
|
+
export interface ButtonProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
type?: 'button' | 'reset' | 'submit';
|
|
6
|
+
buttonType?: 'default' | 'error' | 'border' | 'nonBorder' | 'borderWithColor';
|
|
7
|
+
onClick?: (e: any) => void;
|
|
8
|
+
size?: 'md' | 'sm' | 'lg';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
withIcons?: boolean;
|
|
12
|
+
iconOne?: React.ReactNode;
|
|
13
|
+
iconTwo?: React.ReactNode;
|
|
14
|
+
onlyIcon?: boolean;
|
|
15
|
+
buttonStyle?: CSSProperties;
|
|
16
|
+
labelStyle?: CSSProperties;
|
|
17
|
+
disabledButtonStyle?: CSSProperties;
|
|
18
|
+
buttonSlotStyle?: CSSProperties;
|
|
19
|
+
loadingColor?: string;
|
|
20
|
+
theme?: 'light' | 'dark';
|
|
21
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TagProps } from './Tag.types';
|
|
2
|
+
declare const Tag: ({ id, label, icon, withClose, withCheckbox, withNumber, number, checkboxProps, disable, size, onClose, tagContainerStyle, tagLabelStyle, tagNumberStyle, tagCloseStlye, theme, }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Tag;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**Tag Component Props */
|
|
3
|
+
export interface TagProps {
|
|
4
|
+
id?: string | number;
|
|
5
|
+
label?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
withClose?: boolean;
|
|
8
|
+
withCheckbox?: boolean;
|
|
9
|
+
withNumber?: boolean;
|
|
10
|
+
number?: number;
|
|
11
|
+
checkboxProps?: any;
|
|
12
|
+
disable?: boolean;
|
|
13
|
+
size?: string;
|
|
14
|
+
onClose?: (e: any) => void;
|
|
15
|
+
tagContainerStyle?: CSSProperties;
|
|
16
|
+
tagLabelStyle?: CSSProperties;
|
|
17
|
+
tagNumberStyle?: CSSProperties;
|
|
18
|
+
tagCloseStlye?: CSSProperties;
|
|
19
|
+
theme?: 'light' | 'dark';
|
|
20
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TextareaProps } from './Textarea.types';
|
|
2
|
+
declare const Textarea: ({ placeholder, label, msg, cols, rows, value, withEmoji, maxLength, withResize, onChange, onFocus, onBlur, disabled, required, textareaContainerStyle, textareaLabelStyle, requiredStyle, textareaStyle, focusStyle, textareaHelperTextStyle, labelIcon, theme, }: TextareaProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Textarea;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**Textarea Component Props */
|
|
3
|
+
export interface TextareaProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
msg?: {
|
|
7
|
+
error?: string;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
text?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
};
|
|
12
|
+
cols?: number;
|
|
13
|
+
rows?: number;
|
|
14
|
+
value?: string;
|
|
15
|
+
withEmoji?: boolean;
|
|
16
|
+
maxLength?: number;
|
|
17
|
+
withResize?: boolean;
|
|
18
|
+
onChange?: (e: any) => void;
|
|
19
|
+
onFocus?: (e: any) => void;
|
|
20
|
+
onBlur?: (e: any) => void;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
textareaContainerStyle?: CSSProperties;
|
|
24
|
+
textareaLabelStyle?: CSSProperties;
|
|
25
|
+
requiredStyle?: CSSProperties;
|
|
26
|
+
textareaStyle?: CSSProperties;
|
|
27
|
+
focusStyle?: CSSProperties;
|
|
28
|
+
textareaHelperTextStyle?: CSSProperties;
|
|
29
|
+
labelIcon?: React.ReactNode;
|
|
30
|
+
theme?: 'light' | 'dark';
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**Toggle Component Props */
|
|
3
|
+
export interface ToggleProps {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
change?: (e: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
withActive?: boolean;
|
|
9
|
+
activeStyle?: CSSProperties;
|
|
10
|
+
bgStyle?: CSSProperties;
|
|
11
|
+
checkedBgStyle?: CSSProperties;
|
|
12
|
+
disabledBgStyle?: CSSProperties;
|
|
13
|
+
circleStyle?: CSSProperties;
|
|
14
|
+
checkedCircleStyle?: CSSProperties;
|
|
15
|
+
disabledCircleStyle?: CSSProperties;
|
|
16
|
+
theme?: 'light' | 'dark';
|
|
17
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ToggleProps } from './Textarea.types';
|
|
2
|
+
declare const Toggle: ({ checked, change, disabled, required, withActive, activeStyle, bgStyle, checkedBgStyle, disabledBgStyle, circleStyle, checkedCircleStyle, disabledCircleStyle, theme, }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Toggle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDebounce: () => (callback: () => void, delay: number) => void;
|