@producteca/producteca-ui-kit 1.23.0 → 1.25.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.
@@ -0,0 +1,4 @@
1
+ import { DropdownProps } from './dropdown.types';
2
+ import * as React from 'react';
3
+ export declare const Dropdown: React.FC<DropdownProps>;
4
+ export default Dropdown;
@@ -0,0 +1,6 @@
1
+ import { MenuProps } from '@mui/material/Menu';
2
+
3
+ export declare const StyledMenu: import('@emotion/styled').StyledComponent<MenuProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, {}, {}>;
4
+ export declare const StyledButton: import('@emotion/styled').StyledComponent<import('@mui/material/Button').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
5
+ ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
6
+ }, "variant" | "size" | "className" | "disabled" | "children" | "color" | "style" | "classes" | "sx" | "tabIndex" | "href" | "action" | "loading" | "loadingIndicator" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "fullWidth" | "disableFocusRipple" | "disableElevation" | "endIcon" | "loadingPosition" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, {}, {}>;
@@ -0,0 +1,20 @@
1
+ import { DropdownItem } from '../menu/menuItem/menuItem.types';
2
+
3
+ export interface DropdownProps {
4
+ label: string;
5
+ items: DropdownItem[];
6
+ disabled?: boolean;
7
+ open?: boolean;
8
+ onToggle?: (open: boolean) => void;
9
+ onItemSelect?: (item: DropdownItem) => void;
10
+ anchorOrigin?: {
11
+ vertical: 'top' | 'bottom';
12
+ horizontal: 'left' | 'center' | 'right';
13
+ };
14
+ transformOrigin?: {
15
+ vertical: 'top' | 'bottom';
16
+ horizontal: 'left' | 'center' | 'right';
17
+ };
18
+ className?: string;
19
+ size?: 'sm' | 'lg';
20
+ }
@@ -0,0 +1,3 @@
1
+ export { Dropdown } from './dropdown';
2
+ export type { DropdownProps } from './dropdown.types';
3
+ export type { DropdownItem } from '../menu/menuItem/menuItem.types';
@@ -8,7 +8,7 @@ export * from './alert/alert';
8
8
  export * from './tooltip';
9
9
  export * from './image';
10
10
  export * from './breadcrumb';
11
- export * from './menuAction';
11
+ export * from './menu/menuAction';
12
12
  export * from './modals';
13
13
  export * from './tabs';
14
14
  export * from './sidebar';
@@ -0,0 +1,3 @@
1
+ export { MenuAction, type MenuActionProps, type MenuActionItemProps } from './menuAction';
2
+ export { MenuItemComponent, type MenuItemProps } from '../menuItem/menuItem';
3
+ export { type BaseMenuItemProps, type MenuItemWithId, type DropdownItem, type MenuActionItemProps as MenuActionItemPropsType } from '../menuItem/menuItem.types';
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { MenuActionItemProps } from '../menuItem/menuItem.types';
3
+ import { MenuActionProps } from './menuAction.types';
4
+
5
+ export declare const MenuAction: React.FC<MenuActionProps>;
6
+ export type { MenuActionProps, MenuActionItemProps };
7
+ export default MenuAction;
@@ -0,0 +1,3 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+
3
+ export declare const menuPaperSx: SxProps<Theme>;
@@ -0,0 +1,10 @@
1
+ import { MenuActionItemProps } from '../menuItem/menuItem.types';
2
+ import { default as React } from 'react';
3
+
4
+ export interface MenuActionProps {
5
+ items: MenuActionItemProps[];
6
+ id?: string;
7
+ maxItemsVisible?: number;
8
+ icon?: React.ReactNode;
9
+ otherProps?: React.HTMLAttributes<HTMLButtonElement>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { BaseMenuItemProps } from './menuItem.types';
3
+
4
+ interface MenuItemProps extends BaseMenuItemProps {
5
+ onClose?: () => void;
6
+ size?: "lg" | "md" | "sm";
7
+ }
8
+ export declare const MenuItemComponent: React.FC<MenuItemProps>;
9
+ export type { MenuItemProps };
10
+ export default MenuItemComponent;
@@ -0,0 +1,3 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+
3
+ export declare const menuItemSx: SxProps<Theme>;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface BaseMenuItemProps {
4
+ label: React.ReactNode;
5
+ icon?: React.ReactElement;
6
+ onClick?: () => void;
7
+ disabled?: boolean;
8
+ selected?: boolean;
9
+ }
10
+ export interface MenuItemWithId extends BaseMenuItemProps {
11
+ id: string;
12
+ divider?: boolean;
13
+ }
14
+ export type MenuItemProps = BaseMenuItemProps;
15
+ export type DropdownItem = MenuItemWithId;
16
+ export type MenuActionItemProps = BaseMenuItemProps;
@@ -13,3 +13,4 @@ export declare const searcherExample = " \n Note la diferencia entre onChange
13
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
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
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";
16
+ 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";
@@ -224,6 +224,32 @@ declare const _default: {
224
224
  tab2: string;
225
225
  tab3: string;
226
226
  };
227
+ menuAction: {
228
+ edit: string;
229
+ delete: string;
230
+ duplicate: string;
231
+ itemsDescription: string;
232
+ id: string;
233
+ maxItems: string;
234
+ icon: string;
235
+ };
236
+ dropdown: {
237
+ label: string;
238
+ variant: string;
239
+ color: string;
240
+ disabled: string;
241
+ onItemSelect: string;
242
+ onToggle: string;
243
+ options: string;
244
+ edit: string;
245
+ duplicate: string;
246
+ archive: string;
247
+ more: string;
248
+ delete: string;
249
+ share: string;
250
+ divider: string;
251
+ size: string;
252
+ };
227
253
  sidebar: {
228
254
  monitoringCenter: string;
229
255
  history: string;