@m4l/base 1.0.1-beta-feature-701-create-extended-library.0 → 1.0.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.
@@ -0,0 +1,42 @@
1
+ import { ComponentsOverrides, ComponentsVariants, Theme } from '@mui/material/styles';
2
+ import type { IconOwnerState, IconSlotsType } from '../components/Icon/types';
3
+ import type {
4
+ TooltipOwnerState,
5
+ TooltipSlotsType,
6
+ } from '../extended/mui/Tooltip/types';
7
+ import type {
8
+ TypographyOwnerState,
9
+ TypographySlotsType,
10
+ } from '../extended/mui/Typography/types';
11
+
12
+ declare module '@mui/material/styles' {
13
+ interface ComponentNameToClassKey {
14
+ M4LIcon: IconSlotsType;
15
+ M4LTooltip: TooltipSlotsType;
16
+ M4LTypography: TypographySlotsType;
17
+ }
18
+
19
+ interface ComponentsPropsList {
20
+ M4LIcon: Partial<IconOwnerState>;
21
+ M4LTooltip: Partial<TooltipOwnerState>;
22
+ M4LTypography: Partial<TypographyOwnerState>;
23
+ }
24
+
25
+ interface Components {
26
+ M4LIcon?: {
27
+ defaultProps?: ComponentsPropsList['M4LIcon'];
28
+ styleOverrides?: ComponentsOverrides<Theme>['M4LIcon'];
29
+ variants?: ComponentsVariants['M4LIcon'];
30
+ };
31
+ M4LTooltip?: {
32
+ defaultProps?: ComponentsPropsList['M4LTooltip'];
33
+ styleOverrides?: ComponentsOverrides<Theme>['M4LTooltip'];
34
+ variants?: ComponentsVariants['M4LTooltip'];
35
+ };
36
+ M4LTypography?: {
37
+ defaultProps?: ComponentsPropsList['M4LTypography'];
38
+ styleOverrides?: ComponentsOverrides<Theme>['M4LTypography'];
39
+ variants?: ComponentsVariants['M4LTypography'];
40
+ };
41
+ }
42
+ }
@@ -3,6 +3,5 @@ import { IconProps } from './types';
3
3
  * Render the base Icon primitive with URL-mask and SVG-component support.
4
4
  */
5
5
  declare const Icon: (props: IconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
- declare const BaseIcon: (props: IconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
- export { BaseIcon, Icon };
6
+ export { Icon };
8
7
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAkB,SAAS,EAA0C,MAAM,SAAS,CAAC;AAgC5F;;GAEG;AACH,QAAA,MAAM,IAAI,GAAI,OAAO,SAAS,qDAoH7B,CAAC;AAEF,QAAA,MAAM,QAAQ,UAtHO,SAAS,qDAsHT,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAkB,SAAS,EAA0C,MAAM,SAAS,CAAC;AAgC5F;;GAEG;AACH,QAAA,MAAM,IAAI,GAAI,OAAO,SAAS,qDAoH7B,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1,21 +1,21 @@
1
1
  import { jsxs as P, Fragment as j, jsx as n } from "@emotion/react/jsx-runtime";
2
2
  import m from "clsx";
3
3
  import { isValidElement as u, cloneElement as A } from "react";
4
- import { useModuleSkeleton as B } from "@m4l/core";
4
+ import { useModuleSkeleton as F } from "@m4l/core";
5
5
  import { getPropDataTestId as r } from "../../utils/getNameDataTestId.js";
6
- import { ICON_CLASSES as o, normalizeIconSize as F, ICON_PREFIX as a } from "./constants.js";
7
- import { TooltipStyled as L, RootStyled as k, IconSkeletonStyled as M, IconStyled as O } from "./slots/IconSlots.js";
8
- function _(t) {
6
+ import { ICON_CLASSES as o, normalizeIconSize as L, ICON_PREFIX as a } from "./constants.js";
7
+ import { TooltipStyled as M, RootStyled as k, IconSkeletonStyled as O, IconStyled as _ } from "./slots/IconSlots.js";
8
+ function B(t) {
9
9
  return "src" in t && typeof t.src == "string" || "icon" in t && typeof t.icon == "string";
10
10
  }
11
11
  function V(t) {
12
12
  return "src" in t && t.src !== void 0 && u(t.src) || "icon" in t && t.icon !== void 0 && u(t.icon);
13
13
  }
14
14
  function X(t) {
15
- if (_(t) || V(t))
15
+ if (B(t) || V(t))
16
16
  return "src" in t ? t.src : t.icon;
17
17
  }
18
- const $ = (t) => {
18
+ const W = (t) => {
19
19
  const {
20
20
  size: x = "medium",
21
21
  rotationAngle: s,
@@ -30,7 +30,7 @@ const $ = (t) => {
30
30
  enabledSelected: D,
31
31
  onClick: I,
32
32
  ariaLabel: g
33
- } = t, y = B(), i = R ?? w, e = X(t), d = F(x), E = e !== void 0 ? typeof e == "string" : void 0, h = g ? {
33
+ } = t, y = F(), i = R ?? w, e = X(t), d = L(x), E = e !== void 0 ? typeof e == "string" : void 0, h = g ? {
34
34
  role: "img",
35
35
  "aria-label": g
36
36
  } : {
@@ -53,7 +53,7 @@ const $ = (t) => {
53
53
  "aria-disabled": l,
54
54
  ...r(a, "root", i)
55
55
  }, b = () => e && typeof e == "string" ? /* @__PURE__ */ n(
56
- O,
56
+ _,
57
57
  {
58
58
  className: m(o.icon, o.root),
59
59
  ownerState: { ...c },
@@ -73,7 +73,7 @@ const $ = (t) => {
73
73
  }) : null;
74
74
  return /* @__PURE__ */ P(j, { children: [
75
75
  S ? /* @__PURE__ */ n(
76
- L,
76
+ M,
77
77
  {
78
78
  className: f || o.tooltip,
79
79
  title: S,
@@ -85,7 +85,7 @@ const $ = (t) => {
85
85
  }
86
86
  ) : /* @__PURE__ */ n(k, { ...z, children: b() }),
87
87
  y && /* @__PURE__ */ n(
88
- M,
88
+ O,
89
89
  {
90
90
  className: m(o.iconSkeleton, o.root),
91
91
  variant: "rectangular",
@@ -95,8 +95,7 @@ const $ = (t) => {
95
95
  }
96
96
  )
97
97
  ] });
98
- }, Y = $;
98
+ };
99
99
  export {
100
- Y as BaseIcon,
101
- $ as Icon
100
+ W as Icon
102
101
  };
@@ -1,4 +1,4 @@
1
- export { Icon, BaseIcon } from './Icon';
1
+ export { Icon } from './Icon';
2
2
  export { ICON_CLASSES, ICON_KEY_COMPONENT, ICON_PREFIX, } from './constants';
3
3
  export type { IconBaseProps, IconColorDeep, IconOwnerState, IconProps, IconResourceComponent, IconResourceSrc, IconSlotsType, IconStyles, } from './types';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,SAAS,EACT,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,UAAU,GACX,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,SAAS,EACT,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,UAAU,GACX,MAAM,SAAS,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { getTypographyStyles as i } from "../../../utils/getTypographyStyles.js";
2
- const s = {
2
+ const a = {
3
3
  /**
4
4
  * Root slot styles for the Tooltip primitive.
5
5
  */
@@ -12,7 +12,7 @@ const s = {
12
12
  ...i(
13
13
  o.generalSettings.isMobile,
14
14
  t?.size || "medium",
15
- "body"
15
+ "bodyStandard"
16
16
  )
17
17
  }),
18
18
  /**
@@ -61,5 +61,5 @@ const s = {
61
61
  })
62
62
  };
63
63
  export {
64
- s as tooltipStyles
64
+ a as tooltipStyles
65
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/Typography.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAwB,eAAe,EAAE,MAAM,SAAS,CAAC;AAMhE;;GAEG;AACH,eAAO,MAAM,UAAU,0HAmDrB,CAAC"}
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 +1 @@
1
- {"version":3,"file":"typographySlots.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/base/src/extended/mui/Typography/slots/typographySlots.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;UAIP,CAAC;AAE1B;;GAEG;AACH,eAAO,MAAM,cAAc;;UAIE,CAAC"}
1
+ {"version":3,"file":"typographySlots.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/base/src/extended/mui/Typography/slots/typographySlots.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAOrB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;UAIP,CAAC;AAE1B;;GAEG;AACH,eAAO,MAAM,cAAc;;UAIE,CAAC"}
@@ -1,18 +1,19 @@
1
+ import "@m4l/styles";
1
2
  import { Typography as l, Skeleton as m } from "@mui/material";
2
3
  import { styled as t } from "@mui/material/styles";
3
4
  import { TYPOGRAPHY_KEY_COMPONENT as r } from "../constants.js";
4
5
  import { TypographySlots as e } from "./typographyEnum.js";
5
6
  import { typographyStyles as p } from "../typography.styles.js";
6
- const d = t(l, {
7
+ const h = t(l, {
7
8
  name: r,
8
9
  slot: e.root,
9
10
  shouldForwardProp: (o) => o !== "ownerState"
10
- })(p.root), h = t(m, {
11
+ })(p.root), i = t(m, {
11
12
  name: r,
12
13
  slot: e.skeleton,
13
14
  shouldForwardProp: (o) => o !== "ownerState"
14
15
  })(p.skeleton);
15
16
  export {
16
- d as StyledMUITypography,
17
- h as StyledSkeleton
17
+ h as StyledMUITypography,
18
+ i as StyledSkeleton
18
19
  };
@@ -1,5 +1,5 @@
1
1
  import { TypographyProps as MUITypographyProps, Theme } from '@mui/material';
2
- import { Sizes, TypographyVariants } from '@m4l/styles';
2
+ import { Sizes, TypographyVariantProp } from '@m4l/styles';
3
3
  import { TypographySlots } from './slots/typographyEnum';
4
4
  import { TYPOGRAPHY_KEY_COMPONENT } from './constants';
5
5
  import { M4LOverridesStyleRules } from '../../../@types/augmentations';
@@ -22,7 +22,7 @@ export interface TypographyProps extends Omit<MUITypographyProps, 'color' | 'var
22
22
  /** Supported component sizes. */
23
23
  size?: Extract<Sizes, 'small' | 'medium'>;
24
24
  /** Typography variants available in the design system. */
25
- variant?: TypographyVariants;
25
+ variant?: TypographyVariantProp;
26
26
  /** Component content. */
27
27
  children?: React.ReactNode;
28
28
  /** Optional data-testid suffix. */
@@ -36,6 +36,12 @@ export interface TypographyProps extends Omit<MUITypographyProps, 'color' | 'var
36
36
  /** Font family override. */
37
37
  fontFamily?: TypographyFontsFamily;
38
38
  }
39
+ /**
40
+ * MUI variant prop shape seen by the wrapped primitive after theme/module augmentations.
41
+ * Some declaration-build paths do not fully preserve the augmentation at the JSX boundary, so
42
+ * the wrapper keeps this alias to cast only at the integration seam with MUI.
43
+ */
44
+ export type MUITypographyVariantProp = MUITypographyProps['variant'];
39
45
  /**
40
46
  * Owner state used by the styled slots.
41
47
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC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,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,qBAAqB,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAChC,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACtC,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,mBAAmB,EAAE,OAAO,wBAAwB,EAAE,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Typography/types.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,gBAAgB,GAAG,eAAe,GAAG,MAAM,CAAC;AAE5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CAAC,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACtC,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,mBAAmB,EAAE,OAAO,wBAAwB,EAAE,KAAK,CAAC,CAAC"}
@@ -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,gBAyC9B,CAAC"}
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,16 +1,13 @@
1
1
  import { getPropertyByString as s } from "@m4l/core";
2
- import { getSizeStyles as o } from "../../../utils/getSizeStyles/getSizeStyles.js";
3
- import { getTypographyStyles as e } from "../../../utils/getTypographyStyles.js";
4
- const y = {
2
+ import { getSizeStyles as e } from "../../../utils/getSizeStyles/getSizeStyles.js";
3
+ import { getTypographyStyles as o } from "../../../utils/getTypographyStyles.js";
4
+ const p = {
5
5
  /**
6
6
  * Root slot styles for the Typography primitive.
7
7
  */
8
8
  root: ({ ownerState: i, theme: l }) => ({
9
9
  margin: 0,
10
10
  cursor: "default",
11
- ...i?.fontFamily && i.fontFamily !== "Inter" && {
12
- fontFamily: i.fontFamily
13
- },
14
11
  "&.M4lclassCssSpecificity": {
15
12
  ...i?.skeletonRows && i.skeletonRows > 1 && {
16
13
  display: "flex",
@@ -21,10 +18,11 @@ const y = {
21
18
  } : {
22
19
  color: s(l.vars.palette, i?.color || "text.primary", "text.primary")
23
20
  },
24
- ...e(
21
+ fontFamily: i?.fontFamily ?? "Inter",
22
+ ...o(
25
23
  l.generalSettings.isMobile,
26
24
  i?.size || "medium",
27
- i?.variant || "body"
25
+ i?.variant || "bodyStandard"
28
26
  ),
29
27
  ...i?.ellipsis && {
30
28
  overflow: "hidden",
@@ -38,9 +36,9 @@ const y = {
38
36
  * Skeleton slot styles for the Typography primitive.
39
37
  */
40
38
  skeleton: ({ theme: i, ownerState: l }) => ({
41
- ...o(i, l?.size || "medium", "base")
39
+ ...e(i, l?.size || "medium", "base")
42
40
  })
43
41
  };
44
42
  export {
45
- y as typographyStyles
43
+ p as typographyStyles
46
44
  };
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './extended';
3
+ export * from './@types/types.d';
3
4
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/base/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/base/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
package/index.js CHANGED
@@ -1,22 +1,21 @@
1
- import { BaseIcon as o, Icon as P } from "./components/Icon/Icon.js";
2
- import { ICON_CLASSES as E, ICON_KEY_COMPONENT as S, ICON_PREFIX as r } from "./components/Icon/constants.js";
3
- import { Tooltip as C } from "./extended/mui/Tooltip/Tooltip.js";
4
- import { DEFAULT_TOOLTIP_OFFSET as A, TOOLTIP_CLASSES as I, TOOLTIP_KEY_COMPONENT as p } from "./extended/mui/Tooltip/constants.js";
5
- import { Typography as e } from "./extended/mui/Typography/Typography.js";
6
- import { TYPOGRAPHY_CLASSES as f, TYPOGRAPHY_CLASS_NAME_SPECIFY as m, TYPOGRAPHY_FONTS as x, TYPOGRAPHY_KEY_COMPONENT as F } from "./extended/mui/Typography/constants.js";
1
+ import { Icon as o } from "./components/Icon/Icon.js";
2
+ import { ICON_CLASSES as _, ICON_KEY_COMPONENT as E, ICON_PREFIX as S } from "./components/Icon/constants.js";
3
+ import { Tooltip as Y } from "./extended/mui/Tooltip/Tooltip.js";
4
+ import { DEFAULT_TOOLTIP_OFFSET as N, TOOLTIP_CLASSES as A, TOOLTIP_KEY_COMPONENT as p } from "./extended/mui/Tooltip/constants.js";
5
+ import { Typography as L } from "./extended/mui/Typography/Typography.js";
6
+ import { TYPOGRAPHY_CLASSES as e, TYPOGRAPHY_CLASS_NAME_SPECIFY as f, TYPOGRAPHY_FONTS as m, TYPOGRAPHY_KEY_COMPONENT as x } from "./extended/mui/Typography/constants.js";
7
7
  export {
8
- o as BaseIcon,
9
- A as DEFAULT_TOOLTIP_OFFSET,
10
- E as ICON_CLASSES,
11
- S as ICON_KEY_COMPONENT,
12
- r as ICON_PREFIX,
13
- P as Icon,
14
- I as TOOLTIP_CLASSES,
8
+ N as DEFAULT_TOOLTIP_OFFSET,
9
+ _ as ICON_CLASSES,
10
+ E as ICON_KEY_COMPONENT,
11
+ S as ICON_PREFIX,
12
+ o as Icon,
13
+ A as TOOLTIP_CLASSES,
15
14
  p as TOOLTIP_KEY_COMPONENT,
16
- f as TYPOGRAPHY_CLASSES,
17
- m as TYPOGRAPHY_CLASS_NAME_SPECIFY,
18
- x as TYPOGRAPHY_FONTS,
19
- F as TYPOGRAPHY_KEY_COMPONENT,
20
- C as Tooltip,
21
- e as Typography
15
+ e as TYPOGRAPHY_CLASSES,
16
+ f as TYPOGRAPHY_CLASS_NAME_SPECIFY,
17
+ m as TYPOGRAPHY_FONTS,
18
+ x as TYPOGRAPHY_KEY_COMPONENT,
19
+ Y as Tooltip,
20
+ L as Typography
22
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/base",
3
- "version": "1.0.1-beta-feature-701-create-extended-library.0",
3
+ "version": "1.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,8 +32,8 @@
32
32
  "@m4l/core": "^2.0.33",
33
33
  "@m4l/styles": "^7.1.48",
34
34
  "@emotion/react": "11.14.0",
35
- "clsx": "^2.1.1",
36
- "react": "^19.0.0",
35
+ "clsx": "2.1.1",
36
+ "react": "19.2.4",
37
37
  "@mui/material": "5.16.7"
38
38
  }
39
39
  }
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Build the canonical root slot class name for a component.
2
+ * Build the canonical root slot class name for a component
3
3
  */
4
4
  export declare function getComponentSlotRoot(componentKey: string): string;
5
5
  type ComponentSlots = Record<string, string> | readonly string[];
6
6
  /**
7
- * Build the class-name inventory for all component slots.
7
+ * Build the class-name inventory for all component slots
8
8
  */
9
9
  export declare const getComponentClasses: <T extends ComponentSlots>(componentName: string, slotList: T) => T extends readonly string[] ? Record<T[number], string> : Record<keyof T, string>;
10
10
  export {};
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Build the stable test id string for a component slot.
2
+ * Build the stable test id string for a component slot
3
3
  */
4
4
  export declare const getNameDataTestId: (componentName: string, slotKey: string, instanceId?: string) => string;
5
5
  /**
6
- * Return a data-testid prop outside production builds.
6
+ * Return a data-testid prop outside production builds
7
7
  */
8
8
  export declare function getPropDataTestId(componentName: string, slotKey: string, instanceId?: string): {
9
9
  'data-testid': string;
@@ -1,6 +1,9 @@
1
- import { FontProperties, Sizes, TypographyVariants } from '@m4l/styles';
1
+ import { FontProperties, Sizes, TypographyVariantProp } from '@m4l/styles';
2
2
  /**
3
- * Resolve the design-system typography styles for a size and variant.
3
+ * Returns typography token styles for use in component CSS.
4
+ * @param variant - Typography variant to apply (design-system or legacy name; unknown keys fall back to `bodyStandard`).
5
+ * @param isMobile - From `theme.generalSettings.isMobile`.
6
+ * @param size - `small` or `medium` from the component or `AppearanceComponentProvider`.
4
7
  */
5
- export declare const getTypographyStyles: (isMobile: boolean, size: Extract<Sizes, "small" | "medium">, variant: TypographyVariants) => FontProperties;
8
+ export declare const getTypographyStyles: (isMobile: boolean, size: Extract<Sizes, "small" | "medium">, variant: TypographyVariantProp) => FontProperties;
6
9
  //# sourceMappingURL=getTypographyStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getTypographyStyles.d.ts","sourceRoot":"","sources":["../../../../../packages/base/src/utils/getTypographyStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAqD,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE3H;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,OAAO,EACjB,MAAM,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,EACxC,SAAS,kBAAkB,KAC1B,cAIF,CAAC"}
1
+ {"version":3,"file":"getTypographyStyles.d.ts","sourceRoot":"","sources":["../../../../../packages/base/src/utils/getTypographyStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,KAAK,EAGL,qBAAqB,EAEtB,MAAM,aAAa,CAAC;AAsBrB;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,OAAO,EACjB,MAAM,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,EACxC,SAAS,qBAAqB,KAC7B,cAUF,CAAC"}
@@ -1,5 +1,14 @@
1
- import { TYPOGRAPHY_SIZES_MOBILE as p, TYPOGRAPHY_SIZES_DESKTOP as S } from "@m4l/styles";
2
- const P = (o, r, t) => (o ? p : S)[r][t];
1
+ import { TYPOGRAPHY_SIZES_MOBILE as d, TYPOGRAPHY_SIZES_DESKTOP as e } from "@m4l/styles";
2
+ const S = "bodyStandard", o = {
3
+ subtitle: "subtitleStandard",
4
+ paragraph: "paragraphStandard",
5
+ body: "bodyStandard",
6
+ action: "bodyStandard",
7
+ caption: "captionStandard"
8
+ }, y = (t) => Object.prototype.hasOwnProperty.call(o, t) ? o[t] : t, i = (t, n, p) => {
9
+ const r = (t ? d : e)[n], a = y(p);
10
+ return a in r ? r[a] : r[S];
11
+ };
3
12
  export {
4
- P as getTypographyStyles
13
+ i as getTypographyStyles
5
14
  };