@m4l/base 1.0.1 → 1.0.2-beta-hotfix-isolation-fonts.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/extended/mui/Typography/Typography.d.ts.map +1 -1
- package/extended/mui/Typography/Typography.js +58 -52
- package/extended/mui/Typography/constants.d.ts +8 -0
- package/extended/mui/Typography/constants.d.ts.map +1 -1
- package/extended/mui/Typography/constants.js +16 -8
- package/extended/mui/Typography/typography.styles.d.ts.map +1 -1
- package/extended/mui/Typography/typography.styles.js +14 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/Typography.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/Typography.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,eAAe,EAChB,MAAM,SAAS,CAAC;AAWjB;;GAEG;AACH,eAAO,MAAM,UAAU,0HA4DtB,CAAC"}
|
|
@@ -1,57 +1,63 @@
|
|
|
1
1
|
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import Y from "clsx";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useModuleSkeleton as
|
|
5
|
-
import { TYPOGRAPHY_CLASSES as m, TYPOGRAPHY_KEY_COMPONENT as
|
|
6
|
-
import { TypographySlots as
|
|
7
|
-
import { StyledMUITypography as
|
|
8
|
-
import { getPropDataTestId as
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
skeleton: e,
|
|
30
|
-
ellipsis: h,
|
|
31
|
-
fontFamily: T
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ s(
|
|
34
|
-
N,
|
|
35
|
-
{
|
|
36
|
-
ref: i,
|
|
37
|
-
className: Y(d, g, m.root),
|
|
3
|
+
import { forwardRef as A } from "react";
|
|
4
|
+
import { useModuleSkeleton as _ } from "@m4l/core";
|
|
5
|
+
import { TYPOGRAPHY_FONTS as k, TYPOGRAPHY_CLASSES as m, TYPOGRAPHY_KEY_COMPONENT as N, TYPOGRAPHY_CLASS_NAME_SPECIFY as O } from "./constants.js";
|
|
6
|
+
import { TypographySlots as g } from "./slots/typographyEnum.js";
|
|
7
|
+
import { StyledMUITypography as w, StyledSkeleton as R } from "./slots/typographySlots.js";
|
|
8
|
+
import { getPropDataTestId as u } from "../../../utils/getNameDataTestId.js";
|
|
9
|
+
const L = A(
|
|
10
|
+
function(l, i) {
|
|
11
|
+
const {
|
|
12
|
+
skeletonWidth: n = "100%",
|
|
13
|
+
skeletonRows: o = 1,
|
|
14
|
+
variant: t = "body",
|
|
15
|
+
color: p = "text.primary",
|
|
16
|
+
size: S = "medium",
|
|
17
|
+
className: d,
|
|
18
|
+
dataTestid: f,
|
|
19
|
+
children: y,
|
|
20
|
+
disabled: c,
|
|
21
|
+
ellipsis: T = !1,
|
|
22
|
+
fontFamily: P = k.Inter,
|
|
23
|
+
...h
|
|
24
|
+
} = l, e = _(), r = {
|
|
25
|
+
disabled: c,
|
|
26
|
+
color: p,
|
|
27
|
+
size: S,
|
|
28
|
+
skeletonRows: o,
|
|
38
29
|
variant: t,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
skeleton: e,
|
|
31
|
+
ellipsis: T,
|
|
32
|
+
fontFamily: P
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ s(
|
|
35
|
+
w,
|
|
36
|
+
{
|
|
37
|
+
ref: i,
|
|
38
|
+
className: Y(
|
|
39
|
+
d,
|
|
40
|
+
O,
|
|
41
|
+
m.root
|
|
42
|
+
),
|
|
43
|
+
variant: t,
|
|
44
|
+
ownerState: { ...r },
|
|
45
|
+
...u(N, g.root, f),
|
|
46
|
+
...h,
|
|
47
|
+
children: e ? Array.from({ length: o }).map((x, a) => /* @__PURE__ */ s(
|
|
48
|
+
R,
|
|
49
|
+
{
|
|
50
|
+
width: a === o - 1 ? n : "100%",
|
|
51
|
+
variant: "text",
|
|
52
|
+
ownerState: { ...r },
|
|
53
|
+
className: m.skeleton
|
|
54
|
+
},
|
|
55
|
+
a
|
|
56
|
+
)) : y
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
55
61
|
export {
|
|
56
|
-
|
|
62
|
+
L as Typography
|
|
57
63
|
};
|
|
@@ -14,4 +14,12 @@ export declare const TYPOGRAPHY_FONTS: {
|
|
|
14
14
|
readonly Inter: "Inter";
|
|
15
15
|
readonly Jura: "Jura";
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Shared fallback stack used when the primary design-system font is unavailable.
|
|
19
|
+
*/
|
|
20
|
+
export declare const TYPOGRAPHY_FONT_FAMILY_FALLBACK = "\"Segoe UI\",Roboto,\"Helvetica Neue\",\"Open Sans\",sans-serif";
|
|
21
|
+
/**
|
|
22
|
+
* Concatenate the shared fallback stack for the supported design-system fonts.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getTypographyFontFamily(fontFamily: string): string;
|
|
17
25
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,6BAA6B,2BAA2B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,6BAA6B,2BAA2B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,kBAAkB,qCAG9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,+BAA+B,oEACiB,CAAC;AAE9D;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,UAKzD"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { getComponentClasses as
|
|
2
|
-
import { TypographySlots as
|
|
3
|
-
const s = "M4LTypography",
|
|
1
|
+
import { getComponentClasses as t } from "../../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { TypographySlots as r } from "./slots/typographyEnum.js";
|
|
3
|
+
const s = "M4LTypography", P = "M4lclassCssSpecificity", A = t(
|
|
4
|
+
s,
|
|
5
|
+
r
|
|
6
|
+
), e = {
|
|
4
7
|
Inter: "Inter",
|
|
5
8
|
Jura: "Jura"
|
|
6
|
-
};
|
|
9
|
+
}, n = '"Segoe UI",Roboto,"Helvetica Neue","Open Sans",sans-serif';
|
|
10
|
+
function S(o) {
|
|
11
|
+
return o === e.Inter || o === e.Jura ? `${o},${n}` : o;
|
|
12
|
+
}
|
|
7
13
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
A as TYPOGRAPHY_CLASSES,
|
|
15
|
+
P as TYPOGRAPHY_CLASS_NAME_SPECIFY,
|
|
16
|
+
e as TYPOGRAPHY_FONTS,
|
|
17
|
+
n as TYPOGRAPHY_FONT_FAMILY_FALLBACK,
|
|
18
|
+
s as TYPOGRAPHY_KEY_COMPONENT,
|
|
19
|
+
S as getTypographyFontFamily
|
|
12
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/typography.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typography.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/typography.styles.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAwB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAOtE,eAAO,MAAM,gBAAgB,EAAE,gBA8C9B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getPropertyByString as
|
|
1
|
+
import { getPropertyByString as o } from "@m4l/core";
|
|
2
2
|
import { getSizeStyles as e } from "../../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
|
-
import { getTypographyStyles as
|
|
4
|
-
|
|
3
|
+
import { getTypographyStyles as r } from "../../../utils/getTypographyStyles.js";
|
|
4
|
+
import { getTypographyFontFamily as s, TYPOGRAPHY_FONTS as t } from "./constants.js";
|
|
5
|
+
const d = {
|
|
5
6
|
/**
|
|
6
7
|
* Root slot styles for the Typography primitive.
|
|
7
8
|
*/
|
|
@@ -16,10 +17,16 @@ const p = {
|
|
|
16
17
|
...i?.disabled || i?.color === "text.disabled" ? {
|
|
17
18
|
color: l.vars.palette.text.disabled
|
|
18
19
|
} : {
|
|
19
|
-
color:
|
|
20
|
+
color: o(
|
|
21
|
+
l.vars.palette,
|
|
22
|
+
i?.color || "text.primary",
|
|
23
|
+
"text.primary"
|
|
24
|
+
)
|
|
20
25
|
},
|
|
21
|
-
fontFamily:
|
|
22
|
-
|
|
26
|
+
fontFamily: s(
|
|
27
|
+
i?.fontFamily ?? t.Inter
|
|
28
|
+
),
|
|
29
|
+
...r(
|
|
23
30
|
l.generalSettings.isMobile,
|
|
24
31
|
i?.size || "medium",
|
|
25
32
|
i?.variant || "bodyStandard"
|
|
@@ -40,5 +47,5 @@ const p = {
|
|
|
40
47
|
})
|
|
41
48
|
};
|
|
42
49
|
export {
|
|
43
|
-
|
|
50
|
+
d as typographyStyles
|
|
44
51
|
};
|