@producteca/producteca-ui-kit 1.21.1-beta.0 → 1.21.1-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/alert/alert.d.ts +17 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +15 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/button/button.d.ts +17 -0
- package/dist/components/chip/chip.d.ts +13 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/icons/customIcon/customIcon.d.ts +16 -0
- package/dist/components/icons/fileIcon/fileIcon.d.ts +5 -0
- package/dist/components/icons/{index.js → index.d.ts} +1 -1
- package/dist/components/icons/mailIcon/mailIcon.d.ts +5 -0
- package/dist/components/icons/parameters.d.ts +51 -0
- package/dist/components/icons/priceCloseIcon/priceCloseIcon.d.ts +5 -0
- package/dist/components/icons/priceDownIcon/priceDownIcon.d.ts +5 -0
- package/dist/components/icons/searchPublication/searchPublication.d.ts +5 -0
- package/dist/components/image/image.d.ts +11 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/{index.js → index.d.ts} +1 -1
- package/dist/components/inputs/checkboxInput/checkboxInput.d.ts +9 -0
- package/dist/components/inputs/checkboxInput/checkboxInputGroup.d.ts +22 -0
- package/dist/components/inputs/checkboxInput/{index.js → index.d.ts} +2 -1
- package/dist/components/inputs/datePicker/datePicker.d.ts +5 -0
- package/dist/components/inputs/datePicker/datePickerCustomStyles.d.ts +8 -0
- package/dist/components/inputs/datePicker/datePickerTypes.d.ts +14 -0
- package/dist/components/inputs/datePicker/datePickerUtils.d.ts +68 -0
- package/dist/components/inputs/datePicker/index.d.ts +3 -0
- package/dist/components/inputs/dateRangePicker/dateFormater.d.ts +7 -0
- package/dist/components/inputs/dateRangePicker/dateRangePicker.d.ts +5 -0
- package/dist/components/inputs/dateRangePicker/dateRangePickerTypes.d.ts +14 -0
- package/dist/components/inputs/dateRangePicker/dateRangePickerUtils.d.ts +9 -0
- package/dist/components/inputs/dateRangePicker/index.d.ts +4 -0
- package/dist/components/inputs/formField/formField.d.ts +10 -0
- package/dist/components/inputs/formField/passwordInput.d.ts +4 -0
- package/dist/components/inputs/formField/textInput.d.ts +25 -0
- package/dist/components/inputs/{index.js → index.d.ts} +1 -1
- package/dist/components/inputs/searcher/searcher.d.ts +28 -0
- package/dist/components/inputs/selectField/selectField.d.ts +42 -0
- package/dist/components/inputs/switchInput/index.d.ts +4 -0
- package/dist/components/inputs/switchInput/switchInput.d.ts +31 -0
- package/dist/components/loaders/index.d.ts +2 -0
- package/dist/components/loaders/progressbar/progressbar.d.ts +8 -0
- package/dist/components/loaders/spinner/spinner.d.ts +6 -0
- package/dist/components/menuAction/index.d.ts +1 -0
- package/dist/components/menuAction/menuAction.d.ts +18 -0
- package/dist/components/menuAction/menuActionCustomStyles.d.ts +4 -0
- package/dist/components/modals/index.d.ts +1 -0
- package/dist/components/modals/warningModal/index.d.ts +1 -0
- package/dist/components/modals/warningModal/warningModal.d.ts +17 -0
- package/dist/components/patterns/actionBar/actionBar.d.ts +26 -0
- package/dist/components/patterns/copyButton/copyButton.d.ts +11 -0
- package/dist/components/patterns/copyButton/index.d.ts +1 -0
- package/dist/components/patterns/emptyState/emptyState.d.ts +11 -0
- package/dist/components/patterns/headerSection/headerSection.d.ts +14 -0
- package/dist/components/patterns/headerSection/index.d.ts +1 -0
- package/dist/components/patterns/iconWithIdentifier/iconWithIdentifier.d.ts +11 -0
- package/dist/components/patterns/iconWithIdentifier/index.d.ts +1 -0
- package/dist/components/patterns/{index.js → index.d.ts} +1 -1
- package/dist/components/patterns/linkWithIcon/index.d.ts +1 -0
- package/dist/components/patterns/linkWithIcon/linkWithIcon.d.ts +14 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +17 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/overflowChecker.d.ts +5 -0
- package/dist/components/tooltip/tooltip.d.ts +20 -0
- package/dist/favicon.svg +43 -0
- package/dist/hooks/useReduxFormField.d.ts +26 -0
- package/dist/{index.js → index.d.ts} +1 -1
- package/dist/locales/description.d.ts +15 -0
- package/dist/locales/es.d.ts +227 -0
- package/dist/locales/index.d.ts +2 -0
- package/dist/locales/translator.d.ts +3 -0
- package/dist/producteca-ui-kit.cjs.js +508 -3
- package/dist/producteca-ui-kit.es.js +43799 -3
- package/dist/producteca-ui-kit.umd.js +508 -9
- package/dist/style.css +1 -0
- package/dist/styles/colors.d.ts +25 -0
- package/dist/styles/theme.d.ts +2 -0
- package/dist/validators/errorMessage.d.ts +5 -0
- package/dist/validators/index.d.ts +2 -0
- package/dist/validators/validation.d.ts +21 -0
- package/package.json +4 -4
- package/dist/components/alert/alert.js +0 -37
- package/dist/components/breadcrumb/breadcrumb.js +0 -33
- package/dist/components/breadcrumb/index.js +0 -2
- package/dist/components/button/button.js +0 -34
- package/dist/components/chip/chip.js +0 -27
- package/dist/components/chip/index.js +0 -1
- package/dist/components/icons/customIcon/customIcon.js +0 -41
- package/dist/components/icons/fileIcon/fileIcon.js +0 -14
- package/dist/components/icons/mailIcon/mailIcon.js +0 -14
- package/dist/components/icons/parameters.js +0 -26
- package/dist/components/icons/priceCloseIcon/priceCloseIcon.js +0 -14
- package/dist/components/icons/priceDownIcon/priceDownIcon.js +0 -14
- package/dist/components/icons/searchPublication/searchPublication.js +0 -14
- package/dist/components/image/image.js +0 -26
- package/dist/components/image/index.js +0 -1
- package/dist/components/inputs/checkboxInput/checkboxInput.js +0 -35
- package/dist/components/inputs/checkboxInput/checkboxInputGroup.js +0 -58
- package/dist/components/inputs/datePicker/datePicker.js +0 -143
- package/dist/components/inputs/datePicker/datePickerCustomStyles.js +0 -145
- package/dist/components/inputs/datePicker/datePickerTypes.js +0 -1
- package/dist/components/inputs/datePicker/datePickerUtils.js +0 -109
- package/dist/components/inputs/datePicker/index.js +0 -2
- package/dist/components/inputs/dateRangePicker/dateFormater.js +0 -28
- package/dist/components/inputs/dateRangePicker/dateRangePicker.js +0 -118
- package/dist/components/inputs/dateRangePicker/dateRangePickerTypes.js +0 -1
- package/dist/components/inputs/dateRangePicker/dateRangePickerUtils.js +0 -67
- package/dist/components/inputs/dateRangePicker/index.js +0 -2
- package/dist/components/inputs/formField/formField.js +0 -35
- package/dist/components/inputs/formField/passwordInput.js +0 -22
- package/dist/components/inputs/formField/textInput.js +0 -79
- package/dist/components/inputs/searcher/searcher.js +0 -112
- package/dist/components/inputs/selectField/selectField.js +0 -183
- package/dist/components/inputs/switchInput/index.js +0 -2
- package/dist/components/inputs/switchInput/switchInput.js +0 -77
- package/dist/components/loaders/index.js +0 -2
- package/dist/components/loaders/progressbar/progressbar.js +0 -37
- package/dist/components/loaders/spinner/spinner.js +0 -15
- package/dist/components/menuAction/index.js +0 -1
- package/dist/components/menuAction/menuAction.js +0 -67
- package/dist/components/menuAction/menuActionCustomStyles.js +0 -13
- package/dist/components/modals/index.js +0 -1
- package/dist/components/modals/warningModal/index.js +0 -1
- package/dist/components/modals/warningModal/warningModal.js +0 -41
- package/dist/components/patterns/actionBar/actionBar.js +0 -38
- package/dist/components/patterns/copyButton/copyButton.js +0 -69
- package/dist/components/patterns/copyButton/index.js +0 -1
- package/dist/components/patterns/emptyState/emptyState.js +0 -17
- package/dist/components/patterns/headerSection/headerSection.js +0 -17
- package/dist/components/patterns/headerSection/index.js +0 -1
- package/dist/components/patterns/iconWithIdentifier/iconWithIdentifier.js +0 -12
- package/dist/components/patterns/iconWithIdentifier/index.js +0 -1
- package/dist/components/patterns/linkWithIcon/index.js +0 -1
- package/dist/components/patterns/linkWithIcon/linkWithIcon.js +0 -26
- package/dist/components/tabs/index.js +0 -1
- package/dist/components/tabs/tabs.js +0 -70
- package/dist/components/tooltip/index.js +0 -2
- package/dist/components/tooltip/overflowChecker.js +0 -27
- package/dist/components/tooltip/tooltip.js +0 -97
- package/dist/hooks/useReduxFormField.js +0 -34
- package/dist/locales/description.js +0 -15
- package/dist/locales/es.js +0 -227
- package/dist/locales/index.js +0 -2
- package/dist/locales/translator.js +0 -20
- package/dist/styles/colors.js +0 -67
- package/dist/styles/styles/colors.tsx +0 -88
- package/dist/styles/styles/global.module.scss +0 -85
- package/dist/styles/styles/theme.tsx +0 -24
- package/dist/styles/styles/variables.module.scss +0 -74
- package/dist/styles/theme.js +0 -22
- package/dist/validators/errorMessage.js +0 -15
- package/dist/validators/index.js +0 -2
- package/dist/validators/validation.js +0 -25
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SaveButtonProps {
|
|
4
|
+
onSave: () => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
interface CancelButtonProps {
|
|
9
|
+
onCancel: () => void;
|
|
10
|
+
label?: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
interface PreviousButtonProps {
|
|
14
|
+
onPrevious: () => void;
|
|
15
|
+
label?: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
interface SaveBarProps {
|
|
19
|
+
saveProps: SaveButtonProps;
|
|
20
|
+
cancelProps: CancelButtonProps;
|
|
21
|
+
previousProps?: PreviousButtonProps;
|
|
22
|
+
variant?: "page" | "modal" | "fullPage";
|
|
23
|
+
}
|
|
24
|
+
export declare const ActionBar: React.FC<SaveBarProps>;
|
|
25
|
+
export type { SaveBarProps, SaveButtonProps, CancelButtonProps, PreviousButtonProps };
|
|
26
|
+
export default ActionBar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
interface CopyButtonProps {
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
copyText?: string;
|
|
5
|
+
copiedText?: string;
|
|
6
|
+
textToCopy?: string;
|
|
7
|
+
resetTime?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const CopyButton: ({ onClick, copyText, copiedText, textToCopy, resetTime, ...props }: CopyButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export type { CopyButtonProps };
|
|
11
|
+
export default CopyButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CopyButton, type CopyButtonProps } from './copyButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface EmptyStateProps {
|
|
4
|
+
onActionClick?: () => void;
|
|
5
|
+
actionText?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const EmptyState: ({ onActionClick, icon, actionText, text, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export type { EmptyStateProps };
|
|
11
|
+
export default EmptyState;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface HeaderSectionProps {
|
|
4
|
+
breadcrumb?: React.ReactNode;
|
|
5
|
+
image?: React.ReactNode;
|
|
6
|
+
dense?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
subtitle?: React.ReactNode;
|
|
9
|
+
link?: React.ReactNode;
|
|
10
|
+
menuAction?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const HeaderSection: React.FC<HeaderSectionProps>;
|
|
13
|
+
export type { HeaderSectionProps };
|
|
14
|
+
export default HeaderSection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HeaderSection, type HeaderSectionProps } from './headerSection';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface IconWithIdentifierProps {
|
|
4
|
+
text: string;
|
|
5
|
+
showDivider?: boolean;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const IconWithIdentifier: React.FC<IconWithIdentifierProps>;
|
|
10
|
+
export type { IconWithIdentifierProps };
|
|
11
|
+
export default IconWithIdentifier;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IconWithIdentifier, type IconWithIdentifierProps } from './iconWithIdentifier';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LinkWithIcon, type LinkComponentProps } from './linkWithIcon';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps } from '../../button/button';
|
|
3
|
+
|
|
4
|
+
interface LinkWithIconProps {
|
|
5
|
+
text: string;
|
|
6
|
+
icon?: React.ReactElement;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
size?: ButtonProps['size'];
|
|
10
|
+
otherProps?: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
export declare const LinkWithIcon: React.FC<LinkWithIconProps>;
|
|
13
|
+
export type { LinkWithIconProps as LinkComponentProps };
|
|
14
|
+
export default LinkWithIcon;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TabItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsProps {
|
|
10
|
+
items: TabItem[];
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
onChange?: (id: string) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Tabs: React.FC<TabsProps>;
|
|
17
|
+
export default Tabs;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const OverflowChecker: ({ children, }: {
|
|
4
|
+
children: (ref: React.RefObject<HTMLElement | HTMLDivElement | HTMLSpanElement | HTMLLabelElement>, showTooltip: boolean) => React.ReactNode;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
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
|
+
}
|
|
16
|
+
export declare const WithTooltip: ({ children, content, placement, arrow, maxWidth, trigger, shouldShowTooltip, ...otherProps }: WithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface CombinedTooltipProps extends BaseTooltipProps {
|
|
18
|
+
children: React.ReactElement;
|
|
19
|
+
}
|
|
20
|
+
export declare const WithOverflowTooltip: ({ content, children, ...tooltipProps }: CombinedTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/favicon.svg
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<!-- Fondo circular azul -->
|
|
4
|
+
<circle cx="16" cy="16" r="16" fill="#0045AD"/>
|
|
5
|
+
|
|
6
|
+
<!-- Patrón de puntos sutiles en el fondo -->
|
|
7
|
+
<circle cx="6" cy="6" r="0.8" fill="white" opacity="0.25"/>
|
|
8
|
+
<circle cx="26" cy="6" r="0.8" fill="white" opacity="0.25"/>
|
|
9
|
+
<circle cx="6" cy="26" r="0.8" fill="white" opacity="0.25"/>
|
|
10
|
+
<circle cx="26" cy="26" r="0.8" fill="white" opacity="0.25"/>
|
|
11
|
+
<circle cx="16" cy="4" r="0.5" fill="white" opacity="0.2"/>
|
|
12
|
+
<circle cx="16" cy="28" r="0.5" fill="white" opacity="0.2"/>
|
|
13
|
+
<circle cx="4" cy="16" r="0.5" fill="white" opacity="0.2"/>
|
|
14
|
+
<circle cx="28" cy="16" r="0.5" fill="white" opacity="0.2"/>
|
|
15
|
+
|
|
16
|
+
<!-- Líneas sutiles conectoras -->
|
|
17
|
+
<line x1="16" y1="4" x2="16" y2="7" stroke="white" stroke-width="0.3" opacity="0.2"/>
|
|
18
|
+
<line x1="16" y1="25" x2="16" y2="28" stroke="white" stroke-width="0.3" opacity="0.2"/>
|
|
19
|
+
<line x1="4" y1="16" x2="7" y2="16" stroke="white" stroke-width="0.3" opacity="0.2"/>
|
|
20
|
+
<line x1="25" y1="16" x2="28" y2="16" stroke="white" stroke-width="0.3" opacity="0.2"/>
|
|
21
|
+
|
|
22
|
+
<!-- Letra U redondeada y minimalista -->
|
|
23
|
+
<path
|
|
24
|
+
d="M9.5 11 v6.5
|
|
25
|
+
a4.5 4.5 0 0 0 9 0 v-6.5"
|
|
26
|
+
stroke="white"
|
|
27
|
+
stroke-width="3.2"
|
|
28
|
+
stroke-linecap="round"
|
|
29
|
+
stroke-linejoin="round"
|
|
30
|
+
fill="none"
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
<!-- Letra I redondeada y minimalista -->
|
|
34
|
+
<line
|
|
35
|
+
x1="22.5"
|
|
36
|
+
y1="11"
|
|
37
|
+
x2="22.5"
|
|
38
|
+
y2="21"
|
|
39
|
+
stroke="white"
|
|
40
|
+
stroke-width="3.2"
|
|
41
|
+
stroke-linecap="round"
|
|
42
|
+
/>
|
|
43
|
+
</svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ReduxFormInput = {
|
|
4
|
+
value: any;
|
|
5
|
+
onChange: (value: any) => void;
|
|
6
|
+
onBlur: () => void;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
interface UseReduxFormFieldParams<T, E = ChangeEvent<any>> {
|
|
10
|
+
input?: ReduxFormInput;
|
|
11
|
+
onChange?: (event: E) => void;
|
|
12
|
+
onBlur?: () => void;
|
|
13
|
+
transformValue?: (value: any, event: E) => T;
|
|
14
|
+
}
|
|
15
|
+
interface UseReduxFormFieldResult<E> {
|
|
16
|
+
handleChange: (event: E) => void;
|
|
17
|
+
handleBlur: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Hook to unify Redux Form and regular form field handling
|
|
21
|
+
*
|
|
22
|
+
* @param params Configuration object containing input, onChange, and transformValue
|
|
23
|
+
* @returns Object with handleChange and handleBlur functions
|
|
24
|
+
*/
|
|
25
|
+
export declare function useReduxFormField<T, E = ChangeEvent<any>>({ input, onChange, onBlur, transformValue, }: UseReduxFormFieldParams<T, E>): UseReduxFormFieldResult<E>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const onChangeSelectField = "\n Callback que se dispara cuando cambia el valor del input.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: El valor actual del input, que debe cumplir con la siguiente interfaz:\n \n ```typescript\n interface SelectOption {\n label: string;\n value: string | number;\n [key: string]: any;\n }\n ```\n";
|
|
2
|
+
export declare const onInputChange = "\n Callback que se ejecuta cuando escribimos algo en el buscador.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: El valor actual del input\n";
|
|
3
|
+
export declare const onChangeSearcher = "\n Callback que se ejecuta cuando seleccionamos una opcion del buscador.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: El valor actual del input, que debe cumplir con la siguiente interfaz:\n \n ``` typescript\n interface SelectOption {\n label: string;\n value: string | number;\n [key: string]: any;\n }\n ```\n";
|
|
4
|
+
export declare const onChangeCheckboxInput = "\n Callback que se dispara cuando cambia el valor del input.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: Siempre es \"on\"\n";
|
|
5
|
+
export declare const onChangeInput = "\n Callback que se dispara cuando cambia el valor del input.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: El valor actual del input, que debe cumplir con la siguiente interfaz:\n \n ``` typescript\n value: string | number; \n ```\n";
|
|
6
|
+
export declare const isOptionDisabled = " \n Funcion que recibe un valor de tipo SelectOption y deberia devolver un valor booleano\n Si la opci\u00F3n tiene definida un tooltipMessage se va a mostrar al hacer hover.\n \n#### Ejemplo\n ``` typescript\n const isOptionDisabled = (option: SelectOption) => option.value === 2;\n ```\n \n #### Interfaz\n ```typescript\n interface SelectOption {\n label: string;\n value: string | number;\n tooltipMessage?: string;\n [key: string]: any;\n }\n ```\n";
|
|
7
|
+
export declare const selectFieldDescription = "\n #### Ejemplo de uso \n ```typescript\n <SelectField\n name=\"productId\"\n options={[{ label: \"1\", value: 1 }, { label: \"2\", value: 2, tooltipMessage: \"Este valor no es representativo\" }]}\n onChange={(event) => handleChange(event.target.name, event.target.value)}\n isMultiple\n isClearable={false}\n label={localize('product')}\n isOptionDisabled={(option) => option.value == 2}\n rightModifier={shouldShowLoader && <Spinner />}\n />\n ```\n";
|
|
8
|
+
export declare const formFieldExample = "\n #### Ejemplo de uso\n \n ``` typescript\n <FormField\n label=\"T\u00EDtulo\"\n name=\"textInput\"\n onChange={(event) => handleChange(event.target.name, event.target.value)}\n placeholder=\"Placeholder\"\n size=\"md\"\n type=\"text\"\n isValid={(inputValue) => _.isNumber(inputValue)}\n />\n ```\n";
|
|
9
|
+
export declare const isValidInput = "\n Funcion que recibe un valor de tipo inputValue y deberia devolver un valor booleano.\n \n #### Por ejemplo: (inputValue) => _.isNumber(inputValue)\n \n ``` typescript\n type inputValue = string | number; \n ```\n";
|
|
10
|
+
export declare const checkboxInputGroupExample = "\n #### Ejemplo de uso\n \n ``` typescript\n <CheckboxInput\n items={[\n {\n id: '1',\n label: 'Opci\u00F3n 1'\n },\n {\n id: '2',\n label: 'Opci\u00F3n 2'\n },\n {\n disabled: true,\n id: '3',\n label: 'Opci\u00F3n 3'\n }\n ]}\n name=\"CheckboxList\"\n onChange={(event) => handleChange(event.target.name, event.target.value)}\n size=\"lg\"\n title=\"Selecciona una opci\u00F3n\"\n type=\"checkbox\"\n />\n ```\n";
|
|
11
|
+
export declare const checkboxInputExample = " \n Versi\u00F3n con una sola opci\u00F3n tipo checkbox y un label personalizado:\n \n ```typescript\n const [checked, setChecked] = React.useState(false)\n <CheckboxInput\n name=\"Toggle\"\n checked={checked}\n onChange={setChecked}\n label={\"Amazon\"}\n title={locale('syncStockFromChannel')}\n />\n ```\n";
|
|
12
|
+
export declare const searcherExample = " \n Note la diferencia entre onChange y onInputChange (oficia de onSearch):\n \n ```typescript\n <Searcher\n label=\"Search label\"\n name=\"Searcher\"\n onChange={(event) => onSelectOption(event.target.value)}\n onInputChange={(event) => handleSearch(event.target.value)}\n options={[{ label: 'text', value: 1 }]}\n />\n ```\n";
|
|
13
|
+
export declare const saveBarExample = "\n #### Uso b\u00E1sico\n ```typescript\n <SaveBar\n saveProps={{\n onSave: () => handleSave(),\n label: 'Save'\n }}\n cancelProps={{\n onCancel: () => handleCancel(),\n label: 'Cancel'\n }}\n />\n ```\n #### Con bot\u00F3n de navegaci\u00F3n\n ```typescript\n <SaveBar\n saveProps={{\n onSave: () => handleSave(),\n label: 'Save',\n variant: 'primary'\n }}\n cancelProps={{\n onCancel: () => handleCancel(),\n label: 'Cancel'\n }}\n previousProps={{\n onPrevious: () => handlePrevious(),\n label: 'Previous'\n }}\n />\n ```\n #### Ejemplo completo\n ```typescript\n <SaveBar\n saveProps={{\n onSave: () => handleSave(),\n label: 'Guardar cambios',\n variant: 'success',\n disabled: false,\n onClick: () => {},\n }}\n cancelProps={{\n onCancel: () => handleCancel(),\n label: 'Descartar',\n }}\n previousProps={{\n onPrevious: () => handlePrevious(),\n label: 'Anterior',\n variant: 'primary',\n outline: true,\n disabled: false,\n onClick: () => console.log('Previous clicked'),\n }}\n />\n ```\n";
|
|
14
|
+
export declare const checkboxInputReduxFormExample = "\n #### Ejemplo de uso con Redux Form - CheckboxInput\n \n ```typescript\n <Field\n name=\"salesSync\"\n component={CheckboxInput}\n classComponent={'decrease-stock'}\n props={{\n name: 'cancelSales',\n value: this.salesSync().cancelSales,\n checked: this.salesSync().cancelSales,\n label: this.context.localize('settings.cancelSales')\n }}\n />\n ```\n";
|
|
15
|
+
export declare const breadcrumbItemFormat = "\n ## Formato de BreadcrumbItem\n\n El componente Breadcrumb acepta un array de objetos `BreadcrumbItem` con las siguientes propiedades:\n\n ### Propiedades disponibles:\n\n - **`text`** (string, requerido): El texto que se muestra para el item del breadcrumb\n - **`onClick`** (function, opcional): Funci\u00F3n que se ejecuta al hacer click en el item\n - **`isActive`** (boolean, opcional): Indica si el item est\u00E1 activo. Por defecto, el \u00FAltimo item se considera activo\n - **`href`** (string, opcional): URL del enlace (actualmente no implementado en el renderizado)\n\n ### Comportamiento:\n\n - Los items con `onClick` se renderizan como botones clickeables\n - Los items sin `onClick` se renderizan como texto est\u00E1tico\n - El \u00FAltimo item siempre se considera activo (a menos que se especifique `isActive: true` en otro item)\n - Cada item se separa autom\u00E1ticamente con el s\u00EDmbolo \">\"\n\n ### Ejemplo de uso:\n\n ```tsx\n const breadcrumbItems = [\n { text: 'Dashboard' },\n { text: 'Productos', onClick: () => navigate('/products') },\n { text: 'Detalles', isActive: true }\n ]\n\n <Breadcrumb items={breadcrumbItems} />\n ```\n";
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
noResultsFound: string;
|
|
3
|
+
reloadPage: string;
|
|
4
|
+
selectPlaceholder: string;
|
|
5
|
+
selectOption: string;
|
|
6
|
+
noOptionsMessage: string;
|
|
7
|
+
noFoundOptions: string;
|
|
8
|
+
selectedPlural: string;
|
|
9
|
+
selected: string;
|
|
10
|
+
title: string;
|
|
11
|
+
password: string;
|
|
12
|
+
selectRequiredText: string;
|
|
13
|
+
exportedIcon: string;
|
|
14
|
+
syncStockFromChannel: string;
|
|
15
|
+
add: string;
|
|
16
|
+
previous: string;
|
|
17
|
+
continue: string;
|
|
18
|
+
cancel: string;
|
|
19
|
+
save: string;
|
|
20
|
+
guide: string;
|
|
21
|
+
hideSelectedOptionsExplainText: string;
|
|
22
|
+
switchInput: {
|
|
23
|
+
options: string;
|
|
24
|
+
option: string;
|
|
25
|
+
large: string;
|
|
26
|
+
medium: string;
|
|
27
|
+
small: string;
|
|
28
|
+
};
|
|
29
|
+
tooltip: {
|
|
30
|
+
hoverToSee: string;
|
|
31
|
+
basicContent: string;
|
|
32
|
+
showTooltipWhenHoverButton: string;
|
|
33
|
+
showTooltipWhenDisabled: string;
|
|
34
|
+
showTooltipWhenDisabledDescription: string;
|
|
35
|
+
basicDescription: string;
|
|
36
|
+
overflowDescription: string;
|
|
37
|
+
componentDescription: string;
|
|
38
|
+
maxWidthDescription: string;
|
|
39
|
+
clickToSee: string;
|
|
40
|
+
clickableTitle: string;
|
|
41
|
+
clickableDescription: string;
|
|
42
|
+
bulletPoint: string;
|
|
43
|
+
linkText: string;
|
|
44
|
+
};
|
|
45
|
+
description: {
|
|
46
|
+
checkboxInputReduxFormExample: string;
|
|
47
|
+
onChangeSelectField: string;
|
|
48
|
+
onInputChange: string;
|
|
49
|
+
onChangeSearcher: string;
|
|
50
|
+
onChangeCheckboxInput: string;
|
|
51
|
+
onChangeInput: string;
|
|
52
|
+
isOptionDisabled: string;
|
|
53
|
+
reduxForm: {
|
|
54
|
+
input: string;
|
|
55
|
+
};
|
|
56
|
+
selectField: {
|
|
57
|
+
example: string;
|
|
58
|
+
defaultValue: string;
|
|
59
|
+
disabled: string;
|
|
60
|
+
disabledOptions: string;
|
|
61
|
+
noOptions: string;
|
|
62
|
+
withIcon: string;
|
|
63
|
+
};
|
|
64
|
+
actionBar: {
|
|
65
|
+
example: string;
|
|
66
|
+
saveButton: string;
|
|
67
|
+
cancelButton: string;
|
|
68
|
+
previousButton: string;
|
|
69
|
+
saveButtonProps: string;
|
|
70
|
+
cancelButtonProps: string;
|
|
71
|
+
previousButtonProps: string;
|
|
72
|
+
withoutBorder: string;
|
|
73
|
+
saveChanges: string;
|
|
74
|
+
discard: string;
|
|
75
|
+
confirm: string;
|
|
76
|
+
verifySaveButtonOnly: string;
|
|
77
|
+
verifyInitialRendering: string;
|
|
78
|
+
clickSaveButton: string;
|
|
79
|
+
clickCancelButton: string;
|
|
80
|
+
clickPreviousButton: string;
|
|
81
|
+
clickSaveButtonOnly: string;
|
|
82
|
+
};
|
|
83
|
+
formField: {
|
|
84
|
+
example: string;
|
|
85
|
+
isValid: string;
|
|
86
|
+
};
|
|
87
|
+
checkboxInput: {
|
|
88
|
+
example: string;
|
|
89
|
+
checkboxInputExample: string;
|
|
90
|
+
checkboxInputGroupExample: string;
|
|
91
|
+
};
|
|
92
|
+
switchInput: {
|
|
93
|
+
example: string;
|
|
94
|
+
};
|
|
95
|
+
icons: {
|
|
96
|
+
size: string;
|
|
97
|
+
};
|
|
98
|
+
searcher: {
|
|
99
|
+
example: string;
|
|
100
|
+
exampleOption: string;
|
|
101
|
+
searchPlaceholder: string;
|
|
102
|
+
searchLabel: string;
|
|
103
|
+
noResults: string;
|
|
104
|
+
writeToSearch: string;
|
|
105
|
+
clearOnSelectDescription: string;
|
|
106
|
+
clearOnSelectStoryDescription: string;
|
|
107
|
+
};
|
|
108
|
+
breadcrumb: {
|
|
109
|
+
itemFormat: string;
|
|
110
|
+
};
|
|
111
|
+
alert: {
|
|
112
|
+
message: string;
|
|
113
|
+
infoMessage: string;
|
|
114
|
+
dontShowAgain: string;
|
|
115
|
+
customAlert: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
headerSection: {
|
|
119
|
+
edit: string;
|
|
120
|
+
duplicate: string;
|
|
121
|
+
delete: string;
|
|
122
|
+
};
|
|
123
|
+
error: {
|
|
124
|
+
required: string;
|
|
125
|
+
notValid: string;
|
|
126
|
+
};
|
|
127
|
+
copyButton: {
|
|
128
|
+
copy: string;
|
|
129
|
+
copied: string;
|
|
130
|
+
textToCopy: string;
|
|
131
|
+
textCopied: string;
|
|
132
|
+
copyKey: string;
|
|
133
|
+
copiedKey: string;
|
|
134
|
+
custom: string;
|
|
135
|
+
running: string;
|
|
136
|
+
alert: string;
|
|
137
|
+
};
|
|
138
|
+
linkWithIcon: {
|
|
139
|
+
historyChange: string;
|
|
140
|
+
edit: string;
|
|
141
|
+
customAction: string;
|
|
142
|
+
};
|
|
143
|
+
breadcrumb: {
|
|
144
|
+
historyChanges: string;
|
|
145
|
+
products: string;
|
|
146
|
+
dashboard: string;
|
|
147
|
+
categories: string;
|
|
148
|
+
electronics: string;
|
|
149
|
+
details: string;
|
|
150
|
+
page1: string;
|
|
151
|
+
page2: string;
|
|
152
|
+
page3: string;
|
|
153
|
+
home: string;
|
|
154
|
+
};
|
|
155
|
+
datePicker: {
|
|
156
|
+
name: string;
|
|
157
|
+
value: string;
|
|
158
|
+
size: string;
|
|
159
|
+
disabled: string;
|
|
160
|
+
required: string;
|
|
161
|
+
noErrors: string;
|
|
162
|
+
placeholder: string;
|
|
163
|
+
label: string;
|
|
164
|
+
format: string;
|
|
165
|
+
minDate: string;
|
|
166
|
+
maxDate: string;
|
|
167
|
+
rightAdornment: string;
|
|
168
|
+
meta: string;
|
|
169
|
+
isValid: string;
|
|
170
|
+
input: string;
|
|
171
|
+
onChange: string;
|
|
172
|
+
selectDate: string;
|
|
173
|
+
dateLabel: string;
|
|
174
|
+
selectADate: string;
|
|
175
|
+
requiredDate: string;
|
|
176
|
+
requiredField: string;
|
|
177
|
+
dateAndTime: string;
|
|
178
|
+
dateWithLimits: string;
|
|
179
|
+
onlyFutureDates: string;
|
|
180
|
+
customFormat: string;
|
|
181
|
+
yearSelector: string;
|
|
182
|
+
timeSelector: string;
|
|
183
|
+
timeSelectorWithSeconds: string;
|
|
184
|
+
dateTimeSelector: string;
|
|
185
|
+
selectYear: string;
|
|
186
|
+
selectTime: string;
|
|
187
|
+
selectDateTime: string;
|
|
188
|
+
};
|
|
189
|
+
dateRangePicker: {
|
|
190
|
+
size: string;
|
|
191
|
+
disabled: string;
|
|
192
|
+
required: string;
|
|
193
|
+
noErrors: string;
|
|
194
|
+
placeholder: string;
|
|
195
|
+
label: string;
|
|
196
|
+
format: string;
|
|
197
|
+
minDate: string;
|
|
198
|
+
maxDate: string;
|
|
199
|
+
onChange: string;
|
|
200
|
+
selectDateRange: string;
|
|
201
|
+
dateRangeLabel: string;
|
|
202
|
+
disabledRange: string;
|
|
203
|
+
disabledComponent: string;
|
|
204
|
+
rangeWithMinMax: string;
|
|
205
|
+
restrictedRange: string;
|
|
206
|
+
disabledWithRestrictions: string;
|
|
207
|
+
completelyDisabled: string;
|
|
208
|
+
};
|
|
209
|
+
chip: {
|
|
210
|
+
text: string;
|
|
211
|
+
title: string;
|
|
212
|
+
onRemove: string;
|
|
213
|
+
disabled: string;
|
|
214
|
+
variant: string;
|
|
215
|
+
size: string;
|
|
216
|
+
};
|
|
217
|
+
warningModal: {
|
|
218
|
+
warning: string;
|
|
219
|
+
dontShowAgain: string;
|
|
220
|
+
};
|
|
221
|
+
tab: {
|
|
222
|
+
tab1: string;
|
|
223
|
+
tab2: string;
|
|
224
|
+
tab3: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
export default _default;
|