@mirohq/design-system-patterns 0.1.1 → 0.2.0-patterns-improvements-2.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -35,23 +35,15 @@ const Actions = designSystemStitches.styled(designSystemBox.Box, {
35
35
  flexWrap: "wrap",
36
36
  gap: "$100"
37
37
  });
38
- const EmptyState = React__default["default"].forwardRef(
39
- ({
40
- heading,
41
- description,
42
- illustration,
43
- actions: { primary, secondary },
44
- ...restProps
45
- }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Container, { ref, ...restProps, children: [
46
- illustration != null && /* @__PURE__ */ jsxRuntime.jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
47
- /* @__PURE__ */ jsxRuntime.jsx(designSystemTypography.Heading, { ref, level: 2, styledAs: "h3", children: heading }),
48
- description != null && /* @__PURE__ */ jsxRuntime.jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
49
- /* @__PURE__ */ jsxRuntime.jsxs(Actions, { children: [
50
- /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { ...primary, variant: "primary", children: primary.label }),
51
- secondary != null && /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { ...secondary, variant: "ghost", children: secondary.label })
52
- ] })
38
+ const PatternEmptyState = React__default["default"].forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Container, { ref, ...restProps, children: [
39
+ illustration != null && /* @__PURE__ */ jsxRuntime.jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
40
+ /* @__PURE__ */ jsxRuntime.jsx(designSystemTypography.Heading, { ref, level: 2, styledAs: "h3", children: heading }),
41
+ description != null && /* @__PURE__ */ jsxRuntime.jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
42
+ actions != null && /* @__PURE__ */ jsxRuntime.jsxs(Actions, { children: [
43
+ /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { ...actions.primary, variant: "primary", children: actions.primary.label }),
44
+ actions.secondary != null && /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { ...actions.secondary, variant: "ghost", children: actions.secondary.label })
53
45
  ] })
54
- );
46
+ ] }));
55
47
 
56
- exports.EmptyState = EmptyState;
48
+ exports.PatternEmptyState = PatternEmptyState;
57
49
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/empty-state.tsx"],"sourcesContent":["import React from 'react'\nimport type { ReactNode, ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Box } from '@mirohq/design-system-box'\nimport { Button } from '@mirohq/design-system-button'\nimport type { ButtonProps } from '@mirohq/design-system-button'\nimport type { BoxProps } from '@mirohq/design-system-box'\nimport { Heading } from '@mirohq/design-system-typography'\n\n// Types\n// -----------------------------------------------------------------------------\nexport interface EmptyStateProps extends Omit<BoxProps, 'children'> {\n heading: ReactNode\n description?: ReactNode\n illustration?: string\n actions: {\n primary: ActionButton\n secondary?: ActionButton\n }\n}\n\ntype ActionButton = Omit<ButtonProps, 'variant' | 'children'> & {\n label: ReactNode\n}\n\n// Styled\n// -----------------------------------------------------------------------------\nconst Container = styled(Box, {\n background: '$background-neutrals',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n gap: '$50',\n minWidth: '290px',\n maxWidth: '480px',\n})\n\nconst Illustration = styled('img', {\n width: '112px',\n display: 'block',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n})\n\nconst Actions = styled(Box, {\n paddingY: '$200',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '$100',\n})\n\n// Component\n// -----------------------------------------------------------------------------\nexport const EmptyState = React.forwardRef<\n ElementRef<typeof Box>,\n EmptyStateProps\n>(\n (\n {\n heading,\n description,\n illustration,\n actions: { primary, secondary },\n ...restProps\n },\n ref\n ) => (\n <Container ref={ref} {...restProps}>\n {illustration != null && (\n <Illustration src={illustration} aria-hidden alt='' />\n )}\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n <Actions>\n <Button {...primary} variant='primary'>\n {primary.label}\n </Button>\n\n {secondary != null && (\n <Button {...secondary} variant='ghost'>\n {secondary.label}\n </Button>\n )}\n </Actions>\n </Container>\n )\n)\n"],"names":["styled","Box","React","jsxs","Heading","jsx","Button"],"mappings":";;;;;;;;;;;;;;;AA2BA,MAAM,SAAA,GAAYA,4BAAOC,mBAAK,EAAA;AAAA,EAC5B,UAAY,EAAA,sBAAA;AAAA,EACZ,OAAS,EAAA,MAAA;AAAA,EACT,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,GAAK,EAAA,KAAA;AAAA,EACL,QAAU,EAAA,OAAA;AAAA,EACV,QAAU,EAAA,OAAA;AACZ,CAAC,CAAA,CAAA;AAED,MAAM,YAAA,GAAeD,4BAAO,KAAO,EAAA;AAAA,EACjC,KAAO,EAAA,OAAA;AAAA,EACP,OAAS,EAAA,OAAA;AACX,CAAC,CAAA,CAAA;AAED,MAAM,WAAA,GAAcA,4BAAOC,mBAAK,EAAA;AAAA,EAC9B,KAAO,EAAA,uBAAA;AACT,CAAC,CAAA,CAAA;AAED,MAAM,OAAA,GAAUD,4BAAOC,mBAAK,EAAA;AAAA,EAC1B,QAAU,EAAA,MAAA;AAAA,EACV,OAAS,EAAA,MAAA;AAAA,EACT,QAAU,EAAA,MAAA;AAAA,EACV,GAAK,EAAA,MAAA;AACP,CAAC,CAAA,CAAA;AAIM,MAAM,aAAaC,yBAAM,CAAA,UAAA;AAAA,EAI9B,CACE;AAAA,IACE,OAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA,EAAS,EAAE,OAAA,EAAS,SAAU,EAAA;AAAA,IAC9B,GAAG,SAAA;AAAA,KAEL,GAEA,qBAAAC,eAAA,CAAC,SAAU,EAAA,EAAA,GAAA,EAAW,GAAG,SACtB,EAAA,QAAA,EAAA;AAAA,IAAgB,YAAA,IAAA,IAAA,mCACd,YAAa,EAAA,EAAA,GAAA,EAAK,cAAc,aAAW,EAAA,IAAA,EAAC,KAAI,EAAG,EAAA,CAAA;AAAA,mCAErDC,8BAAQ,EAAA,EAAA,GAAA,EAAU,OAAO,CAAG,EAAA,QAAA,EAAS,MACnC,QACH,EAAA,OAAA,EAAA,CAAA;AAAA,IACC,WAAA,IAAe,wBACbC,cAAA,CAAA,WAAA,EAAA,EAAY,KAAK,EAAE,KAAA,EAAO,uBAAwB,EAAA,EAChD,QACH,EAAA,WAAA,EAAA,CAAA;AAAA,oCAED,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAAA,cAAA,CAACC,6BAAQ,GAAG,OAAA,EAAS,OAAQ,EAAA,SAAA,EAC1B,kBAAQ,KACX,EAAA,CAAA;AAAA,MAEC,SAAA,IAAa,wBACXD,cAAA,CAAAC,yBAAA,EAAA,EAAQ,GAAG,SAAW,EAAA,OAAA,EAAQ,OAC5B,EAAA,QAAA,EAAA,SAAA,CAAU,KACb,EAAA,CAAA;AAAA,KAEJ,EAAA,CAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/empty-state/empty-state.tsx"],"sourcesContent":["import React from 'react'\nimport type { ReactNode, ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Box } from '@mirohq/design-system-box'\nimport { Button } from '@mirohq/design-system-button'\nimport type { ButtonProps } from '@mirohq/design-system-button'\nimport type { BoxProps } from '@mirohq/design-system-box'\nimport { Heading } from '@mirohq/design-system-typography'\n\n// Types\n// -----------------------------------------------------------------------------\nexport interface PatternEmptyStateProps extends Omit<BoxProps, 'children'> {\n heading: ReactNode\n description?: ReactNode\n illustration?: string\n actions?: {\n primary: ActionButton\n secondary?: ActionButton\n }\n}\n\ntype ActionButton = Omit<ButtonProps, 'variant' | 'children'> & {\n label: ReactNode\n}\n\n// Styled\n// -----------------------------------------------------------------------------\nconst Container = styled(Box, {\n background: '$background-neutrals',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n gap: '$50',\n minWidth: '290px',\n maxWidth: '480px',\n})\n\nconst Illustration = styled('img', {\n width: '112px',\n display: 'block',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n})\n\nconst Actions = styled(Box, {\n paddingY: '$200',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '$100',\n})\n\n// Component\n// -----------------------------------------------------------------------------\nexport const PatternEmptyState = React.forwardRef<\n ElementRef<typeof Box>,\n PatternEmptyStateProps\n>(({ heading, description, illustration, actions, ...restProps }, ref) => (\n <Container ref={ref} {...restProps}>\n {illustration != null && (\n <Illustration src={illustration} aria-hidden alt='' />\n )}\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n {actions != null && (\n <Actions>\n <Button {...actions.primary} variant='primary'>\n {actions.primary.label}\n </Button>\n\n {actions.secondary != null && (\n <Button {...actions.secondary} variant='ghost'>\n {actions.secondary.label}\n </Button>\n )}\n </Actions>\n )}\n </Container>\n))\n"],"names":["styled","Box","React","Heading","jsx","jsxs","Button"],"mappings":";;;;;;;;;;;;;;;AA2BA,MAAM,SAAA,GAAYA,4BAAOC,mBAAK,EAAA;AAAA,EAC5B,UAAY,EAAA,sBAAA;AAAA,EACZ,OAAS,EAAA,MAAA;AAAA,EACT,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,GAAK,EAAA,KAAA;AAAA,EACL,QAAU,EAAA,OAAA;AAAA,EACV,QAAU,EAAA,OAAA;AACZ,CAAC,CAAA,CAAA;AAED,MAAM,YAAA,GAAeD,4BAAO,KAAO,EAAA;AAAA,EACjC,KAAO,EAAA,OAAA;AAAA,EACP,OAAS,EAAA,OAAA;AACX,CAAC,CAAA,CAAA;AA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CAAA,SAAA,CAAU,KACrB,EAAA,CAAA;AAAA,GAEJ,EAAA,CAAA;AAAA,CAAA,EAEJ,CACD;;;;"}
package/dist/module.js CHANGED
@@ -27,23 +27,15 @@ const Actions = styled(Box, {
27
27
  flexWrap: "wrap",
28
28
  gap: "$100"
29
29
  });
30
- const EmptyState = React.forwardRef(
31
- ({
32
- heading,
33
- description,
34
- illustration,
35
- actions: { primary, secondary },
36
- ...restProps
37
- }, ref) => /* @__PURE__ */ jsxs(Container, { ref, ...restProps, children: [
38
- illustration != null && /* @__PURE__ */ jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
39
- /* @__PURE__ */ jsx(Heading, { ref, level: 2, styledAs: "h3", children: heading }),
40
- description != null && /* @__PURE__ */ jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
41
- /* @__PURE__ */ jsxs(Actions, { children: [
42
- /* @__PURE__ */ jsx(Button, { ...primary, variant: "primary", children: primary.label }),
43
- secondary != null && /* @__PURE__ */ jsx(Button, { ...secondary, variant: "ghost", children: secondary.label })
44
- ] })
30
+ const PatternEmptyState = React.forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => /* @__PURE__ */ jsxs(Container, { ref, ...restProps, children: [
31
+ illustration != null && /* @__PURE__ */ jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
32
+ /* @__PURE__ */ jsx(Heading, { ref, level: 2, styledAs: "h3", children: heading }),
33
+ description != null && /* @__PURE__ */ jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
34
+ actions != null && /* @__PURE__ */ jsxs(Actions, { children: [
35
+ /* @__PURE__ */ jsx(Button, { ...actions.primary, variant: "primary", children: actions.primary.label }),
36
+ actions.secondary != null && /* @__PURE__ */ jsx(Button, { ...actions.secondary, variant: "ghost", children: actions.secondary.label })
45
37
  ] })
46
- );
38
+ ] }));
47
39
 
48
- export { EmptyState };
40
+ export { PatternEmptyState };
49
41
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/empty-state.tsx"],"sourcesContent":["import React from 'react'\nimport type { ReactNode, ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Box } from '@mirohq/design-system-box'\nimport { Button } from '@mirohq/design-system-button'\nimport type { ButtonProps } from '@mirohq/design-system-button'\nimport type { BoxProps } from '@mirohq/design-system-box'\nimport { Heading } from '@mirohq/design-system-typography'\n\n// Types\n// -----------------------------------------------------------------------------\nexport interface EmptyStateProps extends Omit<BoxProps, 'children'> {\n heading: ReactNode\n description?: ReactNode\n illustration?: string\n actions: {\n primary: ActionButton\n secondary?: ActionButton\n }\n}\n\ntype ActionButton = Omit<ButtonProps, 'variant' | 'children'> & {\n label: ReactNode\n}\n\n// Styled\n// -----------------------------------------------------------------------------\nconst Container = styled(Box, {\n background: '$background-neutrals',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n gap: '$50',\n minWidth: '290px',\n maxWidth: '480px',\n})\n\nconst Illustration = styled('img', {\n width: '112px',\n display: 'block',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n})\n\nconst Actions = styled(Box, {\n paddingY: '$200',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '$100',\n})\n\n// Component\n// -----------------------------------------------------------------------------\nexport const EmptyState = React.forwardRef<\n ElementRef<typeof Box>,\n EmptyStateProps\n>(\n (\n {\n heading,\n description,\n illustration,\n actions: { primary, secondary },\n ...restProps\n },\n ref\n ) => (\n <Container ref={ref} {...restProps}>\n {illustration != null && (\n <Illustration src={illustration} aria-hidden alt='' />\n )}\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n <Actions>\n <Button {...primary} variant='primary'>\n {primary.label}\n </Button>\n\n {secondary != null && (\n <Button {...secondary} variant='ghost'>\n {secondary.label}\n </Button>\n )}\n </Actions>\n </Container>\n )\n)\n"],"names":[],"mapp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CAAA,WAAA,EAAA,EAAY,KAAK,EAAE,KAAA,EAAO,uBAAwB,EAAA,EAChD,QACH,EAAA,WAAA,EAAA,CAAA;AAAA,yBAED,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,UAAQ,GAAG,OAAA,EAAS,OAAQ,EAAA,SAAA,EAC1B,kBAAQ,KACX,EAAA,CAAA;AAAA,MAEC,SAAA,IAAa,wBACX,GAAA,CAAA,MAAA,EAAA,EAAQ,GAAG,SAAW,EAAA,OAAA,EAAQ,OAC5B,EAAA,QAAA,EAAA,SAAA,CAAU,KACb,EAAA,CAAA;AAAA,KAEJ,EAAA,CAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/empty-state/empty-state.tsx"],"sourcesContent":["import React from 'react'\nimport type { ReactNode, ElementRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Box } from '@mirohq/design-system-box'\nimport { Button } from '@mirohq/design-system-button'\nimport type { ButtonProps } from '@mirohq/design-system-button'\nimport type { BoxProps } from '@mirohq/design-system-box'\nimport { Heading } from '@mirohq/design-system-typography'\n\n// Types\n// -----------------------------------------------------------------------------\nexport interface PatternEmptyStateProps extends Omit<BoxProps, 'children'> {\n heading: ReactNode\n description?: ReactNode\n illustration?: string\n actions?: {\n primary: ActionButton\n secondary?: ActionButton\n }\n}\n\ntype ActionButton = Omit<ButtonProps, 'variant' | 'children'> & {\n label: ReactNode\n}\n\n// Styled\n// -----------------------------------------------------------------------------\nconst Container = styled(Box, {\n background: '$background-neutrals',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n gap: '$50',\n minWidth: '290px',\n maxWidth: '480px',\n})\n\nconst Illustration = styled('img', {\n width: '112px',\n display: 'block',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n})\n\nconst Actions = styled(Box, {\n paddingY: '$200',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '$100',\n})\n\n// Component\n// -----------------------------------------------------------------------------\nexport const PatternEmptyState = React.forwardRef<\n ElementRef<typeof Box>,\n PatternEmptyStateProps\n>(({ heading, description, illustration, actions, ...restProps }, ref) => (\n <Container ref={ref} {...restProps}>\n {illustration != null && (\n <Illustration src={illustration} aria-hidden alt='' />\n )}\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n {actions != null && (\n <Actions>\n <Button {...actions.primary} variant='primary'>\n {actions.primary.label}\n </Button>\n\n {actions.secondary != null && (\n <Button {...actions.secondary} variant='ghost'>\n {actions.secondary.label}\n </Button>\n )}\n </Actions>\n )}\n </Container>\n))\n"],"names":[],"mappings":";;;;;;;AA2BA,MAAM,SAAA,GAAY,OAAO,GAAK,EAAA;AAAA,EAC5B,UAAY,EAAA,sBAAA;AAAA,EACZ,OAAS,EAAA,MAAA;AAAA,EACT,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,GAAK,EAAA,KAAA;AAAA,EACL,QAAU,EAAA,OAAA;AAAA,EACV,QAAU,EAAA,OAAA;AACZ,CAAC,CAAA,CAAA;AAED,MAAM,YAAA,GAAe,OAAO,KAAO,EAAA;AAAA,EACjC,KAAO,EAAA,OAAA;AAAA,EACP,OAAS,EAAA,OAAA;AACX,CAAC,CAAA,CAAA;AAED,MAAM,WAAA,GAAc,OAAO,GAAK,EAAA;AAAA,EAC9B,KAAO,EAAA,uBAAA;AACT,CAAC,CAAA,CAAA;AAED,MAAM,OAAA,GAAU,OAAO,GAAK,EAAA;AAAA,EAC1B,QAAU,EAAA,MAAA;AAAA,EACV,OAAS,EAAA,MAAA;AAAA,EACT,QAAU,EAAA,MAAA;AAAA,EACV,GAAK,EAAA,MAAA;AACP,CAAC,CAAA,CAAA;AAIM,MAAM,oBAAoB,KAAM,CAAA,UAAA,CAGrC,CAAC,EAAE,SAAS,WAAa,EAAA,YAAA,EAAc,OAAS,EAAA,GAAG,WAAa,EAAA,GAAA,0BAC/D,SAAU,EAAA,EAAA,GAAA,EAAW,GAAG,SACtB,EAAA,QAAA,EAAA;AAAA,EAAgB,YAAA,IAAA,IAAA,wBACd,YAAa,EAAA,EAAA,GAAA,EAAK,cAAc,aAAW,EAAA,IAAA,EAAC,KAAI,EAAG,EAAA,CAAA;AAAA,sBAErD,OAAQ,EAAA,EAAA,GAAA,EAAU,OAAO,CAAG,EAAA,QAAA,EAAS,MACnC,QACH,EAAA,OAAA,EAAA,CAAA;AAAA,EACC,WAAA,IAAe,wBACb,GAAA,CAAA,WAAA,EAAA,EAAY,KAAK,EAAE,KAAA,EAAO,uBAAwB,EAAA,EAChD,QACH,EAAA,WAAA,EAAA,CAAA;AAAA,EAED,OAAA,IAAW,IACV,oBAAA,IAAA,CAAC,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,MAAA,EAAA,EAAQ,GAAG,OAAQ,CAAA,OAAA,EAAS,SAAQ,SAClC,EAAA,QAAA,EAAA,OAAA,CAAQ,QAAQ,KACnB,EAAA,CAAA;AAAA,IAEC,OAAQ,CAAA,SAAA,IAAa,IACpB,oBAAA,GAAA,CAAC,MAAQ,EAAA,EAAA,GAAG,OAAQ,CAAA,SAAA,EAAW,OAAQ,EAAA,OAAA,EACpC,QAAQ,EAAA,OAAA,CAAA,SAAA,CAAU,KACrB,EAAA,CAAA;AAAA,GAEJ,EAAA,CAAA;AAAA,CAAA,EAEJ,CACD;;;;"}
package/dist/types.d.ts CHANGED
@@ -2,11 +2,11 @@ import React, { ReactNode } from 'react';
2
2
  import { ButtonProps } from '@mirohq/design-system-button';
3
3
  import { BoxProps } from '@mirohq/design-system-box';
4
4
 
5
- interface EmptyStateProps extends Omit<BoxProps, 'children'> {
5
+ interface PatternEmptyStateProps extends Omit<BoxProps, 'children'> {
6
6
  heading: ReactNode;
7
7
  description?: ReactNode;
8
8
  illustration?: string;
9
- actions: {
9
+ actions?: {
10
10
  primary: ActionButton;
11
11
  secondary?: ActionButton;
12
12
  };
@@ -14,6 +14,6 @@ interface EmptyStateProps extends Omit<BoxProps, 'children'> {
14
14
  declare type ActionButton = Omit<ButtonProps, 'variant' | 'children'> & {
15
15
  label: ReactNode;
16
16
  };
17
- declare const EmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ declare const PatternEmptyState: React.ForwardRefExoticComponent<Omit<PatternEmptyStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
18
 
19
- export { EmptyState, EmptyStateProps };
19
+ export { PatternEmptyState, PatternEmptyStateProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-patterns",
3
- "version": "0.1.1",
3
+ "version": "0.2.0-patterns-improvements-2.0",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "@mirohq/design-system-box": "^2.1.60",
30
30
  "@mirohq/design-system-button": "^4.2.4",
31
- "@mirohq/design-system-typography": "^0.6.7",
32
- "@mirohq/design-system-stitches": "^2.6.29"
31
+ "@mirohq/design-system-stitches": "^2.6.29",
32
+ "@mirohq/design-system-typography": "^0.6.7"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@mirohq/brand-assets": "^0.2.1"