@producteca/producteca-ui-kit 1.85.0 → 1.87.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/dist/components/dropzone/dropzone.d.js +1 -0
- package/dist/components/dropzone/dropzone.d.ts +4 -0
- package/dist/components/dropzone/dropzone.examples.d.js +1 -0
- package/dist/components/dropzone/dropzone.examples.d.ts +4 -0
- package/dist/components/dropzone/dropzone.types.d.js +1 -0
- package/dist/components/dropzone/dropzone.types.d.ts +27 -0
- package/dist/components/dropzone/dropzone.utils.d.js +1 -0
- package/dist/components/dropzone/dropzone.utils.d.ts +20 -0
- package/dist/components/dropzone/index.d.js +2 -0
- package/dist/components/dropzone/index.d.ts +3 -0
- package/dist/components/dropzone/useDropzone.d.js +1 -0
- package/dist/components/dropzone/useDropzone.d.ts +16 -0
- package/dist/components/inputs/datePicker/datePickerUtils.d.ts +1 -0
- package/dist/components/inputs/dateRangePicker/dateRangePickerUtils.d.ts +0 -1
- package/dist/components/link/index.d.ts +2 -1
- package/dist/components/link/link.d.ts +2 -13
- package/dist/components/link/link.types.d.js +1 -0
- package/dist/components/link/link.types.d.ts +16 -0
- package/dist/components/menu/menuItem/menuItem.types.d.ts +1 -1
- package/dist/components/patterns/fileRow/fileRow.d.js +1 -0
- package/dist/components/patterns/fileRow/fileRow.d.ts +4 -0
- package/dist/components/patterns/fileRow/fileRow.types.d.js +1 -0
- package/dist/components/patterns/fileRow/fileRow.types.d.ts +12 -0
- package/dist/components/patterns/fileRow/index.d.js +2 -0
- package/dist/components/patterns/fileRow/index.d.ts +3 -0
- package/dist/components/patterns/fileRow/useAutoloadProgress.d.js +1 -0
- package/dist/components/patterns/fileRow/useAutoloadProgress.d.ts +7 -0
- package/dist/components/patterns/index.d.js +1 -0
- package/dist/components/patterns/index.d.ts +1 -0
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -18
- package/dist/components/tooltip/tooltip.examples.d.js +1 -0
- package/dist/components/tooltip/tooltip.examples.d.ts +9 -0
- package/dist/components/tooltip/tooltip.types.d.js +1 -0
- package/dist/components/tooltip/tooltip.types.d.ts +20 -0
- package/dist/locales/description.d.ts +3 -1
- package/dist/locales/en.d.ts +8 -0
- package/dist/locales/es.d.ts +43 -0
- package/dist/locales/pt-BR.d.ts +8 -0
- package/dist/locales/weekdayFormatter.d.js +1 -0
- package/dist/locales/weekdayFormatter.d.ts +1 -0
- package/dist/playground/ComponentDemos.d.ts +1 -0
- package/dist/producteca-ui-kit.es.js +91 -91
- package/dist/producteca-ui-kit.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropzoneProps } from './dropzone.types';
|
|
2
|
+
|
|
3
|
+
export declare const Dropzone: ({ onDrop, onReject, accept, maxSize, maxFiles, label, error, isLoading, loadingText, disabled, name, }: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default Dropzone;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropzoneProps } from './dropzone.types';
|
|
2
|
+
|
|
3
|
+
export declare const renderControlledDropzone: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const renderWithFileList: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type DropzoneFileType = 'PDF' | 'XML' | 'XLSX' | 'XLS' | 'CSV' | 'PNG' | 'JPEG' | 'IMAGE';
|
|
2
|
+
export type DropRejectionReason = 'invalidType' | 'tooLarge' | 'tooManyFiles';
|
|
3
|
+
export interface DropRejection {
|
|
4
|
+
file: File;
|
|
5
|
+
reason: DropRejectionReason;
|
|
6
|
+
}
|
|
7
|
+
export interface DropzoneProps {
|
|
8
|
+
onDrop: (files: File[]) => void;
|
|
9
|
+
onReject?: (rejections: DropRejection[]) => void;
|
|
10
|
+
accept?: DropzoneFileType[];
|
|
11
|
+
maxSize?: number;
|
|
12
|
+
maxFiles?: number;
|
|
13
|
+
label?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
loadingText?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface UseDropzoneOptions {
|
|
21
|
+
onDrop: (files: File[]) => void;
|
|
22
|
+
onReject?: (rejections: DropRejection[]) => void;
|
|
23
|
+
accept?: DropzoneFileType[];
|
|
24
|
+
maxSize?: number;
|
|
25
|
+
maxFiles?: number;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DropRejection, DropzoneFileType } from './dropzone.types';
|
|
2
|
+
|
|
3
|
+
interface FileTypeDefinition {
|
|
4
|
+
mime: string;
|
|
5
|
+
extensions: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const fileTypes: Record<DropzoneFileType, FileTypeDefinition>;
|
|
8
|
+
export declare const buildAcceptAttribute: (accept?: DropzoneFileType[]) => string | undefined;
|
|
9
|
+
export declare const buildAcceptLabel: (accept?: DropzoneFileType[]) => string;
|
|
10
|
+
export declare const isAcceptedType: (file: File, accept?: DropzoneFileType[]) => boolean;
|
|
11
|
+
interface PartitionOptions {
|
|
12
|
+
accept?: DropzoneFileType[];
|
|
13
|
+
maxSize?: number;
|
|
14
|
+
maxFiles: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const partitionFiles: (files: File[], { accept, maxSize, maxFiles }: PartitionOptions) => {
|
|
17
|
+
accepted: File[];
|
|
18
|
+
rejected: DropRejection[];
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChangeEvent, DragEvent } from 'react';
|
|
2
|
+
import { UseDropzoneOptions } from './dropzone.types';
|
|
3
|
+
|
|
4
|
+
export declare const useDropzone: ({ onDrop, onReject, accept, maxSize, maxFiles, disabled, }: UseDropzoneOptions) => {
|
|
5
|
+
isDragActive: boolean;
|
|
6
|
+
acceptAttribute: string | undefined;
|
|
7
|
+
dragHandlers: {
|
|
8
|
+
onDragEnter: (event: DragEvent<HTMLElement>) => void;
|
|
9
|
+
onDragOver: (event: DragEvent<HTMLElement>) => void;
|
|
10
|
+
onDragLeave: (event: DragEvent<HTMLElement>) => void;
|
|
11
|
+
onDrop: (event: DragEvent<HTMLElement>) => void;
|
|
12
|
+
};
|
|
13
|
+
handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
isMultiple: boolean;
|
|
15
|
+
};
|
|
16
|
+
export default useDropzone;
|
|
@@ -20,6 +20,7 @@ interface ReadOnlyDateFieldProps {
|
|
|
20
20
|
textFieldProps?: Record<string, unknown>;
|
|
21
21
|
}
|
|
22
22
|
export declare const ReadOnlyDateField: React.FC<ReadOnlyDateFieldProps>;
|
|
23
|
+
export declare const formatDayOfWeek: (weekday: Dayjs) => string;
|
|
23
24
|
export type PickerType = 'date' | 'dateTime' | 'time' | 'year';
|
|
24
25
|
export declare const getPickerTypeFromFormat: (format?: string) => PickerType;
|
|
25
26
|
export declare const getFinalFormat: (format?: string) => string;
|
|
@@ -5,5 +5,4 @@ export type DisabledDays = Matcher | Matcher[] | undefined;
|
|
|
5
5
|
export declare const fromInputValue: (inputValue: InputValue) => DateRange | undefined;
|
|
6
6
|
export declare const getDisplayRange: (range: DateRange | undefined, format?: string) => string;
|
|
7
7
|
export declare const convertToDate: (val: InputValue | undefined) => Date | undefined;
|
|
8
|
-
export declare const CustomWeekday: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export declare const getDisabledDays: (disabled: boolean, minDate?: InputValue, maxDate?: InputValue) => DisabledDays;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { Link
|
|
1
|
+
export { Link } from './link';
|
|
2
|
+
export type { LinkProps, LinkSize, LinkDecoration, LinkVariant, LinkWeight } from './link.types';
|
|
2
3
|
export { Link as default } from './link';
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { LinkProps } from './link.types';
|
|
2
3
|
|
|
3
|
-
type LinkSize = 'sm' | 'md' | 'lg';
|
|
4
|
-
type LinkDecoration = 'none' | 'underline';
|
|
5
|
-
type LinkWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
6
|
-
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
7
|
-
size?: LinkSize;
|
|
8
|
-
decoration?: LinkDecoration;
|
|
9
|
-
weight?: LinkWeight;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
href: string;
|
|
12
|
-
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
}
|
|
15
4
|
export declare const Link: React.MemoExoticComponent<React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>>;
|
|
16
|
-
export type { LinkSize, LinkDecoration, LinkWeight };
|
|
5
|
+
export type { LinkProps, LinkSize, LinkDecoration, LinkVariant, LinkWeight } from './link.types';
|
|
17
6
|
export default Link;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type LinkSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type LinkDecoration = 'none' | 'underline';
|
|
5
|
+
export type LinkVariant = 'default' | 'tooltip-link';
|
|
6
|
+
export type LinkWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
7
|
+
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
8
|
+
size?: LinkSize;
|
|
9
|
+
decoration?: LinkDecoration;
|
|
10
|
+
variant?: LinkVariant;
|
|
11
|
+
weight?: LinkWeight;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
href?: string;
|
|
14
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ButtonProps } from '../../button/button';
|
|
3
|
-
import { BaseTooltipProps } from '../../tooltip/tooltip';
|
|
3
|
+
import { BaseTooltipProps } from '../../tooltip/tooltip.types';
|
|
4
4
|
|
|
5
5
|
export interface MenuItemTooltipProps extends Omit<BaseTooltipProps, 'trigger'> {
|
|
6
6
|
content: string | React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FileRowProps {
|
|
4
|
+
name: string;
|
|
5
|
+
progress?: number;
|
|
6
|
+
autoload?: boolean;
|
|
7
|
+
autoloadDuration?: number;
|
|
8
|
+
onAutoloadComplete?: () => void;
|
|
9
|
+
error?: string;
|
|
10
|
+
onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
showRemoveAction?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface UseAutoloadProgressOptions {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
duration?: number;
|
|
4
|
+
onComplete?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useAutoloadProgress: ({ enabled, duration, onComplete, }: UseAutoloadProgressOptions) => number;
|
|
7
|
+
export default useAutoloadProgress;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { OverflowChecker } from './overflowChecker';
|
|
2
2
|
export { WithTooltip, WithOverflowTooltip } from './tooltip';
|
|
3
|
-
export type { WithTooltipProps, CombinedTooltipProps, TooltipPlacement, BaseTooltipProps, TooltipTrigger, } from './tooltip';
|
|
3
|
+
export type { WithTooltipProps, CombinedTooltipProps, TooltipPlacement, BaseTooltipProps, TooltipTrigger, } from './tooltip.types';
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CombinedTooltipProps, WithTooltipProps } from './tooltip.types';
|
|
2
2
|
|
|
3
|
-
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
4
|
-
export type TooltipTrigger = 'hover' | 'click';
|
|
5
|
-
export interface BaseTooltipProps {
|
|
6
|
-
content?: string | React.ReactNode;
|
|
7
|
-
placement?: TooltipPlacement;
|
|
8
|
-
arrow?: boolean;
|
|
9
|
-
maxWidth?: number | string;
|
|
10
|
-
trigger?: TooltipTrigger;
|
|
11
|
-
shouldShowTooltip?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface WithTooltipProps extends BaseTooltipProps {
|
|
14
|
-
children: React.ReactElement;
|
|
15
|
-
slotProps?: any;
|
|
16
|
-
}
|
|
17
3
|
export declare const WithTooltip: ({ children, content, placement, arrow, maxWidth, trigger, shouldShowTooltip, slotProps: customSlotProps, ...otherProps }: WithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export interface CombinedTooltipProps extends BaseTooltipProps {
|
|
19
|
-
children: React.ReactElement;
|
|
20
|
-
}
|
|
21
4
|
export declare const WithOverflowTooltip: ({ content, children, ...tooltipProps }: CombinedTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export type { TooltipPlacement, TooltipTrigger, BaseTooltipProps, WithTooltipProps, CombinedTooltipProps, } from './tooltip.types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseTooltipProps } from './index';
|
|
2
|
+
|
|
3
|
+
export type TooltipStoryArgs = BaseTooltipProps;
|
|
4
|
+
export declare const bulletListContent: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const renderHoverLabelTooltip: (args: TooltipStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const renderClickLabelTooltip: (args: TooltipStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const renderOverflowLabelTooltip: (args: TooltipStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const renderButtonTooltip: (args: TooltipStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const renderDisabledButtonTooltip: (args: TooltipStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipProps } from '@mui/material/Tooltip';
|
|
3
|
+
|
|
4
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
5
|
+
export type TooltipTrigger = 'hover' | 'click';
|
|
6
|
+
export interface BaseTooltipProps {
|
|
7
|
+
content?: string | React.ReactNode;
|
|
8
|
+
placement?: TooltipPlacement;
|
|
9
|
+
arrow?: boolean;
|
|
10
|
+
maxWidth?: number | string;
|
|
11
|
+
trigger?: TooltipTrigger;
|
|
12
|
+
shouldShowTooltip?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface WithTooltipProps extends BaseTooltipProps {
|
|
15
|
+
children: React.ReactElement;
|
|
16
|
+
slotProps?: TooltipProps['slotProps'];
|
|
17
|
+
}
|
|
18
|
+
export interface CombinedTooltipProps extends BaseTooltipProps {
|
|
19
|
+
children: React.ReactElement;
|
|
20
|
+
}
|
|
@@ -17,7 +17,7 @@ export declare const breadcrumbItemFormat = "\n ## Formato de BreadcrumbItem\n\
|
|
|
17
17
|
export declare const menuItems = "Lista de \u00EDtems que se mostrar\u00E1n en el men\u00FA.\n \n**Tipo:** `MenuActionItem[]`\n\n```ts\ninterface MenuActionItem {\n label: React.ReactNode\n icon?: React.ReactElement\n onClick?: () => void\n selected?: boolean\n disabled?: boolean\n}\n```\n";
|
|
18
18
|
export declare const draggableListExample = "\n## Uso del componente\n\nEl componente `DraggableList` permite crear listas de items arrastrables con un componente personalizado para cada item.\n\n**`value`** acepta dos formatos:\n- **string[]**: `[\"valor1\", \"valor2\"]` \u2014 `onChange` devuelve un array de strings.\n- **{ id, value }[]**: `[{ id: 'item-1', value: 'valor1' }, ...]` \u2014 `onChange` devuelve el mismo formato de objetos.\n\n**`canRemove`**: funci\u00F3n opcional `(item: DraggableItem) => boolean`. Se eval\u00FAa por cada item; si devuelve `false`, el bot\u00F3n de eliminar se muestra deshabilitado para ese item.\n\n**`showRemoveAction`**: si es `false`, no se muestra el bot\u00F3n de eliminar en ninguna fila. Por defecto `true`.\n\n### Ejemplo con objetos (id + value):\n\n```tsx\n<DraggableList\n label=\"Seleccionar un deposito\"\n addLabel=\"+ Agregar\"\n itemComponent={SelectField}\n componentProps={{\n placeholder: 'Seleccionar...',\n options: [\n { value: 'option1', label: 'Opci\u00F3n 1' },\n { value: 'option2', label: 'Opci\u00F3n 2' },\n ],\n size: 'md',\n }}\n value={[\n { id: 'item-1', value: 'option1' },\n { id: 'item-2', value: 'option2' },\n ]}\n onChange={(event) => console.log('Items actualizados:', event.target.value)}\n/>\n```\n\n### Ejemplo con array de strings:\n\n```tsx\n<DraggableList\n label=\"Nombres\"\n addLabel=\"+ Agregar\"\n itemComponent={FormField}\n componentProps={{ placeholder: 'Texto', size: 'md', type: 'text' }}\n value={['Uno', 'Dos']}\n onChange={(event) => setValues(event.target.value)}\n/>\n```\n\n### Ejemplo con Redux Form (Field):\n\n```tsx\n<Field\n name=\"warehouses\"\n component={DraggableList}\n itemComponent={FormField}\n label=\"Dep\u00F3sitos\"\n addLabel=\"+ Agregar\"\n componentProps={{\n placeholder: 'Nombre del dep\u00F3sito',\n size: 'md',\n type: 'text',\n }}\n value={[\n { id: 'item-1', value: 'Texto 1' },\n { id: 'item-2', value: 'Texto 2' },\n ]}\n/>\n```\n";
|
|
19
19
|
export declare const switchInputExample = "\n## Uso del componente\n\nEl componente `SwitchInput` / `SwitchInputGroup` muestra switches (toggle) individuales o en grupo. Soporta tama\u00F1os `sm`, `md`, `lg` e integraci\u00F3n con Redux Form.\n\n### Ejemplo b\u00E1sico (grupo):\n\n```tsx\n<SwitchInputGroup\n name=\"options\"\n title=\"Opciones\"\n size=\"md\"\n items={[\n { id: '1', label: 'Opci\u00F3n 1' },\n { id: '2', label: 'Opci\u00F3n 2' },\n { id: '3', label: 'Opci\u00F3n 3', disabled: true },\n ]}\n onChange={(event) => handleChange(event.target.value)}\n/>\n```\n\n### Ejemplo (un solo switch):\n\n```tsx\nconst [checked, setChecked] = React.useState(false)\n\n<SwitchInput\n name=\"toggle\"\n checked={checked}\n onChange={(e) => setChecked(e.target.checked)}\n label=\"Activar\"\n title=\"Configuraci\u00F3n\"\n/>\n```\n";
|
|
20
|
-
export declare const linkExample = "\n## Uso del componente\n\nEl componente `Link` renderiza un enlace con estilos del design system. Soporta tama\u00F1os (`sm`, `md`, `lg`), decoraci\u00F3n (`none`, `underline`) y estado `disabled
|
|
20
|
+
export declare const linkExample = "\n## Uso del componente\n\nEl componente `Link` renderiza un enlace con estilos del design system. Soporta tama\u00F1os (`sm`, `md`, `lg`), decoraci\u00F3n (`none`, `underline`), variantes (`default`, `tooltip-link`) y estado `disabled`. El prop `href` es opcional: si se omite, el link se renderiza como una acci\u00F3n con `role=\"button\"` y activable por teclado.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Link href=\"/productos\" size=\"md\">\n Ver productos\n</Link>\n```\n\n### Con underline y tama\u00F1o:\n\n```tsx\n<Link href=\"/historial\" decoration=\"underline\" size=\"lg\">\n Historial de cambios\n</Link>\n```\n\n### Dentro de un tooltip (fondo oscuro, sin href):\n\n```tsx\n<Link variant=\"tooltip-link\" size=\"sm\" onClick={handleClick}>\n Ver detalle\n</Link>\n```\n";
|
|
21
21
|
export declare const alertExample = "\n## Uso del componente\n\nEl componente `Alert` muestra mensajes de feedback con variantes `success`, `error`, `warning` e `info`. Soporta \u00EDcono personalizado y link de acci\u00F3n.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Alert\n variant=\"success\"\n message=\"Operaci\u00F3n completada correctamente.\"\n/>\n```\n\n### Con link:\n\n```tsx\n<Alert\n variant=\"info\"\n message=\"Revis\u00E1 tu bandeja de entrada.\"\n link={{\n text: 'No volver a mostrar',\n href: '#',\n }}\n/>\n```\n";
|
|
22
22
|
export declare const buttonExample = "\n## Uso del componente\n\nEl componente `Button` renderiza un bot\u00F3n con variantes (`primary`, `secondary`, `success`, `error`, `link`, `tooltip-link`), tama\u00F1os y soporte para iconos.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Button\n variant=\"primary\"\n size=\"lg\"\n label=\"Continuar\"\n onClick={() => handleSubmit()}\n/>\n```\n\n### Con \u00EDcono:\n\n```tsx\n<Button\n variant=\"secondary\"\n label=\"Agregar\"\n rightAdornment={<Add />}\n onClick={() => openModal()}\n/>\n```\n";
|
|
23
23
|
export declare const cardExample = "\n## Uso del componente\n\nEl componente `Card` muestra una tarjeta con t\u00EDtulo, descripci\u00F3n, \u00EDcono opcional y acci\u00F3n al hacer click.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<Card\n title=\"T\u00EDtulo\"\n description=\"Descripci\u00F3n de la tarjeta.\"\n icon={<CustomIcon><ShareIcon /></CustomIcon>}\n onClick={() => navigate('/detalle')}\n isActive={false}\n/>\n```\n";
|
|
@@ -59,3 +59,5 @@ export declare const spinnerExample = "\n## Uso del componente\n\nEl componente
|
|
|
59
59
|
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";
|
|
60
60
|
export declare const permissionOptionExample = "\n## Uso del componente\n\nEl componente `PermissionOption` muestra un permiso (Lectura, Edici\u00F3n o Sin acceso) con su \u00EDcono y label. Es clickeable/seleccionable: al definir `onClick` se vuelve interactivo (accesible por teclado). `isActive` lo muestra seleccionado (fondo celeste + texto/\u00EDcono azul) y `disabled` lo aten\u00FAa (opacidad 0.5) sin interacci\u00F3n.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<PermissionOption\n permission=\"read\"\n isActive\n onClick={() => setPermission('read')}\n/>\n```\n";
|
|
61
61
|
export declare const permissionSelectorExample = "\n## Uso del componente\n\nEl componente `PermissionSelector` muestra los tres permisos (Sin acceso, Lectura, Edici\u00F3n) en l\u00EDnea como un selector de opci\u00F3n \u00FAnica. Al elegir un permiso, el fondo celeste se desliza desde el permiso actual hacia el seleccionado (misma t\u00E9cnica que `Tabs`).\n\n### Ejemplo b\u00E1sico:\n\n```tsx\nconst [permission, setPermission] = React.useState('noAccess')\n\n<PermissionSelector\n value={permission}\n onChange={setPermission}\n/>\n```\n";
|
|
62
|
+
export declare const dropzoneExample = "\n## Uso del componente\n\n`Dropzone` es la zona de carga: soporta drag & drop nativo y click para abrir el explorador de archivos. Es **controlado**: no guarda los archivos, solo valida tipo/tama\u00F1o/cantidad y emite `onDrop` con los aceptados y `onReject` con los rechazados. El padre maneja la subida (progreso, errores del backend) y renderiza las filas con [FileRow](/docs/components-filerow--docs).\n\n### Estados\n\n- **Vac\u00EDo**: borde punteado, \u00EDcono de subida, instrucciones y el tama\u00F1o m\u00E1ximo permitido.\n- **Drag activo**: borde s\u00F3lido y fondo celeste mientras se arrastra un archivo encima.\n- **Cargando** (`isLoading`): spinner + texto, sin interacci\u00F3n.\n- **Error** (`error`): borde rojo y mensaje debajo de la zona.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\nconst [files, setFiles] = useState<UploadedFile[]>([])\n\nconst handleDrop = async (dropped: File[]) => {\n const [file] = dropped\n setFiles([{ id: file.name, name: file.name, progress: 0 }])\n await upload(file, (progress) => setFiles([{ id: file.name, name: file.name, progress }]))\n}\n\nconst handleReject = ([{ reason }]: DropRejection[]) =>\n setError(localize(\\`dropzone.\\${reason}\\`, { maxSize: 10 }))\n\nreturn (\n <>\n <Dropzone\n accept={['PDF', 'XLSX']}\n maxSize={10}\n error={error}\n onDrop={handleDrop}\n onReject={handleReject}\n />\n {files.map(({ id, name, progress }) => (\n <FileRow key={id} name={name} progress={progress} onRemove={() => remove(id)} />\n ))}\n </>\n)\n```\n";
|
|
63
|
+
export declare const fileRowExample = "\n## Uso del componente\n\n`FileRow` es la tarjeta de un archivo ya adjuntado. Muestra el nombre, un bot\u00F3n de eliminar y, opcionalmente, el progreso de subida y un mensaje de error.\n\n- `progress` (0-100): al definirlo se muestra la barra lineal y el porcentaje. Omitilo para el estado \"subida terminada\".\n- `autoload`: anima la barra de 0 a 100 al montar, sin necesidad de eventos reales de subida. Al terminar, la barra desaparece y la fila queda en su estado final (nombre + eliminar). \u00DAtil cuando la subida es tan r\u00E1pida que no hay progreso que reportar, o para prototipar. Se ignora si se define `progress`, y avisa el final con `onAutoloadComplete`.\n- `error`: pinta el borde de la tarjeta en rojo y muestra el mensaje debajo.\n- `showRemoveAction={false}`: oculta el bot\u00F3n de eliminar.\n\n### Ejemplo b\u00E1sico:\n\n```tsx\n<FileRow\n name=\"Nombre_del_archivo.xlm\"\n progress={75}\n onRemove={() => removeFile(id)}\n/>\n```\n";
|
package/dist/locales/en.d.ts
CHANGED
|
@@ -34,6 +34,14 @@ declare const _default: {
|
|
|
34
34
|
selectTime: string;
|
|
35
35
|
selectYear: string;
|
|
36
36
|
};
|
|
37
|
+
dropzone: {
|
|
38
|
+
clickHere: string;
|
|
39
|
+
dropFiles: string;
|
|
40
|
+
maxSize: string;
|
|
41
|
+
percentage: string;
|
|
42
|
+
removeFile: string;
|
|
43
|
+
uploadingFile: string;
|
|
44
|
+
};
|
|
37
45
|
guide: string;
|
|
38
46
|
maintenance: {
|
|
39
47
|
description: string;
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -186,6 +186,12 @@ declare const _default: {
|
|
|
186
186
|
permissionSelector: {
|
|
187
187
|
example: string;
|
|
188
188
|
};
|
|
189
|
+
dropzone: {
|
|
190
|
+
example: string;
|
|
191
|
+
};
|
|
192
|
+
fileRow: {
|
|
193
|
+
example: string;
|
|
194
|
+
};
|
|
189
195
|
dropdown: {
|
|
190
196
|
example: string;
|
|
191
197
|
};
|
|
@@ -503,6 +509,9 @@ declare const _default: {
|
|
|
503
509
|
large: string;
|
|
504
510
|
withUnderline: string;
|
|
505
511
|
exampleIntegrationName: string;
|
|
512
|
+
variant: string;
|
|
513
|
+
tooltipLink: string;
|
|
514
|
+
tooltipLinkDescription: string;
|
|
506
515
|
};
|
|
507
516
|
theme: {
|
|
508
517
|
colorPalettes: string;
|
|
@@ -582,6 +591,40 @@ declare const _default: {
|
|
|
582
591
|
descriptionDescription: string;
|
|
583
592
|
subtitleDescription: string;
|
|
584
593
|
};
|
|
594
|
+
dropzone: {
|
|
595
|
+
dropFiles: string;
|
|
596
|
+
clickHere: string;
|
|
597
|
+
maxSize: string;
|
|
598
|
+
uploadingFile: string;
|
|
599
|
+
percentage: string;
|
|
600
|
+
removeFile: string;
|
|
601
|
+
invalidType: string;
|
|
602
|
+
tooLarge: string;
|
|
603
|
+
tooManyFiles: string;
|
|
604
|
+
label: string;
|
|
605
|
+
fileName: string;
|
|
606
|
+
onDrop: string;
|
|
607
|
+
onReject: string;
|
|
608
|
+
accept: string;
|
|
609
|
+
maxSizeProp: string;
|
|
610
|
+
maxFiles: string;
|
|
611
|
+
labelProp: string;
|
|
612
|
+
errorProp: string;
|
|
613
|
+
isLoading: string;
|
|
614
|
+
loadingText: string;
|
|
615
|
+
disabled: string;
|
|
616
|
+
nameProp: string;
|
|
617
|
+
fileRow: {
|
|
618
|
+
name: string;
|
|
619
|
+
progress: string;
|
|
620
|
+
autoload: string;
|
|
621
|
+
autoloadDuration: string;
|
|
622
|
+
onAutoloadComplete: string;
|
|
623
|
+
error: string;
|
|
624
|
+
onRemove: string;
|
|
625
|
+
showRemoveAction: string;
|
|
626
|
+
};
|
|
627
|
+
};
|
|
585
628
|
stepper: {
|
|
586
629
|
done: string;
|
|
587
630
|
cart: string;
|
package/dist/locales/pt-BR.d.ts
CHANGED
|
@@ -34,6 +34,14 @@ declare const _default: {
|
|
|
34
34
|
selectTime: string;
|
|
35
35
|
selectYear: string;
|
|
36
36
|
};
|
|
37
|
+
dropzone: {
|
|
38
|
+
clickHere: string;
|
|
39
|
+
dropFiles: string;
|
|
40
|
+
maxSize: string;
|
|
41
|
+
percentage: string;
|
|
42
|
+
removeFile: string;
|
|
43
|
+
uploadingFile: string;
|
|
44
|
+
};
|
|
37
45
|
guide: string;
|
|
38
46
|
maintenance: {
|
|
39
47
|
description: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatWeekdayInitial: (weekday: Date) => string;
|
|
@@ -34,5 +34,6 @@ export declare const DemoWarningModal: DemoComponent;
|
|
|
34
34
|
export declare const DemoMenuAction: DemoComponent;
|
|
35
35
|
export declare const DemoTable: DemoComponent;
|
|
36
36
|
export declare const DemoPermissionSelector: DemoComponent;
|
|
37
|
+
export declare const DemoDropzone: DemoComponent;
|
|
37
38
|
export declare const ComponentDemos: Record<string, DemoComponent>;
|
|
38
39
|
export {};
|