@producteca/producteca-ui-kit 1.61.3 → 1.63.0-beta.1
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/components/icons/checkIcon/checkIcon.d.js +1 -0
- package/dist/components/icons/checkIcon/checkIcon.d.ts +5 -0
- package/dist/components/icons/emptyState/emptyStateIcon.d.js +1 -0
- package/dist/components/icons/emptyState/emptyStateIcon.d.ts +5 -0
- package/dist/components/icons/errorState/errorStateIcon.d.js +1 -0
- package/dist/components/icons/errorState/errorStateIcon.d.ts +5 -0
- package/dist/components/icons/index.d.js +5 -1
- package/dist/components/icons/index.d.ts +4 -0
- package/dist/components/icons/maintenance/maintenanceIcon.d.js +1 -0
- package/dist/components/icons/maintenance/maintenanceIcon.d.ts +5 -0
- package/dist/components/index.d.js +2 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/checkboxInput/checkboxInput.types.d.ts +1 -1
- package/dist/components/inputs/switchInput/switchInput.types.d.ts +2 -2
- package/dist/components/inputs/toggleInput.utils.d.ts +1 -1
- package/dist/components/menu/menuAction/menuAction.types.d.ts +2 -0
- package/dist/components/patterns/asyncContent/asyncContent.d.ts +1 -1
- package/dist/components/patterns/asyncContent/asyncContent.examples.d.js +1 -0
- package/dist/components/patterns/asyncContent/asyncContent.examples.d.ts +2 -0
- package/dist/components/patterns/asyncContent/asyncContent.types.d.ts +1 -1
- package/dist/components/patterns/asyncContent/views/emptyView.d.js +1 -0
- package/dist/components/patterns/asyncContent/views/emptyView.d.ts +9 -0
- package/dist/components/patterns/asyncContent/views/errorView.d.js +1 -0
- package/dist/components/patterns/asyncContent/views/errorView.d.ts +9 -0
- package/dist/components/patterns/asyncContent/views/index.d.js +3 -0
- package/dist/components/patterns/asyncContent/views/index.d.ts +3 -0
- package/dist/components/patterns/asyncContent/views/loadingView.d.js +1 -0
- package/dist/components/patterns/asyncContent/views/loadingView.d.ts +3 -0
- package/dist/components/patterns/emptyState/emptyState.d.ts +1 -7
- package/dist/components/patterns/emptyState/emptyState.types.d.js +1 -0
- package/dist/components/patterns/emptyState/emptyState.types.d.ts +8 -0
- package/dist/components/patterns/index.d.js +2 -1
- package/dist/components/patterns/index.d.ts +1 -0
- package/dist/components/patterns/maintenance/maintenance.d.js +1 -0
- package/dist/components/patterns/maintenance/maintenance.d.ts +5 -0
- package/dist/components/patterns/maintenance/maintenance.types.d.js +1 -0
- package/dist/components/patterns/maintenance/maintenance.types.d.ts +5 -0
- package/dist/components/table/index.d.js +3 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/table/index.d.js +1 -0
- package/dist/components/table/table/index.d.ts +13 -0
- package/dist/components/table/table/table.d.js +1 -0
- package/dist/components/table/table/table.d.ts +3 -0
- package/dist/components/table/table/table.examples.d.js +1 -0
- package/dist/components/table/table/table.examples.d.ts +12 -0
- package/dist/components/table/table/table.types.d.js +1 -0
- package/dist/components/table/table/table.types.d.ts +14 -0
- package/dist/components/table/table/tableContext.d.js +1 -0
- package/dist/components/table/table/tableContext.d.ts +3 -0
- package/dist/components/table/tableBody/index.d.js +1 -0
- package/dist/components/table/tableBody/index.d.ts +2 -0
- package/dist/components/table/tableBody/tableBody.d.js +1 -0
- package/dist/components/table/tableBody/tableBody.d.ts +3 -0
- package/dist/components/table/tableBody/tableBody.types.d.js +1 -0
- package/dist/components/table/tableBody/tableBody.types.d.ts +4 -0
- package/dist/components/table/tableHeader/index.d.js +1 -0
- package/dist/components/table/tableHeader/index.d.ts +2 -0
- package/dist/components/table/tableHeader/tableHeader.d.js +1 -0
- package/dist/components/table/tableHeader/tableHeader.d.ts +3 -0
- package/dist/components/table/tableHeader/tableHeader.types.d.js +1 -0
- package/dist/components/table/tableHeader/tableHeader.types.d.ts +5 -0
- package/dist/locales/description.d.ts +4 -0
- package/dist/locales/es.d.ts +23 -0
- package/dist/playground/ComponentDemos.d.ts +1 -0
- package/dist/producteca-ui-kit.es.js +48 -37
- package/dist/producteca-ui-kit.umd.js +9 -9
- package/dist/style.css +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,4 +4,8 @@ export * from './fileIcon/fileIcon';
|
|
|
4
4
|
export * from './priceDownIcon/priceDownIcon';
|
|
5
5
|
export * from './priceCloseIcon/priceCloseIcon';
|
|
6
6
|
export * from './trashIcon/trashIcon';
|
|
7
|
-
export * from './customIcon/customIcon';
|
|
7
|
+
export * from './customIcon/customIcon';
|
|
8
|
+
export * from './emptyState/emptyStateIcon';
|
|
9
|
+
export * from './errorState/errorStateIcon';
|
|
10
|
+
export * from './checkIcon/checkIcon';
|
|
11
|
+
export * from './maintenance/maintenanceIcon';
|
|
@@ -5,3 +5,7 @@ export * from './priceDownIcon/priceDownIcon';
|
|
|
5
5
|
export * from './priceCloseIcon/priceCloseIcon';
|
|
6
6
|
export * from './trashIcon/trashIcon';
|
|
7
7
|
export * from './customIcon/customIcon';
|
|
8
|
+
export * from './emptyState/emptyStateIcon';
|
|
9
|
+
export * from './errorState/errorStateIcon';
|
|
10
|
+
export * from './checkIcon/checkIcon';
|
|
11
|
+
export * from './maintenance/maintenanceIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import { ReduxFormInput } from '../../../hooks/useReduxFormField';
|
|
|
4
4
|
export interface SwitchItem {
|
|
5
5
|
id?: string;
|
|
6
6
|
name?: string;
|
|
7
|
-
label
|
|
7
|
+
label?: string;
|
|
8
8
|
value?: any;
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
@@ -20,6 +20,6 @@ export interface SwitchInputProps {
|
|
|
20
20
|
export type SwitchInputSingleProps = Omit<SwitchInputProps, 'items'> & {
|
|
21
21
|
id?: string;
|
|
22
22
|
checked?: boolean;
|
|
23
|
-
label
|
|
23
|
+
label?: string;
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MenuItemProps } from '../menuItem/menuItem.types';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { ButtonProps } from '../../button/button';
|
|
4
|
+
import { SxProps, Theme } from '@mui/material';
|
|
4
5
|
|
|
5
6
|
export interface MenuActionProps {
|
|
6
7
|
items: MenuItemProps[];
|
|
@@ -9,4 +10,5 @@ export interface MenuActionProps {
|
|
|
9
10
|
icon?: React.ReactNode;
|
|
10
11
|
size?: ButtonProps['size'];
|
|
11
12
|
disableRipple?: boolean;
|
|
13
|
+
iconButtonSx?: SxProps<Theme>;
|
|
12
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AsyncContentProps, AsyncContentStatus } from './asyncContent.types';
|
|
3
3
|
|
|
4
|
-
export declare const AsyncContent: React.MemoExoticComponent<({ status, children,
|
|
4
|
+
export declare const AsyncContent: React.MemoExoticComponent<({ status, children, onErrorAction, onEmptyAction, emptyActionText, errorActionText, errorText, emptyText, }: AsyncContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export type { AsyncContentProps, AsyncContentStatus };
|
|
6
6
|
export default AsyncContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,12 +2,12 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export type AsyncContentStatus = 'loading' | 'error' | 'empty' | 'success';
|
|
4
4
|
export interface AsyncContentProps {
|
|
5
|
-
status: AsyncContentStatus;
|
|
6
5
|
children: ReactNode;
|
|
7
6
|
errorText?: string;
|
|
8
7
|
emptyText?: string;
|
|
9
8
|
errorActionText?: string;
|
|
10
9
|
emptyActionText?: string;
|
|
10
|
+
status: AsyncContentStatus;
|
|
11
11
|
onErrorAction?: () => void;
|
|
12
12
|
onEmptyAction?: () => void;
|
|
13
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface EmptyViewProps {
|
|
4
|
+
emptyText?: string;
|
|
5
|
+
emptyActionText?: string;
|
|
6
|
+
onEmptyAction?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const EmptyView: React.MemoExoticComponent<({ emptyText, emptyActionText, onEmptyAction, }: EmptyViewProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ErrorViewProps {
|
|
4
|
+
errorText?: string;
|
|
5
|
+
errorActionText?: string;
|
|
6
|
+
onErrorAction?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const ErrorView: React.MemoExoticComponent<({ errorText, errorActionText, onErrorAction, }: ErrorViewProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EmptyStateProps } from './emptyState.types';
|
|
2
2
|
|
|
3
|
-
interface EmptyStateProps {
|
|
4
|
-
onActionClick?: () => void;
|
|
5
|
-
actionText?: string;
|
|
6
|
-
text?: string;
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
}
|
|
9
3
|
export declare const EmptyState: ({ onActionClick, icon, actionText, text, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
4
|
export type { EmptyStateProps };
|
|
11
5
|
export default EmptyState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TableBody } from '../tableBody';
|
|
2
|
+
import { TableHeader } from '../tableHeader';
|
|
3
|
+
import { Table as BaseTable } from './table';
|
|
4
|
+
|
|
5
|
+
type TableCompound = typeof BaseTable & {
|
|
6
|
+
Header: typeof TableHeader;
|
|
7
|
+
Body: typeof TableBody;
|
|
8
|
+
};
|
|
9
|
+
declare const Table: TableCompound;
|
|
10
|
+
export { Table };
|
|
11
|
+
export type { TableBodyProps } from '../tableBody';
|
|
12
|
+
export type { TableHeaderProps } from '../tableHeader';
|
|
13
|
+
export type { TableColumn, TableProps } from './table.types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface SampleRow {
|
|
2
|
+
id: number;
|
|
3
|
+
active: boolean;
|
|
4
|
+
icon: string;
|
|
5
|
+
columnA: string;
|
|
6
|
+
columnB: string;
|
|
7
|
+
columnC: string;
|
|
8
|
+
columnD: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const sampleData: SampleRow[];
|
|
11
|
+
export declare const TableDefaultExample: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export interface TableColumn<T> {
|
|
5
|
+
key: string;
|
|
6
|
+
header?: string;
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
render?: (row: T, index: number) => React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface TableProps {
|
|
11
|
+
className?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
columns: TableColumn<any>[];
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableBody } from './tableBody';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableHeader } from './tableHeader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -42,4 +42,8 @@ export declare const conditionalOperatorExample = "\n## Uso del componente\n\nEl
|
|
|
42
42
|
export declare const emptyStateExample = "\n## Uso del componente\n\nEl componente `EmptyState` muestra un estado vac\u00EDo con mensaje, \u00EDcono opcional y acci\u00F3n (por ejemplo \"Agregar\").\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<EmptyState\n message=\"No hay resultados\"\n actionLabel=\"Agregar\"\n onAction={() => openCreate()}\n/>\n```\n";
|
|
43
43
|
export declare const asyncContentExample = "\n## Uso del componente\n\nEl componente `AsyncContent` maneja los estados de una operaci\u00F3n as\u00EDncrona: `loading`, `error`, `empty` y `success`. Muestra el contenido solo en `success`.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<AsyncContent\n status={status}\n errorText=\"Ocurri\u00F3 un error\"\n emptyText=\"No hay datos\"\n onRetry={() => refetch()}\n>\n <div>Contenido cuando status === 'success'</div>\n</AsyncContent>\n```\n";
|
|
44
44
|
export declare const tooltipExample = "\n## Uso del componente\n\nLos componentes de tooltip (`WithTooltip`, `WithOverflowTooltip`) muestran un mensaje al hacer hover o click. `WithOverflowTooltip` solo muestra el tooltip cuando el contenido se desborda.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<WithTooltip content=\"Texto del tooltip\" placement=\"top\">\n <span>Hover sobre m\u00ED</span>\n</WithTooltip>\n```\n\n### Solo si hay overflow:\n\n```tsx\n<WithOverflowTooltip maxWidth=\"200px\">\n <span>Texto que puede truncarse...</span>\n</WithOverflowTooltip>\n```\n";
|
|
45
|
+
export declare const tableHeaderExample = "\n## Uso del componente\n\n`Table.Header` renderiza el encabezado de la tabla. Lee las columnas del contexto provisto por `Table`. Opcionalmente acepta `columns` como prop para sobrescribir el contexto.\n\n### Usando el contexto de Table (recomendado):\n\n```tsx\nconst columns: TableColumn<MyRow>[] = [\n { key: 'name', header: 'Nombre' },\n { key: 'status', header: 'Estado', sx: { textAlign: 'center' } },\n { key: 'price', header: 'Precio', sx: { textAlign: 'right', width: 100 } },\n]\n\n<Table columns={columns}>\n <Table.Header />\n</Table>\n```\n\n### Pasando columns directamente como prop:\n\n```tsx\n<Table columns={columns}>\n <Table.Header columns={customColumns} />\n</Table>\n```\n";
|
|
46
|
+
export declare const tableBodyExample = "\n## Uso del componente\n\n`Table.Body` renderiza las filas de datos. Lee las columnas del contexto provisto por `Table`. Cuando `data` est\u00E1 vac\u00EDo muestra un `EmptyState` con `emptyMessage`.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Table columns={columns}>\n <Table.Body data={rows} />\n</Table>\n```\n\n### Estado vac\u00EDo personalizado:\n\n```tsx\n<Table columns={columns}>\n <Table.Body\n data={[]}\n emptyMessage=\"No encontramos resultados para tu b\u00FAsqueda\"\n />\n</Table>\n```\n";
|
|
47
|
+
export declare const tableExample = "\n## Uso del componente\n\nEl componente `Table` es un contenedor compuesto. Recibe `columns` y los distribuye por contexto a `Table.Header` y `Table.Body`, accesibles por dot-notation.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Table columns={columns}>\n <Table.Header />\n <Table.Body data={rows} />\n</Table>\n```\n\n### Definici\u00F3n de columnas:\n\n```tsx\nconst columns: TableColumn<MyRow>[] = [\n { key: 'name', header: 'Nombre' },\n { key: 'status', header: 'Estado', sx: { textAlign: 'center' } },\n {\n key: 'actions',\n header: 'Acciones',\n sx: { width: 80 },\n render: (row) => <Button label=\"Editar\" onClick={() => edit(row)} />,\n },\n]\n```\n";
|
|
45
48
|
export declare const spinnerExample = "\n## Uso del componente\n\nEl componente `Spinner` muestra un indicador de carga. Acepta `size` (`xs`, `sm`, `md`, `lg`).\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Spinner size=\"md\" />\n```\n";
|
|
49
|
+
export declare const maintenanceExample = "\n## Uso del componente\n\nEl componente `Maintenance` muestra una vista de p\u00E1gina completa para indicar que el sistema est\u00E1 en mantenimiento. Acepta `title`, `description` y `subtitle` opcionales con valores por defecto en espa\u00F1ol.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Maintenance />\n```\n\n### Con contenido personalizado:\n\n```tsx\n<Maintenance\n title=\"Estamos mejorando\"\n description=\"Estamos haciendo algunos ajustes para brindarte una mejor experiencia.\"\n subtitle=\"Volvemos en unos minutos.\"\n/>\n```\n";
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -222,6 +222,18 @@ declare const _default: {
|
|
|
222
222
|
spinner: {
|
|
223
223
|
example: string;
|
|
224
224
|
};
|
|
225
|
+
table: {
|
|
226
|
+
example: string;
|
|
227
|
+
};
|
|
228
|
+
tableHeader: {
|
|
229
|
+
example: string;
|
|
230
|
+
};
|
|
231
|
+
tableBody: {
|
|
232
|
+
example: string;
|
|
233
|
+
};
|
|
234
|
+
maintenance: {
|
|
235
|
+
example: string;
|
|
236
|
+
};
|
|
225
237
|
};
|
|
226
238
|
headerSection: {
|
|
227
239
|
edit: string;
|
|
@@ -475,6 +487,17 @@ declare const _default: {
|
|
|
475
487
|
or: string;
|
|
476
488
|
and: string;
|
|
477
489
|
};
|
|
490
|
+
maintenance: {
|
|
491
|
+
title: string;
|
|
492
|
+
description: string;
|
|
493
|
+
subtitle: string;
|
|
494
|
+
customTitle: string;
|
|
495
|
+
customDescription: string;
|
|
496
|
+
customSubtitle: string;
|
|
497
|
+
titleDescription: string;
|
|
498
|
+
descriptionDescription: string;
|
|
499
|
+
subtitleDescription: string;
|
|
500
|
+
};
|
|
478
501
|
stepper: {
|
|
479
502
|
done: string;
|
|
480
503
|
cart: string;
|
|
@@ -32,5 +32,6 @@ export declare const DemoDraggableList: DemoComponent;
|
|
|
32
32
|
export declare const DemoModal: DemoComponent;
|
|
33
33
|
export declare const DemoWarningModal: DemoComponent;
|
|
34
34
|
export declare const DemoMenuAction: DemoComponent;
|
|
35
|
+
export declare const DemoTable: DemoComponent;
|
|
35
36
|
export declare const ComponentDemos: Record<string, DemoComponent>;
|
|
36
37
|
export {};
|