@rkosafo/cai.components 0.0.1 → 0.0.3
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/dist/baseEditor/index.svelte +32 -0
- package/dist/baseEditor/index.svelte.d.ts +18 -0
- package/dist/builders/filters/FilterBuilder.svelte +638 -0
- package/dist/builders/filters/FilterBuilder.svelte.d.ts +4 -0
- package/dist/builders/filters/index.d.ts +1 -0
- package/dist/builders/filters/index.js +1 -0
- package/dist/forms/FormCheckbox/FormCheckbox.svelte +53 -0
- package/dist/forms/FormCheckbox/FormCheckbox.svelte.d.ts +4 -0
- package/dist/forms/FormCheckbox/index.d.ts +1 -0
- package/dist/forms/FormCheckbox/index.js +1 -0
- package/dist/forms/FormDatepicker/FormDatepicker.svelte +159 -0
- package/dist/forms/FormDatepicker/FormDatepicker.svelte.d.ts +13 -0
- package/dist/forms/FormDatepicker/index.d.ts +1 -0
- package/dist/forms/FormDatepicker/index.js +1 -0
- package/dist/forms/FormInput/FormInput.svelte +87 -0
- package/dist/forms/FormInput/FormInput.svelte.d.ts +4 -0
- package/dist/forms/FormInput/index.d.ts +1 -0
- package/dist/forms/FormInput/index.js +1 -0
- package/dist/forms/FormRadio/FormRadio.svelte +53 -0
- package/dist/forms/FormRadio/FormRadio.svelte.d.ts +4 -0
- package/dist/forms/FormRadio/index.d.ts +1 -0
- package/dist/forms/FormRadio/index.js +1 -0
- package/dist/forms/FormSelect/FormSelect.svelte +86 -0
- package/dist/forms/FormSelect/FormSelect.svelte.d.ts +4 -0
- package/dist/forms/FormSelect/index.d.ts +1 -0
- package/dist/forms/FormSelect/index.js +1 -0
- package/dist/forms/FormTextarea/FormTextarea.svelte +77 -0
- package/dist/forms/FormTextarea/FormTextarea.svelte.d.ts +4 -0
- package/dist/forms/FormTextarea/index.d.ts +1 -0
- package/dist/forms/FormTextarea/index.js +1 -0
- package/dist/forms/checkbox/Checkbox.svelte +82 -0
- package/dist/forms/checkbox/Checkbox.svelte.d.ts +4 -0
- package/dist/forms/checkbox/CheckboxButton.svelte +92 -0
- package/dist/forms/checkbox/CheckboxButton.svelte.d.ts +18 -0
- package/dist/forms/checkbox/index.d.ts +3 -0
- package/dist/forms/checkbox/index.js +3 -0
- package/dist/forms/checkbox/theme.d.ts +317 -0
- package/dist/forms/checkbox/theme.js +113 -0
- package/dist/forms/datepicker/Datepicker.svelte +706 -0
- package/dist/forms/datepicker/Datepicker.svelte.d.ts +41 -0
- package/dist/forms/datepicker/index.d.ts +2 -0
- package/dist/forms/datepicker/index.js +2 -0
- package/dist/forms/datepicker/theme.d.ts +385 -0
- package/dist/forms/datepicker/theme.js +56 -0
- package/dist/forms/form/Form.svelte +69 -0
- package/dist/forms/form/Form.svelte.d.ts +6 -0
- package/dist/forms/form/index.d.ts +2 -0
- package/dist/forms/form/index.js +2 -0
- package/dist/forms/input/Input.svelte +363 -0
- package/dist/forms/input/Input.svelte.d.ts +4 -0
- package/dist/forms/input/index.d.ts +4 -0
- package/dist/forms/input/index.js +5 -0
- package/dist/forms/input/theme.d.ts +301 -0
- package/dist/forms/input/theme.js +100 -0
- package/dist/forms/label/Label.svelte +38 -0
- package/dist/forms/label/Label.svelte.d.ts +15 -0
- package/dist/forms/label/index.d.ts +2 -0
- package/dist/forms/label/index.js +2 -0
- package/dist/forms/label/theme.d.ts +75 -0
- package/dist/forms/label/theme.js +29 -0
- package/dist/forms/radio/Radio.svelte +48 -0
- package/dist/forms/radio/Radio.svelte.d.ts +25 -0
- package/dist/forms/radio/RadioButton.svelte +22 -0
- package/dist/forms/radio/RadioButton.svelte.d.ts +25 -0
- package/dist/forms/radio/index.d.ts +3 -0
- package/dist/forms/radio/index.js +3 -0
- package/dist/forms/radio/theme.d.ts +290 -0
- package/dist/forms/radio/theme.js +95 -0
- package/dist/forms/select/Select.svelte +50 -0
- package/dist/forms/select/Select.svelte.d.ts +4 -0
- package/dist/forms/select/index.d.ts +1 -0
- package/dist/forms/select/index.js +1 -0
- package/dist/forms/textarea/Textarea.svelte +165 -0
- package/dist/forms/textarea/Textarea.svelte.d.ts +4 -0
- package/dist/forms/textarea/index.d.ts +2 -0
- package/dist/forms/textarea/index.js +2 -0
- package/dist/forms/textarea/theme.d.ts +100 -0
- package/dist/forms/textarea/theme.js +35 -0
- package/dist/index.d.ts +42 -2
- package/dist/index.js +42 -2
- package/dist/layout/TF/Content/Content.svelte +28 -0
- package/dist/layout/TF/Content/Content.svelte.d.ts +8 -0
- package/dist/layout/TF/Content/index.d.ts +1 -0
- package/dist/layout/TF/Content/index.js +1 -0
- package/dist/layout/TF/Header/Header.svelte +159 -0
- package/dist/layout/TF/Header/Header.svelte.d.ts +21 -0
- package/dist/layout/TF/Header/index.d.ts +1 -0
- package/dist/layout/TF/Header/index.js +1 -0
- package/dist/layout/TF/Sidebar/Sidebar.svelte +74 -0
- package/dist/layout/TF/Sidebar/Sidebar.svelte.d.ts +23 -0
- package/dist/layout/TF/Sidebar/index.d.ts +1 -0
- package/dist/layout/TF/Sidebar/index.js +1 -0
- package/dist/layout/TF/Wrapper/Wrapper.svelte +17 -0
- package/dist/layout/TF/Wrapper/Wrapper.svelte.d.ts +8 -0
- package/dist/layout/TF/Wrapper/index.d.ts +1 -0
- package/dist/layout/TF/Wrapper/index.js +1 -0
- package/dist/layout/TF/index.d.ts +5 -0
- package/dist/layout/TF/index.js +5 -0
- package/dist/themes/ThemeProvider.svelte +20 -0
- package/dist/themes/ThemeProvider.svelte.d.ts +9 -0
- package/dist/themes/index.d.ts +7 -0
- package/dist/themes/index.js +1 -0
- package/dist/themes/themeUtils.d.ts +24 -0
- package/dist/themes/themeUtils.js +74 -0
- package/dist/themes/themes.d.ts +18 -0
- package/dist/themes/themes.js +18 -0
- package/dist/types/index.d.ts +755 -0
- package/dist/types/index.js +1 -0
- package/dist/typography/heading/Heading.svelte +35 -0
- package/dist/typography/heading/Heading.svelte.d.ts +10 -0
- package/dist/typography/heading/index.d.ts +2 -0
- package/dist/typography/heading/index.js +2 -0
- package/dist/typography/heading/theme.d.ts +30 -0
- package/dist/typography/heading/theme.js +17 -0
- package/dist/ui/accordion/Accordion.svelte +49 -0
- package/dist/ui/accordion/Accordion.svelte.d.ts +4 -0
- package/dist/ui/accordion/AccordionItem.svelte +173 -0
- package/dist/ui/accordion/AccordionItem.svelte.d.ts +4 -0
- package/dist/ui/accordion/index.d.ts +3 -0
- package/dist/ui/accordion/index.js +3 -0
- package/dist/ui/accordion/theme.d.ts +96 -0
- package/dist/ui/accordion/theme.js +59 -0
- package/dist/ui/alert/Alert.svelte +83 -0
- package/dist/ui/alert/Alert.svelte.d.ts +5 -0
- package/dist/ui/alert/index.d.ts +2 -0
- package/dist/ui/alert/index.js +2 -0
- package/dist/ui/alert/theme.d.ts +108 -0
- package/dist/ui/alert/theme.js +149 -0
- package/dist/ui/alertDialog/AlertDialog.svelte +40 -0
- package/dist/ui/alertDialog/AlertDialog.svelte.d.ts +4 -0
- package/dist/ui/alertDialog/index.d.ts +1 -0
- package/dist/ui/alertDialog/index.js +1 -0
- package/dist/ui/avatar/Avatar.svelte +77 -0
- package/dist/ui/avatar/Avatar.svelte.d.ts +4 -0
- package/dist/ui/avatar/index.d.ts +2 -0
- package/dist/ui/avatar/index.js +2 -0
- package/dist/ui/avatar/theme.d.ts +63 -0
- package/dist/ui/avatar/theme.js +31 -0
- package/dist/ui/buttons/Button.svelte +102 -0
- package/dist/ui/buttons/Button.svelte.d.ts +4 -0
- package/dist/ui/buttons/GradientButton.svelte +59 -0
- package/dist/ui/buttons/GradientButton.svelte.d.ts +4 -0
- package/dist/ui/buttons/index.d.ts +3 -0
- package/dist/ui/buttons/index.js +3 -0
- package/dist/ui/buttons/theme.d.ts +704 -0
- package/dist/ui/buttons/theme.js +332 -0
- package/dist/ui/datatable/Datatable.svelte +516 -0
- package/dist/ui/datatable/Datatable.svelte.d.ts +5 -0
- package/dist/ui/datatable/index.d.ts +2 -0
- package/dist/ui/datatable/index.js +2 -0
- package/dist/ui/drawer/Drawer.svelte +280 -0
- package/dist/ui/drawer/Drawer.svelte.d.ts +37 -0
- package/dist/ui/drawer/index.d.ts +2 -0
- package/dist/ui/drawer/index.js +2 -0
- package/dist/ui/drawer/theme.d.ts +211 -0
- package/dist/ui/drawer/theme.js +46 -0
- package/dist/ui/dropdown/Dropdown.svelte +36 -0
- package/dist/ui/dropdown/Dropdown.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownDivider.svelte +11 -0
- package/dist/ui/dropdown/DropdownDivider.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownGroup.svelte +14 -0
- package/dist/ui/dropdown/DropdownGroup.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownHeader.svelte +14 -0
- package/dist/ui/dropdown/DropdownHeader.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownItem.svelte +52 -0
- package/dist/ui/dropdown/DropdownItem.svelte.d.ts +4 -0
- package/dist/ui/dropdown/index.d.ts +6 -0
- package/dist/ui/dropdown/index.js +6 -0
- package/dist/ui/dropdown/theme.d.ts +55 -0
- package/dist/ui/dropdown/theme.js +20 -0
- package/dist/ui/footer/Footer.svelte +15 -0
- package/dist/ui/footer/Footer.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterBrand.svelte +37 -0
- package/dist/ui/footer/FooterBrand.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterCopyright.svelte +45 -0
- package/dist/ui/footer/FooterCopyright.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterIcon.svelte +22 -0
- package/dist/ui/footer/FooterIcon.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterLink.svelte +33 -0
- package/dist/ui/footer/FooterLink.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterLinkGroup.svelte +13 -0
- package/dist/ui/footer/FooterLinkGroup.svelte.d.ts +4 -0
- package/dist/ui/footer/index.d.ts +7 -0
- package/dist/ui/footer/index.js +7 -0
- package/dist/ui/footer/theme.d.ts +137 -0
- package/dist/ui/footer/theme.js +39 -0
- package/dist/ui/indicator/Indicator.svelte +42 -0
- package/dist/ui/indicator/Indicator.svelte.d.ts +4 -0
- package/dist/ui/indicator/index.d.ts +2 -0
- package/dist/ui/indicator/index.js +2 -0
- package/dist/ui/indicator/theme.d.ts +177 -0
- package/dist/ui/indicator/theme.js +114 -0
- package/dist/ui/modal/Modal.svelte +265 -0
- package/dist/ui/modal/Modal.svelte.d.ts +38 -0
- package/dist/ui/modal/index.d.ts +2 -0
- package/dist/ui/modal/index.js +2 -0
- package/dist/ui/modal/theme.d.ts +190 -0
- package/dist/ui/modal/theme.js +41 -0
- package/dist/ui/notificationList/NotificationList.svelte +123 -0
- package/dist/ui/notificationList/NotificationList.svelte.d.ts +25 -0
- package/dist/ui/notificationList/index.d.ts +1 -0
- package/dist/ui/notificationList/index.js +1 -0
- package/dist/ui/pageLoader/PageLoader.svelte +10 -0
- package/dist/ui/pageLoader/PageLoader.svelte.d.ts +4 -0
- package/dist/ui/pageLoader/index.d.ts +1 -0
- package/dist/ui/pageLoader/index.js +1 -0
- package/dist/ui/paginate/Paginate.svelte +96 -0
- package/dist/ui/paginate/Paginate.svelte.d.ts +4 -0
- package/dist/ui/paginate/index.d.ts +1 -0
- package/dist/ui/paginate/index.js +1 -0
- package/dist/ui/tab/Tab.svelte +65 -0
- package/dist/ui/tab/Tab.svelte.d.ts +4 -0
- package/dist/ui/tab/index.d.ts +2 -0
- package/dist/ui/tab/index.js +2 -0
- package/dist/ui/tab/theme.d.ts +135 -0
- package/dist/ui/tab/theme.js +83 -0
- package/dist/ui/table/Table.svelte +385 -0
- package/dist/ui/table/Table.svelte.d.ts +4 -0
- package/dist/ui/table/index.d.ts +1 -0
- package/dist/ui/table/index.js +1 -0
- package/dist/ui/tableLoader/TableLoader.svelte +24 -0
- package/dist/ui/tableLoader/TableLoader.svelte.d.ts +13 -0
- package/dist/ui/tableLoader/index.d.ts +1 -0
- package/dist/ui/tableLoader/index.js +1 -0
- package/dist/ui/toolbar/Toolbar.svelte +59 -0
- package/dist/ui/toolbar/Toolbar.svelte.d.ts +17 -0
- package/dist/ui/toolbar/ToolbarButton.svelte +56 -0
- package/dist/ui/toolbar/ToolbarButton.svelte.d.ts +17 -0
- package/dist/ui/toolbar/ToolbarGroup.svelte +43 -0
- package/dist/ui/toolbar/ToolbarGroup.svelte.d.ts +16 -0
- package/dist/ui/toolbar/index.d.ts +4 -0
- package/dist/ui/toolbar/index.js +4 -0
- package/dist/ui/toolbar/theme.d.ts +320 -0
- package/dist/ui/toolbar/theme.js +155 -0
- package/dist/utils/Popper.svelte +257 -0
- package/dist/utils/Popper.svelte.d.ts +4 -0
- package/dist/utils/action.d.ts +16 -0
- package/dist/utils/action.js +107 -0
- package/dist/utils/closeButton/CloseButton.svelte +88 -0
- package/dist/utils/closeButton/CloseButton.svelte.d.ts +12 -0
- package/dist/utils/closeButton/index.d.ts +2 -0
- package/dist/utils/closeButton/index.js +2 -0
- package/dist/utils/closeButton/theme.d.ts +100 -0
- package/dist/utils/closeButton/theme.js +69 -0
- package/dist/utils/dismissable.d.ts +9 -0
- package/dist/utils/dismissable.js +16 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +35 -0
- package/dist/utils/paginate.svelte.d.ts +22 -0
- package/dist/utils/paginate.svelte.js +167 -0
- package/dist/utils/singleSelection.svelte.d.ts +15 -0
- package/dist/utils/singleSelection.svelte.js +49 -0
- package/dist/utils/svelte-legos.d.ts +7 -0
- package/dist/utils/svelte-legos.js +14 -0
- package/package.json +24 -2
|
@@ -0,0 +1,755 @@
|
|
|
1
|
+
import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLDialogAttributes, HTMLInputAttributes, HTMLLabelAttributes, HTMLTextareaAttributes } from 'svelte/elements';
|
|
2
|
+
import type { Middleware, Placement, Strategy } from '@floating-ui/dom';
|
|
3
|
+
import type { Component, Snippet } from 'svelte';
|
|
4
|
+
import type { BlurParams, FadeParams, FlyParams, ScaleParams, SlideParams, TransitionConfig } from 'svelte/transition';
|
|
5
|
+
import type { AlertVariants } from '../ui/alert/theme.js';
|
|
6
|
+
import type { AvatarVariants } from '../ui/avatar/theme.js';
|
|
7
|
+
import type { ButtonVariants, GradientButtonVariantes } from '../ui/buttons/theme.js';
|
|
8
|
+
import type { ClassValue } from 'clsx';
|
|
9
|
+
import type { DropdownItemVariants } from '../ui/dropdown/theme.js';
|
|
10
|
+
import type { FooterCopyrightVariants, FooterLinkVariants } from '../ui/footer/theme.js';
|
|
11
|
+
import type { IndicatorVariants } from '../ui/indicator/theme.js';
|
|
12
|
+
import type { ModalVariants } from '../ui/modal/theme.js';
|
|
13
|
+
import type { CloseButtonVariants } from '../utils/closeButton/theme.js';
|
|
14
|
+
import type { InputVariants } from '../forms/input/theme.js';
|
|
15
|
+
import type { LabelVariants } from '../forms/label/theme.js';
|
|
16
|
+
import type { ToolbarButtonVariants, ToolbarGroupVariants, ToolbarVariants } from '../ui/toolbar/theme.js';
|
|
17
|
+
import type { DatepickerVariants } from '../forms/datepicker/theme.js';
|
|
18
|
+
import type { Day } from 'date-fns';
|
|
19
|
+
import type { DrawerVariants } from '../ui/drawer/theme.js';
|
|
20
|
+
import type { TextareaVariants } from '../forms/textarea/theme.js';
|
|
21
|
+
import type { RadioVariants } from '../forms/radio/theme.js';
|
|
22
|
+
import type { CheckboxVariants } from '../forms/checkbox/theme.js';
|
|
23
|
+
import type { AccordionItemVariants, AccordionVariants } from '../ui/accordion/theme.js';
|
|
24
|
+
import type { TabsVaraints } from '../ui/tab/theme.js';
|
|
25
|
+
export type ParamsType = FadeParams | BlurParams | FlyParams | SlideParams | ScaleParams | undefined;
|
|
26
|
+
export type TransitionFunc = (node: HTMLElement, params: ParamsType) => TransitionConfig;
|
|
27
|
+
export interface TriggeredToggleEvent extends ToggleEvent {
|
|
28
|
+
trigger: HTMLElement;
|
|
29
|
+
}
|
|
30
|
+
export interface PopperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onbeforetoggle' | 'ontoggle'> {
|
|
31
|
+
triggeredBy?: string;
|
|
32
|
+
triggerDelay?: number;
|
|
33
|
+
trigger?: 'hover' | 'click';
|
|
34
|
+
placement?: Placement;
|
|
35
|
+
arrow?: boolean;
|
|
36
|
+
arrowClass?: string;
|
|
37
|
+
offset?: number;
|
|
38
|
+
yOnly?: boolean;
|
|
39
|
+
strategy?: Strategy;
|
|
40
|
+
reference?: string;
|
|
41
|
+
middlewares?: Middleware[];
|
|
42
|
+
children: Snippet;
|
|
43
|
+
onbeforetoggle?: (ev: TriggeredToggleEvent) => void;
|
|
44
|
+
ontoggle?: (ev: TriggeredToggleEvent) => void;
|
|
45
|
+
transition?: TransitionFunc;
|
|
46
|
+
transitionParams?: ParamsType;
|
|
47
|
+
isOpen?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface LinkType {
|
|
50
|
+
name: string;
|
|
51
|
+
href?: string;
|
|
52
|
+
rel?: string;
|
|
53
|
+
active?: boolean;
|
|
54
|
+
[propName: string]: any;
|
|
55
|
+
}
|
|
56
|
+
export type AnchorButtonAttributes = ({
|
|
57
|
+
href: string;
|
|
58
|
+
} & HTMLAnchorAttributes) | ({
|
|
59
|
+
href?: undefined;
|
|
60
|
+
} & HTMLButtonAttributes);
|
|
61
|
+
export type AnchorDivAttributes = ({
|
|
62
|
+
href: string;
|
|
63
|
+
} & HTMLAnchorAttributes) | ({
|
|
64
|
+
href?: undefined;
|
|
65
|
+
} & HTMLAttributes<HTMLDivElement>);
|
|
66
|
+
export type AnchorButtonDivAttributes = ({
|
|
67
|
+
href: string;
|
|
68
|
+
} & HTMLAnchorAttributes) | ({
|
|
69
|
+
href?: undefined;
|
|
70
|
+
onclick: Function;
|
|
71
|
+
} & HTMLButtonAttributes) | ({
|
|
72
|
+
href?: undefined;
|
|
73
|
+
onclick?: undefined;
|
|
74
|
+
} & HTMLAttributes<HTMLDivElement>);
|
|
75
|
+
export declare const xs = "xs";
|
|
76
|
+
export declare const sm = "sm";
|
|
77
|
+
export declare const md = "md";
|
|
78
|
+
export declare const lg = "lg";
|
|
79
|
+
export declare const xl = "xl";
|
|
80
|
+
export declare type SizeType = typeof xs | typeof sm | typeof md | typeof lg | typeof xl;
|
|
81
|
+
export type HTMLButtonOrAnchorAttributes = Omit<HTMLButtonAttributes & HTMLAnchorAttributes, 'color'>;
|
|
82
|
+
export interface AlertProps extends Omit<AlertVariants, 'icon'>, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
83
|
+
children: Snippet;
|
|
84
|
+
icon?: Snippet;
|
|
85
|
+
alertStatus?: boolean;
|
|
86
|
+
closeIcon?: Component;
|
|
87
|
+
transition?: TransitionFunc;
|
|
88
|
+
params?: ParamsType;
|
|
89
|
+
onclick?: () => void;
|
|
90
|
+
}
|
|
91
|
+
export interface AvatarProps extends AvatarVariants, HTMLAttributes<HTMLDivElement> {
|
|
92
|
+
children?: Snippet;
|
|
93
|
+
indicator?: Snippet;
|
|
94
|
+
href?: HTMLAnchorAttributes['href'];
|
|
95
|
+
target?: HTMLAnchorAttributes['target'];
|
|
96
|
+
src?: string;
|
|
97
|
+
dot?: object;
|
|
98
|
+
alt?: string;
|
|
99
|
+
onclick?: () => void;
|
|
100
|
+
}
|
|
101
|
+
export type ButtonProps = ButtonVariants & AnchorButtonAttributes & {
|
|
102
|
+
tag?: string;
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
outline?: boolean;
|
|
105
|
+
shadow?: boolean;
|
|
106
|
+
loading?: boolean;
|
|
107
|
+
leadingIcon?: Snippet;
|
|
108
|
+
trailingIcon?: Snippet;
|
|
109
|
+
ripple?: boolean;
|
|
110
|
+
};
|
|
111
|
+
export interface GradientButtonProps extends GradientButtonVariantes, HTMLButtonOrAnchorAttributes {
|
|
112
|
+
tag?: string;
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
href?: string;
|
|
115
|
+
btnClass?: ClassValue;
|
|
116
|
+
leadingIcon?: Snippet;
|
|
117
|
+
trailingIcon?: Snippet;
|
|
118
|
+
}
|
|
119
|
+
export interface DropdownProps extends PopperProps {
|
|
120
|
+
simple?: boolean;
|
|
121
|
+
activeUrl?: string;
|
|
122
|
+
isOpen?: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface DropdownDividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
125
|
+
}
|
|
126
|
+
export interface DropdownGroupProps extends HTMLAttributes<HTMLUListElement> {
|
|
127
|
+
children: Snippet;
|
|
128
|
+
}
|
|
129
|
+
export interface DropdownHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
130
|
+
children: Snippet;
|
|
131
|
+
}
|
|
132
|
+
export type DropdownItemAnchorButtonAttributes = HTMLAnchorAttributes & Omit<HTMLButtonAttributes, keyof HTMLAnchorAttributes | 'type'>;
|
|
133
|
+
export type DropdownItemProps = DropdownItemVariants & AnchorButtonDivAttributes & {
|
|
134
|
+
children: Snippet;
|
|
135
|
+
aClass?: ClassValue;
|
|
136
|
+
activeClass?: ClassValue;
|
|
137
|
+
liClass?: ClassValue;
|
|
138
|
+
};
|
|
139
|
+
export type FooterType = 'default' | 'sticky' | 'sitemap' | 'socialmedia' | 'logo' | undefined;
|
|
140
|
+
export interface FooterProps extends HTMLAttributes<HTMLElement> {
|
|
141
|
+
children: Snippet;
|
|
142
|
+
footerType?: FooterType;
|
|
143
|
+
}
|
|
144
|
+
export interface FooterBrandProps extends HTMLAnchorAttributes {
|
|
145
|
+
children?: Snippet;
|
|
146
|
+
aClass?: ClassValue;
|
|
147
|
+
spanClass?: ClassValue;
|
|
148
|
+
imgClass?: ClassValue;
|
|
149
|
+
href?: string;
|
|
150
|
+
src?: string;
|
|
151
|
+
alt?: string;
|
|
152
|
+
name?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface FooterCopyrightProps extends FooterCopyrightVariants, HTMLAnchorAttributes {
|
|
155
|
+
spanClass?: ClassValue;
|
|
156
|
+
aClass?: ClassValue;
|
|
157
|
+
href?: string;
|
|
158
|
+
by?: string;
|
|
159
|
+
copyrightMessage?: string;
|
|
160
|
+
year?: number;
|
|
161
|
+
bySpanClass?: ClassValue;
|
|
162
|
+
}
|
|
163
|
+
export interface FooterIconProps extends HTMLAnchorAttributes {
|
|
164
|
+
children: Snippet;
|
|
165
|
+
href?: string;
|
|
166
|
+
ariaLabel?: string;
|
|
167
|
+
}
|
|
168
|
+
export interface FooterLinkProps extends FooterLinkVariants, HTMLAnchorAttributes {
|
|
169
|
+
children: Snippet;
|
|
170
|
+
liClass?: ClassValue;
|
|
171
|
+
aClass?: ClassValue;
|
|
172
|
+
href?: string;
|
|
173
|
+
}
|
|
174
|
+
export interface FooterLinkGroupProps extends HTMLAttributes<HTMLUListElement> {
|
|
175
|
+
children: Snippet;
|
|
176
|
+
}
|
|
177
|
+
export interface IndicatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
178
|
+
children?: Snippet;
|
|
179
|
+
color?: IndicatorVariants['color'];
|
|
180
|
+
cornerStyle?: IndicatorVariants['cornerStyle'];
|
|
181
|
+
size?: IndicatorVariants['size'];
|
|
182
|
+
border?: boolean;
|
|
183
|
+
placement?: IndicatorVariants['placement'];
|
|
184
|
+
offset?: boolean;
|
|
185
|
+
}
|
|
186
|
+
export interface ModalProps extends ModalVariants, HTMLDialogAttributes {
|
|
187
|
+
onaction?: ({ action, data }: {
|
|
188
|
+
action: string;
|
|
189
|
+
data: FormData;
|
|
190
|
+
}) => any;
|
|
191
|
+
modal?: boolean;
|
|
192
|
+
form?: boolean;
|
|
193
|
+
autoclose?: boolean;
|
|
194
|
+
outsideclose?: boolean;
|
|
195
|
+
dismissable?: boolean;
|
|
196
|
+
permanent?: boolean;
|
|
197
|
+
focustrap?: boolean;
|
|
198
|
+
transition?: TransitionFunc;
|
|
199
|
+
params?: ParamsType;
|
|
200
|
+
header?: Snippet;
|
|
201
|
+
footer?: Snippet;
|
|
202
|
+
headerClass?: ClassValue;
|
|
203
|
+
bodyClass?: ClassValue;
|
|
204
|
+
footerClass?: ClassValue;
|
|
205
|
+
closeBtnClass?: ClassValue;
|
|
206
|
+
fullscreen?: boolean;
|
|
207
|
+
}
|
|
208
|
+
export interface NotificationItem {
|
|
209
|
+
id?: string | number;
|
|
210
|
+
icon?: string;
|
|
211
|
+
isRead?: boolean;
|
|
212
|
+
time?: string;
|
|
213
|
+
content?: string;
|
|
214
|
+
sender?: string;
|
|
215
|
+
}
|
|
216
|
+
export interface NotificationListProps<T extends NotificationItem> {
|
|
217
|
+
open?: boolean;
|
|
218
|
+
onClearNotifications?: () => void;
|
|
219
|
+
header?: Snippet;
|
|
220
|
+
busy?: boolean;
|
|
221
|
+
data?: T[];
|
|
222
|
+
onclick?: (item: T) => void;
|
|
223
|
+
footer?: Snippet;
|
|
224
|
+
read?: () => Promise<T[]> | T[];
|
|
225
|
+
}
|
|
226
|
+
export interface PageLoaderProps {
|
|
227
|
+
size?: number;
|
|
228
|
+
iconColor?: string;
|
|
229
|
+
}
|
|
230
|
+
export type InputValue = string | number | string[] | undefined;
|
|
231
|
+
export interface InputProps<T extends InputValue = string> extends InputVariants, Omit<HTMLInputAttributes, 'size' | 'children' | 'value'> {
|
|
232
|
+
children?: Snippet<[
|
|
233
|
+
{
|
|
234
|
+
class: string;
|
|
235
|
+
} & Omit<InputProps<T>, 'children' | 'left' | 'right' | 'size'>
|
|
236
|
+
]>;
|
|
237
|
+
left?: Snippet;
|
|
238
|
+
right?: Snippet;
|
|
239
|
+
size?: InputVariants['size'];
|
|
240
|
+
value?: T;
|
|
241
|
+
elementRef?: HTMLInputElement;
|
|
242
|
+
color?: InputVariants['color'];
|
|
243
|
+
leftClass?: ClassValue;
|
|
244
|
+
rightClass?: ClassValue;
|
|
245
|
+
divClass?: ClassValue;
|
|
246
|
+
wrapperClass?: ClassValue;
|
|
247
|
+
clearable?: boolean;
|
|
248
|
+
clearableSvgClass?: ClassValue;
|
|
249
|
+
clearableColor?: CloseButtonVariants['color'];
|
|
250
|
+
clearableClass?: ClassValue;
|
|
251
|
+
clearableOnClick?: () => void;
|
|
252
|
+
data?: string[];
|
|
253
|
+
maxSuggestions?: number;
|
|
254
|
+
onSelect?: (item: string) => void;
|
|
255
|
+
comboClass?: ClassValue;
|
|
256
|
+
comboItemClass?: ClassValue;
|
|
257
|
+
oninput?: (event: Event) => void;
|
|
258
|
+
onfocus?: (event: FocusEvent) => void;
|
|
259
|
+
onblur?: (event: FocusEvent) => void;
|
|
260
|
+
onkeydown?: (event: KeyboardEvent) => void;
|
|
261
|
+
}
|
|
262
|
+
export interface LabelProps extends HTMLLabelAttributes {
|
|
263
|
+
children: Snippet;
|
|
264
|
+
color?: LabelVariants['color'];
|
|
265
|
+
show?: boolean;
|
|
266
|
+
}
|
|
267
|
+
export interface ToolbarProps extends ToolbarVariants, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
268
|
+
end?: Snippet;
|
|
269
|
+
}
|
|
270
|
+
export interface ToolbarGroupProps extends ToolbarGroupVariants, HTMLAttributes<HTMLDivElement> {
|
|
271
|
+
}
|
|
272
|
+
export type ToolbarButtonProps = ToolbarButtonVariants & AnchorButtonAttributes & {
|
|
273
|
+
name?: string;
|
|
274
|
+
};
|
|
275
|
+
export type DateOrRange = Date | {
|
|
276
|
+
from?: Date;
|
|
277
|
+
to?: Date;
|
|
278
|
+
};
|
|
279
|
+
export interface DatepickerProps extends DatepickerVariants, Omit<HTMLAttributes<HTMLDivElement>, 'onselect'> {
|
|
280
|
+
value?: Date;
|
|
281
|
+
defaultDate?: Date | null;
|
|
282
|
+
range?: boolean;
|
|
283
|
+
rangeFrom?: Date;
|
|
284
|
+
rangeTo?: Date;
|
|
285
|
+
availableFrom?: Date | null;
|
|
286
|
+
availableTo?: Date | null;
|
|
287
|
+
locale?: string;
|
|
288
|
+
firstDayOfWeek?: Day;
|
|
289
|
+
dateFormat?: Intl.DateTimeFormatOptions;
|
|
290
|
+
placeholder?: string;
|
|
291
|
+
disabled?: boolean;
|
|
292
|
+
required?: boolean;
|
|
293
|
+
color?: ButtonProps['color'];
|
|
294
|
+
inline?: boolean;
|
|
295
|
+
autohide?: boolean;
|
|
296
|
+
showActionButtons?: boolean;
|
|
297
|
+
title?: string;
|
|
298
|
+
onselect?: (x: DateOrRange) => void;
|
|
299
|
+
onclear?: () => void;
|
|
300
|
+
onapply?: (x: DateOrRange) => void;
|
|
301
|
+
inputmode?: HTMLInputAttributes['inputmode'];
|
|
302
|
+
monthColor?: ButtonProps['color'];
|
|
303
|
+
btnClass?: ClassValue;
|
|
304
|
+
inputClass?: ClassValue;
|
|
305
|
+
monthBtnSelected?: ClassValue;
|
|
306
|
+
monthBtn?: ClassValue;
|
|
307
|
+
translationLocale?: string;
|
|
308
|
+
elementRef?: HTMLInputElement;
|
|
309
|
+
name?: string | undefined | null;
|
|
310
|
+
}
|
|
311
|
+
export interface DrawerProps extends DrawerVariants, HTMLAttributes<HTMLDivElement> {
|
|
312
|
+
hidden: boolean;
|
|
313
|
+
closeDrawer?: () => void;
|
|
314
|
+
activateClickOutside?: boolean;
|
|
315
|
+
backdrop?: boolean;
|
|
316
|
+
backdropClass?: ClassValue;
|
|
317
|
+
transitionParams?: ParamsType;
|
|
318
|
+
transitionType?: TransitionFunc;
|
|
319
|
+
bodyScrolling?: boolean;
|
|
320
|
+
onaction?: ({ action, data }: {
|
|
321
|
+
action: string;
|
|
322
|
+
data: FormData;
|
|
323
|
+
}) => any;
|
|
324
|
+
form?: boolean;
|
|
325
|
+
dismissable?: boolean;
|
|
326
|
+
closeBtnClass?: ClassValue;
|
|
327
|
+
headerClass?: ClassValue;
|
|
328
|
+
bodyClass?: ClassValue;
|
|
329
|
+
footerClass?: ClassValue;
|
|
330
|
+
header?: Snippet;
|
|
331
|
+
footer?: Snippet;
|
|
332
|
+
permanent?: boolean;
|
|
333
|
+
autoclose?: boolean;
|
|
334
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
335
|
+
}
|
|
336
|
+
export interface TextareaProps extends TextareaVariants, HTMLTextareaAttributes {
|
|
337
|
+
header?: Snippet;
|
|
338
|
+
footer?: Snippet;
|
|
339
|
+
addon?: Snippet;
|
|
340
|
+
value?: string;
|
|
341
|
+
elementRef?: HTMLTextAreaElement;
|
|
342
|
+
wrapped?: boolean;
|
|
343
|
+
divClass?: ClassValue;
|
|
344
|
+
innerClass?: ClassValue;
|
|
345
|
+
headerClass?: ClassValue;
|
|
346
|
+
footerClass?: ClassValue;
|
|
347
|
+
addonClass?: ClassValue;
|
|
348
|
+
clearable?: boolean;
|
|
349
|
+
clearableSvgClass?: ClassValue;
|
|
350
|
+
clearableColor?: CloseButtonVariants['color'];
|
|
351
|
+
clearableClass?: ClassValue;
|
|
352
|
+
clearableOnClick?: () => void;
|
|
353
|
+
textareaClass?: ClassValue;
|
|
354
|
+
}
|
|
355
|
+
export interface SelectProps {
|
|
356
|
+
hasError?: boolean;
|
|
357
|
+
hasSuccess?: boolean;
|
|
358
|
+
minHeight?: number;
|
|
359
|
+
placeholder?: string;
|
|
360
|
+
valueAsObject?: boolean;
|
|
361
|
+
creatable?: boolean;
|
|
362
|
+
multiple?: boolean;
|
|
363
|
+
searchable?: boolean;
|
|
364
|
+
labelAsValue?: boolean;
|
|
365
|
+
disabled?: boolean;
|
|
366
|
+
clearable?: boolean;
|
|
367
|
+
name?: string;
|
|
368
|
+
inputId?: string;
|
|
369
|
+
required?: boolean;
|
|
370
|
+
options?: Array<any> | object;
|
|
371
|
+
valueField?: string | null;
|
|
372
|
+
labelField?: string | null;
|
|
373
|
+
groupLabelField?: string;
|
|
374
|
+
groupItemsField?: string;
|
|
375
|
+
disabledField?: string;
|
|
376
|
+
renderer?: ((item: object, selectionSection?: boolean, inputValue?: string) => string) | string;
|
|
377
|
+
disableHighlight?: boolean;
|
|
378
|
+
highlightFirstItem?: boolean;
|
|
379
|
+
selectOnTab?: boolean | 'select-navigate';
|
|
380
|
+
resetOnBlur?: boolean;
|
|
381
|
+
resetOnSelect?: boolean;
|
|
382
|
+
closeAfterSelect?: string | boolean;
|
|
383
|
+
deselectMode?: 'native' | 'toggle' | 'none';
|
|
384
|
+
dndzone?: Function;
|
|
385
|
+
strictMode?: boolean;
|
|
386
|
+
max?: number;
|
|
387
|
+
collapseSelection?: 'blur' | 'always' | null;
|
|
388
|
+
keepSelectionInList?: boolean | 'auto';
|
|
389
|
+
creatablePrefix?: string;
|
|
390
|
+
allowEditing?: boolean;
|
|
391
|
+
keepCreated?: boolean;
|
|
392
|
+
delimiter?: string;
|
|
393
|
+
createFilter?: (inputValue: string) => boolean;
|
|
394
|
+
createHandler?: (prop: {
|
|
395
|
+
inputValue: string;
|
|
396
|
+
valueField: string;
|
|
397
|
+
labelField: string;
|
|
398
|
+
prefix: string;
|
|
399
|
+
}) => Promise<object> | object;
|
|
400
|
+
fetch?: string | null;
|
|
401
|
+
fetchProps?: object | Function;
|
|
402
|
+
fetchMode?: 'auto' | 'init';
|
|
403
|
+
fetchCallback?: Function;
|
|
404
|
+
fetchResetOnBlur?: boolean;
|
|
405
|
+
fetchDebounceTime?: number;
|
|
406
|
+
minQuery?: number;
|
|
407
|
+
lazyDropdown?: boolean;
|
|
408
|
+
virtualList?: boolean;
|
|
409
|
+
vlItemSize?: number;
|
|
410
|
+
i18n?: object;
|
|
411
|
+
value?: any[] | string | number | object | null;
|
|
412
|
+
readSelection?: object | object[] | null;
|
|
413
|
+
parentValue?: string | number | null | undefined;
|
|
414
|
+
emitValues?: boolean;
|
|
415
|
+
onChange?: Function;
|
|
416
|
+
onFocus?: Function;
|
|
417
|
+
onBlur?: Function;
|
|
418
|
+
onCreateOption?: Function;
|
|
419
|
+
onCreateFail?: Function;
|
|
420
|
+
onEnterKey?: Function;
|
|
421
|
+
onFetch?: Function;
|
|
422
|
+
onFetchError?: Function;
|
|
423
|
+
onInvalidValue?: Function;
|
|
424
|
+
prepend?: Snippet | undefined;
|
|
425
|
+
selection?: Snippet<[selectedOptions: object[], bindItem: Function]>;
|
|
426
|
+
clearIcon?: Snippet<[selectedOptions: object[], input_value: string]>;
|
|
427
|
+
toggleIcon?: Snippet<[dropdownShow: boolean]>;
|
|
428
|
+
append?: Snippet | undefined;
|
|
429
|
+
listHeader?: Snippet | undefined;
|
|
430
|
+
option?: Snippet<[option: object, inputValue: string]>;
|
|
431
|
+
positionResolver?: Function;
|
|
432
|
+
anchor_element?: string | null;
|
|
433
|
+
controlClass?: string | null;
|
|
434
|
+
dropdownClass?: string | null;
|
|
435
|
+
optionClass?: string | null;
|
|
436
|
+
}
|
|
437
|
+
export interface RadioProps<T> extends RadioVariants, Omit<HTMLInputAttributes, 'color'> {
|
|
438
|
+
group?: T;
|
|
439
|
+
value?: T;
|
|
440
|
+
inputClass?: ClassValue;
|
|
441
|
+
labelClass?: ClassValue;
|
|
442
|
+
}
|
|
443
|
+
export interface RadioButtonProps<T> extends Omit<HTMLInputAttributes, 'size'> {
|
|
444
|
+
group?: T;
|
|
445
|
+
value?: T;
|
|
446
|
+
inline?: boolean;
|
|
447
|
+
pill?: boolean;
|
|
448
|
+
outline?: boolean;
|
|
449
|
+
size?: ButtonProps['size'];
|
|
450
|
+
color?: ButtonProps['color'];
|
|
451
|
+
shadow?: boolean;
|
|
452
|
+
checkedClass?: ClassValue;
|
|
453
|
+
}
|
|
454
|
+
export interface CheckboxItem {
|
|
455
|
+
value: string | number;
|
|
456
|
+
label?: string;
|
|
457
|
+
checked?: boolean | null;
|
|
458
|
+
[key: string]: any;
|
|
459
|
+
}
|
|
460
|
+
export interface CheckboxProps extends CheckboxVariants, Omit<HTMLInputAttributes, 'children' | 'color' | 'disabled'> {
|
|
461
|
+
children?: Snippet<[{
|
|
462
|
+
value?: string | number;
|
|
463
|
+
checked: boolean;
|
|
464
|
+
} | CheckboxItem]>;
|
|
465
|
+
custom?: boolean;
|
|
466
|
+
inline?: boolean;
|
|
467
|
+
tinted?: boolean;
|
|
468
|
+
rounded?: boolean;
|
|
469
|
+
group?: (string | number)[];
|
|
470
|
+
choices?: CheckboxItem[];
|
|
471
|
+
indeterminate?: boolean;
|
|
472
|
+
divClass?: ClassValue;
|
|
473
|
+
labelProps?: Record<string, any>;
|
|
474
|
+
}
|
|
475
|
+
export interface CheckboxButtonProps extends Omit<HTMLInputAttributes, 'size'> {
|
|
476
|
+
group?: (string | number)[];
|
|
477
|
+
value?: string | number;
|
|
478
|
+
checked?: boolean;
|
|
479
|
+
inline?: boolean;
|
|
480
|
+
pill?: boolean;
|
|
481
|
+
outline?: boolean;
|
|
482
|
+
size?: ButtonProps['size'];
|
|
483
|
+
color?: ButtonProps['color'];
|
|
484
|
+
shadow?: boolean;
|
|
485
|
+
}
|
|
486
|
+
export interface IFormChangeProp<T> {
|
|
487
|
+
values: T;
|
|
488
|
+
isValid: boolean;
|
|
489
|
+
form: any;
|
|
490
|
+
}
|
|
491
|
+
export interface IFormSubmitProp<T> {
|
|
492
|
+
values: T;
|
|
493
|
+
context: any;
|
|
494
|
+
}
|
|
495
|
+
export interface FormProps {
|
|
496
|
+
transform?: (values: any) => any;
|
|
497
|
+
initialValues?: Record<string, any>;
|
|
498
|
+
validators?: any;
|
|
499
|
+
onChange?: (values: IFormChangeProp<any>) => any;
|
|
500
|
+
onSubmit?: (values: IFormSubmitProp<any>) => any;
|
|
501
|
+
contextKey?: any;
|
|
502
|
+
class?: ClassValue;
|
|
503
|
+
children: Snippet<[
|
|
504
|
+
initialValues?: Record<string, any>,
|
|
505
|
+
isValid?: boolean,
|
|
506
|
+
values?: Record<string, any>
|
|
507
|
+
]>;
|
|
508
|
+
schema?: any;
|
|
509
|
+
}
|
|
510
|
+
export interface IFormProps {
|
|
511
|
+
label?: string;
|
|
512
|
+
contextKey?: symbol | null;
|
|
513
|
+
name: string;
|
|
514
|
+
}
|
|
515
|
+
export interface FormInputProps extends Omit<InputProps, 'name'>, IFormProps {
|
|
516
|
+
}
|
|
517
|
+
export interface FormDatepickerProps extends Omit<DatepickerProps, 'name'>, IFormProps {
|
|
518
|
+
}
|
|
519
|
+
export interface FormSelectProps extends Omit<SelectProps, 'name'>, IFormProps {
|
|
520
|
+
}
|
|
521
|
+
export interface FormTextareaProps extends Omit<TextareaProps, 'name'>, IFormProps {
|
|
522
|
+
}
|
|
523
|
+
export interface FormRadioProps<T> extends Omit<RadioProps<T>, 'name'>, IFormProps {
|
|
524
|
+
}
|
|
525
|
+
export interface FormCheckboxProps extends Omit<CheckboxProps, 'name'>, IFormProps {
|
|
526
|
+
onChange?: (val: any) => void;
|
|
527
|
+
}
|
|
528
|
+
export interface TableColumn {
|
|
529
|
+
header: string;
|
|
530
|
+
id?: string;
|
|
531
|
+
plugins?: any;
|
|
532
|
+
accessor?: string | string[] | ((row: any) => any);
|
|
533
|
+
}
|
|
534
|
+
export interface TableActionList {
|
|
535
|
+
name: string;
|
|
536
|
+
icon?: string;
|
|
537
|
+
otherClasses?: string;
|
|
538
|
+
visible?: (row: any) => boolean;
|
|
539
|
+
}
|
|
540
|
+
export interface TableSortInfo {
|
|
541
|
+
id: string;
|
|
542
|
+
order: 'asc' | 'desc';
|
|
543
|
+
}
|
|
544
|
+
export type TableColor = 'green' | 'orange' | 'white' | 'purple' | 'sky' | 'blue';
|
|
545
|
+
export type HeaderTextColor = 'black' | 'white' | 'gray';
|
|
546
|
+
export interface TableProps {
|
|
547
|
+
data?: any[];
|
|
548
|
+
headerColor?: TableColor;
|
|
549
|
+
height?: number;
|
|
550
|
+
bgWhite?: boolean;
|
|
551
|
+
headerTextColor?: HeaderTextColor;
|
|
552
|
+
tableColumns: TableColumn[];
|
|
553
|
+
showActions?: boolean;
|
|
554
|
+
showCheckBox?: boolean;
|
|
555
|
+
showViewDetails?: boolean;
|
|
556
|
+
showEdit?: boolean;
|
|
557
|
+
showMiniWidth?: boolean;
|
|
558
|
+
rowClickable?: boolean;
|
|
559
|
+
hideWhiteSpace?: boolean;
|
|
560
|
+
hiddenColumns?: string[];
|
|
561
|
+
sortedColumns?: TableSortInfo[];
|
|
562
|
+
initialSortKeys?: TableSortInfo[];
|
|
563
|
+
allColumns?: any;
|
|
564
|
+
actionLists?: TableActionList[];
|
|
565
|
+
showIndex?: boolean;
|
|
566
|
+
selectedRows?: any[];
|
|
567
|
+
selectAllChecked?: boolean;
|
|
568
|
+
showDelete?: boolean;
|
|
569
|
+
handleCheckbox?: (val: any[]) => void;
|
|
570
|
+
onView?: (val: any) => void;
|
|
571
|
+
onRowClicked?: (val: any) => void;
|
|
572
|
+
onEdit?: (val: any) => void;
|
|
573
|
+
onDelete?: (val: any) => void;
|
|
574
|
+
onActionClicked?: ({ name, row }: {
|
|
575
|
+
name: string;
|
|
576
|
+
row: any;
|
|
577
|
+
}) => void;
|
|
578
|
+
}
|
|
579
|
+
export interface PaginateProps {
|
|
580
|
+
currentPage: number;
|
|
581
|
+
hasNextPage: boolean;
|
|
582
|
+
hasPreviousPage: boolean;
|
|
583
|
+
onNextPage: () => void;
|
|
584
|
+
onPreviousPage: () => void;
|
|
585
|
+
refresh?: (() => void) | null;
|
|
586
|
+
totalPages: number;
|
|
587
|
+
hideLabel?: boolean;
|
|
588
|
+
textSmall?: boolean;
|
|
589
|
+
hiddenColumns?: string[];
|
|
590
|
+
tableColumns?: any[];
|
|
591
|
+
recordCount?: number;
|
|
592
|
+
}
|
|
593
|
+
export interface PageInfo {
|
|
594
|
+
hasNextPage: boolean;
|
|
595
|
+
hasPreviousPage: boolean;
|
|
596
|
+
}
|
|
597
|
+
export interface PaginatedResult<T> {
|
|
598
|
+
success: boolean;
|
|
599
|
+
message: string;
|
|
600
|
+
data: {
|
|
601
|
+
pageInfo: PageInfo;
|
|
602
|
+
totalCount: number;
|
|
603
|
+
items: T[];
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
export interface CrudResult<T> {
|
|
607
|
+
success: boolean;
|
|
608
|
+
message: string;
|
|
609
|
+
data?: T;
|
|
610
|
+
}
|
|
611
|
+
export interface TableFilter<T = Record<string, unknown>> {
|
|
612
|
+
search?: string;
|
|
613
|
+
startDate?: Date | string | null;
|
|
614
|
+
endDate?: Date | string | null;
|
|
615
|
+
dateRange?: string;
|
|
616
|
+
filter?: Partial<T>;
|
|
617
|
+
order?: Array<{
|
|
618
|
+
field: keyof T;
|
|
619
|
+
direction: 'asc' | 'desc';
|
|
620
|
+
}>;
|
|
621
|
+
actions?: Record<string, string>;
|
|
622
|
+
pageSize?: number;
|
|
623
|
+
currentPage?: number;
|
|
624
|
+
}
|
|
625
|
+
export interface DatatableProps<T = any> extends TableProps {
|
|
626
|
+
read?: (skip?: number, take?: number, filter?: TableFilter<T>) => Promise<PaginatedResult<T>> | PaginatedResult<T> | null;
|
|
627
|
+
createEntry?: (entry: T) => Promise<CrudResult<T>> | CrudResult<T> | null;
|
|
628
|
+
updateEntry?: (entry: Partial<T> & {
|
|
629
|
+
id: string | number;
|
|
630
|
+
}) => Promise<CrudResult<T>> | CrudResult<T> | null;
|
|
631
|
+
deleteEntry?: (id: string | number) => Promise<CrudResult<T>> | CrudResult<T> | null;
|
|
632
|
+
onAfterAction?: (params: {
|
|
633
|
+
type: 'create' | 'update' | 'delete' | 'custom';
|
|
634
|
+
values?: Partial<T>;
|
|
635
|
+
data?: T;
|
|
636
|
+
}) => void;
|
|
637
|
+
onAddNew?: () => void;
|
|
638
|
+
persitFiltersToUrl?: boolean;
|
|
639
|
+
fillSpace?: boolean;
|
|
640
|
+
showTopActionsBackground?: boolean;
|
|
641
|
+
hideSearchBox?: boolean;
|
|
642
|
+
addButtonLabel?: string;
|
|
643
|
+
showAdd?: boolean;
|
|
644
|
+
searchPlaceholder?: string;
|
|
645
|
+
addNewHeading?: string;
|
|
646
|
+
newRecord?: Record<string, any>;
|
|
647
|
+
query?: string;
|
|
648
|
+
busy?: boolean;
|
|
649
|
+
showFilterDateRange?: boolean;
|
|
650
|
+
loadingBodySize?: number;
|
|
651
|
+
loadingHeaderSize?: number;
|
|
652
|
+
updateHeading?: string;
|
|
653
|
+
customFilterValues?: Record<string, any>;
|
|
654
|
+
modalSize?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
655
|
+
allowLoadAfterCreate?: boolean;
|
|
656
|
+
allowDispatchAfterAction?: boolean;
|
|
657
|
+
take?: number;
|
|
658
|
+
editor?: Snippet<[DatatableEditorFormProps]>;
|
|
659
|
+
customFilter?: Snippet<[TableFilter]>;
|
|
660
|
+
}
|
|
661
|
+
export interface DatatableEditorFormProps {
|
|
662
|
+
recordId?: number | string | null;
|
|
663
|
+
data?: Record<string, any> | null;
|
|
664
|
+
onChange: IFormChangeProp<any>;
|
|
665
|
+
onDone?: Function;
|
|
666
|
+
readonly: boolean;
|
|
667
|
+
}
|
|
668
|
+
export interface AlertDialogProps {
|
|
669
|
+
open: boolean;
|
|
670
|
+
message?: string;
|
|
671
|
+
icon?: string;
|
|
672
|
+
disableYes?: boolean;
|
|
673
|
+
busy?: boolean;
|
|
674
|
+
iconColor?: string;
|
|
675
|
+
confirmText?: string;
|
|
676
|
+
buttonType?: 'submit' | 'button' | 'reset';
|
|
677
|
+
dismissable?: boolean;
|
|
678
|
+
onCancel: () => void;
|
|
679
|
+
onYes: () => void;
|
|
680
|
+
}
|
|
681
|
+
export interface AccordionCtxType {
|
|
682
|
+
flush?: boolean;
|
|
683
|
+
activeClass?: string | null;
|
|
684
|
+
inactiveClass?: string | null;
|
|
685
|
+
transitionType?: TransitionFunc | 'none';
|
|
686
|
+
}
|
|
687
|
+
export interface AccordionProps extends AccordionVariants, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
688
|
+
children: Snippet;
|
|
689
|
+
multiple?: boolean;
|
|
690
|
+
activeClass?: string;
|
|
691
|
+
inactiveClass?: string;
|
|
692
|
+
transitionType?: TransitionFunc | 'none';
|
|
693
|
+
}
|
|
694
|
+
export interface AccordionItemProps extends AccordionItemVariants, HTMLAttributes<HTMLDivElement> {
|
|
695
|
+
children: Snippet;
|
|
696
|
+
header?: Snippet;
|
|
697
|
+
arrowup?: Snippet;
|
|
698
|
+
arrowdown?: Snippet;
|
|
699
|
+
activeClass?: string;
|
|
700
|
+
inactiveClass?: string;
|
|
701
|
+
transitionType?: TransitionFunc | 'none';
|
|
702
|
+
transitionParams?: ParamsType;
|
|
703
|
+
headerClass?: string;
|
|
704
|
+
contentClass?: string;
|
|
705
|
+
}
|
|
706
|
+
export interface FilterBuilderColumnConfig {
|
|
707
|
+
name: string;
|
|
708
|
+
label: string;
|
|
709
|
+
type: 'string' | 'number' | 'date' | 'boolean';
|
|
710
|
+
}
|
|
711
|
+
export interface FilterBuilderItem {
|
|
712
|
+
id: string;
|
|
713
|
+
column: string;
|
|
714
|
+
operator: string;
|
|
715
|
+
value: string | number | boolean | null;
|
|
716
|
+
logicalOperator?: 'AND' | 'OR';
|
|
717
|
+
label?: string;
|
|
718
|
+
}
|
|
719
|
+
export interface FilterBuilderProps {
|
|
720
|
+
columns?: FilterBuilderColumnConfig[];
|
|
721
|
+
filters?: FilterBuilderItem[];
|
|
722
|
+
}
|
|
723
|
+
export interface ITab {
|
|
724
|
+
id: number | string;
|
|
725
|
+
title: string;
|
|
726
|
+
children: Component<TabChildrenProps> | Component;
|
|
727
|
+
icon?: string;
|
|
728
|
+
isClosable?: boolean;
|
|
729
|
+
props?: Record<string, any>;
|
|
730
|
+
state?: Record<string, any>;
|
|
731
|
+
}
|
|
732
|
+
export interface RemoveTabEvent {
|
|
733
|
+
tabId: string | number;
|
|
734
|
+
tabData?: any;
|
|
735
|
+
}
|
|
736
|
+
export interface TabChildrenProps extends ITab {
|
|
737
|
+
onTabChange?: (tabId: number | string) => void;
|
|
738
|
+
onTabAdd?: (val: any) => void;
|
|
739
|
+
onRemoveTab?: (val: RemoveTabEvent) => void;
|
|
740
|
+
}
|
|
741
|
+
export interface TabProps {
|
|
742
|
+
tabs: ITab[];
|
|
743
|
+
activeTab: number | string;
|
|
744
|
+
tabClass?: ClassValue;
|
|
745
|
+
tabActiveClass?: ClassValue;
|
|
746
|
+
tabInactiveClass?: ClassValue;
|
|
747
|
+
tabContentClass?: ClassValue;
|
|
748
|
+
tabContentActiveClass?: ClassValue;
|
|
749
|
+
tabContentInactiveClass?: ClassValue;
|
|
750
|
+
onTabChange?: (tabId: number | string) => void;
|
|
751
|
+
onTabAdd?: (val: any) => void;
|
|
752
|
+
onRemoveTab?: (val: RemoveTabEvent) => void;
|
|
753
|
+
tabStyle?: TabsVaraints['tabStyle'];
|
|
754
|
+
divider?: boolean;
|
|
755
|
+
}
|