@axzydev/axzy_ui_system 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +412 -283
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +118 -6
- package/dist/index.d.ts +118 -6
- package/dist/index.js +412 -283
- package/dist/index.js.map +1 -1
- package/dist/layered.css +1 -1
- package/package.json +1 -1
- package/src/components/molecules/table/table.doc.mdx +18 -1
- package/src/components/molecules/table/table.props.ts +10 -2
- package/src/components/molecules/table/table.tsx +135 -88
- package/src/components/organisms/data-table/ITDataTable.doc.mdx +18 -1
- package/src/components/organisms/data-table/dataTable.props.ts +3 -2
- package/src/components/organisms/data-table/dataTable.tsx +120 -58
- package/src/index.ts +2 -2
- package/src/showcases/DataShowcases.tsx +107 -2
- package/src/types/table.types.ts +110 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, {
|
|
3
|
+
import React__default, { CSSProperties, RefObject, ReactNode, ElementType, ChangeEvent, FocusEvent, KeyboardEvent, HTMLAttributes } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
declare const useClickOutside: (ref: React.RefObject<HTMLElement>, callback: () => void) => void;
|
|
@@ -19,6 +19,110 @@ interface UseDebouncedSearchResult {
|
|
|
19
19
|
declare function useDebouncedSearch({ initialValue, debounceMs, onSearch, }: UseDebouncedSearchOptions): UseDebouncedSearchResult;
|
|
20
20
|
|
|
21
21
|
type TableVariants = "default" | "striped" | "bordered";
|
|
22
|
+
/**
|
|
23
|
+
* A single, optional style slot for one region of a table. Both fields are
|
|
24
|
+
* merged *after* the component's built-in values.
|
|
25
|
+
*/
|
|
26
|
+
interface TableDesignSlot {
|
|
27
|
+
/**
|
|
28
|
+
* Extra CSS classes merged after the built-in ones. Note that Tailwind
|
|
29
|
+
* resolves conflicts by utility order (not class order), so use inline
|
|
30
|
+
* `style` (or `!` modifiers) when a value must always win.
|
|
31
|
+
*/
|
|
32
|
+
className?: string;
|
|
33
|
+
/** Inline CSS merged after the built-in values; wins over classes unless the global theme forces a value with `!important`. */
|
|
34
|
+
style?: CSSProperties;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Per-instance visual overrides for a table. Every region is optional and, when
|
|
38
|
+
* present, is applied on top of the built-in styles. The global
|
|
39
|
+
* `ITThemeProvider` colors (`--color-table-*`) still apply underneath, so use
|
|
40
|
+
* `TableColors` for this-instance color changes instead of `style`.
|
|
41
|
+
*/
|
|
42
|
+
interface TableDesign {
|
|
43
|
+
/** Outermost wrapper (`space-y-4 w-full`). Prefer `containerClassName` for width/spacing. */
|
|
44
|
+
container?: TableDesignSlot;
|
|
45
|
+
/** The rounded card surface that wraps the toolbar, table and footer (border, radius, shadow, background). */
|
|
46
|
+
card?: TableDesignSlot;
|
|
47
|
+
/** Toolbar strip holding the title and/or the Table|Cards toggle. */
|
|
48
|
+
toolbar?: TableDesignSlot;
|
|
49
|
+
/** The `<thead>` row that carries the column titles. */
|
|
50
|
+
header?: TableDesignSlot;
|
|
51
|
+
/** Every `<th>` header cell. */
|
|
52
|
+
headerCell?: TableDesignSlot;
|
|
53
|
+
/** Every body `<tr>`. */
|
|
54
|
+
row?: TableDesignSlot;
|
|
55
|
+
/** Every body `<td>`. */
|
|
56
|
+
cell?: TableDesignSlot;
|
|
57
|
+
/** Scroll wrapper of the cards view (the responsive card list). */
|
|
58
|
+
cards?: TableDesignSlot;
|
|
59
|
+
/** Pagination footer strip. */
|
|
60
|
+
footer?: TableDesignSlot;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Per-instance color overrides. They are written as local `--color-table-*`
|
|
64
|
+
* variables on the table wrapper, so they beat the global theme for this
|
|
65
|
+
* instance only, without touching `ITThemeProvider`.
|
|
66
|
+
*/
|
|
67
|
+
interface TableColors {
|
|
68
|
+
/** Header row background. Overrides the theme's `table.headerBg` for this instance. */
|
|
69
|
+
headerBg?: string;
|
|
70
|
+
/** Header text color. Overrides the theme's `table.headerText` for this instance. */
|
|
71
|
+
headerText?: string;
|
|
72
|
+
/** Body row background. Overrides the theme's `table.rowBg` for this instance. */
|
|
73
|
+
rowBg?: string;
|
|
74
|
+
/** Body text color. Overrides the theme's `table.rowText` for this instance. */
|
|
75
|
+
rowText?: string;
|
|
76
|
+
/** Body row hover background. Overrides the theme's `table.rowHover` for this instance. */
|
|
77
|
+
rowHover?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Shared design props for ITTable and ITDataTable. `design` exposes every
|
|
81
|
+
* region as an object; the flat `*ClassName` / `*Style` shortcuts are merged
|
|
82
|
+
* after it, so the flat prop wins when both are provided.
|
|
83
|
+
*/
|
|
84
|
+
interface TableDesignProps {
|
|
85
|
+
/** Whether to render the Table|Cards view switcher in the toolbar. Hiding it still honors `defaultView` and `autoCardBreakpoint`. @default true */
|
|
86
|
+
showViewToggle?: boolean;
|
|
87
|
+
/** Per-region visual overrides (classes + inline styles). */
|
|
88
|
+
design?: TableDesign;
|
|
89
|
+
/** Per-instance color overrides for header and rows, beating the global theme. */
|
|
90
|
+
colors?: TableColors;
|
|
91
|
+
/** Inline styles for the outermost wrapper. */
|
|
92
|
+
containerStyle?: CSSProperties;
|
|
93
|
+
/** Extra classes for the card surface (the rounded container). */
|
|
94
|
+
cardClassName?: string;
|
|
95
|
+
/** Inline styles for the card surface. */
|
|
96
|
+
cardStyle?: CSSProperties;
|
|
97
|
+
/** Extra classes for the toolbar strip (title + view toggle). */
|
|
98
|
+
toolbarClassName?: string;
|
|
99
|
+
/** Inline styles for the toolbar strip. */
|
|
100
|
+
toolbarStyle?: CSSProperties;
|
|
101
|
+
/** Extra classes for the header row. */
|
|
102
|
+
headerClassName?: string;
|
|
103
|
+
/** Inline styles for the header row. */
|
|
104
|
+
headerStyle?: CSSProperties;
|
|
105
|
+
/** Extra classes for every header cell. */
|
|
106
|
+
headerCellClassName?: string;
|
|
107
|
+
/** Inline styles for every header cell. */
|
|
108
|
+
headerCellStyle?: CSSProperties;
|
|
109
|
+
/** Extra classes for every body row. */
|
|
110
|
+
rowClassName?: string;
|
|
111
|
+
/** Inline styles for every body row. */
|
|
112
|
+
rowStyle?: CSSProperties;
|
|
113
|
+
/** Extra classes for every body cell. */
|
|
114
|
+
cellClassName?: string;
|
|
115
|
+
/** Inline styles for every body cell. */
|
|
116
|
+
cellStyle?: CSSProperties;
|
|
117
|
+
/** Extra classes for the cards-view scroll wrapper. */
|
|
118
|
+
cardsClassName?: string;
|
|
119
|
+
/** Inline styles for the cards-view scroll wrapper. */
|
|
120
|
+
cardsStyle?: CSSProperties;
|
|
121
|
+
/** Extra classes for the pagination footer strip. */
|
|
122
|
+
footerClassName?: string;
|
|
123
|
+
/** Inline styles for the pagination footer strip. */
|
|
124
|
+
footerStyle?: CSSProperties;
|
|
125
|
+
}
|
|
22
126
|
/**
|
|
23
127
|
* Value stored for a single column filter.
|
|
24
128
|
*
|
|
@@ -1159,6 +1263,14 @@ interface Column<T = any> {
|
|
|
1159
1263
|
label: string;
|
|
1160
1264
|
/** Additional CSS classes applied to both the header (`<th>`) and body (`<td>`) cells of this column. */
|
|
1161
1265
|
className?: string;
|
|
1266
|
+
/** Extra CSS classes applied only to this column's header (`<th>`), merged after `className`. */
|
|
1267
|
+
headerClassName?: string;
|
|
1268
|
+
/** Inline styles applied only to this column's header (`<th>`), merged after the table-level header-cell style. */
|
|
1269
|
+
headerStyle?: React.CSSProperties;
|
|
1270
|
+
/** Extra CSS classes applied only to this column's body cells (`<td>`), merged after `className`. */
|
|
1271
|
+
cellClassName?: string;
|
|
1272
|
+
/** Inline styles applied only to this column's body cells (`<td>`), merged after the table-level cell style. */
|
|
1273
|
+
cellStyle?: React.CSSProperties;
|
|
1162
1274
|
/** Formats numeric values as Mexican pesos (MXN) via `Intl`-based currency formatting. Only applies when `type` is `"number"`. @default false */
|
|
1163
1275
|
currencyMX?: boolean;
|
|
1164
1276
|
/** Custom action buttons/content rendered for a `"actions"`-type column. Receives the full row object. */
|
|
@@ -1236,7 +1348,7 @@ interface Column<T = any> {
|
|
|
1236
1348
|
*/
|
|
1237
1349
|
pinned?: "left" | "right";
|
|
1238
1350
|
}
|
|
1239
|
-
interface ITTableProps<T> {
|
|
1351
|
+
interface ITTableProps<T> extends TableDesignProps {
|
|
1240
1352
|
/** Column definitions: key, label, type, sortable behavior, filters, and custom rendering. */
|
|
1241
1353
|
columns: Column<T>[];
|
|
1242
1354
|
/** Additional CSS classes for the outermost container. */
|
|
@@ -1352,7 +1464,7 @@ interface ITDataTableResponse<T> {
|
|
|
1352
1464
|
/** Total row count across all pages (used to compute the paginator's total pages). */
|
|
1353
1465
|
total: number;
|
|
1354
1466
|
}
|
|
1355
|
-
interface ITDataTableProps<T extends Record<string, unknown>> {
|
|
1467
|
+
interface ITDataTableProps<T extends Record<string, unknown>> extends TableDesignProps {
|
|
1356
1468
|
/**
|
|
1357
1469
|
* The column configuration array matching ITTable but adapted for Server-Side processing
|
|
1358
1470
|
*/
|
|
@@ -1492,7 +1604,7 @@ interface ITDataTableProps<T extends Record<string, unknown>> {
|
|
|
1492
1604
|
* />
|
|
1493
1605
|
* ```
|
|
1494
1606
|
*/
|
|
1495
|
-
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, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, }: ITDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1607
|
+
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, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, showViewToggle, design, colors, containerStyle, cardClassName, cardStyle, toolbarClassName, toolbarStyle, headerClassName, headerStyle, headerCellClassName, headerCellStyle, rowClassName, rowStyle, cellClassName, cellStyle, cardsClassName, cardsStyle, footerClassName, footerStyle, }: ITDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1496
1608
|
|
|
1497
1609
|
interface ITDatePickerProps {
|
|
1498
1610
|
/** Unique name attribute for the underlying input element. */
|
|
@@ -3424,7 +3536,7 @@ declare function ITLineBarChart({ data, ariaLabel, lineLabel, barLabel, lineColo
|
|
|
3424
3536
|
* size="sm"
|
|
3425
3537
|
* />
|
|
3426
3538
|
*/
|
|
3427
|
-
declare function ITTable<T extends Record<string, unknown>>({ columns, data, containerClassName, variant, size, itemsPerPageOptions, defaultItemsPerPage, title, renderCard, defaultView, showVerticalBorder, verticalBorderClassname, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, }: ITTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
3539
|
+
declare function ITTable<T extends Record<string, unknown>>({ columns, data, containerClassName, variant, size, itemsPerPageOptions, defaultItemsPerPage, title, renderCard, defaultView, showVerticalBorder, verticalBorderClassname, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, showViewToggle, design, colors, containerStyle, cardClassName, cardStyle, toolbarClassName, toolbarStyle, headerClassName, headerStyle, headerCellClassName, headerCellStyle, rowClassName, rowStyle, cellClassName, cellStyle, cardsClassName, cardsStyle, footerClassName, footerStyle, }: ITTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
3428
3540
|
|
|
3429
3541
|
interface ITTextProps extends HTMLAttributes<HTMLElement> {
|
|
3430
3542
|
/** The content rendered inside the element. */
|
|
@@ -4313,4 +4425,4 @@ declare const resolveCssColor: (colorStr: string, palette?: ITThemePalette, isDa
|
|
|
4313
4425
|
*/
|
|
4314
4426
|
declare const getContrastTextColor: (bgColor: string, palette?: ITThemePalette, isDarkMode?: boolean) => "text-white" | "text-slate-800";
|
|
4315
4427
|
|
|
4316
|
-
export { type Column, type ColumnFilterMode, type ColumnFilterValue, type ColumnFilters, type FieldConfig, type FieldConfigV2, FileTypeEnum, ITAccordion, type ITAccordionItem, type ITAccordionProps, ITAlert, type ITAlertProps, ITAvatar, type ITAvatarProps, ITBadget, type ITBadgetProps, type ITBreadcrumbItem, ITBreadcrumbs, type ITBreadcrumbsProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITCheckbox, type ITCheckboxProps, ITChip, ITChipInput, type ITChipInputProps, type ITChipProps, ITConfirmDialog, type ITConfirmDialogProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDivider, type ITDividerProps, ITDrawer, type ITDrawerProps, ITDropdownMenu, type ITDropdownMenuItem, type ITDropdownMenuProps, ITDropfile, ITEmptyState, type ITEmptyStateProps, ITField, type ITFieldProps, ITFlex, type ITFlexProps, ITFormBuilder, type ITFormBuilderProps, ITFormHeader, type ITFormHeaderProps, ITGrid, type ITGridProps, ITImage, type ITImageProps, ITInput, ITInputNumber, type ITInputNumberProps, type ITInputProps, ITLayout, type ITLayoutProps, ITLineBarChart, type ITLineBarChartProps, type ITLineBarDatum, ITLoader, type LoaderProps as ITLoaderProps, ITMaskedInput, type ITMaskedInputProps, ITMultiSelect, type ITMultiSelectOption, type ITMultiSelectProps, ITNavbar, type ITNavbarProps, type ITNavigationItem, type ITNavigationSubItem, type ITNavigationSubItemEntry, type ITNavigationSubItemGroup, ITPage, ITPageHeader, type ITPageHeaderProps, type ITPageProps, ITPagination, type ITPaginationProps, ITPopover, type ITPopoverProps, ITProgress, type ITProgressProps, ITRadioGroup, type ITRadioGroupProps, type ITRadioOption, ITSearchSelect, type ITSearchSelectProps, ITSearchTable, type ITSearchTableProps, ITSegmentedControl, type ITSegmentedControlProps, ITSelect, type ITSelectProps, ITSidebar, type ITSidebarBrand, type ITSidebarNotification, type ITSidebarProps, ITSkeleton, type ITSkeletonProps, ITSlideToggle, type ITSlideToggleProps, ITSlider, type ITSliderProps, ITStack, type ITStackProps, ITStatCard, type ITStatCardProps, ITStepper, type ITStepperProps, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITTextProps, ITTextarea, type ITTextareaProps, type ITThemeAppearance, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, ITWysiwyg, type ITWysiwygProps, type TableDensity, UploadStatus, type UseTableStateOptions, type UseTableStateResult, createValidationSchema, getContrastTextColor, isLightColor, resolveCssColor, useClickOutside, useDebouncedSearch, useEditableRow, useFloatingPanel, useITFlatAppearance, useITTheme, useITThemeSafe, useTableState };
|
|
4428
|
+
export { type Column, type ColumnFilterMode, type ColumnFilterValue, type ColumnFilters, type FieldConfig, type FieldConfigV2, FileTypeEnum, ITAccordion, type ITAccordionItem, type ITAccordionProps, ITAlert, type ITAlertProps, ITAvatar, type ITAvatarProps, ITBadget, type ITBadgetProps, type ITBreadcrumbItem, ITBreadcrumbs, type ITBreadcrumbsProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITCheckbox, type ITCheckboxProps, ITChip, ITChipInput, type ITChipInputProps, type ITChipProps, ITConfirmDialog, type ITConfirmDialogProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDivider, type ITDividerProps, ITDrawer, type ITDrawerProps, ITDropdownMenu, type ITDropdownMenuItem, type ITDropdownMenuProps, ITDropfile, ITEmptyState, type ITEmptyStateProps, ITField, type ITFieldProps, ITFlex, type ITFlexProps, ITFormBuilder, type ITFormBuilderProps, ITFormHeader, type ITFormHeaderProps, ITGrid, type ITGridProps, ITImage, type ITImageProps, ITInput, ITInputNumber, type ITInputNumberProps, type ITInputProps, ITLayout, type ITLayoutProps, ITLineBarChart, type ITLineBarChartProps, type ITLineBarDatum, ITLoader, type LoaderProps as ITLoaderProps, ITMaskedInput, type ITMaskedInputProps, ITMultiSelect, type ITMultiSelectOption, type ITMultiSelectProps, ITNavbar, type ITNavbarProps, type ITNavigationItem, type ITNavigationSubItem, type ITNavigationSubItemEntry, type ITNavigationSubItemGroup, ITPage, ITPageHeader, type ITPageHeaderProps, type ITPageProps, ITPagination, type ITPaginationProps, ITPopover, type ITPopoverProps, ITProgress, type ITProgressProps, ITRadioGroup, type ITRadioGroupProps, type ITRadioOption, ITSearchSelect, type ITSearchSelectProps, ITSearchTable, type ITSearchTableProps, ITSegmentedControl, type ITSegmentedControlProps, ITSelect, type ITSelectProps, ITSidebar, type ITSidebarBrand, type ITSidebarNotification, type ITSidebarProps, ITSkeleton, type ITSkeletonProps, ITSlideToggle, type ITSlideToggleProps, ITSlider, type ITSliderProps, ITStack, type ITStackProps, ITStatCard, type ITStatCardProps, ITStepper, type ITStepperProps, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITTextProps, ITTextarea, type ITTextareaProps, type ITThemeAppearance, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, ITWysiwyg, type ITWysiwygProps, type TableColors, type TableDensity, type TableDesign, type TableDesignProps, type TableDesignSlot, UploadStatus, type UseTableStateOptions, type UseTableStateResult, createValidationSchema, getContrastTextColor, isLightColor, resolveCssColor, useClickOutside, useDebouncedSearch, useEditableRow, useFloatingPanel, useITFlatAppearance, useITTheme, useITThemeSafe, useTableState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, {
|
|
3
|
+
import React__default, { CSSProperties, RefObject, ReactNode, ElementType, ChangeEvent, FocusEvent, KeyboardEvent, HTMLAttributes } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
declare const useClickOutside: (ref: React.RefObject<HTMLElement>, callback: () => void) => void;
|
|
@@ -19,6 +19,110 @@ interface UseDebouncedSearchResult {
|
|
|
19
19
|
declare function useDebouncedSearch({ initialValue, debounceMs, onSearch, }: UseDebouncedSearchOptions): UseDebouncedSearchResult;
|
|
20
20
|
|
|
21
21
|
type TableVariants = "default" | "striped" | "bordered";
|
|
22
|
+
/**
|
|
23
|
+
* A single, optional style slot for one region of a table. Both fields are
|
|
24
|
+
* merged *after* the component's built-in values.
|
|
25
|
+
*/
|
|
26
|
+
interface TableDesignSlot {
|
|
27
|
+
/**
|
|
28
|
+
* Extra CSS classes merged after the built-in ones. Note that Tailwind
|
|
29
|
+
* resolves conflicts by utility order (not class order), so use inline
|
|
30
|
+
* `style` (or `!` modifiers) when a value must always win.
|
|
31
|
+
*/
|
|
32
|
+
className?: string;
|
|
33
|
+
/** Inline CSS merged after the built-in values; wins over classes unless the global theme forces a value with `!important`. */
|
|
34
|
+
style?: CSSProperties;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Per-instance visual overrides for a table. Every region is optional and, when
|
|
38
|
+
* present, is applied on top of the built-in styles. The global
|
|
39
|
+
* `ITThemeProvider` colors (`--color-table-*`) still apply underneath, so use
|
|
40
|
+
* `TableColors` for this-instance color changes instead of `style`.
|
|
41
|
+
*/
|
|
42
|
+
interface TableDesign {
|
|
43
|
+
/** Outermost wrapper (`space-y-4 w-full`). Prefer `containerClassName` for width/spacing. */
|
|
44
|
+
container?: TableDesignSlot;
|
|
45
|
+
/** The rounded card surface that wraps the toolbar, table and footer (border, radius, shadow, background). */
|
|
46
|
+
card?: TableDesignSlot;
|
|
47
|
+
/** Toolbar strip holding the title and/or the Table|Cards toggle. */
|
|
48
|
+
toolbar?: TableDesignSlot;
|
|
49
|
+
/** The `<thead>` row that carries the column titles. */
|
|
50
|
+
header?: TableDesignSlot;
|
|
51
|
+
/** Every `<th>` header cell. */
|
|
52
|
+
headerCell?: TableDesignSlot;
|
|
53
|
+
/** Every body `<tr>`. */
|
|
54
|
+
row?: TableDesignSlot;
|
|
55
|
+
/** Every body `<td>`. */
|
|
56
|
+
cell?: TableDesignSlot;
|
|
57
|
+
/** Scroll wrapper of the cards view (the responsive card list). */
|
|
58
|
+
cards?: TableDesignSlot;
|
|
59
|
+
/** Pagination footer strip. */
|
|
60
|
+
footer?: TableDesignSlot;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Per-instance color overrides. They are written as local `--color-table-*`
|
|
64
|
+
* variables on the table wrapper, so they beat the global theme for this
|
|
65
|
+
* instance only, without touching `ITThemeProvider`.
|
|
66
|
+
*/
|
|
67
|
+
interface TableColors {
|
|
68
|
+
/** Header row background. Overrides the theme's `table.headerBg` for this instance. */
|
|
69
|
+
headerBg?: string;
|
|
70
|
+
/** Header text color. Overrides the theme's `table.headerText` for this instance. */
|
|
71
|
+
headerText?: string;
|
|
72
|
+
/** Body row background. Overrides the theme's `table.rowBg` for this instance. */
|
|
73
|
+
rowBg?: string;
|
|
74
|
+
/** Body text color. Overrides the theme's `table.rowText` for this instance. */
|
|
75
|
+
rowText?: string;
|
|
76
|
+
/** Body row hover background. Overrides the theme's `table.rowHover` for this instance. */
|
|
77
|
+
rowHover?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Shared design props for ITTable and ITDataTable. `design` exposes every
|
|
81
|
+
* region as an object; the flat `*ClassName` / `*Style` shortcuts are merged
|
|
82
|
+
* after it, so the flat prop wins when both are provided.
|
|
83
|
+
*/
|
|
84
|
+
interface TableDesignProps {
|
|
85
|
+
/** Whether to render the Table|Cards view switcher in the toolbar. Hiding it still honors `defaultView` and `autoCardBreakpoint`. @default true */
|
|
86
|
+
showViewToggle?: boolean;
|
|
87
|
+
/** Per-region visual overrides (classes + inline styles). */
|
|
88
|
+
design?: TableDesign;
|
|
89
|
+
/** Per-instance color overrides for header and rows, beating the global theme. */
|
|
90
|
+
colors?: TableColors;
|
|
91
|
+
/** Inline styles for the outermost wrapper. */
|
|
92
|
+
containerStyle?: CSSProperties;
|
|
93
|
+
/** Extra classes for the card surface (the rounded container). */
|
|
94
|
+
cardClassName?: string;
|
|
95
|
+
/** Inline styles for the card surface. */
|
|
96
|
+
cardStyle?: CSSProperties;
|
|
97
|
+
/** Extra classes for the toolbar strip (title + view toggle). */
|
|
98
|
+
toolbarClassName?: string;
|
|
99
|
+
/** Inline styles for the toolbar strip. */
|
|
100
|
+
toolbarStyle?: CSSProperties;
|
|
101
|
+
/** Extra classes for the header row. */
|
|
102
|
+
headerClassName?: string;
|
|
103
|
+
/** Inline styles for the header row. */
|
|
104
|
+
headerStyle?: CSSProperties;
|
|
105
|
+
/** Extra classes for every header cell. */
|
|
106
|
+
headerCellClassName?: string;
|
|
107
|
+
/** Inline styles for every header cell. */
|
|
108
|
+
headerCellStyle?: CSSProperties;
|
|
109
|
+
/** Extra classes for every body row. */
|
|
110
|
+
rowClassName?: string;
|
|
111
|
+
/** Inline styles for every body row. */
|
|
112
|
+
rowStyle?: CSSProperties;
|
|
113
|
+
/** Extra classes for every body cell. */
|
|
114
|
+
cellClassName?: string;
|
|
115
|
+
/** Inline styles for every body cell. */
|
|
116
|
+
cellStyle?: CSSProperties;
|
|
117
|
+
/** Extra classes for the cards-view scroll wrapper. */
|
|
118
|
+
cardsClassName?: string;
|
|
119
|
+
/** Inline styles for the cards-view scroll wrapper. */
|
|
120
|
+
cardsStyle?: CSSProperties;
|
|
121
|
+
/** Extra classes for the pagination footer strip. */
|
|
122
|
+
footerClassName?: string;
|
|
123
|
+
/** Inline styles for the pagination footer strip. */
|
|
124
|
+
footerStyle?: CSSProperties;
|
|
125
|
+
}
|
|
22
126
|
/**
|
|
23
127
|
* Value stored for a single column filter.
|
|
24
128
|
*
|
|
@@ -1159,6 +1263,14 @@ interface Column<T = any> {
|
|
|
1159
1263
|
label: string;
|
|
1160
1264
|
/** Additional CSS classes applied to both the header (`<th>`) and body (`<td>`) cells of this column. */
|
|
1161
1265
|
className?: string;
|
|
1266
|
+
/** Extra CSS classes applied only to this column's header (`<th>`), merged after `className`. */
|
|
1267
|
+
headerClassName?: string;
|
|
1268
|
+
/** Inline styles applied only to this column's header (`<th>`), merged after the table-level header-cell style. */
|
|
1269
|
+
headerStyle?: React.CSSProperties;
|
|
1270
|
+
/** Extra CSS classes applied only to this column's body cells (`<td>`), merged after `className`. */
|
|
1271
|
+
cellClassName?: string;
|
|
1272
|
+
/** Inline styles applied only to this column's body cells (`<td>`), merged after the table-level cell style. */
|
|
1273
|
+
cellStyle?: React.CSSProperties;
|
|
1162
1274
|
/** Formats numeric values as Mexican pesos (MXN) via `Intl`-based currency formatting. Only applies when `type` is `"number"`. @default false */
|
|
1163
1275
|
currencyMX?: boolean;
|
|
1164
1276
|
/** Custom action buttons/content rendered for a `"actions"`-type column. Receives the full row object. */
|
|
@@ -1236,7 +1348,7 @@ interface Column<T = any> {
|
|
|
1236
1348
|
*/
|
|
1237
1349
|
pinned?: "left" | "right";
|
|
1238
1350
|
}
|
|
1239
|
-
interface ITTableProps<T> {
|
|
1351
|
+
interface ITTableProps<T> extends TableDesignProps {
|
|
1240
1352
|
/** Column definitions: key, label, type, sortable behavior, filters, and custom rendering. */
|
|
1241
1353
|
columns: Column<T>[];
|
|
1242
1354
|
/** Additional CSS classes for the outermost container. */
|
|
@@ -1352,7 +1464,7 @@ interface ITDataTableResponse<T> {
|
|
|
1352
1464
|
/** Total row count across all pages (used to compute the paginator's total pages). */
|
|
1353
1465
|
total: number;
|
|
1354
1466
|
}
|
|
1355
|
-
interface ITDataTableProps<T extends Record<string, unknown>> {
|
|
1467
|
+
interface ITDataTableProps<T extends Record<string, unknown>> extends TableDesignProps {
|
|
1356
1468
|
/**
|
|
1357
1469
|
* The column configuration array matching ITTable but adapted for Server-Side processing
|
|
1358
1470
|
*/
|
|
@@ -1492,7 +1604,7 @@ interface ITDataTableProps<T extends Record<string, unknown>> {
|
|
|
1492
1604
|
* />
|
|
1493
1605
|
* ```
|
|
1494
1606
|
*/
|
|
1495
|
-
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, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, }: ITDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1607
|
+
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, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, showViewToggle, design, colors, containerStyle, cardClassName, cardStyle, toolbarClassName, toolbarStyle, headerClassName, headerStyle, headerCellClassName, headerCellStyle, rowClassName, rowStyle, cellClassName, cellStyle, cardsClassName, cardsStyle, footerClassName, footerStyle, }: ITDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1496
1608
|
|
|
1497
1609
|
interface ITDatePickerProps {
|
|
1498
1610
|
/** Unique name attribute for the underlying input element. */
|
|
@@ -3424,7 +3536,7 @@ declare function ITLineBarChart({ data, ariaLabel, lineLabel, barLabel, lineColo
|
|
|
3424
3536
|
* size="sm"
|
|
3425
3537
|
* />
|
|
3426
3538
|
*/
|
|
3427
|
-
declare function ITTable<T extends Record<string, unknown>>({ columns, data, containerClassName, variant, size, itemsPerPageOptions, defaultItemsPerPage, title, renderCard, defaultView, showVerticalBorder, verticalBorderClassname, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, }: ITTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
3539
|
+
declare function ITTable<T extends Record<string, unknown>>({ columns, data, containerClassName, variant, size, itemsPerPageOptions, defaultItemsPerPage, title, renderCard, defaultView, showVerticalBorder, verticalBorderClassname, onRowClick, layout, density, autoCardBreakpoint, virtualized, virtualizedMaxHeight, rowHeight, overscan, stickyHeader, showViewToggle, design, colors, containerStyle, cardClassName, cardStyle, toolbarClassName, toolbarStyle, headerClassName, headerStyle, headerCellClassName, headerCellStyle, rowClassName, rowStyle, cellClassName, cellStyle, cardsClassName, cardsStyle, footerClassName, footerStyle, }: ITTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
3428
3540
|
|
|
3429
3541
|
interface ITTextProps extends HTMLAttributes<HTMLElement> {
|
|
3430
3542
|
/** The content rendered inside the element. */
|
|
@@ -4313,4 +4425,4 @@ declare const resolveCssColor: (colorStr: string, palette?: ITThemePalette, isDa
|
|
|
4313
4425
|
*/
|
|
4314
4426
|
declare const getContrastTextColor: (bgColor: string, palette?: ITThemePalette, isDarkMode?: boolean) => "text-white" | "text-slate-800";
|
|
4315
4427
|
|
|
4316
|
-
export { type Column, type ColumnFilterMode, type ColumnFilterValue, type ColumnFilters, type FieldConfig, type FieldConfigV2, FileTypeEnum, ITAccordion, type ITAccordionItem, type ITAccordionProps, ITAlert, type ITAlertProps, ITAvatar, type ITAvatarProps, ITBadget, type ITBadgetProps, type ITBreadcrumbItem, ITBreadcrumbs, type ITBreadcrumbsProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITCheckbox, type ITCheckboxProps, ITChip, ITChipInput, type ITChipInputProps, type ITChipProps, ITConfirmDialog, type ITConfirmDialogProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDivider, type ITDividerProps, ITDrawer, type ITDrawerProps, ITDropdownMenu, type ITDropdownMenuItem, type ITDropdownMenuProps, ITDropfile, ITEmptyState, type ITEmptyStateProps, ITField, type ITFieldProps, ITFlex, type ITFlexProps, ITFormBuilder, type ITFormBuilderProps, ITFormHeader, type ITFormHeaderProps, ITGrid, type ITGridProps, ITImage, type ITImageProps, ITInput, ITInputNumber, type ITInputNumberProps, type ITInputProps, ITLayout, type ITLayoutProps, ITLineBarChart, type ITLineBarChartProps, type ITLineBarDatum, ITLoader, type LoaderProps as ITLoaderProps, ITMaskedInput, type ITMaskedInputProps, ITMultiSelect, type ITMultiSelectOption, type ITMultiSelectProps, ITNavbar, type ITNavbarProps, type ITNavigationItem, type ITNavigationSubItem, type ITNavigationSubItemEntry, type ITNavigationSubItemGroup, ITPage, ITPageHeader, type ITPageHeaderProps, type ITPageProps, ITPagination, type ITPaginationProps, ITPopover, type ITPopoverProps, ITProgress, type ITProgressProps, ITRadioGroup, type ITRadioGroupProps, type ITRadioOption, ITSearchSelect, type ITSearchSelectProps, ITSearchTable, type ITSearchTableProps, ITSegmentedControl, type ITSegmentedControlProps, ITSelect, type ITSelectProps, ITSidebar, type ITSidebarBrand, type ITSidebarNotification, type ITSidebarProps, ITSkeleton, type ITSkeletonProps, ITSlideToggle, type ITSlideToggleProps, ITSlider, type ITSliderProps, ITStack, type ITStackProps, ITStatCard, type ITStatCardProps, ITStepper, type ITStepperProps, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITTextProps, ITTextarea, type ITTextareaProps, type ITThemeAppearance, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, ITWysiwyg, type ITWysiwygProps, type TableDensity, UploadStatus, type UseTableStateOptions, type UseTableStateResult, createValidationSchema, getContrastTextColor, isLightColor, resolveCssColor, useClickOutside, useDebouncedSearch, useEditableRow, useFloatingPanel, useITFlatAppearance, useITTheme, useITThemeSafe, useTableState };
|
|
4428
|
+
export { type Column, type ColumnFilterMode, type ColumnFilterValue, type ColumnFilters, type FieldConfig, type FieldConfigV2, FileTypeEnum, ITAccordion, type ITAccordionItem, type ITAccordionProps, ITAlert, type ITAlertProps, ITAvatar, type ITAvatarProps, ITBadget, type ITBadgetProps, type ITBreadcrumbItem, ITBreadcrumbs, type ITBreadcrumbsProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITCheckbox, type ITCheckboxProps, ITChip, ITChipInput, type ITChipInputProps, type ITChipProps, ITConfirmDialog, type ITConfirmDialogProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDivider, type ITDividerProps, ITDrawer, type ITDrawerProps, ITDropdownMenu, type ITDropdownMenuItem, type ITDropdownMenuProps, ITDropfile, ITEmptyState, type ITEmptyStateProps, ITField, type ITFieldProps, ITFlex, type ITFlexProps, ITFormBuilder, type ITFormBuilderProps, ITFormHeader, type ITFormHeaderProps, ITGrid, type ITGridProps, ITImage, type ITImageProps, ITInput, ITInputNumber, type ITInputNumberProps, type ITInputProps, ITLayout, type ITLayoutProps, ITLineBarChart, type ITLineBarChartProps, type ITLineBarDatum, ITLoader, type LoaderProps as ITLoaderProps, ITMaskedInput, type ITMaskedInputProps, ITMultiSelect, type ITMultiSelectOption, type ITMultiSelectProps, ITNavbar, type ITNavbarProps, type ITNavigationItem, type ITNavigationSubItem, type ITNavigationSubItemEntry, type ITNavigationSubItemGroup, ITPage, ITPageHeader, type ITPageHeaderProps, type ITPageProps, ITPagination, type ITPaginationProps, ITPopover, type ITPopoverProps, ITProgress, type ITProgressProps, ITRadioGroup, type ITRadioGroupProps, type ITRadioOption, ITSearchSelect, type ITSearchSelectProps, ITSearchTable, type ITSearchTableProps, ITSegmentedControl, type ITSegmentedControlProps, ITSelect, type ITSelectProps, ITSidebar, type ITSidebarBrand, type ITSidebarNotification, type ITSidebarProps, ITSkeleton, type ITSkeletonProps, ITSlideToggle, type ITSlideToggleProps, ITSlider, type ITSliderProps, ITStack, type ITStackProps, ITStatCard, type ITStatCardProps, ITStepper, type ITStepperProps, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITTextProps, ITTextarea, type ITTextareaProps, type ITThemeAppearance, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, ITWysiwyg, type ITWysiwygProps, type TableColors, type TableDensity, type TableDesign, type TableDesignProps, type TableDesignSlot, UploadStatus, type UseTableStateOptions, type UseTableStateResult, createValidationSchema, getContrastTextColor, isLightColor, resolveCssColor, useClickOutside, useDebouncedSearch, useEditableRow, useFloatingPanel, useITFlatAppearance, useITTheme, useITThemeSafe, useTableState };
|