@nodeblocks/frontend-how-to-use-block 0.2.0 → 0.3.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,48 +1,45 @@
1
- import '@basaldev/blocks-frontend-framework/dist/style.css';
2
- import { ComponentProps, ReactNode } from 'react';
3
- import './how-to-use.css';
1
+ import { SvgIconComponent } from '@mui/icons-material';
2
+ import { CardProps, StackProps } from '@mui/material';
3
+ import { ReactNode } from 'react';
4
+ import { HowToUseContextValue } from './context';
4
5
  import { BlocksOverride } from './lib';
5
6
  declare const HowToUse: {
6
- <CustomBlocks extends Record<string, ReactNode> = {}>({ className, children, ...props }: Omit<ComponentProps<"div">, "children"> & {
7
+ <CustomBlocks extends Record<string, ReactNode> = {}>({ className, children, sx, ...props }: Omit<StackProps, "children"> & {
7
8
  children?: BlocksOverride<typeof defaultHowToUseBlocks, CustomBlocks>;
8
- }): import("react/jsx-runtime").JSX.Element;
9
- Header: ({ className, children, subtitle, ...props }: ComponentProps<"div"> & {
10
- subtitle: ReactNode;
9
+ } & Required<Pick<HowToUseContextValue, "subtitle" | "headerContent" | "message" | "linkHref" | "linkContent">>): import("react/jsx-runtime").JSX.Element;
10
+ Header: ({ className, children, sx, ...props }: StackProps & Partial<Pick<HowToUseContextValue, "subtitle" | "headerContent">>) => import("react/jsx-runtime").JSX.Element;
11
+ CardList: ({ children, className, sx, ...props }: StackProps & {
12
+ children: ReactNode;
11
13
  }) => import("react/jsx-runtime").JSX.Element;
12
- CardList: ({ children, className, ...props }: ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
13
- Card: ({ children, className, icon, headerContent, ...props }: ComponentProps<"div"> & {
14
- icon: import("@basaldev/blocks-frontend-framework").IconType;
14
+ Card: ({ children, className, icon: Icon, headerContent, sx, ...props }: CardProps & {
15
+ icon: SvgIconComponent;
15
16
  headerContent: ReactNode;
16
17
  }) => import("react/jsx-runtime").JSX.Element;
17
- Footer: ({ children, className, message, linkHref, linkContent, ...props }: ComponentProps<"div"> & {
18
- message: ReactNode;
19
- linkHref: string;
20
- linkContent: ReactNode;
21
- }) => import("react/jsx-runtime").JSX.Element;
18
+ Footer: ({ children, className, sx, ...props }: StackProps & Required<Pick<HowToUseContextValue, "message" | "linkHref" | "linkContent">>) => import("react/jsx-runtime").JSX.Element;
22
19
  };
23
20
  declare const defaultHowToUseBlocks: {
24
- header: import("react").ReactElement<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
25
- subtitle: ReactNode;
26
- }, ({ className, children, subtitle, ...props }: ComponentProps<"div"> & {
27
- subtitle: ReactNode;
21
+ header: import("react").ReactElement<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & {
22
+ component?: React.ElementType;
23
+ } & Partial<Pick<HowToUseContextValue, "subtitle" | "headerContent">>, ({ className, children, sx, ...props }: StackProps & Partial<Pick<HowToUseContextValue, "subtitle" | "headerContent">>) => import("react/jsx-runtime").JSX.Element>;
24
+ cardList: import("react").ReactElement<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & {
25
+ component?: React.ElementType;
26
+ } & {
27
+ children: ReactNode;
28
+ }, ({ children, className, sx, ...props }: StackProps & {
29
+ children: ReactNode;
28
30
  }) => import("react/jsx-runtime").JSX.Element>;
29
- cardList: import("react").ReactElement<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, ({ children, className, ...props }: ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element>;
30
- card: import("react").ReactElement<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
31
- icon: import("@basaldev/blocks-frontend-framework").IconType;
31
+ card: import("react").ReactElement<import("@mui/material").CardOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "style" | "square" | "className" | "classes" | "elevation" | "sx" | "variant" | "raised"> & {
32
+ component?: React.ElementType;
33
+ } & {
34
+ icon: SvgIconComponent;
32
35
  headerContent: ReactNode;
33
- }, ({ children, className, icon, headerContent, ...props }: ComponentProps<"div"> & {
34
- icon: import("@basaldev/blocks-frontend-framework").IconType;
36
+ }, ({ children, className, icon: Icon, headerContent, sx, ...props }: CardProps & {
37
+ icon: SvgIconComponent;
35
38
  headerContent: ReactNode;
36
39
  }) => import("react/jsx-runtime").JSX.Element>;
37
- footer: import("react").ReactElement<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
38
- message: ReactNode;
39
- linkHref: string;
40
- linkContent: ReactNode;
41
- }, ({ children, className, message, linkHref, linkContent, ...props }: ComponentProps<"div"> & {
42
- message: ReactNode;
43
- linkHref: string;
44
- linkContent: ReactNode;
45
- }) => import("react/jsx-runtime").JSX.Element>;
40
+ footer: import("react").ReactElement<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & {
41
+ component?: React.ElementType;
42
+ } & Required<Pick<HowToUseContextValue, "message" | "linkHref" | "linkContent">>, ({ children, className, sx, ...props }: StackProps & Required<Pick<HowToUseContextValue, "message" | "linkHref" | "linkContent">>) => import("react/jsx-runtime").JSX.Element>;
46
43
  };
47
44
  export default HowToUse;
48
45
  //# sourceMappingURL=HowToUse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HowToUse.d.ts","sourceRoot":"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vJ5G,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC;sDA8FxB,UAAU,GAAG;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE;6EAzK1F,SAAS,GAAG;QAAE,IAAI,EAAE,gBAAgB,CAAC;QAAC,aAAa,EAAE,SAAS,CAAA;KAAE;oDA0HhE,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC,CAAC;CA2I3F,CAAC;AAOF,QAAA,MAAM,qBAAqB;;;mHAjMxB,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC;;;;kBA8FC,SAAS;+CAAlC,UAAU,GAAG;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE;;;;cAzKtE,gBAAgB;uBAAiB,SAAS;0EAA9D,SAAS,GAAG;QAAE,IAAI,EAAE,gBAAgB,CAAC;QAAC,aAAa,EAAE,SAAS,CAAA;KAAE;;;8HA0HhE,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC,CAAC;CAuJ1F,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export type HowToUseContextValue = {
3
+ subtitle: ReactNode;
4
+ headerContent: ReactNode;
5
+ message: ReactNode;
6
+ linkHref: string;
7
+ linkContent: ReactNode;
8
+ };
9
+ export declare const keys: readonly ["subtitle", "headerContent", "message", "linkHref", "linkContent"];
10
+ export declare const HowToUseProvider: ({ children, ...value }: HowToUseContextValue & {
11
+ children: ReactNode;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const useHowToUseContext: () => HowToUseContextValue;
14
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,EAAE,SAAS,CAAC;IACzB,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,SAAS,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,IAAI,8EAMyB,CAAC;AAW3C,eAAO,MAAM,gBAAgB,GAAI,wBAG9B,oBAAoB,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB,4CAEA,CAAC;AAEF,eAAO,MAAM,kBAAkB,4BAO9B,CAAC"}