@m4l/components 9.3.2 → 9.3.3
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/@types/types.d.ts +8 -1
- package/components/Card/Card.d.ts +7 -0
- package/components/Card/Card.styles.d.ts +2 -0
- package/components/Card/constants.d.ts +7 -0
- package/components/Card/helpers/getSizeSpacing.d.ts +7 -0
- package/components/Card/helpers/getSizeSpacing.test.d.ts +1 -0
- package/components/Card/index.d.ts +1 -0
- package/components/Card/slots/CardEnum.d.ts +3 -0
- package/components/Card/slots/CardSlots.d.ts +3 -0
- package/components/Card/test/Card.test.d.ts +1 -0
- package/components/Card/types.d.ts +59 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/hook-form/RHFormContext/index.d.ts +1 -1
- package/package.json +1 -1
- package/storybook/components/Card/Card.stories.d.ts +45 -0
- package/storybook/components/Card/subcomponents/ContentCard.d.ts +8 -0
- package/storybook/components/Card/subcomponents/constants.d.ts +9 -0
- /package/storybook/components/{AppBar → appBar}/AppBar.stories.d.ts +0 -0
package/@types/types.d.ts
CHANGED
|
@@ -145,10 +145,10 @@ import { ChipStatusFormatterSlotsType } from '../components/formatters/ChipStatu
|
|
|
145
145
|
import { RHFUploadImageOwnerState, RHFUploadImageSlotsType } from '../components/hook-form/RHFUpload/RHFUploadImage/types';
|
|
146
146
|
import { PrintingSystemOwnerState, PrintingSystemSlotsType } from '../components/PrintingSystem/types';
|
|
147
147
|
import { ScrollBarOwnerState, ScrollBarSlotsType } from '../components/ScrollBar/types';
|
|
148
|
-
|
|
149
148
|
import { SplitLayoutOwnerState } from '../components/extended/React-resizable-panels/types';
|
|
150
149
|
import { ObjectLogsOwnerState, ObjectLogsSlotsType } from '../components/ObjectLogs/types';
|
|
151
150
|
import { LanguagePopoverOwnerState, LanguagePopoverSlotsType } from '../components/LanguagePopover/types';
|
|
151
|
+
import { CardOwnerState, CardSlotsType } from '../components/Card/types';
|
|
152
152
|
import { ContainerFlowOwnerState, ContainerFlowSlotsType } from '../components/ContainerFlow/types';
|
|
153
153
|
declare module '@mui/material/styles' {
|
|
154
154
|
// Define the slots in the theme
|
|
@@ -229,6 +229,7 @@ declare module '@mui/material/styles' {
|
|
|
229
229
|
M4LSplitLayout: SplitLayoutOwnerState;
|
|
230
230
|
M4LObjectLogs: ObjectLogsSlotsType;
|
|
231
231
|
M4LLanguagePopover: LanguagePopoverSlotsType;
|
|
232
|
+
M4LCard: CardSlotsType;
|
|
232
233
|
M4LContainerFlow: ContainerFlowSlotsType;
|
|
233
234
|
}
|
|
234
235
|
interface ComponentsPropsList {
|
|
@@ -309,6 +310,7 @@ declare module '@mui/material/styles' {
|
|
|
309
310
|
M4LSplitLayout: Partial<SplitLayoutOwnerState>;
|
|
310
311
|
M4LObjectLogs: Partial<ObjectLogsOwnerState>;
|
|
311
312
|
M4LLanguagePopover: Partial<LanguagePopoverOwnerState>;
|
|
313
|
+
M4LCard: Partial<CardOwnerState>;
|
|
312
314
|
M4LContainerFlow: Partial<ContainerFlowOwnerState>;
|
|
313
315
|
}
|
|
314
316
|
interface Components {
|
|
@@ -702,6 +704,11 @@ declare module '@mui/material/styles' {
|
|
|
702
704
|
styleOverrides?: ComponentsOverrides<Theme>['M4LLanguagePopover'];
|
|
703
705
|
variants?: ComponentsVariants['M4LLanguagePopover'];
|
|
704
706
|
};
|
|
707
|
+
M4LCard?: {
|
|
708
|
+
defaultProps?: ComponentsPropsList['M4LCard'];
|
|
709
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LCard'];
|
|
710
|
+
variants?: ComponentsVariants['M4LCard'];
|
|
711
|
+
};
|
|
705
712
|
M4LContainerFlow?: {
|
|
706
713
|
defaultProps?: ComponentsPropsList['M4LContainerFlow'];
|
|
707
714
|
styleOverrides?: ComponentsOverrides<Theme>['M4LContainerFlow'];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CardProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Obtiene el tamaño del gap de la tarjeta.
|
|
4
|
+
* @param gap - El gap de la tarjeta.
|
|
5
|
+
* @returns El tamaño del gap de la tarjeta.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getSizeSpacing: (gap: CardProps["gap"] | number | undefined | null) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card } from './Card';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const CardRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('../types').CardOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
import { M4LOverridesStyleRules } from '../../@types/augmentations';
|
|
3
|
+
import { CARD_KEY } from './constants';
|
|
4
|
+
import { CardSlots } from './slots/CardEnum';
|
|
5
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Contenido de la tarjeta.
|
|
8
|
+
*/
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Variante de la tarjeta.
|
|
12
|
+
*/
|
|
13
|
+
variant?: 'text' | 'outlined';
|
|
14
|
+
/**
|
|
15
|
+
* Espacio entre los elementos de la tarjeta.
|
|
16
|
+
*/
|
|
17
|
+
gap?: number | 'compact' | 'standard' | 'comfortable';
|
|
18
|
+
/**
|
|
19
|
+
* Espacio entre los elementos de la tarjeta.
|
|
20
|
+
*/
|
|
21
|
+
padding?: number | 'compact' | 'standard' | 'comfortable';
|
|
22
|
+
/**
|
|
23
|
+
* Dirección de la tarjeta.
|
|
24
|
+
*/
|
|
25
|
+
direction?: 'row' | 'column';
|
|
26
|
+
/**
|
|
27
|
+
* Altura de la tarjeta.
|
|
28
|
+
*/
|
|
29
|
+
height?: number | 'auto';
|
|
30
|
+
/**
|
|
31
|
+
* Clase de la tarjeta.
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Estilo de la tarjeta.
|
|
36
|
+
*/
|
|
37
|
+
justifyContent?: React.CSSProperties['justifyContent'];
|
|
38
|
+
/**
|
|
39
|
+
* Estilo de la tarjeta.
|
|
40
|
+
*/
|
|
41
|
+
alignItems?: React.CSSProperties['alignItems'];
|
|
42
|
+
/**
|
|
43
|
+
* Estilo de la tarjeta.
|
|
44
|
+
*/
|
|
45
|
+
selected?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export type CardSlotsType = keyof typeof CardSlots;
|
|
48
|
+
export type CardOwnerState = {
|
|
49
|
+
variant: CardProps['variant'];
|
|
50
|
+
gap: CardProps['gap'];
|
|
51
|
+
height: CardProps['height'];
|
|
52
|
+
padding: CardProps['padding'];
|
|
53
|
+
direction: CardProps['direction'];
|
|
54
|
+
onClick: boolean;
|
|
55
|
+
justifyContent: CardProps['justifyContent'];
|
|
56
|
+
alignItems: CardProps['alignItems'];
|
|
57
|
+
selected: CardProps['selected'];
|
|
58
|
+
};
|
|
59
|
+
export type CardStyles = M4LOverridesStyleRules<CardSlotsType, typeof CARD_KEY, Theme>;
|
|
@@ -17,11 +17,11 @@ declare function usePopoverFilter(): {
|
|
|
17
17
|
filterFormValue: FormFilterValue;
|
|
18
18
|
formFilter: FormFilterFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -17,11 +17,11 @@ declare function usePopoverSort(): {
|
|
|
17
17
|
sortFormValue: import('../../types').FormSortValueBase;
|
|
18
18
|
formSort: FormSortFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
441
441
|
bounds: {
|
|
442
442
|
left: MARGIN_GRIDLAYOUT,
|
|
443
443
|
top: MARGIN_GRIDLAYOUT,
|
|
444
|
-
right: -
|
|
445
|
-
bottom: -
|
|
444
|
+
right: -MARGIN_GRIDLAYOUT,
|
|
445
|
+
bottom: -MARGIN_GRIDLAYOUT
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}
|
|
@@ -3,7 +3,7 @@ import { CustomFormArguments, FormProviderCustomProps, FormProviderProps } from
|
|
|
3
3
|
/**
|
|
4
4
|
* TODO: Documentar
|
|
5
5
|
*/
|
|
6
|
-
export declare function useCustomForm({ validationSchema, values, statusLoad }: CustomFormArguments): import('react-hook-form').UseFormReturn<FieldValues, any,
|
|
6
|
+
export declare function useCustomForm({ validationSchema, values, statusLoad }: CustomFormArguments): import('react-hook-form').UseFormReturn<FieldValues, any, FieldValues>;
|
|
7
7
|
/**
|
|
8
8
|
* TODO: Documentar
|
|
9
9
|
*/
|
package/package.json
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Card } from '../../../src/components/Card';
|
|
3
|
+
declare const meta: Meta<typeof Card>;
|
|
4
|
+
type Story = StoryObj<typeof Card>;
|
|
5
|
+
/**
|
|
6
|
+
* Base story for `Card` with variant outlined.
|
|
7
|
+
*/
|
|
8
|
+
export declare const H001_Variant_Outlined: Story;
|
|
9
|
+
/**
|
|
10
|
+
* Base story for `Card` with variant text.
|
|
11
|
+
*/
|
|
12
|
+
export declare const H002_Variant_Text: Story;
|
|
13
|
+
/**
|
|
14
|
+
* Base story for `Card` with variant outlined and hover.
|
|
15
|
+
*/
|
|
16
|
+
export declare const H003_Variant_Outlined_Hover: Story;
|
|
17
|
+
/**
|
|
18
|
+
* Base story for `Card` with variant outlined and selected.
|
|
19
|
+
*/
|
|
20
|
+
export declare const H004_Variant_Outlined_Selected: Story;
|
|
21
|
+
/**
|
|
22
|
+
* Base story for `Card` with variant outlined and active.
|
|
23
|
+
*/
|
|
24
|
+
export declare const H005_Variant_Outlined_Active: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Base story for `Card` with variant outlined and focus visible.
|
|
27
|
+
*/
|
|
28
|
+
export declare const H006_Variant_Outlined_Focus_Visible: Story;
|
|
29
|
+
/**
|
|
30
|
+
* Base story for `Card` with variant text and hover.
|
|
31
|
+
*/
|
|
32
|
+
export declare const H007_Variant_Text_Hover: Story;
|
|
33
|
+
/**
|
|
34
|
+
* Base story for `Card` with variant text and hover.
|
|
35
|
+
*/
|
|
36
|
+
export declare const H008_Variant_Text_Selected: Story;
|
|
37
|
+
/**
|
|
38
|
+
* Base story for `Card` with variant text and active.
|
|
39
|
+
*/
|
|
40
|
+
export declare const H009_Variant_Text_Active: Story;
|
|
41
|
+
/**
|
|
42
|
+
* Base story for `Card` with variant text and focus visible.
|
|
43
|
+
*/
|
|
44
|
+
export declare const H010_Variant_Text_Focus_Visible: Story;
|
|
45
|
+
export default meta;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CardProps } from '../../../../src/components/Card/types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente que se renderiza en el contenido de la tarjeta
|
|
4
|
+
* @returns {React.ReactElement}
|
|
5
|
+
*/
|
|
6
|
+
export declare const ContentCard: ({ gap }: {
|
|
7
|
+
gap?: CardProps["gap"];
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|