@m4l/components 9.59.0 → 9.59.1-beta-hotfix-semantic-width-dynamicform.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/CheckableList/slots/styled.d.ts +3 -3
- package/components/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
- package/components/DynamicForm/DynamicForm.styles.js +165 -72
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts +49 -0
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts.map +1 -0
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js +174 -0
- package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.d.ts.map +1 -1
- package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.js +21 -11
- package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/textFieldStrategy.js +38 -38
- package/components/DynamicForm/helpers/resolveFieldComponent/types.d.ts +1 -1
- package/components/DynamicForm/helpers/resolveFieldContractAliases/resolveFieldContractAliases.d.ts +1 -5
- package/components/DynamicForm/helpers/resolveFieldContractAliases/resolveFieldContractAliases.d.ts.map +1 -1
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +132 -120
- package/components/DynamicForm/types.d.ts +13 -14
- package/components/DynamicForm/types.d.ts.map +1 -1
- package/components/Label/Label.d.ts.map +1 -1
- package/components/Label/Label.js +40 -26
- package/components/Label/Label.styles.d.ts.map +1 -1
- package/components/Label/Label.styles.js +59 -53
- package/components/Label/types.d.ts +2 -0
- package/components/Label/types.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.js +82 -57
- package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.styles.js +100 -100
- 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/components/PropertyValue/semanticWidth.d.ts +7 -0
- package/components/PropertyValue/semanticWidth.d.ts.map +1 -0
- package/components/PropertyValue/semanticWidth.js +31 -0
- package/components/PropertyValue/types.d.ts +5 -1
- package/components/PropertyValue/types.d.ts.map +1 -1
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getIconPaintStyles as
|
|
1
|
+
import { getIconPaintStyles as o } from "@m4l/base";
|
|
2
2
|
import { getHeightSizeStyles as i } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function a(e) {
|
|
4
|
+
return o(e);
|
|
5
5
|
}
|
|
6
6
|
const n = {
|
|
7
7
|
/**
|
|
@@ -10,25 +10,31 @@ 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
|
-
width
|
|
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",
|
|
15
21
|
display: "flex",
|
|
16
22
|
flexDirection: "row",
|
|
17
23
|
alignItems: "center",
|
|
18
24
|
...i(
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
e.generalSettings.isMobile,
|
|
26
|
+
s?.size || "small",
|
|
21
27
|
"base",
|
|
22
|
-
(
|
|
23
|
-
minHeight:
|
|
28
|
+
(l) => ({
|
|
29
|
+
minHeight: l,
|
|
24
30
|
height: "auto",
|
|
25
31
|
maxHeight: "none"
|
|
26
32
|
})
|
|
27
33
|
),
|
|
28
|
-
gap:
|
|
34
|
+
gap: e.size.baseSpacings.sp1,
|
|
29
35
|
/** Estilos para el estado disabled del Label 😶🌫️ */
|
|
30
|
-
...
|
|
31
|
-
color:
|
|
36
|
+
...s?.disabled && {
|
|
37
|
+
color: e.vars.palette.text.disabled,
|
|
32
38
|
'& > [class*="M4LIcon-icon"]': {
|
|
33
39
|
PointerEvents: "none"
|
|
34
40
|
}
|
|
@@ -37,17 +43,17 @@ const n = {
|
|
|
37
43
|
/**
|
|
38
44
|
* Estilos para el slot Typography del Label.
|
|
39
45
|
*/
|
|
40
|
-
typographyStyled: ({ theme:
|
|
46
|
+
typographyStyled: ({ theme: e, ownerState: s }) => ({
|
|
41
47
|
"&.MuiTypography-root": {
|
|
42
48
|
width: "fit-content",
|
|
43
|
-
minWidth:
|
|
44
|
-
overflow: "hidden",
|
|
45
|
-
textOverflow: "ellipsis",
|
|
49
|
+
minWidth: e.vars.size.baseSpacings.sp2,
|
|
50
|
+
overflow: s?.labelOverflow === "visible" ? "visible" : "hidden",
|
|
51
|
+
textOverflow: s?.labelOverflow === "visible" ? "clip" : "ellipsis",
|
|
46
52
|
whiteSpace: "nowrap",
|
|
47
53
|
"&.M4lclassCssSpecificity": {
|
|
48
|
-
color:
|
|
49
|
-
...
|
|
50
|
-
color:
|
|
54
|
+
color: e.vars.palette.text.secondary,
|
|
55
|
+
...s?.disabled === !0 && {
|
|
56
|
+
color: e.vars.palette.text.disabled
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
}
|
|
@@ -55,17 +61,17 @@ const n = {
|
|
|
55
61
|
/**
|
|
56
62
|
* Estilos para el slot Typography del mensaje obligatorio del Label.
|
|
57
63
|
*/
|
|
58
|
-
typographyMandatoryMessageStyled: ({ theme:
|
|
64
|
+
typographyMandatoryMessageStyled: ({ theme: e, ownerState: s }) => ({
|
|
59
65
|
"&.MuiTypography-root": {
|
|
60
66
|
width: "fit-content",
|
|
61
|
-
overflow: "hidden",
|
|
62
|
-
textOverflow: "ellipsis",
|
|
67
|
+
overflow: s?.labelOverflow === "visible" ? "visible" : "hidden",
|
|
68
|
+
textOverflow: s?.labelOverflow === "visible" ? "clip" : "ellipsis",
|
|
63
69
|
whiteSpace: "nowrap",
|
|
64
|
-
minWidth:
|
|
70
|
+
minWidth: e.vars.size.baseSpacings.sp2,
|
|
65
71
|
"&.M4lclassCssSpecificity": {
|
|
66
|
-
color:
|
|
67
|
-
...
|
|
68
|
-
color:
|
|
72
|
+
color: e.vars.palette.text.primary,
|
|
73
|
+
...s?.disabled && {
|
|
74
|
+
color: e.vars.palette.text.disabled
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
77
|
}
|
|
@@ -73,16 +79,16 @@ const n = {
|
|
|
73
79
|
/**
|
|
74
80
|
* Estilos para el slot Icon del Label.
|
|
75
81
|
*/
|
|
76
|
-
iconHelperMessageStyled: ({ theme:
|
|
77
|
-
const
|
|
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;
|
|
78
84
|
return {
|
|
79
|
-
borderRadius:
|
|
80
|
-
cursor:
|
|
81
|
-
...l
|
|
82
|
-
"&:hover":
|
|
85
|
+
borderRadius: e.vars.size.borderRadius.r1,
|
|
86
|
+
cursor: s?.disabled ? "default" : "pointer",
|
|
87
|
+
...a(l),
|
|
88
|
+
"&:hover": a(r),
|
|
83
89
|
...i(
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
e.generalSettings.isMobile,
|
|
91
|
+
s?.size || "small",
|
|
86
92
|
"base"
|
|
87
93
|
)
|
|
88
94
|
};
|
|
@@ -90,44 +96,44 @@ const n = {
|
|
|
90
96
|
/**
|
|
91
97
|
* Estilos para el slot Skeleton del Label.
|
|
92
98
|
*/
|
|
93
|
-
skeletonStyled: ({ ownerState:
|
|
99
|
+
skeletonStyled: ({ ownerState: e, theme: s }) => ({
|
|
94
100
|
width: "100%",
|
|
95
|
-
borderRadius:
|
|
101
|
+
borderRadius: s.vars.size.borderRadius.r1,
|
|
96
102
|
display: "flex",
|
|
97
103
|
alignItems: "center",
|
|
98
|
-
backgroundColor:
|
|
104
|
+
backgroundColor: s.vars.palette.skeleton.default,
|
|
99
105
|
...i(
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
s.generalSettings.isMobile,
|
|
107
|
+
e?.size || "medium",
|
|
102
108
|
"base"
|
|
103
109
|
),
|
|
104
110
|
"&.MandatoryLabel": {
|
|
105
|
-
width:
|
|
106
|
-
paddingLeft:
|
|
107
|
-
paddingRight:
|
|
111
|
+
width: s.vars.size.baseSpacings["sp0-5"],
|
|
112
|
+
paddingLeft: s.vars.size.baseSpacings.sp1,
|
|
113
|
+
paddingRight: s.vars.size.baseSpacings.sp1
|
|
108
114
|
},
|
|
109
115
|
"&.SkeletonWidthLabel": {
|
|
110
|
-
width:
|
|
111
|
-
borderRadius:
|
|
116
|
+
width: s.vars.size.baseSpacings.sp14,
|
|
117
|
+
borderRadius: s.vars.size.borderRadius.r1,
|
|
112
118
|
...i(
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
s.generalSettings.isMobile,
|
|
120
|
+
e?.size || "medium",
|
|
115
121
|
"base"
|
|
116
122
|
),
|
|
117
123
|
...i(
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
s.generalSettings.isMobile,
|
|
125
|
+
e?.size || "small",
|
|
120
126
|
"base"
|
|
121
127
|
)
|
|
122
128
|
},
|
|
123
129
|
"&.HelperIconLabel": {
|
|
124
|
-
borderRadius:
|
|
130
|
+
borderRadius: s.vars.size.borderRadius.r4,
|
|
125
131
|
...i(
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
s.generalSettings.isMobile,
|
|
133
|
+
e?.size || "small",
|
|
128
134
|
"base",
|
|
129
|
-
(
|
|
130
|
-
width:
|
|
135
|
+
(l) => ({
|
|
136
|
+
width: l
|
|
131
137
|
})
|
|
132
138
|
)
|
|
133
139
|
}
|
|
@@ -22,6 +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
27
|
/**
|
|
26
28
|
* Optional symbol rendered wrapped in parentheses right after the label text,
|
|
27
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,UAA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;IAC3B,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAClD,MAAM,WAAW,eAAgB,SAAQ,UAAU,EAAE,UAAU;IAC7D,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;CAC3C;AACD,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,UAAU,CAAC;AACrD,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAC,UAAU,EAAE,OAAO,mBAAmB,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyValue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PropertyValue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA2B,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAyB3E;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDA2JtD"}
|
|
@@ -1,90 +1,115 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { TEST_PROP_ID as
|
|
5
|
-
import { TEST_PROPS_DATA as
|
|
6
|
-
import { getNameDataTestId as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { PropertyValueRootStyled as
|
|
9
|
-
import { getComponentSlotRoot as
|
|
10
|
-
import { getNullGuard as
|
|
11
|
-
import { Label as
|
|
12
|
-
import { useComponentSize as
|
|
13
|
-
function
|
|
1
|
+
import { jsxs as y, jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import f, { useId as D } from "react";
|
|
3
|
+
import W from "clsx";
|
|
4
|
+
import { TEST_PROP_ID as x } from "../../test/constants_no_mock.js";
|
|
5
|
+
import { PROPERTY_VALUE_CLASSNAMES as M, TEST_PROPS_DATA as F, COMPONENT_PREFIX as L, PROPERTY_VALUE_KEY_COMPONENT as s } from "./constants.js";
|
|
6
|
+
import { getNameDataTestId as w, getPropDataTestId as Y } from "../../test/getNameDataTestId.js";
|
|
7
|
+
import { Icon as $ } from "@m4l/base";
|
|
8
|
+
import { PropertyValueRootStyled as j, ContainerStartAdornmentStyled as q, ContainerPropertyAndValueStyled as U, NameStyled as G, ValueStyled as H, TypographyValueStyled as J } from "./slots/PropertyValueSlots.js";
|
|
9
|
+
import { getComponentSlotRoot as S } from "../../utils/getComponentSlotRoot.js";
|
|
10
|
+
import { getNullGuard as K } from "../../utils/getNullGuard.js";
|
|
11
|
+
import { Label as X } from "../Label/Label.js";
|
|
12
|
+
import { useComponentSize as k } from "@m4l/graphics";
|
|
13
|
+
function me(h) {
|
|
14
14
|
const {
|
|
15
15
|
property: l,
|
|
16
16
|
startAdornment: o,
|
|
17
17
|
value: e,
|
|
18
|
-
className:
|
|
18
|
+
className: E,
|
|
19
19
|
isForm: n,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
labelOverflow: m,
|
|
21
|
+
labelWidth: P,
|
|
22
|
+
dataTestId: p = "",
|
|
23
|
+
disabled: u = !1,
|
|
24
|
+
controlWidth: N,
|
|
25
|
+
mandatory: v,
|
|
26
|
+
mandatoryMessage: T,
|
|
27
|
+
helperMessage: g,
|
|
28
|
+
symbol: I,
|
|
26
29
|
semanticWidth: a = "fullWidth",
|
|
27
|
-
propertyWidth:
|
|
28
|
-
size:
|
|
29
|
-
direction:
|
|
30
|
-
valueHeight:
|
|
31
|
-
iconVariant:
|
|
32
|
-
iconColor:
|
|
33
|
-
borderStyle:
|
|
34
|
-
} =
|
|
35
|
-
propertyWidth:
|
|
36
|
-
|
|
30
|
+
propertyWidth: O = 200,
|
|
31
|
+
size: V = "medium",
|
|
32
|
+
direction: c,
|
|
33
|
+
valueHeight: _,
|
|
34
|
+
iconVariant: b = "outlined",
|
|
35
|
+
iconColor: R = "primary",
|
|
36
|
+
borderStyle: A = "none"
|
|
37
|
+
} = h, d = `property-value-${D()}`, { currentSize: i } = k(V), r = {
|
|
38
|
+
propertyWidth: O,
|
|
39
|
+
controlWidth: N,
|
|
40
|
+
disabled: n && u ? u : !1,
|
|
37
41
|
isForm: !!n,
|
|
42
|
+
labelOverflow: m,
|
|
43
|
+
labelWidth: P,
|
|
38
44
|
semanticWidth: a,
|
|
39
|
-
valueHeight:
|
|
45
|
+
valueHeight: _,
|
|
40
46
|
size: i,
|
|
41
|
-
direction: n &&
|
|
42
|
-
iconVariant:
|
|
43
|
-
iconColor:
|
|
44
|
-
borderStyle:
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
+
direction: n && c === void 0 ? "column" : c ?? "row",
|
|
48
|
+
iconVariant: b,
|
|
49
|
+
iconColor: R,
|
|
50
|
+
borderStyle: A
|
|
51
|
+
}, C = () => o ? typeof o == "string" ? /* @__PURE__ */ t(
|
|
52
|
+
$,
|
|
47
53
|
{
|
|
48
54
|
src: o,
|
|
49
55
|
color: "text.secondary"
|
|
50
56
|
}
|
|
51
|
-
) : o : null,
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
) : o : null, z = () => typeof e == "string" || typeof e == "number" || e === null || e === void 0 ? /* @__PURE__ */ t(
|
|
58
|
+
J,
|
|
59
|
+
{
|
|
60
|
+
id: d,
|
|
61
|
+
size: i,
|
|
62
|
+
variant: "bodyDens",
|
|
63
|
+
ownerState: r,
|
|
64
|
+
children: K(e)
|
|
65
|
+
}
|
|
66
|
+
) : f.isValidElement(e) ? f.cloneElement(
|
|
67
|
+
e,
|
|
68
|
+
{ size: i, id: d }
|
|
69
|
+
) : e;
|
|
70
|
+
return /* @__PURE__ */ y(
|
|
71
|
+
j,
|
|
54
72
|
{
|
|
55
73
|
role: n ? "property-value-form-role" : "property-value-role",
|
|
56
|
-
className:
|
|
57
|
-
|
|
58
|
-
a && `${
|
|
59
|
-
|
|
74
|
+
className: W(
|
|
75
|
+
S(s),
|
|
76
|
+
a && `${S(s)}-semanticWidth-${a}`,
|
|
77
|
+
E
|
|
60
78
|
),
|
|
61
|
-
...
|
|
79
|
+
...Y(s, "root", p),
|
|
62
80
|
ownerState: r,
|
|
63
81
|
...process.env.NODE_ENV !== "production" ? {
|
|
64
|
-
[
|
|
65
|
-
|
|
82
|
+
[F]: JSON.stringify([
|
|
83
|
+
{ property: !!l, value: !!e }
|
|
84
|
+
]),
|
|
85
|
+
[x]: w(
|
|
86
|
+
L,
|
|
87
|
+
"root",
|
|
88
|
+
p
|
|
89
|
+
)
|
|
66
90
|
} : {},
|
|
67
91
|
children: [
|
|
68
|
-
o && /* @__PURE__ */ t(
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */ t(
|
|
71
|
-
|
|
92
|
+
o && /* @__PURE__ */ t(q, { ownerState: r, children: C() }),
|
|
93
|
+
/* @__PURE__ */ y(U, { ownerState: r, children: [
|
|
94
|
+
/* @__PURE__ */ t(G, { ownerState: r, className: M.name, children: l && /* @__PURE__ */ t(
|
|
95
|
+
X,
|
|
72
96
|
{
|
|
73
97
|
size: i,
|
|
74
98
|
label: l,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
99
|
+
labelOverflow: m,
|
|
100
|
+
mandatory: v,
|
|
101
|
+
mandatoryMessage: T,
|
|
102
|
+
helperMessage: g,
|
|
103
|
+
symbol: I,
|
|
79
104
|
htmlFor: d
|
|
80
105
|
}
|
|
81
106
|
) }),
|
|
82
|
-
/* @__PURE__ */ t(
|
|
107
|
+
/* @__PURE__ */ t(H, { role: "property-value-value-role", ownerState: r, children: z() })
|
|
83
108
|
] })
|
|
84
109
|
]
|
|
85
110
|
}
|
|
86
111
|
);
|
|
87
112
|
}
|
|
88
113
|
export {
|
|
89
|
-
|
|
114
|
+
me as PropertyValue
|
|
90
115
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyValue.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"PropertyValue.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/PropertyValue.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAU9C,eAAO,MAAM,mBAAmB,EAAE,mBA0QjC,CAAC"}
|