@m4l/base 1.0.1 → 1.0.2-beta-hotfix-isolation-fonts.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.
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/Typography.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAkD,eAAe,EAAE,MAAM,SAAS,CAAC;AAM1F;;GAEG;AACH,eAAO,MAAM,UAAU,0HAsDrB,CAAC"}
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 k } from "react";
4
- import { useModuleSkeleton as A } from "@m4l/core";
5
- import { TYPOGRAPHY_CLASSES as m, TYPOGRAPHY_KEY_COMPONENT as _, TYPOGRAPHY_CLASS_NAME_SPECIFY as g } from "./constants.js";
6
- import { TypographySlots as w } from "./slots/typographyEnum.js";
7
- import { StyledMUITypography as N, StyledSkeleton as u } from "./slots/typographySlots.js";
8
- import { getPropDataTestId as E } from "../../../utils/getNameDataTestId.js";
9
- const F = k(function(l, i) {
10
- const {
11
- skeletonWidth: n = "100%",
12
- skeletonRows: o = 1,
13
- variant: t = "body",
14
- color: p = "text.primary",
15
- size: S = "medium",
16
- className: d,
17
- dataTestid: f,
18
- children: y,
19
- disabled: c,
20
- ellipsis: h = !1,
21
- fontFamily: T = "Inter",
22
- ...P
23
- } = l, e = A(), r = {
24
- disabled: c,
25
- color: p,
26
- size: S,
27
- skeletonRows: o,
28
- variant: t,
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
- ownerState: { ...r },
40
- ...E(_, w.root, f),
41
- ...P,
42
- children: e ? Array.from({ length: o }).map((R, a) => /* @__PURE__ */ s(
43
- u,
44
- {
45
- width: a === o - 1 ? n : "100%",
46
- variant: "text",
47
- ownerState: { ...r },
48
- className: m.skeleton
49
- },
50
- a
51
- )) : y
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
- F as Typography
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,qCAAiE,CAAC;AAEjG,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC"}
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 o } from "../../../utils/getComponentSlotRoot.js";
2
- import { TypographySlots as t } from "./slots/typographyEnum.js";
3
- const s = "M4LTypography", Y = "M4lclassCssSpecificity", p = o(s, t), S = {
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
- p as TYPOGRAPHY_CLASSES,
9
- Y as TYPOGRAPHY_CLASS_NAME_SPECIFY,
10
- S as TYPOGRAPHY_FONTS,
11
- s as TYPOGRAPHY_KEY_COMPONENT
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":"AAIA,OAAO,KAAK,EAAwB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAOtE,eAAO,MAAM,gBAAgB,EAAE,gBAuC9B,CAAC"}
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 s } from "@m4l/core";
1
+ import { getPropertyByString as o } from "@m4l/core";
2
2
  import { getSizeStyles as e } from "../../../utils/getSizeStyles/getSizeStyles.js";
3
- import { getTypographyStyles as o } from "../../../utils/getTypographyStyles.js";
4
- const p = {
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: s(l.vars.palette, i?.color || "text.primary", "text.primary")
20
+ color: o(
21
+ l.vars.palette,
22
+ i?.color || "text.primary",
23
+ "text.primary"
24
+ )
20
25
  },
21
- fontFamily: i?.fontFamily ?? "Inter",
22
- ...o(
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
- p as typographyStyles
50
+ d as typographyStyles
44
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/base",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-beta-hotfix-isolation-fonts.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },