@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.
- package/components/Label/Label.styles.d.ts.map +1 -1
- package/components/Label/Label.styles.js +80 -59
- package/components/Label/types.d.ts +2 -2
- package/components/Label/types.d.ts.map +1 -1
- package/components/NumberInput/NumberInput.styles.d.ts.map +1 -1
- package/components/NumberInput/NumberInput.styles.js +89 -81
- package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.js +76 -74
- package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.styles.js +57 -37
- package/components/PropertyValue/types.d.ts +3 -1
- package/components/PropertyValue/types.d.ts.map +1 -1
- package/components/SideBar/SideBar.d.ts +2 -7
- package/components/SideBar/SideBar.d.ts.map +1 -1
- package/components/SideBar/SideBar.js +54 -48
- package/components/SideBar/constants.d.ts +21 -0
- package/components/SideBar/constants.d.ts.map +1 -1
- package/components/SideBar/constants.js +34 -14
- package/components/SideBar/dictionaryDefaults.d.ts +4 -0
- package/components/SideBar/dictionaryDefaults.d.ts.map +1 -0
- package/components/SideBar/dictionaryDefaults.js +35 -0
- package/components/SideBar/helpers/getMenuDataWithState/index.js +4 -4
- package/components/SideBar/helpers/resolveSidebarWidth.d.ts +3 -0
- package/components/SideBar/helpers/resolveSidebarWidth.d.ts.map +1 -0
- package/components/SideBar/helpers/resolveSidebarWidth.js +7 -0
- package/components/SideBar/hooks/useSideBarPreferences.d.ts +4 -0
- package/components/SideBar/hooks/useSideBarPreferences.d.ts.map +1 -0
- package/components/SideBar/hooks/useSideBarPreferences.js +71 -0
- package/components/SideBar/index.d.ts +4 -1
- package/components/SideBar/index.d.ts.map +1 -1
- package/components/SideBar/slots/SideBarSlots.js +1 -1
- package/components/SideBar/subcomponents/SideBarNavigation/SideBarNavigation.d.ts +4 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SideBarNavigation.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SideBarNavigation.js +257 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarBranding.d.ts +6 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarBranding.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarBranding.js +44 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarInstances.d.ts +4 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarInstances.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarInstances.js +77 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarItemIcon.d.ts +4 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarItemIcon.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarItemIcon.js +40 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarLabelTooltip.d.ts +4 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarLabelTooltip.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarLabelTooltip.js +21 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarRow.d.ts +4 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarRow.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/SidebarRow.js +62 -0
- package/components/SideBar/subcomponents/SideBarNavigation/assets/sidebar-texture.jpg.js +4 -0
- package/components/SideBar/subcomponents/SideBarNavigation/constants.d.ts +32 -0
- package/components/SideBar/subcomponents/SideBarNavigation/constants.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/constants.js +17 -0
- package/components/SideBar/subcomponents/SideBarNavigation/helpers.d.ts +17 -0
- package/components/SideBar/subcomponents/SideBarNavigation/helpers.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/helpers.js +61 -0
- package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.d.ts +75 -0
- package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/slots/styled.js +508 -0
- package/components/SideBar/subcomponents/SideBarNavigation/types.d.ts +108 -0
- package/components/SideBar/subcomponents/SideBarNavigation/types.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.d.ts +16 -0
- package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.d.ts.map +1 -0
- package/components/SideBar/subcomponents/SideBarNavigation/useSidebarResize.js +42 -0
- package/components/SideBar/types.d.ts +70 -60
- package/components/SideBar/types.d.ts.map +1 -1
- package/index.js +200 -194
- 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,
|
|
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
|
|
3
|
-
function a(
|
|
4
|
-
return o(
|
|
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:
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
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
|
-
...
|
|
25
|
-
|
|
26
|
-
|
|
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:
|
|
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
|
-
...
|
|
37
|
-
color:
|
|
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:
|
|
49
|
+
typographyStyled: ({ theme: i, ownerState: e }) => ({
|
|
47
50
|
"&.MuiTypography-root": {
|
|
48
51
|
width: "fit-content",
|
|
49
|
-
minWidth:
|
|
50
|
-
overflow:
|
|
51
|
-
textOverflow:
|
|
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:
|
|
55
|
-
...
|
|
56
|
-
color:
|
|
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:
|
|
73
|
+
typographyMandatoryMessageStyled: ({ theme: i, ownerState: e }) => ({
|
|
65
74
|
"&.MuiTypography-root": {
|
|
66
75
|
width: "fit-content",
|
|
67
|
-
overflow:
|
|
68
|
-
textOverflow:
|
|
76
|
+
overflow: e?.labelOverflow === "visible" ? "visible" : "hidden",
|
|
77
|
+
textOverflow: e?.labelOverflow === "visible" ? "clip" : "ellipsis",
|
|
69
78
|
whiteSpace: "nowrap",
|
|
70
|
-
minWidth:
|
|
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:
|
|
73
|
-
...
|
|
74
|
-
color:
|
|
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:
|
|
83
|
-
const l =
|
|
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:
|
|
86
|
-
cursor:
|
|
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
|
-
...
|
|
90
|
-
|
|
91
|
-
|
|
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:
|
|
120
|
+
skeletonStyled: ({ ownerState: i, theme: e }) => ({
|
|
100
121
|
width: "100%",
|
|
101
|
-
borderRadius:
|
|
122
|
+
borderRadius: e.vars.size.borderRadius.r1,
|
|
102
123
|
display: "flex",
|
|
103
124
|
alignItems: "center",
|
|
104
|
-
backgroundColor:
|
|
105
|
-
...
|
|
106
|
-
|
|
107
|
-
|
|
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:
|
|
112
|
-
paddingLeft:
|
|
113
|
-
paddingRight:
|
|
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:
|
|
117
|
-
borderRadius:
|
|
118
|
-
...
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
...
|
|
124
|
-
|
|
125
|
-
|
|
144
|
+
...s(
|
|
145
|
+
e.generalSettings.isMobile,
|
|
146
|
+
i?.size || "small",
|
|
126
147
|
"base"
|
|
127
148
|
)
|
|
128
149
|
},
|
|
129
150
|
"&.HelperIconLabel": {
|
|
130
|
-
borderRadius:
|
|
131
|
-
...
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
/**
|
|
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,
|
|
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,
|
|
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
|
|
2
|
-
import { getSizeStyles as
|
|
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
|
|
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:
|
|
9
|
-
const r = p(
|
|
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:
|
|
18
|
-
paddingLeft:
|
|
19
|
-
paddingRight:
|
|
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
|
-
...
|
|
22
|
+
...e?.readOnly && {
|
|
23
23
|
cursor: "default",
|
|
24
24
|
pointerEvents: "none"
|
|
25
25
|
},
|
|
26
|
-
...
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
...a(
|
|
27
|
+
i,
|
|
28
|
+
e?.size || "medium",
|
|
29
29
|
"action",
|
|
30
|
-
(
|
|
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:
|
|
34
|
-
minHeight:
|
|
35
|
-
maxHeight:
|
|
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
|
-
...
|
|
40
|
-
border:
|
|
39
|
+
...e?.variant === "outlined" && {
|
|
40
|
+
border: i.vars.size.borderStroke.actionInput,
|
|
41
41
|
borderColor: r.borderColor,
|
|
42
|
-
borderRadius:
|
|
42
|
+
borderRadius: i.vars.size.borderRadius["r1-5"]
|
|
43
43
|
},
|
|
44
|
-
...
|
|
45
|
-
borderBottom:
|
|
44
|
+
...e?.variant === "text" && {
|
|
45
|
+
borderBottom: i.vars.size.borderStroke.actionInput,
|
|
46
46
|
borderColor: r.borderColor,
|
|
47
|
-
borderRadius:
|
|
47
|
+
borderRadius: i.vars.size.borderRadius["r1-5"]
|
|
48
48
|
},
|
|
49
49
|
// States (Pseudo-classes)
|
|
50
|
-
...
|
|
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
|
-
...
|
|
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:
|
|
70
|
+
background: i.vars.palette.background.default,
|
|
71
71
|
borderColor: r.focusBorderColor
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
...
|
|
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:
|
|
82
|
-
gap:
|
|
83
|
-
height:
|
|
84
|
-
maxHeight:
|
|
85
|
-
minHeight:
|
|
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:
|
|
88
|
-
paddingRight:
|
|
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:
|
|
96
|
+
input: ({ theme: i, ownerState: e }) => ({
|
|
97
97
|
// General styles
|
|
98
98
|
background: "transparent",
|
|
99
99
|
border: 0,
|
|
100
100
|
outline: 0,
|
|
101
|
-
color:
|
|
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
|
-
...
|
|
105
|
-
color:
|
|
105
|
+
...e?.focusError && {
|
|
106
|
+
color: i.vars.palette.error.enabled
|
|
106
107
|
},
|
|
107
|
-
...
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
...n(
|
|
109
|
+
i.generalSettings.isMobile,
|
|
110
|
+
e?.size || "small",
|
|
110
111
|
"bodyStandard"
|
|
111
112
|
),
|
|
112
113
|
...l(),
|
|
113
|
-
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:
|
|
119
|
+
readOnlyValue: ({ theme: i }) => ({
|
|
119
120
|
alignItems: "center",
|
|
120
121
|
display: "flex",
|
|
121
|
-
fontFamily:
|
|
122
|
-
gap:
|
|
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:
|
|
132
|
-
color: d(
|
|
132
|
+
readOnlyInputValue: ({ theme: i, ownerState: e }) => ({
|
|
133
|
+
color: d(i, e?.disabled),
|
|
133
134
|
flex: "0 0 auto",
|
|
134
|
-
fontFamily:
|
|
135
|
+
fontFamily: o,
|
|
135
136
|
minWidth: 0,
|
|
136
|
-
...
|
|
137
|
-
|
|
138
|
-
|
|
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:
|
|
146
|
-
const r = d(
|
|
147
|
-
|
|
148
|
-
|
|
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:
|
|
157
|
-
...
|
|
157
|
+
fontFamily: o,
|
|
158
|
+
...t,
|
|
158
159
|
"& .M4LTypography-root.M4lclassCssSpecificity": {
|
|
159
160
|
color: r,
|
|
160
|
-
fontFamily:
|
|
161
|
-
...
|
|
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:
|
|
169
|
+
ContainButtonsAdornment: ({ theme: i }) => ({
|
|
169
170
|
display: "flex",
|
|
170
171
|
flexDirection: "row",
|
|
171
172
|
justifyContent: "center",
|
|
172
|
-
|
|
173
|
+
alignItems: "center",
|
|
173
174
|
height: "100%",
|
|
174
|
-
|
|
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:
|
|
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
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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:
|
|
205
|
-
const r =
|
|
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:
|
|
224
|
+
background: i.vars.palette.default.enabled,
|
|
217
225
|
borderBottomLeftRadius: 0,
|
|
218
226
|
borderBottomRightRadius: 0,
|
|
219
227
|
borderTopLeftRadius: 0,
|
|
220
|
-
borderTopRightRadius: `calc(${
|
|
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 ${
|
|
234
|
+
outline: `1px solid ${i.vars.palette?.primary.enabled}`
|
|
227
235
|
},
|
|
228
236
|
"&:active": {
|
|
229
|
-
background: `${
|
|
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:
|
|
249
|
-
const r =
|
|
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:
|
|
268
|
+
background: i.vars.palette.default.enabled,
|
|
261
269
|
borderTopLeftRadius: 0,
|
|
262
270
|
borderTopRightRadius: 0,
|
|
263
271
|
borderBottomLeftRadius: 0,
|
|
264
|
-
borderBottomRightRadius: `calc(${
|
|
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 ${
|
|
278
|
+
outline: `1px solid ${i.vars.palette?.primary.enabled}`
|
|
271
279
|
},
|
|
272
280
|
"&:active": {
|
|
273
|
-
background: `${
|
|
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:
|
|
300
|
+
skeleton: ({ theme: i, ownerState: e }) => ({
|
|
293
301
|
"&.M4lclassCssSpecificity": {
|
|
294
302
|
width: "100%",
|
|
295
|
-
...
|
|
296
|
-
|
|
297
|
-
|
|
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,
|
|
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"}
|