@m4l/components 9.1.64 → 9.1.66
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 -0
- package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +1 -1
- package/components/mui_extended/MenuDivider/MenuDivider.d.ts +12 -0
- package/components/mui_extended/MenuDivider/MenuDivider.styles.d.ts +2 -0
- package/components/mui_extended/MenuDivider/constants.d.ts +1 -0
- package/components/mui_extended/MenuDivider/slots/MenuDividerEnum.d.ts +4 -0
- package/components/mui_extended/MenuDivider/slots/MenuDividerSlots.d.ts +8 -0
- package/components/mui_extended/MenuDivider/tests/Menudivider.test.d.ts +1 -0
- package/components/mui_extended/MenuDivider/types.d.ts +51 -0
- package/package.json +1 -1
package/@types/types.d.ts
CHANGED
|
@@ -140,6 +140,7 @@ import { PropertyVaLueOwnerState, PropertyValueType } from '../components/Proper
|
|
|
140
140
|
import { RHFTextFieldPasswordOwnerState, RHFTextFieldPasswordType } from '../components/hook-form/RHFTextFieldPassword/types';
|
|
141
141
|
|
|
142
142
|
import { RHFAutocompleteOwnerState, RHFAutocompleteSlotsType } from '../components/hook-form/RHFAutocomplete/types';
|
|
143
|
+
import { MenuDividerOwnerState, MenuDividerSlotsType } from '../components/mui_extended/MenuDivider/types';
|
|
143
144
|
|
|
144
145
|
declare module '@mui/material/styles' {
|
|
145
146
|
// Define the slots in the theme
|
|
@@ -195,6 +196,7 @@ declare module '@mui/material/styles' {
|
|
|
195
196
|
M4LAccountPopover: AccountPopoverSlotsType;
|
|
196
197
|
M4LPropertyValue: PropertyValueType;
|
|
197
198
|
M4LRHFTextFieldPassword: RHFTextFieldPasswordType;
|
|
199
|
+
M4LMenuDivider: MenuDividerSlotsType;
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
interface ComponentsPropsList {
|
|
@@ -250,6 +252,7 @@ declare module '@mui/material/styles' {
|
|
|
250
252
|
M4LColor: Partial<ColorOwnerState>;
|
|
251
253
|
M4LRHFColorPicker: Partial<RHFColorPickerOwnerState>;
|
|
252
254
|
M4LRHFTextFieldPassword: Partial<RHFTextFieldPasswordOwnerState>;
|
|
255
|
+
M4LMenuDivider: Partial<MenuDividerOwnerState>;
|
|
253
256
|
}
|
|
254
257
|
|
|
255
258
|
interface Components {
|
|
@@ -603,5 +606,10 @@ declare module '@mui/material/styles' {
|
|
|
603
606
|
styleOverrides?: ComponentsOverrides<Theme>['M4LRHFTextFieldPassword'];
|
|
604
607
|
variants?: ComponentsVariants['M4LRHFTextFieldPassword'];
|
|
605
608
|
};
|
|
609
|
+
M4LMenuDivider?: {
|
|
610
|
+
defaultProps?: ComponentsPropsList['M4LMenuDivider'];
|
|
611
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LMenuDivider'];
|
|
612
|
+
variants?: ComponentsVariants['M4LMenuDivider'];
|
|
613
|
+
};
|
|
606
614
|
}
|
|
607
615
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuDividerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The MenuDivider component provides a visual separator in menus.
|
|
4
|
+
* It supports customization of color, size, and alignment.
|
|
5
|
+
* @param props Properties for the MenuDivider component.
|
|
6
|
+
* @returns JSX.Element
|
|
7
|
+
* @author Cesar
|
|
8
|
+
* @createdAt 2025-01-09 14:12:00
|
|
9
|
+
* @updatedAt 2025-01-13 17:37:57 - automatic
|
|
10
|
+
* @updatedUser cesar - automatic
|
|
11
|
+
*/
|
|
12
|
+
export declare const MenuDivider: (props: MenuDividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MENU_DIVIDER_KEY_COMPONENT = "M4LMenuDivider";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const MenuDividerRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').MenuDividerOwnerState> & Record<string, unknown> & {
|
|
2
|
+
ownerState: Partial<import('../types').MenuDividerOwnerState> & Record<string, unknown>;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const DividerStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').DividerOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLHRElement | 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<HTMLHRElement> | null | undefined;
|
|
6
|
+
}, "children" | "light" | "style" | "absolute" | "variant" | "textAlign" | "sx" | "classes" | "className" | "orientation" | "flexItem">, "children" | "ref" | "title" | "id" | "light" | "hidden" | "color" | "content" | "style" | "absolute" | "variant" | "textAlign" | "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" | "key" | "orientation" | "flexItem"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').MenuDividerOwnerState> & Record<string, unknown> & {
|
|
7
|
+
ownerState: Partial<import('../types').MenuDividerOwnerState> & Record<string, unknown>;
|
|
8
|
+
}, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DividerProps as MUIDividerProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
3
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
4
|
+
import { MenuDividerSlots } from './slots/MenuDividerEnum';
|
|
5
|
+
import { MENU_DIVIDER_KEY_COMPONENT } from './constants';
|
|
6
|
+
import { Sizes } from '@m4l/styles';
|
|
7
|
+
/**
|
|
8
|
+
* Propiedades del componente `MenuDivider`.
|
|
9
|
+
*/
|
|
10
|
+
export interface MenuDividerProps extends Omit<MUIDividerProps, 'variant'> {
|
|
11
|
+
/**
|
|
12
|
+
* Identificador de prueba para el `MenuDivider`.
|
|
13
|
+
*/
|
|
14
|
+
dataTestId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Clase CSS adicional para el `MenuDivider`.
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Define el estilo del divisor.
|
|
21
|
+
* - `solid`: Una línea sólida.
|
|
22
|
+
* - `dash`: Una línea con guiones.
|
|
23
|
+
*/
|
|
24
|
+
variant?: 'solid' | 'dash';
|
|
25
|
+
/**
|
|
26
|
+
* Define la orientación del `MenuDivider`.
|
|
27
|
+
* - `'horizontal'`: Una línea horizontal.
|
|
28
|
+
* - `'vertical'`: Una línea vertical.
|
|
29
|
+
*/
|
|
30
|
+
orientation?: 'horizontal' | 'vertical';
|
|
31
|
+
/**
|
|
32
|
+
* Tamaño del `MenuDivider`.
|
|
33
|
+
*/
|
|
34
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Estado del propietario del `MenuDivider` utilizado para definir propiedades internas de estilo y comportamiento.
|
|
38
|
+
*/
|
|
39
|
+
export interface MenuDividerOwnerState extends Pick<MenuDividerProps, 'orientation'> {
|
|
40
|
+
MenuDividerVariant?: MenuDividerProps['variant'];
|
|
41
|
+
MenuDividerOrientation?: MenuDividerProps['orientation'];
|
|
42
|
+
MenuDividerSize?: MenuDividerProps['size'];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Define los tipos de Slots disponibles para el `MenuDivider`.
|
|
46
|
+
*/
|
|
47
|
+
export type MenuDividerSlotsType = keyof typeof MenuDividerSlots;
|
|
48
|
+
/**
|
|
49
|
+
* Estilos aplicables al `MenuDivider` utilizando temas y slots personalizados.
|
|
50
|
+
*/
|
|
51
|
+
export type MenuDividerStyles = OverridesStyleRules<MenuDividerSlotsType, typeof MENU_DIVIDER_KEY_COMPONENT, Theme>;
|