@m4l/components 9.2.63 → 9.2.64

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.
Files changed (45) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/ContainerFlow/ContainerFlow.d.ts +7 -0
  3. package/components/ContainerFlow/ContainerFlow.js +25 -0
  4. package/components/ContainerFlow/ContainerFlow.styles.d.ts +2 -0
  5. package/components/ContainerFlow/ContainerFlow.styles.js +46 -0
  6. package/components/ContainerFlow/constants.d.ts +9 -0
  7. package/components/ContainerFlow/constants.js +21 -0
  8. package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.d.ts +7 -0
  9. package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.js +10 -0
  10. package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.test.d.ts +1 -0
  11. package/components/ContainerFlow/index.d.ts +2 -0
  12. package/components/ContainerFlow/index.js +1 -0
  13. package/components/ContainerFlow/slots/ContainerFlowEnum.d.ts +4 -0
  14. package/components/ContainerFlow/slots/ContainerFlowEnum.js +8 -0
  15. package/components/ContainerFlow/slots/ContainerFlowSlots.d.ts +6 -0
  16. package/components/ContainerFlow/slots/ContainerFlowSlots.js +16 -0
  17. package/components/ContainerFlow/slots/index.d.ts +0 -0
  18. package/components/ContainerFlow/tests/ContainerFlow.test.d.ts +1 -0
  19. package/components/ContainerFlow/types.d.ts +41 -0
  20. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
  21. package/components/Image/Image.js +4 -2
  22. package/components/Image/image.styles.js +6 -3
  23. package/components/Image/types.d.ts +5 -0
  24. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
  25. package/components/PropertyValue/PropertyValue.styles.js +1 -1
  26. package/components/areas/contexts/AreasContext/store.js +2 -2
  27. package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
  28. package/components/index.d.ts +1 -0
  29. package/components/mui_extended/Accordion/styles.js +3 -5
  30. package/components/mui_extended/TabContent/TabContent.styles.js +3 -0
  31. package/components/mui_extended/TabContent/constants.d.ts +1 -0
  32. package/components/mui_extended/TabContent/constants.js +2 -0
  33. package/components/mui_extended/Typography/Typography.js +3 -1
  34. package/components/mui_extended/Typography/types.d.ts +5 -0
  35. package/components/mui_extended/Typography/typography.styles.js +7 -1
  36. package/index.js +32 -30
  37. package/package.json +1 -1
  38. package/storybook/components/ContainerFlow/ContainerFlow.stories.d.ts +32 -0
  39. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn/index.d.ts +5 -0
  40. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn1Wrappers/index.d.ts +5 -0
  41. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn2Wrappers/index.d.ts +5 -0
  42. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn3Wrappers/index.d.ts +5 -0
  43. package/storybook/components/ContainerFlow/subcomponents/RenderFlexWrap/index.d.ts +5 -0
  44. package/storybook/components/ContainerFlow/subcomponents/RenderGridLayout/index.d.ts +5 -0
  45. package/storybook/components/ContainerFlow/wrapperItems/index.d.ts +10 -0
package/@types/types.d.ts CHANGED
@@ -149,6 +149,7 @@ import { ScrollBarOwnerState, ScrollBarSlotsType } from '../components/ScrollBar
149
149
  import { SplitLayoutOwnerState } from '../components/extended/React-resizable-panels/types';
150
150
  import { ObjectLogsOwnerState, ObjectLogsSlotsType } from '../components/ObjectLogs/types';
151
151
  import { LanguagePopoverOwnerState, LanguagePopoverSlotsType } from '../components/LanguagePopover/types';
152
+ import { ContainerFlowOwnerState, ContainerFlowSlotsType } from '../components/ContainerFlow/types';
152
153
  declare module '@mui/material/styles' {
153
154
  // Define the slots in the theme
154
155
  interface ComponentNameToClassKey {
@@ -228,6 +229,7 @@ declare module '@mui/material/styles' {
228
229
  M4LSplitLayout: SplitLayoutOwnerState;
229
230
  M4LObjectLogs: ObjectLogsSlotsType;
230
231
  M4LLanguagePopover: LanguagePopoverSlotsType;
232
+ M4LContainerFlow: ContainerFlowSlotsType;
231
233
  }
232
234
  interface ComponentsPropsList {
233
235
  // Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
@@ -307,6 +309,7 @@ declare module '@mui/material/styles' {
307
309
  M4LSplitLayout: Partial<SplitLayoutOwnerState>;
308
310
  M4LObjectLogs: Partial<ObjectLogsOwnerState>;
309
311
  M4LLanguagePopover: Partial<LanguagePopoverOwnerState>;
312
+ M4LContainerFlow: Partial<ContainerFlowOwnerState>;
310
313
  }
311
314
  interface Components {
312
315
  M4LDynamicFilter?: {
@@ -699,5 +702,10 @@ declare module '@mui/material/styles' {
699
702
  styleOverrides?: ComponentsOverrides<Theme>['M4LLanguagePopover'];
700
703
  variants?: ComponentsVariants['M4LLanguagePopover'];
701
704
  };
705
+ M4LContainerFlow?: {
706
+ defaultProps?: ComponentsPropsList['M4LContainerFlow'];
707
+ styleOverrides?: ComponentsOverrides<Theme>['M4LContainerFlow'];
708
+ variants?: ComponentsVariants['M4LContainerFlow'];
709
+ };
702
710
  }
703
711
  }
@@ -0,0 +1,7 @@
1
+ import { ContainerFlowProps } from './types';
2
+ /**
3
+ * Componente que permite renderizar un contenedor de items en forma de flujo.
4
+ * @param props - Propiedades del componente.
5
+ * @returns Un componente de tipo div con los estilos del contenedor de items.
6
+ */
7
+ export declare const ContainerFlow: (props: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { C as CONTAINER_FLOW_CLASSES } from "./constants.js";
3
+ import { C as ContainerFlowWrapperItemStyled, a as ContainerFlowRootStyled } from "./slots/ContainerFlowSlots.js";
4
+ import clsx from "clsx";
5
+ const ContainerFlow = (props) => {
6
+ const { variant = "column-flex", size, children, minWidth, className, gap = "standard" } = props;
7
+ const isColumnFlex = variant === "column-flex";
8
+ const ownerState = {
9
+ variant,
10
+ size,
11
+ minWidth,
12
+ gap
13
+ };
14
+ const childrenArray = Array.isArray(children) ? children : children ? [children] : [];
15
+ let itemsToRender;
16
+ if (!isColumnFlex && children) {
17
+ itemsToRender = children;
18
+ } else if (childrenArray.length > 0) {
19
+ itemsToRender = childrenArray.map((child, index) => /* @__PURE__ */ jsx(ContainerFlowWrapperItemStyled, { role: "listitem", ownerState: { variant, size }, className: CONTAINER_FLOW_CLASSES.wrapperItem, children: child }, index));
20
+ }
21
+ return /* @__PURE__ */ jsx(ContainerFlowRootStyled, { role: "list", ownerState, className: clsx(CONTAINER_FLOW_CLASSES.root, className), children: itemsToRender });
22
+ };
23
+ export {
24
+ ContainerFlow as C
25
+ };
@@ -0,0 +1,2 @@
1
+ import { ContainerFlowStyles } from './types';
2
+ export declare const containerFlowStyles: ContainerFlowStyles;
@@ -0,0 +1,46 @@
1
+ import { g as getSpacingValue } from "./helpers/getSpacingValue/getSpacingValue.js";
2
+ import { a as CONTAINER_FLOW_MIN_WIDTH_VALUES, b as CONTAINER_QUERY_NAME } from "./constants.js";
3
+ const containerFlowStyles = {
4
+ /**
5
+ * Estilos para el contenedor raíz del componente.
6
+ */
7
+ root: ({ ownerState }) => ({
8
+ width: "100%",
9
+ height: "100%",
10
+ gap: getSpacingValue(ownerState?.gap ?? "standard"),
11
+ containerName: CONTAINER_QUERY_NAME,
12
+ containerType: "inline-size",
13
+ ...ownerState?.variant === "grid-layout" && {
14
+ display: "grid",
15
+ gridTemplateColumns: `repeat(auto-fill, minmax(${ownerState.minWidth ?? 200}px, 1fr))`,
16
+ height: "fit-content"
17
+ },
18
+ ...(ownerState?.variant === "column-flex" || ownerState?.variant === "flex-wrap") && {
19
+ display: "flex",
20
+ flexDirection: "row",
21
+ flexWrap: "wrap",
22
+ height: "fit-content",
23
+ "& > .M4LContainerFlow-wrapperItem": {
24
+ minWidth: ownerState?.minWidth ?? CONTAINER_FLOW_MIN_WIDTH_VALUES,
25
+ flex: 1
26
+ },
27
+ [`@container ${CONTAINER_QUERY_NAME} (max-width: ${ownerState?.minWidth ? ownerState?.minWidth - 1 : 200 - 1}px)`]: {
28
+ "& > .M4LContainerFlow-wrapperItem": {
29
+ minWidth: "100%",
30
+ maxWidth: "100%"
31
+ }
32
+ }
33
+ }
34
+ }),
35
+ /**
36
+ * Estilos para el contenedor de los items del componente.
37
+ */
38
+ wrapperItem: () => ({
39
+ display: "flex",
40
+ flexDirection: "row",
41
+ flexWrap: "wrap"
42
+ })
43
+ };
44
+ export {
45
+ containerFlowStyles as c
46
+ };
@@ -0,0 +1,9 @@
1
+ export declare const CONTAINER_FLOW_KEY_COMPONENT = "M4LContainerFlow";
2
+ export declare const CONTAINER_FLOW_CLASSES: Record<string, string>;
3
+ export declare const CONTAINER_FLOW_GAP_VALUES: {
4
+ compact: number;
5
+ standard: number;
6
+ comfortable: number;
7
+ };
8
+ export declare const CONTAINER_QUERY_NAME = "container";
9
+ export declare const CONTAINER_FLOW_MIN_WIDTH_VALUES = 280;
@@ -0,0 +1,21 @@
1
+ import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
2
+ import { C as ContainerFlowSlots } from "./slots/ContainerFlowEnum.js";
3
+ const CONTAINER_FLOW_KEY_COMPONENT = "M4LContainerFlow";
4
+ const CONTAINER_FLOW_CLASSES = getComponentClasses(
5
+ CONTAINER_FLOW_KEY_COMPONENT,
6
+ ContainerFlowSlots
7
+ );
8
+ const CONTAINER_FLOW_GAP_VALUES = {
9
+ compact: 8,
10
+ standard: 16,
11
+ comfortable: 24
12
+ };
13
+ const CONTAINER_QUERY_NAME = "container";
14
+ const CONTAINER_FLOW_MIN_WIDTH_VALUES = 280;
15
+ export {
16
+ CONTAINER_FLOW_CLASSES as C,
17
+ CONTAINER_FLOW_MIN_WIDTH_VALUES as a,
18
+ CONTAINER_QUERY_NAME as b,
19
+ CONTAINER_FLOW_GAP_VALUES as c,
20
+ CONTAINER_FLOW_KEY_COMPONENT as d
21
+ };
@@ -0,0 +1,7 @@
1
+ import { SemanticSpacings } from '../../types';
2
+ /**
3
+ * Función que retorna el valor del gap en función del tipo de gap recibido.
4
+ * @param gap - El gap a convertir.
5
+ * @returns El valor del gap en función del tipo de gap recibido.
6
+ */
7
+ export declare const getSpacingValue: (gap: SemanticSpacings | number) => number;
@@ -0,0 +1,10 @@
1
+ import { c as CONTAINER_FLOW_GAP_VALUES } from "../../constants.js";
2
+ const getSpacingValue = (gap) => {
3
+ if (typeof gap === "number") {
4
+ return gap;
5
+ }
6
+ return CONTAINER_FLOW_GAP_VALUES[gap];
7
+ };
8
+ export {
9
+ getSpacingValue as g
10
+ };
@@ -0,0 +1,2 @@
1
+ export { ContainerFlow } from './ContainerFlow';
2
+ export type { ContainerFlowProps } from './types';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ export declare enum ContainerFlowSlots {
2
+ root = "root",
3
+ wrapperItem = "wrapperItem"
4
+ }
@@ -0,0 +1,8 @@
1
+ var ContainerFlowSlots = /* @__PURE__ */ ((ContainerFlowSlots2) => {
2
+ ContainerFlowSlots2["root"] = "root";
3
+ ContainerFlowSlots2["wrapperItem"] = "wrapperItem";
4
+ return ContainerFlowSlots2;
5
+ })(ContainerFlowSlots || {});
6
+ export {
7
+ ContainerFlowSlots as C
8
+ };
@@ -0,0 +1,6 @@
1
+ export declare const ContainerFlowRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
2
+ ownerState?: (Partial<import('../types').ContainerFlowOwnerState> & Record<string, unknown>) | undefined;
3
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
+ export declare const ContainerFlowWrapperItemStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
5
+ ownerState?: (Partial<import('../types').ContainerFlowOwnerState> & Record<string, unknown>) | undefined;
6
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
@@ -0,0 +1,16 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { d as CONTAINER_FLOW_KEY_COMPONENT } from "../constants.js";
3
+ import { C as ContainerFlowSlots } from "./ContainerFlowEnum.js";
4
+ import { c as containerFlowStyles } from "../ContainerFlow.styles.js";
5
+ const ContainerFlowRootStyled = styled("div", {
6
+ name: CONTAINER_FLOW_KEY_COMPONENT,
7
+ slot: ContainerFlowSlots.root
8
+ })(containerFlowStyles?.root);
9
+ const ContainerFlowWrapperItemStyled = styled("div", {
10
+ name: CONTAINER_FLOW_KEY_COMPONENT,
11
+ slot: ContainerFlowSlots.wrapperItem
12
+ })(containerFlowStyles?.wrapperItem);
13
+ export {
14
+ ContainerFlowWrapperItemStyled as C,
15
+ ContainerFlowRootStyled as a
16
+ };
File without changes
@@ -0,0 +1,41 @@
1
+ import { Sizes } from '@m4l/styles';
2
+ import { ContainerFlowSlots } from './slots/ContainerFlowEnum';
3
+ import { CONTAINER_FLOW_KEY_COMPONENT } from './constants';
4
+ import { Theme } from '@mui/material';
5
+ import { M4LOverridesStyleRules } from '../../@types/augmentations';
6
+ export type ContainerFlowVariant = 'flex-wrap' | 'column-flex' | 'grid-layout';
7
+ export type SemanticSpacings = 'compact' | 'comfortable' | 'standard';
8
+ export type ContainerFlowProps = {
9
+ /**
10
+ * Variante del contenedor de items.
11
+ */
12
+ variant: ContainerFlowVariant;
13
+ /**
14
+ * Items del contenedor de items.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Tamaño del contenedor de items.
19
+ */
20
+ size?: Extract<Sizes, 'small' | 'medium'>;
21
+ /**
22
+ * Ancho mínimo de los items del contenedor de items.
23
+ */
24
+ minWidth?: number;
25
+ /**
26
+ * Clase del contenedor de items.
27
+ */
28
+ className?: string;
29
+ /**
30
+ * Espacio entre los items del contenedor de items.
31
+ */
32
+ gap?: SemanticSpacings | number;
33
+ };
34
+ export type ContainerFlowSlotsType = keyof typeof ContainerFlowSlots;
35
+ export type ContainerFlowOwnerState = {
36
+ variant: ContainerFlowProps['variant'];
37
+ size: ContainerFlowProps['size'];
38
+ minWidth: ContainerFlowProps['minWidth'];
39
+ gap: ContainerFlowProps['gap'];
40
+ };
41
+ export type ContainerFlowStyles = M4LOverridesStyleRules<ContainerFlowSlots, typeof CONTAINER_FLOW_KEY_COMPONENT, Theme>;
@@ -17,6 +17,7 @@ function getComparator(columns, sortColumn) {
17
17
  return column.customSort;
18
18
  }
19
19
  switch (typeOrder) {
20
+ //Si el tipo de dato de la columna es un numerico, retorna una función de ordenamiento numérica
20
21
  case "number":
21
22
  return (a, b) => {
22
23
  try {
@@ -25,6 +26,7 @@ function getComparator(columns, sortColumn) {
25
26
  return -1;
26
27
  }
27
28
  };
29
+ //Por defecto retorna una función de ordenamiento de string
28
30
  default:
29
31
  return (a, b) => {
30
32
  try {
@@ -13,12 +13,14 @@ function Image(props) {
13
13
  threshold = 100,
14
14
  dataTestId,
15
15
  className,
16
+ cover,
16
17
  ...others
17
18
  } = props;
18
19
  const isSkeleton = useModuleSkeleton();
19
20
  const ownerState = useMemo(() => ({
20
- isSkeleton
21
- }), [isSkeleton]);
21
+ isSkeleton,
22
+ cover
23
+ }), [cover, isSkeleton]);
22
24
  const lazyLoadComponent = useMemo(() => {
23
25
  return /* @__PURE__ */ jsx(
24
26
  LazyLoadComponent,
@@ -2,11 +2,14 @@ const imageStyles = {
2
2
  /**
3
3
  * Estilos para Image.
4
4
  */
5
- root: {
5
+ root: ({ ownerState }) => ({
6
6
  display: "flex",
7
7
  flexDirection: "column",
8
- alignItems: "flex-start"
9
- },
8
+ alignItems: "flex-start",
9
+ ...ownerState?.cover && {
10
+ objectFit: "cover"
11
+ }
12
+ }),
10
13
  /**
11
14
  * Estilos para el intersectComponente o para el 'span'
12
15
  */
@@ -31,9 +31,14 @@ export interface ImageProps extends Omit<IntersectComponentProps, 'setIsVisible'
31
31
  enableIntersectionObserver?: boolean;
32
32
  className?: string;
33
33
  dataTestId?: string;
34
+ /**
35
+ * Si es verdadero, la imagen se ajusta al contenedor y se recorta si es necesario.
36
+ */
37
+ cover?: boolean;
34
38
  }
35
39
  export type ImageSlotsType = keyof typeof ImageSlots;
36
40
  export interface ImageOwnerState {
37
41
  isSkeleton?: boolean;
42
+ cover?: boolean;
38
43
  }
39
44
  export type ImageStyles = M4LOverridesStyleRules<ImageSlots, typeof IMAGE_KEY_COMPONENT, Theme>;
@@ -56,9 +56,11 @@ const useNumberInput = (parameters) => {
56
56
  (event, field, fieldValue, reason) => {
57
57
  if (field === "value" && typeof fieldValue !== "string") {
58
58
  switch (reason) {
59
+ // only a blur event will dispatch `numberInput:clamp`
59
60
  case "numberInput:inputChange":
60
61
  onChange?.(event, fieldValue);
61
62
  break;
63
+ // only a blur event will dispatch `numberInput:clamp`
62
64
  case "numberInput:clamp":
63
65
  onChange?.(event, fieldValue);
64
66
  break;
@@ -85,7 +85,7 @@ const propertyValueStyles = {
85
85
  width: "100%",
86
86
  display: "flex",
87
87
  justifyContent: "flex-start",
88
- alignItems: "center",
88
+ alignItems: "flex-start",
89
89
  overflow: "hidden",
90
90
  height: ownerState?.valueHeight ? ownerState?.valueHeight : "auto",
91
91
  ...ownerState?.isForm && {
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
441
441
  bounds: {
442
442
  left: MARGIN_GRIDLAYOUT,
443
443
  top: MARGIN_GRIDLAYOUT,
444
- right: -10,
445
- bottom: -10
444
+ right: -MARGIN_GRIDLAYOUT,
445
+ bottom: -MARGIN_GRIDLAYOUT
446
446
  }
447
447
  });
448
448
  }
@@ -65,6 +65,11 @@ const RHFAutocompleteAsyncReducer = (onChangeFilterParms) => (state, action) =>
65
65
  ...state,
66
66
  isOpen: false
67
67
  };
68
+ // case actionsType.SET_SELECTED_OPTIONS_TO_AUTOCOMPLETE:
69
+ // return {
70
+ // ...state,
71
+ // selectedOptions: action.payload,
72
+ // };
68
73
  default:
69
74
  return state;
70
75
  }
@@ -7,6 +7,7 @@ export * from './BaseModule';
7
7
  export * from './Chip';
8
8
  export * from './commercial';
9
9
  export * from './CommonActions/';
10
+ export * from './ContainerFlow';
10
11
  export * from './CommonActions/dictionary';
11
12
  export * from './DataGrid';
12
13
  export * from './DragResizeWindowRND';
@@ -16,7 +16,8 @@ const accordionStyles = {
16
16
  borderRadius: "unset"
17
17
  },
18
18
  margin: "unset",
19
- overflow: "visible"
19
+ overflow: "visible",
20
+ height: "min-content"
20
21
  }
21
22
  }),
22
23
  /**
@@ -102,10 +103,7 @@ const accordionStyles = {
102
103
  * **************************************************************
103
104
  */
104
105
  accordionDetails: ({ theme, ownerState }) => ({
105
- paddingLeft: theme.vars.size.baseSpacings.sp3,
106
- paddingRight: theme.vars.size.baseSpacings.sp3,
107
- paddingTop: theme.vars.size.baseSpacings.sp1,
108
- paddingBottom: theme.vars.size.baseSpacings.sp1,
106
+ padding: theme.vars.size.baseSpacings.sp4,
109
107
  background: theme.vars.palette.background.default,
110
108
  display: "flex",
111
109
  flexDirection: "column",
@@ -1,3 +1,4 @@
1
+ import { C as CONTAINER_QUERY_NAME } from "./constants.js";
1
2
  const tabContentStyles = {
2
3
  /**
3
4
  * Elemento root referencia a `TabContent`
@@ -9,6 +10,8 @@ const tabContentStyles = {
9
10
  paddingRight: 0,
10
11
  display: "flex",
11
12
  overflow: "auto",
13
+ containerName: CONTAINER_QUERY_NAME,
14
+ containerType: "inline-size",
12
15
  // height: '100%',
13
16
  flexDirection: "column",
14
17
  gap: theme.vars.size.baseSpacings.sp2,
@@ -1 +1,2 @@
1
1
  export declare const TAB_CONTENT_KEY_COMPONENT = "M4LTabContent";
2
+ export declare const CONTAINER_QUERY_NAME = "container";
@@ -1,4 +1,6 @@
1
1
  const TAB_CONTENT_KEY_COMPONENT = "M4LTabContent";
2
+ const CONTAINER_QUERY_NAME = "container";
2
3
  export {
4
+ CONTAINER_QUERY_NAME as C,
3
5
  TAB_CONTENT_KEY_COMPONENT as T
4
6
  };
@@ -17,6 +17,7 @@ function Typography(props) {
17
17
  dataTestid,
18
18
  children,
19
19
  disabled,
20
+ ellipsis = false,
20
21
  ...other
21
22
  } = props;
22
23
  const isSkeleton = useModuleSkeleton();
@@ -28,7 +29,8 @@ function Typography(props) {
28
29
  size: adjustedSize,
29
30
  skeletonRows,
30
31
  variant,
31
- skeleton: isSkeleton
32
+ skeleton: isSkeleton,
33
+ ellipsis
32
34
  };
33
35
  return /* @__PURE__ */ jsx(
34
36
  StyledMUITypography,
@@ -43,6 +43,10 @@ export interface TypographyProps extends Omit<MUITypographyProps, 'color' | 'var
43
43
  htmlFor?: string | undefined;
44
44
  /** Si esta disabled, el texto pasa a text.disabled */
45
45
  disabled?: boolean;
46
+ /**
47
+ * Si se activa, el texto se corta y se muestra un elipsis.
48
+ */
49
+ ellipsis?: boolean;
46
50
  }
47
51
  /**
48
52
  * Define valores de estado necesarios para estilar el componente.
@@ -54,6 +58,7 @@ export interface TypographyOwnerState {
54
58
  size: TypographyProps['size'];
55
59
  skeletonRows: TypographyProps['skeletonRows'];
56
60
  skeleton: boolean;
61
+ ellipsis: TypographyProps['ellipsis'];
57
62
  }
58
63
  /**
59
64
  * Agrupa la lista de slots del componente.
@@ -32,7 +32,13 @@ const typographyStyles = {
32
32
  theme.generalSettings.isMobile,
33
33
  ownerState?.size || "medium",
34
34
  ownerState?.variant || "body"
35
- )
35
+ ),
36
+ // ellipsis 🔤
37
+ ...ownerState?.ellipsis && {
38
+ overflow: "hidden",
39
+ textOverflow: "ellipsis",
40
+ whiteSpace: "nowrap"
41
+ }
36
42
  },
37
43
  ...ownerState?.skeleton ? {
38
44
  width: ownerState?.width ? ownerState?.width : "100%"
package/index.js CHANGED
@@ -29,31 +29,32 @@ import { A as A11 } from "./components/CommonActions/components/ActionIntro/Acti
29
29
  import { A as A12 } from "./components/CommonActions/components/ActionFormCancel/ActionFormCancel.js";
30
30
  import { A as A13 } from "./components/CommonActions/components/ActionFormIntro/ActionFormIntro.js";
31
31
  import { D, d, g as g4 } from "./components/CommonActions/dictionary.js";
32
+ import { C as C2 } from "./components/ContainerFlow/ContainerFlow.js";
32
33
  import { D as D2 } from "./components/DataGrid/DataGrid.js";
33
34
  import { g as g5 } from "./components/DataGrid/dictionary.js";
34
35
  import { N, T as T2 } from "./components/DataGrid/subcomponents/editors/TextEditor/index.js";
35
36
  import { g as g6 } from "./components/DataGrid/utils/getDataGridRowsFromSet.js";
36
37
  import { b as b3, a as a4, e } from "./components/DataGrid/constants.js";
37
- import { C as C2 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js";
38
+ import { C as C3 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js";
38
39
  import { u as u2 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.js";
39
- import { C as C3 } from "./components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js";
40
+ import { C as C4 } from "./components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js";
40
41
  import { u as u3 } from "./components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/useColumnConcatenatedValues.js";
41
- import { C as C4 } from "./components/DataGrid/formatters/ColumnDateFormatter/formatter.js";
42
+ import { C as C5 } from "./components/DataGrid/formatters/ColumnDateFormatter/formatter.js";
42
43
  import { u as u4 } from "./components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.js";
43
- import { C as C5 } from "./components/DataGrid/formatters/ColumnIconFormatter/formatter.js";
44
- import { C as C6 } from "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/formatter.js";
44
+ import { C as C6 } from "./components/DataGrid/formatters/ColumnIconFormatter/formatter.js";
45
+ import { C as C7 } from "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/formatter.js";
45
46
  import { u as u5 } from "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/useColumnInteractiveCheck.js";
46
- import { C as C7 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js";
47
+ import { C as C8 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js";
47
48
  import { u as u6 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js";
48
- import { C as C8 } from "./components/DataGrid/formatters/ColumnPointsFormatter/formatter.js";
49
+ import { C as C9 } from "./components/DataGrid/formatters/ColumnPointsFormatter/formatter.js";
49
50
  import { u as u7 } from "./components/DataGrid/formatters/ColumnPointsFormatter/useColumnPoints.js";
50
- import { C as C9 } from "./components/DataGrid/formatters/ColumnPriceFormatter/formatter.js";
51
+ import { C as C10 } from "./components/DataGrid/formatters/ColumnPriceFormatter/formatter.js";
51
52
  import { u as u8 } from "./components/DataGrid/formatters/ColumnPriceFormatter/useColumnPrice.js";
52
- import { C as C10 } from "./components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js";
53
+ import { C as C11 } from "./components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js";
53
54
  import { u as u9 } from "./components/DataGrid/formatters/ColumnSetCheckFormatter/useColumnSetCheck.js";
54
- import { C as C11 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.js";
55
+ import { C as C12 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.js";
55
56
  import { u as u10 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.js";
56
- import { C as C12 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js";
57
+ import { C as C13 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js";
57
58
  import { u as u11 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.js";
58
59
  import { D as D3 } from "./components/DragResizeWindowRND/DragResizeWindowRND.js";
59
60
  import { d as d2 } from "./components/DragResizeWindowRND/classes/index.js";
@@ -74,7 +75,7 @@ import { V } from "./components/extended/React-Window/VariableSizeList/VariableS
74
75
  import { A as A14 } from "./components/mui_extended/Avatar/Avatar.js";
75
76
  import { B as B2 } from "./components/mui_extended/BoxIcon/index.js";
76
77
  import { B as B3 } from "./components/mui_extended/Breadcrumbs/index.js";
77
- import { C as C13 } from "./components/mui_extended/CircularProgress/CircularProgress.js";
78
+ import { C as C14 } from "./components/mui_extended/CircularProgress/CircularProgress.js";
78
79
  import { B as B4 } from "./components/mui_extended/Badge/Badge.js";
79
80
  import { L as L3 } from "./components/mui_extended/LinearProgress/index.js";
80
81
  import { L as L4 } from "./components/mui_extended/LinkWithRoute/index.js";
@@ -84,7 +85,7 @@ import { A as A15 } from "./components/mui_extended/Accordion/Accordion.js";
84
85
  import { T as T3 } from "./components/mui_extended/Tooltip/Tooltip.js";
85
86
  import { I as I2 } from "./components/mui_extended/IconButton/IconButton.js";
86
87
  import { B as B5 } from "./components/mui_extended/Button/Button.js";
87
- import { C as C14 } from "./components/mui_extended/CheckBox/CheckBox.js";
88
+ import { C as C15 } from "./components/mui_extended/CheckBox/CheckBox.js";
88
89
  import { I as I3 } from "./components/mui_extended/ImageButton/ImageButton.js";
89
90
  import { P as P2 } from "./components/mui_extended/Popover/Popover.js";
90
91
  import { S as S4 } from "./components/mui_extended/Skeleton/Skeleton.js";
@@ -111,10 +112,10 @@ import { B as B6 } from "./components/formatters/BooleanFormatter/BooleanFormatt
111
112
  import { D as D8, g as g12 } from "./components/formatters/DateFormatter/DateFormatter.js";
112
113
  import { U, g as g13 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
113
114
  import { P as P3, g as g14 } from "./components/formatters/PointsFormatter/PointsFormatter.js";
114
- import { C as C15, g as g15 } from "./components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
115
+ import { C as C16, g as g15 } from "./components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
115
116
  import { P as P4, u as u12 } from "./components/formatters/PeriodFormatter/PeriodFormatter.js";
116
117
  import { P as P5, g as g16 } from "./components/formatters/PriceFormatter/PriceFormatter.js";
117
- import { C as C16 } from "./components/formatters/ChipStatusFormatter/ChipStatusFormatter.js";
118
+ import { C as C17 } from "./components/formatters/ChipStatusFormatter/ChipStatusFormatter.js";
118
119
  import { g as g17 } from "./components/formatters/DistanceToNowFormatter/dictionary.js";
119
120
  import { D as D9 } from "./components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js";
120
121
  import { g as g18 } from "./components/formatters/dictionary.js";
@@ -241,22 +242,23 @@ export {
241
242
  B2 as BoxIcon,
242
243
  B3 as Breadcrumbs,
243
244
  B5 as Button,
244
- C14 as CheckBox,
245
+ C15 as CheckBox,
245
246
  C as Chip,
246
- C16 as ChipStatusFormatter,
247
- C13 as CircularProgress,
248
- C2 as ColumnBooleanFormatter,
249
- C12 as ColumnChipStatusFormatter,
250
- C3 as ColumnConcatenatedValueFormatter,
251
- C4 as ColumnDateFormatter,
252
- C5 as ColumnIconFormatter,
253
- C6 as ColumnInteractiveCheckFormatter,
254
- C7 as ColumnNestedValueFormatter,
255
- C8 as ColumnPointsFormatter,
256
- C9 as ColumnPriceFormatter,
257
- C10 as ColumnSetCheckFormatter,
258
- C11 as ColumnUncertaintyFormatter,
259
- C15 as ConcatenatedFormatter,
247
+ C17 as ChipStatusFormatter,
248
+ C14 as CircularProgress,
249
+ C3 as ColumnBooleanFormatter,
250
+ C13 as ColumnChipStatusFormatter,
251
+ C4 as ColumnConcatenatedValueFormatter,
252
+ C5 as ColumnDateFormatter,
253
+ C6 as ColumnIconFormatter,
254
+ C7 as ColumnInteractiveCheckFormatter,
255
+ C8 as ColumnNestedValueFormatter,
256
+ C9 as ColumnPointsFormatter,
257
+ C10 as ColumnPriceFormatter,
258
+ C11 as ColumnSetCheckFormatter,
259
+ C12 as ColumnUncertaintyFormatter,
260
+ C16 as ConcatenatedFormatter,
261
+ C2 as ContainerFlow,
260
262
  b3 as DATAGRID_ROW_HEADER_HEIGHTS,
261
263
  a4 as DATAGRID_ROW_HEIGHTS,
262
264
  e as DATAGRID_SEMANTIC_WIDTHS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.63",
3
+ "version": "9.2.64",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {
@@ -0,0 +1,32 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { ContainerFlow } from '../../../src/components/ContainerFlow/ContainerFlow';
3
+ /**
4
+ * Renderiza un chip para cada color
5
+ */
6
+ declare const meta: Meta<typeof ContainerFlow>;
7
+ type Story = StoryObj<typeof ContainerFlow>;
8
+ /**
9
+ * FlexColumn
10
+ */
11
+ export declare const H001_FlexColumn: Story;
12
+ /**
13
+ * variante column-flex con 3 wrappers
14
+ */
15
+ export declare const H002_FlexColumn3Wrappers: Story;
16
+ /**
17
+ * variante column-flex con 2 wrappers
18
+ */
19
+ export declare const H003_FlexColumn2Wrappers: Story;
20
+ /**
21
+ * variante column-flex con 1 wrapper
22
+ */
23
+ export declare const H004_FlexColumn1Wrappers: Story;
24
+ /**
25
+ * variante flex-wrap
26
+ */
27
+ export declare const H005_FlexWrap: Story;
28
+ /**
29
+ * variante grid-layout
30
+ */
31
+ export declare const H006_GridLayout: Story;
32
+ export default meta;
@@ -0,0 +1,5 @@
1
+ import { ContainerFlowProps } from '../../../../../src/components/ContainerFlow/types';
2
+ /**
3
+ * Renderiza el componente ContainerFlow con los props pasados.
4
+ */
5
+ export declare const RenderFlexColumn: (args: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ContainerFlowProps } from '../../../../../src/components/ContainerFlow/types';
2
+ /**
3
+ * Renderiza el componente ContainerFlow con los props pasados.
4
+ */
5
+ export declare const RenderFlexColumn1Wrappers: (args: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ContainerFlowProps } from '../../../../../src/components/ContainerFlow/types';
2
+ /**
3
+ * Renderiza el componente ContainerFlow con los props pasados.
4
+ */
5
+ export declare const RenderFlexColumn2Wrappers: (args: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ContainerFlowProps } from '../../../../../src/components/ContainerFlow/types';
2
+ /**
3
+ * Renderiza el componente ContainerFlow con los props pasados.
4
+ */
5
+ export declare const RenderFlexColumn3Wrappers: (args: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ContainerFlowProps } from '../../../../../src/components/ContainerFlow/types';
2
+ /**
3
+ * Renderiza el componente ContainerFlow con los props pasados.
4
+ */
5
+ export declare const RenderFlexWrap: (args: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ContainerFlowProps } from '../../../../../src/components/ContainerFlow/types';
2
+ /**
3
+ * Renderiza el componente ContainerFlow con los props pasados.
4
+ */
5
+ export declare const RenderGridLayout: (args: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Componente que se encarga de envolver los items del contenedor de items.
3
+ * @param children - Los items del contenedor de items.
4
+ * @returns Un componente de tipo div con los estilos del contenedor de items.
5
+ */
6
+ export declare const WrapperItems: ({ children, width, style }: {
7
+ children: React.ReactNode;
8
+ width?: string | number;
9
+ style?: React.CSSProperties;
10
+ }) => import("react/jsx-runtime").JSX.Element;