@m4l/components 9.1.15 → 9.1.16

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.
@@ -3,7 +3,7 @@ import { IconProps } from './types';
3
3
  * Provee de un medio por el cual se carga un icono svg en la plataforma web, aporta su versión provisional de carga en red.
4
4
  * @author Bruce Escobar - automatic
5
5
  * @createdAt 2024-10-22 19:08:59 - automatic
6
- * @updatedAt 2024-12-05 14:14:39 - automatic
7
- * @updatedUser SebastianM - automatic
6
+ * @updatedAt 2024-12-10 08:14:13 - automatic
7
+ * @updatedUser Bruce Escobar - automatic
8
8
  */
9
9
  export declare const Icon: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -34,7 +34,7 @@
34
34
  * - Dynamically updates the fullscreen mode when the `fullScreen` prop changes.
35
35
  * @author cesar - automatic
36
36
  * @createdAt 2024-11-28 08:35:15 - automatic
37
- * @updatedAt 2024-12-06 11:53:51 - automatic
38
- * @updatedUser cesar - automatic
37
+ * @updatedAt 2024-12-10 08:14:13 - automatic
38
+ * @updatedUser Bruce Escobar - automatic
39
39
  */
40
40
  export declare const ModalDialog: () => import("react/jsx-runtime").JSX.Element;
@@ -3,8 +3,8 @@ const windowBaseStyles = {
3
3
  * Styles for the window base wrapper component.
4
4
  * @author cesar - automatic
5
5
  * @createdAt 2024-11-15 18:08:44 - automatic
6
- * @updatedAt 2024-12-06 14:42:54 - automatic
7
- * @updatedUser cesar - automatic
6
+ * @updatedAt 2024-12-10 08:14:13 - automatic
7
+ * @updatedUser Bruce Escobar - automatic
8
8
  */
9
9
  wrapperWindowBase: ({ theme, ownerState }) => ({
10
10
  height: "100%",
@@ -27,8 +27,8 @@ const windowBaseStyles = {
27
27
  * Styles for the content of the window base component.
28
28
  * @author cesar - automatic
29
29
  * @createdAt 2024-11-15 18:08:44 - automatic
30
- * @updatedAt 2024-12-06 14:42:54 - automatic
31
- * @updatedUser cesar - automatic
30
+ * @updatedAt 2024-12-10 08:14:13 - automatic
31
+ * @updatedUser Bruce Escobar - automatic
32
32
  */
33
33
  contentWindowBase: ({ theme }) => ({
34
34
  padding: theme.vars.size.baseSpacings.sp3,
@@ -38,8 +38,8 @@ const windowBaseStyles = {
38
38
  * Styles for the header of the window base component.
39
39
  * @author cesar - automatic
40
40
  * @createdAt 2024-11-15 18:08:44 - automatic
41
- * @updatedAt 2024-12-06 14:42:54 - automatic
42
- * @updatedUser cesar - automatic
41
+ * @updatedAt 2024-12-10 08:14:13 - automatic
42
+ * @updatedUser Bruce Escobar - automatic
43
43
  */
44
44
  headerWindowComponent: ({ theme, ownerState }) => ({
45
45
  width: "100%",
@@ -74,8 +74,8 @@ const windowBaseStyles = {
74
74
  * Styles for the content of the header of the window base component.
75
75
  * @author cesar - automatic
76
76
  * @createdAt 2024-11-15 18:08:44 - automatic
77
- * @updatedAt 2024-12-06 14:42:54 - automatic
78
- * @updatedUser cesar - automatic
77
+ * @updatedAt 2024-12-10 08:14:13 - automatic
78
+ * @updatedUser Bruce Escobar - automatic
79
79
  */
80
80
  headerContentWindowBase: ({ theme }) => ({
81
81
  display: "flex",
@@ -89,8 +89,8 @@ const windowBaseStyles = {
89
89
  * Styles for the title of the header of the window base component.
90
90
  * @author cesar - automatic
91
91
  * @createdAt 2024-11-15 18:08:44 - automatic
92
- * @updatedAt 2024-12-06 14:42:54 - automatic
93
- * @updatedUser cesar - automatic
92
+ * @updatedAt 2024-12-10 08:14:13 - automatic
93
+ * @updatedUser Bruce Escobar - automatic
94
94
  */
95
95
  headerTitleWindowBase: ({ theme }) => ({
96
96
  width: "auto",
@@ -101,8 +101,8 @@ const windowBaseStyles = {
101
101
  * Styles for the subtitle container of the header of the window base component.
102
102
  * @author cesar - automatic
103
103
  * @createdAt 2024-11-15 18:08:44 - automatic
104
- * @updatedAt 2024-12-06 14:42:54 - automatic
105
- * @updatedUser cesar - automatic
104
+ * @updatedAt 2024-12-10 08:14:13 - automatic
105
+ * @updatedUser Bruce Escobar - automatic
106
106
  */
107
107
  subtitleContainer: ({ theme }) => ({
108
108
  display: "flex",
@@ -116,8 +116,8 @@ const windowBaseStyles = {
116
116
  * @returns An object containing the styles for the dot window base component.
117
117
  * @author cesar - automatic
118
118
  * @createdAt 2024-11-22 19:40:23 - automatic
119
- * @updatedAt 2024-12-06 14:42:54 - automatic
120
- * @updatedUser cesar - automatic
119
+ * @updatedAt 2024-12-10 08:14:13 - automatic
120
+ * @updatedUser Bruce Escobar - automatic
121
121
  */
122
122
  pointWindowBase: ({ theme, ownerState }) => ({
123
123
  display: "flex",
@@ -143,8 +143,8 @@ const windowBaseStyles = {
143
143
  * Styles for the subtitle of the header of the window base component.
144
144
  * @author cesar - automatic
145
145
  * @createdAt 2024-11-15 18:08:44 - automatic
146
- * @updatedAt 2024-12-06 14:42:54 - automatic
147
- * @updatedUser cesar - automatic
146
+ * @updatedAt 2024-12-10 08:14:13 - automatic
147
+ * @updatedUser Bruce Escobar - automatic
148
148
  */
149
149
  headerSubTitleWindowBase: ({ theme }) => ({
150
150
  width: "auto !important",
@@ -155,8 +155,8 @@ const windowBaseStyles = {
155
155
  * Styles for the icon of the header of the window base component.
156
156
  * @author cesar - automatic
157
157
  * @createdAt 2024-11-18 08:11:19 - automatic
158
- * @updatedAt 2024-12-06 14:42:54 - automatic
159
- * @updatedUser cesar - automatic
158
+ * @updatedAt 2024-12-10 08:14:13 - automatic
159
+ * @updatedUser Bruce Escobar - automatic
160
160
  */
161
161
  headerIconWindowBase: ({ theme }) => ({
162
162
  display: "flex",
@@ -169,8 +169,8 @@ const windowBaseStyles = {
169
169
  * Styles for the icons wrapper of the window base component.
170
170
  * @author cesar - automatic
171
171
  * @createdAt 2024-11-18 08:11:19 - automatic
172
- * @updatedAt 2024-12-06 14:42:54 - automatic
173
- * @updatedUser cesar - automatic
172
+ * @updatedAt 2024-12-10 08:14:13 - automatic
173
+ * @updatedUser Bruce Escobar - automatic
174
174
  */
175
175
  iconsWrapperWindowBase: () => ({
176
176
  display: "flex",
@@ -180,8 +180,8 @@ const windowBaseStyles = {
180
180
  * Styles for the dot icon of the window base component.
181
181
  * @author cesar - automatic
182
182
  * @createdAt 2024-11-22 19:40:23 - automatic
183
- * @updatedAt 2024-12-06 14:42:54 - automatic
184
- * @updatedUser cesar - automatic
183
+ * @updatedAt 2024-12-10 08:14:13 - automatic
184
+ * @updatedUser Bruce Escobar - automatic
185
185
  */
186
186
  pointIcon: ({ theme, ownerState }) => ({
187
187
  color: theme.vars.palette.text.primary,
@@ -205,8 +205,8 @@ const windowBaseStyles = {
205
205
  * Styles for the menu actions of the window base component.
206
206
  * @author cesar - automatic
207
207
  * @createdAt 2024-12-05 07:49:27 - automatic
208
- * @updatedAt 2024-12-06 14:42:54 - automatic
209
- * @updatedUser cesar - automatic
208
+ * @updatedAt 2024-12-10 08:14:13 - automatic
209
+ * @updatedUser Bruce Escobar - automatic
210
210
  */
211
211
  menuActionsWindowBase: () => ({
212
212
  left: "-50px"
@@ -1,5 +1,12 @@
1
1
  import { BadgeProps } from './types';
2
2
  /**
3
- * TODO: Documentar
3
+ * The Badge component renders a customizable badge that can display labels, counts, or status indicators.
4
+ * It supports various sizes, colors, and variants (e.g., standard or dot) to suit different use cases.
5
+ * @param {BadgeProps} props - Props for the `Badge` component.
6
+ * @returns JSX.Element - The rendered Badge component.
7
+ * @author cesar
8
+ * @createdAt 2024-12-03 11:11:02
9
+ * @updatedAt 2024-12-09 10:38:37 - automatic
10
+ * @updatedUser cesar - automatic
4
11
  */
5
12
  export declare const Badge: (props: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,36 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Badge as Badge$1 } from "@mui/material";
3
2
  import { B as BadgeRootStyled } from "./slots/BadgeSlots.js";
3
+ import clsx from "clsx";
4
+ import { g as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
5
+ import { B as BADGE_LABEL_KEY_COMPONENT } from "./constants.js";
6
+ import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
4
7
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
8
+ import { B as BadgeSlots } from "./slots/BadgeEnum.js";
5
9
  const Badge = (props) => {
6
- const { children, size, dataTestId = "", ...others } = props;
10
+ const {
11
+ color = "default",
12
+ size = "medium",
13
+ variant = "standard",
14
+ dataTestId,
15
+ children,
16
+ ...others
17
+ } = props;
7
18
  const { currentSize } = useComponentSize(size);
19
+ const normalizedSize = currentSize === "large" ? "medium" : currentSize;
20
+ const ownerState = {
21
+ BadgeColor: color,
22
+ BadgeVariant: variant,
23
+ BadgeSize: normalizedSize
24
+ };
8
25
  return /* @__PURE__ */ jsx(
9
26
  BadgeRootStyled,
10
27
  {
11
- ownerState: { size: currentSize },
12
- children: /* @__PURE__ */ jsx(Badge$1, { ...others, children })
28
+ role: "badge-role",
29
+ className: clsx(getComponentSlotRoot(BADGE_LABEL_KEY_COMPONENT)),
30
+ ...getPropDataTestId(BADGE_LABEL_KEY_COMPONENT, BadgeSlots.rootBadge, dataTestId),
31
+ ownerState,
32
+ ...others,
33
+ children
13
34
  }
14
35
  );
15
36
  };
@@ -1,6 +1,60 @@
1
1
  const badgeStyles = {
2
- rootBadge: () => ({
3
- // No data to appply
2
+ /**
3
+ * Badge Root Styles
4
+ * @author cesar - automatic
5
+ * @createdAt 2024-12-03 11:11:02 - automatic
6
+ * @updatedAt 2024-12-05 14:50:10 - automatic
7
+ * @updatedUser cesar - automatic
8
+ */
9
+ rootBadge: ({ theme, ownerState }) => ({
10
+ "& .MuiBadge-badge": {
11
+ display: "flex",
12
+ justifyContent: "center",
13
+ alignItems: "center",
14
+ flexShrink: 0,
15
+ padding: theme.vars.size.baseSpacings.sp1,
16
+ height: theme.vars.size.baseSpacings["sp3-5"],
17
+ width: theme.vars.size.baseSpacings["sp3-5"],
18
+ minWidth: theme.vars.size.baseSpacings["sp3-5"],
19
+ minHeight: theme.vars.size.baseSpacings["sp3-5"],
20
+ // Colores dinámicos basados en el estado
21
+ color: theme.palette[ownerState.BadgeColor || "default"].contrastText,
22
+ backgroundColor: theme.palette[ownerState.BadgeColor || "default"].light,
23
+ // Tamaño dinámico basado en `BadgeSize` y si es móvil
24
+ ...theme.generalSettings.isMobile ? {
25
+ ...ownerState.BadgeSize === "small" && {
26
+ height: theme.vars.size.mobile.small.base,
27
+ minWidth: theme.vars.size.mobile.small.base,
28
+ fontSize: theme.vars.size.typography.mobile.small.body.fontSize
29
+ },
30
+ ...ownerState.BadgeSize === "medium" && {
31
+ height: theme.vars.size.mobile.medium.base,
32
+ minWidth: theme.vars.size.mobile.medium.base,
33
+ fontSize: theme.vars.size.typography.mobile.medium.body.fontSize
34
+ }
35
+ } : {
36
+ ...ownerState.BadgeSize === "small" && {
37
+ height: theme.vars.size.desktop.small.base,
38
+ minWidth: theme.vars.size.desktop.small.base,
39
+ fontSize: theme.vars.size.typography.desktop.small.body.fontSize
40
+ },
41
+ ...ownerState.BadgeSize === "medium" && {
42
+ height: theme.vars.size.desktop.medium.base,
43
+ minWidth: theme.vars.size.desktop.medium.base,
44
+ fontSize: theme.vars.size.typography.desktop.medium.body.fontSize
45
+ }
46
+ },
47
+ // Estilos para variantes
48
+ ...ownerState.BadgeVariant === "dot" && {
49
+ height: ownerState.BadgeSize === "small" && theme.vars.size.baseSpacings.sp2,
50
+ width: ownerState.BadgeSize === "small" && theme.vars.size.baseSpacings.sp2,
51
+ minWidth: ownerState.BadgeSize === "small" && theme.vars.size.baseSpacings.sp2,
52
+ minHeight: ownerState.BadgeSize === "small" && theme.vars.size.baseSpacings.sp2,
53
+ borderRadius: "50%",
54
+ fontSize: 0
55
+ },
56
+ borderRadius: "50%"
57
+ }
4
58
  })
5
59
  };
6
60
  export {
@@ -1,2 +1,6 @@
1
- export { Badge } from './Badge';
2
- export type { BadgeProps } from './types';
1
+ export * from './Badge.styles';
2
+ export * from './Badge';
3
+ export * from './constants';
4
+ export * from './slots/BadgeEnum';
5
+ export * from './slots/BadgeSlots';
6
+ export * from './types';
@@ -1,5 +1,5 @@
1
1
  export declare const BadgeRootStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').BadgeOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
2
2
  ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
3
- }, "children" | "components" | "color" | "style" | "variant" | "className" | "classes" | "sx" | "slots" | "slotProps" | "componentsProps" | "invisible" | "max" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero">, "children" | "ref" | "title" | "id" | "components" | "hidden" | "color" | "content" | "style" | "variant" | "className" | "classes" | "onChange" | "sx" | "translate" | "slots" | "slotProps" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "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" | "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" | "componentsProps" | "invisible" | "max" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').BadgeOwnerState> & Record<string, unknown> & {
4
- ownerState: Partial<import('../types').BadgeOwnerState> & Record<string, unknown>;
3
+ }, "children" | "components" | "color" | "style" | "variant" | "className" | "classes" | "sx" | "slots" | "slotProps" | "componentsProps" | "invisible" | "max" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero">, "children" | "ref" | "title" | "id" | "components" | "hidden" | "color" | "content" | "style" | "variant" | "className" | "classes" | "onChange" | "sx" | "translate" | "slots" | "slotProps" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "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" | "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" | "componentsProps" | "invisible" | "max" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').BadgeOwnerState> & Record<string, unknown> & {
4
+ ownerState: Partial<import('..').BadgeOwnerState> & Record<string, unknown>;
5
5
  }, {}, {}>;
@@ -3,11 +3,17 @@ import { Theme } from '@mui/material/styles';
3
3
  import { BADGE_LABEL_KEY_COMPONENT } from './constants';
4
4
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
5
5
  import { BadgeSlots } from './slots';
6
- import { Sizes } from '@m4l/styles';
6
+ import { ComponentPalletColor, Sizes } from '@m4l/styles';
7
7
  export interface BadgeProps extends MUIBadgeProps {
8
8
  dataTestId?: string;
9
- size?: Sizes;
9
+ variant?: 'standard' | 'dot' | undefined;
10
+ size?: Extract<Sizes, 'small' | 'medium'>;
11
+ color?: ComponentPalletColor;
10
12
  }
11
13
  export type BadgeSlotsType = keyof typeof BadgeSlots;
12
- export type BadgeOwnerState = {};
14
+ export type BadgeOwnerState = {
15
+ BadgeColor?: BadgeProps['color'];
16
+ BadgeVariant?: BadgeProps['variant'];
17
+ BadgeSize?: BadgeProps['size'];
18
+ };
13
19
  export type BadgeStyles = Partial<OverridesStyleRules<BadgeSlotsType, typeof BADGE_LABEL_KEY_COMPONENT, Theme> | undefined> | undefined;
@@ -3,8 +3,8 @@ const dialogStyles = {
3
3
  * Dialog Root style
4
4
  * @author cesar - automatic
5
5
  * @createdAt 2024-11-24 15:58:24 - automatic
6
- * @updatedAt 2024-12-05 17:01:44 - automatic
7
- * @updatedUser cesar - automatic
6
+ * @updatedAt 2024-12-10 08:14:13 - automatic
7
+ * @updatedUser Bruce Escobar - automatic
8
8
  */
9
9
  dialogRoot: ({ theme }) => ({
10
10
  background: theme.vars.palette.background.backdrop,
@@ -7,7 +7,7 @@ import { MenuItemProps } from './types';
7
7
  * @returns
8
8
  * @author Bruce Escobar - automatic
9
9
  * @createdAt 2024-10-22 19:53:39 - automatic
10
- * @updatedAt 2024-12-05 16:30:55 - automatic
11
- * @updatedUser SebastianM - automatic
10
+ * @updatedAt 2024-12-10 08:14:13 - automatic
11
+ * @updatedUser Bruce Escobar - automatic
12
12
  */
13
13
  export declare const MenuItem: (props: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,8 +3,8 @@ const menuItemStyles = {
3
3
  * Estilos para el contenedor de los items del menú
4
4
  * @author Bruce Escobar - automatic
5
5
  * @createdAt 2024-10-22 10:38:00 - automatic
6
- * @updatedAt 2024-12-05 14:14:39 - automatic
7
- * @updatedUser SebastianM - automatic
6
+ * @updatedAt 2024-12-10 08:14:13 - automatic
7
+ * @updatedUser Bruce Escobar - automatic
8
8
  */
9
9
  menuItemRoot: ({ theme, ownerState }) => ({
10
10
  width: "100%",
@@ -56,8 +56,8 @@ const menuItemStyles = {
56
56
  * Estilos para el icono de los items del menú
57
57
  * @author SebastianM - automatic
58
58
  * @createdAt 2024-12-02 19:12:14 - automatic
59
- * @updatedAt 2024-12-05 14:14:39 - automatic
60
- * @updatedUser SebastianM - automatic
59
+ * @updatedAt 2024-12-10 08:14:13 - automatic
60
+ * @updatedUser Bruce Escobar - automatic
61
61
  */
62
62
  menuItemIcon: ({ ownerState }) => ({
63
63
  "&.M4LMenuItemEndIcon": {
@@ -73,8 +73,8 @@ const menuItemStyles = {
73
73
  * Estilos para el contenedor de los items del menú en skeleton
74
74
  * @author Bruce Escobar - automatic
75
75
  * @createdAt 2024-10-22 10:38:00 - automatic
76
- * @updatedAt 2024-12-05 14:14:39 - automatic
77
- * @updatedUser SebastianM - automatic
76
+ * @updatedAt 2024-12-10 08:14:13 - automatic
77
+ * @updatedUser Bruce Escobar - automatic
78
78
  */
79
79
  skeletonMenuItem: ({ theme, ownerState }) => ({
80
80
  width: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.15",
3
+ "version": "9.1.16",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -31,7 +31,7 @@ import { StoryFn, StoryContext } from '@storybook/react';
31
31
  * @returns JSX.Element - The decorated story with modal integration.
32
32
  * @author cesar - automatic
33
33
  * @createdAt 2024-11-26 12:39:40 - automatic
34
- * @updatedAt 2024-12-06 11:53:51 - automatic
35
- * @updatedUser cesar - automatic
34
+ * @updatedAt 2024-12-10 08:14:13 - automatic
35
+ * @updatedUser Bruce Escobar - automatic
36
36
  */
37
37
  export declare const WithExtendedContainer: (_: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Badge } from '../../../../../src/components/mui_extended/Badge/Badge';
3
+ declare const meta: Meta<typeof Badge>;
4
+ type Story = StoryObj<typeof Badge>;
5
+ /**
6
+ * Default story for the Badge component.
7
+ */
8
+ export declare const Default: Story;
9
+ /**
10
+ * Badge with a primary color.
11
+ */
12
+ export declare const PrimaryBadge: Story;
13
+ /**
14
+ * Badge with a default color.
15
+ */
16
+ export declare const DefaultBadge: Story;
17
+ /**
18
+ * Badge with a error color.
19
+ */
20
+ export declare const ErrorBadge: Story;
21
+ /**
22
+ * Badge with a info color.
23
+ */
24
+ export declare const InfoBadge: Story;
25
+ /**
26
+ * Badge with a warning color.
27
+ */
28
+ export declare const WarningBadge: Story;
29
+ /**
30
+ * Badge with a success color.
31
+ */
32
+ export declare const SuccessBadge: Story;
33
+ export default meta;
File without changes