@m4l/components 9.86.0-beta-pkg-799-preparar-app-cd-ci.0 → 9.87.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.
Files changed (68) hide show
  1. package/components/Label/Label.styles.d.ts.map +1 -1
  2. package/components/Label/Label.styles.js +80 -59
  3. package/components/Label/types.d.ts +2 -2
  4. package/components/Label/types.d.ts.map +1 -1
  5. package/components/NumberInput/NumberInput.styles.d.ts.map +1 -1
  6. package/components/NumberInput/NumberInput.styles.js +89 -81
  7. package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
  8. package/components/PropertyValue/PropertyValue.js +76 -74
  9. package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
  10. package/components/PropertyValue/PropertyValue.styles.js +57 -37
  11. package/components/PropertyValue/types.d.ts +3 -1
  12. package/components/PropertyValue/types.d.ts.map +1 -1
  13. package/components/SideBar/SideBar.d.ts +2 -7
  14. package/components/SideBar/SideBar.d.ts.map +1 -1
  15. package/components/SideBar/SideBar.js +54 -48
  16. package/components/SideBar/constants.d.ts +21 -0
  17. package/components/SideBar/constants.d.ts.map +1 -1
  18. package/components/SideBar/constants.js +34 -14
  19. package/components/SideBar/dictionaryDefaults.d.ts +4 -0
  20. package/components/SideBar/dictionaryDefaults.d.ts.map +1 -0
  21. package/components/SideBar/dictionaryDefaults.js +35 -0
  22. package/components/SideBar/helpers/getMenuDataWithState/index.js +4 -4
  23. package/components/SideBar/helpers/resolveSidebarWidth.d.ts +3 -0
  24. package/components/SideBar/helpers/resolveSidebarWidth.d.ts.map +1 -0
  25. package/components/SideBar/helpers/resolveSidebarWidth.js +7 -0
  26. package/components/SideBar/hooks/useSideBarPreferences.d.ts +4 -0
  27. package/components/SideBar/hooks/useSideBarPreferences.d.ts.map +1 -0
  28. package/components/SideBar/hooks/useSideBarPreferences.js +71 -0
  29. package/components/SideBar/index.d.ts +4 -1
  30. package/components/SideBar/index.d.ts.map +1 -1
  31. package/components/SideBar/slots/SideBarSlots.js +1 -1
  32. package/components/SideBar/subcomponents/SideBarNavigation/SideBarNavigation.d.ts +4 -0
  33. package/components/SideBar/subcomponents/SideBarNavigation/SideBarNavigation.d.ts.map +1 -0
  34. package/components/SideBar/subcomponents/SideBarNavigation/SideBarNavigation.js +257 -0
  35. package/components/SideBar/subcomponents/SideBarNavigation/SidebarBranding.d.ts +6 -0
  36. package/components/SideBar/subcomponents/SideBarNavigation/SidebarBranding.d.ts.map +1 -0
  37. package/components/SideBar/subcomponents/SideBarNavigation/SidebarBranding.js +44 -0
  38. package/components/SideBar/subcomponents/SideBarNavigation/SidebarInstances.d.ts +4 -0
  39. package/components/SideBar/subcomponents/SideBarNavigation/SidebarInstances.d.ts.map +1 -0
  40. package/components/SideBar/subcomponents/SideBarNavigation/SidebarInstances.js +77 -0
  41. package/components/SideBar/subcomponents/SideBarNavigation/SidebarItemIcon.d.ts +4 -0
  42. package/components/SideBar/subcomponents/SideBarNavigation/SidebarItemIcon.d.ts.map +1 -0
  43. package/components/SideBar/subcomponents/SideBarNavigation/SidebarItemIcon.js +40 -0
  44. package/components/SideBar/subcomponents/SideBarNavigation/SidebarLabelTooltip.d.ts +4 -0
  45. package/components/SideBar/subcomponents/SideBarNavigation/SidebarLabelTooltip.d.ts.map +1 -0
  46. package/components/SideBar/subcomponents/SideBarNavigation/SidebarLabelTooltip.js +21 -0
  47. package/components/SideBar/subcomponents/SideBarNavigation/SidebarRow.d.ts +4 -0
  48. package/components/SideBar/subcomponents/SideBarNavigation/SidebarRow.d.ts.map +1 -0
  49. package/components/SideBar/subcomponents/SideBarNavigation/SidebarRow.js +62 -0
  50. package/components/SideBar/subcomponents/SideBarNavigation/assets/sidebar-texture.jpg.js +4 -0
  51. package/components/SideBar/subcomponents/SideBarNavigation/constants.d.ts +32 -0
  52. package/components/SideBar/subcomponents/SideBarNavigation/constants.d.ts.map +1 -0
  53. package/components/SideBar/subcomponents/SideBarNavigation/constants.js +17 -0
  54. package/components/SideBar/subcomponents/SideBarNavigation/helpers.d.ts +17 -0
  55. package/components/SideBar/subcomponents/SideBarNavigation/helpers.d.ts.map +1 -0
  56. package/components/SideBar/subcomponents/SideBarNavigation/helpers.js +61 -0
  57. package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.d.ts +75 -0
  58. package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.d.ts.map +1 -0
  59. package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.js +508 -0
  60. package/components/SideBar/subcomponents/SideBarNavigation/types.d.ts +108 -0
  61. package/components/SideBar/subcomponents/SideBarNavigation/types.d.ts.map +1 -0
  62. package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.d.ts +16 -0
  63. package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.d.ts.map +1 -0
  64. package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.js +42 -0
  65. package/components/SideBar/types.d.ts +70 -60
  66. package/components/SideBar/types.d.ts.map +1 -1
  67. package/index.js +200 -194
  68. package/package.json +10 -10
@@ -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,WAoJzB,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,WA2KzB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { getIconPaintStyles as o } from "@m4l/base";
2
- import { getHeightSizeStyles as i } from "../../utils/getSizeStyles/getSizeStyles.js";
3
- function a(e) {
4
- return o(e);
2
+ import { getHeightSizeStyles as s } from "../../utils/getSizeStyles/getSizeStyles.js";
3
+ function a(i) {
4
+ return o(i);
5
5
  }
6
6
  const n = {
7
7
  /**
@@ -10,20 +10,18 @@ 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 }) => ({
14
- // `fit-content` instead of `100%`: the root must contribute a real intrinsic width so the
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: i, ownerState: e }) => ({
14
+ // Intrinsic form layouts measure the rendered label width. A wrapping label uses the
15
+ // width assigned by its container so each line can use the available space.
16
+ // Los layouts intrínsecos miden el ancho real. Un label multilínea usa el ancho de su
17
+ // contenedor para aprovechar el espacio disponible en cada renglón.
18
+ width: e?.labelOverflow === "wrap" ? "100%" : "fit-content",
21
19
  display: "flex",
22
20
  flexDirection: "row",
23
21
  alignItems: "center",
24
- ...i(
25
- e.generalSettings.isMobile,
26
- s?.size || "small",
22
+ ...s(
23
+ i.generalSettings.isMobile,
24
+ e?.size || "small",
27
25
  "base",
28
26
  (l) => ({
29
27
  minHeight: l,
@@ -31,10 +29,15 @@ const n = {
31
29
  maxHeight: "none"
32
30
  })
33
31
  ),
34
- gap: e.size.baseSpacings.sp1,
32
+ gap: i.size.baseSpacings.sp1,
33
+ ...e?.labelOverflow === "wrap" && {
34
+ alignItems: "baseline",
35
+ maxInlineSize: "100%",
36
+ minInlineSize: 0
37
+ },
35
38
  /** Estilos para el estado disabled del Label 😶‍🌫️ */
36
- ...s?.disabled && {
37
- color: e.vars.palette.text.disabled,
39
+ ...e?.disabled && {
40
+ color: i.vars.palette.text.disabled,
38
41
  '& > [class*="M4LIcon-icon"]': {
39
42
  PointerEvents: "none"
40
43
  }
@@ -43,17 +46,23 @@ const n = {
43
46
  /**
44
47
  * Estilos para el slot Typography del Label.
45
48
  */
46
- typographyStyled: ({ theme: e, ownerState: s }) => ({
49
+ typographyStyled: ({ theme: i, ownerState: e }) => ({
47
50
  "&.MuiTypography-root": {
48
51
  width: "fit-content",
49
- minWidth: e.vars.size.baseSpacings.sp2,
50
- overflow: s?.labelOverflow === "visible" ? "visible" : "hidden",
51
- textOverflow: s?.labelOverflow === "visible" ? "clip" : "ellipsis",
52
+ minWidth: i.vars.size.baseSpacings.sp2,
53
+ overflow: e?.labelOverflow === "visible" ? "visible" : "hidden",
54
+ textOverflow: e?.labelOverflow === "visible" ? "clip" : "ellipsis",
52
55
  whiteSpace: "nowrap",
56
+ ...e?.labelOverflow === "wrap" && {
57
+ minInlineSize: 0,
58
+ overflow: "visible",
59
+ overflowWrap: "anywhere",
60
+ whiteSpace: "normal"
61
+ },
53
62
  "&.M4lclassCssSpecificity": {
54
- color: e.vars.palette.text.secondary,
55
- ...s?.disabled === !0 && {
56
- color: e.vars.palette.text.disabled
63
+ color: i.vars.palette.text.secondary,
64
+ ...e?.disabled === !0 && {
65
+ color: i.vars.palette.text.disabled
57
66
  }
58
67
  }
59
68
  }
@@ -61,17 +70,28 @@ const n = {
61
70
  /**
62
71
  * Estilos para el slot Typography del mensaje obligatorio del Label.
63
72
  */
64
- typographyMandatoryMessageStyled: ({ theme: e, ownerState: s }) => ({
73
+ typographyMandatoryMessageStyled: ({ theme: i, ownerState: e }) => ({
65
74
  "&.MuiTypography-root": {
66
75
  width: "fit-content",
67
- overflow: s?.labelOverflow === "visible" ? "visible" : "hidden",
68
- textOverflow: s?.labelOverflow === "visible" ? "clip" : "ellipsis",
76
+ overflow: e?.labelOverflow === "visible" ? "visible" : "hidden",
77
+ textOverflow: e?.labelOverflow === "visible" ? "clip" : "ellipsis",
69
78
  whiteSpace: "nowrap",
70
- minWidth: e.vars.size.baseSpacings.sp2,
79
+ minWidth: i.vars.size.baseSpacings.sp2,
80
+ ...e?.labelOverflow === "wrap" && {
81
+ overflow: "visible",
82
+ overflowWrap: "anywhere",
83
+ whiteSpace: "normal"
84
+ },
71
85
  "&.M4lclassCssSpecificity": {
72
- color: e.vars.palette.text.primary,
73
- ...s?.disabled && {
74
- color: e.vars.palette.text.disabled
86
+ color: i.vars.palette.text.primary,
87
+ ...e?.disabled && {
88
+ color: i.vars.palette.text.disabled
89
+ }
90
+ },
91
+ ...!e?.disabled && {
92
+ "&.mandatoryAsterisk.M4lclassCssSpecificity": {
93
+ // The primary action color is too dark for small text on dark form surfaces.
94
+ color: i.palette.mode === "dark" ? i.vars.palette.primary.semanticText : i.vars.palette.primary.enabled
75
95
  }
76
96
  }
77
97
  }
@@ -79,16 +99,17 @@ const n = {
79
99
  /**
80
100
  * Estilos para el slot Icon del Label.
81
101
  */
82
- iconHelperMessageStyled: ({ theme: e, ownerState: s }) => {
83
- 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;
102
+ iconHelperMessageStyled: ({ theme: i, ownerState: e }) => {
103
+ const l = e?.disabled ? i.vars.palette.text.disabled : i.vars.palette.info.enabled, r = e?.disabled ? i.vars.palette.text.disabled : i.vars.palette.info.hover;
84
104
  return {
85
- borderRadius: e.vars.size.borderRadius.r1,
86
- cursor: s?.disabled ? "default" : "pointer",
105
+ borderRadius: i.vars.size.borderRadius.r1,
106
+ cursor: e?.disabled ? "default" : "pointer",
107
+ ...e?.labelOverflow === "wrap" && { flexShrink: 0 },
87
108
  ...a(l),
88
109
  "&:hover": a(r),
89
- ...i(
90
- e.generalSettings.isMobile,
91
- s?.size || "small",
110
+ ...s(
111
+ i.generalSettings.isMobile,
112
+ e?.size || "small",
92
113
  "base"
93
114
  )
94
115
  };
@@ -96,41 +117,41 @@ const n = {
96
117
  /**
97
118
  * Estilos para el slot Skeleton del Label.
98
119
  */
99
- skeletonStyled: ({ ownerState: e, theme: s }) => ({
120
+ skeletonStyled: ({ ownerState: i, theme: e }) => ({
100
121
  width: "100%",
101
- borderRadius: s.vars.size.borderRadius.r1,
122
+ borderRadius: e.vars.size.borderRadius.r1,
102
123
  display: "flex",
103
124
  alignItems: "center",
104
- backgroundColor: s.vars.palette.skeleton.default,
105
- ...i(
106
- s.generalSettings.isMobile,
107
- e?.size || "medium",
125
+ backgroundColor: e.vars.palette.skeleton.default,
126
+ ...s(
127
+ e.generalSettings.isMobile,
128
+ i?.size || "medium",
108
129
  "base"
109
130
  ),
110
131
  "&.MandatoryLabel": {
111
- width: s.vars.size.baseSpacings["sp0-5"],
112
- paddingLeft: s.vars.size.baseSpacings.sp1,
113
- paddingRight: s.vars.size.baseSpacings.sp1
132
+ width: e.vars.size.baseSpacings["sp0-5"],
133
+ paddingLeft: e.vars.size.baseSpacings.sp1,
134
+ paddingRight: e.vars.size.baseSpacings.sp1
114
135
  },
115
136
  "&.SkeletonWidthLabel": {
116
- width: s.vars.size.baseSpacings.sp14,
117
- borderRadius: s.vars.size.borderRadius.r1,
118
- ...i(
119
- s.generalSettings.isMobile,
120
- e?.size || "medium",
137
+ width: e.vars.size.baseSpacings.sp14,
138
+ borderRadius: e.vars.size.borderRadius.r1,
139
+ ...s(
140
+ e.generalSettings.isMobile,
141
+ i?.size || "medium",
121
142
  "base"
122
143
  ),
123
- ...i(
124
- s.generalSettings.isMobile,
125
- e?.size || "small",
144
+ ...s(
145
+ e.generalSettings.isMobile,
146
+ i?.size || "small",
126
147
  "base"
127
148
  )
128
149
  },
129
150
  "&.HelperIconLabel": {
130
- borderRadius: s.vars.size.borderRadius.r4,
131
- ...i(
132
- s.generalSettings.isMobile,
133
- e?.size || "small",
151
+ borderRadius: e.vars.size.borderRadius.r4,
152
+ ...s(
153
+ e.generalSettings.isMobile,
154
+ i?.size || "small",
134
155
  "base",
135
156
  (l) => ({
136
157
  width: l
@@ -22,8 +22,8 @@ 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';
25
+ /** Clip, expose the intrinsic line, or wrap the label within its available width. */
26
+ labelOverflow?: 'ellipsis' | 'visible' | 'wrap';
27
27
  /**
28
28
  * Optional symbol rendered wrapped in parentheses right after the label text,
29
29
  * 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,kGAAkG;IAClG,aAAa,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACvC;;;;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
+ {"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,qFAAqF;IACrF,aAAa,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD;;;;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":"NumberInput.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/NumberInput/NumberInput.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAY5C;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAuT/B,CAAC"}
1
+ {"version":3,"file":"NumberInput.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/NumberInput/NumberInput.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAY5C;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBA+T/B,CAAC"}
@@ -1,12 +1,12 @@
1
- import { getTypographyStyles as s, getSingleLineInputLineHeight as l } from "../../utils/getTypographyStyles.js";
2
- import { getSizeStyles as n } from "../../utils/getSizeStyles/getSizeStyles.js";
1
+ import { getTypographyStyles as n, getSingleLineInputLineHeight as l } from "../../utils/getTypographyStyles.js";
2
+ import { getSizeStyles as a } from "../../utils/getSizeStyles/getSizeStyles.js";
3
3
  import { getSharedInputStateColors as p } from "../../utils/getSharedInputStateColors.js";
4
- const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif', d = (e, i) => i ? e.vars.palette.text.disabled : e.vars.palette.text.primary, b = {
4
+ const o = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif', d = (i, e) => e ? i.vars.palette.text.disabled : i.vars.palette.text.primary, b = {
5
5
  /**
6
6
  * Styles applied to the main root container.
7
7
  */
8
- root: ({ theme: e, ownerState: i }) => {
9
- const r = p(e, !!i?.error), o = i?.disabled === !1 && i?.readOnly !== !0;
8
+ root: ({ theme: i, ownerState: e }) => {
9
+ const r = p(i, !!e?.error), t = e?.disabled === !1 && e?.readOnly !== !0;
10
10
  return {
11
11
  // General styles
12
12
  display: "flex",
@@ -14,40 +14,40 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
14
14
  position: "relative",
15
15
  height: "auto",
16
16
  width: "100%",
17
- gap: e.vars.size.baseSpacings.sp1,
18
- paddingLeft: e.vars.size.baseSpacings.sp1,
19
- paddingRight: i?.noButtons && e.vars.size.baseSpacings.sp1,
17
+ gap: i.vars.size.baseSpacings.sp1,
18
+ paddingLeft: i.vars.size.baseSpacings.sp1,
19
+ paddingRight: e?.noButtons && i.vars.size.baseSpacings.sp1,
20
20
  boxSizing: "border-box",
21
21
  overflow: "hidden",
22
- ...i?.readOnly && {
22
+ ...e?.readOnly && {
23
23
  cursor: "default",
24
24
  pointerEvents: "none"
25
25
  },
26
- ...n(
27
- e,
28
- i?.size || "medium",
26
+ ...a(
27
+ i,
28
+ e?.size || "medium",
29
29
  "action",
30
- (a) => ({
30
+ (s) => ({
31
31
  // Keep the button column on an explicit height while matching the visible outer height
32
32
  // used by other bordered input surfaces.
33
- height: a,
34
- minHeight: a,
35
- maxHeight: a
33
+ height: `var(--m4l-form-control-block-size, ${s})`,
34
+ minHeight: s,
35
+ maxHeight: `var(--m4l-form-control-max-block-size, ${s})`
36
36
  })
37
37
  ),
38
38
  // Variants (Outlined and Text)
39
- ...i?.variant === "outlined" && {
40
- border: e.vars.size.borderStroke.actionInput,
39
+ ...e?.variant === "outlined" && {
40
+ border: i.vars.size.borderStroke.actionInput,
41
41
  borderColor: r.borderColor,
42
- borderRadius: e.vars.size.borderRadius["r1-5"]
42
+ borderRadius: i.vars.size.borderRadius["r1-5"]
43
43
  },
44
- ...i?.variant === "text" && {
45
- borderBottom: e.vars.size.borderStroke.actionInput,
44
+ ...e?.variant === "text" && {
45
+ borderBottom: i.vars.size.borderStroke.actionInput,
46
46
  borderColor: r.borderColor,
47
- borderRadius: e.vars.size.borderRadius["r1-5"]
47
+ borderRadius: i.vars.size.borderRadius["r1-5"]
48
48
  },
49
49
  // States (Pseudo-classes)
50
- ...o && {
50
+ ...t && {
51
51
  "&:hover": {
52
52
  background: r.hoverBackgroundColor,
53
53
  borderColor: r.hoverBorderColor,
@@ -60,32 +60,32 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
60
60
  },
61
61
  "&:focus-within": {
62
62
  borderColor: r.focusBorderColor,
63
- ...i?.variant === "text" ? {
63
+ ...e?.variant === "text" ? {
64
64
  boxShadow: `0px 1.5px 0px 0px ${r.focusRingColor}`
65
65
  } : {
66
66
  boxShadow: `0px 0px 0px 1.5px ${r.focusRingColor}`
67
67
  }
68
68
  },
69
69
  "&:active": {
70
- background: e.vars.palette.background.default,
70
+ background: i.vars.palette.background.default,
71
71
  borderColor: r.focusBorderColor
72
72
  }
73
73
  },
74
- ...i?.readOnly && {
74
+ ...e?.readOnly && {
75
75
  background: "transparent",
76
76
  border: 0,
77
77
  borderBottom: 0,
78
78
  borderColor: "transparent",
79
79
  borderRadius: 0,
80
80
  boxShadow: "none",
81
- fontFamily: t,
82
- gap: e.vars.size.baseSpacings.sp1,
83
- height: e.vars.size.baseSpacings.sp6,
84
- maxHeight: e.vars.size.baseSpacings.sp6,
85
- minHeight: e.vars.size.baseSpacings.sp6,
81
+ fontFamily: o,
82
+ gap: i.vars.size.baseSpacings.sp1,
83
+ height: i.vars.size.baseSpacings.sp6,
84
+ maxHeight: i.vars.size.baseSpacings.sp6,
85
+ minHeight: i.vars.size.baseSpacings.sp6,
86
86
  minWidth: 0,
87
- paddingLeft: e.vars.size.baseSpacings.sp1,
88
- paddingRight: e.vars.size.baseSpacings.sp0,
87
+ paddingLeft: i.vars.size.baseSpacings.sp1,
88
+ paddingRight: i.vars.size.baseSpacings.sp0,
89
89
  width: "fit-content"
90
90
  }
91
91
  };
@@ -93,33 +93,34 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
93
93
  /**
94
94
  * Styles applied to the input field.
95
95
  */
96
- input: ({ theme: e, ownerState: i }) => ({
96
+ input: ({ theme: i, ownerState: e }) => ({
97
97
  // General styles
98
98
  background: "transparent",
99
99
  border: 0,
100
100
  outline: 0,
101
- color: i?.disabled ? e.vars.palette.text.disabled : e.vars.palette.text.primary,
101
+ color: e?.disabled ? i.vars.palette.text.disabled : i.vars.palette.text.primary,
102
102
  height: "max-content ",
103
+ minWidth: 0,
103
104
  width: "100%",
104
- ...i?.focusError && {
105
- color: e.vars.palette.error.enabled
105
+ ...e?.focusError && {
106
+ color: i.vars.palette.error.enabled
106
107
  },
107
- ...s(
108
- e.generalSettings.isMobile,
109
- i?.size || "small",
108
+ ...n(
109
+ i.generalSettings.isMobile,
110
+ e?.size || "small",
110
111
  "bodyStandard"
111
112
  ),
112
113
  ...l(),
113
- fontFamily: e.typography.fontFamily
114
+ fontFamily: i.typography.fontFamily
114
115
  }),
115
116
  /**
116
117
  * Styles applied to the static read-only value wrapper.
117
118
  */
118
- readOnlyValue: ({ theme: e }) => ({
119
+ readOnlyValue: ({ theme: i }) => ({
119
120
  alignItems: "center",
120
121
  display: "flex",
121
- fontFamily: t,
122
- gap: e.vars.size.baseSpacings.sp1,
122
+ fontFamily: o,
123
+ gap: i.vars.size.baseSpacings.sp1,
123
124
  height: "100%",
124
125
  minWidth: 0,
125
126
  pointerEvents: "none",
@@ -128,24 +129,24 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
128
129
  /**
129
130
  * Styles applied to the static read-only numeric value.
130
131
  */
131
- readOnlyInputValue: ({ theme: e, ownerState: i }) => ({
132
- color: d(e, i?.disabled),
132
+ readOnlyInputValue: ({ theme: i, ownerState: e }) => ({
133
+ color: d(i, e?.disabled),
133
134
  flex: "0 0 auto",
134
- fontFamily: t,
135
+ fontFamily: o,
135
136
  minWidth: 0,
136
- ...s(
137
- e.generalSettings.isMobile,
138
- i?.size || "medium",
137
+ ...n(
138
+ i.generalSettings.isMobile,
139
+ e?.size || "medium",
139
140
  "captionDens"
140
141
  )
141
142
  }),
142
143
  /**
143
144
  * Styles applied to the static read-only suffix/adornment.
144
145
  */
145
- readOnlyAdornment: ({ theme: e, ownerState: i }) => {
146
- const r = d(e, i?.disabled), o = s(
147
- e.generalSettings.isMobile,
148
- i?.size || "medium",
146
+ readOnlyAdornment: ({ theme: i, ownerState: e }) => {
147
+ const r = d(i, e?.disabled), t = n(
148
+ i.generalSettings.isMobile,
149
+ e?.size || "medium",
149
150
  "microDens"
150
151
  );
151
152
  return {
@@ -153,25 +154,28 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
153
154
  color: r,
154
155
  display: "inline-flex",
155
156
  flex: "0 0 auto",
156
- fontFamily: t,
157
- ...o,
157
+ fontFamily: o,
158
+ ...t,
158
159
  "& .M4LTypography-root.M4lclassCssSpecificity": {
159
160
  color: r,
160
- fontFamily: t,
161
- ...o
161
+ fontFamily: o,
162
+ ...t
162
163
  }
163
164
  };
164
165
  },
165
166
  /**
166
167
  * Styles for the buttons and endAdornment wrapper.
167
168
  */
168
- ContainButtonsAdornment: ({ theme: e }) => ({
169
+ ContainButtonsAdornment: ({ theme: i }) => ({
169
170
  display: "flex",
170
171
  flexDirection: "row",
171
172
  justifyContent: "center",
172
- alignContent: "center",
173
+ alignItems: "center",
173
174
  height: "100%",
174
- gap: e.vars.size.baseSpacings.sp2,
175
+ // Reserve space for the unit and steppers when the input is in a narrow column.
176
+ flexShrink: 0,
177
+ whiteSpace: "nowrap",
178
+ gap: i.vars.size.baseSpacings.sp2,
175
179
  span: {
176
180
  alignSelf: "center"
177
181
  }
@@ -179,16 +183,20 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
179
183
  /**
180
184
  * Styles applied to the increment and decrement buttons container.
181
185
  */
182
- containerButtons: ({ theme: e, ownerState: i }) => ({
186
+ containerButtons: ({ theme: i, ownerState: e }) => ({
183
187
  display: "flex",
184
188
  flexDirection: "column",
185
189
  height: "100%",
186
190
  minHeight: 0,
187
191
  flexShrink: 0,
188
192
  alignSelf: "stretch",
189
- ...n(
190
- e,
191
- i?.size || "medium",
193
+ // Keep a usable stepper height when the surrounding form lets the input grow.
194
+ ...a(i, e?.size || "medium", "action", (r) => ({
195
+ minHeight: `calc(${r} * var(--m4l-form-stepper-min-height-ratio, 0))`
196
+ })),
197
+ ...a(
198
+ i,
199
+ e?.size || "medium",
192
200
  "action",
193
201
  (r) => ({
194
202
  width: r,
@@ -201,8 +209,8 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
201
209
  /**
202
210
  * Styles for the increment button.
203
211
  */
204
- increment: ({ theme: e, ownerState: i }) => {
205
- const r = i?.disabled === !1 && i?.readOnly !== !0;
212
+ increment: ({ theme: i, ownerState: e }) => {
213
+ const r = e?.disabled === !1 && e?.readOnly !== !0;
206
214
  return {
207
215
  "&&&": {
208
216
  // General styles
@@ -213,20 +221,20 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
213
221
  width: "100%",
214
222
  minWidth: "100%",
215
223
  maxWidth: "100%",
216
- background: e.vars.palette.default.enabled,
224
+ background: i.vars.palette.default.enabled,
217
225
  borderBottomLeftRadius: 0,
218
226
  borderBottomRightRadius: 0,
219
227
  borderTopLeftRadius: 0,
220
- borderTopRightRadius: `calc(${e.vars.size.borderRadius["r1-5"]} - 1px)`,
228
+ borderTopRightRadius: `calc(${i.vars.size.borderRadius["r1-5"]} - 1px)`,
221
229
  outlineOffset: 0,
222
230
  // States (Pseudo-classes)
223
231
  ...r && {
224
232
  "&:focus-visible": {
225
233
  zIndex: 1,
226
- outline: `1px solid ${e.vars.palette?.primary.enabled}`
234
+ outline: `1px solid ${i.vars.palette?.primary.enabled}`
227
235
  },
228
236
  "&:active": {
229
- background: `${e.vars.palette?.default.active} !important`
237
+ background: `${i.vars.palette?.default.active} !important`
230
238
  }
231
239
  },
232
240
  "& div": {
@@ -245,8 +253,8 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
245
253
  /**
246
254
  * Styles for the decrement button.
247
255
  */
248
- decrement: ({ theme: e, ownerState: i }) => {
249
- const r = i?.disabled === !1 && i?.readOnly !== !0;
256
+ decrement: ({ theme: i, ownerState: e }) => {
257
+ const r = e?.disabled === !1 && e?.readOnly !== !0;
250
258
  return {
251
259
  "&&&": {
252
260
  // General styles
@@ -257,20 +265,20 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
257
265
  width: "100%",
258
266
  minWidth: "100%",
259
267
  maxWidth: "100%",
260
- background: e.vars.palette.default.enabled,
268
+ background: i.vars.palette.default.enabled,
261
269
  borderTopLeftRadius: 0,
262
270
  borderTopRightRadius: 0,
263
271
  borderBottomLeftRadius: 0,
264
- borderBottomRightRadius: `calc(${e.vars.size.borderRadius["r1-5"]} - 1px)`,
272
+ borderBottomRightRadius: `calc(${i.vars.size.borderRadius["r1-5"]} - 1px)`,
265
273
  outlineOffset: 0,
266
274
  // States (Pseudo-classes)
267
275
  ...r && {
268
276
  "&:focus-visible": {
269
277
  zIndex: 1,
270
- outline: `1px solid ${e.vars.palette?.primary.enabled}`
278
+ outline: `1px solid ${i.vars.palette?.primary.enabled}`
271
279
  },
272
280
  "&:active": {
273
- background: `${e.vars.palette?.default.active} !important`
281
+ background: `${i.vars.palette?.default.active} !important`
274
282
  }
275
283
  },
276
284
  "& div": {
@@ -289,12 +297,12 @@ const t = 'Jura, "Segoe UI", Roboto, "Helvetica Neue", "Open Sans", sans-serif',
289
297
  /**
290
298
  * Styles applied to the skeleton.
291
299
  */
292
- skeleton: ({ theme: e, ownerState: i }) => ({
300
+ skeleton: ({ theme: i, ownerState: e }) => ({
293
301
  "&.M4lclassCssSpecificity": {
294
302
  width: "100%",
295
- ...n(
296
- e,
297
- i?.size || "medium",
303
+ ...a(
304
+ i,
305
+ e?.size || "medium",
298
306
  "action",
299
307
  (r) => ({
300
308
  height: r,
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyValue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA2B,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAyB3E;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDA2JtD"}
1
+ {"version":3,"file":"PropertyValue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA2B,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAyB3E;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDA+JtD"}