@m4l/base 1.0.1 → 1.1.0-beta-feature-728-m4l-components-rhf-image-selector.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/@types/types.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { ComponentsOverrides, ComponentsVariants, Theme } from '@mui/material/styles';
2
2
  import type { IconOwnerState, IconSlotsType } from '../components/Icon/types';
3
+ import type {
4
+ ButtonBaseOwnerState,
5
+ ButtonBaseSlotsType,
6
+ } from '../extended/mui/ButtonBase/types';
3
7
  import type {
4
8
  TooltipOwnerState,
5
9
  TooltipSlotsType,
@@ -11,18 +15,25 @@ import type {
11
15
 
12
16
  declare module '@mui/material/styles' {
13
17
  interface ComponentNameToClassKey {
18
+ M4LButtonBase: ButtonBaseSlotsType;
14
19
  M4LIcon: IconSlotsType;
15
20
  M4LTooltip: TooltipSlotsType;
16
21
  M4LTypography: TypographySlotsType;
17
22
  }
18
23
 
19
24
  interface ComponentsPropsList {
25
+ M4LButtonBase: Partial<ButtonBaseOwnerState>;
20
26
  M4LIcon: Partial<IconOwnerState>;
21
27
  M4LTooltip: Partial<TooltipOwnerState>;
22
28
  M4LTypography: Partial<TypographyOwnerState>;
23
29
  }
24
30
 
25
31
  interface Components {
32
+ M4LButtonBase?: {
33
+ defaultProps?: ComponentsPropsList['M4LButtonBase'];
34
+ styleOverrides?: ComponentsOverrides<Theme>['M4LButtonBase'];
35
+ variants?: ComponentsVariants['M4LButtonBase'];
36
+ };
26
37
  M4LIcon?: {
27
38
  defaultProps?: ComponentsPropsList['M4LIcon'];
28
39
  styleOverrides?: ComponentsOverrides<Theme>['M4LIcon'];
@@ -39,4 +50,4 @@ declare module '@mui/material/styles' {
39
50
  variants?: ComponentsVariants['M4LTypography'];
40
51
  };
41
52
  }
42
- }
53
+ }
@@ -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,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.0.1",
3
+ "version": "1.1.0-beta-feature-728-m4l-components-rhf-image-selector.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
  }