@m4l/components 9.1.61 → 9.1.63

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 (40) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/Label/Label.d.ts +0 -8
  3. package/components/Label/Label.js +31 -14
  4. package/components/Label/Label.styles.js +79 -88
  5. package/components/Label/constants.d.ts +2 -0
  6. package/components/Label/constants.js +6 -1
  7. package/components/Label/types.d.ts +9 -3
  8. package/components/hook-form/RHFAutocomplete/oldTypes.d.ts +1 -1
  9. package/components/hook-form/RHFAutocomplete/types.d.ts +1 -1
  10. package/components/hook-form/RHFTextField/types.d.ts +1 -1
  11. package/components/mui_extended/Tab/Slots/TabEnum.d.ts +1 -0
  12. package/components/mui_extended/Tab/Slots/TabEnum.js +1 -0
  13. package/components/mui_extended/Tab/Slots/TabSlots.d.ts +8 -0
  14. package/components/mui_extended/Tab/Slots/TabSlots.js +6 -0
  15. package/components/mui_extended/Tab/Tab.js +6 -6
  16. package/components/mui_extended/Tab/Tab.styles.js +33 -48
  17. package/components/mui_extended/Tab/constants.d.ts +0 -10
  18. package/components/mui_extended/Tab/constants.js +1 -7
  19. package/components/mui_extended/Tabs/Tabs.d.ts +2 -2
  20. package/components/mui_extended/Tabs/Tabs.js +3 -5
  21. package/components/mui_extended/Tabs/Tabs.styles.d.ts +2 -0
  22. package/components/mui_extended/Tabs/Tabs.styles.js +34 -0
  23. package/components/mui_extended/Tabs/Tabs.test.d.ts +1 -0
  24. package/components/mui_extended/Tabs/constants.d.ts +4 -0
  25. package/components/mui_extended/Tabs/constants.js +4 -0
  26. package/components/mui_extended/Tabs/slots/TabsEnum.d.ts +3 -0
  27. package/components/mui_extended/Tabs/slots/TabsEnum.js +7 -0
  28. package/components/mui_extended/Tabs/slots/TabsSlots.d.ts +5 -0
  29. package/components/mui_extended/Tabs/slots/TabsSlots.js +11 -0
  30. package/components/mui_extended/Tabs/types.d.ts +21 -0
  31. package/package.json +1 -1
  32. package/{components/Label/stories/PaletteColor/VariantsLabel/LabelDefaultPredeterminado.stories.d.ts → storybook/components/Label/Label.stories.d.ts} +4 -6
  33. package/components/Label/stories/PaletteColor/VariantsLabel/LabelDefaultInternal.stories.d.ts +0 -18
  34. package/components/mui_extended/Tabs/classes/constants.d.ts +0 -1
  35. package/components/mui_extended/Tabs/classes/constants.js +0 -4
  36. package/components/mui_extended/Tabs/classes/index.d.ts +0 -9
  37. package/components/mui_extended/Tabs/classes/index.js +0 -23
  38. package/components/mui_extended/Tabs/classes/types.d.ts +0 -6
  39. package/components/mui_extended/Tabs/styles.d.ts +0 -3
  40. package/components/mui_extended/Tabs/styles.js +0 -7
package/@types/types.d.ts CHANGED
@@ -132,6 +132,7 @@ import { ToggleButtonOwnerState, ToggleButtonSlotsType } from '../components/mui
132
132
 
133
133
  import { BooleanFormatterOwnerState, PresentationType } from '../components/formatters/BooleanFormatter/types';
134
134
  import { ToggleIconButtonOwnerState, ToggleIconButtonSlotsType } from '../components/mui_extended/ToggleIconButton/types';
135
+ import { TabsSlotsType,TabsOwnerState } from '../components/mui_extended/Tabs/types';
135
136
 
136
137
  import { PopoverOwnerState, PopoverSlotsType } from '../components/mui_extended/Popover/types';
137
138
  import { AccountPopoverOwnerState, AccountPopoverSlotsType } from '../components/AccountPopover/types';
@@ -189,6 +190,7 @@ declare module '@mui/material/styles' {
189
190
  M4LToggleButton: ToggleButtonSlotsType;
190
191
  M4LBooleanFormatter: PresentationType;
191
192
  M4LToggleIconButton: ToggleIconButtonSlotsType;
193
+ M4LTabs: TabsSlotsType;
192
194
  RHFM4LAutocomplete: RHFAutocompleteSlotsType;
193
195
  M4LAccountPopover: AccountPopoverSlotsType;
194
196
  M4LPropertyValue: PropertyValueType;
@@ -241,6 +243,7 @@ declare module '@mui/material/styles' {
241
243
  M4LToggleButton: Partial<ToggleButtonOwnerState>;
242
244
  M4LBooleanFormatter: Partial<BooleanFormatterOwnerState>;
243
245
  M4LToggleIconButton: Partial<ToggleIconButtonOwnerState>;
246
+ M4LTabs: Partial<TabsOwnerState>;
244
247
  RHFM4LAutocomplete: Partial<RHFAutocompleteOwnerState>;
245
248
  M4LAccountPopover: Partial<AccountPopoverOwnerState>;
246
249
  M4LPropertyValue: Partial<PropertyVaLueOwnerState>;
@@ -570,6 +573,11 @@ declare module '@mui/material/styles' {
570
573
  styleOverrides?: ComponentsOverrides<Theme>['M4LPropertyValue'];
571
574
  variants?: ComponentsVariants['M4LPropertyValue'];
572
575
  };
576
+ M4LTabs?: {
577
+ defaultProps?: ComponentsPropsList['M4LTabs'];
578
+ styleOverrides?: ComponentsOverrides<Theme>['M4LTabs'];
579
+ variants?: ComponentsVariants['M4LTabs'];
580
+ };
573
581
  M4LColor?: {
574
582
  defaultProps?: ComponentsPropsList['M4LColor'];
575
583
  styleOverrides?: ComponentsOverrides<Theme>['M4LColor'];
@@ -10,12 +10,4 @@ import { LabelProps } from './types';
10
10
  * @updatedAt 2025-01-08 10:36:40 - automatic
11
11
  * @updatedUser Andrés Quintero - automatic
12
12
  */
13
- /**
14
- * Label component that displays a label with optional mandatory and helper messages.
15
- * @returns {JSX.Element} The rendered Label component.
16
- * @author Bruce Escobar - automatic
17
- * @createdAt 2024-10-22 09:34:39 - automatic
18
- * @updatedAt 2025-01-08 10:36:40 - automatic
19
- * @updatedUser Andrés Quintero - automatic
20
- */
21
13
  export declare const Label: (props: LabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,48 +1,65 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useEnvironment, useModuleSkeleton } from "@m4l/core";
3
3
  import clsx from "clsx";
4
- import { L as LABEL_KEY_COMPONENT } from "./constants.js";
5
- import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
4
+ import { L as LABEL_KEY_COMPONENT, c as classLabelRoot, a as LAB_SPECIFY } from "./constants.js";
5
+ import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
6
6
  import { L as LabelRootStyled, T as TypographyStyled, a as TypographyMandatoryMessageStyled, I as IconHelperMessageStyled, S as SkeletonStyled } from "./slots/LabelSlots.js";
7
7
  const Label = (props) => {
8
- const { helperMessage, label, mandatory, mandatoryMessage, htmlFor, id, error, size = "medium", disabled, className } = props;
8
+ const { helperMessage, label, mandatory, mandatoryMessage, htmlFor, id, error, size = "medium", disabled, className, helperText } = props;
9
9
  const { host_static_assets, environment_assets } = useEnvironment();
10
10
  const isSkeleton = useModuleSkeleton();
11
- const classRoot = getComponentSlotRoot(LABEL_KEY_COMPONENT);
11
+ const { currentSize } = useComponentSize(size);
12
+ const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
13
+ const ownerState = {
14
+ disabled,
15
+ size
16
+ };
12
17
  return /* @__PURE__ */ jsx(
13
18
  LabelRootStyled,
14
19
  {
15
- className: clsx(classRoot, className),
16
20
  "aria-label": LABEL_KEY_COMPONENT,
17
- ownerState: { disabled },
21
+ ownerState: { ...ownerState },
18
22
  htmlFor,
19
23
  id,
20
- label: "",
21
24
  children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
22
- /* @__PURE__ */ jsx(TypographyStyled, { ownerState: { size, disabled }, variant: "body", className: "", children: label }),
25
+ /* @__PURE__ */ jsx(
26
+ TypographyStyled,
27
+ {
28
+ className: clsx(classLabelRoot, LAB_SPECIFY, "M4lclassCssSpecificity", className),
29
+ ownerState: { ...ownerState },
30
+ variant: "body",
31
+ size: adjustedSize,
32
+ disabled,
33
+ children: label
34
+ }
35
+ ),
23
36
  mandatory && /* @__PURE__ */ jsx(
24
37
  TypographyMandatoryMessageStyled,
25
38
  {
26
- ownerState: { size, disabled },
39
+ ownerState: { ...ownerState },
27
40
  variant: "body",
28
41
  className: mandatoryMessage ? "mandatoryMessage" : "mandatoryAsterisk",
42
+ size: adjustedSize,
43
+ disabled,
29
44
  children: mandatoryMessage ? mandatoryMessage : "*"
30
45
  }
31
46
  ),
32
47
  helperMessage && /* @__PURE__ */ jsx(
33
48
  IconHelperMessageStyled,
34
49
  {
35
- tooltipContent: helperMessage,
36
- ownerState: { disabled },
50
+ tooltipContent: helperText,
51
+ ownerState: { ...ownerState },
37
52
  placement: "right",
53
+ size: adjustedSize,
38
54
  className: error ? "helper-icon-error" : "helper-icon",
55
+ disabled,
39
56
  src: `${host_static_assets}/${environment_assets}/frontend/components/LabelMessage/assets/icons/infoSmall.svg`
40
57
  }
41
58
  )
42
59
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
43
- /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "text", width: "30%", height: "14px" }),
44
- mandatory && /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "text", width: "10px", height: "14px" }),
45
- helperMessage && /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: { type: "helperMessage" }, variant: "rounded", width: "14px", height: "14px" })
60
+ /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: { ...ownerState }, variant: "text", className: "SkeletonWidthLabel" }),
61
+ mandatory && /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: { ...ownerState }, variant: "circular", className: "MandatoryLabel" }),
62
+ helperMessage && /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: { ...ownerState }, variant: "circular", className: "HelperIconLabel" })
46
63
  ] })
47
64
  }
48
65
  );
@@ -1,3 +1,5 @@
1
+ import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
2
+ import { g as getHeightSizeStyles } from "../../utils/getHeightSizeStyles.js";
1
3
  const labelStyles = {
2
4
  /**
3
5
  * Estilos para el contenedor raíz del Label.
@@ -6,129 +8,118 @@ const labelStyles = {
6
8
  * @updatedAt 2025-01-08 10:36:40 - automatic
7
9
  * @updatedUser Andrés Quintero - automatic
8
10
  */
9
- root: ({ ownerState, theme }) => ({
11
+ root: ({ theme, ownerState }) => ({
10
12
  display: "flex",
11
13
  flexDireccion: "row",
12
14
  alignItems: "center",
13
15
  flexWrap: "wrap",
14
- width: "100%",
16
+ width: "fit-content",
17
+ ...getHeightSizeStyles(
18
+ theme.generalSettings.isMobile,
19
+ ownerState.size || "small",
20
+ "base"
21
+ ),
15
22
  gap: theme.size.baseSpacings.sp1,
16
- "& .M4LLabelClassCss-root": {
17
- ...ownerState.disabled === true && {
18
- color: theme.vars.palette.text.disabled + "!important"
19
- }
20
- },
21
- flexDirection: "row",
22
- [`& .${ownerState.label}`]: {
23
- ...ownerState.size === "small" && {
24
- height: "20px",
25
- [theme.breakpoints.up("sm")]: {
26
- height: "20px"
27
- }
28
- },
29
- ...ownerState.size === "medium" && {
30
- height: "24px",
31
- [theme.breakpoints.up("sm")]: {
32
- height: "24px"
33
- }
34
- }
23
+ ...ownerState.disabled && {
24
+ color: theme.vars.palette.text.disabled
35
25
  }
36
26
  }),
37
27
  /**
38
- * Estilos para el slot Typography.
39
- * @author Bruce Escobar - automatic
40
- * @createdAt 2024-10-22 09:34:39 - automatic
41
- * @updatedAt 2025-01-08 10:36:40 - automatic
42
- * @updatedUser Andrés Quintero - automatic
28
+ * Estilos para el slot Typography del Label.
43
29
  */
44
30
  typographyStyled: ({ theme, ownerState }) => ({
45
- "& .MuiTypography-root": {
46
- color: theme.vars.palette.text.secondary,
47
- [theme.breakpoints.up("sm")]: {
48
- fontSize: ownerState.size === "medium" ? "11px" : "10px"
49
- },
50
- [theme.breakpoints.down("sm")]: {
51
- fontSize: ownerState.size === "medium" ? "14px" : "13px"
31
+ "&.MuiTypography-root": {
32
+ "&.M4lclassCssSpecificity": {
33
+ color: theme.vars.palette.text.secondary,
34
+ ...ownerState.disabled === true && {
35
+ color: theme.vars.palette.text.disabled
36
+ },
37
+ ...getTypographyStyles(
38
+ theme.generalSettings.isMobile,
39
+ ownerState.size || "medium",
40
+ "body"
41
+ ),
42
+ ...getTypographyStyles(
43
+ theme.generalSettings.isMobile,
44
+ ownerState.size || "small",
45
+ "body"
46
+ )
52
47
  }
53
- },
54
- "&.mandatoryAsterisk": {
55
- color: theme.vars.palette.text.primary
56
- },
57
- "& span": {}
48
+ }
58
49
  }),
59
50
  /**
60
- * Estilos para el mensaje obligatorio.
61
- * @author Bruce Escobar - automatic
62
- * @createdAt 2024-10-22 09:34:39 - automatic
63
- * @updatedAt 2025-01-08 10:36:40 - automatic
64
- * @updatedUser Andrés Quintero - automatic
51
+ * Estilos para el slot Typography del mensaje obligatorio del Label.
65
52
  */
66
53
  typographyMandatoryMessageStyled: ({ theme, ownerState }) => ({
67
- "& .MuiTypography-root": {
68
- color: theme.vars.palette.text.primary,
69
- [theme.breakpoints.up("sm")]: {
70
- fontSize: ownerState.size === "medium" ? "11px" : "10px"
71
- },
72
- [theme.breakpoints.down("sm")]: {
73
- fontSize: ownerState.size === "medium" ? "14px" : "13px"
54
+ "&.MuiTypography-root": {
55
+ "&.M4lclassCssSpecificity": {
56
+ color: theme.vars.palette.text.primary,
57
+ ...ownerState.disabled && {
58
+ color: theme.vars.palette.text.disabled
59
+ },
60
+ ...getTypographyStyles(
61
+ theme.generalSettings.isMobile,
62
+ ownerState.size || "medium",
63
+ "body"
64
+ ),
65
+ ...getTypographyStyles(
66
+ theme.generalSettings.isMobile,
67
+ ownerState.size || "small",
68
+ "body"
69
+ )
74
70
  }
75
71
  }
76
72
  }),
77
73
  /**
78
- * Estilos para el icono del mensaje de ayuda.
79
- * @author Bruce Escobar - automatic
80
- * @createdAt 2024-10-22 09:34:39 - automatic
81
- * @updatedAt 2025-01-08 10:36:40 - automatic
82
- * @updatedUser Andrés Quintero - automatic
74
+ * Estilos para el slot Icon del Label.
83
75
  */
84
- iconHelperMessageStyled: ({ theme }) => ({
85
- height: "24px",
86
- width: "24px",
76
+ iconHelperMessageStyled: ({ theme, ownerState }) => ({
87
77
  borderRadius: theme.vars.size.borderRadius.r1,
88
78
  '&:hover > [class*="M4LIcon-icon"]': {
89
- backgroundColor: theme.vars.palette.primary.main
79
+ backgroundColor: theme.vars.palette.info.selected
90
80
  },
91
81
  '& > [class*="M4LIcon-icon"]': {
92
- fontsize: "16px",
93
- backgroundColor: theme.vars.palette.text.secondary
94
- }
82
+ backgroundColor: theme.vars.palette.info.enabled
83
+ },
84
+ ...getHeightSizeStyles(
85
+ theme.generalSettings.isMobile,
86
+ ownerState.size || "small",
87
+ "base"
88
+ )
95
89
  }),
96
90
  /**
97
- * Estilos para el componente Skeleton.
98
- * @author Bruce Escobar - automatic
99
- * @createdAt 2024-10-22 09:34:39 - automatic
100
- * @updatedAt 2025-01-08 10:36:40 - automatic
101
- * @updatedUser Andrés Quintero - automatic
91
+ * Estilos para el slot Skeleton del Label.
102
92
  */
103
93
  skeletonStyled: ({ ownerState, theme }) => ({
104
94
  width: "100%",
105
- padding: theme.vars.size.baseSpacings.sp2,
106
95
  borderRadius: theme.vars.size.borderRadius.r1,
107
96
  display: "flex",
108
97
  alignItems: "center",
109
98
  backgroundColor: theme.vars.palette.skeleton.transition,
110
- // Estilos específicos para el tamaño small
111
- ...ownerState.size === "small" && {
112
- ...theme.generalSettings.isMobile ? {
113
- height: theme.vars.size.mobile.small.action,
114
- minHeight: theme.vars.size.mobile.small.action
115
- } : {
116
- height: theme.vars.size.desktop.small.action,
117
- minHeight: theme.vars.size.desktop.small.action
118
- }
99
+ ...getHeightSizeStyles(
100
+ theme.generalSettings.isMobile,
101
+ ownerState.size || "medium",
102
+ "action"
103
+ ),
104
+ ...getHeightSizeStyles(
105
+ theme.generalSettings.isMobile,
106
+ ownerState.size || "small",
107
+ "action"
108
+ ),
109
+ "&.MandatoryLabel": {
110
+ width: theme.vars.size.baseSpacings["sp0-5"],
111
+ padding: theme.vars.size.baseSpacings.sp1,
112
+ height: theme.vars.size.baseSpacings.sp3
119
113
  },
120
- // Estilos específicos para el tamaño medium
121
- ...ownerState.size === "medium" && {
122
- ...theme.generalSettings.isMobile ? {
123
- height: theme.vars.size.mobile.medium.action,
124
- minHeight: theme.vars.size.mobile.medium.action
125
- } : {
126
- height: theme.vars.size.desktop.medium.action,
127
- minHeight: theme.vars.size.desktop.medium.action
128
- }
129
- },
130
- ...ownerState.type === "helperMessage" && {
114
+ "&.SkeletonWidthLabel": {
115
+ width: theme.vars.size.baseSpacings.sp14,
131
116
  borderRadius: theme.vars.size.borderRadius.r1
117
+ },
118
+ "&.HelperIconLabel": {
119
+ width: theme.vars.size.baseSpacings.sp2,
120
+ borderRadius: theme.vars.size.borderRadius.r4,
121
+ height: theme.vars.size.baseSpacings.sp2,
122
+ padding: theme.vars.size.baseSpacings.sp2
132
123
  }
133
124
  })
134
125
  };
@@ -1 +1,3 @@
1
1
  export declare const LABEL_KEY_COMPONENT = "M4LLabel";
2
+ export declare const LAB_SPECIFY = "M4lclassCssSpecificity";
3
+ export declare const classLabelRoot: string;
@@ -1,4 +1,9 @@
1
+ import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
1
2
  const LABEL_KEY_COMPONENT = "M4LLabel";
3
+ const LAB_SPECIFY = "M4lclassCssSpecificity";
4
+ const classLabelRoot = getComponentSlotRoot(LABEL_KEY_COMPONENT);
2
5
  export {
3
- LABEL_KEY_COMPONENT as L
6
+ LABEL_KEY_COMPONENT as L,
7
+ LAB_SPECIFY as a,
8
+ classLabelRoot as c
4
9
  };
@@ -2,12 +2,13 @@ import { LabelSlots } from './slots';
2
2
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
3
3
  import { Theme } from '@mui/material';
4
4
  import { LABEL_KEY_COMPONENT } from './constants';
5
+ import { Sizes } from '@m4l/styles';
5
6
  export type LabelVariants = 'standard';
6
7
  export interface LabelProps {
7
8
  /** Mesanje de ayuda opcional que se visualiza cuando se interactua con el tooltip del Icono de informacion */
8
9
  helperMessage?: string | undefined;
9
10
  /** Es la etiqueta de texto principal del componente.*/
10
- label: string;
11
+ label?: string;
11
12
  /** Es una propiedad que permite visualizar el texto que acompaña a la etiqueta `label` Por defecto es `false`.*/
12
13
  mandatory?: boolean;
13
14
  /** Es una etiqueta de texto que define si el campo es obligatorio, por defecto se visualiza un `*` de lo contrario se va a mostrar el valor que se proporciona .*/
@@ -17,7 +18,7 @@ export interface LabelProps {
17
18
  /** Identificador único para la etiqueta html que envuelve al componente, útil para referencias en CSS o JavaScript.*/
18
19
  id?: string;
19
20
  /** Define el tamaño de la etiqueta. Puede ser 'small' o 'medium'. Por defecto es 'medium'. */
20
- size?: 'small' | 'medium';
21
+ size?: Extract<Sizes, 'small' | 'medium'>;
21
22
  /**
22
23
  * Los elementos secundarios que se renderizarán dentro del componente.
23
24
  */
@@ -30,9 +31,14 @@ export interface LabelProps {
30
31
  error?: boolean;
31
32
  /** Indica si el componente está deshabilitado. */
32
33
  disabled?: boolean;
34
+ helperText?: string;
33
35
  }
34
36
  export type OwnerState = Pick<LabelProps, 'size'>;
35
37
  export interface LabelOwnerState extends LabelProps, OwnerState {
38
+ /** Indica si el componente está deshabilitado. */
39
+ disabled?: boolean;
40
+ /** Define el tamaño del componente */
41
+ size?: Extract<Sizes, 'small' | 'medium'>;
36
42
  }
37
43
  export type LabelSlotsType = keyof typeof LabelSlots;
38
- export type LabelStyles = Partial<OverridesStyleRules<LabelSlots, typeof LABEL_KEY_COMPONENT, Theme> | undefined> | undefined;
44
+ export type LabelStyles = OverridesStyleRules<LabelSlots, typeof LABEL_KEY_COMPONENT, Theme>;
@@ -9,7 +9,7 @@ export type ImageProps<T> = (RHFAutocompleteTypeImageProps<T> & {
9
9
  imageRepeat: boolean;
10
10
  imageScale?: never;
11
11
  });
12
- export interface RHFAutocompleteBaseProps<T> extends Omit<TextFieldProps, 'label' | 'variant'>, Omit<LabelProps, 'label'> {
12
+ export interface RHFAutocompleteBaseProps<T> extends Omit<TextFieldProps, 'label' | 'variant' | 'helperText'>, Omit<LabelProps, 'label'> {
13
13
  name: string;
14
14
  options: Array<T>;
15
15
  getOptionLabel: (option: T) => string;
@@ -13,7 +13,7 @@ export type RHFAutocompleteType = 'text' | 'image';
13
13
  * Supports both single and multiple selection, and two types: `text` and `image`.
14
14
  * @createdAt 2024-11-28 17:06:36 - automatic
15
15
  */
16
- export interface RHFAutocompleteProps<T, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = true, FreeSolo extends boolean | undefined = false> extends Omit<MUIAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, 'variant' | 'color' | 'size' | 'value' | 'classes' | 'defaultValue' | 'onBlur' | 'onFocus' | 'autoComplete' | 'renderInput'>, Omit<TextFieldProps, 'label' | 'variant' | 'defaultValue' | 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown' | 'ref' | 'onChange'>, Omit<LabelProps, 'label'> {
16
+ export interface RHFAutocompleteProps<T, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = true, FreeSolo extends boolean | undefined = false> extends Omit<MUIAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, 'variant' | 'color' | 'size' | 'value' | 'classes' | 'defaultValue' | 'onBlur' | 'onFocus' | 'autoComplete' | 'renderInput'>, Omit<TextFieldProps, 'label' | 'variant' | 'defaultValue' | 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown' | 'ref' | 'onChange' | 'helperText'>, Omit<LabelProps, 'label'> {
17
17
  name: string;
18
18
  /**
19
19
  * The label for the autocomplete field.
@@ -6,7 +6,7 @@ import { LabelProps } from '../../Label/types';
6
6
  import { RHFTextFieldSlots } from './slots';
7
7
  import { RHF_TEXT_FIELD_KEY_COMPONENT } from './constant';
8
8
  import { ComponentPalletColor } from '@m4l/styles';
9
- export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputProps' | 'label' | 'theme' | 'color' | 'error'>, Omit<LabelProps, 'label' | 'error'> {
9
+ export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputProps' | 'label' | 'theme' | 'error'>, Omit<LabelProps, 'label' | 'error' | 'helperText'> {
10
10
  /**
11
11
  * Valor de anchura total para la vista de carga provisional.
12
12
  * @deprecated
@@ -4,5 +4,6 @@
4
4
  */
5
5
  export declare enum TabSlots {
6
6
  root = "root",
7
+ icon = "icon",
7
8
  tipography = "tipography"
8
9
  }
@@ -1,5 +1,6 @@
1
1
  var TabSlots = /* @__PURE__ */ ((TabSlots2) => {
2
2
  TabSlots2["root"] = "root";
3
+ TabSlots2["icon"] = "icon";
3
4
  TabSlots2["tipography"] = "tipography";
4
5
  return TabSlots2;
5
6
  })(TabSlots || {});
@@ -8,6 +8,14 @@ export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<
8
8
  }, "children" | "value" | "action" | "style" | "icon" | "disabled" | "sx" | "classes" | "className" | "tabIndex" | "label" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "iconPosition" | "wrapped">, "children" | "value" | "ref" | "title" | "id" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "disabled" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "label" | "key" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "iconPosition" | "wrapped"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TabOwnerState> & Record<string, unknown> & {
9
9
  ownerState: Partial<import('../types').TabOwnerState> & Record<string, unknown>;
10
10
  }, {}, {}>;
11
+ /**
12
+ * `IconStyled`:
13
+ * Componente de tipo icono (`Icon`).
14
+ * Utiliza el slot `icon` para agregar estilos específicos al icono del Tab.
15
+ */
16
+ export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Icon').IconProps, keyof import('../../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TabOwnerState> & Record<string, unknown> & {
17
+ ownerState: Partial<import('../types').TabOwnerState> & Record<string, unknown>;
18
+ }, {}, {}>;
11
19
  /**
12
20
  * `TypographyStyled`:
13
21
  * Componente de texto estilizado basado en `Typography`, se usa para mostrar texto en cada pestaña.
@@ -4,15 +4,21 @@ import { t as tabStyles } from "../Tab.styles.js";
4
4
  import { T as TAB_KEY_COMPONENT } from "../constants.js";
5
5
  import { T as TabSlots } from "./TabEnum.js";
6
6
  import { T as Typography } from "../../Typography/Typography.js";
7
+ import { I as Icon } from "../../../Icon/Icon.js";
7
8
  const RootStyled = styled(Tab, {
8
9
  name: TAB_KEY_COMPONENT,
9
10
  slot: TabSlots.root
10
11
  })(tabStyles?.root);
12
+ const IconStyled = styled(Icon, {
13
+ name: TAB_KEY_COMPONENT,
14
+ slot: TabSlots.icon
15
+ })(tabStyles?.icon);
11
16
  const TypographyStyled = styled(Typography, {
12
17
  name: TAB_KEY_COMPONENT,
13
18
  slot: TabSlots.tipography
14
19
  })(tabStyles?.tipography);
15
20
  export {
21
+ IconStyled as I,
16
22
  RootStyled as R,
17
23
  TypographyStyled as T
18
24
  };
@@ -2,11 +2,10 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { clsx } from "clsx";
3
3
  import { useModuleSkeleton } from "@m4l/core";
4
4
  import { T as TabSlots } from "./Slots/TabEnum.js";
5
- import { a as TYPOGRAPHY_KEY, b as TAB_SPECIFY, I as ICON_KEY, T as TAB_KEY_COMPONENT } from "./constants.js";
5
+ import { T as TAB_KEY_COMPONENT } from "./constants.js";
6
6
  import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
7
7
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
8
- import { R as RootStyled, T as TypographyStyled } from "./Slots/TabSlots.js";
9
- import { I as Icon } from "../../Icon/Icon.js";
8
+ import { R as RootStyled, T as TypographyStyled, I as IconStyled } from "./Slots/TabSlots.js";
10
9
  function Tab(props) {
11
10
  const {
12
11
  size = "medium",
@@ -38,13 +37,14 @@ function Tab(props) {
38
37
  return /* @__PURE__ */ jsx(
39
38
  RootStyled,
40
39
  {
41
- label: label ? /* @__PURE__ */ jsx(TypographyStyled, { className: clsx(TYPOGRAPHY_KEY, TAB_SPECIFY), ownerState: { ...OwnerState }, variant: "body", children: label }) : void 0,
40
+ label: label ? /* @__PURE__ */ jsx(TypographyStyled, { size: adjustedSize, className: clsx(classes.tipography, className), ownerState: { ...OwnerState }, variant: "body", children: label }) : void 0,
42
41
  disabled: isSkeleton || disabled,
43
42
  ownerState: { ...OwnerState },
44
43
  icon: urlIcon ? /* @__PURE__ */ jsx(
45
- Icon,
44
+ IconStyled,
46
45
  {
47
- className: clsx(ICON_KEY, TAB_SPECIFY),
46
+ ownerState: { ...OwnerState },
47
+ className: clsx(classes.icon, className),
48
48
  src: urlIcon,
49
49
  size
50
50
  }
@@ -48,14 +48,25 @@ const tabStyles = {
48
48
  },
49
49
  // Ajuste de alineación del icono
50
50
  "& .MuiTab-iconWrapper": {
51
- marginBottom: 1
51
+ marginBottom: 0
52
52
  },
53
- // Default o disabled
54
- ".icon.M4lclassCssSpecificity div": {
55
- backgroundColor: ownerState.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.text.secondary
53
+ //Disabled
54
+ ...ownerState.tabDisabled && {
55
+ ".M4LTab-icon div": {
56
+ backgroundColor: `${theme.vars.palette.text.disabled} !important`
57
+ },
58
+ ".M4LTab-tipography": {
59
+ color: `${theme.vars.palette.text.disabled} !important`
60
+ }
56
61
  },
57
- "span.M4lclassCssSpecificity": {
58
- color: ownerState.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.text.secondary
62
+ //Default
63
+ "&:not(.Mui-selected)": {
64
+ ".M4LTab-icon div": {
65
+ backgroundColor: theme.vars.palette.text.secondary
66
+ },
67
+ ".M4LTab-tipography": {
68
+ color: theme.vars.palette.text.secondary
69
+ }
59
70
  },
60
71
  /**
61
72
  * **Pseudoclases**:
@@ -79,10 +90,10 @@ const tabStyles = {
79
90
  border: theme.vars.size.borderStroke.container,
80
91
  borderColor: theme.vars.palette.border.secondary,
81
92
  borderBottom: 0,
82
- ".icon.M4lclassCssSpecificity div": {
93
+ ".M4LTab-icon div": {
83
94
  backgroundColor: ownerState.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.enabled
84
95
  },
85
- "span": {
96
+ ".M4LTab-tipography": {
86
97
  color: ownerState.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.enabled
87
98
  },
88
99
  // Efecto ripple en estado seleccionado
@@ -97,7 +108,7 @@ const tabStyles = {
97
108
  height: theme.vars.size.borderRadius["r0-5"],
98
109
  left: 0,
99
110
  top: -1,
100
- backgroundColor: ownerState.tabSkeleton ? theme.vars.palette.background.surface : ownerState.tabDisabled ? theme.vars.palette.background.surface : theme.vars.palette.primary.main,
111
+ backgroundColor: ownerState.tabSkeleton ? theme.vars.palette.skeleton.default : ownerState.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.main,
101
112
  borderEndStartRadius: theme.vars.size.borderRadius["r1"],
102
113
  borderEndEndRadius: theme.vars.size.borderRadius["r1"],
103
114
  position: "absolute"
@@ -107,10 +118,10 @@ const tabStyles = {
107
118
  },
108
119
  "&:active": {
109
120
  background: theme.vars.palette.primary.activeOpacity,
110
- ".icon.M4lclassCssSpecificity div": {
121
+ ".M4LTab-icon div": {
111
122
  backgroundColor: theme.vars.palette.primary.active
112
123
  },
113
- "span": {
124
+ ".M4LTab-tipography": {
114
125
  color: theme.vars.palette.primary.active
115
126
  },
116
127
  "&::after": {
@@ -120,44 +131,18 @@ const tabStyles = {
120
131
  },
121
132
  "&.Mui-selected:focus-visible": {
122
133
  background: theme.vars.palette.primary.activeOpacity,
123
- "&::before": {
124
- zIndex: 1,
125
- content: '""',
126
- position: "absolute",
127
- top: `-${theme.size.baseSpacings.sp1}`,
128
- left: `-${theme.size.baseSpacings.sp1}`,
129
- right: `-${theme.size.baseSpacings.sp1}`,
130
- bottom: 0,
131
- boxSizing: "border-box",
132
- border: theme.vars.size.borderStroke.container,
133
- borderBottom: 0,
134
- borderColor: theme.vars.palette.primary.focusVisible,
135
- borderRadius: theme.vars.size.borderRadius["r1-5"],
136
- borderBottomRightRadius: 0,
137
- borderBottomLeftRadius: 0
138
- },
134
+ outline: "1px solid",
135
+ outlineOffset: "-1px",
136
+ color: theme.vars.palette[ownerState.tabColor || "default"].focusVisible,
139
137
  "&:hover": {
140
138
  backgroundColor: theme.vars.palette.primary.activeOpacity
141
139
  }
142
140
  },
143
141
  "&:focus-visible": {
144
142
  background: theme.vars.palette[ownerState.tabColor || "default"].activeOpacity,
145
- "&::before": {
146
- zIndex: 1,
147
- content: '""',
148
- position: "absolute",
149
- top: `-${theme.size.baseSpacings.sp1}`,
150
- left: `-${theme.size.baseSpacings.sp1}`,
151
- right: `-${theme.size.baseSpacings.sp1}`,
152
- bottom: 0,
153
- boxSizing: "border-box",
154
- border: theme.vars.size.borderStroke.container,
155
- borderBottom: 0,
156
- borderColor: theme.vars.palette[ownerState.tabColor || "default"].focusVisible,
157
- borderRadius: theme.vars.size.borderRadius["r1-5"],
158
- borderBottomRightRadius: 0,
159
- borderBottomLeftRadius: 0
160
- },
143
+ outline: "1px solid",
144
+ outlineOffset: "-1px",
145
+ color: theme.vars.palette[ownerState.tabColor || "default"].focusVisible,
161
146
  "&:hover": {
162
147
  backgroundColor: theme.vars.palette[ownerState.tabColor || "default"].activeOpacity
163
148
  }
@@ -172,12 +157,12 @@ const tabStyles = {
172
157
  * @updatedUser Andrés Quintero - automatic
173
158
  */
174
159
  tipography: ({ ownerState }) => ({
175
- "&.M4lclassCssSpecificity": {
176
- ...ownerState.tabSkeleton && {
177
- width: "32px !important"
178
- }
160
+ cursor: "pointer",
161
+ ...ownerState.tabSkeleton && {
162
+ width: "32px"
179
163
  }
180
- })
164
+ }),
165
+ icon: {}
181
166
  };
182
167
  export {
183
168
  tabStyles as t
@@ -2,13 +2,3 @@
2
2
  * Nombre de clase que se usa para dar identidad a los slots del componente.
3
3
  */
4
4
  export declare const TAB_KEY_COMPONENT = "M4LTab";
5
- /**
6
- * Nombre de clase creado para aportar especificidad a los estilos del componente. Es usado para sobreescribir los estilos de MUI sin
7
- * tener la necesidad de agregar valores en !important.
8
- */
9
- export declare const TAB_SPECIFY = "M4lclassCssSpecificity";
10
- /**
11
- *
12
- */
13
- export declare const TYPOGRAPHY_KEY = "tipography";
14
- export declare const ICON_KEY = "icon";
@@ -1,10 +1,4 @@
1
1
  const TAB_KEY_COMPONENT = "M4LTab";
2
- const TAB_SPECIFY = "M4lclassCssSpecificity";
3
- const TYPOGRAPHY_KEY = "tipography";
4
- const ICON_KEY = "icon";
5
2
  export {
6
- ICON_KEY as I,
7
- TAB_KEY_COMPONENT as T,
8
- TYPOGRAPHY_KEY as a,
9
- TAB_SPECIFY as b
3
+ TAB_KEY_COMPONENT as T
10
4
  };
@@ -1,5 +1,5 @@
1
- import { TabsProps } from '@mui/material';
1
+ import { TabsProps } from './types';
2
2
  /**
3
- * TODO: Documentar
3
+ * Componente `Tabs` usandon el `MuiTabs` de MUI.
4
4
  */
5
5
  export declare const Tabs: (props: TabsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import { u as useTabsUtilityClasses } from "./classes/index.js";
4
- import { M as MUITabs } from "./styles.js";
2
+ import { R as RootStyled } from "./slots/TabsSlots.js";
5
3
  const Tabs = (props) => {
6
4
  const { children, className, ...others } = props;
7
- const classes = useTabsUtilityClasses();
8
- return /* @__PURE__ */ jsx(MUITabs, { className: clsx(classes.root, className), ...others, children });
5
+ const ownerState = {};
6
+ return /* @__PURE__ */ jsx(RootStyled, { ownerState: { ownerState }, ...others, children });
9
7
  };
10
8
  export {
11
9
  Tabs as T
@@ -0,0 +1,2 @@
1
+ import { TabsStyles } from './types';
2
+ export declare const tabsStyles: TabsStyles;
@@ -0,0 +1,34 @@
1
+ const tabsStyles = {
2
+ /**
3
+ * Elemento root referencia a `MuiTabs` de MUI
4
+ */
5
+ root: ({ theme }) => ({
6
+ position: "relative",
7
+ zIndex: 2,
8
+ display: "flex",
9
+ overflow: "auto",
10
+ width: "100%",
11
+ height: "fit-content",
12
+ maxWidth: "fit-content",
13
+ minHeight: "fit-content",
14
+ background: theme.vars.palette.default.enabled,
15
+ paddingBottom: theme.vars.size.baseSpacings.sp0,
16
+ gap: theme.vars.size.baseSpacings.sp0,
17
+ borderRadius: theme.vars.size.borderRadius.r1,
18
+ borderBottomLeftRadius: theme.vars.size.borderRadius.r0,
19
+ borderBottomRightRadius: theme.vars.size.borderRadius.r0,
20
+ "& .MuiTabs-scroller": {
21
+ overflow: "visible !important"
22
+ },
23
+ "& .MuiTabs-indicator": {
24
+ display: "none"
25
+ },
26
+ "& .simplebar-content": {
27
+ display: "flex",
28
+ gap: theme.vars.size.baseSpacings.sp0
29
+ }
30
+ })
31
+ };
32
+ export {
33
+ tabsStyles as t
34
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * `TABS_KEY_COMPONENT` key para identificar el componente.
3
+ */
4
+ export declare const TABS_KEY_COMPONENT = "M4LTabs";
@@ -0,0 +1,4 @@
1
+ const TABS_KEY_COMPONENT = "M4LTabs";
2
+ export {
3
+ TABS_KEY_COMPONENT as T
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare enum TabsSlots {
2
+ root = "root"
3
+ }
@@ -0,0 +1,7 @@
1
+ var TabsSlots = /* @__PURE__ */ ((TabsSlots2) => {
2
+ TabsSlots2["root"] = "root";
3
+ return TabsSlots2;
4
+ })(TabsSlots || {});
5
+ export {
6
+ TabsSlots as T
7
+ };
@@ -0,0 +1,5 @@
1
+ export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').TabsOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
3
+ }, "children" | "value" | "action" | "style" | "variant" | "sx" | "classes" | "className" | "aria-label" | "aria-labelledby" | "onChange" | "slotProps" | "slots" | "orientation" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar">, "children" | "value" | "ref" | "title" | "id" | "action" | "hidden" | "color" | "content" | "style" | "variant" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slotProps" | "slots" | "key" | "orientation" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TabsProps> & Record<string, unknown> & {
4
+ ownerState: Partial<import('../types').TabsProps> & Record<string, unknown>;
5
+ }, {}, {}>;
@@ -0,0 +1,11 @@
1
+ import { styled, Tabs } from "@mui/material";
2
+ import { t as tabsStyles } from "../Tabs.styles.js";
3
+ import { T as TABS_KEY_COMPONENT } from "../constants.js";
4
+ import { T as TabsSlots } from "./TabsEnum.js";
5
+ const RootStyled = styled(Tabs, {
6
+ name: TABS_KEY_COMPONENT,
7
+ slot: TabsSlots.root
8
+ })(tabsStyles.root);
9
+ export {
10
+ RootStyled as R
11
+ };
@@ -0,0 +1,21 @@
1
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
+ import { TabsProps as MuiTabProps } from '@mui/material/Tabs';
3
+ import { TabsSlots } from './slots/TabsEnum';
4
+ import { TABS_KEY_COMPONENT } from './constants';
5
+ import { Theme } from '@mui/material';
6
+ /**
7
+ * Props for the tabs component.
8
+ */
9
+ export type TabsProps = MuiTabProps;
10
+ /**
11
+ * State for the tabs component.
12
+ */
13
+ export type TabsOwnerState = TabsProps;
14
+ /**
15
+ * Slots for the tabs component.
16
+ */
17
+ export type TabsSlotsType = typeof TabsSlots;
18
+ /**
19
+ * Styles for the tabs component overrides.
20
+ */
21
+ export type TabsStyles = OverridesStyleRules<TabsSlots, typeof TABS_KEY_COMPONENT, Theme>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.61",
3
+ "version": "9.1.63",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
- import { Label } from '../../../Label';
2
+ import { Label } from '../../../src/components/Label/Label';
3
3
  /**
4
4
  * Label es un componente React que renderiza una etiqueta de texto, la cual puede ser utilizada en formularios o en cualquier
5
5
  * lugar donde se necesite una descripción textual.
@@ -11,8 +11,6 @@ declare const meta: Meta<typeof Label>;
11
11
  export default meta;
12
12
  type Story = StoryObj<typeof Label>;
13
13
  /** Label component Props Comunes */
14
- export declare const MandatoryAndHelpmessage: Story;
15
- /** Label component With props `mandatory=true` */
16
- export declare const Mandatory: Story;
17
- /** Label component With props `helperMessage` */
18
- export declare const Base: Story;
14
+ export declare const LabelDefault: Story;
15
+ /** Label component mode Skeleton With props `helperMessage` */
16
+ export declare const LabelDefaultSkeleton: Story;
@@ -1,18 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { Label } from '../../../Label';
3
- /**
4
- * Label es un componente React que renderiza una etiqueta de texto, la cual puede ser utilizada en formularios o en cualquier
5
- * lugar donde se necesite una descripción textual.
6
- * Soporta la visualización de un indicador de campo obligatorio, mensaje de ayuda a través
7
- * de un tooltip, y puede adaptar su tamaño. El componente también puede mostrar un estado de esqueleto, indicando
8
- * que el contenido está cargando.
9
- */
10
- declare const meta: Meta<typeof Label>;
11
- export default meta;
12
- type Story = StoryObj<typeof Label>;
13
- /** Label component mode Skeleton With props `helperMessage` */
14
- export declare const MandatoryAndHelpMessage: Story;
15
- /** Label component With props `mandatory=true` in mode Skeleton */
16
- export declare const Mandatory: Story;
17
- /** Base Label component mode Skeleton */
18
- export declare const BaseSkeleton: Story;
@@ -1 +0,0 @@
1
- export declare const componentName = "M4LTabs";
@@ -1,4 +0,0 @@
1
- const componentName = "M4LTabs";
2
- export {
3
- componentName as c
4
- };
@@ -1,9 +0,0 @@
1
- import { TabsClassesType } from './types';
2
- export declare const tabsClasses: TabsClassesType;
3
- export declare function getTabsUtilityClass(slot: string): string;
4
- /**
5
- * TODO: Documentar
6
- */
7
- export declare const useTabsUtilityClasses: () => {
8
- root: string;
9
- };
@@ -1,23 +0,0 @@
1
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
2
- import { unstable_composeClasses } from "@mui/base";
3
- import { c as componentName } from "./constants.js";
4
- generateUtilityClasses(componentName, [
5
- /* elements */
6
- "root"
7
- /* states or variants of elements */
8
- ]);
9
- function getTabsUtilityClass(slot) {
10
- return generateUtilityClass(componentName, slot);
11
- }
12
- const useTabsUtilityClasses = () => {
13
- const slots = {
14
- root: ["root"]
15
- };
16
- const composedClasses = unstable_composeClasses(slots, getTabsUtilityClass, {});
17
- return {
18
- ...composedClasses
19
- };
20
- };
21
- export {
22
- useTabsUtilityClasses as u
23
- };
@@ -1,6 +0,0 @@
1
- import { useTabsUtilityClasses } from '.';
2
- export interface TabsClassesType {
3
- root: string;
4
- }
5
- export type TabsClassesKey = keyof TabsClassesType;
6
- export type Classes = ReturnType<typeof useTabsUtilityClasses>;
@@ -1,3 +0,0 @@
1
- export declare const MUITabs: import('@emotion/styled').StyledComponent<import('@mui/material').TabsOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
- ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
3
- }, "children" | "value" | "action" | "style" | "variant" | "sx" | "classes" | "className" | "aria-label" | "aria-labelledby" | "onChange" | "slotProps" | "slots" | "orientation" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
@@ -1,7 +0,0 @@
1
- import { styled, Tabs } from "@mui/material";
2
- const MUITabs = styled(Tabs)(({ theme }) => ({
3
- ...theme.components?.M4LTabs?.styleOverrides || {}
4
- }));
5
- export {
6
- MUITabs as M
7
- };