@scmlatam/web-ui 0.2.12 → 0.2.14
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/examples/rb-excel-table-example.xlsx +0 -0
- package/dist/src/App.d.ts +1 -1
- package/dist/src/components/contextmenu/Contextmenu.d.ts +1 -1
- package/dist/src/components/core/Core.d.ts +1 -1
- package/dist/src/components/core/context/Provider.d.ts +1 -1
- package/dist/src/components/core/dashboard/Dashboard.d.ts +1 -1
- package/dist/src/components/core/dashboard/account/Account.d.ts +1 -1
- package/dist/src/components/core/dashboard/content/Content.d.ts +1 -1
- package/dist/src/components/core/dashboard/search/Search.d.ts +1 -1
- package/dist/src/components/core/dashboard/sidebar/CompactItem.d.ts +1 -1
- package/dist/src/components/core/dashboard/sidebar/Content.d.ts +1 -1
- package/dist/src/components/core/dashboard/sidebar/ExtendGroupItem.d.ts +1 -1
- package/dist/src/components/core/dashboard/sidebar/Footer.d.ts +1 -1
- package/dist/src/components/core/dashboard/sidebar/Header.d.ts +1 -1
- package/dist/src/components/core/dashboard/sidebar/Sidebar.d.ts +1 -1
- package/dist/src/components/core/dashboard/sidebar/SubItem.d.ts +1 -1
- package/dist/src/components/core/signin/SignIn.d.ts +1 -1
- package/dist/src/components/core/signin/SignUp.d.ts +1 -1
- package/dist/src/components/core/system/Alert.d.ts +1 -1
- package/dist/src/components/form/Form.d.ts +1 -1
- package/dist/src/components/form/autocomplete/Autocomplete.d.ts +1 -1
- package/dist/src/components/form/datefield/range/DateRangeCalendar.d.ts +1 -1
- package/dist/src/components/form/datefield/range/DateRangePicker.d.ts +1 -1
- package/dist/src/components/form/datefield/range/Datefield.d.ts +1 -1
- package/dist/src/components/form/datefield/simple/DatePicker.d.ts +1 -1
- package/dist/src/components/form/datefield/simple/Datefield.d.ts +1 -1
- package/dist/src/components/form/datefield/simple/Timefield.d.ts +1 -1
- package/dist/src/components/form/file/FileField.d.ts +1 -1
- package/dist/src/components/form/select/MultiSelect.d.ts +1 -1
- package/dist/src/components/form/select/Select.d.ts +1 -1
- package/dist/src/components/form/sheet/Sheet.d.ts +1 -1
- package/dist/src/components/form/treewiew/Treeview.d.ts +1 -1
- package/dist/src/components/rb.d.ts +16 -6
- package/dist/src/components/table/Table.d.ts +1 -1
- package/dist/src/components/table/toolbar/Toolbar.d.ts +1 -1
- package/dist/src/components/table/toolbar/datefield/range/DateRangePicker.d.ts +1 -1
- package/dist/src/components/table/toolbar/datefield/range/Datefield.d.ts +1 -1
- package/dist/src/components/table/toolbar/datefield/simple/DatePicker.d.ts +1 -1
- package/dist/src/components/table/toolbar/datefield/simple/Datefield.d.ts +1 -1
- package/dist/src/components/table/toolbar/select/MultiSelect.d.ts +1 -1
- package/dist/src/components/table/toolbar/select/Select.d.ts +1 -1
- package/dist/src/mock/SidebarData.d.ts +3 -3
- package/dist/src/pages/Home.d.ts +1 -1
- package/dist/src/pages/Segment.d.ts +1 -1
- package/dist/src/pages/Timekeeper.d.ts +1 -1
- package/dist/src/pages/home/rb/RbComponentsDocumentation.d.ts +1 -0
- package/dist/src/pages/home/rb/components/GuideCard.d.ts +32 -0
- package/dist/src/pages/home/rb/components/GuideSection.d.ts +8 -0
- package/dist/src/pages/home/rb/components/LibraryIcon.d.ts +5 -0
- package/dist/src/pages/home/rb/components/RbDocumentationIndex.d.ts +5 -0
- package/dist/src/pages/home/rb/data/excelTableGuideData.d.ts +12 -0
- package/dist/src/pages/home/rb/data/rbDocumentationIndexItems.d.ts +2 -0
- package/dist/src/pages/home/rb/data/tableGuideData.d.ts +18 -0
- package/dist/src/pages/home/rb/data/treePanelData.d.ts +4 -0
- package/dist/src/pages/home/rb/index.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/BaseComponentsSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/ButtonsSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/DatesSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/ExcelTableSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/FeedbackComponentsSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/FormShellSection.d.ts +2 -0
- package/dist/src/pages/home/rb/sections/InlineChipFieldSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/InputsSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/ListsSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/SelectionControlsSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/SelectsSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/TableToolbarSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/TablesSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/TreePanelSection.d.ts +1 -0
- package/dist/src/pages/home/rb/sections/TypographySection.d.ts +1 -0
- package/dist/src/pages/home/rb/types/documentation.types.d.ts +6 -0
- package/dist/src/rb-components/auth/components/AuthLanguageDropdown.d.ts +1 -1
- package/dist/src/rb-components/auth/components/AuthPasswordInput.d.ts +1 -1
- package/dist/src/rb-components/auth/components/AuthShell.d.ts +1 -1
- package/dist/src/rb-components/feedback/message-alert/MessageAlert.d.ts +1 -1
- package/dist/src/rb-components/form/FormLayout.d.ts +15 -0
- package/dist/src/rb-components/form/FormShell.d.ts +26 -3
- package/dist/src/rb-components/form/index.d.ts +3 -1
- package/dist/src/rb-components/images.d.ts +36 -0
- package/dist/src/rb-components/index.d.ts +2 -0
- package/dist/src/rb-components/list/RbList.d.ts +48 -0
- package/dist/src/rb-components/list/index.d.ts +2 -0
- package/dist/src/rb-components/navigation/PillsTabs.d.ts +1 -1
- package/dist/src/rb-components/shell/Breadcrumbs.d.ts +1 -1
- package/dist/src/rb-components/shell/DashboardShell.d.ts +1 -1
- package/dist/src/rb-components/shell/ShellContent.d.ts +1 -1
- package/dist/src/rb-components/sidebar/Sidebar.d.ts +1 -1
- package/dist/src/rb-components/sidebar/SidebarContent.d.ts +1 -1
- package/dist/src/rb-components/sidebar/SidebarFooter.d.ts +1 -1
- package/dist/src/rb-components/sidebar/SidebarHeader.d.ts +1 -1
- package/dist/src/rb-components/table/RbExcelTable.d.ts +7 -0
- package/dist/src/rb-components/table/RbTable.d.ts +2 -1
- package/dist/src/rb-components/table/RbTableToolbar.d.ts +1 -17
- package/dist/src/rb-components/table/excel/RbExcelEditableCell.d.ts +12 -0
- package/dist/src/rb-components/table/excel/RbExcelValidationAlert.d.ts +11 -0
- package/dist/src/rb-components/table/excel/excel.helpers.d.ts +16 -0
- package/dist/src/rb-components/table/excel/excel.types.d.ts +361 -0
- package/dist/src/rb-components/table/index.d.ts +5 -1
- package/dist/src/rb-components/table/toolbar/RbToolbarActionButton.d.ts +1 -9
- package/dist/src/rb-components/table/toolbar/RbToolbarActions.d.ts +7 -0
- package/dist/src/rb-components/table/toolbar/RbToolbarDateRangeField.d.ts +1 -1
- package/dist/src/rb-components/table/toolbar/RbToolbarMultiSelectField.d.ts +5 -1
- package/dist/src/rb-components/table/toolbar/RbToolbarSearchField.d.ts +3 -10
- package/dist/src/rb-components/table/toolbar/RbToolbarSelectField.d.ts +8 -1
- package/dist/src/rb-components/table/toolbar/index.d.ts +9 -7
- package/dist/src/rb-components/table/types.d.ts +48 -2
- package/dist/src/rb-components/topbar/TopBar.d.ts +1 -1
- package/dist/src/rb-components/topbar/TopBarUserMenu.d.ts +1 -1
- package/dist/src/rb-components/tree-panel/TreeIcon.d.ts +19 -0
- package/dist/src/rb-components/tree-panel/TreeNode.d.ts +17 -0
- package/dist/src/rb-components/tree-panel/TreePanel.d.ts +4 -0
- package/dist/src/rb-components/tree-panel/index.d.ts +4 -0
- package/dist/src/rb-components/tree-panel/treePanel.types.d.ts +94 -0
- package/dist/src/rb-components/tree-panel/treePanel.utils.d.ts +25 -0
- package/dist/src/rb-components/ui/index.d.ts +18 -19
- package/dist/src/rb-components/ui/overlays/Tooltip.d.ts +1 -1
- package/dist/src/rb-components/ui/primitives/AutoCustomCompleteField.d.ts +60 -3
- package/dist/src/rb-components/ui/primitives/Button.d.ts +2 -3
- package/dist/src/rb-components/ui/primitives/Card.d.ts +5 -5
- package/dist/src/rb-components/ui/primitives/Checkbox.d.ts +10 -0
- package/dist/src/rb-components/ui/primitives/Input.d.ts +2 -2
- package/dist/src/rb-components/ui/primitives/Radio.d.ts +11 -0
- package/dist/src/rb-components/ui/primitives/RbContextMenu.d.ts +1 -1
- package/dist/src/rb-components/ui/primitives/RbInlineChipField.d.ts +3 -3
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDatePicker.d.ts +12 -1
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDateRangeCalendar.d.ts +1 -1
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDateRangePicker.d.ts +2 -1
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDateRangefield.d.ts +2 -1
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDatefield.d.ts +2 -1
- package/dist/src/rb-components/ui/primitives/date-fields/CustomTimefield.d.ts +2 -1
- package/dist/src/rb-components/ui/primitives/date-fields/DateFieldTrigger.d.ts +13 -1
- package/dist/src/rb-components/ui/primitives/date-fields/DateShortcuts.d.ts +3 -2
- package/dist/src/rb-components/ui/primitives/date-fields/TimePickerPanel.d.ts +1 -1
- package/dist/src/router/Router.d.ts +2 -2
- package/dist/src/stories/Button.d.ts +1 -1
- package/dist/src/stories/Button.stories.d.ts +1 -1
- package/dist/src/stories/Header.d.ts +1 -1
- package/dist/src/stories/Header.stories.d.ts +1 -1
- package/dist/src/stories/rb/PillsTabs.stories.d.ts +1 -1
- package/dist/src/stories/rb/RbAutoCustomCompleteField.stories.d.ts +1 -1
- package/dist/src/stories/rb/RbIconButton.stories.d.ts +1 -1
- package/dist/src/stories/rb/RbTable.stories.d.ts +1 -1
- package/dist/src/stories/sidebar.stories.d.ts +1 -1
- package/dist/web-ui.js +25408 -6473
- package/dist/web-ui.umd.cjs +151 -25
- package/package.json +1 -1
- /package/dist/images/{checkReview.svg.svg → checkReview.svg} +0 -0
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* ----------------------------------------------------------------------------
|
|
4
|
-
* RB TOOLBAR ACTION BUTTON
|
|
5
|
-
* ----------------------------------------------------------------------------
|
|
6
|
-
*
|
|
7
|
-
* - variant="secondaryPrimary": botón con texto.
|
|
8
|
-
* - variant="icon": acción solo ícono.
|
|
9
|
-
*/
|
|
10
2
|
export type RbToolbarActionButtonVariant = "secondaryPrimary" | "icon";
|
|
11
3
|
export type RbToolbarActionButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
12
4
|
variant?: RbToolbarActionButtonVariant;
|
|
13
5
|
icon?: React.ReactNode;
|
|
14
6
|
loading?: boolean;
|
|
15
7
|
};
|
|
16
|
-
export declare function RbToolbarActionButton({ children, icon, loading, disabled, variant, className, type, ...props }: RbToolbarActionButtonProps):
|
|
8
|
+
export declare function RbToolbarActionButton({ children, icon, loading, disabled, variant, className, type, ...props }: RbToolbarActionButtonProps): React.JSX.Element;
|
|
17
9
|
export default RbToolbarActionButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type RbToolbarActionsProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
type RbToolbarActionsComponent = React.ForwardRefExoticComponent<RbToolbarActionsProps & React.RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
rbToolbarActions?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const RbToolbarActions: RbToolbarActionsComponent;
|
|
7
|
+
export default RbToolbarActions;
|
|
@@ -19,5 +19,5 @@ export type RbToolbarDateRangeFieldProps = {
|
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
className?: string;
|
|
21
21
|
};
|
|
22
|
-
export declare function RbToolbarDateRangeField({ label, value, onChange, initialValue, calendars, disabled, className, }: RbToolbarDateRangeFieldProps): import("react
|
|
22
|
+
export declare function RbToolbarDateRangeField({ label, value, onChange, initialValue, calendars, disabled, className, }: RbToolbarDateRangeFieldProps): import("react").JSX.Element;
|
|
23
23
|
export default RbToolbarDateRangeField;
|
|
@@ -14,6 +14,10 @@ import { RbToolbarSelectOption } from './RbToolbarSelectField';
|
|
|
14
14
|
*/
|
|
15
15
|
export type RbToolbarMultiSelectFieldProps = {
|
|
16
16
|
label?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Nombre accesible del control.
|
|
19
|
+
*/
|
|
20
|
+
ariaLabel?: string;
|
|
17
21
|
value: string[];
|
|
18
22
|
onChange: (value: string[]) => void;
|
|
19
23
|
options?: RbToolbarSelectOption[];
|
|
@@ -26,5 +30,5 @@ export type RbToolbarMultiSelectFieldProps = {
|
|
|
26
30
|
placeholder?: string;
|
|
27
31
|
};
|
|
28
32
|
};
|
|
29
|
-
export declare function RbToolbarMultiSelectField({ label, value, onChange, options, placeholder, className, disabled, search, }: RbToolbarMultiSelectFieldProps):
|
|
33
|
+
export declare function RbToolbarMultiSelectField({ label, ariaLabel, value, onChange, options, placeholder, className, disabled, search, }: RbToolbarMultiSelectFieldProps): React.JSX.Element;
|
|
30
34
|
export default RbToolbarMultiSelectField;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
* ----------------------------------------------------------------------------
|
|
4
|
-
* RB TOOLBAR SEARCH FIELD
|
|
5
|
-
* ----------------------------------------------------------------------------
|
|
6
|
-
*
|
|
7
|
-
* Input dark para toolbars de tabla.
|
|
8
|
-
*/
|
|
9
|
-
export type RbToolbarSearchFieldProps = {
|
|
10
|
-
label?: React.ReactNode;
|
|
2
|
+
export type RbToolbarSearchFieldProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange" | "className" | "disabled" | "placeholder"> & {
|
|
11
3
|
value: string;
|
|
12
4
|
onChange: (value: string) => void;
|
|
13
5
|
placeholder?: string;
|
|
14
6
|
className?: string;
|
|
15
7
|
disabled?: boolean;
|
|
8
|
+
ariaLabel?: string;
|
|
16
9
|
};
|
|
17
|
-
export declare function RbToolbarSearchField({
|
|
10
|
+
export declare function RbToolbarSearchField({ value, onChange, placeholder, className, disabled, ariaLabel, ...inputProps }: RbToolbarSearchFieldProps): React.JSX.Element;
|
|
18
11
|
export default RbToolbarSearchField;
|
|
@@ -20,6 +20,13 @@ export type RbToolbarSelectOption = {
|
|
|
20
20
|
};
|
|
21
21
|
export type RbToolbarSelectFieldProps = {
|
|
22
22
|
label?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Nombre accesible del control.
|
|
25
|
+
*
|
|
26
|
+
* Es recomendable entregarlo cuando label
|
|
27
|
+
* no existe o es un ReactNode complejo.
|
|
28
|
+
*/
|
|
29
|
+
ariaLabel?: string;
|
|
23
30
|
value: string;
|
|
24
31
|
onChange: (value: string) => void;
|
|
25
32
|
options?: RbToolbarSelectOption[];
|
|
@@ -32,5 +39,5 @@ export type RbToolbarSelectFieldProps = {
|
|
|
32
39
|
placeholder?: string;
|
|
33
40
|
};
|
|
34
41
|
};
|
|
35
|
-
export declare function RbToolbarSelectField({ label, value, onChange, options, placeholder, className, disabled, search, }: RbToolbarSelectFieldProps):
|
|
42
|
+
export declare function RbToolbarSelectField({ label, ariaLabel, value, onChange, options, placeholder, className, disabled, search, }: RbToolbarSelectFieldProps): React.JSX.Element;
|
|
36
43
|
export default RbToolbarSelectField;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { RbToolbarActionButton } from './RbToolbarActionButton';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
export { RbToolbarActionButton, } from './RbToolbarActionButton';
|
|
2
|
+
export { RbToolbarActions, } from './RbToolbarActions';
|
|
3
|
+
export { RbToolbarDateRangeField, } from './RbToolbarDateRangeField';
|
|
4
|
+
export { RbToolbarMultiSelectField, } from './RbToolbarMultiSelectField';
|
|
5
|
+
export { RbToolbarSearchField, } from './RbToolbarSearchField';
|
|
6
|
+
export { RbToolbarSelectField, } from './RbToolbarSelectField';
|
|
6
7
|
export type { RbToolbarActionButtonProps, RbToolbarActionButtonVariant, } from './RbToolbarActionButton';
|
|
8
|
+
export type { RbToolbarActionsProps, } from './RbToolbarActions';
|
|
7
9
|
export type { RbToolbarDateRangeFieldProps, RbToolbarDateRangeValue, } from './RbToolbarDateRangeField';
|
|
8
|
-
export type { RbToolbarMultiSelectFieldProps } from './RbToolbarMultiSelectField';
|
|
9
|
-
export type { RbToolbarSearchFieldProps } from './RbToolbarSearchField';
|
|
10
|
+
export type { RbToolbarMultiSelectFieldProps, } from './RbToolbarMultiSelectField';
|
|
11
|
+
export type { RbToolbarSearchFieldProps, } from './RbToolbarSearchField';
|
|
10
12
|
export type { RbToolbarSelectFieldProps, RbToolbarSelectOption, } from './RbToolbarSelectField';
|
|
@@ -156,6 +156,26 @@ export type RbRowsPerPageOption = number | {
|
|
|
156
156
|
value: number;
|
|
157
157
|
label: string;
|
|
158
158
|
};
|
|
159
|
+
/**
|
|
160
|
+
* Define cómo se resuelve la paginación de la tabla.
|
|
161
|
+
*
|
|
162
|
+
* client:
|
|
163
|
+
* La tabla recibe todos los rows y realiza el corte internamente.
|
|
164
|
+
*
|
|
165
|
+
* server:
|
|
166
|
+
* La tabla recibe solamente los rows de la página actual.
|
|
167
|
+
* El consumidor es responsable de consultar el backend.
|
|
168
|
+
*/
|
|
169
|
+
export type RbTablePaginationMode = "client" | "server";
|
|
170
|
+
/**
|
|
171
|
+
* Estado actual de paginación.
|
|
172
|
+
*
|
|
173
|
+
* page comienza desde 0.
|
|
174
|
+
*/
|
|
175
|
+
export type RbTablePaginationModel = {
|
|
176
|
+
page: number;
|
|
177
|
+
pageSize: number;
|
|
178
|
+
};
|
|
159
179
|
export type RbTableProps<Row extends RbTableBaseRow = RbTableBaseRow> = {
|
|
160
180
|
columns?: RbAnyTableColumn<Row>[];
|
|
161
181
|
rows?: Row[];
|
|
@@ -199,7 +219,35 @@ export type RbTableProps<Row extends RbTableBaseRow = RbTableBaseRow> = {
|
|
|
199
219
|
disableRowSelectionOnClick?: boolean;
|
|
200
220
|
pinnedColumns?: RbTablePinnedColumns;
|
|
201
221
|
initialState?: RbTableInitialState;
|
|
222
|
+
/**
|
|
223
|
+
* Activa el footer de paginación de la tabla.
|
|
224
|
+
*/
|
|
202
225
|
paginate?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Define si la paginación se resuelve internamente o mediante backend.
|
|
228
|
+
*
|
|
229
|
+
* Por defecto: "client".
|
|
230
|
+
*/
|
|
231
|
+
paginationMode?: RbTablePaginationMode;
|
|
232
|
+
/**
|
|
233
|
+
* Modelo de paginación controlado externamente.
|
|
234
|
+
*/
|
|
235
|
+
paginationModel?: RbTablePaginationModel;
|
|
236
|
+
/**
|
|
237
|
+
* Setter compatible con consumos que manejan directamente el estado.
|
|
238
|
+
*/
|
|
239
|
+
setPaginationModel?: (value: RbTablePaginationModel) => void;
|
|
240
|
+
/**
|
|
241
|
+
* Se ejecuta cuando cambia la página o el pageSize.
|
|
242
|
+
*/
|
|
243
|
+
onPaginationModelChange?: (value: RbTablePaginationModel) => void;
|
|
244
|
+
/**
|
|
245
|
+
* Cantidad total de registros disponibles.
|
|
246
|
+
*
|
|
247
|
+
* Se utiliza principalmente con paginationMode="server",
|
|
248
|
+
* ya que rows contiene solamente los registros de la página actual.
|
|
249
|
+
*/
|
|
250
|
+
rowCount?: number;
|
|
203
251
|
defaultRowsPerPage?: number;
|
|
204
252
|
rowsPerPageOptions?: RbRowsPerPageOption[];
|
|
205
253
|
resultsLabel?: string;
|
|
@@ -217,6 +265,4 @@ export type RbTableProps<Row extends RbTableBaseRow = RbTableBaseRow> = {
|
|
|
217
265
|
setContextMenu?: (value: any) => void;
|
|
218
266
|
options?: any[];
|
|
219
267
|
optionGroup?: any;
|
|
220
|
-
paginationModel?: any;
|
|
221
|
-
setPaginationModel?: (value: any) => void;
|
|
222
268
|
};
|
|
@@ -6,5 +6,5 @@ interface TopBarProps {
|
|
|
6
6
|
sidebarItems: SidebarItemsType;
|
|
7
7
|
onOpenMobile?: () => void;
|
|
8
8
|
}
|
|
9
|
-
declare const TopBar: ({ account, sidebarItems, onOpenMobile }: TopBarProps) => import("react
|
|
9
|
+
declare const TopBar: ({ account, sidebarItems, onOpenMobile }: TopBarProps) => import("react").JSX.Element;
|
|
10
10
|
export { TopBar };
|
|
@@ -3,5 +3,5 @@ type AccountType = DashboardProps["account"];
|
|
|
3
3
|
interface TopBarUserMenuProps {
|
|
4
4
|
account: AccountType;
|
|
5
5
|
}
|
|
6
|
-
declare const TopBarUserMenu: ({ account }: TopBarUserMenuProps) => import("react
|
|
6
|
+
declare const TopBarUserMenu: ({ account }: TopBarUserMenuProps) => import("react").JSX.Element;
|
|
7
7
|
export { TopBarUserMenu };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const ICON_PATHS: {
|
|
2
|
+
readonly arrow: string;
|
|
3
|
+
readonly arrowUp: string;
|
|
4
|
+
readonly toolInfo: string;
|
|
5
|
+
};
|
|
6
|
+
declare const SIZE_CLASSES: {
|
|
7
|
+
readonly s: "size-4";
|
|
8
|
+
readonly m: "size-5";
|
|
9
|
+
readonly l: "size-6";
|
|
10
|
+
};
|
|
11
|
+
export type TreeIconName = keyof typeof ICON_PATHS;
|
|
12
|
+
export type TreeIconSize = keyof typeof SIZE_CLASSES;
|
|
13
|
+
export interface TreeIconProps {
|
|
14
|
+
name: TreeIconName;
|
|
15
|
+
size?: TreeIconSize;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export default function TreeIcon({ name, size, className, }: TreeIconProps): import("react").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TreePanelNode, TreePanelNodeId, TreePanelProps } from './treePanel.types';
|
|
2
|
+
interface TreeNodeProps {
|
|
3
|
+
node: TreePanelNode;
|
|
4
|
+
depth?: number;
|
|
5
|
+
isRoot?: boolean;
|
|
6
|
+
selectedSet: ReadonlySet<TreePanelNodeId>;
|
|
7
|
+
expandedSet: ReadonlySet<TreePanelNodeId>;
|
|
8
|
+
onToggleSelection: (nodeId: TreePanelNodeId) => void;
|
|
9
|
+
onToggleExpanded: (nodeId: TreePanelNodeId) => void;
|
|
10
|
+
showCheckboxes?: boolean;
|
|
11
|
+
selectionDisabled?: boolean;
|
|
12
|
+
renderNodeContent?: TreePanelProps["renderNodeContent"];
|
|
13
|
+
expandLabel?: string;
|
|
14
|
+
collapseLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
export default function TreeNode({ node, depth, isRoot, selectedSet, expandedSet, onToggleSelection, onToggleExpanded, showCheckboxes, selectionDisabled, renderNodeContent, expandLabel, collapseLabel, }: TreeNodeProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TreePanelProps } from './treePanel.types';
|
|
3
|
+
export declare function TreePanel({ title, ariaLabel, items, selectedIds, defaultSelectedIds, onSelectionChange, expandedIds, defaultExpandedIds, defaultExpandAll, onExpandedChange, showCheckboxes, selectionDisabled, headerAction, headerTooltip, headerActionLabel, renderNodeContent, emptyText, fill, expandLabel, collapseLabel, className, headerClassName, bodyClassName, listClassName, }: TreePanelProps): React.JSX.Element;
|
|
4
|
+
export default TreePanel;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as TreePanel } from './TreePanel';
|
|
2
|
+
export type { TreePanelExpandedChangeDetails, TreePanelIdCollection, TreePanelNode, TreePanelNodeId, TreePanelProps, TreePanelRenderNodeParams, TreePanelSelectionChangeDetails, TreePanelSelectionState, } from './treePanel.types';
|
|
3
|
+
export { findNodeById, flattenTree, getExpandableNodeIds, getNodeSelectionState, getSelectableDescendantIds, getSelectableSubtreeIds, hasNodeChildren, isNodeSelectable, isNodeSelectionMutable, normalizeHierarchicalSelection, toggleExpandedNode, toggleNodeSelection, } from './treePanel.utils';
|
|
4
|
+
export type { GetSelectableSubtreeOptions, } from './treePanel.utils';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type TreePanelNodeId = string | number;
|
|
3
|
+
export type TreePanelIdCollection = readonly TreePanelNodeId[] | ReadonlySet<TreePanelNodeId>;
|
|
4
|
+
export interface TreePanelNode {
|
|
5
|
+
/**
|
|
6
|
+
* Identificador único del nodo.
|
|
7
|
+
*/
|
|
8
|
+
id: TreePanelNodeId;
|
|
9
|
+
/**
|
|
10
|
+
* Contenido principal del nodo.
|
|
11
|
+
*/
|
|
12
|
+
label: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Información secundaria opcional.
|
|
15
|
+
*/
|
|
16
|
+
description?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Nodos descendientes.
|
|
19
|
+
*/
|
|
20
|
+
children?: readonly TreePanelNode[];
|
|
21
|
+
/**
|
|
22
|
+
* Deshabilita la selección del nodo.
|
|
23
|
+
* La expansión sigue disponible.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Define si el nodo participa en la selección.
|
|
28
|
+
*/
|
|
29
|
+
selectable?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Permite ocultar únicamente el checkbox
|
|
32
|
+
* de este nodo.
|
|
33
|
+
*/
|
|
34
|
+
showCheckbox?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Clase aplicada a la fila del nodo.
|
|
37
|
+
*/
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TreePanelSelectionState {
|
|
41
|
+
checked: boolean;
|
|
42
|
+
indeterminate: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface TreePanelRenderNodeParams {
|
|
45
|
+
node: TreePanelNode;
|
|
46
|
+
depth: number;
|
|
47
|
+
expanded: boolean;
|
|
48
|
+
checked: boolean;
|
|
49
|
+
indeterminate: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface TreePanelSelectionChangeDetails {
|
|
52
|
+
nodeId: TreePanelNodeId;
|
|
53
|
+
node: TreePanelNode | null;
|
|
54
|
+
}
|
|
55
|
+
export interface TreePanelExpandedChangeDetails {
|
|
56
|
+
nodeId: TreePanelNodeId;
|
|
57
|
+
node: TreePanelNode | null;
|
|
58
|
+
}
|
|
59
|
+
export interface TreePanelProps {
|
|
60
|
+
title: React.ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Nombre accesible del árbol.
|
|
63
|
+
*
|
|
64
|
+
* Es recomendable entregarlo cuando title
|
|
65
|
+
* no sea un string.
|
|
66
|
+
*/
|
|
67
|
+
ariaLabel?: string;
|
|
68
|
+
items?: readonly TreePanelNode[];
|
|
69
|
+
selectedIds?: TreePanelIdCollection;
|
|
70
|
+
defaultSelectedIds?: TreePanelIdCollection;
|
|
71
|
+
onSelectionChange?: (selectedIds: TreePanelNodeId[], details: TreePanelSelectionChangeDetails) => void;
|
|
72
|
+
expandedIds?: TreePanelIdCollection;
|
|
73
|
+
defaultExpandedIds?: TreePanelIdCollection;
|
|
74
|
+
defaultExpandAll?: boolean;
|
|
75
|
+
onExpandedChange?: (expandedIds: TreePanelNodeId[], details: TreePanelExpandedChangeDetails) => void;
|
|
76
|
+
showCheckboxes?: boolean;
|
|
77
|
+
selectionDisabled?: boolean;
|
|
78
|
+
headerAction?: React.ReactNode;
|
|
79
|
+
headerTooltip?: React.ReactNode;
|
|
80
|
+
headerActionLabel?: string;
|
|
81
|
+
renderNodeContent?: (params: TreePanelRenderNodeParams) => React.ReactNode;
|
|
82
|
+
emptyText?: React.ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* Hace que el panel ocupe la altura disponible
|
|
85
|
+
* de su contenedor.
|
|
86
|
+
*/
|
|
87
|
+
fill?: boolean;
|
|
88
|
+
expandLabel?: string;
|
|
89
|
+
collapseLabel?: string;
|
|
90
|
+
className?: string;
|
|
91
|
+
headerClassName?: string;
|
|
92
|
+
bodyClassName?: string;
|
|
93
|
+
listClassName?: string;
|
|
94
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TreePanelIdCollection, TreePanelNode, TreePanelNodeId, TreePanelSelectionState } from './treePanel.types';
|
|
2
|
+
export declare function isNodeSelectable(node?: TreePanelNode | null): boolean;
|
|
3
|
+
export declare function isNodeSelectionMutable(node?: TreePanelNode | null): boolean;
|
|
4
|
+
export declare function hasNodeChildren(node?: TreePanelNode | null): boolean;
|
|
5
|
+
export declare function flattenTree(items?: readonly TreePanelNode[]): TreePanelNode[];
|
|
6
|
+
export declare function findNodeById(items: readonly TreePanelNode[] | undefined, nodeId: TreePanelNodeId): TreePanelNode | null;
|
|
7
|
+
export declare function getExpandableNodeIds(items?: readonly TreePanelNode[]): TreePanelNodeId[];
|
|
8
|
+
export interface GetSelectableSubtreeOptions {
|
|
9
|
+
mutableOnly?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function getSelectableSubtreeIds(node?: TreePanelNode | null, { mutableOnly }?: GetSelectableSubtreeOptions): TreePanelNodeId[];
|
|
12
|
+
export declare function getSelectableDescendantIds(node?: TreePanelNode | null, { mutableOnly }?: GetSelectableSubtreeOptions): TreePanelNodeId[];
|
|
13
|
+
/**
|
|
14
|
+
* Mantiene la selección consistente entre padres e hijos.
|
|
15
|
+
*
|
|
16
|
+
* Si todos los descendientes seleccionables están seleccionados,
|
|
17
|
+
* el padre también se considera seleccionado.
|
|
18
|
+
*
|
|
19
|
+
* Si solo una parte está seleccionada, el padre se mostrará
|
|
20
|
+
* como indeterminate, pero ese estado no se guarda.
|
|
21
|
+
*/
|
|
22
|
+
export declare function normalizeHierarchicalSelection(items?: readonly TreePanelNode[], selectedIds?: TreePanelIdCollection): TreePanelNodeId[];
|
|
23
|
+
export declare function getNodeSelectionState(node: TreePanelNode | null | undefined, selectedIds?: TreePanelIdCollection): TreePanelSelectionState;
|
|
24
|
+
export declare function toggleNodeSelection(items: readonly TreePanelNode[] | undefined, selectedIds: TreePanelIdCollection | undefined, nodeId: TreePanelNodeId): TreePanelNodeId[];
|
|
25
|
+
export declare function toggleExpandedNode(expandedIds: TreePanelIdCollection | undefined, nodeId: TreePanelNodeId): TreePanelNodeId[];
|
|
@@ -5,33 +5,32 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Punto público de entrada de la librería UI.
|
|
7
7
|
*
|
|
8
|
-
* Las pantallas deberían importar componentes reutilizables
|
|
9
|
-
* para evitar acoplarse a la estructura interna
|
|
10
|
-
*
|
|
11
|
-
* Ejemplo:
|
|
12
|
-
*
|
|
13
|
-
* import { Button, Card, Input } from "@/rb-components/ui";
|
|
14
|
-
*
|
|
8
|
+
* Las pantallas deberían importar componentes reutilizables
|
|
9
|
+
* desde aquí para evitar acoplarse a la estructura interna.
|
|
15
10
|
* =======================================================
|
|
16
11
|
*/
|
|
17
12
|
export { cn } from './utils/cn';
|
|
18
13
|
export { Button } from './primitives/Button';
|
|
19
|
-
export type { ButtonProps } from './primitives/Button';
|
|
20
|
-
export { AutoCustomCompleteField } from './primitives/AutoCustomCompleteField';
|
|
14
|
+
export type { ButtonProps, } from './primitives/Button';
|
|
15
|
+
export { AutoCustomCompleteField, } from './primitives/AutoCustomCompleteField';
|
|
21
16
|
export type { AutoValueItem, CustomAutoCompleteFieldProps, } from './primitives/AutoCustomCompleteField';
|
|
22
17
|
export { CustomDatefield, CustomDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, } from './primitives/date-fields';
|
|
23
18
|
export type { CustomDatefieldProps, CustomDatePickerProps, CustomTimefieldProps, CustomDateRangefieldProps, CustomDateRangePickerProps, CustomDateRangeCalendarProps, } from './primitives/date-fields';
|
|
24
19
|
export { RbInlineChipField, CalendarChipIcon, ClockChipIcon, } from './primitives/RbInlineChipField';
|
|
25
20
|
export type { RbInlineChipFieldProps, RbInlineChipFieldAction, } from './primitives/RbInlineChipField';
|
|
26
|
-
export { RbContextMenu } from './primitives/RbContextMenu';
|
|
21
|
+
export { RbContextMenu, } from './primitives/RbContextMenu';
|
|
27
22
|
export type { RbContextMenuAlign, RbContextMenuItem, RbContextMenuPosition, RbContextMenuProps, RbContextMenuVariant, } from './primitives/RbContextMenu';
|
|
28
23
|
export { Card, CardHeader, CardTitle, CardContent, CardFooter, } from './primitives/Card';
|
|
29
|
-
export type { CardProps } from './primitives/Card';
|
|
30
|
-
export { IconButton } from './primitives/IconButton';
|
|
31
|
-
export type { IconButtonProps } from './primitives/IconButton';
|
|
32
|
-
export { Input } from './primitives/Input';
|
|
33
|
-
export type { InputProps } from './primitives/Input';
|
|
34
|
-
export {
|
|
35
|
-
export type {
|
|
36
|
-
export {
|
|
37
|
-
export type {
|
|
24
|
+
export type { CardProps, } from './primitives/Card';
|
|
25
|
+
export { IconButton, } from './primitives/IconButton';
|
|
26
|
+
export type { IconButtonProps, } from './primitives/IconButton';
|
|
27
|
+
export { Input, } from './primitives/Input';
|
|
28
|
+
export type { InputProps, } from './primitives/Input';
|
|
29
|
+
export { Checkbox, } from './primitives/Checkbox';
|
|
30
|
+
export type { CheckboxProps, CheckboxSize, } from './primitives/Checkbox';
|
|
31
|
+
export { Radio, } from './primitives/Radio';
|
|
32
|
+
export type { RadioProps, } from './primitives/Radio';
|
|
33
|
+
export { default as Portal, } from './overlays/Portal';
|
|
34
|
+
export type { PortalProps, } from './overlays/Portal';
|
|
35
|
+
export { default as Tooltip, } from './overlays/Tooltip';
|
|
36
|
+
export type { TooltipProps, } from './overlays/Tooltip';
|
|
@@ -10,5 +10,5 @@ export interface TooltipProps {
|
|
|
10
10
|
openDelay?: number;
|
|
11
11
|
closeDelay?: number;
|
|
12
12
|
}
|
|
13
|
-
export default function Tooltip({ content, children, placement, multiline, disabled, className, openDelay, closeDelay, }: TooltipProps):
|
|
13
|
+
export default function Tooltip({ content, children, placement, multiline, disabled, className, openDelay, closeDelay, }: TooltipProps): React.JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,20 +1,77 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
1
2
|
export interface AutoValueItem {
|
|
2
3
|
value: string;
|
|
3
4
|
label: string;
|
|
4
5
|
sublabel?: string;
|
|
5
6
|
disabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Permite destacar visualmente una opción.
|
|
9
|
+
*
|
|
10
|
+
* En selección múltiple también modifica
|
|
11
|
+
* la apariencia del chip.
|
|
12
|
+
*/
|
|
6
13
|
highlight?: {
|
|
7
14
|
active?: boolean;
|
|
8
15
|
tooltip?: string;
|
|
9
16
|
};
|
|
10
17
|
}
|
|
11
|
-
export
|
|
18
|
+
export type AutoCompleteSearchMode = "local" | "external";
|
|
19
|
+
export interface AutoCompleteSearchConfig {
|
|
20
|
+
/**
|
|
21
|
+
* Texto actual del buscador.
|
|
22
|
+
*/
|
|
23
|
+
value: string;
|
|
24
|
+
/**
|
|
25
|
+
* Se ejecuta cada vez que cambia el texto.
|
|
26
|
+
*/
|
|
27
|
+
onChange: (value: string) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Placeholder del input de búsqueda.
|
|
30
|
+
*/
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Contenido mostrado cuando no hay coincidencias.
|
|
34
|
+
*/
|
|
35
|
+
emptyText?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* local:
|
|
38
|
+
* El componente filtra automáticamente values.
|
|
39
|
+
*
|
|
40
|
+
* external:
|
|
41
|
+
* El consumidor consulta el endpoint y actualiza
|
|
42
|
+
* values. El componente no vuelve a filtrarlas.
|
|
43
|
+
*/
|
|
44
|
+
mode?: AutoCompleteSearchMode;
|
|
45
|
+
}
|
|
46
|
+
interface CustomAutoCompleteBaseProps {
|
|
47
|
+
id?: string;
|
|
12
48
|
label: string;
|
|
13
49
|
placeholder: string;
|
|
14
50
|
values: AutoValueItem[];
|
|
51
|
+
white: boolean;
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
error?: boolean;
|
|
54
|
+
helperText?: ReactNode;
|
|
55
|
+
emptyText?: ReactNode;
|
|
56
|
+
clearLabel?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Habilita el buscador dentro del listado.
|
|
59
|
+
*/
|
|
60
|
+
search?: AutoCompleteSearchConfig;
|
|
61
|
+
}
|
|
62
|
+
interface CustomAutoCompleteSingleProps extends CustomAutoCompleteBaseProps {
|
|
63
|
+
selectionMode: "single";
|
|
64
|
+
value: string;
|
|
65
|
+
setValue: (newValue: string) => void;
|
|
66
|
+
}
|
|
67
|
+
interface CustomAutoCompleteMultipleProps extends CustomAutoCompleteBaseProps {
|
|
68
|
+
/**
|
|
69
|
+
* Multiple es el modo por defecto.
|
|
70
|
+
*/
|
|
71
|
+
selectionMode?: "multiple";
|
|
15
72
|
value: string[];
|
|
16
73
|
setValue: (newValue: string[]) => void;
|
|
17
|
-
white: boolean;
|
|
18
74
|
}
|
|
19
|
-
|
|
75
|
+
export type CustomAutoCompleteFieldProps = CustomAutoCompleteSingleProps | CustomAutoCompleteMultipleProps;
|
|
76
|
+
declare const AutoCustomCompleteField: (props: CustomAutoCompleteFieldProps) => React.JSX.Element;
|
|
20
77
|
export { AutoCustomCompleteField };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
type ButtonVariant = "primary" | "primaryDark" | "secondary" | "secondaryPrimary" | "secondaryPrimaryDark" | "ghost";
|
|
3
|
-
type ButtonSize = "s" | "m";
|
|
2
|
+
export type ButtonVariant = "primary" | "primaryDark" | "secondary" | "secondaryPrimary" | "secondaryPrimaryDark" | "ghost";
|
|
3
|
+
export type ButtonSize = "s" | "m";
|
|
4
4
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
variant?: ButtonVariant;
|
|
6
6
|
size?: ButtonSize;
|
|
@@ -9,4 +9,3 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
9
9
|
rightIcon?: React.ReactNode;
|
|
10
10
|
}
|
|
11
11
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
-
export {};
|
|
@@ -3,9 +3,9 @@ type CardVariant = "default" | "flat";
|
|
|
3
3
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
variant?: CardVariant;
|
|
5
5
|
}
|
|
6
|
-
export declare function Card({ className, variant, ...props }: CardProps):
|
|
7
|
-
export declare function CardHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
8
|
-
export declare function CardTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>):
|
|
9
|
-
export declare function CardContent({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
10
|
-
export declare function CardFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
6
|
+
export declare function Card({ className, variant, ...props }: CardProps): React.JSX.Element;
|
|
7
|
+
export declare function CardHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
8
|
+
export declare function CardTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.JSX.Element;
|
|
9
|
+
export declare function CardContent({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
10
|
+
export declare function CardFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type CheckboxSize = "s" | "m";
|
|
3
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
size?: CheckboxSize;
|
|
6
|
+
indeterminate?: boolean;
|
|
7
|
+
containerClassName?: string;
|
|
8
|
+
labelClassName?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
type InputLabelVariant = "stacked" | "notched";
|
|
3
|
-
type BaseInputProps = {
|
|
2
|
+
export type InputLabelVariant = "stacked" | "notched";
|
|
3
|
+
export type BaseInputProps = {
|
|
4
4
|
containerClassName?: string;
|
|
5
5
|
label?: React.ReactNode;
|
|
6
6
|
labelVariant?: InputLabelVariant;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type RadioSize = "s" | "m";
|
|
3
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "children" | "className" | "size"> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
size?: RadioSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
inputClassName?: string;
|
|
8
|
+
controlClassName?: string;
|
|
9
|
+
labelClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -36,5 +36,5 @@ export type RbContextMenuProps = {
|
|
|
36
36
|
closeOnResize?: boolean;
|
|
37
37
|
onClose: () => void;
|
|
38
38
|
};
|
|
39
|
-
export declare function RbContextMenu({ open, position, x, y, align, items, variant, ariaLabel, emptyText, className, itemClassName, closeOnClickOutside, closeOnScroll, closeOnResize, onClose, }: RbContextMenuProps):
|
|
39
|
+
export declare function RbContextMenu({ open, position, x, y, align, items, variant, ariaLabel, emptyText, className, itemClassName, closeOnClickOutside, closeOnScroll, closeOnResize, onClose, }: RbContextMenuProps): React.JSX.Element | null;
|
|
40
40
|
export default RbContextMenu;
|
|
@@ -43,7 +43,7 @@ export type RbInlineChipFieldProps = {
|
|
|
43
43
|
inputClassName?: string;
|
|
44
44
|
ariaLabel?: string;
|
|
45
45
|
};
|
|
46
|
-
export declare function CalendarChipIcon():
|
|
47
|
-
export declare function ClockChipIcon():
|
|
48
|
-
export declare function RbInlineChipField({ value, placeholder, type, variant, dateSeparator, editable, disabled, icon, showIcon, actions, showMenu, menuVariant, onChange, onClick, className, inputClassName, ariaLabel, }: RbInlineChipFieldProps):
|
|
46
|
+
export declare function CalendarChipIcon(): React.JSX.Element;
|
|
47
|
+
export declare function ClockChipIcon(): React.JSX.Element;
|
|
48
|
+
export declare function RbInlineChipField({ value, placeholder, type, variant, dateSeparator, editable, disabled, icon, showIcon, actions, showMenu, menuVariant, onChange, onClick, className, inputClassName, ariaLabel, }: RbInlineChipFieldProps): React.JSX.Element;
|
|
49
49
|
export default RbInlineChipField;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { Dayjs } from 'dayjs';
|
|
2
3
|
export interface CustomDatePickerProps {
|
|
3
4
|
label: string;
|
|
@@ -7,6 +8,16 @@ export interface CustomDatePickerProps {
|
|
|
7
8
|
disabled: boolean;
|
|
8
9
|
white: boolean;
|
|
9
10
|
fullWidth: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Activa el estado visual y accesible de error.
|
|
14
|
+
*/
|
|
15
|
+
error?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Texto de ayuda o validación mostrado
|
|
18
|
+
* bajo el campo.
|
|
19
|
+
*/
|
|
20
|
+
helperText?: React.ReactNode;
|
|
10
21
|
}
|
|
11
|
-
declare const CustomDatePicker: ({ label, initialValue, value, setValue, disabled, white, fullWidth, }: CustomDatePickerProps) =>
|
|
22
|
+
declare const CustomDatePicker: ({ label, initialValue, value, setValue, disabled, white, fullWidth, placeholder, error, helperText, }: CustomDatePickerProps) => React.JSX.Element;
|
|
12
23
|
export { CustomDatePicker };
|
|
@@ -7,5 +7,5 @@ export interface CustomDateRangeCalendarProps {
|
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
white: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const CustomDateRangeCalendar: ({ initialValue, value, setValue, calendars, disabled, white, }: CustomDateRangeCalendarProps) => import("react
|
|
10
|
+
declare const CustomDateRangeCalendar: ({ initialValue, value, setValue, calendars, disabled, white, }: CustomDateRangeCalendarProps) => import("react").JSX.Element;
|
|
11
11
|
export { CustomDateRangeCalendar };
|