@axzydev/axzy_ui_system 1.4.7 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -11
- package/dist/index.cjs +2174 -1570
- 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 +232 -19
- package/dist/index.d.ts +232 -19
- package/dist/index.js +1838 -1238
- package/dist/index.js.map +1 -1
- package/dist/layered.css +1 -1
- package/package.json +3 -16
- package/src/App.tsx +90 -73
- package/src/components/atoms/badget/badget.tsx +23 -5
- package/src/components/atoms/chip/chip.tsx +3 -1
- package/src/components/atoms/image/image.tsx +3 -1
- package/src/components/atoms/input/input.tsx +8 -5
- package/src/components/atoms/loader/loader.tsx +3 -1
- package/src/components/atoms/slide/slide.props.ts +12 -0
- package/src/components/atoms/slide/slide.tsx +3 -0
- package/src/components/molecules/alert/alert.tsx +3 -1
- package/src/components/molecules/breadcrumbs/breadcrumbs.tsx +3 -1
- package/src/components/molecules/calendar/calendar.tsx +9 -6
- package/src/components/molecules/card/card.tsx +5 -2
- package/src/components/molecules/chip-input/chip-input.tsx +9 -7
- package/src/components/molecules/date-picker/datePicker.tsx +9 -9
- package/src/components/molecules/dropdown-menu/dropdown-menu.props.ts +1 -1
- package/src/components/molecules/dropdown-menu/dropdown-menu.tsx +6 -3
- package/src/components/molecules/field/field.tsx +3 -1
- package/src/components/molecules/form-header/form-header.tsx +3 -1
- package/src/components/molecules/line-bar-chart/line-bar-chart.props.ts +2 -2
- package/src/components/molecules/line-bar-chart/line-bar-chart.tsx +20 -15
- package/src/components/molecules/masked-input/masked-input.tsx +3 -1
- package/src/components/molecules/multi-select/multi-select.tsx +12 -9
- package/src/components/molecules/pagination/pagination.tsx +11 -5
- package/src/components/molecules/search-select/search-select.tsx +11 -9
- package/src/components/molecules/select/select.tsx +6 -4
- package/src/components/molecules/stepper/stepper.tsx +6 -4
- package/src/components/molecules/table/table.props.ts +10 -2
- package/src/components/molecules/table/table.tsx +163 -114
- package/src/components/molecules/time-picker/timePicker.tsx +8 -6
- package/src/components/molecules/wysiwyg/wysiwyg.tsx +23 -12
- package/src/components/organisms/confirm-dialog/confirm-dialog.props.ts +4 -4
- package/src/components/organisms/confirm-dialog/confirm-dialog.tsx +16 -8
- package/src/components/organisms/data-table/dataTable.props.ts +3 -2
- package/src/components/organisms/data-table/dataTable.tsx +149 -81
- package/src/components/organisms/dialog/dialog.tsx +3 -0
- package/src/components/organisms/drawer/drawer.tsx +3 -0
- package/src/components/organisms/dropfile/dropfile.tsx +19 -17
- package/src/components/organisms/form-builder/fieldRenderer.tsx +4 -2
- package/src/components/organisms/navbar/navbar.tsx +4 -2
- package/src/components/organisms/page-header/page-header.tsx +3 -1
- package/src/components/organisms/searchTable/components/PaginationControls.tsx +8 -6
- package/src/components/organisms/searchTable/components/PaginationInfo.tsx +3 -1
- package/src/components/organisms/searchTable/components/SearchAndSortBar.tsx +7 -5
- package/src/components/organisms/searchTable/components/SearchInput.tsx +4 -2
- package/src/components/organisms/searchTable/components/SortButton.tsx +13 -11
- package/src/components/organisms/searchTable/components/TableEmptyState.tsx +4 -2
- package/src/components/organisms/searchTable/components/TableRow.tsx +6 -4
- package/src/components/organisms/searchTable/searchTable.tsx +4 -2
- package/src/components/organisms/sidebar/sidebar.props.ts +1 -1
- package/src/components/organisms/sidebar/sidebar.tsx +9 -4
- package/src/components/organisms/toast/toast.tsx +3 -1
- package/src/components/organisms/topbar/topbar.tsx +4 -2
- package/src/components/templates/page/page.props.ts +4 -4
- package/src/components/templates/page/page.tsx +6 -4
- package/src/components/theme-provider/themeProvider.tsx +28 -17
- package/src/dev.css +77 -2
- package/src/global.d.ts +10 -0
- package/src/i18n/context.ts +9 -0
- package/src/i18n/index.ts +22 -0
- package/src/i18n/locales/en.ts +163 -0
- package/src/i18n/locales/es.ts +165 -0
- package/src/i18n/provider.tsx +44 -0
- package/src/i18n/translator.ts +82 -0
- package/src/i18n/types.ts +54 -0
- package/src/i18n/useITTranslation.ts +20 -0
- package/src/index.css +0 -1
- package/src/index.ts +9 -3
- package/src/sandbox/LandingShowcase.tsx +224 -580
- package/src/sandbox/NotFoundShowcase.tsx +51 -36
- package/src/sandbox/TopbarSearch.tsx +6 -4
- package/src/sandbox/controls.tsx +180 -0
- package/src/sandbox/i18n.ts +1929 -0
- package/src/sandbox/icons.tsx +25 -0
- package/src/sandbox/locale.tsx +72 -0
- package/src/sandbox/ui.tsx +377 -0
- package/src/sandbox/useHashRoute.ts +46 -10
- package/src/showcases/DataShowcases.tsx +201 -80
- package/src/showcases/FeedbackShowcases.tsx +37 -30
- package/src/showcases/FormShowcases.tsx +302 -214
- package/src/showcases/GettingStartedShowcase.tsx +151 -145
- package/src/showcases/HelpShowcase.tsx +126 -128
- package/src/showcases/HomeShowcase.tsx +678 -482
- package/src/showcases/LayoutPrimitivesShowcases.tsx +129 -114
- package/src/showcases/NavigationShowcases.tsx +45 -37
- package/src/showcases/PageShowcases.tsx +171 -152
- package/src/showcases/ProductoDetalle.tsx +272 -129
- package/src/showcases/ShowcaseLayout.tsx +270 -216
- package/src/showcases/SizesShowcase.tsx +123 -64
- package/src/showcases/StructureShowcases.tsx +157 -131
- package/src/showcases/portfolioUi.tsx +153 -0
- package/src/showcases/techIcons.ts +3 -0
- package/src/types/table.types.ts +110 -0
- package/src/utils/table.utils.ts +10 -2
- package/src/components/atoms/avatar/avatar.doc.mdx +0 -48
- package/src/components/atoms/avatar/avatar.stories.tsx +0 -64
- package/src/components/atoms/badget/badget.doc.mdx +0 -46
- package/src/components/atoms/badget/badget.stories.tsx +0 -75
- package/src/components/atoms/button/button.doc.mdx +0 -59
- package/src/components/atoms/button/button.stories.tsx +0 -173
- package/src/components/atoms/checkbox/checkbox.doc.mdx +0 -54
- package/src/components/atoms/checkbox/checkbox.stories.tsx +0 -53
- package/src/components/atoms/chip/chip.doc.mdx +0 -47
- package/src/components/atoms/chip/chip.stories.tsx +0 -64
- package/src/components/atoms/divider/divider.doc.mdx +0 -42
- package/src/components/atoms/divider/divider.stories.tsx +0 -33
- package/src/components/atoms/flex/flex.doc.mdx +0 -59
- package/src/components/atoms/flex/flex.stories.tsx +0 -70
- package/src/components/atoms/grid/grid.doc.mdx +0 -54
- package/src/components/atoms/grid/grid.stories.tsx +0 -71
- package/src/components/atoms/image/image.doc.mdx +0 -44
- package/src/components/atoms/image/image.stories.tsx +0 -48
- package/src/components/atoms/input/input.doc.mdx +0 -70
- package/src/components/atoms/input/input.stories.tsx +0 -113
- package/src/components/atoms/input-number/input-number.doc.mdx +0 -74
- package/src/components/atoms/input-number/input-number.stories.tsx +0 -111
- package/src/components/atoms/loader/loader.doc.mdx +0 -43
- package/src/components/atoms/loader/loader.stories.tsx +0 -104
- package/src/components/atoms/popover/popover.doc.mdx +0 -53
- package/src/components/atoms/popover/popover.stories.tsx +0 -24
- package/src/components/atoms/progress/progress.doc.mdx +0 -48
- package/src/components/atoms/progress/progress.stories.tsx +0 -39
- package/src/components/atoms/radio/radio.doc.mdx +0 -62
- package/src/components/atoms/radio/radio.stories.tsx +0 -48
- package/src/components/atoms/segmented-control/segmented-control.doc.mdx +0 -60
- package/src/components/atoms/segmented-control/segmented-control.stories.tsx +0 -62
- package/src/components/atoms/skeleton/skeleton.doc.mdx +0 -43
- package/src/components/atoms/skeleton/skeleton.stories.tsx +0 -29
- package/src/components/atoms/slide/slide.doc.mdx +0 -46
- package/src/components/atoms/slide/slide.stories.tsx +0 -120
- package/src/components/atoms/slider/slider.doc.mdx +0 -49
- package/src/components/atoms/slider/slider.stories.tsx +0 -29
- package/src/components/atoms/stack/stack.doc.mdx +0 -126
- package/src/components/atoms/stack/stack.stories.tsx +0 -283
- package/src/components/atoms/text/text.doc.mdx +0 -41
- package/src/components/atoms/text/text.stories.tsx +0 -66
- package/src/components/atoms/textarea/textarea.doc.mdx +0 -64
- package/src/components/atoms/textarea/textarea.stories.tsx +0 -26
- package/src/components/atoms/tooltip/tooltip.doc.mdx +0 -47
- package/src/components/atoms/tooltip/tooltip.stories.tsx +0 -19
- package/src/components/isolation/isolation.stories.tsx +0 -202
- package/src/components/molecules/accordion/accordion.doc.mdx +0 -47
- package/src/components/molecules/accordion/accordion.stories.tsx +0 -68
- package/src/components/molecules/alert/alert.doc.mdx +0 -48
- package/src/components/molecules/alert/alert.stories.tsx +0 -40
- package/src/components/molecules/breadcrumbs/breadcrumbs.doc.mdx +0 -57
- package/src/components/molecules/breadcrumbs/breadcrumbs.stories.tsx +0 -20
- package/src/components/molecules/calendar/calendar.doc.mdx +0 -76
- package/src/components/molecules/calendar/calendar.stories.tsx +0 -90
- package/src/components/molecules/card/card.doc.mdx +0 -54
- package/src/components/molecules/card/card.stories.tsx +0 -57
- package/src/components/molecules/chip-input/chip-input.doc.mdx +0 -44
- package/src/components/molecules/chip-input/chip-input.stories.tsx +0 -52
- package/src/components/molecules/date-picker/date-picker.doc.mdx +0 -65
- package/src/components/molecules/date-picker/date-picker.stories.tsx +0 -88
- package/src/components/molecules/dropdown-menu/dropdown-menu.doc.mdx +0 -46
- package/src/components/molecules/dropdown-menu/dropdown-menu.stories.tsx +0 -41
- package/src/components/molecules/empty-state/empty-state.doc.mdx +0 -50
- package/src/components/molecules/empty-state/empty-state.stories.tsx +0 -19
- package/src/components/molecules/field/field.doc.mdx +0 -43
- package/src/components/molecules/field/field.stories.tsx +0 -42
- package/src/components/molecules/form-header/form-header.doc.mdx +0 -38
- package/src/components/molecules/form-header/form-header.stories.tsx +0 -52
- package/src/components/molecules/masked-input/masked-input.doc.mdx +0 -78
- package/src/components/molecules/masked-input/masked-input.stories.tsx +0 -126
- package/src/components/molecules/multi-select/multi-select.doc.mdx +0 -55
- package/src/components/molecules/multi-select/multi-select.stories.tsx +0 -59
- package/src/components/molecules/pagination/pagination.doc.mdx +0 -62
- package/src/components/molecules/pagination/pagination.stories.tsx +0 -110
- package/src/components/molecules/search-select/search-select.doc.mdx +0 -77
- package/src/components/molecules/search-select/search-select.stories.tsx +0 -146
- package/src/components/molecules/select/select.doc.mdx +0 -75
- package/src/components/molecules/select/select.stories.tsx +0 -85
- package/src/components/molecules/stat-card/stat-card.doc.mdx +0 -48
- package/src/components/molecules/stat-card/stat-card.stories.tsx +0 -40
- package/src/components/molecules/stepper/stepper.doc.mdx +0 -54
- package/src/components/molecules/stepper/stepper.stories.tsx +0 -154
- package/src/components/molecules/table/table.doc.mdx +0 -123
- package/src/components/molecules/table/table.stories.tsx +0 -402
- package/src/components/molecules/tabs/tabs.doc.mdx +0 -52
- package/src/components/molecules/tabs/tabs.stories.tsx +0 -31
- package/src/components/molecules/time-picker/timePicker.doc.mdx +0 -68
- package/src/components/molecules/time-picker/timePicker.stories.tsx +0 -130
- package/src/components/molecules/wysiwyg/wysiwyg.stories.tsx +0 -95
- package/src/components/organisms/confirm-dialog/confirm-dialog.doc.mdx +0 -60
- package/src/components/organisms/confirm-dialog/confirm-dialog.stories.tsx +0 -32
- package/src/components/organisms/data-table/ITDataTable.doc.mdx +0 -115
- package/src/components/organisms/data-table/ITDataTable.stories.tsx +0 -353
- package/src/components/organisms/dialog/dialog.doc.mdx +0 -54
- package/src/components/organisms/dialog/dialog.stories.tsx +0 -126
- package/src/components/organisms/drawer/drawer.doc.mdx +0 -59
- package/src/components/organisms/drawer/drawer.stories.tsx +0 -40
- package/src/components/organisms/dropfile/dropfile.doc.mdx +0 -74
- package/src/components/organisms/dropfile/dropfile.stories.tsx +0 -93
- package/src/components/organisms/form-builder/formBuilder.doc.mdx +0 -251
- package/src/components/organisms/form-builder/formBuilder.stories.tsx +0 -914
- package/src/components/organisms/navbar/navbar.doc.mdx +0 -77
- package/src/components/organisms/navbar/navbar.stories.tsx +0 -83
- package/src/components/organisms/page-header/page-header.doc.mdx +0 -54
- package/src/components/organisms/page-header/page-header.stories.tsx +0 -74
- package/src/components/organisms/searchTable/searchTable.doc.mdx +0 -79
- package/src/components/organisms/searchTable/searchTable.stories.tsx +0 -73
- package/src/components/organisms/sidebar/sidebar.doc.mdx +0 -176
- package/src/components/organisms/sidebar/sidebar.stories.tsx +0 -234
- package/src/components/organisms/toast/toast.doc.mdx +0 -50
- package/src/components/organisms/toast/toast.stories.tsx +0 -137
- package/src/components/organisms/topbar/topbar.doc.mdx +0 -72
- package/src/components/organisms/topbar/topbar.stories.tsx +0 -79
- package/src/components/organisms/triple-filter/tripleFilter.doc.mdx +0 -62
- package/src/components/organisms/triple-filter/tripleFilter.stories.tsx +0 -31
- package/src/components/templates/layout/layout.doc.mdx +0 -53
- package/src/components/templates/layout/layout.stories.tsx +0 -113
- package/src/components/templates/page/page.doc.mdx +0 -86
- package/src/components/templates/page/page.stories.tsx +0 -97
- package/src/components/theme-provider/themeProvider.doc.mdx +0 -85
- package/src/components/theme-provider/themeProvider.stories.tsx +0 -58
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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
|
+
import { Locale } from 'date-fns';
|
|
5
6
|
|
|
6
7
|
declare const useClickOutside: (ref: React.RefObject<HTMLElement>, callback: () => void) => void;
|
|
7
8
|
|
|
@@ -19,6 +20,110 @@ interface UseDebouncedSearchResult {
|
|
|
19
20
|
declare function useDebouncedSearch({ initialValue, debounceMs, onSearch, }: UseDebouncedSearchOptions): UseDebouncedSearchResult;
|
|
20
21
|
|
|
21
22
|
type TableVariants = "default" | "striped" | "bordered";
|
|
23
|
+
/**
|
|
24
|
+
* A single, optional style slot for one region of a table. Both fields are
|
|
25
|
+
* merged *after* the component's built-in values.
|
|
26
|
+
*/
|
|
27
|
+
interface TableDesignSlot {
|
|
28
|
+
/**
|
|
29
|
+
* Extra CSS classes merged after the built-in ones. Note that Tailwind
|
|
30
|
+
* resolves conflicts by utility order (not class order), so use inline
|
|
31
|
+
* `style` (or `!` modifiers) when a value must always win.
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Inline CSS merged after the built-in values; wins over classes unless the global theme forces a value with `!important`. */
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Per-instance visual overrides for a table. Every region is optional and, when
|
|
39
|
+
* present, is applied on top of the built-in styles. The global
|
|
40
|
+
* `ITThemeProvider` colors (`--color-table-*`) still apply underneath, so use
|
|
41
|
+
* `TableColors` for this-instance color changes instead of `style`.
|
|
42
|
+
*/
|
|
43
|
+
interface TableDesign {
|
|
44
|
+
/** Outermost wrapper (`space-y-4 w-full`). Prefer `containerClassName` for width/spacing. */
|
|
45
|
+
container?: TableDesignSlot;
|
|
46
|
+
/** The rounded card surface that wraps the toolbar, table and footer (border, radius, shadow, background). */
|
|
47
|
+
card?: TableDesignSlot;
|
|
48
|
+
/** Toolbar strip holding the title and/or the Table|Cards toggle. */
|
|
49
|
+
toolbar?: TableDesignSlot;
|
|
50
|
+
/** The `<thead>` row that carries the column titles. */
|
|
51
|
+
header?: TableDesignSlot;
|
|
52
|
+
/** Every `<th>` header cell. */
|
|
53
|
+
headerCell?: TableDesignSlot;
|
|
54
|
+
/** Every body `<tr>`. */
|
|
55
|
+
row?: TableDesignSlot;
|
|
56
|
+
/** Every body `<td>`. */
|
|
57
|
+
cell?: TableDesignSlot;
|
|
58
|
+
/** Scroll wrapper of the cards view (the responsive card list). */
|
|
59
|
+
cards?: TableDesignSlot;
|
|
60
|
+
/** Pagination footer strip. */
|
|
61
|
+
footer?: TableDesignSlot;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Per-instance color overrides. They are written as local `--color-table-*`
|
|
65
|
+
* variables on the table wrapper, so they beat the global theme for this
|
|
66
|
+
* instance only, without touching `ITThemeProvider`.
|
|
67
|
+
*/
|
|
68
|
+
interface TableColors {
|
|
69
|
+
/** Header row background. Overrides the theme's `table.headerBg` for this instance. */
|
|
70
|
+
headerBg?: string;
|
|
71
|
+
/** Header text color. Overrides the theme's `table.headerText` for this instance. */
|
|
72
|
+
headerText?: string;
|
|
73
|
+
/** Body row background. Overrides the theme's `table.rowBg` for this instance. */
|
|
74
|
+
rowBg?: string;
|
|
75
|
+
/** Body text color. Overrides the theme's `table.rowText` for this instance. */
|
|
76
|
+
rowText?: string;
|
|
77
|
+
/** Body row hover background. Overrides the theme's `table.rowHover` for this instance. */
|
|
78
|
+
rowHover?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Shared design props for ITTable and ITDataTable. `design` exposes every
|
|
82
|
+
* region as an object; the flat `*ClassName` / `*Style` shortcuts are merged
|
|
83
|
+
* after it, so the flat prop wins when both are provided.
|
|
84
|
+
*/
|
|
85
|
+
interface TableDesignProps {
|
|
86
|
+
/** Whether to render the Table|Cards view switcher in the toolbar. Hiding it still honors `defaultView` and `autoCardBreakpoint`. @default true */
|
|
87
|
+
showViewToggle?: boolean;
|
|
88
|
+
/** Per-region visual overrides (classes + inline styles). */
|
|
89
|
+
design?: TableDesign;
|
|
90
|
+
/** Per-instance color overrides for header and rows, beating the global theme. */
|
|
91
|
+
colors?: TableColors;
|
|
92
|
+
/** Inline styles for the outermost wrapper. */
|
|
93
|
+
containerStyle?: CSSProperties;
|
|
94
|
+
/** Extra classes for the card surface (the rounded container). */
|
|
95
|
+
cardClassName?: string;
|
|
96
|
+
/** Inline styles for the card surface. */
|
|
97
|
+
cardStyle?: CSSProperties;
|
|
98
|
+
/** Extra classes for the toolbar strip (title + view toggle). */
|
|
99
|
+
toolbarClassName?: string;
|
|
100
|
+
/** Inline styles for the toolbar strip. */
|
|
101
|
+
toolbarStyle?: CSSProperties;
|
|
102
|
+
/** Extra classes for the header row. */
|
|
103
|
+
headerClassName?: string;
|
|
104
|
+
/** Inline styles for the header row. */
|
|
105
|
+
headerStyle?: CSSProperties;
|
|
106
|
+
/** Extra classes for every header cell. */
|
|
107
|
+
headerCellClassName?: string;
|
|
108
|
+
/** Inline styles for every header cell. */
|
|
109
|
+
headerCellStyle?: CSSProperties;
|
|
110
|
+
/** Extra classes for every body row. */
|
|
111
|
+
rowClassName?: string;
|
|
112
|
+
/** Inline styles for every body row. */
|
|
113
|
+
rowStyle?: CSSProperties;
|
|
114
|
+
/** Extra classes for every body cell. */
|
|
115
|
+
cellClassName?: string;
|
|
116
|
+
/** Inline styles for every body cell. */
|
|
117
|
+
cellStyle?: CSSProperties;
|
|
118
|
+
/** Extra classes for the cards-view scroll wrapper. */
|
|
119
|
+
cardsClassName?: string;
|
|
120
|
+
/** Inline styles for the cards-view scroll wrapper. */
|
|
121
|
+
cardsStyle?: CSSProperties;
|
|
122
|
+
/** Extra classes for the pagination footer strip. */
|
|
123
|
+
footerClassName?: string;
|
|
124
|
+
/** Inline styles for the pagination footer strip. */
|
|
125
|
+
footerStyle?: CSSProperties;
|
|
126
|
+
}
|
|
22
127
|
/**
|
|
23
128
|
* Value stored for a single column filter.
|
|
24
129
|
*
|
|
@@ -832,7 +937,7 @@ interface ITDropdownMenuProps {
|
|
|
832
937
|
items: ITDropdownMenuItem[];
|
|
833
938
|
/** Custom trigger content. Defaults to a vertical ellipsis icon. */
|
|
834
939
|
trigger?: ReactNode;
|
|
835
|
-
/** Accessible label for the trigger button. @default "Abrir menú" */
|
|
940
|
+
/** Accessible label for the trigger button. @default i18n `dropdownMenu.open` ("Abrir menú") */
|
|
836
941
|
triggerLabel?: string;
|
|
837
942
|
/** Placement of the menu relative to the trigger. Valid values: `"bottom-start"`, `"bottom-end"`, `"top-start"`, `"top-end"`. @default "bottom-end" */
|
|
838
943
|
placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
@@ -1096,13 +1201,13 @@ interface ITConfirmDialogProps {
|
|
|
1096
1201
|
onClose: () => void;
|
|
1097
1202
|
/** Callback fired when the user confirms the destructive action. */
|
|
1098
1203
|
onConfirm: () => void;
|
|
1099
|
-
/** Heading text displayed at the top of the dialog. @default "Confirmar acción" */
|
|
1204
|
+
/** Heading text displayed at the top of the dialog. @default i18n `confirmDialog.title` ("Confirmar acción") */
|
|
1100
1205
|
title?: string;
|
|
1101
|
-
/** Body content — accepts plain strings or React nodes. @default "¿Estás seguro de que deseas continuar?" */
|
|
1206
|
+
/** Body content — accepts plain strings or React nodes. @default i18n `confirmDialog.message` ("¿Estás seguro de que deseas continuar?") */
|
|
1102
1207
|
message?: ReactNode;
|
|
1103
|
-
/** Label for the confirm button. @default "Confirmar" */
|
|
1208
|
+
/** Label for the confirm button. @default i18n `common.confirm` ("Confirmar") */
|
|
1104
1209
|
confirmLabel?: string;
|
|
1105
|
-
/** Label for the cancel button. @default "Cancelar" */
|
|
1210
|
+
/** Label for the cancel button. @default i18n `common.cancel` ("Cancelar") */
|
|
1106
1211
|
cancelLabel?: string;
|
|
1107
1212
|
/** Color variant applied to the confirm button. Accepts any ColorsTypes value (e.g. "primary", "danger", "warning", "info"). @default "primary" */
|
|
1108
1213
|
variant?: ColorsTypes;
|
|
@@ -1159,6 +1264,14 @@ interface Column<T = any> {
|
|
|
1159
1264
|
label: string;
|
|
1160
1265
|
/** Additional CSS classes applied to both the header (`<th>`) and body (`<td>`) cells of this column. */
|
|
1161
1266
|
className?: string;
|
|
1267
|
+
/** Extra CSS classes applied only to this column's header (`<th>`), merged after `className`. */
|
|
1268
|
+
headerClassName?: string;
|
|
1269
|
+
/** Inline styles applied only to this column's header (`<th>`), merged after the table-level header-cell style. */
|
|
1270
|
+
headerStyle?: React.CSSProperties;
|
|
1271
|
+
/** Extra CSS classes applied only to this column's body cells (`<td>`), merged after `className`. */
|
|
1272
|
+
cellClassName?: string;
|
|
1273
|
+
/** Inline styles applied only to this column's body cells (`<td>`), merged after the table-level cell style. */
|
|
1274
|
+
cellStyle?: React.CSSProperties;
|
|
1162
1275
|
/** Formats numeric values as Mexican pesos (MXN) via `Intl`-based currency formatting. Only applies when `type` is `"number"`. @default false */
|
|
1163
1276
|
currencyMX?: boolean;
|
|
1164
1277
|
/** Custom action buttons/content rendered for a `"actions"`-type column. Receives the full row object. */
|
|
@@ -1236,7 +1349,7 @@ interface Column<T = any> {
|
|
|
1236
1349
|
*/
|
|
1237
1350
|
pinned?: "left" | "right";
|
|
1238
1351
|
}
|
|
1239
|
-
interface ITTableProps<T> {
|
|
1352
|
+
interface ITTableProps<T> extends TableDesignProps {
|
|
1240
1353
|
/** Column definitions: key, label, type, sortable behavior, filters, and custom rendering. */
|
|
1241
1354
|
columns: Column<T>[];
|
|
1242
1355
|
/** Additional CSS classes for the outermost container. */
|
|
@@ -1352,7 +1465,7 @@ interface ITDataTableResponse<T> {
|
|
|
1352
1465
|
/** Total row count across all pages (used to compute the paginator's total pages). */
|
|
1353
1466
|
total: number;
|
|
1354
1467
|
}
|
|
1355
|
-
interface ITDataTableProps<T extends Record<string, unknown>> {
|
|
1468
|
+
interface ITDataTableProps<T extends Record<string, unknown>> extends TableDesignProps {
|
|
1356
1469
|
/**
|
|
1357
1470
|
* The column configuration array matching ITTable but adapted for Server-Side processing
|
|
1358
1471
|
*/
|
|
@@ -1492,7 +1605,7 @@ interface ITDataTableProps<T extends Record<string, unknown>> {
|
|
|
1492
1605
|
* />
|
|
1493
1606
|
* ```
|
|
1494
1607
|
*/
|
|
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;
|
|
1608
|
+
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
1609
|
|
|
1497
1610
|
interface ITDatePickerProps {
|
|
1498
1611
|
/** Unique name attribute for the underlying input element. */
|
|
@@ -2526,17 +2639,17 @@ interface ITPageProps {
|
|
|
2526
2639
|
loading?: boolean;
|
|
2527
2640
|
/** Error message to display. Shows an error state with retry button when provided. */
|
|
2528
2641
|
error?: string | null;
|
|
2529
|
-
/** Custom title for the error state. Default: "Error". */
|
|
2642
|
+
/** Custom title for the error state. Default: i18n `common.error` ("Error"). */
|
|
2530
2643
|
errorTitle?: string;
|
|
2531
|
-
/** Label for the retry button in the error state. Default: "Reintentar". */
|
|
2644
|
+
/** Label for the retry button in the error state. Default: i18n `common.retry` ("Reintentar"). */
|
|
2532
2645
|
errorActionLabel?: string;
|
|
2533
2646
|
/** Callback fired when the retry button is clicked in the error state. */
|
|
2534
2647
|
onRetry?: () => void;
|
|
2535
2648
|
/** Whether the page is in an empty state. Shows a placeholder when true. */
|
|
2536
2649
|
empty?: boolean;
|
|
2537
|
-
/** Custom title for the empty state. Default: "Sin datos". */
|
|
2650
|
+
/** Custom title for the empty state. Default: i18n `common.noData` ("Sin datos"). */
|
|
2538
2651
|
emptyTitle?: string;
|
|
2539
|
-
/** Custom description for the empty state. */
|
|
2652
|
+
/** Custom description for the empty state. Default: i18n `common.empty` ("No hay información para mostrar"). */
|
|
2540
2653
|
emptyDescription?: string;
|
|
2541
2654
|
/** Custom action element for the empty state. */
|
|
2542
2655
|
emptyAction?: ReactNode;
|
|
@@ -3074,7 +3187,7 @@ interface ITSidebarNotification {
|
|
|
3074
3187
|
count: number;
|
|
3075
3188
|
/** Icon rendered left of the label (e.g. a bell). Omit for a count-only pill. */
|
|
3076
3189
|
icon?: React.ReactNode;
|
|
3077
|
-
/** Accessible label and tooltip for the notification button. @default "Notificaciones" */
|
|
3190
|
+
/** Accessible label and tooltip for the notification button. @default i18n `sidebar.notifications` ("Notificaciones") */
|
|
3078
3191
|
label?: string;
|
|
3079
3192
|
/** Click handler for the notification button. */
|
|
3080
3193
|
onClick?: () => void;
|
|
@@ -3226,6 +3339,16 @@ interface ITSlideToggleProps {
|
|
|
3226
3339
|
disabled?: boolean;
|
|
3227
3340
|
/** Size of the switch: "sm" | "md" | "lg". Default: "md". */
|
|
3228
3341
|
size?: "sm" | "md" | "lg";
|
|
3342
|
+
/**
|
|
3343
|
+
* Texto visible del interruptor. Se asocia al control como nombre accesible
|
|
3344
|
+
* (`aria-label`) cuando no hay un `<label>` externo que lo nombre.
|
|
3345
|
+
*/
|
|
3346
|
+
label?: string;
|
|
3347
|
+
/**
|
|
3348
|
+
* Nombre accesible cuando la etiqueta visible vive fuera del componente.
|
|
3349
|
+
* Tiene prioridad sobre `label`.
|
|
3350
|
+
*/
|
|
3351
|
+
ariaLabel?: string;
|
|
3229
3352
|
/** Additional CSS classes on the container. */
|
|
3230
3353
|
className?: string;
|
|
3231
3354
|
}
|
|
@@ -3244,7 +3367,7 @@ interface ITSlideToggleProps {
|
|
|
3244
3367
|
* ```
|
|
3245
3368
|
*/
|
|
3246
3369
|
declare function ITSlideToggle({ onToggle, isOn: controlledIsOn, initialState, activeColor, inactiveColor, // default gray-400
|
|
3247
|
-
disabled, size, className, }: ITSlideToggleProps): react_jsx_runtime.JSX.Element;
|
|
3370
|
+
disabled, size, label, ariaLabel, className, }: ITSlideToggleProps): react_jsx_runtime.JSX.Element;
|
|
3248
3371
|
|
|
3249
3372
|
/** Props for the ITSlider range slider component. */
|
|
3250
3373
|
interface ITSliderProps {
|
|
@@ -3383,9 +3506,9 @@ interface ITLineBarChartProps {
|
|
|
3383
3506
|
data: ITLineBarDatum[];
|
|
3384
3507
|
/** Etiqueta accesible del gráfico. */
|
|
3385
3508
|
ariaLabel: string;
|
|
3386
|
-
/** Nombre de la serie de la línea (leyenda y tooltip). */
|
|
3509
|
+
/** Nombre de la serie de la línea (leyenda y tooltip). @default i18n `lineBarChart.lineLabel` ("Serie A") */
|
|
3387
3510
|
lineLabel?: string;
|
|
3388
|
-
/** Nombre de la serie de barras (leyenda y tooltip). */
|
|
3511
|
+
/** Nombre de la serie de barras (leyenda y tooltip). @default i18n `lineBarChart.barLabel` ("Serie B") */
|
|
3389
3512
|
barLabel?: string;
|
|
3390
3513
|
/** Color de la línea (por defecto el verde de la casa). */
|
|
3391
3514
|
lineColor?: string;
|
|
@@ -3424,7 +3547,7 @@ declare function ITLineBarChart({ data, ariaLabel, lineLabel, barLabel, lineColo
|
|
|
3424
3547
|
* size="sm"
|
|
3425
3548
|
* />
|
|
3426
3549
|
*/
|
|
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;
|
|
3550
|
+
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
3551
|
|
|
3429
3552
|
interface ITTextProps extends HTMLAttributes<HTMLElement> {
|
|
3430
3553
|
/** The content rendered inside the element. */
|
|
@@ -4313,4 +4436,94 @@ declare const resolveCssColor: (colorStr: string, palette?: ITThemePalette, isDa
|
|
|
4313
4436
|
*/
|
|
4314
4437
|
declare const getContrastTextColor: (bgColor: string, palette?: ITThemePalette, isDarkMode?: boolean) => "text-white" | "text-slate-800";
|
|
4315
4438
|
|
|
4316
|
-
|
|
4439
|
+
/** Supported base locales shipped with the library. */
|
|
4440
|
+
type ITLocale = "es" | "en";
|
|
4441
|
+
/** Message catalog: flat `namespace.key` → text. */
|
|
4442
|
+
type ITMessages = Record<string, string>;
|
|
4443
|
+
/** Message overrides keyed by locale. */
|
|
4444
|
+
type ITMessagesByLocale = Record<string, ITMessages>;
|
|
4445
|
+
/** Interpolation variables for `t()`. */
|
|
4446
|
+
type ITVars = Record<string, string | number>;
|
|
4447
|
+
/** Contract of the i18n context (returned by `useITTranslation()`). */
|
|
4448
|
+
interface ITI18nValue {
|
|
4449
|
+
/** Active locale. */
|
|
4450
|
+
locale: string;
|
|
4451
|
+
/** Fallback locale. */
|
|
4452
|
+
fallbackLocale: string;
|
|
4453
|
+
/** Translate a `namespace.key` and interpolate `{var}` placeholders. */
|
|
4454
|
+
t: (key: string, vars?: ITVars) => string;
|
|
4455
|
+
/** Format a number using `Intl.NumberFormat(locale)`. */
|
|
4456
|
+
formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
4457
|
+
/** Format a currency using `Intl.NumberFormat(locale)`. */
|
|
4458
|
+
formatCurrency: (value: number, currency?: string, options?: Intl.NumberFormatOptions) => string;
|
|
4459
|
+
/** Format a date using `Intl.DateTimeFormat(locale)`. */
|
|
4460
|
+
formatDate: (value: Date | number | string, options?: Intl.DateTimeFormatOptions) => string;
|
|
4461
|
+
/** Matching `date-fns` locale. */
|
|
4462
|
+
dateLocale: Locale;
|
|
4463
|
+
}
|
|
4464
|
+
/** Props for `ITI18nProvider`. */
|
|
4465
|
+
interface ITI18nProviderProps {
|
|
4466
|
+
/** Active locale. @default "es" */
|
|
4467
|
+
locale?: string;
|
|
4468
|
+
/** Fallback locale for missing keys. @default "es" */
|
|
4469
|
+
fallbackLocale?: string;
|
|
4470
|
+
/** Custom messages merged over the built-in catalog, keyed by locale. */
|
|
4471
|
+
messages?: ITMessagesByLocale;
|
|
4472
|
+
/** Application tree. */
|
|
4473
|
+
children: ReactNode;
|
|
4474
|
+
}
|
|
4475
|
+
|
|
4476
|
+
/**
|
|
4477
|
+
* Provee locale y mensajes al árbol de componentes.
|
|
4478
|
+
*
|
|
4479
|
+
* Sin provider, los componentes usan el catálogo base en español. Con provider,
|
|
4480
|
+
* cualquier prop de texto explícita de un componente sigue teniendo prioridad
|
|
4481
|
+
* sobre el catálogo.
|
|
4482
|
+
*
|
|
4483
|
+
* @example
|
|
4484
|
+
* ```tsx
|
|
4485
|
+
* <ITThemeProvider>
|
|
4486
|
+
* <ITI18nProvider locale="en">
|
|
4487
|
+
* <App />
|
|
4488
|
+
* </ITI18nProvider>
|
|
4489
|
+
* </ITThemeProvider>
|
|
4490
|
+
* ```
|
|
4491
|
+
*
|
|
4492
|
+
* @example
|
|
4493
|
+
* ```tsx
|
|
4494
|
+
* // Overrides parciales sobre el catálogo incluido
|
|
4495
|
+
* <ITI18nProvider locale="es" messages={{ es: { "common.cancel": "Abortar" } }}>
|
|
4496
|
+
* <App />
|
|
4497
|
+
* </ITI18nProvider>
|
|
4498
|
+
* ```
|
|
4499
|
+
*/
|
|
4500
|
+
declare function ITI18nProvider({ locale, fallbackLocale, messages, children, }: ITI18nProviderProps): react_jsx_runtime.JSX.Element;
|
|
4501
|
+
|
|
4502
|
+
/**
|
|
4503
|
+
* Devuelve el traductor y los formateadores de la locale activa.
|
|
4504
|
+
*
|
|
4505
|
+
* Funciona aunque no exista `ITI18nProvider` (cae al catálogo base en español).
|
|
4506
|
+
*
|
|
4507
|
+
* @example
|
|
4508
|
+
* ```tsx
|
|
4509
|
+
* const { t, formatCurrency } = useITTranslation();
|
|
4510
|
+
* return <ITButton label={t("common.cancel")} onClick={onCancel} />;
|
|
4511
|
+
* ```
|
|
4512
|
+
*/
|
|
4513
|
+
declare function useITTranslation(): ITI18nValue;
|
|
4514
|
+
|
|
4515
|
+
/**
|
|
4516
|
+
* Catálogo base en español (locale por defecto de la librería).
|
|
4517
|
+
*
|
|
4518
|
+
* Las keys siguen `docs/i18n/conventions.md` (`namespace.clave`) y el inventario de
|
|
4519
|
+
* `docs/i18n/strings.md`. Añade nuevas keys aquí y en `en.ts` a la vez.
|
|
4520
|
+
*/
|
|
4521
|
+
declare const es: ITMessages;
|
|
4522
|
+
|
|
4523
|
+
/**
|
|
4524
|
+
* Catálogo base en inglés. Mantiene exactamente las mismas keys que `es.ts`
|
|
4525
|
+
* (ver `docs/i18n/conventions.md`); si falta una key, se usa el texto en español.
|
|
4526
|
+
*/
|
|
4527
|
+
declare const en: ITMessages;
|
|
4528
|
+
|
|
4529
|
+
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, ITI18nProvider, type ITI18nProviderProps, type ITI18nValue, ITImage, type ITImageProps, ITInput, ITInputNumber, type ITInputNumberProps, type ITInputProps, ITLayout, type ITLayoutProps, ITLineBarChart, type ITLineBarChartProps, type ITLineBarDatum, ITLoader, type LoaderProps as ITLoaderProps, type ITLocale, ITMaskedInput, type ITMaskedInputProps, type ITMessages, type ITMessagesByLocale, 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, en as enMessages, es as esMessages, getContrastTextColor, isLightColor, resolveCssColor, useClickOutside, useDebouncedSearch, useEditableRow, useFloatingPanel, useITFlatAppearance, useITTheme, useITThemeSafe, useITTranslation, useTableState };
|