@m4l/components 0.0.22 → 0.0.23

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,3 @@
1
+ /// <reference types="react" />
2
+ import { MuiLabLoadingButtonProps } from './types';
3
+ export declare const LoadingButton: (props: MuiLabLoadingButtonProps) => JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { LoadingButton as LoadingButton$1 } from "@mui/lab";
2
+ import { Skeleton } from "@mui/material";
3
+ import { styled } from "@mui/material/styles";
4
+ import { jsx } from "react/jsx-runtime";
5
+ const WrapperSKTLoadingButton = styled("div")(({
6
+ theme
7
+ }) => ({
8
+ display: "flex",
9
+ width: "100%",
10
+ borderRadius: theme.spacing(1),
11
+ overflow: "hidden"
12
+ }));
13
+ const SKTLoadingButton = () => /* @__PURE__ */ jsx(WrapperSKTLoadingButton, {
14
+ id: "WrapperSKTLoadingButton",
15
+ children: /* @__PURE__ */ jsx(Skeleton, {
16
+ variant: "rectangular",
17
+ width: "100%",
18
+ height: "48px"
19
+ })
20
+ });
21
+ const LoadingButton = (props) => {
22
+ const {
23
+ isSkeleton,
24
+ children,
25
+ ...other
26
+ } = props;
27
+ if (isSkeleton) {
28
+ return /* @__PURE__ */ jsx(SKTLoadingButton, {});
29
+ }
30
+ return /* @__PURE__ */ jsx(LoadingButton$1, {
31
+ ...other,
32
+ children
33
+ });
34
+ };
35
+ export { LoadingButton as L };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SKTLoadingButton: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const WrapperSKTLoadingButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,5 @@
1
+ import { LoadingButtonProps } from '@mui/lab';
2
+ export interface MuiLabLoadingButtonProps extends LoadingButtonProps {
3
+ isSkeleton?: boolean;
4
+ children?: any;
5
+ }
@@ -4,6 +4,7 @@ export { Breadcrumbs } from './Breadcrumbs';
4
4
  export type { TLink } from './Breadcrumbs/types';
5
5
  export { IconButton } from './IconButton';
6
6
  export { LinkWithRoute } from './LinkWithRoute';
7
+ export { LoadingButton } from './LoadingButton';
7
8
  export { MenuActions } from './MenuActions';
8
9
  export type { MenuAction, ComponentActionProps } from './MenuActions/types';
9
10
  export { MenuPopover } from './MenuPopover';
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ export { M as ModalContext, a as ModalProvider } from "./contexts/ModalContext/i
12
12
  export { R as RHFAutocompleteAsync } from "./components/hook-form/RHFAutocompleteAsync/index.js";
13
13
  export { R as RHFCheckbox } from "./components/hook-form/RHFCheckbox/index.js";
14
14
  export { R as RHFTextField } from "./components/hook-form/RHFTextField/index.js";
15
+ export { L as LoadingButton } from "./components/mui_extended/LoadingButton/index.js";
15
16
  export { M as MenuPopover } from "./components/mui_extended/MenuPopover/index.js";
16
17
  export { M as MenuActions } from "./components/mui_extended/MenuActions/index.js";
17
18
  export { P as Pager, g as getPagerComponentsDictionary } from "./components/mui_extended/Pager/index.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
3
  "private": false,
4
- "version": "0.0.22",
4
+ "version": "0.0.23",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
7
7
  "dev": "vite",