@m4l/components 9.57.1-beta-hotfix-semantic-width-dynamicform.1 → 9.57.1-beta-hotfix-semantic-width-dynamicform.2
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/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
- package/components/DynamicForm/DynamicForm.styles.js +146 -46
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts +23 -2
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts.map +1 -1
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js +151 -59
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +42 -41
- package/components/DynamicForm/types.d.ts +10 -10
- package/components/Label/Label.styles.d.ts.map +1 -1
- package/components/Label/Label.styles.js +7 -1
- package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.js +37 -37
- package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.styles.js +53 -49
- package/components/PropertyValue/constants.d.ts +1 -0
- package/components/PropertyValue/constants.d.ts.map +1 -1
- package/components/PropertyValue/constants.js +10 -4
- package/package.json +8 -8
|
@@ -6,16 +6,16 @@ const l = "container", h = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Property Value Root Styles
|
|
8
8
|
*/
|
|
9
|
-
Root: ({ theme:
|
|
10
|
-
const
|
|
11
|
-
maxWidth: `${
|
|
12
|
-
minWidth: `${
|
|
13
|
-
[`@container ${l} (max-width: ${
|
|
9
|
+
Root: ({ theme: o, ownerState: i }) => {
|
|
10
|
+
const r = (a) => ({
|
|
11
|
+
maxWidth: `${a}px`,
|
|
12
|
+
minWidth: `${a}px`,
|
|
13
|
+
[`@container ${l} (max-width: ${a - 1}px)`]: {
|
|
14
14
|
minWidth: "100px",
|
|
15
15
|
maxWidth: "100%",
|
|
16
16
|
width: "100%"
|
|
17
17
|
}
|
|
18
|
-
}), e = p(i?.semanticWidth),
|
|
18
|
+
}), e = p(i?.semanticWidth), t = i?.semanticWidth && typeof e == "number" ? r(e) : {}, c = i?.semanticWidth && b(i.semanticWidth) ? {
|
|
19
19
|
maxWidth: "100%",
|
|
20
20
|
width: "100%",
|
|
21
21
|
minWidth: i.semanticWidth === "bigDescription" ? "100px" : "0"
|
|
@@ -27,18 +27,18 @@ const l = "container", h = {
|
|
|
27
27
|
flexDirection: "row",
|
|
28
28
|
justifyContent: "flex-start",
|
|
29
29
|
alignItems: "center",
|
|
30
|
-
gap:
|
|
30
|
+
gap: o.vars.size.baseSpacings.sp2,
|
|
31
31
|
width: i?.semanticWidth ? "auto" : "200px",
|
|
32
32
|
height: i?.valueHeight ? i?.valueHeight : "auto",
|
|
33
|
-
color:
|
|
33
|
+
color: o.vars.palette.text.primary,
|
|
34
34
|
/* [`@container ${CONTAINER_QUERY_NAME} (min-width: 0px) and (max-width: 400px)`]: {
|
|
35
35
|
flexDirection: 'column',
|
|
36
36
|
}, */
|
|
37
|
-
...
|
|
37
|
+
...o.generalSettings.isMobile && {
|
|
38
38
|
flexDirection: "column"
|
|
39
39
|
},
|
|
40
40
|
...i?.borderStyle !== "none" && {
|
|
41
|
-
paddingBottom:
|
|
41
|
+
paddingBottom: o.vars.size.baseSpacings.sp2
|
|
42
42
|
},
|
|
43
43
|
// Estilos para borderStyle
|
|
44
44
|
...i?.borderStyle === "dashed" && {
|
|
@@ -56,8 +56,8 @@ const l = "container", h = {
|
|
|
56
56
|
width: "100%",
|
|
57
57
|
backgroundImage: `repeating-linear-gradient(
|
|
58
58
|
to right,
|
|
59
|
-
${
|
|
60
|
-
${
|
|
59
|
+
${o.vars.palette.border.secondary} 10px,
|
|
60
|
+
${o.vars.palette.border.secondary} 20px,
|
|
61
61
|
transparent 20px,
|
|
62
62
|
transparent 32px
|
|
63
63
|
)`,
|
|
@@ -70,50 +70,54 @@ const l = "container", h = {
|
|
|
70
70
|
borderTop: 0,
|
|
71
71
|
borderLeft: 0,
|
|
72
72
|
borderRight: 0,
|
|
73
|
-
borderBottom:
|
|
74
|
-
borderColor:
|
|
73
|
+
borderBottom: o.vars.size.borderStroke.container,
|
|
74
|
+
borderColor: o.vars.palette.border.secondary,
|
|
75
75
|
borderStyle: "solid"
|
|
76
76
|
},
|
|
77
77
|
...i?.borderStyle === "none" && {
|
|
78
78
|
border: "unset"
|
|
79
79
|
},
|
|
80
|
-
minHeight:
|
|
81
|
-
...
|
|
80
|
+
minHeight: o.vars.size.baseSpacings.sp5,
|
|
81
|
+
...t,
|
|
82
82
|
...c
|
|
83
83
|
};
|
|
84
84
|
},
|
|
85
85
|
/**
|
|
86
86
|
* Property Styles
|
|
87
87
|
*/
|
|
88
|
-
name: ({ theme:
|
|
89
|
-
const
|
|
88
|
+
name: ({ theme: o, ownerState: i }) => {
|
|
89
|
+
const r = typeof i?.labelWidth == "number" ? `${i.labelWidth}px` : i?.labelWidth;
|
|
90
90
|
return {
|
|
91
91
|
display: "flex",
|
|
92
92
|
alignItems: "center",
|
|
93
|
-
fontSize:
|
|
94
|
-
color:
|
|
95
|
-
gap:
|
|
93
|
+
fontSize: o.typography.body2.fontSize,
|
|
94
|
+
color: o.vars.palette.text.primary,
|
|
95
|
+
gap: o.vars.size.baseSpacings.sp1,
|
|
96
96
|
overflow: i?.labelOverflow === "visible" ? "visible" : "hidden",
|
|
97
|
-
width
|
|
97
|
+
// The name slot hugs its content instead of stretching, so the rendered label width is the
|
|
98
|
+
// real one rather than whatever the consumer estimated. `labelWidth` survives as the
|
|
99
|
+
// ceiling: it still clamps the slot, it just no longer dictates its width.
|
|
100
|
+
maxWidth: r ?? "100%",
|
|
101
|
+
width: "fit-content"
|
|
98
102
|
};
|
|
99
103
|
},
|
|
100
104
|
/**
|
|
101
105
|
* Value Styles (Form and No Form Combined)
|
|
102
106
|
*/
|
|
103
|
-
value: ({ theme:
|
|
104
|
-
const
|
|
107
|
+
value: ({ theme: o, ownerState: i }) => {
|
|
108
|
+
const r = typeof i?.controlWidth == "number" ? `${i.controlWidth}px` : void 0;
|
|
105
109
|
return {
|
|
106
|
-
width:
|
|
110
|
+
width: r ?? (i?.direction === "column" ? "100%" : "fit-content"),
|
|
107
111
|
display: "flex",
|
|
108
112
|
justifyContent: "flex-start",
|
|
109
113
|
alignItems: "flex-start",
|
|
110
114
|
height: i?.valueHeight ? i?.valueHeight : "auto",
|
|
111
115
|
whiteSpace: "nowrap",
|
|
112
116
|
...i?.isForm && {
|
|
113
|
-
gap:
|
|
117
|
+
gap: o.vars.size.baseSpacings["sp0-5"],
|
|
114
118
|
flexDirection: "column"
|
|
115
119
|
},
|
|
116
|
-
...
|
|
120
|
+
...r && {
|
|
117
121
|
maxWidth: "100%",
|
|
118
122
|
"& > *": {
|
|
119
123
|
width: "100%",
|
|
@@ -126,43 +130,43 @@ const l = "container", h = {
|
|
|
126
130
|
/**
|
|
127
131
|
* Container Start Adornment Styles
|
|
128
132
|
*/
|
|
129
|
-
containerStartAdornment: ({ theme:
|
|
130
|
-
const
|
|
133
|
+
containerStartAdornment: ({ theme: o, ownerState: i }) => {
|
|
134
|
+
const r = i?.iconColor === "text.primary" || i?.iconColor === "text.secondary" || i?.iconColor === "text.disabled", e = r ? n(o.vars.palette, String(i?.iconColor), o.vars.palette.text.primary) : n(o.vars.palette.chips, String(i?.iconColor), o.vars.palette.chips.primary)?.contained;
|
|
131
135
|
return {
|
|
132
136
|
"&&&": {
|
|
133
137
|
display: "flex",
|
|
134
138
|
alignItems: "center",
|
|
135
139
|
justifyContent: "center",
|
|
136
140
|
overflow: "hidden",
|
|
137
|
-
borderRadius:
|
|
141
|
+
borderRadius: o.vars.size.borderRadius["r1-5"],
|
|
138
142
|
...d(
|
|
139
|
-
|
|
143
|
+
o,
|
|
140
144
|
i?.size || "medium",
|
|
141
145
|
"base",
|
|
142
|
-
(
|
|
143
|
-
height: `calc(${
|
|
144
|
-
width: `calc(${
|
|
145
|
-
minHeight: `calc(${
|
|
146
|
-
minWidth: `calc(${
|
|
146
|
+
(t) => ({
|
|
147
|
+
height: `calc(${t} + ${o.vars.size.baseSpacings.sp2})`,
|
|
148
|
+
width: `calc(${t} + ${o.vars.size.baseSpacings.sp2})`,
|
|
149
|
+
minHeight: `calc(${t} + ${o.vars.size.baseSpacings.sp2})`,
|
|
150
|
+
minWidth: `calc(${t} + ${o.vars.size.baseSpacings.sp2})`
|
|
147
151
|
})
|
|
148
152
|
),
|
|
149
153
|
// variente de icono en modalidad outlined o containedOpacity
|
|
150
154
|
...(i?.iconVariant === "containedOpacity" || i?.iconVariant === "outlined") && {
|
|
151
155
|
...i?.iconVariant === "outlined" && {
|
|
152
|
-
border:
|
|
153
|
-
borderColor:
|
|
156
|
+
border: o.vars.size.borderStroke.container,
|
|
157
|
+
borderColor: r ? o.vars.palette.border.disabled : e?.backgroundColor,
|
|
154
158
|
backgroundColor: "transparent"
|
|
155
159
|
},
|
|
156
160
|
...i?.iconVariant === "containedOpacity" && {
|
|
157
|
-
backgroundColor:
|
|
161
|
+
backgroundColor: r ? o.vars.palette.border.disabled : e?.backgroundColor
|
|
158
162
|
},
|
|
159
163
|
// icon mask strategy
|
|
160
164
|
"& .M4LIcon-icon": {
|
|
161
|
-
backgroundColor:
|
|
165
|
+
backgroundColor: r ? e : e?.color
|
|
162
166
|
},
|
|
163
167
|
// 🧪 Experimental m4l/icons strategy
|
|
164
168
|
[s]: {
|
|
165
|
-
fill:
|
|
169
|
+
fill: r ? e : e?.color,
|
|
166
170
|
stroke: "none"
|
|
167
171
|
}
|
|
168
172
|
},
|
|
@@ -170,11 +174,11 @@ const l = "container", h = {
|
|
|
170
174
|
backgroundColor: "transparent",
|
|
171
175
|
// icon mask strategy
|
|
172
176
|
"& .M4LIcon-icon": {
|
|
173
|
-
backgroundColor:
|
|
177
|
+
backgroundColor: r ? e : e?.color
|
|
174
178
|
},
|
|
175
179
|
// 🧪 Experimental m4l/icons strategy
|
|
176
180
|
[s]: {
|
|
177
|
-
fill:
|
|
181
|
+
fill: r ? e : e?.color,
|
|
178
182
|
stroke: "none"
|
|
179
183
|
}
|
|
180
184
|
}
|
|
@@ -184,31 +188,31 @@ const l = "container", h = {
|
|
|
184
188
|
/**
|
|
185
189
|
* Container Property And Value Styles
|
|
186
190
|
*/
|
|
187
|
-
containerPropertyAndValue: ({ theme:
|
|
191
|
+
containerPropertyAndValue: ({ theme: o, ownerState: i }) => ({
|
|
188
192
|
display: "flex",
|
|
189
193
|
justifyContent: "space-between",
|
|
190
194
|
overflow: i?.labelOverflow === "visible" ? "visible" : "hidden",
|
|
191
195
|
flexDirection: i?.direction || "row",
|
|
192
|
-
borderColor:
|
|
196
|
+
borderColor: o.vars.palette.border.secondary,
|
|
193
197
|
width: "100%",
|
|
194
198
|
height: i?.valueHeight ? i?.valueHeight : "auto",
|
|
195
199
|
"&&& .M4LLabel-root": {
|
|
196
200
|
width: "auto"
|
|
197
201
|
},
|
|
198
202
|
...i?.direction === "column" ? {
|
|
199
|
-
gap:
|
|
203
|
+
gap: o.vars.size.baseSpacings["sp0-5"],
|
|
200
204
|
alignItems: "flex-start"
|
|
201
205
|
} : {
|
|
202
|
-
gap:
|
|
206
|
+
gap: o.vars.size.baseSpacings.sp4,
|
|
203
207
|
alignItems: "center"
|
|
204
208
|
}
|
|
205
209
|
}),
|
|
206
210
|
/**
|
|
207
211
|
* Typography Value Styles
|
|
208
212
|
*/
|
|
209
|
-
typographyValue: ({ ownerState:
|
|
213
|
+
typographyValue: ({ ownerState: o }) => ({
|
|
210
214
|
wordBreak: "break-word",
|
|
211
|
-
whiteSpace:
|
|
215
|
+
whiteSpace: o?.direction === "column" ? "normal" : "nowrap"
|
|
212
216
|
})
|
|
213
217
|
};
|
|
214
218
|
export {
|
|
@@ -2,4 +2,5 @@ export declare const COMPONENT_PREFIX = "m4l-property-value";
|
|
|
2
2
|
export declare const PREFIX_TEST_ATTRIBUTE = "data-testid";
|
|
3
3
|
export declare const TEST_PROPS_DATA = "m4l-property-value-data";
|
|
4
4
|
export declare const PROPERTY_VALUE_KEY_COMPONENT = "M4LPropertyValue";
|
|
5
|
+
export declare const PROPERTY_VALUE_CLASSNAMES: Record<"name" | "value" | "Root" | "containerStartAdornment" | "containerPropertyAndValue" | "typographyValue", string>;
|
|
5
6
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,eAAe,4BAA6B,CAAC;AAC1D,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAE/D,eAAO,MAAM,yBAAyB,yHAGrC,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { getComponentClasses as o } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { PropertyValueSlots as t } from "./slots/PropertyValueEnum.js";
|
|
3
|
+
const r = "m4l-property-value", p = `${r}-data`, P = "M4LPropertyValue", s = o(
|
|
4
|
+
P,
|
|
5
|
+
t
|
|
6
|
+
);
|
|
2
7
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
r as COMPONENT_PREFIX,
|
|
9
|
+
s as PROPERTY_VALUE_CLASSNAMES,
|
|
10
|
+
P as PROPERTY_VALUE_KEY_COMPONENT,
|
|
11
|
+
p as TEST_PROPS_DATA
|
|
6
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.57.1-beta-hotfix-semantic-width-dynamicform.
|
|
3
|
+
"version": "9.57.1-beta-hotfix-semantic-width-dynamicform.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,24 +53,24 @@
|
|
|
53
53
|
"@hookform/resolvers": "2.9.11",
|
|
54
54
|
"nprogress": "0.2.0",
|
|
55
55
|
"react-transition-group": "4.4.5",
|
|
56
|
+
"react-dropzone": "14.4.1",
|
|
57
|
+
"@mui/x-date-pickers": "6.20.2",
|
|
56
58
|
"@tanstack/react-virtual": "3.13.23",
|
|
59
|
+
"react-draggable": "4.5.0",
|
|
57
60
|
"react-color": "2.19.3",
|
|
58
|
-
"react-rnd": "10.5.2",
|
|
59
|
-
"@mui/x-date-pickers": "6.20.2",
|
|
60
61
|
"react-spinners": "0.13.8",
|
|
61
|
-
"react-
|
|
62
|
-
"react-dropzone": "14.4.1",
|
|
63
|
-
"simplebar-react": "3.2.6",
|
|
62
|
+
"react-rnd": "10.5.2",
|
|
64
63
|
"chart.js": "4.5.1",
|
|
65
64
|
"chartjs-chart-error-bars": "4.4.5",
|
|
66
65
|
"qrcode.react": "3.2.0",
|
|
66
|
+
"simplebar-react": "3.2.6",
|
|
67
67
|
"react-resizable-panels": "2.1.9",
|
|
68
68
|
"react-simple-code-editor": "0.14.1",
|
|
69
69
|
"react-data-grid": "7.0.0-beta.47",
|
|
70
70
|
"react-dnd": "16.0.1",
|
|
71
71
|
"react-dnd-html5-backend": "16.0.1",
|
|
72
72
|
"date-fns": "2.30.0",
|
|
73
|
-
"react-
|
|
74
|
-
"react-
|
|
73
|
+
"react-resizable": "3.1.3",
|
|
74
|
+
"react-window": "1.8.11"
|
|
75
75
|
}
|
|
76
76
|
}
|