@m4l/base 1.1.1-beta-improvement-733-m4l-components-autocomplete-menu-size.2 → 1.2.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.
Files changed (39) hide show
  1. package/@types/types.d.ts +11 -7
  2. package/extended/mui/ButtonBase/ButtonBase.d.ts +6 -0
  3. package/extended/mui/ButtonBase/ButtonBase.d.ts.map +1 -0
  4. package/extended/mui/ButtonBase/ButtonBase.js +38 -0
  5. package/extended/mui/ButtonBase/ButtonBase.styles.d.ts +3 -0
  6. package/extended/mui/ButtonBase/ButtonBase.styles.d.ts.map +1 -0
  7. package/extended/mui/ButtonBase/ButtonBase.styles.js +11 -0
  8. package/extended/mui/ButtonBase/constants.d.ts +2 -0
  9. package/extended/mui/ButtonBase/constants.d.ts.map +1 -0
  10. package/extended/mui/ButtonBase/constants.js +4 -0
  11. package/extended/mui/ButtonBase/index.d.ts +6 -0
  12. package/extended/mui/ButtonBase/index.d.ts.map +1 -0
  13. package/extended/mui/ButtonBase/slots/ButtonBaseEnum.d.ts +5 -0
  14. package/extended/mui/ButtonBase/slots/ButtonBaseEnum.d.ts.map +1 -0
  15. package/extended/mui/ButtonBase/slots/ButtonBaseEnum.js +4 -0
  16. package/extended/mui/ButtonBase/slots/ButtonBaseSlots.d.ts +7 -0
  17. package/extended/mui/ButtonBase/slots/ButtonBaseSlots.d.ts.map +1 -0
  18. package/extended/mui/ButtonBase/slots/ButtonBaseSlots.js +19 -0
  19. package/extended/mui/ButtonBase/slots/index.d.ts +3 -0
  20. package/extended/mui/ButtonBase/slots/index.d.ts.map +1 -0
  21. package/extended/mui/ButtonBase/types.d.ts +20 -0
  22. package/extended/mui/ButtonBase/types.d.ts.map +1 -0
  23. package/extended/mui/Tooltip/Tooltip.d.ts.map +1 -1
  24. package/extended/mui/Tooltip/Tooltip.js +14 -18
  25. package/extended/mui/Tooltip/Tooltip.styles.d.ts +1 -5
  26. package/extended/mui/Tooltip/Tooltip.styles.d.ts.map +1 -1
  27. package/extended/mui/Tooltip/Tooltip.styles.js +17 -30
  28. package/extended/mui/Tooltip/constants.d.ts +0 -4
  29. package/extended/mui/Tooltip/constants.d.ts.map +1 -1
  30. package/extended/mui/Tooltip/constants.js +5 -6
  31. package/extended/mui/Tooltip/slots/TooltipSlots.d.ts +1 -1
  32. package/extended/mui/Tooltip/slots/TooltipSlots.d.ts.map +1 -1
  33. package/extended/mui/Tooltip/slots/TooltipSlots.js +11 -12
  34. package/extended/mui/Tooltip/types.d.ts +1 -4
  35. package/extended/mui/Tooltip/types.d.ts.map +1 -1
  36. package/extended/mui/index.d.ts +1 -0
  37. package/extended/mui/index.d.ts.map +1 -1
  38. package/index.js +30 -19
  39. package/package.json +2 -2
package/@types/types.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { ComponentsOverrides, ComponentsVariants, Theme } from '@mui/material/styles';
2
2
  import type { IconOwnerState, IconSlotsType } from '../components/Icon/types';
3
3
  import type {
4
- TooltipProps,
4
+ ButtonBaseOwnerState,
5
+ ButtonBaseSlotsType,
6
+ } from '../extended/mui/ButtonBase/types';
7
+ import type {
5
8
  TooltipOwnerState,
6
9
  TooltipSlotsType,
7
10
  } from '../extended/mui/Tooltip/types';
@@ -12,18 +15,25 @@ import type {
12
15
 
13
16
  declare module '@mui/material/styles' {
14
17
  interface ComponentNameToClassKey {
18
+ M4LButtonBase: ButtonBaseSlotsType;
15
19
  M4LIcon: IconSlotsType;
16
20
  M4LTooltip: TooltipSlotsType;
17
21
  M4LTypography: TypographySlotsType;
18
22
  }
19
23
 
20
24
  interface ComponentsPropsList {
25
+ M4LButtonBase: Partial<ButtonBaseOwnerState>;
21
26
  M4LIcon: Partial<IconOwnerState>;
22
27
  M4LTooltip: Partial<TooltipOwnerState>;
23
28
  M4LTypography: Partial<TypographyOwnerState>;
24
29
  }
25
30
 
26
31
  interface Components {
32
+ M4LButtonBase?: {
33
+ defaultProps?: ComponentsPropsList['M4LButtonBase'];
34
+ styleOverrides?: ComponentsOverrides<Theme>['M4LButtonBase'];
35
+ variants?: ComponentsVariants['M4LButtonBase'];
36
+ };
27
37
  M4LIcon?: {
28
38
  defaultProps?: ComponentsPropsList['M4LIcon'];
29
39
  styleOverrides?: ComponentsOverrides<Theme>['M4LIcon'];
@@ -41,9 +51,3 @@ declare module '@mui/material/styles' {
41
51
  };
42
52
  }
43
53
  }
44
-
45
- declare module '@mui/material/Tooltip' {
46
- interface TooltipComponentsPropsOverrides {
47
- maxWidth?: TooltipProps['maxWidth'];
48
- }
49
- }
@@ -0,0 +1,6 @@
1
+ import { ButtonBaseProps } from './types';
2
+ /**
3
+ * Render a ButtonBase that can swap its content for a skeleton placeholder.
4
+ */
5
+ export declare const ButtonBase: import('react').ForwardRefExoticComponent<Omit<ButtonBaseProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
6
+ //# sourceMappingURL=ButtonBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,UAAU,4HAkCtB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as o } from "@emotion/react/jsx-runtime";
2
+ import { forwardRef as f } from "react";
3
+ import { RootStyled as u, SkeletonStyled as c } from "./slots/ButtonBaseSlots.js";
4
+ const B = f(
5
+ function(n, r) {
6
+ const {
7
+ children: d,
8
+ disabled: i,
9
+ ownerState: e,
10
+ skeletonHeight: l = "100%",
11
+ skeletonVariant: s = "rounded",
12
+ skeletonWidth: a = "100%",
13
+ ...h
14
+ } = n, t = e?.isSkeleton ?? !1;
15
+ return /* @__PURE__ */ o(
16
+ u,
17
+ {
18
+ ref: r,
19
+ disabled: t || i,
20
+ ownerState: e,
21
+ ...h,
22
+ children: t ? /* @__PURE__ */ o(
23
+ c,
24
+ {
25
+ "aria-hidden": "true",
26
+ ownerState: e,
27
+ height: l,
28
+ variant: s,
29
+ width: a
30
+ }
31
+ ) : d
32
+ }
33
+ );
34
+ }
35
+ );
36
+ export {
37
+ B as ButtonBase
38
+ };
@@ -0,0 +1,3 @@
1
+ import { ButtonBaseStyles } from './types';
2
+ export declare const buttonBaseStyles: ButtonBaseStyles;
3
+ //# sourceMappingURL=ButtonBase.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonBase.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/ButtonBase/ButtonBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,gBAAgB,EAAE,gBAO9B,CAAC"}
@@ -0,0 +1,11 @@
1
+ const t = {
2
+ root: () => ({
3
+ minWidth: 0
4
+ }),
5
+ skeleton: () => ({
6
+ flexShrink: 0
7
+ })
8
+ };
9
+ export {
10
+ t as buttonBaseStyles
11
+ };
@@ -0,0 +1,2 @@
1
+ export declare const BUTTON_BASE_KEY_COMPONENT = "M4LButtonBase";
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/ButtonBase/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ const t = "M4LButtonBase";
2
+ export {
3
+ t as BUTTON_BASE_KEY_COMPONENT
4
+ };
@@ -0,0 +1,6 @@
1
+ export { ButtonBase } from './ButtonBase';
2
+ export { buttonBaseStyles } from './ButtonBase.styles';
3
+ export { BUTTON_BASE_KEY_COMPONENT } from './constants';
4
+ export * from './slots';
5
+ export type { ButtonBaseOwnerState, ButtonBaseProps, ButtonBaseSlotsType, ButtonBaseStyles, } from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/ButtonBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,cAAc,SAAS,CAAC;AACxB,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare enum ButtonBaseSlots {
2
+ root = "root",
3
+ skeleton = "skeleton"
4
+ }
5
+ //# sourceMappingURL=ButtonBaseEnum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonBaseEnum.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/base/src/extended/mui/ButtonBase/slots/ButtonBaseEnum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,4 @@
1
+ var e = /* @__PURE__ */ ((r) => (r.root = "root", r.skeleton = "skeleton", r))(e || {});
2
+ export {
3
+ e as ButtonBaseSlots
4
+ };
@@ -0,0 +1,7 @@
1
+ export declare const RootStyled: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonBaseOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "action" | "sx" | "classes" | "className" | "style" | "tabIndex" | "children" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
2
+ ownerState?: (Partial<import('..').ButtonBaseOwnerState> & Record<string, unknown>) | undefined;
3
+ }, {}, {}>;
4
+ export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "sx" | "classes" | "className" | "style" | "children" | "height" | "width" | "animation" | "variant"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
5
+ ownerState?: (Partial<import('..').ButtonBaseOwnerState> & Record<string, unknown>) | undefined;
6
+ }, {}, {}>;
7
+ //# sourceMappingURL=ButtonBaseSlots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonBaseSlots.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/base/src/extended/mui/ButtonBase/slots/ButtonBaseSlots.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU;;UAIE,CAAC;AAE1B,eAAO,MAAM,cAAc;;UAIE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import s from "@mui/material/ButtonBase";
2
+ import l from "@mui/material/Skeleton";
3
+ import { styled as t } from "@mui/material/styles";
4
+ import { buttonBaseStyles as r } from "../ButtonBase.styles.js";
5
+ import { BUTTON_BASE_KEY_COMPONENT as e } from "../constants.js";
6
+ import { ButtonBaseSlots as m } from "./ButtonBaseEnum.js";
7
+ const f = t(s, {
8
+ name: e,
9
+ slot: m.root,
10
+ shouldForwardProp: (o) => o !== "ownerState"
11
+ })(r.root), i = t(l, {
12
+ name: e,
13
+ slot: m.skeleton,
14
+ shouldForwardProp: (o) => o !== "ownerState"
15
+ })(r.skeleton);
16
+ export {
17
+ f as RootStyled,
18
+ i as SkeletonStyled
19
+ };
@@ -0,0 +1,3 @@
1
+ export * from './ButtonBaseEnum';
2
+ export * from './ButtonBaseSlots';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/base/src/extended/mui/ButtonBase/slots/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ButtonBaseProps as MUIButtonBaseProps } from '@mui/material/ButtonBase';
2
+ import { SkeletonProps as MUISkeletonProps } from '@mui/material/Skeleton';
3
+ import { Theme } from '@mui/material/styles';
4
+ import { ReactNode } from 'react';
5
+ import { M4LOverridesStyleRules } from '../../../@types/augmentations';
6
+ import { BUTTON_BASE_KEY_COMPONENT } from './constants';
7
+ import { ButtonBaseSlots } from './slots/ButtonBaseEnum';
8
+ export interface ButtonBaseOwnerState extends Record<string, unknown> {
9
+ isSkeleton?: boolean;
10
+ }
11
+ export interface ButtonBaseProps extends Omit<MUIButtonBaseProps, 'children'> {
12
+ children?: ReactNode;
13
+ ownerState?: ButtonBaseOwnerState;
14
+ skeletonHeight?: number | string;
15
+ skeletonVariant?: MUISkeletonProps['variant'];
16
+ skeletonWidth?: number | string;
17
+ }
18
+ export type ButtonBaseSlotsType = keyof typeof ButtonBaseSlots;
19
+ export type ButtonBaseStyles = M4LOverridesStyleRules<ButtonBaseSlotsType, typeof BUTTON_BASE_KEY_COMPONENT, Theme>;
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/ButtonBase/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,oBAAqB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IAC5C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CACnD,mBAAmB,EACnB,OAAO,yBAAyB,EAChC,KAAK,CACN,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,qDAkC1C,CAAC"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,qDA6B1C,CAAC"}
@@ -1,37 +1,33 @@
1
1
  import { jsx as s } from "@emotion/react/jsx-runtime";
2
- import f from "clsx";
3
- import { DEFAULT_TOOLTIP_OFFSET as S, TOOLTIP_CLASSES as r } from "./constants.js";
4
- import { resolveTooltipMaxWidth as x } from "./Tooltip.styles.js";
5
- import { RootStyled as T, TooltipStyled as h, TextStyled as O } from "./slots/TooltipSlots.js";
6
- const z = (m) => {
7
- const { size: t = "medium", children: l, title: o, className: p, offset: a = S, maxWidth: d, ...n } = m, c = t === "small" || t === "medium" ? t : "medium", e = x(d), i = { size: c, maxWidth: e };
2
+ import d from "clsx";
3
+ import { DEFAULT_TOOLTIP_OFFSET as n, TOOLTIP_CLASSES as i } from "./constants.js";
4
+ import { RootStyled as f, TooltipStyled as S, TextStyled as c } from "./slots/TooltipSlots.js";
5
+ const y = (r) => {
6
+ const { size: t = "medium", children: m, title: o, className: l, offset: p = n, ...a } = r, e = t === "small" || t === "medium" ? t : "medium";
8
7
  return /* @__PURE__ */ s(
9
- T,
8
+ f,
10
9
  {
11
- className: f(r.root, p),
12
- ownerState: i,
13
- title: typeof o == "string" ? /* @__PURE__ */ s(O, { className: r.text, ownerState: i, children: o }) : o,
10
+ className: d(i.root, l),
11
+ ownerState: { size: e },
12
+ title: typeof o == "string" ? /* @__PURE__ */ s(c, { className: i.text, ownerState: { size: e }, children: o }) : o,
14
13
  slotProps: {
15
- tooltip: {
16
- maxWidth: e
17
- },
18
14
  popper: {
19
15
  modifiers: [
20
16
  {
21
17
  name: "offset",
22
18
  options: {
23
- offset: a
19
+ offset: p
24
20
  }
25
21
  }
26
22
  ]
27
23
  }
28
24
  },
29
- ...n,
30
- slots: { tooltip: h },
31
- children: l
25
+ ...a,
26
+ slots: { tooltip: S },
27
+ children: m
32
28
  }
33
29
  );
34
30
  };
35
31
  export {
36
- z as Tooltip
32
+ y as Tooltip
37
33
  };
@@ -1,7 +1,3 @@
1
- import { TooltipProps, TooltipStyles } from './types';
2
- /**
3
- * Normalize tooltip maxWidth values so plain numeric inputs become valid CSS lengths.
4
- */
5
- export declare function resolveTooltipMaxWidth(maxWidth?: TooltipProps['maxWidth']): string | 300;
1
+ import { TooltipStyles } from './types';
6
2
  export declare const tooltipStyles: TooltipStyles;
7
3
  //# sourceMappingURL=Tooltip.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Tooltip/Tooltip.styles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAqB,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE9E;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,gBAoBzE;AAED,eAAO,MAAM,aAAa,EAAE,aA+D3B,CAAC"}
1
+ {"version":3,"file":"Tooltip.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Tooltip/Tooltip.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,aAAa,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,aAAa,EAAE,aA4D3B,CAAC"}
@@ -1,15 +1,5 @@
1
- import { DEFAULT_TOOLTIP_MAX_WIDTH as r } from "./constants.js";
2
1
  import { getTypographyStyles as i } from "../../../utils/getTypographyStyles.js";
3
- function s(t) {
4
- if (typeof t == "number")
5
- return `${t}px`;
6
- if (typeof t == "string") {
7
- const o = t.trim();
8
- return o === "" ? r : /^\d+(\.\d+)?$/.test(o) ? `${o}px` : o;
9
- }
10
- return r;
11
- }
12
- const n = {
2
+ const a = {
13
3
  /**
14
4
  * Root slot styles for the Tooltip primitive.
15
5
  */
@@ -17,26 +7,24 @@ const n = {
17
7
  /**
18
8
  * Text slot styles for string tooltip content.
19
9
  */
20
- text: ({ theme: t, ownerState: o }) => ({
21
- color: t.vars.palette.text.contrastText,
10
+ text: ({ theme: o, ownerState: t }) => ({
11
+ color: o.vars.palette.text.contrastText,
22
12
  ...i(
23
- t.generalSettings.isMobile,
24
- o?.size || "medium",
13
+ o.generalSettings.isMobile,
14
+ t?.size || "medium",
25
15
  "bodyStandard"
26
16
  )
27
17
  }),
28
18
  /**
29
19
  * Tooltip bubble slot styles.
30
20
  */
31
- tooltip: ({ theme: t, maxWidth: o }) => ({
32
- background: t.vars.palette.background.contrastDefault,
33
- padding: t.vars.size.baseSpacings.sp2,
34
- borderRadius: t.vars.size.borderRadius["r1-5"],
35
- boxShadow: t.vars.customShadows.z3,
36
- maxWidth: s(o),
37
- wordWrap: "break-word",
38
- minWidth: t.vars.size.baseSpacings.sp6,
39
- minHeight: t.vars.size.baseSpacings.sp3,
21
+ tooltip: ({ theme: o }) => ({
22
+ background: o.vars.palette.background.contrastDefault,
23
+ padding: o.vars.size.baseSpacings.sp2,
24
+ borderRadius: o.vars.size.borderRadius.r1,
25
+ boxShadow: o.vars.customShadows.z3,
26
+ minWidth: o.vars.size.baseSpacings.sp6,
27
+ minHeight: o.vars.size.baseSpacings.sp3,
40
28
  "&.MuiTooltip-tooltipPlacementRight .MuiTooltip-arrow": {
41
29
  left: "-6px"
42
30
  },
@@ -61,10 +49,10 @@ const n = {
61
49
  margin: "unset",
62
50
  "&::before": {
63
51
  transformOrigin: "unset",
64
- backgroundColor: t.vars.palette.background.contrastDefault,
65
- borderRadius: t.vars.size.borderRadius.r1,
66
- width: t.vars.size.baseSpacings.sp3,
67
- height: t.vars.size.baseSpacings.sp3,
52
+ backgroundColor: o.vars.palette.background.contrastDefault,
53
+ borderRadius: o.vars.size.borderRadius.r1,
54
+ width: o.vars.size.baseSpacings.sp3,
55
+ height: o.vars.size.baseSpacings.sp3,
68
56
  border: "unset",
69
57
  margin: "unset",
70
58
  transform: "rotate(45deg)"
@@ -73,6 +61,5 @@ const n = {
73
61
  })
74
62
  };
75
63
  export {
76
- s as resolveTooltipMaxWidth,
77
- n as tooltipStyles
64
+ a as tooltipStyles
78
65
  };
@@ -10,8 +10,4 @@ export declare const TOOLTIP_CLASSES: Record<"root" | "tooltip" | "text", string
10
10
  * Default tooltip offset in pixels.
11
11
  */
12
12
  export declare const DEFAULT_TOOLTIP_OFFSET: [number, number];
13
- /**
14
- * Default readable width used by the owned tooltip bubble.
15
- */
16
- export declare const DEFAULT_TOOLTIP_MAX_WIDTH = 300;
17
13
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Tooltip/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,eAAe,6CAA2D,CAAC;AAExF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/base/src/extended/mui/Tooltip/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,eAAe,6CAA2D,CAAC;AAExF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import { getComponentClasses as o } from "../../../utils/getComponentSlotRoot.js";
2
- import { TooltipSlots as T } from "./slots/TooltipEnum.js";
3
- const t = "M4LTooltip", L = o(t, T), _ = [0, 10], n = 300;
2
+ import { TooltipSlots as t } from "./slots/TooltipEnum.js";
3
+ const T = "M4LTooltip", p = o(T, t), L = [0, 10];
4
4
  export {
5
- n as DEFAULT_TOOLTIP_MAX_WIDTH,
6
- _ as DEFAULT_TOOLTIP_OFFSET,
7
- L as TOOLTIP_CLASSES,
8
- t as TOOLTIP_KEY_COMPONENT
5
+ L as DEFAULT_TOOLTIP_OFFSET,
6
+ p as TOOLTIP_CLASSES,
7
+ T as TOOLTIP_KEY_COMPONENT
9
8
  };
@@ -6,5 +6,5 @@ export declare const TextStyled: import('@emotion/styled').StyledComponent<impor
6
6
  }, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
7
  export declare const TooltipStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
8
8
  ownerState?: (Partial<import('..').TooltipOwnerState> & Record<string, unknown>) | undefined;
9
- }, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
10
10
  //# sourceMappingURL=TooltipSlots.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipSlots.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/base/src/extended/mui/Tooltip/slots/TooltipSlots.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;UAID,CAAC;AAEvB,eAAO,MAAM,UAAU;;yGAID,CAAC;AAEvB,eAAO,MAAM,aAAa;;yGAID,CAAC"}
1
+ {"version":3,"file":"TooltipSlots.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/base/src/extended/mui/Tooltip/slots/TooltipSlots.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;UAID,CAAC;AAEvB,eAAO,MAAM,UAAU;;yGAID,CAAC;AAEvB,eAAO,MAAM,aAAa;;6NAGD,CAAC"}
@@ -1,23 +1,22 @@
1
- import { Tooltip as i } from "@mui/material";
1
+ import { Tooltip as p } from "@mui/material";
2
2
  import { styled as t } from "@mui/material/styles";
3
3
  import { tooltipStyles as r } from "../Tooltip.styles.js";
4
- import { TOOLTIP_KEY_COMPONENT as e } from "../constants.js";
5
- import { TooltipSlots as l } from "./TooltipEnum.js";
6
- const n = t(i, {
7
- name: e,
8
- slot: l.root,
4
+ import { TOOLTIP_KEY_COMPONENT as l } from "../constants.js";
5
+ import { TooltipSlots as e } from "./TooltipEnum.js";
6
+ const a = t(p, {
7
+ name: l,
8
+ slot: e.root,
9
9
  shouldForwardProp: (o) => o !== "ownerState"
10
10
  })(r.root), S = t("div", {
11
- name: e,
12
- slot: l.text,
11
+ name: l,
12
+ slot: e.text,
13
13
  shouldForwardProp: (o) => o !== "ownerState"
14
14
  })(r.text), T = t("div", {
15
- name: e,
16
- slot: l.tooltip,
17
- shouldForwardProp: (o) => o !== "ownerState" && o !== "maxWidth"
15
+ name: l,
16
+ slot: e.tooltip
18
17
  })(r.tooltip);
19
18
  export {
20
- n as RootStyled,
19
+ a as RootStyled,
21
20
  S as TextStyled,
22
21
  T as TooltipStyled
23
22
  };
@@ -1,7 +1,6 @@
1
1
  import { ComponentNameToClassKey, SxProps, Theme, TooltipProps as MUITooltipProps } from '@mui/material';
2
2
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
3
3
  import { Sizes } from '@m4l/styles';
4
- import { CSSProperties } from 'react';
5
4
  import { M4LOverridesStyleRules } from '../../../@types/augmentations';
6
5
  import { TOOLTIP_KEY_COMPONENT } from './constants';
7
6
  import { TooltipSlots } from './slots/TooltipEnum';
@@ -16,13 +15,11 @@ export interface TooltipProps extends Omit<MUITooltipProps, 'sx'> {
16
15
  placement?: MUITooltipProps['placement'];
17
16
  /** Popper offset relative to the anchor. */
18
17
  offset?: [number, number];
19
- /** Maximum width applied to the tooltip bubble as pixels or any valid CSS length. */
20
- maxWidth?: CSSProperties['maxWidth'];
21
18
  }
22
19
  /**
23
20
  * Owner state used by the styled Tooltip slots.
24
21
  */
25
- export type TooltipOwnerState = Pick<TooltipProps, 'size' | 'maxWidth'>;
22
+ export type TooltipOwnerState = Pick<TooltipProps, 'size'>;
26
23
  /**
27
24
  * Slot key union for the Tooltip component.
28
25
  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gBAAgB,EAAE,OAAO,qBAAqB,EAAE,KAAK,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './ButtonBase';
1
2
  export * from './Tooltip';
2
3
  export * from './Typography';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/extended/mui/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAE;AAC3B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/extended/mui/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
package/index.js CHANGED
@@ -1,21 +1,32 @@
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";
1
+ import { Icon as O } from "./components/Icon/Icon.js";
2
+ import { ICON_CLASSES as T, ICON_KEY_COMPONENT as S, ICON_PREFIX as e } from "./components/Icon/constants.js";
3
+ import { ButtonBase as E } from "./extended/mui/ButtonBase/ButtonBase.js";
4
+ import { buttonBaseStyles as p } from "./extended/mui/ButtonBase/ButtonBase.styles.js";
5
+ import { BUTTON_BASE_KEY_COMPONENT as Y } from "./extended/mui/ButtonBase/constants.js";
6
+ import { ButtonBaseSlots as f } from "./extended/mui/ButtonBase/slots/ButtonBaseEnum.js";
7
+ import { RootStyled as x, SkeletonStyled as A } from "./extended/mui/ButtonBase/slots/ButtonBaseSlots.js";
8
+ import { Tooltip as L } from "./extended/mui/Tooltip/Tooltip.js";
9
+ import { DEFAULT_TOOLTIP_OFFSET as l, TOOLTIP_CLASSES as F, TOOLTIP_KEY_COMPONENT as R } from "./extended/mui/Tooltip/constants.js";
10
+ import { Typography as s } from "./extended/mui/Typography/Typography.js";
11
+ import { TYPOGRAPHY_CLASSES as M, TYPOGRAPHY_CLASS_NAME_SPECIFY as a, TYPOGRAPHY_FONTS as G, TYPOGRAPHY_KEY_COMPONENT as H } from "./extended/mui/Typography/constants.js";
7
12
  export {
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,
14
- p as TOOLTIP_KEY_COMPONENT,
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
13
+ Y as BUTTON_BASE_KEY_COMPONENT,
14
+ E as ButtonBase,
15
+ f as ButtonBaseSlots,
16
+ l as DEFAULT_TOOLTIP_OFFSET,
17
+ T as ICON_CLASSES,
18
+ S as ICON_KEY_COMPONENT,
19
+ e as ICON_PREFIX,
20
+ O as Icon,
21
+ x as RootStyled,
22
+ A as SkeletonStyled,
23
+ F as TOOLTIP_CLASSES,
24
+ R as TOOLTIP_KEY_COMPONENT,
25
+ M as TYPOGRAPHY_CLASSES,
26
+ a as TYPOGRAPHY_CLASS_NAME_SPECIFY,
27
+ G as TYPOGRAPHY_FONTS,
28
+ H as TYPOGRAPHY_KEY_COMPONENT,
29
+ L as Tooltip,
30
+ s as Typography,
31
+ p as buttonBaseStyles
21
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/base",
3
- "version": "1.1.1-beta-improvement-733-m4l-components-autocomplete-menu-size.2",
3
+ "version": "1.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,6 +34,6 @@
34
34
  "@emotion/react": "11.14.0",
35
35
  "clsx": "2.1.1",
36
36
  "react": "19.2.4",
37
- "@mui/material": "5.16.7"
37
+ "@mui/material": "patch:@mui/material@npm%3A5.16.7#~/.yarn/patches/@mui-material-npm-5.16.7-7070122752.patch"
38
38
  }
39
39
  }