@axzydev/axzy_ui_system 1.2.7 → 1.2.9
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 +105 -53
- package/dist/index.cjs +576 -398
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +1463 -86
- package/dist/index.d.ts +1463 -86
- package/dist/index.js +597 -417
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +26 -54
- package/src/components/alert/alert.doc.mdx +48 -0
- package/src/components/alert/alert.props.ts +7 -0
- package/src/components/alert/alert.tsx +8 -0
- package/src/components/avatar/avatar.doc.mdx +48 -0
- package/src/components/avatar/avatar.props.ts +8 -0
- package/src/components/avatar/avatar.tsx +25 -5
- package/src/components/badget/badget.doc.mdx +46 -0
- package/src/components/badget/badget.props.ts +6 -0
- package/src/components/badget/badget.tsx +11 -0
- package/src/components/breadcrumbs/breadcrumbs.doc.mdx +57 -0
- package/src/components/breadcrumbs/breadcrumbs.props.ts +6 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +12 -0
- package/src/components/button/button.doc.mdx +59 -0
- package/src/components/button/button.props.ts +12 -0
- package/src/components/button/button.tsx +11 -0
- package/src/components/calendar/calendar.doc.mdx +75 -0
- package/src/components/calendar/calendar.props.ts +27 -7
- package/src/components/calendar/calendar.tsx +13 -0
- package/src/components/card/card.doc.mdx +54 -0
- package/src/components/card/card.props.ts +11 -0
- package/src/components/card/card.tsx +13 -0
- package/src/components/checkbox/checkbox.doc.mdx +54 -0
- package/src/components/checkbox/checkbox.props.ts +7 -0
- package/src/components/checkbox/checkbox.tsx +9 -0
- package/src/components/confirm-dialog/confirm-dialog.doc.mdx +60 -0
- package/src/components/confirm-dialog/confirm-dialog.props.ts +9 -0
- package/src/components/confirm-dialog/confirm-dialog.tsx +19 -0
- package/src/components/data-table/ITDataTable.doc.mdx +59 -0
- package/src/components/data-table/dataTable.props.ts +15 -0
- package/src/components/data-table/dataTable.tsx +178 -73
- package/src/components/date-picker/date-picker.doc.mdx +65 -0
- package/src/components/date-picker/date-picker.props.ts +17 -0
- package/src/components/date-picker/datePicker.tsx +31 -1
- package/src/components/dialog/dialog.doc.mdx +54 -0
- package/src/components/dialog/dialog.props.ts +7 -0
- package/src/components/dialog/dialog.tsx +26 -0
- package/src/components/divider/divider.doc.mdx +42 -0
- package/src/components/divider/divider.props.ts +5 -0
- package/src/components/divider/divider.tsx +16 -0
- package/src/components/drawer/drawer.doc.mdx +59 -0
- package/src/components/drawer/drawer.props.ts +9 -0
- package/src/components/drawer/drawer.tsx +20 -0
- package/src/components/dropfile/dropfile.doc.mdx +59 -0
- package/src/components/dropfile/dropfile.props.ts +41 -0
- package/src/components/dropfile/dropfile.tsx +21 -33
- package/src/components/empty-state/empty-state.doc.mdx +50 -0
- package/src/components/empty-state/empty-state.props.ts +5 -0
- package/src/components/empty-state/empty-state.tsx +16 -0
- package/src/components/flex/flex.doc.mdx +59 -0
- package/src/components/flex/flex.props.ts +13 -0
- package/src/components/flex/flex.tsx +15 -0
- package/src/components/form-builder/fieldRenderer.tsx +52 -2
- package/src/components/form-builder/formBuilder.doc.mdx +124 -0
- package/src/components/form-builder/formBuilder.props.ts +12 -2
- package/src/components/form-builder/formBuilder.tsx +31 -0
- package/src/components/form-header/form-header.doc.mdx +38 -0
- package/src/components/form-header/form-header.props.ts +3 -0
- package/src/components/form-header/form-header.stories.tsx +53 -0
- package/src/components/form-header/form-header.tsx +11 -0
- package/src/components/grid/grid.doc.mdx +54 -0
- package/src/components/grid/grid.props.ts +13 -0
- package/src/components/grid/grid.tsx +19 -0
- package/src/components/image/image.doc.mdx +44 -0
- package/src/components/image/image.props.ts +5 -0
- package/src/components/image/image.stories.tsx +49 -0
- package/src/components/image/image.tsx +19 -0
- package/src/components/input/input.doc.mdx +70 -0
- package/src/components/input/input.props.ts +34 -2
- package/src/components/input/input.tsx +29 -0
- package/src/components/layout/layout.doc.mdx +51 -0
- package/src/components/layout/layout.props.ts +5 -0
- package/src/components/layout/layout.tsx +29 -2
- package/src/components/loader/loader.doc.mdx +43 -0
- package/src/components/loader/loader.props.ts +4 -0
- package/src/components/loader/loader.tsx +17 -0
- package/src/components/navbar/navbar.doc.mdx +77 -0
- package/src/components/navbar/navbar.props.ts +37 -1
- package/src/components/navbar/navbar.stories.tsx +84 -0
- package/src/components/navbar/navbar.tsx +27 -0
- package/src/components/page/page.doc.mdx +80 -0
- package/src/components/page/page.props.ts +21 -0
- package/src/components/page/page.tsx +18 -0
- package/src/components/page-header/page-header.doc.mdx +54 -0
- package/src/components/page-header/page-header.props.ts +9 -0
- package/src/components/page-header/page-header.tsx +15 -0
- package/src/components/pagination/pagination.doc.mdx +62 -0
- package/src/components/pagination/pagination.props.ts +11 -32
- package/src/components/pagination/pagination.tsx +17 -0
- package/src/components/popover/popover.doc.mdx +53 -0
- package/src/components/popover/popover.props.ts +8 -0
- package/src/components/popover/popover.tsx +13 -0
- package/src/components/progress/progress.doc.mdx +48 -0
- package/src/components/progress/progress.props.ts +8 -0
- package/src/components/progress/progress.tsx +9 -0
- package/src/components/radio/radio.doc.mdx +62 -0
- package/src/components/radio/radio.props.ts +11 -0
- package/src/components/radio/radio.tsx +18 -0
- package/src/components/search-select/search-select.doc.mdx +72 -0
- package/src/components/search-select/search-select.props.ts +23 -18
- package/src/components/search-select/search-select.tsx +27 -2
- package/src/components/searchTable/searchTable.doc.mdx +79 -0
- package/src/components/searchTable/searchTable.props.ts +42 -3
- package/src/components/searchTable/searchTable.stories.tsx +74 -0
- package/src/components/searchTable/searchTable.tsx +23 -0
- package/src/components/segmented-control/segmented-control.doc.mdx +60 -0
- package/src/components/segmented-control/segmented-control.props.ts +12 -0
- package/src/components/segmented-control/segmented-control.tsx +15 -0
- package/src/components/select/select.doc.mdx +75 -0
- package/src/components/select/select.props.ts +22 -0
- package/src/components/select/select.tsx +2 -5
- package/src/components/sidebar/sidebar.doc.mdx +86 -0
- package/src/components/sidebar/sidebar.props.ts +22 -0
- package/src/components/sidebar/sidebar.tsx +22 -0
- package/src/components/skeleton/skeleton.doc.mdx +43 -0
- package/src/components/skeleton/skeleton.props.ts +8 -0
- package/src/components/skeleton/skeleton.tsx +10 -0
- package/src/components/slide/slide.doc.mdx +46 -0
- package/src/components/slide/slide.props.ts +11 -24
- package/src/components/slide/slide.tsx +10 -1
- package/src/components/slider/slider.doc.mdx +49 -0
- package/src/components/slider/slider.props.ts +9 -0
- package/src/components/slider/slider.tsx +15 -0
- package/src/components/stack/stack.doc.mdx +126 -0
- package/src/components/stack/stack.props.ts +18 -0
- package/src/components/stack/stack.stories.tsx +221 -16
- package/src/components/stack/stack.tsx +21 -0
- package/src/components/stat-card/stat-card.doc.mdx +48 -0
- package/src/components/stat-card/stat-card.props.ts +9 -0
- package/src/components/stat-card/stat-card.tsx +10 -0
- package/src/components/stepper/stepper.doc.mdx +54 -0
- package/src/components/stepper/stepper.props.ts +11 -1
- package/src/components/stepper/stepper.tsx +15 -0
- package/src/components/table/table.doc.mdx +58 -0
- package/src/components/table/table.props.ts +17 -0
- package/src/components/table/table.tsx +199 -84
- package/src/components/tabs/tabs.doc.mdx +52 -0
- package/src/components/tabs/tabs.props.ts +11 -0
- package/src/components/tabs/tabs.tsx +14 -0
- package/src/components/text/text.doc.mdx +41 -0
- package/src/components/text/text.props.ts +5 -0
- package/src/components/text/text.stories.tsx +67 -0
- package/src/components/text/text.tsx +10 -0
- package/src/components/textarea/textarea.doc.mdx +64 -0
- package/src/components/textarea/textarea.props.ts +11 -0
- package/src/components/textarea/textarea.tsx +16 -0
- package/src/components/theme-provider/themeProvider.doc.mdx +75 -0
- package/src/components/theme-provider/themeProvider.props.ts +3 -0
- package/src/components/theme-provider/themeProvider.stories.tsx +59 -0
- package/src/components/theme-provider/themeProvider.tsx +14 -0
- package/src/components/time-picker/timePicker.doc.mdx +68 -0
- package/src/components/time-picker/timePicker.props.ts +14 -0
- package/src/components/time-picker/timePicker.tsx +22 -1
- package/src/components/toast/toast.doc.mdx +50 -0
- package/src/components/toast/toast.props.ts +5 -0
- package/src/components/toast/toast.tsx +21 -0
- package/src/components/tooltip/tooltip.doc.mdx +47 -0
- package/src/components/tooltip/tooltip.props.ts +6 -0
- package/src/components/tooltip/tooltip.tsx +19 -0
- package/src/components/topbar/topbar.doc.mdx +69 -0
- package/src/components/topbar/topbar.props.ts +15 -0
- package/src/components/topbar/topbar.tsx +38 -0
- package/src/components/triple-filter/tripleFilter.doc.mdx +62 -0
- package/src/components/triple-filter/tripleFilter.props.ts +7 -0
- package/src/components/triple-filter/tripleFilter.tsx +32 -0
- package/src/index.css +2 -0
- package/src/showcases/DataShowcases.tsx +529 -45
- package/src/showcases/FormShowcases.tsx +399 -29
- package/src/showcases/GettingStartedShowcase.tsx +207 -0
- package/src/showcases/HomeShowcase.tsx +252 -272
- package/src/showcases/LayoutPrimitivesShowcases.tsx +1224 -248
- package/src/showcases/PageShowcases.tsx +688 -391
- package/src/showcases/ShowcaseLayout.tsx +237 -73
- package/src/showcases/StructureShowcases.tsx +846 -73
- package/src/types/table.types.ts +1 -1
- package/src/utils/styles.ts +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -21,21 +21,34 @@ declare function useDebouncedSearch({ initialValue, debounceMs, onSearch, }: Use
|
|
|
21
21
|
type TableVariants = "default" | "striped" | "bordered";
|
|
22
22
|
type TableSize = "sm" | "md" | "lg";
|
|
23
23
|
|
|
24
|
+
/** Definition of a single searchable, sortable, editable table column. */
|
|
24
25
|
interface SearchColumn<T = any> {
|
|
26
|
+
/** Unique key used for data access and sorting/filtering. */
|
|
25
27
|
key: string;
|
|
28
|
+
/** Column header label displayed to the user. */
|
|
26
29
|
label: string;
|
|
30
|
+
/** Data type of the column: "string" | "number" | "boolean" | "date" | "actions" | "catalog". */
|
|
27
31
|
type: "string" | "number" | "boolean" | "date" | "actions" | "catalog";
|
|
32
|
+
/** Enables filtering on this column. Can be boolean or "catalog" for catalog-based filters. */
|
|
28
33
|
filter?: boolean | 'catalog';
|
|
34
|
+
/** Whether the column is sortable by clicking its header. */
|
|
29
35
|
sortable?: boolean;
|
|
36
|
+
/** Whether inline editing is allowed on this column. */
|
|
30
37
|
editable?: boolean;
|
|
38
|
+
/** Inline edit input type: "text" | "number" | "select" | "checkbox" | "date". */
|
|
31
39
|
inputType?: "text" | "number" | "select" | "checkbox" | "date";
|
|
40
|
+
/** Predefined select options when inputType is "select". */
|
|
32
41
|
options?: {
|
|
33
42
|
value: string | number;
|
|
34
43
|
label: string;
|
|
35
44
|
}[];
|
|
45
|
+
/** Custom inline-edit validation. Return error string or undefined if valid. */
|
|
36
46
|
validation?: (value: any, row?: any) => string | undefined;
|
|
47
|
+
/** Additional CSS class on the column cells. */
|
|
37
48
|
className?: string;
|
|
49
|
+
/** Formats numeric values as Mexican pesos (MXN). */
|
|
38
50
|
currencyMX?: boolean;
|
|
51
|
+
/** Configuration for catalog-type columns: data array and optional key/label field names. */
|
|
39
52
|
catalogOptions?: {
|
|
40
53
|
data: Array<{
|
|
41
54
|
id: string | number;
|
|
@@ -44,39 +57,63 @@ interface SearchColumn<T = any> {
|
|
|
44
57
|
key?: string;
|
|
45
58
|
label?: string;
|
|
46
59
|
};
|
|
60
|
+
/** Custom render function for the cell. Receives the full row object. */
|
|
47
61
|
render?: (row: T) => React.ReactNode;
|
|
62
|
+
/** Custom action buttons rendered in the cell. Receives row and helper with onEdit. */
|
|
48
63
|
actions?: (row: T, helpers: {
|
|
49
64
|
onEdit: (row: T) => void;
|
|
50
65
|
}) => React.ReactNode;
|
|
66
|
+
/** Custom save/cancel action buttons in edit mode. Receives row and helpers. */
|
|
51
67
|
saveActions?: (row: T, helpers: {
|
|
52
68
|
onSave: (row: T) => void;
|
|
53
69
|
onCancel: () => void;
|
|
54
70
|
hasErrors: any;
|
|
55
71
|
}) => React.ReactNode;
|
|
56
72
|
}
|
|
73
|
+
/** Props for the ITSearchTable server-side data table component. */
|
|
57
74
|
interface ITSearchTableProps<T> {
|
|
75
|
+
/** Column definitions: key, label, type, filter, sortable, editable, etc. */
|
|
58
76
|
columns: SearchColumn<T>[];
|
|
77
|
+
/** Additional CSS class for the outer container wrapper. */
|
|
59
78
|
containerClassName?: string;
|
|
79
|
+
/** Placeholder text for the global search input field. */
|
|
60
80
|
searchInputPlaceholder?: string;
|
|
81
|
+
/** Array of row data objects (server-side paginated). */
|
|
61
82
|
data: T[];
|
|
83
|
+
/** Table visual variant: "default" | "striped" | "bordered". */
|
|
62
84
|
variant?: TableVariants;
|
|
85
|
+
/** Additional CSS class applied to the `<table>` element. */
|
|
63
86
|
className?: string;
|
|
87
|
+
/** Table row size: "sm" | "md" | "lg". */
|
|
64
88
|
size?: TableSize;
|
|
89
|
+
/** Available page-size options (e.g. [10, 20, 50, 100]). */
|
|
65
90
|
itemsPerPageOptions?: Array<number>;
|
|
91
|
+
/** Initial/default number of rows per page. */
|
|
66
92
|
defaultItemsPerPage?: number;
|
|
93
|
+
/** Yup validation schema for inline editing. */
|
|
67
94
|
validationSchema?: Yup.ObjectSchema<any>;
|
|
95
|
+
/** Title displayed in the table header bar (teal background). */
|
|
68
96
|
title?: string;
|
|
97
|
+
/** Current page index (0-based, server-side). */
|
|
69
98
|
pageIndex: number;
|
|
99
|
+
/** Total number of rows across all pages (server-side). */
|
|
70
100
|
totalCount: number;
|
|
101
|
+
/** Total number of available pages. */
|
|
71
102
|
totalPages: number;
|
|
103
|
+
/** Whether there is a previous page available. */
|
|
72
104
|
hasPreviousPage: boolean;
|
|
105
|
+
/** Whether there is a next page available. */
|
|
73
106
|
hasNextPage: boolean;
|
|
107
|
+
/** Callback when the user navigates to a different page. Receives the new page index. */
|
|
74
108
|
onPageChange?: (page: number) => void;
|
|
109
|
+
/** Callback when the user changes the page-size. Receives the new items-per-page value. */
|
|
75
110
|
onItemsPerPageChange?: (itemsPerPage: number) => void;
|
|
111
|
+
/** Callback when sorting changes. Receives { key, direction: "asc" | "desc" }. */
|
|
76
112
|
onSortChange?: (sortConfig: {
|
|
77
113
|
key: string;
|
|
78
114
|
direction: "asc" | "desc";
|
|
79
115
|
}) => void;
|
|
116
|
+
/** Callback when global search/filter text changes. Receives a key-value filters record. */
|
|
80
117
|
onFilterChange?: (filters: Record<string, string | boolean | number>) => void;
|
|
81
118
|
}
|
|
82
119
|
|
|
@@ -126,29 +163,61 @@ declare function useTableState({ defaultItemsPerPage, initialSort, }?: UseTableS
|
|
|
126
163
|
|
|
127
164
|
type AlertVariant = "info" | "success" | "warning" | "error";
|
|
128
165
|
interface ITAlertProps {
|
|
166
|
+
/** Alert visual style. Valid values: `"info"`, `"success"`, `"warning"`, `"error"`. @default "info" */
|
|
129
167
|
variant?: AlertVariant;
|
|
168
|
+
/** Optional bold title text displayed above the message. */
|
|
130
169
|
title?: string;
|
|
170
|
+
/** Alert message content. */
|
|
131
171
|
children?: ReactNode;
|
|
172
|
+
/** Whether the alert can be dismissed by the user. @default false */
|
|
132
173
|
dismissible?: boolean;
|
|
174
|
+
/** Callback fired when the dismiss button is clicked. */
|
|
133
175
|
onDismiss?: () => void;
|
|
176
|
+
/** Custom icon element. Overrides the default variant icon. */
|
|
134
177
|
icon?: ReactNode;
|
|
178
|
+
/** Additional CSS class names for the alert container. */
|
|
135
179
|
className?: string;
|
|
136
180
|
}
|
|
137
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Dismissible alert banner with 4 visual variants and optional custom icon.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* <ITAlert variant="success" title="Success" dismissible onDismiss={() => {}}>
|
|
187
|
+
* Operation completed successfully.
|
|
188
|
+
* </ITAlert>
|
|
189
|
+
*/
|
|
138
190
|
declare function ITAlert({ variant, title, children, dismissible, onDismiss, icon, className, }: ITAlertProps): react_jsx_runtime.JSX.Element;
|
|
139
191
|
|
|
140
192
|
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
141
193
|
interface ITAvatarProps {
|
|
194
|
+
/** Image source URL for the avatar. When provided, displays an `<img>` element. */
|
|
142
195
|
src?: string;
|
|
196
|
+
/** Alt text for the avatar image. Also used as fallback initial when no `initials` or `src` is provided. */
|
|
143
197
|
alt?: string;
|
|
198
|
+
/** Initials to display when no image is available (max 2 characters recommended). */
|
|
144
199
|
initials?: string;
|
|
200
|
+
/** Avatar dimensions. Valid values: `"xs"`, `"sm"`, `"md"`, `"lg"`, `"xl"`. @default "md" */
|
|
145
201
|
size?: AvatarSize;
|
|
202
|
+
/** Background color class for the initials fallback. @default "bg-primary-600" */
|
|
146
203
|
color?: string;
|
|
204
|
+
/** Additional CSS class names for the avatar container. */
|
|
147
205
|
className?: string;
|
|
206
|
+
/** React node rendered as a badge overlay at the bottom-right corner. */
|
|
148
207
|
badge?: ReactNode;
|
|
208
|
+
/** Click handler. When provided, the avatar becomes interactive (role="button"). */
|
|
149
209
|
onClick?: () => void;
|
|
150
210
|
}
|
|
151
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Circular avatar component with image, initials fallback, and optional badge overlay.
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* <ITAvatar src="/avatar.jpg" alt="John Doe" size="lg" badge={<span className="w-2.5 h-2.5 bg-success-500 rounded-full" />} />
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* <ITAvatar initials="JD" size="md" color="bg-purple-600" />
|
|
220
|
+
*/
|
|
152
221
|
declare function ITAvatar({ src, alt, initials, size, color, className, badge, onClick, }: ITAvatarProps): react_jsx_runtime.JSX.Element;
|
|
153
222
|
|
|
154
223
|
declare const semanticColors: {
|
|
@@ -281,117 +350,278 @@ declare const badgeVariants: {
|
|
|
281
350
|
type SizesTypes = "small" | "medium" | "large";
|
|
282
351
|
|
|
283
352
|
interface ITBadgetProps {
|
|
353
|
+
/** Text label displayed inside the badge. Overridden if `children` is provided. */
|
|
284
354
|
label?: string;
|
|
355
|
+
/** Custom content to render inside the badge. Takes precedence over `label`. */
|
|
285
356
|
children?: React.ReactNode;
|
|
357
|
+
/** Color theme key. Values come from the semantic color palette (e.g. `"primary"`, `"secondary"`, `"success"`, `"danger"`, `"warning"`, `"info"`, `"purple"`, `"error"`, `"gray"`). @default "primary" */
|
|
286
358
|
color?: ColorsTypes;
|
|
359
|
+
/** Badge size. Valid values: `"small"`, `"medium"`, `"large"`. @default "medium" */
|
|
287
360
|
size?: SizesTypes;
|
|
361
|
+
/** Badge visual style. Valid values: `"filled"`, `"outlined"`. @default "filled" */
|
|
288
362
|
variant?: keyof typeof badgeVariants;
|
|
363
|
+
/** Additional CSS class names for the badge element. */
|
|
289
364
|
className?: string;
|
|
290
365
|
}
|
|
291
366
|
|
|
367
|
+
/**
|
|
368
|
+
* Small status tag or label with theme-based colors and filled/outlined variants.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* <ITBadget label="Active" color="success" variant="filled" />
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* <ITBadget color="danger" variant="outlined" size="small">
|
|
375
|
+
* <span className="flex items-center gap-1">3 new</span>
|
|
376
|
+
* </ITBadget>
|
|
377
|
+
*/
|
|
292
378
|
declare function ITBadget({ children, label, color, size, variant, className, }: ITBadgetProps): react_jsx_runtime.JSX.Element;
|
|
293
379
|
|
|
294
380
|
interface ITBreadcrumbItem {
|
|
381
|
+
/** Display text for the breadcrumb segment. */
|
|
295
382
|
label: string;
|
|
383
|
+
/** URL for the breadcrumb link. Renders an `<a>` tag. */
|
|
296
384
|
href?: string;
|
|
385
|
+
/** Click handler for the breadcrumb. Renders a `<button>` when no `href` is set. */
|
|
297
386
|
onClick?: () => void;
|
|
298
387
|
}
|
|
299
388
|
interface ITBreadcrumbsProps {
|
|
389
|
+
/** Ordered array of breadcrumb items. The last item is rendered as plain text (current page). */
|
|
300
390
|
items: ITBreadcrumbItem[];
|
|
391
|
+
/** Custom separator element rendered between items. @default <FaChevronRight size={10} /> */
|
|
301
392
|
separator?: ReactNode;
|
|
393
|
+
/** Additional CSS class names for the `<nav>` container. */
|
|
302
394
|
className?: string;
|
|
303
395
|
}
|
|
304
396
|
|
|
397
|
+
/**
|
|
398
|
+
* Navigation breadcrumb trail with automatic link/button rendering and custom separator.
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* <ITBreadcrumbs
|
|
402
|
+
* items={[
|
|
403
|
+
* { label: "Home", href: "/" },
|
|
404
|
+
* { label: "Products", href: "/products" },
|
|
405
|
+
* { label: "Details" },
|
|
406
|
+
* ]}
|
|
407
|
+
* />
|
|
408
|
+
*/
|
|
305
409
|
declare function ITBreadcrumbs({ items, separator, className, }: ITBreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
306
410
|
|
|
307
411
|
declare const buttonVariants: Record<string, string>;
|
|
308
412
|
|
|
309
413
|
interface ITButtonProps {
|
|
414
|
+
/** Button text label. Overridden if `children` is provided. */
|
|
310
415
|
label?: string;
|
|
416
|
+
/** Custom content to render inside the button. Takes precedence over `label`. */
|
|
311
417
|
children?: React.ReactNode;
|
|
418
|
+
/** Icon element rendered before the label. */
|
|
312
419
|
icon?: React.ReactNode;
|
|
420
|
+
/** Click handler for the button. */
|
|
313
421
|
onClick?: () => void;
|
|
422
|
+
/** Color theme key. Values come from the semantic color palette (e.g. `"primary"`, `"secondary"`, `"success"`, `"danger"`, `"warning"`, `"info"`, `"purple"`, `"error"`, `"gray"`). @default "primary" */
|
|
314
423
|
color?: ColorsTypes;
|
|
424
|
+
/** Button size. Valid values: `"small"`, `"medium"`, `"large"`. @default "medium" */
|
|
315
425
|
size?: SizesTypes;
|
|
426
|
+
/** Button visual style. Valid values: `"filled"`, `"outlined"`, `"raised"`, `"rounded"`, `"text"`, `"raised-text"`, `"icon-only"`, `"link"`. @default "filled" */
|
|
316
427
|
variant?: keyof typeof buttonVariants;
|
|
428
|
+
/** Disables the button interaction and applies reduced opacity. @default false */
|
|
317
429
|
disabled?: boolean;
|
|
430
|
+
/** Additional CSS class names for the button element. */
|
|
318
431
|
className?: string;
|
|
432
|
+
/** HTML button type attribute. Valid values: `"submit"`, `"reset"`, `"button"`. @default "button" */
|
|
319
433
|
type?: "submit" | "reset" | "button" | undefined;
|
|
434
|
+
/** Accessible label for screen readers. Falls back to `label` if not set. */
|
|
320
435
|
ariaLabel?: string;
|
|
436
|
+
/** HTML title attribute for native tooltip. Falls back to `ariaLabel` or `label`. */
|
|
321
437
|
title?: string;
|
|
322
438
|
}
|
|
323
439
|
|
|
440
|
+
/**
|
|
441
|
+
* Highly configurable action button supporting 8 visual variants, theme colors, 3 sizes, icons, and hover/focus states.
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* <ITButton label="Submit" color="primary" variant="filled" onClick={() => {}} />
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* <ITButton color="danger" variant="outlined" size="small" icon={<FaTrash />}>
|
|
448
|
+
* Delete
|
|
449
|
+
* </ITButton>
|
|
450
|
+
*/
|
|
324
451
|
declare function ITButton({ children, label, icon, onClick, type, color, size, disabled, className, variant, ariaLabel, title, }: ITButtonProps): react_jsx_runtime.JSX.Element;
|
|
325
452
|
|
|
326
453
|
interface CalendarEvent {
|
|
454
|
+
/** Unique identifier for the event. */
|
|
327
455
|
id: string;
|
|
456
|
+
/** Event display title. */
|
|
328
457
|
title: string;
|
|
458
|
+
/** Event start date/time. Accepts a `Date` object or ISO 8601 string. */
|
|
329
459
|
start: Date | string;
|
|
460
|
+
/** Event end date/time. Accepts a `Date` object or ISO 8601 string. */
|
|
330
461
|
end: Date | string;
|
|
462
|
+
/** Event indicator color. Accepts a hex code or CSS color value. */
|
|
331
463
|
color?: string;
|
|
464
|
+
/** Arbitrary extra data passed through to event callbacks. */
|
|
332
465
|
data?: any;
|
|
333
466
|
}
|
|
334
467
|
interface ITCalendarProps {
|
|
468
|
+
/** Array of calendar events to display in the scheduler view. */
|
|
335
469
|
events?: CalendarEvent[];
|
|
470
|
+
/** Display mode. Valid values: `"week"`, `"day"`, `"month"`. Auto-detected as `"month"` when `onChange` is provided. */
|
|
336
471
|
mode?: 'week' | 'day' | 'month';
|
|
472
|
+
/** Callback fired when an event is clicked. */
|
|
337
473
|
onEventClick?: (event: CalendarEvent) => void;
|
|
474
|
+
/** Callback fired when an empty time slot is clicked. */
|
|
338
475
|
onSlotClick?: (date: Date) => void;
|
|
476
|
+
/** Callback fired when the mouse enters a time slot. */
|
|
339
477
|
onSlotHover?: (date: Date) => void;
|
|
478
|
+
/** Callback fired when a time range is selected via drag. */
|
|
340
479
|
onSelectRange?: (start: Date, end: Date) => void;
|
|
480
|
+
/** Currently selected date (date picker mode). */
|
|
341
481
|
value?: Date;
|
|
482
|
+
/** Callback fired when a date is selected in picker mode. */
|
|
342
483
|
onChange?: (date: Date) => void;
|
|
484
|
+
/** Selection mode for the date picker. Valid values: `"single"`, `"range"`. @default "single" */
|
|
343
485
|
selectionMode?: 'single' | 'range';
|
|
486
|
+
/** Start date for range selection. */
|
|
344
487
|
startDate?: Date;
|
|
488
|
+
/** End date for range selection. */
|
|
345
489
|
endDate?: Date;
|
|
490
|
+
/** Minimum selectable date (dates before this are disabled). */
|
|
346
491
|
minDate?: Date;
|
|
492
|
+
/** Maximum selectable date (dates after this are disabled). */
|
|
347
493
|
maxDate?: Date;
|
|
494
|
+
/** Additional CSS class names for the calendar container. */
|
|
348
495
|
className?: string;
|
|
496
|
+
/** Whether the calendar is in a disabled state. @default false */
|
|
349
497
|
disabled?: boolean;
|
|
498
|
+
/** Accent color theme for selection highlights. Uses semantic color keys. @default "primary" */
|
|
350
499
|
variant?: ColorsTypes;
|
|
351
500
|
}
|
|
352
501
|
|
|
502
|
+
/**
|
|
503
|
+
* Full-featured calendar and date picker with week/day/month views, event display, range selection, and drag-to-select.
|
|
504
|
+
*
|
|
505
|
+
* @example
|
|
506
|
+
* <ITCalendar mode="month" onChange={(date) => console.log(date)} variant="primary" />
|
|
507
|
+
*
|
|
508
|
+
* @example
|
|
509
|
+
* <ITCalendar
|
|
510
|
+
* mode="week"
|
|
511
|
+
* events={[{ id: "1", title: "Meeting", start: new Date(), end: new Date() }]}
|
|
512
|
+
* onEventClick={(evt) => console.log(evt)}
|
|
513
|
+
* />
|
|
514
|
+
*/
|
|
353
515
|
declare const ITCalendar: React__default.FC<ITCalendarProps>;
|
|
354
516
|
|
|
355
517
|
interface ITCardProps {
|
|
518
|
+
/** Click handler. When provided, the card becomes interactive with hover shadow effect. */
|
|
356
519
|
onClick?: () => void;
|
|
520
|
+
/** Card title displayed in the header area. */
|
|
357
521
|
title?: string;
|
|
522
|
+
/** Image source URL displayed at the top of the card. */
|
|
358
523
|
image?: string;
|
|
524
|
+
/** Alt text for the card image. @default "Card Image" */
|
|
359
525
|
alt?: string;
|
|
526
|
+
/** Card body content. Rendered below the title. */
|
|
360
527
|
children?: React.ReactNode;
|
|
528
|
+
/** Action elements rendered in a footer section separated by a border. */
|
|
361
529
|
actions?: React.ReactNode;
|
|
530
|
+
/** Additional CSS class names for the card container. */
|
|
362
531
|
className?: string;
|
|
532
|
+
/** Additional CSS class names for the image element. */
|
|
363
533
|
imageClassName?: string;
|
|
534
|
+
/** Additional CSS class names for the title element. */
|
|
364
535
|
titleClassName?: string;
|
|
536
|
+
/** Additional CSS class names for the content wrapper. */
|
|
365
537
|
contentClassName?: string;
|
|
538
|
+
/** Additional CSS class names for the actions footer. */
|
|
366
539
|
actionClassName?: string;
|
|
367
540
|
}
|
|
368
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Versatile card container with optional image, title, body content, and action footer. Supports interactive hover states.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* <ITCard title="Welcome" image="/hero.jpg" actions={<ITButton label="Learn more" />}>
|
|
547
|
+
* This is the card content.
|
|
548
|
+
* </ITCard>
|
|
549
|
+
*
|
|
550
|
+
* @example
|
|
551
|
+
* <ITCard onClick={() => {}} className="max-w-sm">
|
|
552
|
+
* Clickable card with hover shadow.
|
|
553
|
+
* </ITCard>
|
|
554
|
+
*/
|
|
369
555
|
declare function ITCard({ title, image, alt, children, actions, className, imageClassName, titleClassName, contentClassName, actionClassName, onClick, }: ITCardProps): react_jsx_runtime.JSX.Element;
|
|
370
556
|
|
|
371
557
|
interface ITCheckboxProps {
|
|
558
|
+
/** Controlled checked state. @default false */
|
|
372
559
|
checked?: boolean;
|
|
560
|
+
/** Callback fired when the checkbox value changes. Receives the new checked state. */
|
|
373
561
|
onChange?: (checked: boolean) => void;
|
|
562
|
+
/** Label text or element rendered next to the checkbox. */
|
|
374
563
|
label?: ReactNode;
|
|
564
|
+
/** Disables the checkbox interaction and applies reduced opacity. @default false */
|
|
375
565
|
disabled?: boolean;
|
|
566
|
+
/** Renders the checkbox in an indeterminate (dash) state. Has no effect when `checked` is `true`. @default false */
|
|
376
567
|
indeterminate?: boolean;
|
|
568
|
+
/** Additional CSS class names for the label wrapper. */
|
|
377
569
|
className?: string;
|
|
570
|
+
/** HTML name attribute for the native `<input>` element. */
|
|
378
571
|
name?: string;
|
|
379
572
|
}
|
|
380
573
|
|
|
574
|
+
/**
|
|
575
|
+
* Checkbox component with label, indeterminate state, and disabled support. Uses a visually hidden native input for accessibility.
|
|
576
|
+
*
|
|
577
|
+
* @example
|
|
578
|
+
* <ITCheckbox label="Accept terms" checked={agreed} onChange={setAgreed} />
|
|
579
|
+
*
|
|
580
|
+
* @example
|
|
581
|
+
* <ITCheckbox label="Select all" indeterminate={someChecked && !allChecked} onChange={toggleAll} />
|
|
582
|
+
*/
|
|
381
583
|
declare function ITCheckbox({ checked, onChange, label, disabled, indeterminate, className, name, }: ITCheckboxProps): react_jsx_runtime.JSX.Element;
|
|
382
584
|
|
|
383
585
|
interface ITConfirmDialogProps {
|
|
586
|
+
/** Controls whether the confirmation dialog is visible. */
|
|
384
587
|
isOpen: boolean;
|
|
588
|
+
/** Callback fired when the user cancels or closes the dialog. */
|
|
385
589
|
onClose: () => void;
|
|
590
|
+
/** Callback fired when the user confirms the destructive action. */
|
|
386
591
|
onConfirm: () => void;
|
|
592
|
+
/** Heading text displayed at the top of the dialog. @default "Confirmar acción" */
|
|
387
593
|
title?: string;
|
|
594
|
+
/** Body content — accepts plain strings or React nodes. @default "¿Estás seguro de que deseas continuar?" */
|
|
388
595
|
message?: ReactNode;
|
|
596
|
+
/** Label for the confirm button. @default "Confirmar" */
|
|
389
597
|
confirmLabel?: string;
|
|
598
|
+
/** Label for the cancel button. @default "Cancelar" */
|
|
390
599
|
cancelLabel?: string;
|
|
600
|
+
/** Color variant applied to the confirm button. Accepts any ColorsTypes value (e.g. "primary", "danger", "warning", "info"). @default "primary" */
|
|
391
601
|
variant?: ColorsTypes;
|
|
602
|
+
/** Disables all buttons and signals a loading state. @default false */
|
|
392
603
|
loading?: boolean;
|
|
393
604
|
}
|
|
394
605
|
|
|
606
|
+
/**
|
|
607
|
+
* Confirmation modal dialog for destructive or critical actions.
|
|
608
|
+
*
|
|
609
|
+
* Renders a centered overlay with a warning icon, title, message body, and
|
|
610
|
+
* confirm/cancel buttons. The dialog auto-hides when `isOpen` is false.
|
|
611
|
+
*
|
|
612
|
+
* @example
|
|
613
|
+
* ```tsx
|
|
614
|
+
* <ITConfirmDialog
|
|
615
|
+
* isOpen={showConfirm}
|
|
616
|
+
* onClose={() => setShowConfirm(false)}
|
|
617
|
+
* onConfirm={handleDelete}
|
|
618
|
+
* title="Delete record"
|
|
619
|
+
* message="This action is permanent and cannot be undone."
|
|
620
|
+
* variant="danger"
|
|
621
|
+
* loading={isDeleting}
|
|
622
|
+
* />
|
|
623
|
+
* ```
|
|
624
|
+
*/
|
|
395
625
|
declare function ITConfirmDialog({ isOpen, onClose, onConfirm, title, message, confirmLabel, cancelLabel, variant, loading, }: ITConfirmDialogProps): react_jsx_runtime.JSX.Element;
|
|
396
626
|
|
|
397
627
|
type ColumnType = "string" | "date" | "number" | "boolean" | "actions" | "catalog";
|
|
@@ -421,15 +651,32 @@ interface Column<T = any> {
|
|
|
421
651
|
};
|
|
422
652
|
}
|
|
423
653
|
interface ITTableProps<T> {
|
|
654
|
+
/** Column definitions: key, label, type, sortable behavior, filters, and custom rendering. */
|
|
424
655
|
columns: Column<T>[];
|
|
656
|
+
/** Additional CSS classes for the outermost container. */
|
|
425
657
|
containerClassName?: string;
|
|
658
|
+
/** The data array to render in the table body. */
|
|
426
659
|
data: T[];
|
|
660
|
+
/** Visual variant: "default", "striped", "bordered", "borderless". */
|
|
427
661
|
variant?: TableVariants;
|
|
662
|
+
/** Additional CSS classes for the root table wrapper. */
|
|
428
663
|
className?: string;
|
|
664
|
+
/** Row size preset: "sm" | "md" | "lg". */
|
|
429
665
|
size?: TableSize;
|
|
666
|
+
/** Available options for the per-page selector (e.g. [5, 10, 20]). */
|
|
430
667
|
itemsPerPageOptions?: Array<number>;
|
|
668
|
+
/** Default number of rows shown per page. */
|
|
431
669
|
defaultItemsPerPage?: number;
|
|
670
|
+
/** Optional title rendered above the table in the header section. */
|
|
432
671
|
title?: string;
|
|
672
|
+
/** Custom card renderer for mobile/tablet responsive view. Receives the row data. */
|
|
673
|
+
renderCard?: (row: T) => React.ReactNode;
|
|
674
|
+
/** Initial view mode. Defaults to "table". */
|
|
675
|
+
defaultView?: "table" | "cards";
|
|
676
|
+
/** Whether to show vertical borders between columns. Defaults to true. */
|
|
677
|
+
showVerticalBorder?: boolean;
|
|
678
|
+
/** Custom class for vertical borders (overrides the default subtle gray). */
|
|
679
|
+
verticalBorderClassname?: string;
|
|
433
680
|
}
|
|
434
681
|
|
|
435
682
|
interface ITDataTableFetchParams {
|
|
@@ -480,93 +727,280 @@ interface ITDataTableProps<T extends Record<string, unknown>> {
|
|
|
480
727
|
* Example: trigger after a successful modal form submission.
|
|
481
728
|
*/
|
|
482
729
|
reloadTrigger?: number | string | boolean;
|
|
730
|
+
/** Additional CSS classes for the outer wrapper element. */
|
|
483
731
|
containerClassName?: string;
|
|
732
|
+
/** Additional CSS classes applied directly to the `<table>` element. */
|
|
484
733
|
className?: string;
|
|
734
|
+
/** Visual style variant: "default" | "striped" | "bordered" | "minimal". @default "default" */
|
|
485
735
|
variant?: "default" | "striped" | "bordered" | "minimal";
|
|
736
|
+
/** Row density preset: "sm" | "md" | "lg". @default "md" */
|
|
486
737
|
size?: "sm" | "md" | "lg";
|
|
738
|
+
/** Selectable page-size options for the paginator. @default [5, 10, 20] */
|
|
487
739
|
itemsPerPageOptions?: number[];
|
|
740
|
+
/** Initial number of rows per page. @default 10 */
|
|
488
741
|
defaultItemsPerPage?: number;
|
|
742
|
+
/** Optional heading displayed above the table. */
|
|
489
743
|
title?: string | ReactNode;
|
|
744
|
+
/** Custom card renderer for mobile/tablet responsive view. Receives the row data. */
|
|
745
|
+
renderCard?: (row: T) => React.ReactNode;
|
|
746
|
+
/** Initial view mode. Defaults to "table". */
|
|
747
|
+
defaultView?: "table" | "cards";
|
|
748
|
+
/** Whether to show vertical borders between columns. Defaults to true. */
|
|
749
|
+
showVerticalBorder?: boolean;
|
|
750
|
+
/** Custom class for vertical borders (overrides the default subtle gray). */
|
|
751
|
+
verticalBorderClassname?: string;
|
|
490
752
|
}
|
|
491
753
|
|
|
492
|
-
|
|
754
|
+
/**
|
|
755
|
+
* Async server-side data table with sorting, filtering, and pagination.
|
|
756
|
+
*
|
|
757
|
+
* Fetches data via the `fetchData` callback whenever pagination, sorting, or
|
|
758
|
+
* filters change. Supports column-level text/catalog/boolean filters, sortable
|
|
759
|
+
* columns, and a loading overlay. Built on-top of internal table hooks for
|
|
760
|
+
* automatic state coordination.
|
|
761
|
+
*
|
|
762
|
+
* @example
|
|
763
|
+
* ```tsx
|
|
764
|
+
* <ITDataTable
|
|
765
|
+
* columns={[
|
|
766
|
+
* { key: "name", label: "Name", sortable: true, filter: true },
|
|
767
|
+
* { key: "status", label: "Status", type: "boolean", filter: true },
|
|
768
|
+
* ]}
|
|
769
|
+
* fetchData={async (params) => api.fetchItems(params)}
|
|
770
|
+
* title="Users"
|
|
771
|
+
* variant="bordered"
|
|
772
|
+
* />
|
|
773
|
+
* ```
|
|
774
|
+
*/
|
|
775
|
+
declare function ITDataTable<T extends Record<string, unknown>>({ columns, fetchData, debounceMs, externalFilters, loadingIndicator, fetchOnMount, reloadTrigger, containerClassName, className, variant, size, itemsPerPageOptions, defaultItemsPerPage, title, renderCard, defaultView, showVerticalBorder, verticalBorderClassname, }: ITDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
493
776
|
|
|
494
777
|
interface ITDatePickerProps {
|
|
778
|
+
/** Unique name attribute for the underlying input element. */
|
|
495
779
|
name: string;
|
|
780
|
+
/** Selected date. Accepts a single Date or a tuple `[startDate, endDate]` when `range` is true. */
|
|
496
781
|
value?: Date | [Date | null, Date | null];
|
|
782
|
+
/** Called when the selected date changes. The event object carries `name` and `value` in its target. */
|
|
497
783
|
onChange: (event: React.ChangeEvent<HTMLInputElement> | {
|
|
498
784
|
target: {
|
|
499
785
|
name: string;
|
|
500
786
|
value: Date | [Date | null, Date | null];
|
|
501
787
|
};
|
|
502
788
|
}) => void;
|
|
789
|
+
/** Called when the input loses focus. */
|
|
503
790
|
onBlur?: (event: React.FocusEvent<HTMLInputElement> | {
|
|
504
791
|
target: {
|
|
505
792
|
name: string;
|
|
506
793
|
value: Date | [Date | null, Date | null];
|
|
507
794
|
};
|
|
508
795
|
}) => void;
|
|
796
|
+
/** Enables date-range selection mode. When true, `value` is treated as a start-end tuple. @default false */
|
|
509
797
|
range?: boolean;
|
|
798
|
+
/** Color variant matching the design system (ColorsTypes). @default "primary" */
|
|
510
799
|
variant?: ColorsTypes;
|
|
800
|
+
/** Size variant matching the design system (SizesTypes). @default "medium" */
|
|
511
801
|
size?: SizesTypes;
|
|
802
|
+
/** Additional CSS classes for the wrapper element. */
|
|
512
803
|
className?: string;
|
|
804
|
+
/** Additional CSS classes for the calendar popover. */
|
|
513
805
|
calendarClassName?: string;
|
|
806
|
+
/** Disables the date picker. @default false */
|
|
514
807
|
disabled?: boolean;
|
|
808
|
+
/** Placeholder text shown when no date is selected. */
|
|
515
809
|
placeholder?: string;
|
|
810
|
+
/** Accessible label rendered above the input. */
|
|
516
811
|
label?: string;
|
|
812
|
+
/** Marks the field as required. */
|
|
517
813
|
required?: boolean;
|
|
814
|
+
/** Visually indicates the field has been interacted with. */
|
|
518
815
|
touched?: boolean;
|
|
816
|
+
/** Error state — pass a string message or `true` for default styling. */
|
|
519
817
|
error?: string | boolean;
|
|
818
|
+
/** Earliest selectable date. */
|
|
520
819
|
minDate?: Date;
|
|
820
|
+
/** Latest selectable date. */
|
|
521
821
|
maxDate?: Date;
|
|
522
822
|
}
|
|
523
823
|
|
|
824
|
+
/**
|
|
825
|
+
* Date picker component with single-date and date-range modes.
|
|
826
|
+
*
|
|
827
|
+
* Supports manual text input (DD/MM/YYYY format) and a calendar popover.
|
|
828
|
+
* In range mode the user selects a start date then an end date; the calendar
|
|
829
|
+
* highlights the interval. Position-aware popover flips above the input when
|
|
830
|
+
* near the bottom of the viewport.
|
|
831
|
+
*
|
|
832
|
+
* @example
|
|
833
|
+
* ```tsx
|
|
834
|
+
* <ITDatePicker
|
|
835
|
+
* name="birthDate"
|
|
836
|
+
* label="Date of birth"
|
|
837
|
+
* value={date}
|
|
838
|
+
* onChange={(e) => setDate(e.target.value)}
|
|
839
|
+
* maxDate={new Date()}
|
|
840
|
+
* />
|
|
841
|
+
* ```
|
|
842
|
+
*
|
|
843
|
+
* @example
|
|
844
|
+
* ```tsx
|
|
845
|
+
* <ITDatePicker
|
|
846
|
+
* name="travelRange"
|
|
847
|
+
* label="Travel dates"
|
|
848
|
+
* range
|
|
849
|
+
* value={[startDate, endDate]}
|
|
850
|
+
* onChange={(e) => setRange(e.target.value)}
|
|
851
|
+
* />
|
|
852
|
+
* ```
|
|
853
|
+
*/
|
|
524
854
|
declare function ITDatePicker({ name, value, onChange, onBlur, variant, size, className, calendarClassName, disabled, label, touched, error, required, placeholder, minDate, maxDate, range, }: ITDatePickerProps): react_jsx_runtime.JSX.Element;
|
|
525
855
|
|
|
526
856
|
interface ITDialogProps {
|
|
857
|
+
/** Controls whether the dialog is visible. */
|
|
527
858
|
isOpen: boolean;
|
|
859
|
+
/** Callback fired when the overlay or close button is clicked, or Escape is pressed. */
|
|
528
860
|
onClose: () => void;
|
|
861
|
+
/** Content rendered inside the dialog body. */
|
|
529
862
|
children: React.ReactNode;
|
|
863
|
+
/** Additional CSS classes for the dialog panel. */
|
|
530
864
|
className?: string;
|
|
865
|
+
/** Optional heading displayed at the top of the dialog. */
|
|
531
866
|
title?: string;
|
|
867
|
+
/** When true and `title` is provided, renders an ITFormHeader instead of the default title bar. @default false */
|
|
532
868
|
useFormHeader?: boolean;
|
|
869
|
+
/** Makes the dialog fill the entire viewport. @default false */
|
|
533
870
|
fullScreen?: boolean;
|
|
534
871
|
}
|
|
535
872
|
|
|
873
|
+
/**
|
|
874
|
+
* Modal dialog rendered via React portal with overlay backdrop.
|
|
875
|
+
*
|
|
876
|
+
* Supports Escape-key dismissal, click-outside-to-close, optional title bar
|
|
877
|
+
* (plain or ITFormHeader), and a full-screen variant. Content is portaled to
|
|
878
|
+
* `document.body` so it sits above all other page layers.
|
|
879
|
+
*
|
|
880
|
+
* @example
|
|
881
|
+
* ```tsx
|
|
882
|
+
* <ITDialog
|
|
883
|
+
* isOpen={open}
|
|
884
|
+
* onClose={() => setOpen(false)}
|
|
885
|
+
* title="User details"
|
|
886
|
+
* useFormHeader
|
|
887
|
+
* >
|
|
888
|
+
* <UserForm />
|
|
889
|
+
* </ITDialog>
|
|
890
|
+
* ```
|
|
891
|
+
*
|
|
892
|
+
* @example
|
|
893
|
+
* ```tsx
|
|
894
|
+
* <ITDialog isOpen={open} onClose={close} fullScreen>
|
|
895
|
+
* <FullPageEditor />
|
|
896
|
+
* </ITDialog>
|
|
897
|
+
* ```
|
|
898
|
+
*/
|
|
536
899
|
declare function ITDialog({ isOpen, onClose, children, className, title, useFormHeader, fullScreen, }: ITDialogProps): React$1.ReactPortal;
|
|
537
900
|
|
|
901
|
+
/** Direction the divider flows: "horizontal" | "vertical". */
|
|
538
902
|
type DividerOrientation = "horizontal" | "vertical";
|
|
539
903
|
interface ITDividerProps {
|
|
904
|
+
/** Layout direction. @default "horizontal" */
|
|
540
905
|
orientation?: DividerOrientation;
|
|
906
|
+
/** Additional CSS classes for the divider element. */
|
|
541
907
|
className?: string;
|
|
908
|
+
/** Tailwind background color class(es). @default "bg-slate-200 dark:bg-slate-700" */
|
|
542
909
|
color?: string;
|
|
910
|
+
/** Tailwind width/height utility (e.g. "h-px", "h-1", "w-px"). Auto-set based on orientation if omitted. */
|
|
543
911
|
thickness?: string;
|
|
544
912
|
}
|
|
545
913
|
|
|
914
|
+
/**
|
|
915
|
+
* Horizontal or vertical separator line.
|
|
916
|
+
*
|
|
917
|
+
* Renders a thin full-width (horizontal) or full-height (vertical) bar using
|
|
918
|
+
* Tailwind utility classes. Supports custom color and thickness overrides.
|
|
919
|
+
*
|
|
920
|
+
* @example
|
|
921
|
+
* ```tsx
|
|
922
|
+
* <ITDivider />
|
|
923
|
+
* ```
|
|
924
|
+
*
|
|
925
|
+
* @example
|
|
926
|
+
* ```tsx
|
|
927
|
+
* <ITDivider orientation="vertical" color="bg-red-500" thickness="w-1" />
|
|
928
|
+
* ```
|
|
929
|
+
*/
|
|
546
930
|
declare function ITDivider({ orientation, className, color, thickness, }: ITDividerProps): react_jsx_runtime.JSX.Element;
|
|
547
931
|
|
|
932
|
+
/** Screen edge from which the drawer slides in: "left" | "right". */
|
|
548
933
|
type DrawerPosition = "left" | "right";
|
|
549
934
|
interface ITDrawerProps {
|
|
935
|
+
/** Controls whether the drawer is visible. */
|
|
550
936
|
isOpen: boolean;
|
|
937
|
+
/** Callback fired when the overlay is clicked or the close button is pressed. */
|
|
551
938
|
onClose: () => void;
|
|
939
|
+
/** Edge the drawer attaches to. @default "right" */
|
|
552
940
|
position?: DrawerPosition;
|
|
941
|
+
/** Tailwind width class (e.g. "w-80", "w-96"). @default "w-80" */
|
|
553
942
|
size?: string;
|
|
943
|
+
/** Optional heading rendered in the drawer header. */
|
|
554
944
|
title?: ReactNode;
|
|
945
|
+
/** Content displayed in the drawer body. */
|
|
555
946
|
children?: ReactNode;
|
|
947
|
+
/** Additional CSS classes for the drawer panel. */
|
|
556
948
|
className?: string;
|
|
949
|
+
/** Inline styles for the drawer panel. */
|
|
557
950
|
style?: CSSProperties;
|
|
558
951
|
}
|
|
559
952
|
|
|
953
|
+
/**
|
|
954
|
+
* Sliding panel drawer from the left or right screen edge.
|
|
955
|
+
*
|
|
956
|
+
* Renders an overlay backdrop with a horizontally-anchored panel that slides
|
|
957
|
+
* in. Includes an optional title bar with close button and a scrollable body
|
|
958
|
+
* area. Uses the `useClickOutside` hook for overlay dismissal.
|
|
959
|
+
*
|
|
960
|
+
* @example
|
|
961
|
+
* ```tsx
|
|
962
|
+
* <ITDrawer
|
|
963
|
+
* isOpen={menuOpen}
|
|
964
|
+
* onClose={() => setMenuOpen(false)}
|
|
965
|
+
* title="Navigation"
|
|
966
|
+
* position="left"
|
|
967
|
+
* size="w-72"
|
|
968
|
+
* >
|
|
969
|
+
* <NavMenu />
|
|
970
|
+
* </ITDrawer>
|
|
971
|
+
* ```
|
|
972
|
+
*/
|
|
560
973
|
declare function ITDrawer({ isOpen, onClose, position, size, title, children, className, style, }: ITDrawerProps): react_jsx_runtime.JSX.Element;
|
|
561
974
|
|
|
562
975
|
interface ITEmptyStateProps {
|
|
976
|
+
/** Icon or illustration displayed above the title. @default <FaInbox size={40} /> */
|
|
563
977
|
icon?: ReactNode;
|
|
978
|
+
/** Primary heading text (required). */
|
|
564
979
|
title: string;
|
|
980
|
+
/** Secondary explanatory text shown below the title. */
|
|
565
981
|
description?: string;
|
|
982
|
+
/** Action element (typically a button) rendered below the description. */
|
|
566
983
|
action?: ReactNode;
|
|
984
|
+
/** Additional CSS classes for the wrapper element. */
|
|
567
985
|
className?: string;
|
|
568
986
|
}
|
|
569
987
|
|
|
988
|
+
/**
|
|
989
|
+
* Placeholder display for empty data sets.
|
|
990
|
+
*
|
|
991
|
+
* Shows a large icon, a title, an optional description, and an optional
|
|
992
|
+
* call-to-action element (usually a button). Centered vertically and
|
|
993
|
+
* horizontally within its container.
|
|
994
|
+
*
|
|
995
|
+
* @example
|
|
996
|
+
* ```tsx
|
|
997
|
+
* <ITEmptyState
|
|
998
|
+
* title="No results found"
|
|
999
|
+
* description="Try adjusting your search or filters."
|
|
1000
|
+
* action={<ITButton label="Clear filters" variant="outlined" onClick={clearFilters} />}
|
|
1001
|
+
* />
|
|
1002
|
+
* ```
|
|
1003
|
+
*/
|
|
570
1004
|
declare function ITEmptyState({ icon, title, description, action, className, }: ITEmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
571
1005
|
|
|
572
1006
|
type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
@@ -574,21 +1008,49 @@ type FlexAlign = "start" | "end" | "center" | "stretch" | "baseline";
|
|
|
574
1008
|
type FlexJustify = "start" | "end" | "center" | "between" | "around" | "evenly";
|
|
575
1009
|
type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
|
|
576
1010
|
interface ITFlexProps {
|
|
1011
|
+
/** Child elements to render inside the flex container */
|
|
577
1012
|
children?: ReactNode;
|
|
1013
|
+
/** Main axis direction: "row" | "column" | "row-reverse" | "column-reverse" */
|
|
578
1014
|
direction?: FlexDirection;
|
|
1015
|
+
/** Cross-axis alignment: "start" | "end" | "center" | "stretch" | "baseline" */
|
|
579
1016
|
align?: FlexAlign;
|
|
1017
|
+
/** Main-axis justification: "start" | "end" | "center" | "between" | "around" | "evenly" */
|
|
580
1018
|
justify?: FlexJustify;
|
|
1019
|
+
/** Wrapping behavior: "nowrap" | "wrap" | "wrap-reverse" */
|
|
581
1020
|
wrap?: FlexWrap;
|
|
1021
|
+
/** Gap between children in units of 0.25rem */
|
|
582
1022
|
gap?: number;
|
|
1023
|
+
/** Flex grow factor. Pass `true` for 1, `false` for 0, or a number */
|
|
583
1024
|
grow?: boolean | number;
|
|
1025
|
+
/** Flex shrink factor. Pass `true` for 1, `false` for 0, or a number */
|
|
584
1026
|
shrink?: boolean | number;
|
|
1027
|
+
/** Flex basis value. Numbers are multiplied by 0.25rem; strings used as-is */
|
|
585
1028
|
basis?: string | number;
|
|
1029
|
+
/** Additional CSS classes */
|
|
586
1030
|
className?: string;
|
|
1031
|
+
/** Inline styles */
|
|
587
1032
|
style?: CSSProperties;
|
|
1033
|
+
/** Custom HTML element type to render instead of the default `div` */
|
|
588
1034
|
as?: ElementType;
|
|
1035
|
+
/** Click handler */
|
|
589
1036
|
onClick?: (e: React.MouseEvent) => void;
|
|
590
1037
|
}
|
|
591
1038
|
|
|
1039
|
+
/**
|
|
1040
|
+
* A complete flexbox container with all alignment and spacing options.
|
|
1041
|
+
*
|
|
1042
|
+
* @example
|
|
1043
|
+
* <ITFlex direction="row" justify="between" align="center" gap={4}>
|
|
1044
|
+
* <div>Left</div>
|
|
1045
|
+
* <div>Right</div>
|
|
1046
|
+
* </ITFlex>
|
|
1047
|
+
*
|
|
1048
|
+
* @example
|
|
1049
|
+
* <ITFlex direction="column" gap={2} as="section">
|
|
1050
|
+
* <header>Title</header>
|
|
1051
|
+
* <main>Content</main>
|
|
1052
|
+
* </ITFlex>
|
|
1053
|
+
*/
|
|
592
1054
|
declare function ITFlex({ children, direction, align, justify, wrap, gap, grow, shrink, basis, className, style, as: Component, onClick, }: ITFlexProps): react_jsx_runtime.JSX.Element;
|
|
593
1055
|
|
|
594
1056
|
interface FieldConfig {
|
|
@@ -669,344 +1131,753 @@ interface FieldConfigV2 {
|
|
|
669
1131
|
}
|
|
670
1132
|
|
|
671
1133
|
interface ITFormBuilderProps {
|
|
1134
|
+
/** Legacy field definitions (V1). Use `config` for the V2 architecture instead */
|
|
672
1135
|
fields?: FieldConfig[];
|
|
1136
|
+
/** V2 field configuration array. Preferred over the legacy `fields` prop */
|
|
673
1137
|
config?: FieldConfigV2[];
|
|
1138
|
+
/** Number of grid columns (1-12) */
|
|
674
1139
|
columns?: number;
|
|
1140
|
+
/** Current form values keyed by field name */
|
|
675
1141
|
values: any;
|
|
1142
|
+
/** Change handler for input, select, and textarea elements */
|
|
676
1143
|
handleChange: (event: React.ChangeEvent<HTMLInputElement> | React.FocusEvent<HTMLInputElement> | React.ChangeEvent<HTMLSelectElement> | {
|
|
677
1144
|
target: {
|
|
678
1145
|
name: string;
|
|
679
1146
|
value: any;
|
|
680
1147
|
};
|
|
681
1148
|
}) => void;
|
|
1149
|
+
/** Blur handler for input, select, and textarea elements */
|
|
682
1150
|
handleBlur: (event: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLSelectElement, Element> | React.FocusEvent<HTMLTextAreaElement, Element> | {
|
|
683
1151
|
target: {
|
|
684
1152
|
name: string;
|
|
685
1153
|
value: any;
|
|
686
1154
|
};
|
|
687
1155
|
}) => void;
|
|
1156
|
+
/** Touch state keyed by field name */
|
|
688
1157
|
touched: any;
|
|
1158
|
+
/** Validation errors keyed by field name */
|
|
689
1159
|
errors: any;
|
|
1160
|
+
/** Programmatically set a field value */
|
|
690
1161
|
setFieldValue?: (field: string, value: any, shouldValidate?: boolean) => Promise<void | any>;
|
|
1162
|
+
/** Programmatically mark a field as touched */
|
|
691
1163
|
setFieldTouched?: (field: string, touched?: boolean, shouldValidate?: boolean) => Promise<void | any>;
|
|
1164
|
+
/** Programmatically set a field-level error message */
|
|
692
1165
|
setFieldError?: (field: string, message: string | undefined) => void;
|
|
1166
|
+
/** Whether the form is currently submitting */
|
|
693
1167
|
isSubmitting?: boolean;
|
|
694
1168
|
}
|
|
695
1169
|
|
|
1170
|
+
/**
|
|
1171
|
+
* Dynamic form generator from field definitions with validation support.
|
|
1172
|
+
* Renders a responsive grid of inputs, selects, and date pickers based on
|
|
1173
|
+
* the provided field configuration. Supports both legacy (`fields`) and
|
|
1174
|
+
* V2 (`config`) field definition formats.
|
|
1175
|
+
*
|
|
1176
|
+
* @example
|
|
1177
|
+
* <ITFormBuilder
|
|
1178
|
+
* fields={[
|
|
1179
|
+
* { name: "email", label: "Email", type: "text", required: true, column: 6 },
|
|
1180
|
+
* { name: "role", label: "Role", type: "select", options: [{ id: 1, label: "Admin" }], column: 6 },
|
|
1181
|
+
* ]}
|
|
1182
|
+
* values={formValues}
|
|
1183
|
+
* handleChange={handleChange}
|
|
1184
|
+
* handleBlur={handleBlur}
|
|
1185
|
+
* touched={touched}
|
|
1186
|
+
* errors={errors}
|
|
1187
|
+
* columns={12}
|
|
1188
|
+
* />
|
|
1189
|
+
*
|
|
1190
|
+
* @example
|
|
1191
|
+
* <ITFormBuilder
|
|
1192
|
+
* config={v2FieldConfigs}
|
|
1193
|
+
* values={formValues}
|
|
1194
|
+
* handleChange={handleChange}
|
|
1195
|
+
* handleBlur={handleBlur}
|
|
1196
|
+
* touched={touched}
|
|
1197
|
+
* errors={errors}
|
|
1198
|
+
* isSubmitting={loading}
|
|
1199
|
+
* />
|
|
1200
|
+
*/
|
|
696
1201
|
declare function ITFormBuilder({ fields, config, columns, values, handleChange, handleBlur, touched, errors, setFieldValue, setFieldTouched, setFieldError, isSubmitting, }: ITFormBuilderProps): react_jsx_runtime.JSX.Element;
|
|
697
1202
|
|
|
698
1203
|
interface ITFormHeaderProps {
|
|
1204
|
+
/** Header title text */
|
|
699
1205
|
title: string;
|
|
1206
|
+
/** Optional close button click handler. If omitted, no close button is rendered */
|
|
700
1207
|
onClose?: () => void;
|
|
1208
|
+
/** Additional CSS classes */
|
|
701
1209
|
className?: string;
|
|
702
1210
|
}
|
|
703
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* Colored header bar for modals and forms with an optional close button.
|
|
1214
|
+
* Uses the theme's primary color as the background and automatically
|
|
1215
|
+
* calculates a contrasting text color for readability.
|
|
1216
|
+
*
|
|
1217
|
+
* @example
|
|
1218
|
+
* <ITFormHeader title="Create User" onClose={() => setOpen(false)} />
|
|
1219
|
+
*
|
|
1220
|
+
* @example
|
|
1221
|
+
* <ITFormHeader title="Details" className="rounded-none" />
|
|
1222
|
+
*/
|
|
704
1223
|
declare function ITFormHeader({ title, onClose, className, }: ITFormHeaderProps): react_jsx_runtime.JSX.Element;
|
|
705
1224
|
|
|
706
1225
|
interface ITGridProps {
|
|
1226
|
+
/** Child elements */
|
|
707
1227
|
children?: ReactNode;
|
|
1228
|
+
/** Render as a grid container (CSS grid parent) */
|
|
708
1229
|
container?: boolean;
|
|
1230
|
+
/** Render as a grid item (CSS grid child). If neither `container` nor `item` is set, renders a plain div */
|
|
709
1231
|
item?: boolean;
|
|
1232
|
+
/** Gap between grid children in units of 0.25rem. Only applies when `container` is true */
|
|
710
1233
|
spacing?: number;
|
|
1234
|
+
/** Number of grid columns (1-12). Only applies when `container` is true */
|
|
711
1235
|
columns?: number;
|
|
1236
|
+
/** Column span at the base breakpoint (mobile). Falls back to `sm` if not set */
|
|
712
1237
|
xs?: number;
|
|
1238
|
+
/** Column span at the `sm` breakpoint */
|
|
713
1239
|
sm?: number;
|
|
1240
|
+
/** Column span at the `md` breakpoint */
|
|
714
1241
|
md?: number;
|
|
1242
|
+
/** Column span at the `lg` breakpoint */
|
|
715
1243
|
lg?: number;
|
|
1244
|
+
/** Column span at the `xl` breakpoint */
|
|
716
1245
|
xl?: number;
|
|
1246
|
+
/** Additional CSS classes */
|
|
717
1247
|
className?: string;
|
|
1248
|
+
/** Inline styles */
|
|
718
1249
|
style?: CSSProperties;
|
|
1250
|
+
/** Custom HTML element type to render instead of the default `div` */
|
|
719
1251
|
as?: ElementType;
|
|
720
1252
|
}
|
|
721
1253
|
|
|
1254
|
+
/**
|
|
1255
|
+
* Responsive 12-column CSS grid layout system.
|
|
1256
|
+
* Renders as a grid container when `container` is true, as a column-spanning
|
|
1257
|
+
* item when `item` is true. Supports breakpoint-aware column spans and
|
|
1258
|
+
* configurable spacing between items.
|
|
1259
|
+
*
|
|
1260
|
+
* @example
|
|
1261
|
+
* <ITGrid container columns={12} spacing={4}>
|
|
1262
|
+
* <ITGrid item xs={12} md={6}>Sidebar</ITGrid>
|
|
1263
|
+
* <ITGrid item xs={12} md={6}>Content</ITGrid>
|
|
1264
|
+
* </ITGrid>
|
|
1265
|
+
*
|
|
1266
|
+
* @example
|
|
1267
|
+
* <ITGrid container columns={3} spacing={2} as="section">
|
|
1268
|
+
* <ITGrid item>Card 1</ITGrid>
|
|
1269
|
+
* <ITGrid item>Card 2</ITGrid>
|
|
1270
|
+
* <ITGrid item>Card 3</ITGrid>
|
|
1271
|
+
* </ITGrid>
|
|
1272
|
+
*/
|
|
722
1273
|
declare function ITGrid({ children, container, item, spacing, columns, xs, sm, md, lg, xl, className, style, as: Component, }: ITGridProps): react_jsx_runtime.JSX.Element;
|
|
723
1274
|
|
|
724
1275
|
interface ITImageProps {
|
|
1276
|
+
/** Source URL of the image */
|
|
725
1277
|
src: string;
|
|
1278
|
+
/** Alt text for accessibility */
|
|
726
1279
|
alt?: string;
|
|
1280
|
+
/** Additional CSS classes */
|
|
727
1281
|
className?: string;
|
|
1282
|
+
/** Fallback image URL shown when the primary `src` fails to load */
|
|
728
1283
|
fallback?: string;
|
|
1284
|
+
/** Click handler */
|
|
729
1285
|
onClick?: () => void;
|
|
730
1286
|
}
|
|
731
1287
|
|
|
1288
|
+
/**
|
|
1289
|
+
* Image component with automatic fallback on load error.
|
|
1290
|
+
* Displays the primary `src` image and gracefully switches to the
|
|
1291
|
+
* `fallback` image if loading fails.
|
|
1292
|
+
*
|
|
1293
|
+
* @example
|
|
1294
|
+
* <ITImage
|
|
1295
|
+
* src="https://example.com/photo.jpg"
|
|
1296
|
+
* fallback="/images/placeholder.png"
|
|
1297
|
+
* alt="User photo"
|
|
1298
|
+
* />
|
|
1299
|
+
*
|
|
1300
|
+
* @example
|
|
1301
|
+
* <ITImage
|
|
1302
|
+
* src="/assets/logo.svg"
|
|
1303
|
+
* alt="Company Logo"
|
|
1304
|
+
* className="w-32 h-32 rounded-full"
|
|
1305
|
+
* />
|
|
1306
|
+
*/
|
|
732
1307
|
declare const ITImage: ({ src, alt, className, fallback, }: ITImageProps) => react_jsx_runtime.JSX.Element;
|
|
733
1308
|
|
|
734
1309
|
interface ITInputProps {
|
|
1310
|
+
/** Field name used for form identification */
|
|
735
1311
|
name: string;
|
|
1312
|
+
/** Input type: "text" | "password" | "number" | "email" | "checkbox" | "radio" | "textarea" */
|
|
736
1313
|
type?: "text" | "password" | "number" | "email" | "checkbox" | "radio" | "textarea";
|
|
1314
|
+
/** Label displayed above the input */
|
|
737
1315
|
label?: string;
|
|
1316
|
+
/** Enable currency formatting for number inputs (MX locale) */
|
|
738
1317
|
currencyFormat?: boolean;
|
|
1318
|
+
/** Placeholder text */
|
|
739
1319
|
placeholder?: string;
|
|
1320
|
+
/** Current input value */
|
|
740
1321
|
value?: any;
|
|
1322
|
+
/** Change event handler */
|
|
741
1323
|
onChange: (event: any) => void;
|
|
1324
|
+
/** Blur event handler */
|
|
742
1325
|
onBlur?: (event: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement, Element>) => void;
|
|
1326
|
+
/** Keydown event handler */
|
|
743
1327
|
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
1328
|
+
/** Show character count hint below the input */
|
|
744
1329
|
showHintLength?: boolean;
|
|
1330
|
+
/** Maximum allowed character length */
|
|
745
1331
|
maxLength?: number;
|
|
1332
|
+
/** Minimum allowed character length */
|
|
746
1333
|
minLength?: number;
|
|
1334
|
+
/** Color variant from the theme palette */
|
|
747
1335
|
variant?: ColorsTypes;
|
|
1336
|
+
/** Size preset: "xs" | "sm" | "md" | "lg" | "xl" */
|
|
748
1337
|
size?: SizesTypes;
|
|
1338
|
+
/** Disable the input */
|
|
749
1339
|
disabled?: boolean;
|
|
1340
|
+
/** Additional CSS classes for the outer container */
|
|
750
1341
|
containerClassName?: string;
|
|
1342
|
+
/** Additional CSS classes for the label */
|
|
751
1343
|
labelClassName?: string;
|
|
1344
|
+
/** Additional CSS classes for the input element */
|
|
752
1345
|
className?: string;
|
|
1346
|
+
/** Whether the field has been touched by the user */
|
|
753
1347
|
touched?: boolean;
|
|
1348
|
+
/** Validation error message. Pass `true` for a generic error, or a string for a custom message */
|
|
754
1349
|
error?: string | boolean;
|
|
1350
|
+
/** Mark the field as required */
|
|
755
1351
|
required?: boolean;
|
|
1352
|
+
/** Enable number formatting on blur */
|
|
756
1353
|
formatNumber?: boolean;
|
|
1354
|
+
/** Auto-focus the input on mount */
|
|
757
1355
|
autoFocus?: boolean;
|
|
1356
|
+
/** Select all content on click */
|
|
758
1357
|
focusContent?: boolean;
|
|
1358
|
+
/** Click handler for the input */
|
|
759
1359
|
onClick?: () => void;
|
|
1360
|
+
/** Icon element rendered on the left side of the input */
|
|
760
1361
|
iconLeft?: ReactNode;
|
|
1362
|
+
/** Icon element rendered on the right side of the input */
|
|
761
1363
|
iconRight?: ReactNode;
|
|
1364
|
+
/** Checked state for checkbox and radio types */
|
|
762
1365
|
checked?: boolean;
|
|
1366
|
+
/** Number of visible rows for textarea type */
|
|
763
1367
|
rows?: number;
|
|
1368
|
+
/** Minimum numeric value for number inputs */
|
|
764
1369
|
min?: number;
|
|
1370
|
+
/** Maximum numeric value for number inputs */
|
|
765
1371
|
max?: number;
|
|
1372
|
+
/** Render the input in read-only mode */
|
|
766
1373
|
readOnly?: boolean;
|
|
767
1374
|
}
|
|
768
1375
|
|
|
1376
|
+
/**
|
|
1377
|
+
* Text input component with label, validation error display, icon slots,
|
|
1378
|
+
* and helper text. Supports text, password, email, number (with currency
|
|
1379
|
+
* and thousand formatting), checkbox, radio, and textarea types.
|
|
1380
|
+
*
|
|
1381
|
+
* @example
|
|
1382
|
+
* <ITInput
|
|
1383
|
+
* name="email"
|
|
1384
|
+
* label="Email Address"
|
|
1385
|
+
* type="email"
|
|
1386
|
+
* placeholder="you@example.com"
|
|
1387
|
+
* value={email}
|
|
1388
|
+
* onChange={handleChange}
|
|
1389
|
+
* error={errors.email}
|
|
1390
|
+
* required
|
|
1391
|
+
* />
|
|
1392
|
+
*
|
|
1393
|
+
* @example
|
|
1394
|
+
* <ITInput
|
|
1395
|
+
* name="amount"
|
|
1396
|
+
* label="Amount"
|
|
1397
|
+
* type="number"
|
|
1398
|
+
* currencyFormat
|
|
1399
|
+
* iconLeft={<FaDollarSign />}
|
|
1400
|
+
* value={amount}
|
|
1401
|
+
* onChange={handleChange}
|
|
1402
|
+
* maxLength={10}
|
|
1403
|
+
* />
|
|
1404
|
+
*/
|
|
769
1405
|
declare function ITInput({ name, type, label, placeholder, value, onChange, onBlur, disabled, className, containerClassName, labelClassName, touched, error, formatNumber, required, autoFocus, onClick, onKeyDown, iconLeft, iconRight, maxLength, minLength, checked, showHintLength, currencyFormat, rows, min, max, readOnly, focusContent }: ITInputProps): react_jsx_runtime.JSX.Element;
|
|
770
1406
|
|
|
1407
|
+
/** Represents a navigation item in the sidebar. */
|
|
771
1408
|
interface ITNavigationItem$1 {
|
|
1409
|
+
/** Unique identifier for the navigation item. */
|
|
772
1410
|
id: string;
|
|
1411
|
+
/** Display label for the navigation item. */
|
|
773
1412
|
label: string;
|
|
1413
|
+
/** Optional icon rendered next to the label. */
|
|
774
1414
|
icon?: React.ReactNode;
|
|
1415
|
+
/** Callback fired when the item is clicked. */
|
|
775
1416
|
action?: () => void;
|
|
1417
|
+
/** Whether the item is currently active and highlighted. */
|
|
776
1418
|
isActive?: boolean;
|
|
1419
|
+
/** Optional nested sub-navigation items. */
|
|
777
1420
|
subitems?: ITNavigationSubItem$1[];
|
|
778
1421
|
}
|
|
1422
|
+
/** Represents a sub-navigation item within a parent navigation item. */
|
|
779
1423
|
interface ITNavigationSubItem$1 {
|
|
1424
|
+
/** Unique identifier for the sub-item. */
|
|
780
1425
|
id: string;
|
|
1426
|
+
/** Display label for the sub-item. */
|
|
781
1427
|
label: string;
|
|
1428
|
+
/** Callback fired when the sub-item is clicked. */
|
|
782
1429
|
action: () => void;
|
|
1430
|
+
/** Whether the sub-item is currently active and highlighted. */
|
|
783
1431
|
isActive?: boolean;
|
|
784
1432
|
}
|
|
1433
|
+
/** Props for the ITNavbar component. */
|
|
785
1434
|
interface ITNavbarProps {
|
|
1435
|
+
/** Logo element rendered in the sidebar header. */
|
|
786
1436
|
logo?: React.ReactNode;
|
|
1437
|
+
/** Text displayed next to the logo. */
|
|
787
1438
|
logoText?: string;
|
|
1439
|
+
/** Array of navigation items for the main sidebar menu. */
|
|
788
1440
|
navigationItems?: ITNavigationItem$1[];
|
|
1441
|
+
/** User menu configuration including avatar, name, email, and dropdown items. */
|
|
789
1442
|
userMenu?: {
|
|
1443
|
+
/** URL for the user's profile image. */
|
|
790
1444
|
userImage?: string;
|
|
1445
|
+
/** Display name of the user. */
|
|
791
1446
|
userName: string;
|
|
1447
|
+
/** Email address of the user. */
|
|
792
1448
|
userEmail: string;
|
|
1449
|
+
/** Dropdown menu items for the user menu. */
|
|
793
1450
|
menuItems: Array<{
|
|
1451
|
+
/** Display label for the menu item. */
|
|
794
1452
|
label: string;
|
|
1453
|
+
/** Callback fired when the menu item is clicked. */
|
|
795
1454
|
onClick: () => void;
|
|
796
1455
|
}>;
|
|
797
1456
|
};
|
|
1457
|
+
/** Content rendered in the main area next to the sidebar. */
|
|
798
1458
|
children?: React.ReactNode;
|
|
1459
|
+
/** Legacy navigation items. Use `navigationItems` instead.
|
|
1460
|
+
* @deprecated
|
|
1461
|
+
*/
|
|
799
1462
|
navItems?: React.ReactNode;
|
|
1463
|
+
/** Legacy flag to show the sidebar.
|
|
1464
|
+
* @deprecated
|
|
1465
|
+
*/
|
|
800
1466
|
showSidebar?: boolean;
|
|
1467
|
+
/** Legacy flag to show the sidebar on mobile devices.
|
|
1468
|
+
* @deprecated
|
|
1469
|
+
*/
|
|
801
1470
|
showSidebarOnMobile?: boolean;
|
|
1471
|
+
/** Legacy sidebar items. Use `navigationItems` instead.
|
|
1472
|
+
* @deprecated
|
|
1473
|
+
*/
|
|
802
1474
|
sidebarItems?: React.ReactNode;
|
|
803
1475
|
}
|
|
804
1476
|
|
|
1477
|
+
/**
|
|
1478
|
+
* Full sidebar navigation shell with collapsible submenus, user menu dropdown, and themed styling.
|
|
1479
|
+
*
|
|
1480
|
+
* @example
|
|
1481
|
+
* ```tsx
|
|
1482
|
+
* <ITNavbar
|
|
1483
|
+
* logo={<LogoIcon />}
|
|
1484
|
+
* logoText="My App"
|
|
1485
|
+
* navigationItems={[
|
|
1486
|
+
* { id: 'home', label: 'Home', icon: <FaHome />, isActive: true },
|
|
1487
|
+
* {
|
|
1488
|
+
* id: 'settings',
|
|
1489
|
+
* label: 'Settings',
|
|
1490
|
+
* icon: <FaCog />,
|
|
1491
|
+
* subitems: [{ id: 'profile', label: 'Profile', action: () => {} }],
|
|
1492
|
+
* },
|
|
1493
|
+
* ]}
|
|
1494
|
+
* userMenu={{
|
|
1495
|
+
* userName: 'John Doe',
|
|
1496
|
+
* userEmail: 'john@example.com',
|
|
1497
|
+
* menuItems: [{ label: 'Logout', onClick: () => {} }],
|
|
1498
|
+
* }}
|
|
1499
|
+
* >
|
|
1500
|
+
* <ITPage title="Dashboard">...</ITPage>
|
|
1501
|
+
* </ITNavbar>
|
|
1502
|
+
* ```
|
|
1503
|
+
*/
|
|
805
1504
|
declare function ITNavbar({ logo, logoText, navigationItems, userMenu, children, navItems, showSidebar, showSidebarOnMobile, sidebarItems, }: ITNavbarProps): react_jsx_runtime.JSX.Element;
|
|
806
1505
|
|
|
1506
|
+
/** Props for the ITPage component. */
|
|
807
1507
|
interface ITPageProps {
|
|
1508
|
+
/** Page title passed to the header. */
|
|
808
1509
|
title?: string;
|
|
1510
|
+
/** Description text shown below the title. */
|
|
809
1511
|
description?: string;
|
|
1512
|
+
/** Array of breadcrumb items for navigation context. */
|
|
810
1513
|
breadcrumbs?: ITBreadcrumbItem[];
|
|
1514
|
+
/** Action buttons rendered in the header. */
|
|
811
1515
|
actions?: ReactNode;
|
|
1516
|
+
/** Callback fired when the back button is clicked. */
|
|
812
1517
|
backAction?: () => void;
|
|
1518
|
+
/** Optional icon displayed next to the title. */
|
|
813
1519
|
icon?: ReactNode;
|
|
1520
|
+
/** Custom color for the icon. Accepts any valid CSS color value. */
|
|
814
1521
|
iconColor?: string;
|
|
1522
|
+
/** Whether the page is in a loading state. Shows skeleton placeholders when true. */
|
|
815
1523
|
loading?: boolean;
|
|
1524
|
+
/** Error message to display. Shows an error state with retry button when provided. */
|
|
816
1525
|
error?: string | null;
|
|
1526
|
+
/** Custom title for the error state. Default: "Error". */
|
|
817
1527
|
errorTitle?: string;
|
|
1528
|
+
/** Label for the retry button in the error state. Default: "Reintentar". */
|
|
818
1529
|
errorActionLabel?: string;
|
|
1530
|
+
/** Callback fired when the retry button is clicked in the error state. */
|
|
819
1531
|
onRetry?: () => void;
|
|
1532
|
+
/** Whether the page is in an empty state. Shows a placeholder when true. */
|
|
820
1533
|
empty?: boolean;
|
|
1534
|
+
/** Custom title for the empty state. Default: "Sin datos". */
|
|
821
1535
|
emptyTitle?: string;
|
|
1536
|
+
/** Custom description for the empty state. */
|
|
822
1537
|
emptyDescription?: string;
|
|
1538
|
+
/** Custom action element for the empty state. */
|
|
823
1539
|
emptyAction?: ReactNode;
|
|
1540
|
+
/** Additional CSS classes for the page wrapper. */
|
|
824
1541
|
className?: string;
|
|
1542
|
+
/** Content rendered inside the page wrapper. */
|
|
825
1543
|
children: ReactNode;
|
|
1544
|
+
/** Maximum width of the page content. Options: "2xl", "3xl", "4xl", "5xl", "6xl", "7xl". Default: "7xl". */
|
|
826
1545
|
maxWidth?: "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
1546
|
+
/** Whether to remove default padding from the page wrapper. */
|
|
827
1547
|
noPadding?: boolean;
|
|
828
1548
|
}
|
|
829
1549
|
|
|
1550
|
+
/**
|
|
1551
|
+
* Page template combining a page header and content area with built-in states for loading, error, and empty.
|
|
1552
|
+
*
|
|
1553
|
+
* @example
|
|
1554
|
+
* ```tsx
|
|
1555
|
+
* <ITPage
|
|
1556
|
+
* title="Dashboard"
|
|
1557
|
+
* description="Overview of your account"
|
|
1558
|
+
* breadcrumbs={[{ label: 'Home' }, { label: 'Dashboard' }]}
|
|
1559
|
+
* actions={<ITButton label="Refresh" />}
|
|
1560
|
+
* loading={isLoading}
|
|
1561
|
+
* error={errorMessage}
|
|
1562
|
+
* onRetry={fetchData}
|
|
1563
|
+
* >
|
|
1564
|
+
* <ITCard>Dashboard content</ITCard>
|
|
1565
|
+
* </ITPage>
|
|
1566
|
+
* ```
|
|
1567
|
+
*/
|
|
830
1568
|
declare function ITPage(props: ITPageProps): react_jsx_runtime.JSX.Element;
|
|
831
1569
|
|
|
1570
|
+
/** Props for the ITPageHeader component. */
|
|
832
1571
|
interface ITPageHeaderProps {
|
|
1572
|
+
/** Page title displayed as the main heading. */
|
|
833
1573
|
title: string;
|
|
1574
|
+
/** Optional description text shown below the title. */
|
|
834
1575
|
description?: string;
|
|
1576
|
+
/** Array of breadcrumb items for navigation context. */
|
|
835
1577
|
breadcrumbs?: ITBreadcrumbItem[];
|
|
1578
|
+
/** Action buttons or elements rendered on the right side. */
|
|
836
1579
|
actions?: ReactNode;
|
|
1580
|
+
/** Callback fired when the back button is clicked. */
|
|
837
1581
|
backAction?: () => void;
|
|
1582
|
+
/** Optional icon displayed next to the title. */
|
|
838
1583
|
icon?: ReactNode;
|
|
1584
|
+
/** Custom color for the icon. Accepts any valid CSS color value. */
|
|
839
1585
|
iconColor?: string;
|
|
1586
|
+
/** Additional CSS classes for the container. */
|
|
840
1587
|
className?: string;
|
|
841
1588
|
}
|
|
842
1589
|
|
|
1590
|
+
/**
|
|
1591
|
+
* Page title bar with breadcrumbs, description, back button, and action buttons.
|
|
1592
|
+
*
|
|
1593
|
+
* @example
|
|
1594
|
+
* ```tsx
|
|
1595
|
+
* <ITPageHeader
|
|
1596
|
+
* title="Users"
|
|
1597
|
+
* description="Manage all system users"
|
|
1598
|
+
* breadcrumbs={[{ label: 'Admin', href: '/admin' }, { label: 'Users' }]}
|
|
1599
|
+
* backAction={() => history.back()}
|
|
1600
|
+
* actions={<ITButton label="Add User" />}
|
|
1601
|
+
* icon={<FaUsers />}
|
|
1602
|
+
* />
|
|
1603
|
+
* ```
|
|
1604
|
+
*/
|
|
843
1605
|
declare function ITPageHeader({ title, description, breadcrumbs, actions, backAction, icon, iconColor, className, }: ITPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
844
1606
|
|
|
1607
|
+
/** Props for the ITPagination component. */
|
|
845
1608
|
interface ITPaginationProps {
|
|
846
|
-
/**
|
|
847
|
-
* Current active page (1-indexed).
|
|
848
|
-
*/
|
|
1609
|
+
/** Current active page (1-indexed). */
|
|
849
1610
|
currentPage: number;
|
|
850
|
-
/**
|
|
851
|
-
* Total number of pages available.
|
|
852
|
-
*/
|
|
1611
|
+
/** Total number of pages available. */
|
|
853
1612
|
totalPages: number;
|
|
854
|
-
/**
|
|
855
|
-
* Callback fired when a page is clicked or next/prev is activated.
|
|
856
|
-
*/
|
|
1613
|
+
/** Callback fired when a page is clicked or prev/next is activated. Receives the new page number. */
|
|
857
1614
|
onPageChange: (page: number) => void;
|
|
858
|
-
/**
|
|
859
|
-
* Number of visible pages before and after the current page.
|
|
860
|
-
* Default: 1
|
|
861
|
-
*/
|
|
1615
|
+
/** Number of visible page siblings before and after the current page. Default: 1. */
|
|
862
1616
|
siblingCount?: number;
|
|
863
|
-
/**
|
|
864
|
-
* Semantic color from the theme (primary, secondary, success, danger, warning, info, purple).
|
|
865
|
-
* Default: primary
|
|
866
|
-
*/
|
|
1617
|
+
/** Semantic color from the theme. Options: primary, secondary, success, danger, warning, info, purple. Default: "primary". */
|
|
867
1618
|
color?: string;
|
|
868
|
-
/**
|
|
869
|
-
* Additional CSS classes for the container.
|
|
870
|
-
*/
|
|
1619
|
+
/** Additional CSS classes for the container. */
|
|
871
1620
|
className?: string;
|
|
872
|
-
/**
|
|
873
|
-
* Options for items per page selector.
|
|
874
|
-
*/
|
|
1621
|
+
/** Available options for the items-per-page selector dropdown. */
|
|
875
1622
|
itemsPerPageOptions?: number[];
|
|
876
|
-
/**
|
|
877
|
-
* Current items per page value. Required if itemsPerPageOptions is provided.
|
|
878
|
-
*/
|
|
1623
|
+
/** Current items per page value. Required if `itemsPerPageOptions` is provided. */
|
|
879
1624
|
itemsPerPage?: number;
|
|
880
|
-
/**
|
|
881
|
-
* Callback fired when items per page is changed.
|
|
882
|
-
*/
|
|
1625
|
+
/** Callback fired when the items per page value is changed. */
|
|
883
1626
|
onItemsPerPageChange?: (value: number) => void;
|
|
884
|
-
/**
|
|
885
|
-
* Total number of items across all pages. Used to render "1-10 of 50" text.
|
|
886
|
-
*/
|
|
1627
|
+
/** Total number of items across all pages. Used to render the "1-10 of 50" summary text. */
|
|
887
1628
|
totalItems?: number;
|
|
888
1629
|
}
|
|
889
1630
|
|
|
1631
|
+
/**
|
|
1632
|
+
* Page navigation controls with previous/next buttons, page number display, and optional items-per-page selector.
|
|
1633
|
+
*
|
|
1634
|
+
* @example
|
|
1635
|
+
* ```tsx
|
|
1636
|
+
* <ITPagination
|
|
1637
|
+
* currentPage={1}
|
|
1638
|
+
* totalPages={10}
|
|
1639
|
+
* onPageChange={(page) => setPage(page)}
|
|
1640
|
+
* color="primary"
|
|
1641
|
+
* itemsPerPageOptions={[10, 25, 50]}
|
|
1642
|
+
* itemsPerPage={10}
|
|
1643
|
+
* onItemsPerPageChange={(value) => setItemsPerPage(value)}
|
|
1644
|
+
* totalItems={95}
|
|
1645
|
+
* />
|
|
1646
|
+
* ```
|
|
1647
|
+
*/
|
|
890
1648
|
declare function ITPagination({ currentPage, totalPages, onPageChange, siblingCount, color, className, itemsPerPageOptions, itemsPerPage, onItemsPerPageChange, totalItems, }: ITPaginationProps): react_jsx_runtime.JSX.Element;
|
|
891
1649
|
|
|
1650
|
+
/** Available positions for the popover relative to the trigger element. */
|
|
892
1651
|
type PopoverPosition = "top" | "bottom" | "left" | "right";
|
|
1652
|
+
/** Props for the ITPopover component. */
|
|
893
1653
|
interface ITPopoverProps {
|
|
1654
|
+
/** Element that triggers the popover when clicked. */
|
|
894
1655
|
trigger: ReactNode;
|
|
1656
|
+
/** Content rendered inside the popover panel. */
|
|
895
1657
|
children: ReactNode;
|
|
1658
|
+
/** Position of the popover relative to the trigger. Options: "top", "bottom", "left", "right". Default: "bottom". */
|
|
896
1659
|
position?: PopoverPosition;
|
|
1660
|
+
/** Controlled open state. When provided, the component acts in controlled mode. */
|
|
897
1661
|
isOpen?: boolean;
|
|
1662
|
+
/** Callback fired when the popover is closed in controlled mode. */
|
|
898
1663
|
onClose?: () => void;
|
|
1664
|
+
/** Additional CSS classes for the container. */
|
|
899
1665
|
className?: string;
|
|
900
1666
|
}
|
|
901
1667
|
|
|
1668
|
+
/**
|
|
1669
|
+
* Floating content panel triggered by click on a trigger element, with position control and click-outside dismissal.
|
|
1670
|
+
*
|
|
1671
|
+
* @example
|
|
1672
|
+
* ```tsx
|
|
1673
|
+
* <ITPopover trigger={<ITButton label="Options" />} position="bottom">
|
|
1674
|
+
* <ul>
|
|
1675
|
+
* <li><button onClick={handleEdit}>Edit</button></li>
|
|
1676
|
+
* <li><button onClick={handleDelete}>Delete</button></li>
|
|
1677
|
+
* </ul>
|
|
1678
|
+
* </ITPopover>
|
|
1679
|
+
* ```
|
|
1680
|
+
*/
|
|
902
1681
|
declare function ITPopover({ trigger, children, position, isOpen: controlledOpen, onClose, className, }: ITPopoverProps): react_jsx_runtime.JSX.Element;
|
|
903
1682
|
|
|
1683
|
+
/** Props for the ITProgress component. */
|
|
904
1684
|
interface ITProgressProps {
|
|
1685
|
+
/** Current progress value. Default: 0. */
|
|
905
1686
|
value?: number;
|
|
1687
|
+
/** Maximum progress value. Default: 100. */
|
|
906
1688
|
max?: number;
|
|
1689
|
+
/** Progress variant. "determinate" shows a fixed-width fill, "indeterminate" shows an animated pulsing bar. Default: "determinate". */
|
|
907
1690
|
variant?: "determinate" | "indeterminate";
|
|
1691
|
+
/** Semantic color from the theme. Options: primary, secondary, success, danger, warning, info, purple, error, gray. Default: "primary". */
|
|
908
1692
|
color?: ColorsTypes;
|
|
1693
|
+
/** Size of the progress bar. Options: "sm", "md", "lg". Default: "md". */
|
|
909
1694
|
size?: "sm" | "md" | "lg";
|
|
1695
|
+
/** Additional CSS classes for the container. */
|
|
910
1696
|
className?: string;
|
|
1697
|
+
/** Inline styles applied to the container. */
|
|
911
1698
|
style?: CSSProperties;
|
|
912
1699
|
}
|
|
913
1700
|
|
|
1701
|
+
/**
|
|
1702
|
+
* Progress bar indicator with support for determinate and indeterminate variants, themed colors, and multiple sizes.
|
|
1703
|
+
*
|
|
1704
|
+
* @example
|
|
1705
|
+
* ```tsx
|
|
1706
|
+
* <ITProgress value={75} max={100} color="success" size="lg" />
|
|
1707
|
+
* <ITProgress variant="indeterminate" color="primary" />
|
|
1708
|
+
* ```
|
|
1709
|
+
*/
|
|
914
1710
|
declare function ITProgress({ value, max, variant, color, size, className, style, }: ITProgressProps): react_jsx_runtime.JSX.Element;
|
|
915
1711
|
|
|
1712
|
+
/** Represents a single radio option within a group. */
|
|
916
1713
|
interface ITRadioOption {
|
|
1714
|
+
/** Value of the radio option. */
|
|
917
1715
|
value: string;
|
|
1716
|
+
/** Display label for the radio option. */
|
|
918
1717
|
label: ReactNode;
|
|
919
1718
|
}
|
|
1719
|
+
/** Props for the ITRadioGroup component. */
|
|
920
1720
|
interface ITRadioGroupProps {
|
|
1721
|
+
/** Name attribute for the radio input group. Used for form accessibility. */
|
|
921
1722
|
name: string;
|
|
1723
|
+
/** Currently selected value. */
|
|
922
1724
|
value: string;
|
|
1725
|
+
/** Callback fired when a radio option is selected. Receives the selected value. */
|
|
923
1726
|
onChange: (value: string) => void;
|
|
1727
|
+
/** Array of radio options to render. */
|
|
924
1728
|
options: ITRadioOption[];
|
|
1729
|
+
/** Whether the entire radio group is disabled. */
|
|
925
1730
|
disabled?: boolean;
|
|
1731
|
+
/** Layout direction of the radio options. Options: "row", "column". Default: "column". */
|
|
926
1732
|
direction?: "row" | "column";
|
|
1733
|
+
/** Additional CSS classes for the container. */
|
|
927
1734
|
className?: string;
|
|
928
1735
|
}
|
|
929
1736
|
|
|
1737
|
+
/**
|
|
1738
|
+
* Radio button group with configurable layout direction and themed selection styling.
|
|
1739
|
+
*
|
|
1740
|
+
* @example
|
|
1741
|
+
* ```tsx
|
|
1742
|
+
* <ITRadioGroup
|
|
1743
|
+
* name="color"
|
|
1744
|
+
* value={selectedColor}
|
|
1745
|
+
* onChange={(value) => setSelectedColor(value)}
|
|
1746
|
+
* options={[
|
|
1747
|
+
* { value: 'red', label: 'Red' },
|
|
1748
|
+
* { value: 'blue', label: 'Blue' },
|
|
1749
|
+
* { value: 'green', label: 'Green' },
|
|
1750
|
+
* ]}
|
|
1751
|
+
* direction="row"
|
|
1752
|
+
* />
|
|
1753
|
+
* ```
|
|
1754
|
+
*/
|
|
930
1755
|
declare function ITRadioGroup({ name, value, onChange, options, disabled, direction, className, }: ITRadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
931
1756
|
|
|
1757
|
+
/** Represents an option in the search-select dropdown. */
|
|
932
1758
|
interface ITSearchSelectOption {
|
|
1759
|
+
/** Display label for the option. */
|
|
933
1760
|
label: string;
|
|
1761
|
+
/** Value associated with the option. */
|
|
934
1762
|
value: string | number;
|
|
1763
|
+
/** Additional custom fields can be attached. */
|
|
935
1764
|
[key: string]: any;
|
|
936
1765
|
}
|
|
1766
|
+
/** Props for the ITSearchSelect component. */
|
|
937
1767
|
interface ITSearchSelectProps {
|
|
938
|
-
/**
|
|
1768
|
+
/** Name attribute for form integrations. */
|
|
939
1769
|
name?: string;
|
|
940
|
-
/**
|
|
1770
|
+
/** Label displayed above the select input. */
|
|
941
1771
|
label?: string;
|
|
942
|
-
/**
|
|
1772
|
+
/** Placeholder text shown when no value is selected. */
|
|
943
1773
|
placeholder?: string;
|
|
944
|
-
/**
|
|
1774
|
+
/** Currently selected value. */
|
|
945
1775
|
value?: string | number;
|
|
946
|
-
/**
|
|
1776
|
+
/** Array of options for static mode (Mode 1: local client-side filtering). */
|
|
947
1777
|
options?: ITSearchSelectOption[];
|
|
948
|
-
/**
|
|
1778
|
+
/** Field used as the option value. Default: "value". */
|
|
949
1779
|
valueField?: string;
|
|
950
|
-
/**
|
|
1780
|
+
/** Field used as the option display label. Default: "label". */
|
|
951
1781
|
labelField?: string;
|
|
952
|
-
/** Callback
|
|
1782
|
+
/** Callback fired when the selected value changes. Receives the value and the full option object. */
|
|
953
1783
|
onChange?: (value: string | number, option?: ITSearchSelectOption) => void;
|
|
954
|
-
/** Callback
|
|
1784
|
+
/** Callback fired when the input loses focus. */
|
|
955
1785
|
onBlur?: (e: FocusEvent<any>) => void;
|
|
956
|
-
/**
|
|
1786
|
+
/** Whether the component is disabled. */
|
|
957
1787
|
disabled?: boolean;
|
|
958
|
-
/**
|
|
1788
|
+
/** Additional CSS classes for the container. */
|
|
959
1789
|
className?: string;
|
|
960
|
-
/**
|
|
1790
|
+
/** Whether the field has been touched (for form validation). */
|
|
961
1791
|
touched?: boolean;
|
|
962
|
-
/**
|
|
1792
|
+
/** Whether the field is required. Shows a red asterisk on the label. */
|
|
963
1793
|
required?: boolean;
|
|
964
|
-
/**
|
|
1794
|
+
/** Error message or boolean indicating an error state. */
|
|
965
1795
|
error?: string | boolean;
|
|
966
|
-
/**
|
|
1796
|
+
/** Whether the field is read-only. */
|
|
967
1797
|
readOnly?: boolean;
|
|
968
|
-
/** Callback
|
|
1798
|
+
/** Callback for server-side search (Mode 2: API connection). Receives the search query string. */
|
|
969
1799
|
onSearch?: (query: string) => void;
|
|
970
|
-
/**
|
|
1800
|
+
/** Whether options are being loaded from an external API. */
|
|
971
1801
|
isLoading?: boolean;
|
|
972
|
-
/**
|
|
1802
|
+
/** Message displayed when no results are found. Default: "No se encontraron resultados". */
|
|
973
1803
|
noResultsMessage?: string;
|
|
974
1804
|
}
|
|
975
1805
|
|
|
976
1806
|
/**
|
|
977
|
-
*
|
|
978
|
-
*
|
|
1807
|
+
* Searchable dropdown select with local client-side filtering and server-side search via API.
|
|
1808
|
+
*
|
|
1809
|
+
* @example
|
|
1810
|
+
* ```tsx
|
|
1811
|
+
* // Static options (Mode 1)
|
|
1812
|
+
* <ITSearchSelect
|
|
1813
|
+
* label="Country"
|
|
1814
|
+
* placeholder="Select a country"
|
|
1815
|
+
* options={[
|
|
1816
|
+
* { value: 'us', label: 'United States' },
|
|
1817
|
+
* { value: 'mx', label: 'Mexico' },
|
|
1818
|
+
* ]}
|
|
1819
|
+
* value={selectedCountry}
|
|
1820
|
+
* onChange={(value) => setSelectedCountry(value)}
|
|
1821
|
+
* />
|
|
1822
|
+
*
|
|
1823
|
+
* // API search (Mode 2)
|
|
1824
|
+
* <ITSearchSelect
|
|
1825
|
+
* label="User"
|
|
1826
|
+
* placeholder="Search users..."
|
|
1827
|
+
* onSearch={(query) => searchUsers(query)}
|
|
1828
|
+
* options={apiResults}
|
|
1829
|
+
* isLoading={isSearching}
|
|
1830
|
+
* value={selectedUser}
|
|
1831
|
+
* onChange={(value) => setSelectedUser(value)}
|
|
1832
|
+
* />
|
|
1833
|
+
* ```
|
|
979
1834
|
*/
|
|
980
1835
|
declare function ITSearchSelect({ name, options, label, placeholder, valueField, labelField, value, onChange, onBlur, disabled, className, touched, required, error, readOnly, onSearch, isLoading, noResultsMessage, }: ITSearchSelectProps): react_jsx_runtime.JSX.Element;
|
|
981
1836
|
|
|
1837
|
+
/** A generic key-value option: e.g. { value: "mx", label: "Mexico" }. */
|
|
982
1838
|
interface OptionType {
|
|
983
1839
|
[key: string]: string;
|
|
984
1840
|
}
|
|
1841
|
+
/** Props for the ITSelect native-like dropdown component. */
|
|
985
1842
|
interface ITSelectProps {
|
|
1843
|
+
/** Name attribute for the underlying `<select>` element. */
|
|
986
1844
|
name: string;
|
|
1845
|
+
/** Array of option objects with value/label key-value pairs. */
|
|
987
1846
|
options: OptionType[];
|
|
1847
|
+
/** Key in each option object used as the option value. Default: "value". */
|
|
988
1848
|
valueField?: string;
|
|
1849
|
+
/** Key in each option object used as the display label. Default: "label". */
|
|
989
1850
|
labelField?: string;
|
|
1851
|
+
/** Label text rendered above the select. */
|
|
990
1852
|
label?: string;
|
|
1853
|
+
/** Placeholder text for the default empty option. */
|
|
991
1854
|
placeholder?: string;
|
|
1855
|
+
/** Currently selected value (controlled). */
|
|
992
1856
|
value?: string;
|
|
1857
|
+
/** Callback fired on selection change. Receives the native change event. */
|
|
993
1858
|
onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
1859
|
+
/** Callback fired on blur. Receives the native focus event. */
|
|
994
1860
|
onBlur?: (event: React.FocusEvent<HTMLSelectElement>) => void;
|
|
1861
|
+
/** Theme color variant (e.g. "primary", "success", "danger"). */
|
|
995
1862
|
variant?: ColorsTypes;
|
|
1863
|
+
/** Control size: "sm" | "md" | "lg". */
|
|
996
1864
|
size?: SizesTypes;
|
|
1865
|
+
/** Whether the select is disabled. */
|
|
997
1866
|
disabled?: boolean;
|
|
1867
|
+
/** Additional CSS classes on the `<select>` element. */
|
|
998
1868
|
className?: string;
|
|
1869
|
+
/** Marks the field as touched (for validation display). */
|
|
999
1870
|
touched?: boolean;
|
|
1871
|
+
/** Error message string or true for a default required error. */
|
|
1000
1872
|
error?: string | boolean;
|
|
1873
|
+
/** Whether the field is required. Shows a red asterisk and default error. */
|
|
1001
1874
|
required?: boolean;
|
|
1875
|
+
/** Autofocus the select on mount. */
|
|
1002
1876
|
autoFocus?: boolean;
|
|
1877
|
+
/** Read-only mode: shows the current value as a single disabled option. */
|
|
1003
1878
|
readOnly?: boolean;
|
|
1004
1879
|
}
|
|
1005
1880
|
|
|
1006
|
-
/**
|
|
1007
|
-
* Componente de selección (select) con soporte para opciones personalizadas, validación y personalización de estilo.
|
|
1008
|
-
* Matches styles of ITInput.
|
|
1009
|
-
*/
|
|
1010
1881
|
declare function ITSelect({ name, options, label, placeholder, valueField, labelField, value, onChange, onBlur, disabled, className, touched, required, error, readOnly, }: ITSelectProps): react_jsx_runtime.JSX.Element;
|
|
1011
1882
|
|
|
1012
1883
|
interface CustomITSearchTableProps<T> extends ITSearchTableProps<T> {
|
|
@@ -1021,233 +1892,568 @@ interface CustomITSearchTableProps<T> extends ITSearchTableProps<T> {
|
|
|
1021
1892
|
direction: "asc" | "desc";
|
|
1022
1893
|
};
|
|
1023
1894
|
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Server-side data table with global search, column sorting, inline editing, and pagination.
|
|
1897
|
+
*
|
|
1898
|
+
* @example
|
|
1899
|
+
* ```tsx
|
|
1900
|
+
* <ITSearchTable
|
|
1901
|
+
* columns={[
|
|
1902
|
+
* { key: "name", label: "Name", type: "string", sortable: true, editable: true },
|
|
1903
|
+
* { key: "status", label: "Status", type: "string", filter: true },
|
|
1904
|
+
* ]}
|
|
1905
|
+
* data={rows}
|
|
1906
|
+
* title="Users"
|
|
1907
|
+
* pageIndex={0}
|
|
1908
|
+
* totalCount={100}
|
|
1909
|
+
* totalPages={10}
|
|
1910
|
+
* hasPreviousPage={false}
|
|
1911
|
+
* hasNextPage={true}
|
|
1912
|
+
* onPageChange={(p) => fetchPage(p)}
|
|
1913
|
+
* onSortChange={(s) => sortData(s)}
|
|
1914
|
+
* onFilterChange={(f) => filterData(f)}
|
|
1915
|
+
* />
|
|
1916
|
+
* ```
|
|
1917
|
+
*/
|
|
1024
1918
|
declare function ITSearchTable<T extends Record<string, unknown>>({ columns, data, containerClassName, searchTermInitial, searchInputPlaceholder, className, variant, size, itemsPerPageOptions, defaultItemsPerPage, title, pageIndex, totalCount, totalPages, hasPreviousPage, hasNextPage, onPageChange, onItemsPerPageChange, onSortChange, onFilterChange, sortConfig, editingRow, validationSchema, onClearSearch, onEdit, onSave, onCancel, }: CustomITSearchTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1025
1919
|
|
|
1920
|
+
/** Available sizes for the segmented control: "sm" | "md". */
|
|
1026
1921
|
type SegmentedControlSize = "sm" | "md";
|
|
1922
|
+
/** A single option within the segmented control. */
|
|
1027
1923
|
interface ISegmentedOption {
|
|
1924
|
+
/** Unique value for the option. */
|
|
1028
1925
|
value: string;
|
|
1926
|
+
/** Display label for the option. */
|
|
1029
1927
|
label: string;
|
|
1928
|
+
/** Optional icon rendered alongside the label. */
|
|
1030
1929
|
icon?: ReactNode;
|
|
1031
1930
|
}
|
|
1931
|
+
/** Props for the ITSegmentedControl component. */
|
|
1032
1932
|
interface ITSegmentedControlProps {
|
|
1933
|
+
/** Array of mutually exclusive options: { label, value, icon? }. */
|
|
1033
1934
|
options: ISegmentedOption[];
|
|
1935
|
+
/** Currently selected value (controlled). */
|
|
1034
1936
|
value: string;
|
|
1937
|
+
/** Callback fired when the user selects a different option. Receives the new value. */
|
|
1035
1938
|
onChange: (value: string) => void;
|
|
1939
|
+
/** Control size: "sm" | "md". Default: "md". */
|
|
1036
1940
|
size?: SegmentedControlSize;
|
|
1941
|
+
/** Additional CSS classes on the container. */
|
|
1037
1942
|
className?: string;
|
|
1943
|
+
/** Whether the entire control is disabled. */
|
|
1038
1944
|
disabled?: boolean;
|
|
1039
1945
|
}
|
|
1040
1946
|
|
|
1947
|
+
/**
|
|
1948
|
+
* iOS-style segmented toggle for switching between mutually exclusive options.
|
|
1949
|
+
*
|
|
1950
|
+
* @example
|
|
1951
|
+
* ```tsx
|
|
1952
|
+
* <ITSegmentedControl
|
|
1953
|
+
* options={[
|
|
1954
|
+
* { value: "day", label: "Day" },
|
|
1955
|
+
* { value: "week", label: "Week", icon: <FaCalendar /> },
|
|
1956
|
+
* ]}
|
|
1957
|
+
* value={view}
|
|
1958
|
+
* onChange={setView}
|
|
1959
|
+
* />
|
|
1960
|
+
* ```
|
|
1961
|
+
*/
|
|
1041
1962
|
declare function ITSegmentedControl({ options, value, onChange, size, className, disabled, }: ITSegmentedControlProps): react_jsx_runtime.JSX.Element;
|
|
1042
1963
|
|
|
1964
|
+
/** A sub-navigation item nested under a parent menu. */
|
|
1043
1965
|
interface ITNavigationSubItem {
|
|
1966
|
+
/** Unique identifier for the sub-item. */
|
|
1044
1967
|
id: string;
|
|
1968
|
+
/** Display label. */
|
|
1045
1969
|
label: string;
|
|
1970
|
+
/** Click handler. */
|
|
1046
1971
|
action?: () => void;
|
|
1972
|
+
/** Whether this sub-item is currently active/highlighted. */
|
|
1047
1973
|
isActive?: boolean;
|
|
1048
1974
|
}
|
|
1975
|
+
/** A top-level navigation item, optionally with sub-items. */
|
|
1049
1976
|
interface ITNavigationItem {
|
|
1977
|
+
/** Unique identifier. */
|
|
1050
1978
|
id: string;
|
|
1979
|
+
/** Display label. */
|
|
1051
1980
|
label: string;
|
|
1981
|
+
/** Icon component rendered left of the label. */
|
|
1052
1982
|
icon?: React.ReactNode;
|
|
1983
|
+
/** Click handler for top-level items without submenus. */
|
|
1053
1984
|
action?: () => void;
|
|
1985
|
+
/** Whether this item is currently active/highlighted. */
|
|
1054
1986
|
isActive?: boolean;
|
|
1987
|
+
/** Nested sub-navigation items (renders as expandable submenu). */
|
|
1055
1988
|
subitems?: ITNavigationSubItem[];
|
|
1989
|
+
/** Badge text displayed on the item (e.g. notification count). */
|
|
1056
1990
|
badge?: string;
|
|
1057
1991
|
}
|
|
1992
|
+
/** Props for the ITSidebar vertical navigation component. */
|
|
1058
1993
|
interface ITSidebarProps {
|
|
1994
|
+
/** Navigation structure: top-level items with optional sub-items. */
|
|
1059
1995
|
navigationItems: ITNavigationItem[];
|
|
1996
|
+
/** Whether the sidebar is collapsed to icon-only mode. */
|
|
1060
1997
|
isCollapsed?: boolean;
|
|
1998
|
+
/** Callback when the user toggles collapse via the toggle button. */
|
|
1061
1999
|
onToggleCollapse?: () => void;
|
|
2000
|
+
/** Force sidebar visible on mobile breakpoints. */
|
|
1062
2001
|
visibleOnMobile?: boolean;
|
|
2002
|
+
/** Callback when a top-level navigation item is clicked. Receives the item. */
|
|
1063
2003
|
onItemClick?: (item: ITNavigationItem) => void;
|
|
2004
|
+
/** Callback when a sub-navigation item is clicked. Receives the sub-item. */
|
|
1064
2005
|
onSubItemClick?: (subitem: ITNavigationSubItem) => void;
|
|
2006
|
+
/** Visual connector style for sub-items: "dot" | "|" | "none". Default: "dot". */
|
|
1065
2007
|
subitemConnector?: 'dot' | '|' | 'none';
|
|
2008
|
+
/** Additional CSS classes on the sidebar `<aside>`. */
|
|
1066
2009
|
className?: string;
|
|
1067
2010
|
}
|
|
1068
2011
|
|
|
2012
|
+
/**
|
|
2013
|
+
* Vertical navigation sidebar with submenu expand/collapse, hover tooltips in collapsed mode,
|
|
2014
|
+
* and glassmorphism styling.
|
|
2015
|
+
*
|
|
2016
|
+
* @example
|
|
2017
|
+
* ```tsx
|
|
2018
|
+
* <ITSidebar
|
|
2019
|
+
* navigationItems={[
|
|
2020
|
+
* { id: "dashboard", label: "Dashboard", icon: <FaHome />, isActive: true },
|
|
2021
|
+
* {
|
|
2022
|
+
* id: "settings", label: "Settings", icon: <FaCog />,
|
|
2023
|
+
* subitems: [
|
|
2024
|
+
* { id: "profile", label: "Profile", action: () => navigate("/profile") },
|
|
2025
|
+
* { id: "billing", label: "Billing", isActive: true },
|
|
2026
|
+
* ],
|
|
2027
|
+
* },
|
|
2028
|
+
* ]}
|
|
2029
|
+
* isCollapsed={collapsed}
|
|
2030
|
+
* onToggleCollapse={() => setCollapsed(!collapsed)}
|
|
2031
|
+
* />
|
|
2032
|
+
* ```
|
|
2033
|
+
*/
|
|
1069
2034
|
declare function ITSidebar({ navigationItems, isCollapsed, onToggleCollapse, className, visibleOnMobile, onItemClick, onSubItemClick, subitemConnector, }: ITSidebarProps): react_jsx_runtime.JSX.Element;
|
|
1070
2035
|
|
|
2036
|
+
/** Skeleton shape variant: "text" (line) | "circular" (avatar/icon) | "rectangular" (card/image). */
|
|
1071
2037
|
type SkeletonVariant = "text" | "circular" | "rectangular";
|
|
2038
|
+
/** Props for the ITSkeleton content placeholder loader component. */
|
|
1072
2039
|
interface ITSkeletonProps {
|
|
2040
|
+
/** Skeleton shape: "text" | "circular" | "rectangular". Default: "text". */
|
|
1073
2041
|
variant?: SkeletonVariant;
|
|
2042
|
+
/** Explicit width (CSS value or number in px). Text variant defaults to random 60%-90%. */
|
|
1074
2043
|
width?: string | number;
|
|
2044
|
+
/** Explicit height (CSS value or number in px). */
|
|
1075
2045
|
height?: string | number;
|
|
2046
|
+
/** Number of skeleton items to render. Default: 1. */
|
|
1076
2047
|
count?: number;
|
|
2048
|
+
/** Additional CSS classes on each skeleton item. */
|
|
1077
2049
|
className?: string;
|
|
2050
|
+
/** Inline style object applied to each skeleton item. */
|
|
1078
2051
|
style?: CSSProperties;
|
|
1079
2052
|
}
|
|
1080
2053
|
|
|
2054
|
+
/**
|
|
2055
|
+
* Content placeholder loader with pulse animation for text, circles, and rectangles.
|
|
2056
|
+
*
|
|
2057
|
+
* @example
|
|
2058
|
+
* ```tsx
|
|
2059
|
+
* <ITSkeleton variant="circular" width={40} height={40} />
|
|
2060
|
+
* <ITSkeleton variant="text" count={3} />
|
|
2061
|
+
* <ITSkeleton variant="rectangular" width="100%" height={200} />
|
|
2062
|
+
* ```
|
|
2063
|
+
*/
|
|
1081
2064
|
declare function ITSkeleton({ variant, width, height, count, className, style, }: ITSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
1082
2065
|
|
|
2066
|
+
/** Props for the ITSlideToggle iOS-style toggle switch. */
|
|
1083
2067
|
interface ITSlideToggleProps {
|
|
1084
|
-
/**
|
|
1085
|
-
* Callback executed when the switch is toggled. Receives the new state.
|
|
1086
|
-
*/
|
|
2068
|
+
/** Callback executed when the switch is toggled. Receives the new boolean state. */
|
|
1087
2069
|
onToggle?: (value: boolean) => void;
|
|
1088
|
-
/**
|
|
1089
|
-
* Controlled state. Use this to completely control the component externally.
|
|
1090
|
-
*/
|
|
2070
|
+
/** Controlled state. Use this to fully control the component externally. */
|
|
1091
2071
|
isOn?: boolean;
|
|
1092
|
-
/**
|
|
1093
|
-
* Initial state for uncontrolled usage.
|
|
1094
|
-
* Default: false
|
|
1095
|
-
*/
|
|
2072
|
+
/** Initial state for uncontrolled usage. Default: false. */
|
|
1096
2073
|
initialState?: boolean;
|
|
1097
2074
|
/**
|
|
1098
|
-
* Semantic theme color when activated (e.g
|
|
1099
|
-
* Default:
|
|
2075
|
+
* Semantic theme color when activated (e.g. "primary", "success", "danger").
|
|
2076
|
+
* Can also be a hex value. Default: "success".
|
|
1100
2077
|
*/
|
|
1101
2078
|
activeColor?: string;
|
|
1102
2079
|
/**
|
|
1103
|
-
* Semantic theme color or hex when deactivated.
|
|
1104
|
-
* Default: '#9ca3af' (gray-400)
|
|
2080
|
+
* Semantic theme color or hex value when deactivated.
|
|
2081
|
+
* Default: '#9ca3af' (gray-400).
|
|
1105
2082
|
*/
|
|
1106
2083
|
inactiveColor?: string;
|
|
1107
|
-
/**
|
|
1108
|
-
* Whether the switch is disabled.
|
|
1109
|
-
*/
|
|
2084
|
+
/** Whether the switch is disabled. */
|
|
1110
2085
|
disabled?: boolean;
|
|
1111
|
-
/**
|
|
1112
|
-
* Size of the switch: sm, md, lg.
|
|
1113
|
-
* Default: md
|
|
1114
|
-
*/
|
|
2086
|
+
/** Size of the switch: "sm" | "md" | "lg". Default: "md". */
|
|
1115
2087
|
size?: "sm" | "md" | "lg";
|
|
1116
|
-
/**
|
|
1117
|
-
* Additional container classes.
|
|
1118
|
-
*/
|
|
2088
|
+
/** Additional CSS classes on the container. */
|
|
1119
2089
|
className?: string;
|
|
1120
2090
|
}
|
|
1121
2091
|
|
|
1122
2092
|
/**
|
|
1123
|
-
*
|
|
2093
|
+
* iOS-style toggle switch with theme color support.
|
|
1124
2094
|
* Supports fully controlled (`isOn`) or uncontrolled (`initialState`) modes.
|
|
2095
|
+
*
|
|
2096
|
+
* @example
|
|
2097
|
+
* ```tsx
|
|
2098
|
+
* // Controlled
|
|
2099
|
+
* <ITSlideToggle isOn={enabled} onToggle={setEnabled} activeColor="primary" />
|
|
2100
|
+
*
|
|
2101
|
+
* // Uncontrolled with initial state
|
|
2102
|
+
* <ITSlideToggle initialState onToggle={(v) => console.log(v)} />
|
|
2103
|
+
* ```
|
|
1125
2104
|
*/
|
|
1126
2105
|
declare function ITSlideToggle({ onToggle, isOn: controlledIsOn, initialState, activeColor, inactiveColor, // default gray-400
|
|
1127
2106
|
disabled, size, className, }: ITSlideToggleProps): react_jsx_runtime.JSX.Element;
|
|
1128
2107
|
|
|
2108
|
+
/** Props for the ITSlider range slider component. */
|
|
1129
2109
|
interface ITSliderProps {
|
|
2110
|
+
/** Current slider value (controlled). */
|
|
1130
2111
|
value: number;
|
|
2112
|
+
/** Callback fired when the value changes. Receives the new numeric value. */
|
|
1131
2113
|
onChange: (value: number) => void;
|
|
2114
|
+
/** Minimum allowed value. Default: 0. */
|
|
1132
2115
|
min?: number;
|
|
2116
|
+
/** Maximum allowed value. Default: 100. */
|
|
1133
2117
|
max?: number;
|
|
2118
|
+
/** Step increment. Default: 1. */
|
|
1134
2119
|
step?: number;
|
|
2120
|
+
/** Label displayed above the slider. Also shows the current value. */
|
|
1135
2121
|
label?: string;
|
|
2122
|
+
/** Whether the slider is disabled. */
|
|
1136
2123
|
disabled?: boolean;
|
|
2124
|
+
/** Additional CSS classes on the container. */
|
|
1137
2125
|
className?: string;
|
|
1138
2126
|
}
|
|
1139
2127
|
|
|
2128
|
+
/**
|
|
2129
|
+
* Range slider control with min/max/step and optional label displaying the current value.
|
|
2130
|
+
*
|
|
2131
|
+
* @example
|
|
2132
|
+
* ```tsx
|
|
2133
|
+
* <ITSlider
|
|
2134
|
+
* label="Volume"
|
|
2135
|
+
* value={volume}
|
|
2136
|
+
* onChange={setVolume}
|
|
2137
|
+
* min={0}
|
|
2138
|
+
* max={100}
|
|
2139
|
+
* step={5}
|
|
2140
|
+
* />
|
|
2141
|
+
* ```
|
|
2142
|
+
*/
|
|
1140
2143
|
declare function ITSlider({ value, onChange, min, max, step, label, disabled, className, }: ITSliderProps): react_jsx_runtime.JSX.Element;
|
|
1141
2144
|
|
|
2145
|
+
/** Flex direction: "row" | "column" | "row-reverse" | "column-reverse". */
|
|
1142
2146
|
type StackDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
2147
|
+
/** Cross-axis alignment: "start" | "end" | "center" | "stretch" | "baseline". */
|
|
1143
2148
|
type StackAlignment = "start" | "end" | "center" | "stretch" | "baseline";
|
|
2149
|
+
/** Main-axis justification: "start" | "end" | "center" | "between" | "around" | "evenly". */
|
|
1144
2150
|
type StackJustify = "start" | "end" | "center" | "between" | "around" | "evenly";
|
|
2151
|
+
/** Flex wrap behaviour: "nowrap" | "wrap" | "wrap-reverse". */
|
|
1145
2152
|
type StackWrap = "nowrap" | "wrap" | "wrap-reverse";
|
|
2153
|
+
/** Props for the ITStack flex layout component. */
|
|
1146
2154
|
interface ITStackProps {
|
|
2155
|
+
/** Stack children elements. */
|
|
1147
2156
|
children?: ReactNode;
|
|
2157
|
+
/** Flex direction. Default: "column". */
|
|
1148
2158
|
direction?: StackDirection;
|
|
2159
|
+
/** Spacing between children in 0.25rem units (0–12). Default: 0. */
|
|
1149
2160
|
spacing?: number;
|
|
2161
|
+
/** Cross-axis alignment. */
|
|
1150
2162
|
alignItems?: StackAlignment;
|
|
2163
|
+
/** Main-axis justification. */
|
|
1151
2164
|
justifyContent?: StackJustify;
|
|
2165
|
+
/** Whether children should wrap. */
|
|
1152
2166
|
flexWrap?: StackWrap;
|
|
2167
|
+
/** Optional divider element inserted between children. */
|
|
1153
2168
|
divider?: ReactNode;
|
|
2169
|
+
/** Additional CSS classes on the container. */
|
|
1154
2170
|
className?: string;
|
|
2171
|
+
/** Inline styles on the container. */
|
|
1155
2172
|
style?: CSSProperties;
|
|
2173
|
+
/** HTML element type to render as. Default: "div". */
|
|
1156
2174
|
as?: ElementType;
|
|
1157
2175
|
}
|
|
1158
2176
|
|
|
2177
|
+
/**
|
|
2178
|
+
* Simplified flex stack with consistent spacing (gap) for arranging children in a row or column.
|
|
2179
|
+
* Supports an optional divider element between children.
|
|
2180
|
+
*
|
|
2181
|
+
* @example
|
|
2182
|
+
* ```tsx
|
|
2183
|
+
* <ITStack direction="row" spacing={4} alignItems="center">
|
|
2184
|
+
* <ITButton>Cancel</ITButton>
|
|
2185
|
+
* <ITButton variant="primary">Save</ITButton>
|
|
2186
|
+
* </ITStack>
|
|
2187
|
+
* ```
|
|
2188
|
+
*
|
|
2189
|
+
* @example
|
|
2190
|
+
* ```tsx
|
|
2191
|
+
* <ITStack direction="column" spacing={2} divider={<hr />}>
|
|
2192
|
+
* <p>Item 1</p>
|
|
2193
|
+
* <p>Item 2</p>
|
|
2194
|
+
* <p>Item 3</p>
|
|
2195
|
+
* </ITStack>
|
|
2196
|
+
* ```
|
|
2197
|
+
*/
|
|
1159
2198
|
declare function ITStack({ children, direction, spacing, alignItems, justifyContent, flexWrap, divider, className, style, as: Component, }: ITStackProps): react_jsx_runtime.JSX.Element;
|
|
1160
2199
|
|
|
1161
2200
|
interface ITStatCardProps {
|
|
2201
|
+
/** The metric label displayed above the value. */
|
|
1162
2202
|
label: string;
|
|
2203
|
+
/** The primary numeric or string value shown in the card. */
|
|
1163
2204
|
value: string | number;
|
|
2205
|
+
/** Optional trend indicator text (e.g. "+12%", "-3"). */
|
|
1164
2206
|
trend?: string;
|
|
2207
|
+
/** Direction of the trend, used to color the trend badge. */
|
|
1165
2208
|
trendDirection?: "up" | "down" | "neutral";
|
|
2209
|
+
/** Icon element rendered next to the label in the top-right corner. */
|
|
1166
2210
|
icon?: ReactNode;
|
|
2211
|
+
/** Background color class for the card (e.g. "bg-primary-50 dark:bg-primary-950/20"). */
|
|
1167
2212
|
color?: string;
|
|
2213
|
+
/** Additional CSS classes for the outermost wrapper. */
|
|
1168
2214
|
className?: string;
|
|
2215
|
+
/** Inline styles applied to the card container. */
|
|
1169
2216
|
style?: CSSProperties;
|
|
2217
|
+
/** Click handler — when provided the card gains button semantics. */
|
|
1170
2218
|
onClick?: () => void;
|
|
1171
2219
|
}
|
|
1172
2220
|
|
|
2221
|
+
/**
|
|
2222
|
+
* A metric card displaying a value with an optional trend indicator and icon.
|
|
2223
|
+
* Automatically detects trend direction from the trend string prefix.
|
|
2224
|
+
*
|
|
2225
|
+
* @example
|
|
2226
|
+
* <ITStatCard label="Revenue" value="$12,430" trend="+12%" trendDirection="up" icon={<FaDollarSign />} />
|
|
2227
|
+
*
|
|
2228
|
+
* @example
|
|
2229
|
+
* <ITStatCard label="Users" value={1042} trend="-3%" trendDirection="down" onClick={() => navigate("/users")} />
|
|
2230
|
+
*/
|
|
1173
2231
|
declare function ITStatCard({ label, value, trend, trendDirection, icon, color, className, style, onClick, }: ITStatCardProps): react_jsx_runtime.JSX.Element;
|
|
1174
2232
|
|
|
1175
|
-
|
|
2233
|
+
/**
|
|
2234
|
+
* A feature-rich data table with per-column filtering, sortable columns,
|
|
2235
|
+
* pagination, boolean/catalog type support, and currency formatting.
|
|
2236
|
+
*
|
|
2237
|
+
* @example
|
|
2238
|
+
* <ITTable
|
|
2239
|
+
* columns={[
|
|
2240
|
+
* { key: "name", label: "Name", type: "string", sortable: true },
|
|
2241
|
+
* { key: "active", label: "Active", type: "boolean", filter: true },
|
|
2242
|
+
* { key: "actions", label: "", type: "actions", actions: (row) => <ITButton>Edit</ITButton> },
|
|
2243
|
+
* ]}
|
|
2244
|
+
* data={users}
|
|
2245
|
+
* title="User List"
|
|
2246
|
+
* size="sm"
|
|
2247
|
+
* />
|
|
2248
|
+
*/
|
|
2249
|
+
declare function ITTable<T extends Record<string, unknown>>({ columns, data, containerClassName, className, variant, size, itemsPerPageOptions, defaultItemsPerPage, title, renderCard, defaultView, showVerticalBorder, verticalBorderClassname, }: ITTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1176
2250
|
|
|
1177
2251
|
interface ITTextProps extends HTMLAttributes<HTMLElement> {
|
|
2252
|
+
/** The content rendered inside the element. */
|
|
1178
2253
|
children?: ReactNode;
|
|
2254
|
+
/** Additional CSS classes applied to the element. */
|
|
1179
2255
|
className?: string;
|
|
2256
|
+
/** HTML element type to render (e.g. "p", "span", "h1", "label"). */
|
|
1180
2257
|
as?: ElementType;
|
|
2258
|
+
/** Applies muted text color (--color-text-muted) when true. */
|
|
1181
2259
|
muted?: boolean;
|
|
2260
|
+
/** Associates a label with a form element (rendered as `htmlFor` when `as` is "label"). */
|
|
1182
2261
|
htmlFor?: string;
|
|
1183
2262
|
}
|
|
1184
2263
|
|
|
2264
|
+
/**
|
|
2265
|
+
* Semantic typography wrapper that renders any HTML element.
|
|
2266
|
+
* Supports muted styling via the `muted` prop and passes through all standard HTML attributes.
|
|
2267
|
+
*
|
|
2268
|
+
* @example
|
|
2269
|
+
* <ITText as="h1" className="text-2xl font-bold">Welcome</ITText>
|
|
2270
|
+
*
|
|
2271
|
+
* @example
|
|
2272
|
+
* <ITText as="label" htmlFor="email" muted>Email Address</ITText>
|
|
2273
|
+
*/
|
|
1185
2274
|
declare function ITText({ children, as: Tag, className, muted, style, ...rest }: ITTextProps & {
|
|
1186
2275
|
style?: React.CSSProperties;
|
|
1187
2276
|
}): react_jsx_runtime.JSX.Element;
|
|
1188
2277
|
|
|
1189
2278
|
interface ITTextareaProps {
|
|
2279
|
+
/** Controlled value of the textarea. */
|
|
1190
2280
|
value?: string;
|
|
2281
|
+
/** Callback fired when the value changes, receiving the new string. */
|
|
1191
2282
|
onChange?: (value: string) => void;
|
|
2283
|
+
/** Label text rendered above the textarea. */
|
|
1192
2284
|
label?: string;
|
|
2285
|
+
/** Placeholder text shown when the textarea is empty. */
|
|
1193
2286
|
placeholder?: string;
|
|
2287
|
+
/** Number of visible text rows (default 4). */
|
|
1194
2288
|
rows?: number;
|
|
2289
|
+
/** Disables the textarea when true. */
|
|
1195
2290
|
disabled?: boolean;
|
|
2291
|
+
/** Validation error message displayed below the textarea. */
|
|
1196
2292
|
error?: string;
|
|
2293
|
+
/** Additional CSS classes for the wrapper. */
|
|
1197
2294
|
className?: string;
|
|
2295
|
+
/** Name attribute for form submission and label association via `htmlFor`. */
|
|
1198
2296
|
name?: string;
|
|
2297
|
+
/** Maximum number of characters allowed. */
|
|
1199
2298
|
maxLength?: number;
|
|
2299
|
+
/** Resize behavior of the textarea: "none" | "vertical" | "horizontal" | "both". */
|
|
1200
2300
|
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
1201
2301
|
}
|
|
1202
2302
|
|
|
2303
|
+
/**
|
|
2304
|
+
* Multi-line text input with optional label, validation error display,
|
|
2305
|
+
* character limit, and configurable resize behavior.
|
|
2306
|
+
*
|
|
2307
|
+
* @example
|
|
2308
|
+
* <ITTextarea
|
|
2309
|
+
* name="bio"
|
|
2310
|
+
* label="Biography"
|
|
2311
|
+
* value={bio}
|
|
2312
|
+
* onChange={setBio}
|
|
2313
|
+
* maxLength={500}
|
|
2314
|
+
* rows={6}
|
|
2315
|
+
* resize="vertical"
|
|
2316
|
+
* error={bio.length > 500 ? "Max 500 characters" : undefined}
|
|
2317
|
+
* />
|
|
2318
|
+
*/
|
|
1203
2319
|
declare function ITTextarea({ value, onChange, label, placeholder, rows, disabled, error, className, name, maxLength, resize, }: ITTextareaProps): react_jsx_runtime.JSX.Element;
|
|
1204
2320
|
|
|
1205
2321
|
interface ITTabItem {
|
|
2322
|
+
/** Unique identifier for the tab. */
|
|
1206
2323
|
id: string;
|
|
2324
|
+
/** Display label shown on the tab button. */
|
|
1207
2325
|
label: string;
|
|
2326
|
+
/** Content rendered when this tab is active. */
|
|
1208
2327
|
content: ReactNode;
|
|
2328
|
+
/** Optional icon rendered beside the label. */
|
|
1209
2329
|
icon?: ReactNode;
|
|
2330
|
+
/** Whether the tab is disabled and non-interactive. */
|
|
1210
2331
|
disabled?: boolean;
|
|
1211
2332
|
}
|
|
1212
2333
|
interface ITTabsProps {
|
|
2334
|
+
/** Array of tab definitions: id, label, content, icon, and disabled state. */
|
|
1213
2335
|
items: ITTabItem[];
|
|
2336
|
+
/** The id of the tab active by default (first item if omitted). */
|
|
1214
2337
|
defaultActiveId?: string;
|
|
2338
|
+
/** Callback fired when the active tab changes, receiving the new tab id. */
|
|
1215
2339
|
onChange?: (id: string) => void;
|
|
2340
|
+
/** Visual variant: "line" (underline indicator) or "pill" (rounded background). */
|
|
1216
2341
|
variant?: 'line' | 'pill';
|
|
2342
|
+
/** Additional CSS classes for the tab header row. */
|
|
1217
2343
|
className?: string;
|
|
2344
|
+
/** Additional CSS classes for the outermost wrapper. */
|
|
1218
2345
|
containerClassName?: string;
|
|
1219
2346
|
}
|
|
1220
2347
|
|
|
2348
|
+
/**
|
|
2349
|
+
* Tabbed navigation component with "line" and "pill" visual variants.
|
|
2350
|
+
* Manages its own active state internally via a defaultActiveId.
|
|
2351
|
+
*
|
|
2352
|
+
* @example
|
|
2353
|
+
* <ITTabs
|
|
2354
|
+
* items={[
|
|
2355
|
+
* { id: "tab1", label: "General", content: <GeneralPanel /> },
|
|
2356
|
+
* { id: "tab2", label: "Settings", content: <SettingsPanel />, disabled: true },
|
|
2357
|
+
* ]}
|
|
2358
|
+
* defaultActiveId="tab1"
|
|
2359
|
+
* onChange={(id) => console.log("Active tab:", id)}
|
|
2360
|
+
* />
|
|
2361
|
+
*/
|
|
1221
2362
|
declare const ITTabs: React__default.FC<ITTabsProps>;
|
|
1222
2363
|
|
|
1223
2364
|
interface ITTripleFilterOption<T> {
|
|
2365
|
+
/** Display label for the filter button. */
|
|
1224
2366
|
label: string;
|
|
2367
|
+
/** The value associated with this option (string or boolean). */
|
|
1225
2368
|
value: T;
|
|
1226
2369
|
}
|
|
1227
2370
|
interface ITTripleFilterProps<T> {
|
|
2371
|
+
/** Currently selected value. Must match one of the option values. */
|
|
1228
2372
|
value: T;
|
|
2373
|
+
/** Called when the user selects a different option. Receives the new value. */
|
|
1229
2374
|
onChange: (value: T) => void;
|
|
2375
|
+
/** Array of filter options to render (typically 2-4 items, e.g. All / Active / Inactive). */
|
|
1230
2376
|
options: ITTripleFilterOption<T>[];
|
|
2377
|
+
/** Color theme for the active indicator. One of "primary", "secondary", "success", "danger", "warning", "info", "purple", "error", "gray". @default "primary" */
|
|
1231
2378
|
color?: ColorsTypes;
|
|
2379
|
+
/** Additional CSS classes applied to the outermost container. */
|
|
1232
2380
|
className?: string;
|
|
1233
2381
|
}
|
|
1234
2382
|
|
|
2383
|
+
/**
|
|
2384
|
+
* ITTripleFilter — generic segmented toggle filter bar for quick data filtering.
|
|
2385
|
+
*
|
|
2386
|
+
* Renders a row of pill-shaped buttons where exactly one is active at a time.
|
|
2387
|
+
* Supports any string or boolean value type and configurable color theming.
|
|
2388
|
+
* Commonly used for "All / Active / Inactive" or similar tri-state filters.
|
|
2389
|
+
*
|
|
2390
|
+
* @example
|
|
2391
|
+
* // Boolean triple filter
|
|
2392
|
+
* <ITTripleFilter<boolean>
|
|
2393
|
+
* value={showActive}
|
|
2394
|
+
* onChange={setShowActive}
|
|
2395
|
+
* options={[
|
|
2396
|
+
* { label: "All", value: false },
|
|
2397
|
+
* { label: "Active", value: true },
|
|
2398
|
+
* ]}
|
|
2399
|
+
* />
|
|
2400
|
+
*
|
|
2401
|
+
* @example
|
|
2402
|
+
* // String triple filter with danger color
|
|
2403
|
+
* <ITTripleFilter<string>
|
|
2404
|
+
* value={status}
|
|
2405
|
+
* onChange={setStatus}
|
|
2406
|
+
* options={[
|
|
2407
|
+
* { label: "Pending", value: "pending" },
|
|
2408
|
+
* { label: "Approved", value: "approved" },
|
|
2409
|
+
* { label: "Rejected", value: "rejected" },
|
|
2410
|
+
* ]}
|
|
2411
|
+
* color="danger"
|
|
2412
|
+
* className="my-4"
|
|
2413
|
+
* />
|
|
2414
|
+
*/
|
|
1235
2415
|
/**
|
|
1236
2416
|
* @description Generic triple/segmented filter component with color support.
|
|
1237
2417
|
*/
|
|
1238
2418
|
declare const ITTripleFilter: <T extends string | boolean>({ value, onChange, options, color, className, }: ITTripleFilterProps<T>) => react_jsx_runtime.JSX.Element;
|
|
1239
2419
|
|
|
1240
2420
|
interface ITToastProps {
|
|
2421
|
+
/** Toast message text to display. */
|
|
1241
2422
|
message: string;
|
|
2423
|
+
/** Severity type determining icon and background color. One of "success", "error", "warning", "info", "primary", or "danger". @default "info" */
|
|
1242
2424
|
type?: "success" | "error" | "warning" | "info" | "primary" | "danger" | string;
|
|
2425
|
+
/** Auto-dismiss duration in milliseconds. @default 1500 */
|
|
1243
2426
|
duration?: number;
|
|
2427
|
+
/** On-screen placement. One of "top-right", "top-center", "top-left", "bottom-right", "bottom-center", "bottom-left". @default "top-right" */
|
|
1244
2428
|
position?: "top-right" | "top-center" | "top-left" | "bottom-right" | "bottom-center" | "bottom-left";
|
|
2429
|
+
/** Callback invoked after the toast finishes its dismiss transition animation. */
|
|
1245
2430
|
onClose?: () => void;
|
|
1246
2431
|
}
|
|
1247
2432
|
|
|
2433
|
+
/**
|
|
2434
|
+
* ITToast — floating notification with automatic dismiss and severity-based styling.
|
|
2435
|
+
*
|
|
2436
|
+
* Renders a positioned alert with an icon, message, and close button.
|
|
2437
|
+
* Supports "success", "error", "warning", "info", "primary", and "danger" types.
|
|
2438
|
+
* Auto-dismisses after the configured duration and calls `onClose` on completion.
|
|
2439
|
+
*
|
|
2440
|
+
* @example
|
|
2441
|
+
* // Basic info toast
|
|
2442
|
+
* <ITToast message="Item saved" type="success" />
|
|
2443
|
+
*
|
|
2444
|
+
* @example
|
|
2445
|
+
* // Error toast with custom position and duration
|
|
2446
|
+
* <ITToast
|
|
2447
|
+
* message="Something went wrong"
|
|
2448
|
+
* type="error"
|
|
2449
|
+
* position="bottom-center"
|
|
2450
|
+
* duration={5000}
|
|
2451
|
+
* onClose={() => console.log("dismissed")}
|
|
2452
|
+
* />
|
|
2453
|
+
*/
|
|
1248
2454
|
declare function ITToast({ message, type, duration, position, onClose, }: ITToastProps): react_jsx_runtime.JSX.Element;
|
|
1249
2455
|
|
|
1250
|
-
/**
|
|
2456
|
+
/** Allowed file MIME types for the dropzone */
|
|
1251
2457
|
declare enum FileTypeEnum {
|
|
1252
2458
|
PDF = "application/pdf",
|
|
1253
2459
|
XLS = "application/vnd.ms-excel",
|
|
@@ -1257,72 +2463,165 @@ declare enum FileTypeEnum {
|
|
|
1257
2463
|
JPG = "image/jpg",
|
|
1258
2464
|
JPEG = "image/jpeg"
|
|
1259
2465
|
}
|
|
1260
|
-
/**
|
|
2466
|
+
/** Upload lifecycle status */
|
|
1261
2467
|
declare enum UploadStatus {
|
|
1262
2468
|
PENDING = "pendiente",
|
|
1263
2469
|
UPLOADING = "subiendo",
|
|
1264
2470
|
UPLOADED = "subido",
|
|
1265
2471
|
ERROR = "error"
|
|
1266
2472
|
}
|
|
1267
|
-
/** Props del componente */
|
|
1268
2473
|
interface ITDropfileProps {
|
|
2474
|
+
/** Called when a file is selected or cleared. */
|
|
1269
2475
|
onFileSelect: (file: File | null) => void;
|
|
2476
|
+
/** Called when the user cancels the current selection. */
|
|
1270
2477
|
onCancel?: () => void;
|
|
2478
|
+
/** Called when the user confirms and submits the file. */
|
|
1271
2479
|
onSubmit?: (file: File) => void;
|
|
2480
|
+
/** List of accepted MIME types. */
|
|
1272
2481
|
acceptedFileTypes?: FileTypeEnum[];
|
|
2482
|
+
/** Additional classes for the preview/content area. */
|
|
1273
2483
|
contentClassName?: string;
|
|
2484
|
+
/** Additional classes for the outermost container. */
|
|
1274
2485
|
containerClassName?: string;
|
|
2486
|
+
/** Whether to show the status badge (pending/uploading/uploaded/error). */
|
|
1275
2487
|
showStatusBadge?: boolean;
|
|
2488
|
+
/** Externally controlled upload status. */
|
|
1276
2489
|
uploadStatus?: UploadStatus;
|
|
2490
|
+
/** Callback when upload status changes. */
|
|
1277
2491
|
onStatusChange?: (status: UploadStatus) => void;
|
|
2492
|
+
/** An initial preview URL to display before any file is selected. */
|
|
1278
2493
|
initialPreviewUrl?: string | null;
|
|
1279
2494
|
}
|
|
2495
|
+
|
|
2496
|
+
/**
|
|
2497
|
+
* Drag-and-drop file uploader with preview, status tracking, and confirmation flow.
|
|
2498
|
+
*
|
|
2499
|
+
* Supports configurable accepted file types (PDF, Excel, CSV, images), visual
|
|
2500
|
+
* drag-active feedback, image previews, and a three-step workflow: select →
|
|
2501
|
+
* confirm → upload. Upload status is tracked internally or controlled
|
|
2502
|
+
* externally via the `uploadStatus` prop. Re-exports `FileTypeEnum` and
|
|
2503
|
+
* `UploadStatus` enums for consuming code.
|
|
2504
|
+
*
|
|
2505
|
+
* @example
|
|
2506
|
+
* ```tsx
|
|
2507
|
+
* <ITDropfile
|
|
2508
|
+
* onFileSelect={(file) => setSelectedFile(file)}
|
|
2509
|
+
* onSubmit={(file) => uploadToServer(file)}
|
|
2510
|
+
* acceptedFileTypes={[FileTypeEnum.PDF, FileTypeEnum.XLSX]}
|
|
2511
|
+
* showStatusBadge
|
|
2512
|
+
* />
|
|
2513
|
+
* ```
|
|
2514
|
+
*/
|
|
1280
2515
|
declare const ITDropfile: React__default.FC<ITDropfileProps>;
|
|
1281
2516
|
|
|
1282
2517
|
interface ITTopBarNavItem {
|
|
2518
|
+
/** Unique identifier for the navigation item. */
|
|
1283
2519
|
id: string;
|
|
2520
|
+
/** Display label shown in the navigation bar. */
|
|
1284
2521
|
label: string;
|
|
2522
|
+
/** Optional icon element rendered beside the label. */
|
|
1285
2523
|
icon?: any;
|
|
2524
|
+
/** Click handler for this navigation item (legacy, prefer onNavItemClick). */
|
|
1286
2525
|
action: () => void;
|
|
1287
2526
|
}
|
|
1288
2527
|
interface ITTopBarProps {
|
|
2528
|
+
/** Optional logo element (e.g. an `<img>` or SVG component). */
|
|
1289
2529
|
logo?: any;
|
|
2530
|
+
/** Text displayed next to the logo. */
|
|
1290
2531
|
logoText?: string;
|
|
2532
|
+
/** User dropdown configuration including name, email, avatar, and menu items. */
|
|
1291
2533
|
userMenu?: {
|
|
2534
|
+
/** Display name shown in the trigger button and dropdown header. */
|
|
1292
2535
|
userName: string;
|
|
2536
|
+
/** User email shown in the trigger button and dropdown header. */
|
|
1293
2537
|
userEmail: string;
|
|
2538
|
+
/** Optional avatar image URL. Falls back to a user-circle icon when omitted. */
|
|
1294
2539
|
userImage?: string;
|
|
2540
|
+
/** Array of dropdown menu actions: `{ label: string, onClick: () => void }`. Items containing "salir", "cerrar", or "logout" are styled as destructive. */
|
|
1295
2541
|
menuItems: {
|
|
1296
2542
|
label: string;
|
|
1297
2543
|
onClick: () => void;
|
|
1298
2544
|
}[];
|
|
1299
2545
|
};
|
|
2546
|
+
/** Desktop navigation items rendered beside the logo. */
|
|
1300
2547
|
navItems?: ITTopBarNavItem[];
|
|
2548
|
+
/** Callback fired when a navigation item is clicked. Receives the item's `id`. */
|
|
1301
2549
|
onNavItemClick?: (id: string) => void;
|
|
2550
|
+
/** Whether to show the mobile hamburger menu toggle button. @default false */
|
|
1302
2551
|
showMobileMenuButton?: boolean;
|
|
2552
|
+
/** Callback fired when the mobile menu toggle button is clicked. */
|
|
1303
2553
|
onToggleMobileMenu?: () => void;
|
|
1304
2554
|
}
|
|
1305
2555
|
|
|
1306
2556
|
interface ITLayoutProps {
|
|
2557
|
+
/** Top bar configuration and props */
|
|
1307
2558
|
topBar: ITTopBarProps;
|
|
2559
|
+
/** Sidebar configuration and props */
|
|
1308
2560
|
sidebar: ITSidebarProps;
|
|
2561
|
+
/** Main content rendered in the center area */
|
|
1309
2562
|
children: React.ReactNode;
|
|
2563
|
+
/** Additional CSS classes for the outermost wrapper */
|
|
1310
2564
|
className?: string;
|
|
2565
|
+
/** Additional CSS classes for the content container */
|
|
1311
2566
|
contentClassName?: string;
|
|
1312
2567
|
}
|
|
1313
2568
|
|
|
2569
|
+
/**
|
|
2570
|
+
* Main application shell with sidebar, topbar, and content area.
|
|
2571
|
+
* Provides a responsive layout with a collapsible desktop sidebar,
|
|
2572
|
+
* a sliding mobile sidebar overlay, and a scrollable main content region.
|
|
2573
|
+
*
|
|
2574
|
+
* @example
|
|
2575
|
+
* <ITLayout
|
|
2576
|
+
* topBar={{ title: "Dashboard", userMenu: [...] }}
|
|
2577
|
+
* sidebar={{ items: [...], activeKey: "overview" }}
|
|
2578
|
+
* >
|
|
2579
|
+
* <p>Page content goes here</p>
|
|
2580
|
+
* </ITLayout>
|
|
2581
|
+
*
|
|
2582
|
+
* @example
|
|
2583
|
+
* <ITLayout
|
|
2584
|
+
* topBar={{ title: "Settings" }}
|
|
2585
|
+
* sidebar={{ items: navItems }}
|
|
2586
|
+
* className="min-h-screen"
|
|
2587
|
+
* contentClassName="max-w-5xl"
|
|
2588
|
+
* >
|
|
2589
|
+
* <SettingsPage />
|
|
2590
|
+
* </ITLayout>
|
|
2591
|
+
*/
|
|
1314
2592
|
declare function ITLayout({ topBar, sidebar, children, className, contentClassName, }: ITLayoutProps): react_jsx_runtime.JSX.Element;
|
|
1315
2593
|
|
|
1316
2594
|
type LoaderSize = "sm" | "md" | "lg" | "xl";
|
|
1317
2595
|
type LoaderVariant = "spinner" | "dots" | "bar" | "pulse";
|
|
1318
2596
|
|
|
1319
2597
|
interface LoaderProps {
|
|
2598
|
+
/** Loader size: "sm" | "md" | "lg" | "xl" */
|
|
1320
2599
|
size?: LoaderSize;
|
|
2600
|
+
/** Animation variant: "spinner" | "dots" | "bar" | "pulse" */
|
|
1321
2601
|
variant?: LoaderVariant;
|
|
2602
|
+
/** Color value. Can be a theme semantic color key, hex string, rgb string, or CSS class */
|
|
1322
2603
|
color?: string;
|
|
2604
|
+
/** Additional CSS classes */
|
|
1323
2605
|
className?: string;
|
|
1324
2606
|
}
|
|
1325
2607
|
|
|
2608
|
+
/**
|
|
2609
|
+
* Loading indicators with multiple animation types: spinner, dots, pulse,
|
|
2610
|
+
* and bar. Supports configurable size, color (theme semantic or custom),
|
|
2611
|
+
* and inline/padded rendering.
|
|
2612
|
+
*
|
|
2613
|
+
* @example
|
|
2614
|
+
* <ITLoader variant="spinner" size="lg" color="primary" />
|
|
2615
|
+
*
|
|
2616
|
+
* @example
|
|
2617
|
+
* <ITLoader variant="dots" size="md" color="#06b6d4" />
|
|
2618
|
+
*
|
|
2619
|
+
* @example
|
|
2620
|
+
* <ITLoader variant="bar" size="sm" color="secondary" className="w-48" />
|
|
2621
|
+
*
|
|
2622
|
+
* @example
|
|
2623
|
+
* <ITLoader variant="pulse" size="xl" color="red-500" />
|
|
2624
|
+
*/
|
|
1326
2625
|
declare function ITLoader({ size, variant, color, // Default to semantic primary
|
|
1327
2626
|
className, }: LoaderProps): react_jsx_runtime.JSX.Element;
|
|
1328
2627
|
|
|
@@ -1333,16 +2632,27 @@ interface Step {
|
|
|
1333
2632
|
icon?: IconType;
|
|
1334
2633
|
}
|
|
1335
2634
|
interface ITStepperProps {
|
|
2635
|
+
/** Array of step objects defining label, content, and optional icon. */
|
|
1336
2636
|
steps: Step[];
|
|
2637
|
+
/** Zero-based index of the currently active step. */
|
|
1337
2638
|
currentStep: number;
|
|
2639
|
+
/** Called when the user clicks "Finish" on the last step. */
|
|
1338
2640
|
onFinish?: () => void;
|
|
2641
|
+
/** Called whenever the active step changes, receiving the new index. */
|
|
1339
2642
|
onStepChange?: (step: number) => void;
|
|
2643
|
+
/** Whether clicking on completed or current step indicators jumps to that step. */
|
|
1340
2644
|
allowClickToJump?: boolean;
|
|
2645
|
+
/** When true, renders step icons (if provided) instead of numeric indicators. */
|
|
1341
2646
|
useIcons?: boolean;
|
|
2647
|
+
/** Disables the "Next" / "Finish" button. */
|
|
1342
2648
|
disableNext?: boolean;
|
|
2649
|
+
/** Additional CSS classes for the outermost wrapper. */
|
|
1343
2650
|
containerClassName?: string;
|
|
2651
|
+
/** Additional CSS classes for the content panel. */
|
|
1344
2652
|
stepClassName?: string;
|
|
2653
|
+
/** Makes the step content area vertically scrollable. */
|
|
1345
2654
|
scrollableContent?: boolean;
|
|
2655
|
+
/** Maximum height of the scrollable content area (CSS value, e.g. "400px"). */
|
|
1346
2656
|
maxContentHeight?: string;
|
|
1347
2657
|
/**
|
|
1348
2658
|
* Semantic theme color for active steps and buttons.
|
|
@@ -1351,6 +2661,21 @@ interface ITStepperProps {
|
|
|
1351
2661
|
color?: string;
|
|
1352
2662
|
}
|
|
1353
2663
|
|
|
2664
|
+
/**
|
|
2665
|
+
* A step-by-step wizard / progress indicator with animated content transitions,
|
|
2666
|
+
* clickable step navigation, and configurable icons.
|
|
2667
|
+
*
|
|
2668
|
+
* @example
|
|
2669
|
+
* <ITStepper
|
|
2670
|
+
* steps={[
|
|
2671
|
+
* { label: "Details", content: <StepOneForm /> },
|
|
2672
|
+
* { label: "Review", content: <StepTwoReview />, icon: <FaClipboardCheck /> },
|
|
2673
|
+
* ]}
|
|
2674
|
+
* currentStep={0}
|
|
2675
|
+
* onStepChange={setStep}
|
|
2676
|
+
* onFinish={() => alert("Done!")}
|
|
2677
|
+
* />
|
|
2678
|
+
*/
|
|
1354
2679
|
declare function ITStepper({ steps, currentStep, onFinish, onStepChange, allowClickToJump, useIcons, disableNext, containerClassName, stepClassName, scrollableContent, maxContentHeight, color, }: ITStepperProps): react_jsx_runtime.JSX.Element;
|
|
1355
2680
|
|
|
1356
2681
|
interface ITThemePalette {
|
|
@@ -1376,8 +2701,11 @@ interface ITThemePalette {
|
|
|
1376
2701
|
};
|
|
1377
2702
|
}
|
|
1378
2703
|
interface ITThemeProviderProps {
|
|
2704
|
+
/** Partial palette overrides merged with the default theme. Supports primary, secondary, tertiary, danger, success, info, alert, warning, layout, and table colors. */
|
|
1379
2705
|
theme?: Partial<ITThemePalette>;
|
|
2706
|
+
/** The subtree that receives the theme context and CSS variables. */
|
|
1380
2707
|
children: React.ReactNode;
|
|
2708
|
+
/** Whether to show the floating action button for opening the theme designer drawer. */
|
|
1381
2709
|
showFab?: boolean;
|
|
1382
2710
|
}
|
|
1383
2711
|
|
|
@@ -1398,25 +2726,74 @@ declare const useITTheme: () => ITThemeContextType;
|
|
|
1398
2726
|
* si se usa fuera de ITThemeProvider (no lanza error).
|
|
1399
2727
|
*/
|
|
1400
2728
|
declare const useITThemeSafe: () => ITThemeContextType | undefined;
|
|
2729
|
+
/**
|
|
2730
|
+
* Root theme context provider that injects CSS custom properties for all components,
|
|
2731
|
+
* supports custom color palettes, dark/light mode, and an optional in-app theme designer FAB.
|
|
2732
|
+
*
|
|
2733
|
+
* @example
|
|
2734
|
+
* <ITThemeProvider theme={{ primary: "#3b82f6", danger: "#ef4444" }}>
|
|
2735
|
+
* <App />
|
|
2736
|
+
* </ITThemeProvider>
|
|
2737
|
+
*
|
|
2738
|
+
* @example
|
|
2739
|
+
* <ITThemeProvider showFab={false}>
|
|
2740
|
+
* <Dashboard />
|
|
2741
|
+
* </ITThemeProvider>
|
|
2742
|
+
*/
|
|
1401
2743
|
declare function ITThemeProvider({ children, theme, showFab, }: ITThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
1402
2744
|
|
|
1403
2745
|
interface ITTimePickerProps {
|
|
2746
|
+
/** Form field name attribute and key for the change event. */
|
|
1404
2747
|
name: string;
|
|
2748
|
+
/** Controlled time value in "HH:MM" format. */
|
|
1405
2749
|
value?: string;
|
|
2750
|
+
/** Label text displayed above the input. */
|
|
1406
2751
|
label?: string;
|
|
2752
|
+
/** Placeholder text when no value is set (default "HH:MM"). */
|
|
1407
2753
|
placeholder?: string;
|
|
2754
|
+
/** Callback fired on valid time selection, receives event-like object with `target.name` and `target.value`. */
|
|
1408
2755
|
onChange: (e: any) => void;
|
|
2756
|
+
/** Callback fired when the input loses focus. */
|
|
1409
2757
|
onBlur?: (e: any) => void;
|
|
2758
|
+
/** Marks the field as required. */
|
|
1410
2759
|
required?: boolean;
|
|
2760
|
+
/** Whether the input has been touched (interacted with). */
|
|
1411
2761
|
touched?: boolean;
|
|
2762
|
+
/** Validation error message or boolean to show error state. */
|
|
1412
2763
|
error?: string | boolean;
|
|
2764
|
+
/** Disables the time picker when true. */
|
|
1413
2765
|
disabled?: boolean;
|
|
2766
|
+
/** Additional CSS classes for the wrapper. */
|
|
1414
2767
|
className?: string;
|
|
2768
|
+
/** Size preset: "small" | "medium" | "large". */
|
|
1415
2769
|
size?: "small" | "medium" | "large";
|
|
2770
|
+
/** Style variant for the input: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple". */
|
|
1416
2771
|
variant?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple";
|
|
2772
|
+
/** Theme color used for the dropdown highlight and confirm button. Accepts semantic keys or raw hex. */
|
|
1417
2773
|
color?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple" | string;
|
|
1418
2774
|
}
|
|
1419
2775
|
|
|
2776
|
+
/**
|
|
2777
|
+
* Time selection input with a dual-column dropdown (hours / minutes).
|
|
2778
|
+
* Supports manual typing with auto-formatting, validation, and keyboard-friendly picker.
|
|
2779
|
+
*
|
|
2780
|
+
* @example
|
|
2781
|
+
* <ITTimePicker
|
|
2782
|
+
* name="startTime"
|
|
2783
|
+
* label="Start Time"
|
|
2784
|
+
* value={startTime}
|
|
2785
|
+
* onChange={(e) => setStartTime(e.target.value)}
|
|
2786
|
+
* color="primary"
|
|
2787
|
+
* />
|
|
2788
|
+
*
|
|
2789
|
+
* @example
|
|
2790
|
+
* <ITTimePicker
|
|
2791
|
+
* name="endTime"
|
|
2792
|
+
* value={endTime}
|
|
2793
|
+
* onChange={(e) => setEndTime(e.target.value)}
|
|
2794
|
+
* error={isInvalid ? "Invalid time range" : undefined}
|
|
2795
|
+
* />
|
|
2796
|
+
*/
|
|
1420
2797
|
declare function ITTimePicker({ name, value, label, placeholder, onChange, onBlur, required, touched, error, disabled, className, size, variant, color, }: ITTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
1421
2798
|
|
|
1422
2799
|
type ColorScale = {
|