@m4l/components 8.0.1 → 8.1.0-beta.devDaniel.Icon
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/components/DataGrid/classes/index.d.ts +1 -1
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +1 -1
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/Icon/Icon.d.ts +0 -3
- package/components/Icon/Icon.js +54 -71
- package/components/Icon/Icon.styles.js +73 -31
- package/components/Icon/slots/IconEnum.d.ts +2 -1
- package/components/Icon/slots/IconEnum.js +1 -0
- package/components/Icon/slots/IconSlots.d.ts +3 -0
- package/components/Icon/slots/IconSlots.js +7 -1
- package/components/Icon/stories/DefaultWithProps/Icon.defaultWithProps.stories.d.ts +35 -0
- package/components/Icon/stories/Preset/Icon.preset.stories.d.ts +16 -0
- package/components/Icon/stories/Semantic/Icon.semantic.stories.d.ts +30 -0
- package/components/Icon/stories/Sizes/icon.sizes.stories.d.ts +40 -0
- package/components/Icon/types.d.ts +16 -12
- package/components/Label/slots/LabelSlots.d.ts +1 -1
- package/components/PropertyValue/classes/index.d.ts +1 -1
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/styles.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +1 -1
- package/components/ToastContainer/subcomponents/ToastMessage/useToastMessage.d.ts +1 -1
- package/components/ToastContainer/subcomponents/ToastMessage/useToastMessage.js +2 -1
- package/components/extended/react-resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
- package/components/extended/react-resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/styles.d.ts +1 -1
- package/components/hook-form/RHFInputNumberSpinner/slots/RHFInputNumberSpinnerSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFormContext/classes/index.d.ts +1 -1
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/mui_extended/Button/styles.d.ts +1 -1
- package/components/mui_extended/IconButton/IconButton.js +4 -3
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
- package/components/mui_extended/IconButton/types.d.ts +1 -1
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +1 -1
- package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/mui_extended/Tabs/styles.d.ts +1 -1
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/package.json +1 -1
- package/components/Icon/Icon.stories.d.ts +0 -166
|
@@ -6,8 +6,8 @@ export declare function getDataGridUtilityClass(slot: string): string;
|
|
|
6
6
|
* TODO: Documentar
|
|
7
7
|
*/
|
|
8
8
|
export declare const dataGridUtilityClasses: (ownerState: OwnerState) => {
|
|
9
|
-
root: string;
|
|
10
9
|
actions: string;
|
|
10
|
+
root: string;
|
|
11
11
|
rowsCount: string;
|
|
12
12
|
rowsCountLabel: string;
|
|
13
13
|
rowsCountValue: string;
|
|
@@ -57,7 +57,7 @@ export declare const PopoverMenuStyled: import('@emotion/styled').StyledComponen
|
|
|
57
57
|
}, {}, {}>;
|
|
58
58
|
export declare const PopoverMenuItemStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').MenuItemOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
59
59
|
ref?: ((instance: HTMLLIElement | 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<HTMLLIElement> | null | undefined;
|
|
60
|
-
}, "
|
|
60
|
+
}, "children" | "sx" | "classes" | "autoFocus" | "className" | "style" | "tabIndex" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "divider" | "selected" | "disableGutters" | "dense">, "children" | "ref" | "value" | "color" | "content" | "translate" | "sx" | "classes" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "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" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "key" | "divider" | "selected" | "disableGutters" | "dense"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown> & {
|
|
61
61
|
ownerState: Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown>;
|
|
62
62
|
}, {}, {}>;
|
|
63
63
|
export declare const PopoverMenuItemIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').DynamicFilterOwnerState> & Record<string, unknown> & {
|
|
@@ -54,7 +54,7 @@ export declare const PopoverMenuStyled: import('@emotion/styled').StyledComponen
|
|
|
54
54
|
}, {}, {}>;
|
|
55
55
|
export declare const PopoverMenuItemStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').MenuItemOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
56
56
|
ref?: ((instance: HTMLLIElement | 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<HTMLLIElement> | null | undefined;
|
|
57
|
-
}, "
|
|
57
|
+
}, "children" | "sx" | "classes" | "autoFocus" | "className" | "style" | "tabIndex" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "divider" | "selected" | "disableGutters" | "dense">, "children" | "ref" | "value" | "color" | "content" | "translate" | "sx" | "classes" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "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" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "key" | "divider" | "selected" | "disableGutters" | "dense"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown> & {
|
|
58
58
|
ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
|
|
59
59
|
}, {}, {}>;
|
|
60
60
|
export declare const PopoverMenuItemIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown> & {
|
|
@@ -3,5 +3,5 @@ export declare const gridLayoutClasses: GridLayoutClasses;
|
|
|
3
3
|
/**
|
|
4
4
|
* TODO: Documentar
|
|
5
5
|
*/
|
|
6
|
-
export declare const useUtilityClasses: () => Record<"root" | "
|
|
6
|
+
export declare const useUtilityClasses: () => Record<"root" | "invisible" | "static" | "colapsed" | "resizing" | "dragging" | "gridItemRoot" | "gridItemPlaceholder" | "gridItemFreeMove" | "maximizeMe" | "maximizeOther" | "resizeHide" | "cssTransforms", string>;
|
|
7
7
|
export type Classes = ReturnType<typeof useUtilityClasses>;
|
|
@@ -2,7 +2,4 @@ import { IconProps } from './types';
|
|
|
2
2
|
/**
|
|
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
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Documentar
|
|
7
|
-
*/
|
|
8
5
|
export declare const Icon: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
package/components/Icon/Icon.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleSkeleton } from "@m4l/core";
|
|
3
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
4
4
|
import { I as ICON_PREFIX } from "./constants.js";
|
|
5
5
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
6
|
-
import { T as TooltipStyled, R as RootStyled, I as IconStyled } from "./slots/IconSlots.js";
|
|
6
|
+
import { T as TooltipStyled, R as RootStyled, I as IconStyled, a as IconSkeletonStyled } from "./slots/IconSlots.js";
|
|
7
7
|
import { I as IconSlots } from "./slots/IconEnum.js";
|
|
8
8
|
const Icon = (props) => {
|
|
9
9
|
const {
|
|
10
10
|
src,
|
|
11
|
-
size = "
|
|
11
|
+
size = "medium",
|
|
12
12
|
rotationAngle,
|
|
13
13
|
tooltipContent,
|
|
14
|
-
securityArea,
|
|
15
14
|
color = "text.primary",
|
|
16
15
|
className,
|
|
17
16
|
placement = "bottom",
|
|
@@ -19,72 +18,56 @@ const Icon = (props) => {
|
|
|
19
18
|
disabled
|
|
20
19
|
} = props;
|
|
21
20
|
const { currentSize } = useComponentSize(size);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
const isSkeleton = useModuleSkeleton();
|
|
22
|
+
const ownerState = {
|
|
23
|
+
iconSize: currentSize,
|
|
24
|
+
iconColor: color,
|
|
25
|
+
iconSrc: src,
|
|
26
|
+
iconDisabled: disabled,
|
|
27
|
+
iconRotationAngle: rotationAngle,
|
|
28
|
+
isSkeleton
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
+
tooltipContent ? /* @__PURE__ */ jsx(
|
|
32
|
+
TooltipStyled,
|
|
33
|
+
{
|
|
34
|
+
title: tooltipContent,
|
|
35
|
+
ownerState: { ...ownerState },
|
|
36
|
+
placement,
|
|
37
|
+
...getPropDataTestId(ICON_PREFIX, IconSlots.tooltip, instaceDataTestId),
|
|
38
|
+
children: /* @__PURE__ */ jsx(
|
|
39
|
+
RootStyled,
|
|
40
|
+
{
|
|
41
|
+
className,
|
|
42
|
+
ownerState: { ...ownerState },
|
|
43
|
+
...getPropDataTestId(ICON_PREFIX, IconSlots.root, instaceDataTestId),
|
|
44
|
+
children: /* @__PURE__ */ jsx(
|
|
45
|
+
IconStyled,
|
|
46
|
+
{
|
|
47
|
+
ownerState: { ...ownerState },
|
|
48
|
+
...getPropDataTestId(ICON_PREFIX, IconSlots.icon, instaceDataTestId)
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
33
52
|
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
54
|
-
[TEST_PROP_ID]: getNameDataTestId(
|
|
55
|
-
ICON_PREFIX,
|
|
56
|
-
IconSlots.icon,
|
|
57
|
-
instaceDataTestId
|
|
58
|
-
)
|
|
59
|
-
} : {}
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
) : /* @__PURE__ */ jsx(
|
|
66
|
-
RootStyled,
|
|
67
|
-
{
|
|
68
|
-
className,
|
|
69
|
-
ownerState: { securityArea, size: currentSize },
|
|
70
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(ICON_PREFIX, IconSlots.root, instaceDataTestId) } : {},
|
|
71
|
-
children: /* @__PURE__ */ jsx(
|
|
72
|
-
IconStyled,
|
|
73
|
-
{
|
|
74
|
-
ownerState: {
|
|
75
|
-
src,
|
|
76
|
-
rotationAngle,
|
|
77
|
-
size: currentSize,
|
|
78
|
-
color,
|
|
79
|
-
disabled
|
|
80
|
-
},
|
|
81
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
82
|
-
[TEST_PROP_ID]: getNameDataTestId(ICON_PREFIX, IconSlots.icon, instaceDataTestId)
|
|
83
|
-
} : {}
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
) });
|
|
53
|
+
}
|
|
54
|
+
) : /* @__PURE__ */ jsx(
|
|
55
|
+
RootStyled,
|
|
56
|
+
{
|
|
57
|
+
className,
|
|
58
|
+
ownerState: { ...ownerState },
|
|
59
|
+
...getPropDataTestId(ICON_PREFIX, IconSlots.root, instaceDataTestId),
|
|
60
|
+
children: /* @__PURE__ */ jsx(
|
|
61
|
+
IconStyled,
|
|
62
|
+
{
|
|
63
|
+
ownerState: { ...ownerState },
|
|
64
|
+
...getPropDataTestId(ICON_PREFIX, IconSlots.icon, instaceDataTestId)
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
isSkeleton && /* @__PURE__ */ jsx(IconSkeletonStyled, { variant: "rectangular", ownerState: { ...ownerState } })
|
|
70
|
+
] });
|
|
88
71
|
};
|
|
89
72
|
export {
|
|
90
73
|
Icon as I
|
|
@@ -1,54 +1,96 @@
|
|
|
1
1
|
import { getPropertyByString } from "@m4l/core";
|
|
2
2
|
const iconStyles = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Slot root: Contiene los estilos para el contenedor principal del ícono.
|
|
5
|
+
* Este slot es responsable de definir el layout del ícono dentro de su contenedor,
|
|
6
|
+
* incluyendo propiedades de flexbox para centrar su contenido, y el tamaño
|
|
7
|
+
* dinámico basado en el dispositivo (móvil o desktop) y el tamaño del ícono
|
|
8
|
+
* ('small' o 'medium'). También incluye animaciones como la transición
|
|
9
|
+
* suave de transformación.
|
|
5
10
|
*/
|
|
6
11
|
root: ({ theme, ownerState }) => ({
|
|
7
|
-
display: "flex",
|
|
12
|
+
display: ownerState.isSkeleton ? "none" : "flex",
|
|
8
13
|
justifyContent: "center",
|
|
9
14
|
alignItems: "center",
|
|
10
15
|
width: "fit-content",
|
|
11
16
|
transition: "transform 0.5s ease-in-out",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
...ownerState.iconSize === "medium" && {
|
|
18
|
+
...theme.generalSettings.isMobile ? {
|
|
19
|
+
width: theme.vars.size.mobile.medium.base,
|
|
20
|
+
height: theme.vars.size.mobile.medium.base
|
|
21
|
+
} : {
|
|
22
|
+
width: theme.vars.size.desktop.medium.base,
|
|
23
|
+
height: theme.vars.size.desktop.medium.base
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
...ownerState.iconSize === "small" && {
|
|
27
|
+
...theme.generalSettings.isMobile ? {
|
|
28
|
+
width: theme.vars.size.mobile.small.base,
|
|
29
|
+
height: theme.vars.size.mobile.small.base
|
|
30
|
+
} : {
|
|
31
|
+
width: theme.vars.size.desktop.small.base,
|
|
32
|
+
height: theme.vars.size.desktop.small.base
|
|
33
|
+
}
|
|
34
|
+
}
|
|
15
35
|
}),
|
|
16
|
-
tooltip: () => ({}),
|
|
17
36
|
/**
|
|
18
|
-
*
|
|
37
|
+
* Slot icon: Define los estilos para el ícono que se carga dinámicamente.
|
|
38
|
+
* Este slot gestiona cómo se carga y muestra el recurso gráfico en formato de máscara,
|
|
39
|
+
* incluyendo su posición, repetición y ajuste de tamaño. También controla la rotación
|
|
40
|
+
* del ícono basada en el ángulo de rotación proporcionado, y el color de fondo que
|
|
41
|
+
* se ajusta de acuerdo con el estado de deshabilitación o no del ícono.
|
|
19
42
|
*/
|
|
20
43
|
icon: ({ theme, ownerState }) => ({
|
|
21
44
|
maskPosition: "center",
|
|
22
45
|
maskRepeat: "no-repeat",
|
|
23
46
|
maskSize: "cover",
|
|
24
47
|
WebkitMaskRepeat: "no-repeat",
|
|
25
|
-
mask: `url(${ownerState.
|
|
26
|
-
WebkitMask: `url(${ownerState.
|
|
48
|
+
mask: `url(${ownerState.iconSrc})`,
|
|
49
|
+
WebkitMask: `url(${ownerState.iconSrc})`,
|
|
27
50
|
WebkitMaskSize: "cover",
|
|
28
|
-
...ownerState.
|
|
29
|
-
transform: `rotate(${ownerState.
|
|
30
|
-
},
|
|
31
|
-
backgroundColor: !ownerState.disabled ? getPropertyByString(theme.vars.palette, ownerState.color || "text.primary") : theme.vars.palette.text.disabled,
|
|
32
|
-
...ownerState.size === "medium" && {
|
|
33
|
-
...theme.generalSettings.isMobile ? {
|
|
34
|
-
minWidth: theme.vars.size.mobile.medium.base,
|
|
35
|
-
minHeight: theme.vars.size.mobile.medium.action
|
|
36
|
-
} : {
|
|
37
|
-
minWidth: theme.vars.size.desktop.medium.base,
|
|
38
|
-
minHeight: theme.vars.size.desktop.medium.base
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
...ownerState.size === "small" && {
|
|
42
|
-
...theme.generalSettings.isMobile ? {
|
|
43
|
-
minWidth: theme.vars.size.mobile.small.base,
|
|
44
|
-
minHeight: theme.vars.size.mobile.small.action
|
|
45
|
-
} : {
|
|
46
|
-
minWidth: theme.vars.size.desktop.small.base,
|
|
47
|
-
minHeight: theme.vars.size.desktop.small.base
|
|
48
|
-
}
|
|
51
|
+
...ownerState.iconRotationAngle && {
|
|
52
|
+
transform: `rotate(${ownerState.iconRotationAngle}deg)`
|
|
49
53
|
},
|
|
54
|
+
backgroundColor: !ownerState.iconDisabled ? getPropertyByString(theme.vars.palette, String(ownerState.iconColor) || "text.primary") : theme.vars.palette.text.disabled,
|
|
55
|
+
width: "inherit",
|
|
56
|
+
height: "inherit",
|
|
50
57
|
variants: []
|
|
51
|
-
})
|
|
58
|
+
}),
|
|
59
|
+
/**
|
|
60
|
+
* Slot iconSkeleton: Define los estilos para el esqueleto del ícono.
|
|
61
|
+
* Se utiliza cuando el ícono aún no está completamente cargado, proporcionando
|
|
62
|
+
* un contorno visible para indicar que la carga está en progreso. Incluye un
|
|
63
|
+
* borde redondeado y tamaño del ícono.
|
|
64
|
+
*/
|
|
65
|
+
iconSkeleton: ({ theme, ownerState }) => ({
|
|
66
|
+
"&.M4lclassCssSpecificity": {
|
|
67
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
68
|
+
...ownerState.iconSize === "medium" && {
|
|
69
|
+
...theme.generalSettings.isMobile ? {
|
|
70
|
+
width: theme.vars.size.mobile.medium.base,
|
|
71
|
+
height: theme.vars.size.mobile.medium.base
|
|
72
|
+
} : {
|
|
73
|
+
width: theme.vars.size.desktop.medium.base,
|
|
74
|
+
height: theme.vars.size.desktop.medium.base
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
...ownerState.iconSize === "small" && {
|
|
78
|
+
...theme.generalSettings.isMobile ? {
|
|
79
|
+
width: theme.vars.size.mobile.small.base,
|
|
80
|
+
height: theme.vars.size.mobile.small.base
|
|
81
|
+
} : {
|
|
82
|
+
width: theme.vars.size.desktop.small.base,
|
|
83
|
+
height: theme.vars.size.desktop.small.base
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}),
|
|
88
|
+
/**
|
|
89
|
+
* Slot tooltip: Define los estilos para el tooltip asociado al ícono.
|
|
90
|
+
* Este slot permite agregar una descripción emergente cuando el ícono es
|
|
91
|
+
* hovereado o enfocado.
|
|
92
|
+
*/
|
|
93
|
+
tooltip: {}
|
|
52
94
|
};
|
|
53
95
|
export {
|
|
54
96
|
iconStyles as i
|
|
@@ -7,3 +7,6 @@ export declare const TooltipStyled: import('@emotion/styled').StyledComponent<Pi
|
|
|
7
7
|
export declare const IconStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').IconOwnerState> & Record<string, unknown> & {
|
|
8
8
|
ownerState: Partial<import('..').IconOwnerState> & Record<string, unknown>;
|
|
9
9
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
10
|
+
export declare const IconSkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Skeleton/types').SkeletonProps, keyof import('../../mui_extended/Skeleton/types').SkeletonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').IconOwnerState> & Record<string, unknown> & {
|
|
11
|
+
ownerState: Partial<import('..').IconOwnerState> & Record<string, unknown>;
|
|
12
|
+
}, {}, {}>;
|
|
@@ -3,6 +3,7 @@ import { I as IconSlots } from "./IconEnum.js";
|
|
|
3
3
|
import { a as ICON_KEY_COMPONENT } from "../constants.js";
|
|
4
4
|
import { i as iconStyles } from "../Icon.styles.js";
|
|
5
5
|
import { T as Tooltip } from "../../mui_extended/Tooltip/Tooltip.js";
|
|
6
|
+
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
6
7
|
const RootStyled = styled("div", {
|
|
7
8
|
name: ICON_KEY_COMPONENT,
|
|
8
9
|
slot: IconSlots.root
|
|
@@ -15,8 +16,13 @@ const IconStyled = styled("div", {
|
|
|
15
16
|
name: ICON_KEY_COMPONENT,
|
|
16
17
|
slot: IconSlots.icon
|
|
17
18
|
})(iconStyles?.icon);
|
|
19
|
+
const IconSkeletonStyled = styled(Skeleton, {
|
|
20
|
+
name: ICON_KEY_COMPONENT,
|
|
21
|
+
slot: IconSlots.iconSkeleton
|
|
22
|
+
})(iconStyles?.iconSkeleton);
|
|
18
23
|
export {
|
|
19
24
|
IconStyled as I,
|
|
20
25
|
RootStyled as R,
|
|
21
|
-
TooltipStyled as T
|
|
26
|
+
TooltipStyled as T,
|
|
27
|
+
IconSkeletonStyled as a
|
|
22
28
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { Icon } from '../../Icon';
|
|
3
|
+
declare const meta: Meta<typeof Icon>;
|
|
4
|
+
type Story = StoryObj<typeof Icon>;
|
|
5
|
+
/**
|
|
6
|
+
* Estado base del icono con las propiedades por defecto.
|
|
7
|
+
* Este icono carga una imagen SVG.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Base: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Icono renderizado con el color establecido en 'text.primary'.
|
|
12
|
+
* Este ejemplo ilustra cómo se puede estilizar el Icono con un color específico.
|
|
13
|
+
*/
|
|
14
|
+
export declare const WithColorTextPrimary: Story;
|
|
15
|
+
/**
|
|
16
|
+
* Icono con una rotación aplicada.
|
|
17
|
+
* Demuestra el uso de la propiedad rotationAngle para manipular visualmente la orientación del icono.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Rotation: Story;
|
|
20
|
+
/**
|
|
21
|
+
* Icono que incluye un tooltip.
|
|
22
|
+
* Esta historia muestra la propiedad tooltipContent, que proporciona contexto adicional cuando el usuario pasa el cursor sobre el icono.
|
|
23
|
+
*/
|
|
24
|
+
export declare const WithTooltip: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Icono renderizado con el color establecido en 'contrast.text'.
|
|
27
|
+
* Este ejemplo muestra otra opción de estilización por color para el componente Icon.
|
|
28
|
+
*/
|
|
29
|
+
export declare const WithColorContrastText: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Icono con la propiedad deshabilitada.
|
|
32
|
+
* Este ejemplo demuestra cómo el Icono se puede renderizar en un estado deshabilitado, indicando visualmente que está inactivo.
|
|
33
|
+
*/
|
|
34
|
+
export declare const WithDisabled: Story;
|
|
35
|
+
export default meta;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { Icon } from '../../Icon';
|
|
3
|
+
declare const meta: Meta<typeof Icon>;
|
|
4
|
+
type Story = StoryObj<typeof Icon>;
|
|
5
|
+
/**
|
|
6
|
+
* Estado base del icono con las propiedades por defecto.
|
|
7
|
+
* Este icono carga una imagen SVG.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Base: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Icono con el color 'primary.main'.
|
|
12
|
+
* Este icono toma su color principal del tema definido en la aplicación.
|
|
13
|
+
* El color 'primary.main' generalmente se utiliza para representar la acción principal en la interfaz.
|
|
14
|
+
*/
|
|
15
|
+
export declare const WithColorPrimaryMain: Story;
|
|
16
|
+
export default meta;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { Icon } from '../../Icon';
|
|
3
|
+
declare const meta: Meta<typeof Icon>;
|
|
4
|
+
type Story = StoryObj<typeof Icon>;
|
|
5
|
+
/**
|
|
6
|
+
* Estado base del icono con las propiedades por defecto.
|
|
7
|
+
* Este icono carga una imagen SVG.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Base: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Icono con el color 'error.main'.
|
|
12
|
+
* Este icono se utiliza para denotar errores o advertencias críticas.
|
|
13
|
+
*/
|
|
14
|
+
export declare const WithColorErrorMain: Story;
|
|
15
|
+
/**
|
|
16
|
+
* Icono con el color 'warning.main'.
|
|
17
|
+
* Se utiliza para representar advertencias o situaciones que requieren atención, pero no son críticas.
|
|
18
|
+
*/
|
|
19
|
+
export declare const WithColorWarningMain: Story;
|
|
20
|
+
/**
|
|
21
|
+
* Icono con el color 'success.main'.
|
|
22
|
+
* Este icono representa estados exitosos o acciones completadas de forma correcta.
|
|
23
|
+
*/
|
|
24
|
+
export declare const WithColorSuccessMain: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Icono con el color 'info.main'.
|
|
27
|
+
* Utilizado para proporcionar información relevante o mensajes neutrales en la interfaz.
|
|
28
|
+
*/
|
|
29
|
+
export declare const WithColorInfoMain: Story;
|
|
30
|
+
export default meta;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { Icon } from '../../Icon';
|
|
3
|
+
declare const meta: Meta<typeof Icon>;
|
|
4
|
+
type Story = StoryObj<typeof Icon>;
|
|
5
|
+
/**
|
|
6
|
+
* Estado base del icono con las propiedades por defecto.
|
|
7
|
+
* Este icono carga una imagen SVG.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Base: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Icono en tamaño 'small'.
|
|
12
|
+
* Este icono se ajusta a un tamaño pequeño, útil en componentes compactos o en interfaces móviles.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Small: Story;
|
|
15
|
+
/**
|
|
16
|
+
* Icono en tamaño 'medium'.
|
|
17
|
+
* Este tamaño es ideal para su uso en botones o como elemento destacado en la interfaz.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Medium: Story;
|
|
20
|
+
/**
|
|
21
|
+
* Icono en modo 'skeleton'.
|
|
22
|
+
* Esta es una representación temporal del icono mientras su contenido gráfico está siendo cargado.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SkeletonIcon: {
|
|
25
|
+
parameters: {
|
|
26
|
+
isolationForceSkeleton: boolean;
|
|
27
|
+
};
|
|
28
|
+
args: {
|
|
29
|
+
src?: string | undefined;
|
|
30
|
+
size?: Extract<import('@m4l/styles').Sizes, "small" | "medium">;
|
|
31
|
+
rotationAngle?: number;
|
|
32
|
+
tooltipContent?: import('react').ReactNode;
|
|
33
|
+
color?: import('../..').IconColors;
|
|
34
|
+
className?: string;
|
|
35
|
+
instaceDataTestId?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
placement?: "bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | "left" | "right-end" | "right-start" | "right" | "top-end" | "top-start" | "top";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default meta;
|
|
@@ -5,6 +5,10 @@ import { ICON_KEY_COMPONENT } from './constants';
|
|
|
5
5
|
import { Sizes } from '@m4l/styles';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import { TooltipProps } from '../mui_extended';
|
|
8
|
+
/**
|
|
9
|
+
* Define la lista de posibles colores que se pueden aplicar al componente icono.
|
|
10
|
+
*/
|
|
11
|
+
export type IconColors = 'primary.main' | 'text.primary' | 'primary.contrastText' | 'info.main' | 'success.main' | 'error.main' | 'warning.main';
|
|
8
12
|
export interface IconProps extends Pick<TooltipProps, 'placement'> {
|
|
9
13
|
/**
|
|
10
14
|
* URL o ruta de la imagen que se va a mostrar.
|
|
@@ -13,7 +17,7 @@ export interface IconProps extends Pick<TooltipProps, 'placement'> {
|
|
|
13
17
|
/**
|
|
14
18
|
* Tamaño del componente, puede ser uno de los valores definidos en 'small' , 'medium' , 'large'.
|
|
15
19
|
*/
|
|
16
|
-
size?: Sizes
|
|
20
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
17
21
|
/**
|
|
18
22
|
* Ángulo de rotación de la imagen en grados.
|
|
19
23
|
*/
|
|
@@ -22,18 +26,10 @@ export interface IconProps extends Pick<TooltipProps, 'placement'> {
|
|
|
22
26
|
* Nombre del tooltip que se mostrará al pasar el cursor sobre el componente.
|
|
23
27
|
*/
|
|
24
28
|
tooltipContent?: ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* Indica si se debe mostrar un esqueleto de carga en lugar de la imagen mientras esta se carga.
|
|
27
|
-
*/
|
|
28
|
-
skeleton?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Indica si se debe resaltar un área de seguridad en el componente.
|
|
31
|
-
*/
|
|
32
|
-
securityArea?: boolean;
|
|
33
29
|
/**
|
|
34
30
|
* Esquema de color a aplicar al componente de los valores definidos en 'ColorSchemeComponent'.
|
|
35
31
|
*/
|
|
36
|
-
color?:
|
|
32
|
+
color?: IconColors;
|
|
37
33
|
/**
|
|
38
34
|
* Clase externa
|
|
39
35
|
*/
|
|
@@ -48,8 +44,16 @@ export interface IconProps extends Pick<TooltipProps, 'placement'> {
|
|
|
48
44
|
*/
|
|
49
45
|
disabled?: boolean;
|
|
50
46
|
}
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Define las las propiedades usadas para estilizar el componente desde el css.
|
|
49
|
+
*/
|
|
50
|
+
export interface IconOwnerState {
|
|
51
|
+
iconSize: Sizes;
|
|
52
|
+
iconRotationAngle?: number;
|
|
53
|
+
iconColor: IconColors;
|
|
54
|
+
iconDisabled?: boolean;
|
|
55
|
+
iconSrc: string;
|
|
56
|
+
isSkeleton: boolean;
|
|
53
57
|
}
|
|
54
58
|
export type IconSlotsType = keyof typeof IconSlots;
|
|
55
59
|
export type IconStyles = Partial<OverridesStyleRules<IconSlotsType, typeof ICON_KEY_COMPONENT, Theme> | undefined> | undefined;
|