@m4l/components 9.57.1-beta-hotfix-semantic-width-dynamicform.1 β†’ 9.57.1

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.
Files changed (25) hide show
  1. package/components/CheckableList/slots/styled.d.ts +3 -3
  2. package/components/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
  3. package/components/DynamicForm/DynamicForm.styles.js +61 -54
  4. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
  5. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +124 -137
  6. package/components/Label/Label.d.ts.map +1 -1
  7. package/components/Label/Label.js +26 -40
  8. package/components/Label/Label.styles.d.ts.map +1 -1
  9. package/components/Label/Label.styles.js +52 -52
  10. package/components/Label/types.d.ts +0 -2
  11. package/components/Label/types.d.ts.map +1 -1
  12. package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
  13. package/components/PropertyValue/PropertyValue.js +57 -82
  14. package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
  15. package/components/PropertyValue/PropertyValue.styles.js +91 -87
  16. package/components/PropertyValue/types.d.ts +1 -5
  17. package/components/PropertyValue/types.d.ts.map +1 -1
  18. package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
  19. package/package.json +6 -6
  20. package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts +0 -29
  21. package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts.map +0 -1
  22. package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js +0 -82
  23. package/components/PropertyValue/semanticWidth.d.ts +0 -7
  24. package/components/PropertyValue/semanticWidth.d.ts.map +0 -1
  25. package/components/PropertyValue/semanticWidth.js +0 -31
@@ -1,9 +1,9 @@
1
- import { jsx as r, jsxs as C } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as E, useMemo as L, memo as A } from "react";
3
- import R from "clsx";
4
- import { useModuleDictionary as W, useEnvironment as g } from "@m4l/core";
5
- import { NotificationCheckCircleFill as O, NotificationWarningFill as T } from "@m4l/icons";
6
- import { Icon as H } from "@m4l/base";
1
+ import { jsx as o, jsxs as C } from "@emotion/react/jsx-runtime";
2
+ import { forwardRef as A, useMemo as g, memo as L } from "react";
3
+ import N from "clsx";
4
+ import { useModuleDictionary as R, useEnvironment as O } from "@m4l/core";
5
+ import { NotificationCheckCircleFill as T, NotificationWarningFill as H } from "@m4l/icons";
6
+ import { Icon as W } from "@m4l/base";
7
7
  import { TEST_PROP_ID as z } from "../../../../test/constants_no_mock.js";
8
8
  import { ActionsContainer as G } from "../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
9
9
  import { ActionFormIntro as k } from "../../../CommonActions/components/ActionFormIntro/ActionFormIntro.js";
@@ -11,136 +11,123 @@ import { PropertyValue as x } from "../../../PropertyValue/PropertyValue.js";
11
11
  import { useDynamicFormConditionals as P } from "../../hooks/useDynamicFormConditionals/useDynamicFormConditionals.js";
12
12
  import { resolveFieldRenderHelperMessage as V } from "../../helpers/resolveFieldRenderHelperMessage/resolveFieldRenderHelperMessage.js";
13
13
  import { resolveFieldInputLabel as j } from "../../helpers/resolveFieldInputLabel/resolveFieldInputLabel.js";
14
- import { resolveAdaptiveFieldLayout as B } from "../../helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js";
15
- import { DYNAMIC_FORM_DICTIONARY as N } from "../../dictionary.js";
16
- import { DYNAMIC_FORM_CLASSES as u } from "../../constants.js";
17
- import { DynamicFormSubmitFeedbackStyled as U, DynamicFormContentRootStyled as Y, DynamicFormFormHeaderStyled as q, DynamicFormFormTitleStyled as K, DynamicFormFormDescriptionStyled as $, DynamicFormFieldsFlowStyled as J, DynamicFormActionsRowStyled as Q, DynamicFormFieldWrapperStyled as X } from "../../slots/DynamicFormSlots.js";
18
- import { resolveFormHeader as Z } from "../../helpers/resolveFormHeader/resolveFormHeader.js";
19
- import { resolveFieldMandatory as ee, resolveFieldSymbol as oe } from "../../helpers/resolveFieldContractAliases/resolveFieldContractAliases.js";
20
- import { resolveFieldComponent as re } from "../../helpers/resolveFieldComponent/resolveFieldComponent.js";
21
- import { Chip as te } from "../../../Chip/Chip.js";
22
- const ie = /* @__PURE__ */ new Set([
14
+ import { DYNAMIC_FORM_DICTIONARY as w } from "../../dictionary.js";
15
+ import { DYNAMIC_FORM_CLASSES as c } from "../../constants.js";
16
+ import { DynamicFormSubmitFeedbackStyled as U, DynamicFormContentRootStyled as Y, DynamicFormFormHeaderStyled as B, DynamicFormFormTitleStyled as K, DynamicFormFormDescriptionStyled as $, DynamicFormFieldsFlowStyled as q, DynamicFormActionsRowStyled as J, DynamicFormFieldWrapperStyled as Q } from "../../slots/DynamicFormSlots.js";
17
+ import { resolveFormHeader as X } from "../../helpers/resolveFormHeader/resolveFormHeader.js";
18
+ import { resolveFieldComponent as Z } from "../../helpers/resolveFieldComponent/resolveFieldComponent.js";
19
+ import { resolveFieldSymbol as ee, resolveFieldMandatory as oe } from "../../helpers/resolveFieldContractAliases/resolveFieldContractAliases.js";
20
+ import { Chip as re } from "../../../Chip/Chip.js";
21
+ const te = /* @__PURE__ */ new Set([
23
22
  "RHFCheckableList"
24
23
  ]);
25
- function le(c) {
26
- const t = c.fieldType?.componentId;
27
- return t && ie.has(t) ? "verticalGrow" : "default";
24
+ function ie(a) {
25
+ const t = a.fieldType?.componentId;
26
+ return t && te.has(t) ? "verticalGrow" : "default";
28
27
  }
29
- function ae(c) {
28
+ function ne(a) {
30
29
  const t = [];
31
30
  let e = [];
32
- return c.forEach((o) => {
33
- const a = le(o);
34
- if (a === "verticalGrow") {
31
+ return a.forEach((r) => {
32
+ const s = ie(r);
33
+ if (s === "verticalGrow") {
35
34
  e.length > 0 && (t.push({
36
35
  layout: "default",
37
36
  fields: e
38
37
  }), e = []), t.push({
39
- layout: a,
40
- fields: [o]
38
+ layout: s,
39
+ fields: [r]
41
40
  });
42
41
  return;
43
42
  }
44
- e.push(o);
43
+ e.push(r);
45
44
  }), e.length > 0 && t.push({
46
45
  layout: "default",
47
46
  fields: e
48
47
  }), t;
49
48
  }
50
- const b = A(function(t) {
49
+ const D = L(function(t) {
51
50
  const {
52
51
  field: e,
53
- currentSize: o,
54
- fieldWrapperClassName: a,
55
- fieldFlow: D,
56
- layout: f,
57
- readOnly: y = !1
58
- } = t, { getLabel: F } = W(), { host_api_remote: h } = g(), s = f === "verticalGrow";
52
+ currentSize: r,
53
+ fieldWrapperClassName: s,
54
+ fieldFlow: S,
55
+ layout: d,
56
+ readOnly: p = !1
57
+ } = t, { getLabel: u } = R(), { host_api_remote: f } = O(), l = d === "verticalGrow";
59
58
  if (typeof e.name != "string" || e.name.trim() === "")
60
59
  return null;
61
- const S = V(
60
+ const h = V(
62
61
  e,
63
- F
64
- ), i = j(e, F), n = ee(e), v = oe(e), d = B({
65
- hasHelperMessage: !!S,
66
- label: i,
67
- mandatory: n,
68
- requestedSemanticWidth: e.metadata?.semanticWidth,
69
- size: o,
70
- symbol: v
71
- }), m = re(e, {
72
- size: o,
73
- getLabel: F,
74
- hostApiRemote: h,
75
- readOnly: y,
62
+ u
63
+ ), i = Z(e, {
64
+ size: r,
65
+ getLabel: u,
66
+ hostApiRemote: f,
67
+ readOnly: p,
76
68
  suppressLabel: !0
77
69
  });
78
- return m ? /* @__PURE__ */ r(
79
- X,
70
+ return i ? /* @__PURE__ */ o(
71
+ Q,
80
72
  {
81
73
  ownerState: {
82
- readOnly: y,
83
- fieldFlow: D,
84
- layout: f,
85
- isFullWidth: d.isFullWidth,
86
- semanticWidth: e.metadata?.semanticWidth,
87
- wrapperWidth: d.wrapperWidth
74
+ readOnly: p,
75
+ fieldFlow: S,
76
+ layout: d,
77
+ semanticWidth: e.metadata?.semanticWidth
88
78
  },
89
- className: R(
90
- a,
91
- u.fieldWrapper
79
+ className: N(
80
+ s,
81
+ c.fieldWrapper
92
82
  ),
93
- children: /* @__PURE__ */ r(
83
+ children: /* @__PURE__ */ o(
94
84
  x,
95
85
  {
96
- controlWidth: d.controlWidth,
97
- labelOverflow: "visible",
98
- labelWidth: d.labelWidth,
99
- property: i,
100
- value: m,
86
+ property: j(e, u),
87
+ value: i,
101
88
  isForm: !0,
102
- mandatory: n,
103
- helperMessage: S,
104
- symbol: v,
105
- valueHeight: s ? "100%" : void 0
89
+ mandatory: oe(e),
90
+ helperMessage: h,
91
+ symbol: ee(e),
92
+ valueHeight: l ? "100%" : void 0
106
93
  }
107
94
  )
108
95
  }
109
96
  ) : null;
110
97
  });
111
- b.displayName = "DynamicFormFieldRow";
112
- const se = E((c, t) => {
98
+ D.displayName = "DynamicFormFieldRow";
99
+ const se = A((a, t) => {
113
100
  const {
114
101
  data: e,
115
- currentSize: o,
116
- fieldWrapperClassName: a,
117
- dataTestId: D,
118
- dataMeta: f,
119
- coupled: y = !1,
120
- actionFormIntroProps: F,
121
- renderActions: h,
122
- readOnly: s = !1,
123
- suppressFormHeader: S = !0,
102
+ currentSize: r,
103
+ fieldWrapperClassName: s,
104
+ dataTestId: S,
105
+ dataMeta: d,
106
+ coupled: p = !1,
107
+ actionFormIntroProps: u,
108
+ renderActions: f,
109
+ readOnly: l = !1,
110
+ suppressFormHeader: h = !0,
124
111
  submitFeedbackStatus: i,
125
- fieldFlow: n = "responsiveWrap"
126
- } = c, { getLabel: v } = W(), { visibleFields: d } = P(e), m = S ? null : Z(e.form), I = ae(d), w = L(
112
+ fieldFlow: y = "responsiveWrap"
113
+ } = a, { getLabel: I } = R(), { visibleFields: _ } = P(e), F = h ? null : X(e.form), b = ne(_), v = g(
127
114
  () => ({
128
- size: o,
129
- readOnly: s,
130
- fieldFlow: n
115
+ size: r,
116
+ readOnly: l,
117
+ fieldFlow: y
131
118
  }),
132
- [o, n, s]
133
- ), M = !y && i ? /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
134
- te,
119
+ [r, y, l]
120
+ ), M = !p && i ? /* @__PURE__ */ o(U, { children: /* @__PURE__ */ o(
121
+ re,
135
122
  {
136
- size: o,
137
- label: v(
138
- i === "success" ? N.SUBMIT_SUCCESS_MESSAGE : N.SUBMIT_ERROR_MESSAGE
123
+ size: r,
124
+ label: I(
125
+ i === "success" ? w.SUBMIT_SUCCESS_MESSAGE : w.SUBMIT_ERROR_MESSAGE
139
126
  ),
140
- startIcon: /* @__PURE__ */ r(
141
- H,
127
+ startIcon: /* @__PURE__ */ o(
128
+ W,
142
129
  {
143
- src: i === "success" ? /* @__PURE__ */ r(O, {}) : /* @__PURE__ */ r(T, {}),
130
+ src: i === "success" ? /* @__PURE__ */ o(T, {}) : /* @__PURE__ */ o(H, {}),
144
131
  color: i === "success" ? "chips.success.contained.color" : "chips.error.contained.color"
145
132
  }
146
133
  ),
@@ -152,85 +139,85 @@ const se = E((c, t) => {
152
139
  Y,
153
140
  {
154
141
  ref: t,
155
- ownerState: w,
156
- className: R(u.contentRoot),
157
- ...typeof f == "string" ? { "data-meta": f } : {},
158
- ...process.env.NODE_ENV !== "production" ? { [z]: D } : {},
142
+ ownerState: v,
143
+ className: N(c.contentRoot),
144
+ ...typeof d == "string" ? { "data-meta": d } : {},
145
+ ...process.env.NODE_ENV !== "production" ? { [z]: S } : {},
159
146
  children: [
160
- m?.title && /* @__PURE__ */ C(
161
- q,
147
+ F?.title && /* @__PURE__ */ C(
148
+ B,
162
149
  {
163
- className: u.formHeader,
150
+ className: c.formHeader,
164
151
  children: [
165
- /* @__PURE__ */ r(
152
+ /* @__PURE__ */ o(
166
153
  K,
167
154
  {
168
- className: u.formTitle,
155
+ className: c.formTitle,
169
156
  component: "h2",
170
- size: o,
157
+ size: r,
171
158
  variant: "paragraphDens",
172
- children: m.title
159
+ children: F.title
173
160
  }
174
161
  ),
175
- m.description && /* @__PURE__ */ r(
162
+ F.description && /* @__PURE__ */ o(
176
163
  $,
177
164
  {
178
- className: u.formDescription,
165
+ className: c.formDescription,
179
166
  color: "text.secondary",
180
167
  component: "p",
181
- size: o,
168
+ size: r,
182
169
  variant: "bodyStandard",
183
- children: m.description
170
+ children: F.description
184
171
  }
185
172
  )
186
173
  ]
187
174
  }
188
175
  ),
189
176
  M,
190
- I.map((p) => {
191
- if (p.layout === "verticalGrow") {
192
- const l = p.fields[0];
193
- return l ? /* @__PURE__ */ r(
194
- b,
177
+ b.map((m) => {
178
+ if (m.layout === "verticalGrow") {
179
+ const n = m.fields[0];
180
+ return n ? /* @__PURE__ */ o(
181
+ D,
195
182
  {
196
- field: l,
197
- currentSize: o,
198
- fieldWrapperClassName: a,
199
- fieldFlow: n,
200
- layout: p.layout,
201
- readOnly: s
183
+ field: n,
184
+ currentSize: r,
185
+ fieldWrapperClassName: s,
186
+ fieldFlow: y,
187
+ layout: m.layout,
188
+ readOnly: l
202
189
  },
203
- l.id
190
+ n.id
204
191
  ) : null;
205
192
  }
206
- const _ = p.fields.map((l) => l.id).join("-");
207
- return /* @__PURE__ */ r(
208
- J,
193
+ const E = m.fields.map((n) => n.id).join("-");
194
+ return /* @__PURE__ */ o(
195
+ q,
209
196
  {
210
- ownerState: w,
211
- className: u.fieldsFlow,
212
- children: p.fields.map((l) => /* @__PURE__ */ r(
213
- b,
197
+ ownerState: v,
198
+ className: c.fieldsFlow,
199
+ children: m.fields.map((n) => /* @__PURE__ */ o(
200
+ D,
214
201
  {
215
- field: l,
216
- currentSize: o,
217
- fieldWrapperClassName: a,
218
- fieldFlow: n,
219
- layout: p.layout,
220
- readOnly: s
202
+ field: n,
203
+ currentSize: r,
204
+ fieldWrapperClassName: s,
205
+ fieldFlow: y,
206
+ layout: m.layout,
207
+ readOnly: l
221
208
  },
222
- l.id
209
+ n.id
223
210
  ))
224
211
  },
225
- `flow-${_}`
212
+ `flow-${E}`
226
213
  );
227
214
  }),
228
- !y && !s && /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ r(G, { children: h ? h() : /* @__PURE__ */ r(
215
+ !p && !l && /* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(G, { children: f ? f() : /* @__PURE__ */ o(
229
216
  k,
230
217
  {
231
- size: o,
218
+ size: r,
232
219
  color: "default",
233
- ...F
220
+ ...u
234
221
  }
235
222
  ) }) })
236
223
  ]
@@ -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,qDAsFtC,CAAC"}
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 n, Fragment as S } from "@emotion/react/jsx-runtime";
2
- import { useModuleSkeleton as w } from "@m4l/core";
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 z, classLabelRoot as v, LAB_SPECIFY as k } from "./constants.js";
5
- import { useComponentSize as C } from "../../hooks/useComponentSize/index.js";
6
- import { NotificationInformationOutlined as I } from "@m4l/icons";
7
- import { LabelRootStyled as x, TypographyStyled as E, TypographyMandatoryMessageStyled as O, IconHelperMessageStyled as j, SkeletonStyled as i } from "./slots/LabelSlots.js";
8
- const R = (y) => {
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
- x,
14
+ I,
29
15
  {
30
- "aria-label": z,
16
+ "aria-label": w,
31
17
  ownerState: { ...e },
32
- htmlFor: b,
33
- id: f,
34
- children: N ? /* @__PURE__ */ n(S, { 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
- p && /* @__PURE__ */ a(i, { ownerState: { ...e }, variant: "circular", className: "HelperIconLabel" })
38
- ] }) : /* @__PURE__ */ n(S, { children: [
39
- /* @__PURE__ */ n(
40
- E,
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(v, k, "M4lclassCssSpecificity", M),
28
+ className: L(z, k, "M4lclassCssSpecificity", g),
43
29
  ownerState: { ...e },
44
30
  variant: "bodyStandard",
45
- size: s,
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
- O,
40
+ E,
55
41
  {
56
42
  ownerState: { ...e },
57
43
  variant: "bodyStandard",
58
44
  className: o ? "mandatoryMessage" : "mandatoryAsterisk",
59
- size: s,
45
+ size: n,
60
46
  disabled: t,
61
47
  children: o || "*"
62
48
  }
63
49
  ),
64
- p && /* @__PURE__ */ a(
50
+ S && /* @__PURE__ */ a(
65
51
  j,
66
52
  {
67
53
  tooltipContent: r,
68
54
  ownerState: { ...e },
69
55
  placement: "right",
70
- size: s,
71
- className: g ? "helper-icon-error" : "helper-icon",
56
+ size: n,
57
+ className: f ? "helper-icon-error" : "helper-icon",
72
58
  disabled: t,
73
- src: /* @__PURE__ */ a(I, {})
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
- R as Label
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,WA8IzB,CAAC"}
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 o } from "@m4l/base";
1
+ import { getIconPaintStyles as t } from "@m4l/base";
2
2
  import { getHeightSizeStyles as i } from "../../utils/getSizeStyles/getSizeStyles.js";
3
- function a(e) {
4
- return o(e);
3
+ function l(s) {
4
+ return t(s);
5
5
  }
6
6
  const n = {
7
7
  /**
@@ -10,25 +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: e, ownerState: s }) => ({
13
+ root: ({ theme: s, ownerState: e }) => ({
14
14
  width: "100%",
15
15
  display: "flex",
16
16
  flexDirection: "row",
17
17
  alignItems: "center",
18
18
  ...i(
19
- e.generalSettings.isMobile,
20
- s?.size || "small",
19
+ s.generalSettings.isMobile,
20
+ e?.size || "small",
21
21
  "base",
22
- (l) => ({
23
- minHeight: l,
22
+ (a) => ({
23
+ minHeight: a,
24
24
  height: "auto",
25
25
  maxHeight: "none"
26
26
  })
27
27
  ),
28
- gap: e.size.baseSpacings.sp1,
28
+ gap: s.size.baseSpacings.sp1,
29
29
  /** Estilos para el estado disabled del Label πŸ˜Άβ€πŸŒ«οΈ */
30
- ...s?.disabled && {
31
- color: e.vars.palette.text.disabled,
30
+ ...e?.disabled && {
31
+ color: s.vars.palette.text.disabled,
32
32
  '& > [class*="M4LIcon-icon"]': {
33
33
  PointerEvents: "none"
34
34
  }
@@ -37,17 +37,17 @@ const n = {
37
37
  /**
38
38
  * Estilos para el slot Typography del Label.
39
39
  */
40
- typographyStyled: ({ theme: e, ownerState: s }) => ({
40
+ typographyStyled: ({ theme: s, ownerState: e }) => ({
41
41
  "&.MuiTypography-root": {
42
42
  width: "fit-content",
43
- minWidth: e.vars.size.baseSpacings.sp2,
44
- overflow: s?.labelOverflow === "visible" ? "visible" : "hidden",
45
- textOverflow: s?.labelOverflow === "visible" ? "clip" : "ellipsis",
43
+ minWidth: s.vars.size.baseSpacings.sp2,
44
+ overflow: "hidden",
45
+ textOverflow: "ellipsis",
46
46
  whiteSpace: "nowrap",
47
47
  "&.M4lclassCssSpecificity": {
48
- color: e.vars.palette.text.secondary,
49
- ...s?.disabled === !0 && {
50
- color: e.vars.palette.text.disabled
48
+ color: s.vars.palette.text.secondary,
49
+ ...e?.disabled === !0 && {
50
+ color: s.vars.palette.text.disabled
51
51
  }
52
52
  }
53
53
  }
@@ -55,17 +55,17 @@ const n = {
55
55
  /**
56
56
  * Estilos para el slot Typography del mensaje obligatorio del Label.
57
57
  */
58
- typographyMandatoryMessageStyled: ({ theme: e, ownerState: s }) => ({
58
+ typographyMandatoryMessageStyled: ({ theme: s, ownerState: e }) => ({
59
59
  "&.MuiTypography-root": {
60
60
  width: "fit-content",
61
- overflow: s?.labelOverflow === "visible" ? "visible" : "hidden",
62
- textOverflow: s?.labelOverflow === "visible" ? "clip" : "ellipsis",
61
+ overflow: "hidden",
62
+ textOverflow: "ellipsis",
63
63
  whiteSpace: "nowrap",
64
- minWidth: e.vars.size.baseSpacings.sp2,
64
+ minWidth: s.vars.size.baseSpacings.sp2,
65
65
  "&.M4lclassCssSpecificity": {
66
- color: e.vars.palette.text.primary,
67
- ...s?.disabled && {
68
- color: e.vars.palette.text.disabled
66
+ color: s.vars.palette.text.primary,
67
+ ...e?.disabled && {
68
+ color: s.vars.palette.text.disabled
69
69
  }
70
70
  }
71
71
  }
@@ -73,16 +73,16 @@ const n = {
73
73
  /**
74
74
  * Estilos para el slot Icon del Label.
75
75
  */
76
- iconHelperMessageStyled: ({ theme: e, ownerState: s }) => {
77
- const l = s?.disabled ? e.vars.palette.text.disabled : e.vars.palette.info.enabled, r = s?.disabled ? e.vars.palette.text.disabled : e.vars.palette.info.hover;
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;
78
78
  return {
79
- borderRadius: e.vars.size.borderRadius.r1,
80
- cursor: s?.disabled ? "default" : "pointer",
81
- ...a(l),
82
- "&:hover": a(r),
79
+ borderRadius: s.vars.size.borderRadius.r1,
80
+ cursor: e?.disabled ? "default" : "pointer",
81
+ ...l(a),
82
+ "&:hover": l(r),
83
83
  ...i(
84
- e.generalSettings.isMobile,
85
- s?.size || "small",
84
+ s.generalSettings.isMobile,
85
+ e?.size || "small",
86
86
  "base"
87
87
  )
88
88
  };
@@ -90,44 +90,44 @@ const n = {
90
90
  /**
91
91
  * Estilos para el slot Skeleton del Label.
92
92
  */
93
- skeletonStyled: ({ ownerState: e, theme: s }) => ({
93
+ skeletonStyled: ({ ownerState: s, theme: e }) => ({
94
94
  width: "100%",
95
- borderRadius: s.vars.size.borderRadius.r1,
95
+ borderRadius: e.vars.size.borderRadius.r1,
96
96
  display: "flex",
97
97
  alignItems: "center",
98
- backgroundColor: s.vars.palette.skeleton.default,
98
+ backgroundColor: e.vars.palette.skeleton.default,
99
99
  ...i(
100
- s.generalSettings.isMobile,
101
- e?.size || "medium",
100
+ e.generalSettings.isMobile,
101
+ s?.size || "medium",
102
102
  "base"
103
103
  ),
104
104
  "&.MandatoryLabel": {
105
- width: s.vars.size.baseSpacings["sp0-5"],
106
- paddingLeft: s.vars.size.baseSpacings.sp1,
107
- paddingRight: s.vars.size.baseSpacings.sp1
105
+ width: e.vars.size.baseSpacings["sp0-5"],
106
+ paddingLeft: e.vars.size.baseSpacings.sp1,
107
+ paddingRight: e.vars.size.baseSpacings.sp1
108
108
  },
109
109
  "&.SkeletonWidthLabel": {
110
- width: s.vars.size.baseSpacings.sp14,
111
- borderRadius: s.vars.size.borderRadius.r1,
110
+ width: e.vars.size.baseSpacings.sp14,
111
+ borderRadius: e.vars.size.borderRadius.r1,
112
112
  ...i(
113
- s.generalSettings.isMobile,
114
- e?.size || "medium",
113
+ e.generalSettings.isMobile,
114
+ s?.size || "medium",
115
115
  "base"
116
116
  ),
117
117
  ...i(
118
- s.generalSettings.isMobile,
119
- e?.size || "small",
118
+ e.generalSettings.isMobile,
119
+ s?.size || "small",
120
120
  "base"
121
121
  )
122
122
  },
123
123
  "&.HelperIconLabel": {
124
- borderRadius: s.vars.size.borderRadius.r4,
124
+ borderRadius: e.vars.size.borderRadius.r4,
125
125
  ...i(
126
- s.generalSettings.isMobile,
127
- e?.size || "small",
126
+ e.generalSettings.isMobile,
127
+ s?.size || "small",
128
128
  "base",
129
- (l) => ({
130
- width: l
129
+ (a) => ({
130
+ width: a
131
131
  })
132
132
  )
133
133
  }