@m4l/components 9.1.45 → 9.1.47
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/formatters/BooleanFormatter/BooleanFormatter.d.ts +5 -2
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +22 -19
- package/components/formatters/BooleanFormatter/BooleanFormatter.styles.js +9 -4
- package/components/formatters/BooleanFormatter/dictionary.d.ts +1 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.d.ts +2 -4
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.js +2 -4
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +1 -7
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +6 -17
- package/components/formatters/BooleanFormatter/types.d.ts +9 -4
- package/components/mui_extended/Button/Button.js +1 -1
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +169 -172
- package/components/mui_extended/TextField/types.d.ts +1 -1
- package/components/mui_extended/Typography/types.d.ts +1 -1
- package/package.json +1 -1
- package/components/formatters/FormatterRoot/index.js +0 -10
- package/components/formatters/FormatterRoot/styles.js +0 -7
- package/components/formatters/classes/index.js +0 -13
- package/components/formatters/constants.js +0 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { BooleanFormatterProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* BooleanFormatter
|
|
@@ -10,10 +11,12 @@ import { BooleanFormatterProps } from './types';
|
|
|
10
11
|
* - `'check'`: Displays an icon representing `true` or `false`.
|
|
11
12
|
* [value=false]
|
|
12
13
|
* The boolean value to be formatted.
|
|
13
|
-
* [Component=
|
|
14
|
+
* [Component=BooleanFormatterRootStyled]
|
|
14
15
|
* A custom wrapper component for the formatted output.
|
|
15
16
|
* [dataTestId]
|
|
16
17
|
* A unique identifier for testing purposes, used as a `data-testid` attribute.
|
|
18
|
+
* [className]
|
|
19
|
+
* A custom class name to apply to the component.
|
|
17
20
|
* @example
|
|
18
21
|
* <BooleanFormatter presentationType="string_yes_no" value={true} />
|
|
19
22
|
* // Renders "Yes"
|
|
@@ -26,4 +29,4 @@ import { BooleanFormatterProps } from './types';
|
|
|
26
29
|
* @updatedAt 2024-12-10 14:11:20 - automatic
|
|
27
30
|
* @updatedUser cesar - automatic
|
|
28
31
|
*/
|
|
29
|
-
export declare function BooleanFormatter(props: BooleanFormatterProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function BooleanFormatter<T extends React.ElementType>(props: BooleanFormatterProps<T>): string | import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,47 +1,50 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
3
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
-
import { W as WrapperComponent } from "../../WrapperComponent/index.js";
|
|
5
4
|
import { L as LABEL_BOOLEAN_YES, a as LABEL_BOOLEAN_NO, b as LABEL_BOOLEAN_TRUE, c as LABEL_BOOLEAN_FALSE } from "./dictionary.js";
|
|
6
5
|
import clsx from "clsx";
|
|
7
6
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
8
7
|
import { B as BOOLEAN_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
9
8
|
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
10
|
-
import {
|
|
9
|
+
import { B as BooleanFormatterIconStyled, a as BooleanFormatterRootStyled } from "./slots/BooleanFormatterSlots.js";
|
|
11
10
|
import { B as BooleanFormatterSlots } from "./slots/BooleanFormatterEnum.js";
|
|
12
11
|
function BooleanFormatter(props) {
|
|
13
|
-
const { presentationType, value, Component =
|
|
12
|
+
const { presentationType, value, Component = BooleanFormatterRootStyled, dataTestId, className, componentProps } = props;
|
|
14
13
|
const { getLabel } = useModuleDictionary();
|
|
15
14
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
16
15
|
const final_value = value ?? false;
|
|
17
16
|
const srcCheckTrue = `${host_static_assets}/${environment_assets}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_true.svg`;
|
|
18
17
|
const srcCheckFalse = `${host_static_assets}/${environment_assets}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_false.svg`;
|
|
19
|
-
const ownerState = {
|
|
18
|
+
const ownerState = { value: final_value };
|
|
20
19
|
const memoComponent = useMemo(() => {
|
|
21
20
|
if (presentationType === "string_yes_no") {
|
|
22
|
-
return
|
|
21
|
+
return final_value ? getLabel(LABEL_BOOLEAN_YES) : getLabel(LABEL_BOOLEAN_NO);
|
|
23
22
|
}
|
|
24
23
|
if (presentationType === "string_true_false") {
|
|
25
|
-
return
|
|
24
|
+
return final_value ? getLabel(LABEL_BOOLEAN_TRUE) : getLabel(LABEL_BOOLEAN_FALSE);
|
|
26
25
|
}
|
|
27
26
|
return /* @__PURE__ */ jsx(
|
|
28
|
-
|
|
27
|
+
BooleanFormatterIconStyled,
|
|
29
28
|
{
|
|
30
|
-
className: clsx(getComponentSlotRoot(BOOLEAN_FORMATTER_KEY_COMPONENT)),
|
|
31
|
-
...getPropDataTestId(BOOLEAN_FORMATTER_KEY_COMPONENT, BooleanFormatterSlots.booleanFormatterRoot, dataTestId),
|
|
32
|
-
role: "booleanStyled-role",
|
|
33
29
|
ownerState,
|
|
34
|
-
|
|
35
|
-
BooleanFormatterIconStyled,
|
|
36
|
-
{
|
|
37
|
-
ownerState,
|
|
38
|
-
src: final_value ? srcCheckTrue : srcCheckFalse
|
|
39
|
-
}
|
|
40
|
-
) })
|
|
30
|
+
src: final_value ? srcCheckTrue : srcCheckFalse
|
|
41
31
|
}
|
|
42
32
|
);
|
|
43
33
|
}, [final_value, getLabel, presentationType, srcCheckTrue, srcCheckFalse]);
|
|
44
|
-
|
|
34
|
+
if (Component === React.Fragment) {
|
|
35
|
+
return memoComponent;
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
Component,
|
|
39
|
+
{
|
|
40
|
+
className: clsx(getComponentSlotRoot(BOOLEAN_FORMATTER_KEY_COMPONENT), className),
|
|
41
|
+
...getPropDataTestId(BOOLEAN_FORMATTER_KEY_COMPONENT, BooleanFormatterSlots.root, dataTestId),
|
|
42
|
+
role: "booleanStyled-role",
|
|
43
|
+
ownerState,
|
|
44
|
+
...componentProps,
|
|
45
|
+
children: memoComponent
|
|
46
|
+
}
|
|
47
|
+
);
|
|
45
48
|
}
|
|
46
49
|
export {
|
|
47
50
|
BooleanFormatter as B
|
|
@@ -6,15 +6,20 @@ const booleanFormatterStyles = {
|
|
|
6
6
|
* @updatedAt 2024-12-30 14:36:10 - automatic
|
|
7
7
|
* @updatedUser Andrés Quintero - automatic
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
root: ({ theme }) => ({
|
|
10
10
|
"& .MuiSkeleton-text": {
|
|
11
11
|
width: `${theme.vars.size.baseSpacings.sp7} !important`,
|
|
12
12
|
borderRadius: theme.vars.size.borderRadius.r1
|
|
13
13
|
}
|
|
14
14
|
}),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Styled del icono
|
|
17
|
+
*/
|
|
18
|
+
icon: ({ theme }) => ({
|
|
19
|
+
"& .M4LIcon-icon": {
|
|
20
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
21
|
+
}
|
|
22
|
+
})
|
|
18
23
|
};
|
|
19
24
|
export {
|
|
20
25
|
booleanFormatterStyles as b
|
|
@@ -3,5 +3,5 @@ export declare const LABEL_BOOLEAN_YES = "boolean_formatter.boolean_yes";
|
|
|
3
3
|
export declare const LABEL_BOOLEAN_NO = "boolean_formatter.boolean_no";
|
|
4
4
|
export declare const LABEL_BOOLEAN_TRUE = "boolean_formatter.boolean_true";
|
|
5
5
|
export declare const LABEL_BOOLEAN_FALSE = "boolean_formatter.boolean_false";
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getBooleanFormatterComponentsDictionary(): string[];
|
|
7
7
|
export declare const BOOLEAN_FORMATTER_DICTIONARY_LABELS: string[];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
var BooleanFormatterSlots = /* @__PURE__ */ ((BooleanFormatterSlots2) => {
|
|
2
|
-
BooleanFormatterSlots2["
|
|
3
|
-
BooleanFormatterSlots2["
|
|
4
|
-
BooleanFormatterSlots2["booleanFormatterIcon"] = "booleanFormatterIcon";
|
|
5
|
-
BooleanFormatterSlots2["text"] = "text";
|
|
2
|
+
BooleanFormatterSlots2["icon"] = "icon";
|
|
3
|
+
BooleanFormatterSlots2["root"] = "root";
|
|
6
4
|
return BooleanFormatterSlots2;
|
|
7
5
|
})(BooleanFormatterSlots || {});
|
|
8
6
|
export {
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
export declare const FormatterRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../FormatterRoot/types').FormatterRootProps, "children"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
|
|
2
|
-
ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
|
|
3
|
-
}, {}, {}>;
|
|
4
1
|
export declare const BooleanFormatterIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Icon/types').IconProps, keyof import('../../../Icon/types').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
|
|
5
2
|
ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
|
|
6
3
|
}, {}, {}>;
|
|
7
|
-
export declare const
|
|
8
|
-
ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
|
|
9
|
-
}, {}, {}>;
|
|
10
|
-
export declare const TextStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../mui_extended/Typography/types').TypographyProps, keyof import('../../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
|
|
4
|
+
export declare const BooleanFormatterRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../mui_extended/Typography/types').TypographyProps, keyof import('../../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
|
|
11
5
|
ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
|
|
12
6
|
}, {}, {}>;
|
|
@@ -2,28 +2,17 @@ import { styled } from "@mui/material/styles";
|
|
|
2
2
|
import { B as BOOLEAN_FORMATTER_KEY_COMPONENT } from "../constants.js";
|
|
3
3
|
import { B as BooleanFormatterSlots } from "./BooleanFormatterEnum.js";
|
|
4
4
|
import { b as booleanFormatterStyles } from "../BooleanFormatter.styles.js";
|
|
5
|
-
import { F as FormatterRoot } from "../../FormatterRoot/index.js";
|
|
6
5
|
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
7
|
-
import { S as Skeleton } from "../../../mui_extended/Skeleton/Skeleton.js";
|
|
8
6
|
import { I as Icon } from "../../../Icon/Icon.js";
|
|
9
|
-
const FormatterRootStyled = styled(FormatterRoot, {
|
|
10
|
-
name: BOOLEAN_FORMATTER_KEY_COMPONENT,
|
|
11
|
-
slot: BooleanFormatterSlots.booleanFormatterRoot
|
|
12
|
-
})(booleanFormatterStyles?.booleanFormatterRoot);
|
|
13
7
|
const BooleanFormatterIconStyled = styled(Icon, {
|
|
14
8
|
name: BOOLEAN_FORMATTER_KEY_COMPONENT,
|
|
15
|
-
slot: BooleanFormatterSlots.
|
|
16
|
-
})(booleanFormatterStyles?.
|
|
17
|
-
styled(
|
|
18
|
-
name: BOOLEAN_FORMATTER_KEY_COMPONENT,
|
|
19
|
-
slot: BooleanFormatterSlots.booleanFormatterSkeleton
|
|
20
|
-
})(booleanFormatterStyles?.booleanFormatterSkeleton);
|
|
21
|
-
const TextStyled = styled(Typography, {
|
|
9
|
+
slot: BooleanFormatterSlots.icon
|
|
10
|
+
})(booleanFormatterStyles?.icon);
|
|
11
|
+
const BooleanFormatterRootStyled = styled(Typography, {
|
|
22
12
|
name: BOOLEAN_FORMATTER_KEY_COMPONENT,
|
|
23
|
-
slot: BooleanFormatterSlots.
|
|
24
|
-
})(booleanFormatterStyles?.
|
|
13
|
+
slot: BooleanFormatterSlots.root
|
|
14
|
+
})(booleanFormatterStyles?.root);
|
|
25
15
|
export {
|
|
26
16
|
BooleanFormatterIconStyled as B,
|
|
27
|
-
|
|
28
|
-
TextStyled as T
|
|
17
|
+
BooleanFormatterRootStyled as a
|
|
29
18
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
2
|
-
import { BooleanFormatterSlots } from './slots';
|
|
2
|
+
import { BooleanFormatterRootStyled, BooleanFormatterSlots } from './slots';
|
|
3
3
|
import { BOOLEAN_FORMATTER_KEY_COMPONENT } from './constants';
|
|
4
4
|
import { Theme } from '@mui/material';
|
|
5
5
|
/**
|
|
@@ -16,17 +16,22 @@ export type BooleanFormatter = keyof typeof BooleanFormatterSlots;
|
|
|
16
16
|
/**
|
|
17
17
|
* Properties for the `BooleanFormatter` component.
|
|
18
18
|
*/
|
|
19
|
-
export interface BooleanFormatterProps {
|
|
20
|
-
Component?:
|
|
19
|
+
export interface BooleanFormatterProps<T extends React.ElementType = typeof BooleanFormatterRootStyled> {
|
|
20
|
+
Component?: T;
|
|
21
21
|
presentationType: PresentationType;
|
|
22
22
|
value?: boolean;
|
|
23
23
|
dataTestId?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Props para el componente personalizado.
|
|
27
|
+
*/
|
|
28
|
+
componentProps?: React.ComponentPropsWithoutRef<T>;
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
26
31
|
* State properties for the `BooleanFormatter` component.
|
|
27
32
|
*/
|
|
28
33
|
export interface BooleanFormatterOwnerState {
|
|
29
|
-
|
|
34
|
+
value?: boolean;
|
|
30
35
|
[key: string]: unknown;
|
|
31
36
|
}
|
|
32
37
|
/**
|
|
@@ -78,7 +78,7 @@ const Button = forwardRef((props, ref) => {
|
|
|
78
78
|
ref,
|
|
79
79
|
...others,
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */ jsx(TextButtonStyled, { ownerState: { ...ownerState }, color: adjustedColor, children: label }),
|
|
81
|
+
/* @__PURE__ */ jsx(TextButtonStyled, { ownerState: { ...ownerState }, color: adjustedColor, size: adjustedSize, children: label }),
|
|
82
82
|
props.children
|
|
83
83
|
]
|
|
84
84
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { a as TEXT_FIELD_CLASSES } from "./constants.js";
|
|
2
1
|
const textFieldStyles = {
|
|
3
2
|
/**
|
|
4
3
|
* Estilos personalizados para el componente TextField.
|
|
@@ -8,152 +7,161 @@ const textFieldStyles = {
|
|
|
8
7
|
* @updatedUser Andrés Quintero - automatic
|
|
9
8
|
*/
|
|
10
9
|
root: ({ ownerState, theme }) => ({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
10
|
+
width: "100%",
|
|
11
|
+
padding: 0,
|
|
12
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
13
|
+
display: "flex",
|
|
14
|
+
// Estilos específicos para el tamaño small
|
|
15
|
+
...ownerState.size === "small" && {
|
|
16
|
+
...theme.generalSettings.isMobile ? {
|
|
17
|
+
height: theme.vars.size.mobile.small.action,
|
|
18
|
+
minHeight: theme.vars.size.mobile.small.action
|
|
19
|
+
} : {
|
|
20
|
+
height: theme.vars.size.desktop.small.action,
|
|
21
|
+
minHeight: theme.vars.size.desktop.small.action
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
// Estilos específicos para el tamaño medium
|
|
25
|
+
...ownerState.size === "medium" && {
|
|
26
|
+
...theme.generalSettings.isMobile ? {
|
|
27
|
+
height: theme.vars.size.mobile.medium.action,
|
|
28
|
+
minHeight: theme.vars.size.mobile.medium.action
|
|
29
|
+
} : {
|
|
30
|
+
height: theme.vars.size.desktop.medium.action,
|
|
31
|
+
minHeight: theme.vars.size.desktop.medium.action
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
// Variant Outlined TextField
|
|
35
|
+
...ownerState.textFieldVariant === "outlined" && {
|
|
36
|
+
"& .MuiInputBase-root": {
|
|
37
|
+
padding: 0,
|
|
38
|
+
minHeight: 0,
|
|
39
|
+
height: "inherit",
|
|
40
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
41
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
42
|
+
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
43
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
44
|
+
},
|
|
45
|
+
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
46
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
47
|
+
},
|
|
48
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
40
49
|
minHeight: 0,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
border: theme.vars.size.borderStroke.actionInput,
|
|
51
|
+
borderColor: ownerState.textFieldError ? ownerState.textFieldPaletteColor?.main : theme.vars.palette.border.default
|
|
52
|
+
},
|
|
53
|
+
//Estilo Hover para primary para el Icono e IconButton
|
|
54
|
+
"&:hover": {
|
|
55
|
+
backgroundColor: ownerState.textFieldError ? "inherit" : theme.palette.primary.hoverOpacity
|
|
56
|
+
},
|
|
57
|
+
//Estilo Focus para primary para el Icono e IconButton
|
|
58
|
+
":focus-within": {
|
|
59
|
+
borderColor: theme.palette.border.main,
|
|
60
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
45
61
|
backgroundColor: theme.vars.palette.text.primary
|
|
46
62
|
},
|
|
47
|
-
'
|
|
63
|
+
'&:focus-within .MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
48
64
|
backgroundColor: theme.vars.palette.text.primary
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
borderColor: ownerState.textFieldError ? ownerState.textFieldPaletteColor?.main : theme.vars.palette.border.default
|
|
54
|
-
},
|
|
55
|
-
//Estilo Hover para primary para el Icono e IconButton
|
|
56
|
-
"&:hover": {
|
|
57
|
-
backgroundColor: ownerState.textFieldError ? "inherit" : theme.palette.primary.hoverOpacity
|
|
58
|
-
},
|
|
59
|
-
//Estilo Focus para primary para el Icono e IconButton
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
//Estilo Active para primary para el Icono e IconButton
|
|
68
|
+
"&:active": {
|
|
60
69
|
":focus-within": {
|
|
61
|
-
borderColor: theme.palette.border.main,
|
|
62
70
|
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
63
71
|
backgroundColor: theme.vars.palette.text.primary
|
|
64
72
|
},
|
|
65
73
|
'&:focus-within .MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
66
74
|
backgroundColor: theme.vars.palette.text.primary
|
|
67
75
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
//Estilos del InputBase
|
|
79
|
+
"& .MuiInputBase-input": {
|
|
80
|
+
padding: "0px",
|
|
81
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
82
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
83
|
+
height: "inherit",
|
|
84
|
+
//Estilos del InputBase en hover
|
|
85
|
+
"&:hover ~ .MuiOutlinedInput-notchedOutline": {
|
|
86
|
+
...ownerState.textFieldError && {
|
|
87
|
+
borderColor: ownerState.textFieldError ? theme.vars.palette.border.error : theme.vars.palette.border.default
|
|
78
88
|
}
|
|
79
89
|
},
|
|
80
|
-
//Estilos del InputBase
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
84
|
-
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
85
|
-
height: "inherit",
|
|
86
|
-
//Estilos del InputBase en hover
|
|
87
|
-
"&:hover ~ .MuiOutlinedInput-notchedOutline": {
|
|
88
|
-
...ownerState.textFieldError && {
|
|
89
|
-
borderColor: ownerState.textFieldError ? theme.vars.palette.border.error : theme.vars.palette.border.default
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
// Estilos del InputBase en Focus
|
|
93
|
-
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
94
|
-
borderColor: ownerState.textFieldError ? theme.vars.palette.border.error : ownerState.textFieldPaletteColor?.selected
|
|
95
|
-
},
|
|
96
|
-
//Estilos del InputBase en placeholder default
|
|
97
|
-
"&::placeholder": {
|
|
98
|
-
color: theme.palette.text.disabled
|
|
99
|
-
}
|
|
90
|
+
// Estilos del InputBase en Focus
|
|
91
|
+
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
92
|
+
borderColor: ownerState.textFieldError ? theme.vars.palette.border.error : ownerState.textFieldPaletteColor?.selected
|
|
100
93
|
},
|
|
101
|
-
//
|
|
102
|
-
"
|
|
103
|
-
|
|
94
|
+
//Estilos del InputBase en placeholder default
|
|
95
|
+
"&::placeholder": {
|
|
96
|
+
color: theme.palette.text.disabled
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
//Este estilo se asegura de que los campos de entrada que han sido autocompletados por el navegador no tengan ningún relleno adicional
|
|
100
|
+
"& .MuiOutlinedInput-input:-webkit-autofill": {
|
|
101
|
+
padding: 0
|
|
102
|
+
},
|
|
103
|
+
// Historia Disabled para Outlined
|
|
104
|
+
...ownerState.textFieldDisabled && {
|
|
105
|
+
borderColor: theme.palette.border.disabled,
|
|
106
|
+
pointerEvents: ownerState.textFieldDisabled ? "none" : "auto",
|
|
107
|
+
"&:hover": {
|
|
108
|
+
pointerEvents: ownerState.textFieldDisabled ? "none" : "auto"
|
|
104
109
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
color: theme.palette.text.disabled
|
|
114
|
-
},
|
|
115
|
-
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
116
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
117
|
-
},
|
|
118
|
-
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
119
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
120
|
-
}
|
|
110
|
+
"& .MuiInputBase-input::placeholder": {
|
|
111
|
+
color: theme.palette.text.disabled
|
|
112
|
+
},
|
|
113
|
+
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
114
|
+
backgroundColor: theme.vars.palette.text.disabled
|
|
115
|
+
},
|
|
116
|
+
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
117
|
+
backgroundColor: theme.vars.palette.text.disabled
|
|
121
118
|
}
|
|
122
119
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
// Variant Text TextField
|
|
123
|
+
...ownerState.textFieldVariant === "text" && {
|
|
124
|
+
borderColor: "transparent",
|
|
125
|
+
"& .MuiInputBase-root": {
|
|
126
|
+
padding: 0,
|
|
127
|
+
minHeight: 0,
|
|
128
|
+
height: "inherit",
|
|
126
129
|
borderColor: "transparent",
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
131
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
132
|
+
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
133
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
134
|
+
},
|
|
135
|
+
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
136
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
137
|
+
},
|
|
138
|
+
//Estilos para los bordes del campo de texto
|
|
139
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
129
140
|
minHeight: 0,
|
|
130
|
-
|
|
131
|
-
borderColor:
|
|
132
|
-
|
|
133
|
-
|
|
141
|
+
border: theme.vars.size.borderStroke.actionInput,
|
|
142
|
+
borderColor: ownerState.textFieldError ? ownerState.textFieldPaletteColor?.main : theme.vars.palette.border.default,
|
|
143
|
+
borderLeft: "transparent",
|
|
144
|
+
borderTop: "transparent",
|
|
145
|
+
borderRight: "transparent"
|
|
146
|
+
},
|
|
147
|
+
//Estilo Hover para primary para el Icono e IconButton
|
|
148
|
+
"&:hover": {
|
|
149
|
+
backgroundColor: ownerState.textFieldError ? "inherit" : theme.palette.primary.hoverOpacity,
|
|
134
150
|
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
135
151
|
backgroundColor: theme.vars.palette.text.primary
|
|
136
|
-
}
|
|
137
|
-
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
//Estilo Focus para primary para el Icono e IconButton
|
|
155
|
+
":focus-within": {
|
|
156
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
138
157
|
backgroundColor: theme.vars.palette.text.primary
|
|
139
158
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
borderTop: "transparent",
|
|
147
|
-
borderRight: "transparent"
|
|
148
|
-
},
|
|
149
|
-
//Estilo Hover para primary para el Icono e IconButton
|
|
150
|
-
"&:hover": {
|
|
151
|
-
backgroundColor: ownerState.textFieldError ? "inherit" : theme.palette.primary.hoverOpacity,
|
|
152
|
-
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
153
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
//Estilo Focus para primary para el Icono e IconButton
|
|
159
|
+
'&:focus-within .MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
160
|
+
backgroundColor: theme.vars.palette.text.primary
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
//Estilo Active para primary para el Icono e IconButton
|
|
164
|
+
"&:active": {
|
|
157
165
|
":focus-within": {
|
|
158
166
|
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
159
167
|
backgroundColor: theme.vars.palette.text.primary
|
|
@@ -161,58 +169,47 @@ const textFieldStyles = {
|
|
|
161
169
|
'&:focus-within .MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
162
170
|
backgroundColor: theme.vars.palette.text.primary
|
|
163
171
|
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
//Estilos del InputBase
|
|
175
|
+
"& .MuiInputBase-input": {
|
|
176
|
+
padding: "0px",
|
|
177
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
178
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
179
|
+
height: "inherit",
|
|
180
|
+
//Estilo Focus del InputBase
|
|
181
|
+
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
182
|
+
borderColor: ownerState.textFieldError ? theme.vars.palette.border.error : ownerState.textFieldPaletteColor?.selected
|
|
164
183
|
},
|
|
165
|
-
//
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
184
|
+
// Estilos del InputBase en placeholder default
|
|
185
|
+
"&::placeholder": {
|
|
186
|
+
color: theme.palette.text.disabled
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
//Este estilo se asegura de que los campos de entrada que han sido autocompletados por el navegador no tengan ningún relleno adicional
|
|
190
|
+
"& .MuiOutlinedInput-input:-webkit-autofill": {
|
|
191
|
+
padding: 0
|
|
192
|
+
},
|
|
193
|
+
// Historia Disabled
|
|
194
|
+
...ownerState.textFieldDisabled && {
|
|
195
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
196
|
+
borderColor: theme.palette.border.disabled,
|
|
197
|
+
borderTop: theme.palette.border.disabled,
|
|
198
|
+
borderLeft: "transparent",
|
|
199
|
+
borderRight: "transparent"
|
|
175
200
|
},
|
|
176
|
-
|
|
177
|
-
"
|
|
178
|
-
|
|
179
|
-
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
180
|
-
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
181
|
-
height: "inherit",
|
|
182
|
-
//Estilo Focus del InputBase
|
|
183
|
-
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
184
|
-
borderColor: ownerState.textFieldError ? theme.vars.palette.border.error : ownerState.textFieldPaletteColor?.selected
|
|
185
|
-
},
|
|
186
|
-
// Estilos del InputBase en placeholder default
|
|
187
|
-
"&::placeholder": {
|
|
188
|
-
color: theme.palette.text.disabled
|
|
189
|
-
}
|
|
201
|
+
pointerEvents: ownerState.textFieldDisabled ? "none" : "auto",
|
|
202
|
+
"&:hover": {
|
|
203
|
+
pointerEvents: ownerState.textFieldDisabled ? "none" : "auto"
|
|
190
204
|
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
padding: 0
|
|
205
|
+
"& .MuiInputBase-input::placeholder": {
|
|
206
|
+
color: theme.palette.text.disabled
|
|
194
207
|
},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
borderLeft: "transparent",
|
|
201
|
-
borderRight: "transparent"
|
|
202
|
-
},
|
|
203
|
-
pointerEvents: ownerState.textFieldDisabled ? "none" : "auto",
|
|
204
|
-
"&:hover": {
|
|
205
|
-
pointerEvents: ownerState.textFieldDisabled ? "none" : "auto"
|
|
206
|
-
},
|
|
207
|
-
"& .MuiInputBase-input::placeholder": {
|
|
208
|
-
color: theme.palette.text.disabled
|
|
209
|
-
},
|
|
210
|
-
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
211
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
212
|
-
},
|
|
213
|
-
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
214
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
215
|
-
}
|
|
208
|
+
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
209
|
+
backgroundColor: theme.vars.palette.text.disabled
|
|
210
|
+
},
|
|
211
|
+
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
212
|
+
backgroundColor: theme.vars.palette.text.disabled
|
|
216
213
|
}
|
|
217
214
|
}
|
|
218
215
|
}
|
|
@@ -34,7 +34,7 @@ export interface TypographyProps extends Omit<MUITypographyProps, 'color' | 'var
|
|
|
34
34
|
/**
|
|
35
35
|
* Contenido del componente.
|
|
36
36
|
*/
|
|
37
|
-
children?:
|
|
37
|
+
children?: React.ReactNode;
|
|
38
38
|
/**
|
|
39
39
|
* Nombre identificador del componente, es útil para realizar pruebas del componente.
|
|
40
40
|
*/
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { f as formatterClasses } from "../classes/index.js";
|
|
3
|
-
import { F as FormatterRootContainer } from "./styles.js";
|
|
4
|
-
const FormatterRoot = (props) => {
|
|
5
|
-
const { children } = props;
|
|
6
|
-
return /* @__PURE__ */ jsx(FormatterRootContainer, { className: formatterClasses.root, children });
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
FormatterRoot as F
|
|
10
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses } from "@mui/material";
|
|
2
|
-
import "@mui/base";
|
|
3
|
-
import { C as COMPONENT_CLASS_NAME } from "../constants.js";
|
|
4
|
-
const formatterClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
5
|
-
/* elements */
|
|
6
|
-
"root",
|
|
7
|
-
"booleanFormatterIcon",
|
|
8
|
-
"booleanFormatterCheck"
|
|
9
|
-
/* states or variants of elements */
|
|
10
|
-
]);
|
|
11
|
-
export {
|
|
12
|
-
formatterClasses as f
|
|
13
|
-
};
|