@m4l/components 9.59.1-beta-hotfix-semantic-width-dynamicform.0 → 9.59.1-beta-pkg-758-update-screen-device.0
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/CheckableList/slots/styled.d.ts +3 -3
- package/components/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
- package/components/DynamicForm/DynamicForm.styles.js +72 -165
- package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.d.ts.map +1 -1
- package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.js +11 -21
- package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/textFieldStrategy.js +38 -38
- package/components/DynamicForm/helpers/resolveFieldComponent/types.d.ts +1 -1
- package/components/DynamicForm/helpers/resolveFieldContractAliases/resolveFieldContractAliases.d.ts +5 -1
- package/components/DynamicForm/helpers/resolveFieldContractAliases/resolveFieldContractAliases.d.ts.map +1 -1
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +120 -132
- package/components/DynamicForm/types.d.ts +14 -13
- package/components/DynamicForm/types.d.ts.map +1 -1
- package/components/Label/Label.d.ts.map +1 -1
- package/components/Label/Label.js +26 -40
- package/components/Label/Label.styles.d.ts.map +1 -1
- package/components/Label/Label.styles.js +53 -59
- package/components/Label/types.d.ts +0 -2
- package/components/Label/types.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.js +57 -82
- package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.styles.js +100 -100
- package/components/PropertyValue/constants.d.ts +0 -1
- package/components/PropertyValue/constants.d.ts.map +1 -1
- package/components/PropertyValue/constants.js +4 -10
- package/components/PropertyValue/types.d.ts +1 -5
- package/components/PropertyValue/types.d.ts.map +1 -1
- package/components/Stepper/helpers/focusFirstErrorField/index.d.ts +5 -6
- package/components/Stepper/helpers/focusFirstErrorField/index.d.ts.map +1 -1
- package/components/Stepper/helpers/focusFirstErrorField/index.js +10 -8
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
- package/package.json +5 -5
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts +0 -49
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts.map +0 -1
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js +0 -174
- package/components/PropertyValue/semanticWidth.d.ts +0 -7
- package/components/PropertyValue/semanticWidth.d.ts.map +0 -1
- package/components/PropertyValue/semanticWidth.js +0 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Label/Label.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,UAAU,EAAE,MAAM,SAAS,CAAC;AAatD;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Label/Label.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,UAAU,EAAE,MAAM,SAAS,CAAC;AAatD;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,qDAwEtC,CAAC"}
|
|
@@ -1,48 +1,34 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useModuleSkeleton as
|
|
1
|
+
import { jsx as a, jsxs as l, Fragment as p } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useModuleSkeleton as N } from "@m4l/core";
|
|
3
3
|
import L from "clsx";
|
|
4
|
-
import { LABEL_KEY_COMPONENT as
|
|
5
|
-
import { useComponentSize as
|
|
6
|
-
import { NotificationInformationOutlined as
|
|
7
|
-
import { LabelRootStyled as
|
|
8
|
-
const
|
|
9
|
-
const {
|
|
10
|
-
helperMessage: r,
|
|
11
|
-
label: h,
|
|
12
|
-
labelOverflow: u = "ellipsis",
|
|
13
|
-
symbol: c,
|
|
14
|
-
mandatory: m,
|
|
15
|
-
mandatoryMessage: o,
|
|
16
|
-
htmlFor: b,
|
|
17
|
-
id: f,
|
|
18
|
-
error: g,
|
|
19
|
-
size: d = "medium",
|
|
4
|
+
import { LABEL_KEY_COMPONENT as w, classLabelRoot as z, LAB_SPECIFY as k } from "./constants.js";
|
|
5
|
+
import { useComponentSize as v } from "../../hooks/useComponentSize/index.js";
|
|
6
|
+
import { NotificationInformationOutlined as C } from "@m4l/icons";
|
|
7
|
+
import { LabelRootStyled as I, TypographyStyled as x, TypographyMandatoryMessageStyled as E, IconHelperMessageStyled as j, SkeletonStyled as i } from "./slots/LabelSlots.js";
|
|
8
|
+
const P = (y) => {
|
|
9
|
+
const { helperMessage: r, label: h, symbol: c, mandatory: m, mandatoryMessage: o, htmlFor: u, id: b, error: f, size: d = "medium", disabled: t, className: g } = y, M = N(), { currentSize: s } = v(d), S = typeof r == "string" && r.length > 0, n = s === "small" || s === "medium" ? s : "medium", e = {
|
|
20
10
|
disabled: t,
|
|
21
|
-
className: M
|
|
22
|
-
} = y, N = w(), { currentSize: l } = C(d), p = typeof r == "string" && r.length > 0, s = l === "small" || l === "medium" ? l : "medium", e = {
|
|
23
|
-
disabled: t,
|
|
24
|
-
labelOverflow: u,
|
|
25
11
|
size: d
|
|
26
12
|
};
|
|
27
13
|
return /* @__PURE__ */ a(
|
|
28
|
-
|
|
14
|
+
I,
|
|
29
15
|
{
|
|
30
|
-
"aria-label":
|
|
16
|
+
"aria-label": w,
|
|
31
17
|
ownerState: { ...e },
|
|
32
|
-
htmlFor:
|
|
33
|
-
id:
|
|
34
|
-
children:
|
|
18
|
+
htmlFor: u,
|
|
19
|
+
id: b,
|
|
20
|
+
children: M ? /* @__PURE__ */ l(p, { children: [
|
|
35
21
|
/* @__PURE__ */ a(i, { ownerState: { ...e }, variant: "rectangular", className: "SkeletonWidthLabel" }),
|
|
36
22
|
m && /* @__PURE__ */ a(i, { ownerState: { ...e }, variant: "circular", className: "MandatoryLabel" }),
|
|
37
|
-
|
|
38
|
-
] }) : /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
23
|
+
S && /* @__PURE__ */ a(i, { ownerState: { ...e }, variant: "circular", className: "HelperIconLabel" })
|
|
24
|
+
] }) : /* @__PURE__ */ l(p, { children: [
|
|
25
|
+
/* @__PURE__ */ l(
|
|
26
|
+
x,
|
|
41
27
|
{
|
|
42
|
-
className: L(
|
|
28
|
+
className: L(z, k, "M4lclassCssSpecificity", g),
|
|
43
29
|
ownerState: { ...e },
|
|
44
30
|
variant: "bodyStandard",
|
|
45
|
-
size:
|
|
31
|
+
size: n,
|
|
46
32
|
disabled: t,
|
|
47
33
|
children: [
|
|
48
34
|
h,
|
|
@@ -51,26 +37,26 @@ const R = (y) => {
|
|
|
51
37
|
}
|
|
52
38
|
),
|
|
53
39
|
m && /* @__PURE__ */ a(
|
|
54
|
-
|
|
40
|
+
E,
|
|
55
41
|
{
|
|
56
42
|
ownerState: { ...e },
|
|
57
43
|
variant: "bodyStandard",
|
|
58
44
|
className: o ? "mandatoryMessage" : "mandatoryAsterisk",
|
|
59
|
-
size:
|
|
45
|
+
size: n,
|
|
60
46
|
disabled: t,
|
|
61
47
|
children: o || "*"
|
|
62
48
|
}
|
|
63
49
|
),
|
|
64
|
-
|
|
50
|
+
S && /* @__PURE__ */ a(
|
|
65
51
|
j,
|
|
66
52
|
{
|
|
67
53
|
tooltipContent: r,
|
|
68
54
|
ownerState: { ...e },
|
|
69
55
|
placement: "right",
|
|
70
|
-
size:
|
|
71
|
-
className:
|
|
56
|
+
size: n,
|
|
57
|
+
className: f ? "helper-icon-error" : "helper-icon",
|
|
72
58
|
disabled: t,
|
|
73
|
-
src: /* @__PURE__ */ a(
|
|
59
|
+
src: /* @__PURE__ */ a(C, {})
|
|
74
60
|
}
|
|
75
61
|
)
|
|
76
62
|
] })
|
|
@@ -78,5 +64,5 @@ const R = (y) => {
|
|
|
78
64
|
);
|
|
79
65
|
};
|
|
80
66
|
export {
|
|
81
|
-
|
|
67
|
+
P as Label
|
|
82
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Label/Label.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAU3D,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Label.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Label/Label.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAU3D,eAAO,MAAM,WAAW,EAAE,WA0IzB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getIconPaintStyles as
|
|
1
|
+
import { getIconPaintStyles as t } from "@m4l/base";
|
|
2
2
|
import { getHeightSizeStyles as i } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function l(s) {
|
|
4
|
+
return t(s);
|
|
5
5
|
}
|
|
6
6
|
const n = {
|
|
7
7
|
/**
|
|
@@ -10,31 +10,25 @@ const n = {
|
|
|
10
10
|
* @param {object} ownerState - El estado del componente.
|
|
11
11
|
* @returns {object} - Los estilos aplicados al root del Label.
|
|
12
12
|
*/
|
|
13
|
-
root: ({ theme:
|
|
14
|
-
|
|
15
|
-
// layers above it can size a field from its content. Stretching to the parent made the label
|
|
16
|
-
// width unmeasurable, which forced consumers to guess it.
|
|
17
|
-
// `fit-content` en vez de `100%`: el root debe aportar un ancho intrínseco real para que las
|
|
18
|
-
// capas superiores puedan dimensionar un campo a partir de su contenido. Estirarse al padre
|
|
19
|
-
// hacía que el ancho del label no fuera medible y obligaba a los consumidores a estimarlo.
|
|
20
|
-
width: "fit-content",
|
|
13
|
+
root: ({ theme: s, ownerState: e }) => ({
|
|
14
|
+
width: "100%",
|
|
21
15
|
display: "flex",
|
|
22
16
|
flexDirection: "row",
|
|
23
17
|
alignItems: "center",
|
|
24
18
|
...i(
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
s.generalSettings.isMobile,
|
|
20
|
+
e?.size || "small",
|
|
27
21
|
"base",
|
|
28
|
-
(
|
|
29
|
-
minHeight:
|
|
22
|
+
(a) => ({
|
|
23
|
+
minHeight: a,
|
|
30
24
|
height: "auto",
|
|
31
25
|
maxHeight: "none"
|
|
32
26
|
})
|
|
33
27
|
),
|
|
34
|
-
gap:
|
|
28
|
+
gap: s.size.baseSpacings.sp1,
|
|
35
29
|
/** Estilos para el estado disabled del Label 😶🌫️ */
|
|
36
|
-
...
|
|
37
|
-
color:
|
|
30
|
+
...e?.disabled && {
|
|
31
|
+
color: s.vars.palette.text.disabled,
|
|
38
32
|
'& > [class*="M4LIcon-icon"]': {
|
|
39
33
|
PointerEvents: "none"
|
|
40
34
|
}
|
|
@@ -43,17 +37,17 @@ const n = {
|
|
|
43
37
|
/**
|
|
44
38
|
* Estilos para el slot Typography del Label.
|
|
45
39
|
*/
|
|
46
|
-
typographyStyled: ({ theme:
|
|
40
|
+
typographyStyled: ({ theme: s, ownerState: e }) => ({
|
|
47
41
|
"&.MuiTypography-root": {
|
|
48
42
|
width: "fit-content",
|
|
49
|
-
minWidth:
|
|
50
|
-
overflow:
|
|
51
|
-
textOverflow:
|
|
43
|
+
minWidth: s.vars.size.baseSpacings.sp2,
|
|
44
|
+
overflow: "hidden",
|
|
45
|
+
textOverflow: "ellipsis",
|
|
52
46
|
whiteSpace: "nowrap",
|
|
53
47
|
"&.M4lclassCssSpecificity": {
|
|
54
|
-
color:
|
|
55
|
-
...
|
|
56
|
-
color:
|
|
48
|
+
color: s.vars.palette.text.secondary,
|
|
49
|
+
...e?.disabled === !0 && {
|
|
50
|
+
color: s.vars.palette.text.disabled
|
|
57
51
|
}
|
|
58
52
|
}
|
|
59
53
|
}
|
|
@@ -61,17 +55,17 @@ const n = {
|
|
|
61
55
|
/**
|
|
62
56
|
* Estilos para el slot Typography del mensaje obligatorio del Label.
|
|
63
57
|
*/
|
|
64
|
-
typographyMandatoryMessageStyled: ({ theme:
|
|
58
|
+
typographyMandatoryMessageStyled: ({ theme: s, ownerState: e }) => ({
|
|
65
59
|
"&.MuiTypography-root": {
|
|
66
60
|
width: "fit-content",
|
|
67
|
-
overflow:
|
|
68
|
-
textOverflow:
|
|
61
|
+
overflow: "hidden",
|
|
62
|
+
textOverflow: "ellipsis",
|
|
69
63
|
whiteSpace: "nowrap",
|
|
70
|
-
minWidth:
|
|
64
|
+
minWidth: s.vars.size.baseSpacings.sp2,
|
|
71
65
|
"&.M4lclassCssSpecificity": {
|
|
72
|
-
color:
|
|
73
|
-
...
|
|
74
|
-
color:
|
|
66
|
+
color: s.vars.palette.text.primary,
|
|
67
|
+
...e?.disabled && {
|
|
68
|
+
color: s.vars.palette.text.disabled
|
|
75
69
|
}
|
|
76
70
|
}
|
|
77
71
|
}
|
|
@@ -79,16 +73,16 @@ const n = {
|
|
|
79
73
|
/**
|
|
80
74
|
* Estilos para el slot Icon del Label.
|
|
81
75
|
*/
|
|
82
|
-
iconHelperMessageStyled: ({ theme:
|
|
83
|
-
const
|
|
76
|
+
iconHelperMessageStyled: ({ theme: s, ownerState: e }) => {
|
|
77
|
+
const a = e?.disabled ? s.vars.palette.text.disabled : s.vars.palette.info.enabled, r = e?.disabled ? s.vars.palette.text.disabled : s.vars.palette.info.hover;
|
|
84
78
|
return {
|
|
85
|
-
borderRadius:
|
|
86
|
-
cursor:
|
|
87
|
-
...a
|
|
88
|
-
"&:hover":
|
|
79
|
+
borderRadius: s.vars.size.borderRadius.r1,
|
|
80
|
+
cursor: e?.disabled ? "default" : "pointer",
|
|
81
|
+
...l(a),
|
|
82
|
+
"&:hover": l(r),
|
|
89
83
|
...i(
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
s.generalSettings.isMobile,
|
|
85
|
+
e?.size || "small",
|
|
92
86
|
"base"
|
|
93
87
|
)
|
|
94
88
|
};
|
|
@@ -96,44 +90,44 @@ const n = {
|
|
|
96
90
|
/**
|
|
97
91
|
* Estilos para el slot Skeleton del Label.
|
|
98
92
|
*/
|
|
99
|
-
skeletonStyled: ({ ownerState:
|
|
93
|
+
skeletonStyled: ({ ownerState: s, theme: e }) => ({
|
|
100
94
|
width: "100%",
|
|
101
|
-
borderRadius:
|
|
95
|
+
borderRadius: e.vars.size.borderRadius.r1,
|
|
102
96
|
display: "flex",
|
|
103
97
|
alignItems: "center",
|
|
104
|
-
backgroundColor:
|
|
98
|
+
backgroundColor: e.vars.palette.skeleton.default,
|
|
105
99
|
...i(
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
e.generalSettings.isMobile,
|
|
101
|
+
s?.size || "medium",
|
|
108
102
|
"base"
|
|
109
103
|
),
|
|
110
104
|
"&.MandatoryLabel": {
|
|
111
|
-
width:
|
|
112
|
-
paddingLeft:
|
|
113
|
-
paddingRight:
|
|
105
|
+
width: e.vars.size.baseSpacings["sp0-5"],
|
|
106
|
+
paddingLeft: e.vars.size.baseSpacings.sp1,
|
|
107
|
+
paddingRight: e.vars.size.baseSpacings.sp1
|
|
114
108
|
},
|
|
115
109
|
"&.SkeletonWidthLabel": {
|
|
116
|
-
width:
|
|
117
|
-
borderRadius:
|
|
110
|
+
width: e.vars.size.baseSpacings.sp14,
|
|
111
|
+
borderRadius: e.vars.size.borderRadius.r1,
|
|
118
112
|
...i(
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
e.generalSettings.isMobile,
|
|
114
|
+
s?.size || "medium",
|
|
121
115
|
"base"
|
|
122
116
|
),
|
|
123
117
|
...i(
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
e.generalSettings.isMobile,
|
|
119
|
+
s?.size || "small",
|
|
126
120
|
"base"
|
|
127
121
|
)
|
|
128
122
|
},
|
|
129
123
|
"&.HelperIconLabel": {
|
|
130
|
-
borderRadius:
|
|
124
|
+
borderRadius: e.vars.size.borderRadius.r4,
|
|
131
125
|
...i(
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
e.generalSettings.isMobile,
|
|
127
|
+
s?.size || "small",
|
|
134
128
|
"base",
|
|
135
|
-
(
|
|
136
|
-
width:
|
|
129
|
+
(a) => ({
|
|
130
|
+
width: a
|
|
137
131
|
})
|
|
138
132
|
)
|
|
139
133
|
}
|
|
@@ -22,8 +22,6 @@ export interface LabelProps {
|
|
|
22
22
|
helperMessage?: boolean | string;
|
|
23
23
|
/** Main label text for the component. */
|
|
24
24
|
label?: string;
|
|
25
|
-
/** Controls whether label text is clipped or allowed to occupy its measured single-line width. */
|
|
26
|
-
labelOverflow?: 'ellipsis' | 'visible';
|
|
27
25
|
/**
|
|
28
26
|
* Optional symbol rendered wrapped in parentheses right after the label text,
|
|
29
27
|
* e.g. `symbol="°C"` renders `Temperatura (°C)`. Omitted or empty keeps the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Label/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC;AAEvC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC;AAExG,MAAM,WAAW,UAAU;IACzB,0GAA0G;IAC1G,aAAa,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;IACjD;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Label/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC;AAEvC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC;AAExG,MAAM,WAAW,UAAU;IACzB,0GAA0G;IAC1G,aAAa,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;IACjD;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,qDAAqD;IACrD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C,oDAAoD;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAClD,MAAM,WAAW,eAAgB,SAAQ,UAAU,EAAE,UAAU;IAC7D,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;CAC3C;AACD,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,UAAU,CAAC;AACrD,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAC,UAAU,EAAE,OAAO,mBAAmB,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyValue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PropertyValue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAWlD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDA2HtD"}
|
|
@@ -1,115 +1,90 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { TEST_PROP_ID as
|
|
5
|
-
import {
|
|
6
|
-
import { getNameDataTestId as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { PropertyValueRootStyled as
|
|
9
|
-
import { getComponentSlotRoot as
|
|
10
|
-
import { getNullGuard as
|
|
11
|
-
import { Label as
|
|
12
|
-
import { useComponentSize as
|
|
13
|
-
function
|
|
1
|
+
import { jsxs as c, jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import y, { useId as z } from "react";
|
|
3
|
+
import C from "clsx";
|
|
4
|
+
import { TEST_PROP_ID as A } from "../../test/constants_no_mock.js";
|
|
5
|
+
import { TEST_PROPS_DATA as D, COMPONENT_PREFIX as x, PROPERTY_VALUE_KEY_COMPONENT as s } from "./constants.js";
|
|
6
|
+
import { getNameDataTestId as F, getPropDataTestId as M } from "../../test/getNameDataTestId.js";
|
|
7
|
+
import { Icon as W } from "@m4l/base";
|
|
8
|
+
import { PropertyValueRootStyled as $, ContainerStartAdornmentStyled as j, ContainerPropertyAndValueStyled as q, NameStyled as w, ValueStyled as L, TypographyValueStyled as Y } from "./slots/PropertyValueSlots.js";
|
|
9
|
+
import { getComponentSlotRoot as f } from "../../utils/getComponentSlotRoot.js";
|
|
10
|
+
import { getNullGuard as G } from "../../utils/getNullGuard.js";
|
|
11
|
+
import { Label as H } from "../Label/Label.js";
|
|
12
|
+
import { useComponentSize as J } from "@m4l/graphics";
|
|
13
|
+
function le(S) {
|
|
14
14
|
const {
|
|
15
15
|
property: l,
|
|
16
16
|
startAdornment: o,
|
|
17
17
|
value: e,
|
|
18
|
-
className:
|
|
18
|
+
className: h,
|
|
19
19
|
isForm: n,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
mandatoryMessage: T,
|
|
27
|
-
helperMessage: g,
|
|
28
|
-
symbol: I,
|
|
20
|
+
dataTestId: m = "",
|
|
21
|
+
disabled: p = !1,
|
|
22
|
+
mandatory: P,
|
|
23
|
+
mandatoryMessage: v,
|
|
24
|
+
helperMessage: E,
|
|
25
|
+
symbol: N,
|
|
29
26
|
semanticWidth: a = "fullWidth",
|
|
30
|
-
propertyWidth:
|
|
31
|
-
size:
|
|
32
|
-
direction:
|
|
33
|
-
valueHeight:
|
|
34
|
-
iconVariant:
|
|
35
|
-
iconColor:
|
|
36
|
-
borderStyle:
|
|
37
|
-
} =
|
|
38
|
-
propertyWidth:
|
|
39
|
-
|
|
40
|
-
disabled: n && u ? u : !1,
|
|
27
|
+
propertyWidth: T = 200,
|
|
28
|
+
size: g = "medium",
|
|
29
|
+
direction: u,
|
|
30
|
+
valueHeight: I,
|
|
31
|
+
iconVariant: V = "outlined",
|
|
32
|
+
iconColor: O = "primary",
|
|
33
|
+
borderStyle: _ = "none"
|
|
34
|
+
} = S, d = `property-value-${z()}`, { currentSize: i } = J(g), r = {
|
|
35
|
+
propertyWidth: T,
|
|
36
|
+
disabled: n && p ? p : !1,
|
|
41
37
|
isForm: !!n,
|
|
42
|
-
labelOverflow: m,
|
|
43
|
-
labelWidth: P,
|
|
44
38
|
semanticWidth: a,
|
|
45
|
-
valueHeight:
|
|
39
|
+
valueHeight: I,
|
|
46
40
|
size: i,
|
|
47
|
-
direction: n &&
|
|
48
|
-
iconVariant:
|
|
49
|
-
iconColor:
|
|
50
|
-
borderStyle:
|
|
51
|
-
},
|
|
52
|
-
|
|
41
|
+
direction: n && u === void 0 ? "column" : u ?? "row",
|
|
42
|
+
iconVariant: V,
|
|
43
|
+
iconColor: O,
|
|
44
|
+
borderStyle: _
|
|
45
|
+
}, b = () => o ? typeof o == "string" ? /* @__PURE__ */ t(
|
|
46
|
+
W,
|
|
53
47
|
{
|
|
54
48
|
src: o,
|
|
55
49
|
color: "text.secondary"
|
|
56
50
|
}
|
|
57
|
-
) : o : null,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
id: d,
|
|
61
|
-
size: i,
|
|
62
|
-
variant: "bodyDens",
|
|
63
|
-
ownerState: r,
|
|
64
|
-
children: K(e)
|
|
65
|
-
}
|
|
66
|
-
) : f.isValidElement(e) ? f.cloneElement(
|
|
67
|
-
e,
|
|
68
|
-
{ size: i, id: d }
|
|
69
|
-
) : e;
|
|
70
|
-
return /* @__PURE__ */ y(
|
|
71
|
-
j,
|
|
51
|
+
) : o : null, R = () => typeof e == "string" || typeof e == "number" || e === null || e === void 0 ? /* @__PURE__ */ t(Y, { id: d, size: i, variant: "bodyDens", ownerState: r, children: G(e) }) : y.isValidElement(e) ? y.cloneElement(e, { size: i, id: d }) : e;
|
|
52
|
+
return /* @__PURE__ */ c(
|
|
53
|
+
$,
|
|
72
54
|
{
|
|
73
55
|
role: n ? "property-value-form-role" : "property-value-role",
|
|
74
|
-
className:
|
|
75
|
-
|
|
76
|
-
a && `${
|
|
77
|
-
|
|
56
|
+
className: C(
|
|
57
|
+
f(s),
|
|
58
|
+
a && `${f(s)}-semanticWidth-${a}`,
|
|
59
|
+
h
|
|
78
60
|
),
|
|
79
|
-
...
|
|
61
|
+
...M(s, "root", m),
|
|
80
62
|
ownerState: r,
|
|
81
63
|
...process.env.NODE_ENV !== "production" ? {
|
|
82
|
-
[
|
|
83
|
-
|
|
84
|
-
]),
|
|
85
|
-
[x]: w(
|
|
86
|
-
L,
|
|
87
|
-
"root",
|
|
88
|
-
p
|
|
89
|
-
)
|
|
64
|
+
[D]: JSON.stringify([{ property: !!l, value: !!e }]),
|
|
65
|
+
[A]: F(x, "root", m)
|
|
90
66
|
} : {},
|
|
91
67
|
children: [
|
|
92
|
-
o && /* @__PURE__ */ t(
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */ t(
|
|
95
|
-
|
|
68
|
+
o && /* @__PURE__ */ t(j, { ownerState: r, children: b() }),
|
|
69
|
+
/* @__PURE__ */ c(q, { ownerState: r, children: [
|
|
70
|
+
/* @__PURE__ */ t(w, { ownerState: r, children: l && /* @__PURE__ */ t(
|
|
71
|
+
H,
|
|
96
72
|
{
|
|
97
73
|
size: i,
|
|
98
74
|
label: l,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
symbol: I,
|
|
75
|
+
mandatory: P,
|
|
76
|
+
mandatoryMessage: v,
|
|
77
|
+
helperMessage: E,
|
|
78
|
+
symbol: N,
|
|
104
79
|
htmlFor: d
|
|
105
80
|
}
|
|
106
81
|
) }),
|
|
107
|
-
/* @__PURE__ */ t(
|
|
82
|
+
/* @__PURE__ */ t(L, { role: "property-value-value-role", ownerState: r, children: R() })
|
|
108
83
|
] })
|
|
109
84
|
]
|
|
110
85
|
}
|
|
111
86
|
);
|
|
112
87
|
}
|
|
113
88
|
export {
|
|
114
|
-
|
|
89
|
+
le as PropertyValue
|
|
115
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyValue.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"PropertyValue.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAI9C,eAAO,MAAM,mBAAmB,EAAE,mBA2PjC,CAAC"}
|