@producteca/producteca-ui-kit 1.63.0-beta.1 → 1.63.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.
@@ -8,4 +8,6 @@ export * from './customIcon/customIcon';
8
8
  export * from './emptyState/emptyStateIcon';
9
9
  export * from './errorState/errorStateIcon';
10
10
  export * from './checkIcon/checkIcon';
11
+ export * from './successState/successStateIcon';
12
+ export * from './newState/newStateIcon';
11
13
  export * from './maintenance/maintenanceIcon';
@@ -8,4 +8,6 @@ export * from './customIcon/customIcon';
8
8
  export * from './emptyState/emptyStateIcon';
9
9
  export * from './errorState/errorStateIcon';
10
10
  export * from './checkIcon/checkIcon';
11
+ export * from './successState/successStateIcon';
12
+ export * from './newState/newStateIcon';
11
13
  export * from './maintenance/maintenanceIcon';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { IconInterface } from '../parameters';
2
+
3
+ export declare const NewStateIcon: ({ size, color, }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
+ export type { IconInterface };
5
+ export default NewStateIcon;
@@ -0,0 +1,5 @@
1
+ import { IconInterface } from '../parameters';
2
+
3
+ export declare const SuccessStateIcon: ({ size, color, }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
+ export type { IconInterface };
5
+ export default SuccessStateIcon;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { AsyncContentProps, AsyncContentStatus } from './asyncContent.types';
2
+ import { AsyncContentProps, AsyncContentStatus, AsyncContentErrorProps, AsyncContentEmptyProps, AsyncContentSuccessProps } from './asyncContent.types';
3
3
 
4
- export declare const AsyncContent: React.MemoExoticComponent<({ status, children, onErrorAction, onEmptyAction, emptyActionText, errorActionText, errorText, emptyText, }: AsyncContentProps) => import("react/jsx-runtime").JSX.Element>;
5
- export type { AsyncContentProps, AsyncContentStatus };
4
+ export declare const AsyncContent: React.MemoExoticComponent<({ isLoading, error, empty, success, children, }: AsyncContentProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export type { AsyncContentProps, AsyncContentStatus, AsyncContentErrorProps, AsyncContentEmptyProps, AsyncContentSuccessProps, };
6
6
  export default AsyncContent;
@@ -1,13 +1,29 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
- export type AsyncContentStatus = 'loading' | 'error' | 'empty' | 'success';
3
+ export type AsyncContentStatus = 'loading' | 'error' | 'empty' | 'creation' | 'success' | 'content';
4
+ export interface AsyncContentErrorProps {
5
+ value: boolean;
6
+ text?: string;
7
+ actionText?: string;
8
+ onClick?: () => void;
9
+ }
10
+ export interface AsyncContentEmptyProps {
11
+ items: ReadonlyArray<unknown>;
12
+ creation?: boolean;
13
+ text?: string;
14
+ actionText?: string;
15
+ onClick?: () => void;
16
+ }
17
+ export interface AsyncContentSuccessProps {
18
+ value: boolean;
19
+ text?: string;
20
+ actionText?: string;
21
+ onClick?: () => void;
22
+ }
4
23
  export interface AsyncContentProps {
5
24
  children: ReactNode;
6
- errorText?: string;
7
- emptyText?: string;
8
- errorActionText?: string;
9
- emptyActionText?: string;
10
- status: AsyncContentStatus;
11
- onErrorAction?: () => void;
12
- onEmptyAction?: () => void;
25
+ isLoading?: boolean;
26
+ error?: AsyncContentErrorProps;
27
+ empty?: AsyncContentEmptyProps;
28
+ success?: AsyncContentSuccessProps;
13
29
  }
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  interface EmptyViewProps {
4
- emptyText?: string;
5
- emptyActionText?: string;
6
- onEmptyAction?: () => void;
4
+ text?: string;
5
+ actionText?: string;
6
+ onClick?: () => void;
7
7
  }
8
- export declare const EmptyView: React.MemoExoticComponent<({ emptyText, emptyActionText, onEmptyAction, }: EmptyViewProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export declare const EmptyView: React.MemoExoticComponent<({ text, actionText, onClick, }: EmptyViewProps) => import("react/jsx-runtime").JSX.Element>;
9
9
  export {};
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  interface ErrorViewProps {
4
- errorText?: string;
5
- errorActionText?: string;
6
- onErrorAction?: () => void;
4
+ text?: string;
5
+ actionText?: string;
6
+ onClick?: () => void;
7
7
  }
8
- export declare const ErrorView: React.MemoExoticComponent<({ errorText, errorActionText, onErrorAction, }: ErrorViewProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export declare const ErrorView: React.MemoExoticComponent<({ text, actionText, onClick, }: ErrorViewProps) => import("react/jsx-runtime").JSX.Element>;
9
9
  export {};
@@ -1,3 +1,5 @@
1
1
  export * from './loadingView';
2
2
  export * from './errorView';
3
- export * from './emptyView';
3
+ export * from './emptyView';
4
+ export * from './newView';
5
+ export * from './successView';
@@ -1,3 +1,5 @@
1
1
  export * from './loadingView';
2
2
  export * from './errorView';
3
3
  export * from './emptyView';
4
+ export * from './newView';
5
+ export * from './successView';
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface NewViewProps {
4
+ text?: string;
5
+ actionText?: string;
6
+ onClick?: () => void;
7
+ }
8
+ export declare const NewView: React.MemoExoticComponent<({ text, actionText, onClick, }: NewViewProps) => import("react/jsx-runtime").JSX.Element>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface SuccessViewProps {
4
+ text?: string;
5
+ actionText?: string;
6
+ onClick?: () => void;
7
+ }
8
+ export declare const SuccessView: React.MemoExoticComponent<({ text, actionText, onClick, }: SuccessViewProps) => import("react/jsx-runtime").JSX.Element>;
9
+ export {};
@@ -40,7 +40,7 @@ export declare const iconWithIdentifierExample = "\n## Uso del componente\n\nEl
40
40
  export declare const linkWithIconExample = "\n## Uso del componente\n\nEl componente `LinkWithIcon` muestra un enlace con un \u00EDcono a la izquierda.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<LinkWithIcon\n text=\"Historial de cambios\"\n icon={<CustomIcon><History /></CustomIcon>}\n onClick={() => navigate('/history')}\n/>\n```\n";
41
41
  export declare const conditionalOperatorExample = "\n## Uso del componente\n\nEl componente `ConditionalOperator` permite elegir entre operador l\u00F3gico \"Y\" u \"O\" para filtrar o combinar condiciones.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<ConditionalOperator\n value=\"or\"\n options={[{ value: 'and', label: 'Y' }, { value: 'or', label: 'O' }]}\n onChange={(event) => setOperator(event.target.value)}\n/>\n```\n";
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
- 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";
43
+ export declare const asyncContentExample = "\n## Uso del componente\n\nEl componente `AsyncContent` maneja los estados de una operaci\u00F3n as\u00EDncrona deriv\u00E1ndolos de las props `isLoading`, `error` y `empty`. La prioridad es: `isLoading` \u2192 `error.value` \u2192 `empty.items` vac\u00EDo \u2192 `success`. Muestra el contenido solo en `success`.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<AsyncContent\n isLoading={isLoading}\n error={{\n value: hasError,\n text: 'Ocurri\u00F3 un error',\n actionText: 'Reintentar',\n onClick: () => refetch(),\n }}\n empty={{\n items,\n text: 'No hay datos',\n }}\n>\n <div>Contenido cuando hay datos disponibles</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
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
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";
@@ -476,12 +476,16 @@ declare const _default: {
476
476
  contentLoadedTitle: string;
477
477
  contentLoadedDescription: string;
478
478
  componentDescription: string;
479
- statusDescription: string;
480
- errorTextDescription: string;
481
- emptyTextDescription: string;
482
- errorActionTextDescription: string;
483
- emptyActionTextDescription: string;
479
+ isLoadingDescription: string;
480
+ errorDescription: string;
481
+ emptyDescription: string;
482
+ successDescription: string;
483
+ successCompleted: string;
484
+ successAction: string;
485
+ operationSucceeded: string;
484
486
  interactiveFlowDescription: string;
487
+ createFirstItem: string;
488
+ createAction: string;
485
489
  };
486
490
  conditionalOperator: {
487
491
  or: string;