@producteca/producteca-ui-kit 1.52.0 → 1.52.2
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/patterns/conditionalOperator/conditionalOperator.d.ts +1 -1
- package/dist/components/patterns/conditionalOperator/conditionalOperator.types.d.ts +4 -1
- package/dist/components/patterns/index.d.js +2 -1
- package/dist/components/patterns/index.d.ts +1 -0
- package/dist/locales/description.d.ts +1 -1
- package/dist/producteca-ui-kit.es.js +62 -62
- package/dist/producteca-ui-kit.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { ConditionalOperatorProps } from './conditionalOperator.types';
|
|
|
2
2
|
|
|
3
3
|
export { VALUE_OR, VALUE_AND, type ConditionalOperatorOption, type ConditionalOperatorProps } from './conditionalOperator.types';
|
|
4
4
|
export declare const ConditionalOperator: {
|
|
5
|
-
({ value,
|
|
5
|
+
({ name, value, onChange, options: optionsProp, ...props }: ConditionalOperatorProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
VALUE_OR: string;
|
|
8
8
|
VALUE_AND: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
1
3
|
export declare const VALUE_OR = "or";
|
|
2
4
|
export declare const VALUE_AND = "and";
|
|
3
5
|
export interface ConditionalOperatorOption {
|
|
@@ -5,7 +7,8 @@ export interface ConditionalOperatorOption {
|
|
|
5
7
|
label: string;
|
|
6
8
|
}
|
|
7
9
|
export interface ConditionalOperatorProps {
|
|
10
|
+
name?: string;
|
|
8
11
|
value?: string;
|
|
9
|
-
|
|
12
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
13
|
options?: [ConditionalOperatorOption, ConditionalOperatorOption];
|
|
11
14
|
}
|
|
@@ -34,7 +34,7 @@ export declare const copyButtonExample = "\n## Uso del componente\n\nEl componen
|
|
|
34
34
|
export declare const headerSectionExample = "\n## Uso del componente\n\nEl componente `HeaderSection` agrupa breadcrumb, t\u00EDtulo, subt\u00EDtulo, imagen, link y men\u00FA de acciones en una cabecera de p\u00E1gina o detalle.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<HeaderSection\n title=\"Pedido N\u00B0 150078523\"\n breadcrumb={<Breadcrumb items={[{ text: 'Inicio' }, { text: 'Pedidos' }]} />}\n subtitle={<IconWithIdentifier text=\"#ID123\" icon={<Image src=\"...\" />} />}\n image={<Image src=\"...\" />}\n link={<LinkWithIcon text=\"Historial\" icon={<History />} onClick={() => {}} />}\n menuAction={<MenuAction items={[{ label: 'Editar', onClick: () => {} }]} />}\n/>\n```\n";
|
|
35
35
|
export declare const iconWithIdentifierExample = "\n## Uso del componente\n\nEl componente `IconWithIdentifier` muestra un \u00EDcono junto a un texto (por ejemplo un ID o c\u00F3digo).\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<IconWithIdentifier\n icon={<Image src=\"/flag.png\" />}\n text=\"#ID8765\"\n showDivider\n/>\n```\n";
|
|
36
36
|
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";
|
|
37
|
-
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
|
|
37
|
+
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";
|
|
38
38
|
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";
|
|
39
39
|
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";
|
|
40
40
|
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";
|