@acvl/frontend-components 0.0.87 → 0.0.89

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _mui_material from '@mui/material';
2
- import { ButtonProps, ButtonGroupProps, IconButtonProps, MenuItemProps, BoxProps, AutocompleteProps, SliderProps, SwitchProps, GridProps, DrawerProps, SxProps, Theme, StackProps, TypographyProps, MenuProps, PaletteColorOptions, TextFieldProps as TextFieldProps$1, InputBaseProps, DialogProps, DialogContentProps } from '@mui/material';
2
+ import { ButtonProps, ButtonGroupProps, IconButtonProps, MenuItemProps, BoxProps, AutocompleteProps, SliderProps, SwitchProps, ToggleButtonGroupProps, GridProps, DrawerProps, SxProps, Theme, StackProps, TypographyProps, MenuProps, PaletteColorOptions, TextFieldProps as TextFieldProps$1, InputBaseProps, DialogProps, DialogContentProps } from '@mui/material';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ReactNode, Dispatch, SetStateAction, JSX, RefObject, FC, ReactElement, ComponentType, BaseSyntheticEvent, JSXElementConstructor, ElementType } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -202,7 +202,7 @@ interface CoverPageCardProps$1 {
202
202
  }
203
203
  declare const ModuleCard: React__default.FC<CoverPageCardProps$1>;
204
204
 
205
- type PageType = 'detail' | 'list' | 'edit' | 'create';
205
+ type PageType = "detail" | "list" | "edit" | "create";
206
206
  interface ComoOpcionesProps {
207
207
  endpoint: string;
208
208
  filters?: any;
@@ -235,7 +235,7 @@ interface MyGridFilterModel {
235
235
  quickFilterValues?: string;
236
236
  }
237
237
  interface MyDataGridProps extends DataGridProps {
238
- initialState?: DataGridProps['initialState'] & {
238
+ initialState?: DataGridProps["initialState"] & {
239
239
  filters?: {
240
240
  filterModel: MyGridFilterModel;
241
241
  };
@@ -582,7 +582,14 @@ interface ControlledSliderProps$1 extends BaseControlledFieldProps {
582
582
  declare const ControlledSlider$1: React__default.FC<ControlledSliderProps$1>;
583
583
 
584
584
  interface ControlledSwitchProps extends BaseControlledFieldProps {
585
- fieldProps?: SwitchProps;
585
+ /**
586
+ * Props del `Switch` de MUI, más `helperText`: el texto de ayuda que se pinta
587
+ * debajo, como en `ControlledText`. No es prop del `Switch`, así que se aparta
588
+ * antes del spread para que no le llegue a MUI.
589
+ */
590
+ fieldProps?: SwitchProps & {
591
+ helperText?: React__default.ReactNode;
592
+ };
586
593
  }
587
594
  declare const ControlledSwitch: React__default.FC<ControlledSwitchProps>;
588
595
 
@@ -595,7 +602,18 @@ interface ControlledTextProps extends BaseControlledFieldProps {
595
602
  declare const ControlledText: React__default.FC<ControlledTextProps>;
596
603
 
597
604
  interface ControlledToggleButtonsProps extends BaseControlledFieldProps {
598
- fieldProps?: SwitchProps;
605
+ /**
606
+ * Props del `ToggleButtonGroup` de MUI, más `helperText`: el texto de ayuda que se pinta
607
+ * debajo, como en `ControlledSwitch`. No es prop del grupo, así que se aparta antes del
608
+ * spread para que no le llegue a MUI.
609
+ *
610
+ * Quedan fuera las que controla el componente: `value` y `onChange` son del formulario,
611
+ * `exclusive` lo exige `handleChange` (asume un solo valor) y `children` sale de
612
+ * `extraProps.options`.
613
+ */
614
+ fieldProps?: Omit<ToggleButtonGroupProps, "value" | "onChange" | "exclusive" | "children"> & {
615
+ helperText?: ReactNode;
616
+ };
599
617
  extraProps: {
600
618
  options: {
601
619
  value: string;
@@ -1022,7 +1040,7 @@ declare function DetailPage$1(props: DetailPageProps): react_jsx_runtime.JSX.Ele
1022
1040
 
1023
1041
  /**
1024
1042
  * Muestra animación de cargado hasta arriba de la página
1025
- **/
1043
+ **/
1026
1044
  declare const Loadable: (Component: any) => (props: any) => react_jsx_runtime.JSX.Element;
1027
1045
 
1028
1046
  interface LoadingComponentProps {
@@ -1038,7 +1056,7 @@ declare const LoadingComponent: React__default.FC<LoadingComponentProps>;
1038
1056
  * El archivo de marca es un PNG con fondo transparente, bola roja y letras
1039
1057
  * negras. En claro va tal cual; en oscuro las letras negras desaparecerían
1040
1058
  * contra el fondo, así que se recolorea por CSS a blanco.
1041
- **/
1059
+ **/
1042
1060
  interface LogoProps {
1043
1061
  /** Altura máxima en px. */
1044
1062
  maxHeight?: number;
@@ -1092,15 +1110,15 @@ declare const Tabs: React__default.FC<MyTabProps>;
1092
1110
 
1093
1111
  interface TransitionsProps {
1094
1112
  children?: ReactNode;
1095
- position?: 'top-left' | 'top-right' | 'top' | 'bottom-left' | 'bottom-right' | 'bottom';
1096
- type?: 'grow' | 'fade' | 'collapse' | 'slide' | 'zoom';
1097
- direction?: 'up' | 'down' | 'left' | 'right';
1113
+ position?: "top-left" | "top-right" | "top" | "bottom-left" | "bottom-right" | "bottom";
1114
+ type?: "grow" | "fade" | "collapse" | "slide" | "zoom";
1115
+ direction?: "up" | "down" | "left" | "right";
1098
1116
  boxSX?: BoxProps;
1099
1117
  [x: string]: any;
1100
1118
  }
1101
1119
  /**
1102
1120
  * Componente customizable para generar efectos de transición
1103
- **/
1121
+ **/
1104
1122
  declare const Transitions: React$1.ForwardRefExoticComponent<Omit<TransitionsProps, "ref"> & React$1.RefAttributes<unknown>>;
1105
1123
 
1106
1124
  interface ListPageProps {
@@ -1755,7 +1773,7 @@ declare const _default$1: redux.Reducer<{
1755
1773
 
1756
1774
  /**
1757
1775
  * Declara la sección de configuración en la tienda
1758
- **/
1776
+ **/
1759
1777
  interface Props$1 {
1760
1778
  title?: string;
1761
1779
  }
@@ -1835,8 +1853,8 @@ declare const HistorialDrawer: React__default.FC<HistorialDrawerProps>;
1835
1853
  * El tema publica dos esquemas de color (claro y oscuro) como variables CSS, así
1836
1854
  * que cambiar de modo no reconstruye el tema: solo cambia el atributo del `<html>`
1837
1855
  * y el navegador resuelve las variables. Ver `useColorMode` para el interruptor.
1838
- **/
1839
- declare module '@mui/material/styles' {
1856
+ **/
1857
+ declare module "@mui/material/styles" {
1840
1858
  interface PaletteColor {
1841
1859
  lighter?: string;
1842
1860
  darker?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acvl/frontend-components",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "description": "Component library for ACV frontend projects.",
5
5
  "homepage": "https://github.com/ACV-Logistics/acv-frontend-components#readme",
6
6
  "access": "public",
@@ -22,7 +22,9 @@
22
22
  "scripts": {
23
23
  "dev": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript --watch",
24
24
  "build": "rimraf dist && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript && rimraf dist/esm/types",
25
- "test": "vitest run"
25
+ "test": "vitest run",
26
+ "format": "prettier --write .",
27
+ "format:check": "prettier --check ."
26
28
  },
27
29
  "devDependencies": {
28
30
  "@babel/core": "^7.29.0",
@@ -39,6 +41,7 @@
39
41
  "@types/react": "^19.2.14",
40
42
  "@types/rollup-plugin-peer-deps-external": "^2.2.6",
41
43
  "postcss": "^8.5.8",
44
+ "prettier": "3.9.6",
42
45
  "react": "^19.2.5",
43
46
  "react-dom": "^19.2.4",
44
47
  "rimraf": "^6.1.3",