@mirohq/design-system-patterns 1.0.0 → 1.0.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.
package/dist/main.js CHANGED
@@ -41,13 +41,17 @@ const Actions = designSystemStitches.styled(designSystemBox.Box, {
41
41
  gap: "$100",
42
42
  alignItems: "center"
43
43
  });
44
+ const BaseActionButton = ({
45
+ label,
46
+ ...actionProps
47
+ }) => /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { ...actionProps, children: label });
44
48
  const PatternEmptyState = React__default["default"].forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Container, { ref, ...restProps, children: [
45
49
  illustration != null && /* @__PURE__ */ jsxRuntime.jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
46
50
  heading != null && /* @__PURE__ */ jsxRuntime.jsx(designSystemTypography.Heading, { ref, level: 2, styledAs: "h3", children: heading }),
47
51
  description != null && /* @__PURE__ */ jsxRuntime.jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
48
52
  actions != null && /* @__PURE__ */ jsxRuntime.jsxs(Actions, { children: [
49
- /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { variant: "primary", ...actions.primary, children: actions.primary.label }),
50
- actions.secondary != null && /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { ...actions.secondary, variant: "ghost", children: actions.secondary.label })
53
+ /* @__PURE__ */ jsxRuntime.jsx(BaseActionButton, { variant: "primary", ...actions.primary }),
54
+ actions.secondary != null && /* @__PURE__ */ jsxRuntime.jsx(BaseActionButton, { ...actions.secondary, variant: "ghost" })
51
55
  ] })
52
56
  ] }));
53
57
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
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 variant?: 'primary' | 'secondary'\n }\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: 'transparent',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n minWidth: '304px',\n maxWidth: '480px',\n textAlign: 'center',\n alignItems: 'center',\n})\n\nconst Illustration = styled('img', {\n width: '72px',\n display: 'block',\n marginBottom: '$150',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n marginTop: '$100',\n maxWidth: '304px',\n})\n\nconst Actions = styled(Box, {\n marginTop: '$150',\n paddingY: '$200',\n display: 'flex',\n flexDirection: 'column',\n gap: '$100',\n alignItems: 'center',\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 != null && (\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n )}\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n {actions != null && (\n <Actions>\n <Button variant='primary' {...actions.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"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AA,CAAA;AAAA,EAErD,OAAA,IAAW,wBACTC,cAAA,CAAAC,8BAAA,EAAA,EAAQ,KAAU,KAAO,EAAA,CAAA,EAAG,QAAS,EAAA,IAAA,EACnC,QACH,EAAA,OAAA,EAAA,CAAA;AAAA,EAED,WAAA,IAAe,wBACbD,cAAA,CAAA,WAAA,EAAA,EAAY,KAAK,EAAE,KAAA,EAAO,uBAAwB,EAAA,EAChD,QACH,EAAA,WAAA,EAAA,CAAA;AAAA,EAED,OAAA,IAAW,IACV,oBAAAE,eAAA,CAAC,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAACF,cAAA,CAAAG,yBAAA,EAAA,EAAO,SAAQ,SAAW,EAAA,GAAG,QAAQ,OACnC,EAAA,QAAA,EAAA,OAAA,CAAQ,QAAQ,KACnB,EAAA,CAAA;AAAA,IAEC,OAAQ,CAAA,SAAA,IAAa,IACpB,oBAAAH,cAAA,CAACG,yBAAQ,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;;;;"}
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 variant?: 'primary' | 'secondary'\n }\n secondary?: ActionButton\n }\n}\n\ntype BaseActionButtonProps = Omit<ButtonProps, 'children'> & {\n label: ReactNode\n}\n\ntype ActionButton = Omit<BaseActionButtonProps, 'variant'>\n\n// Styled\n// -----------------------------------------------------------------------------\nconst Container = styled(Box, {\n background: 'transparent',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n minWidth: '304px',\n maxWidth: '480px',\n textAlign: 'center',\n alignItems: 'center',\n})\n\nconst Illustration = styled('img', {\n width: '72px',\n display: 'block',\n marginBottom: '$150',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n marginTop: '$100',\n maxWidth: '304px',\n})\n\nconst Actions = styled(Box, {\n marginTop: '$150',\n paddingY: '$200',\n display: 'flex',\n flexDirection: 'column',\n gap: '$100',\n alignItems: 'center',\n})\n\nconst BaseActionButton = ({\n label,\n ...actionProps\n}: BaseActionButtonProps): ReactNode => (\n <Button {...actionProps}>{label}</Button>\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 != null && (\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n )}\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n {actions != null && (\n <Actions>\n <BaseActionButton variant='primary' {...actions.primary} />\n\n {actions.secondary != null && (\n <BaseActionButton {...actions.secondary} variant='ghost' />\n )}\n </Actions>\n )}\n </Container>\n))\n"],"names":["styled","Box","jsx","Button","React","Heading","jsxs"],"mappings":";;;;;;;;;;;;;;;AA+BA,MAAM,SAAA,GAAYA,4BAAOC,mBAAK,EAAA;AAAA,EAC5B,UAAY,EAAA,aAAA;AAAA,EACZ,OAAS,EAAA,MAAA;AAAA,EACT,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,QAAU,E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,KAAU,KAAO,EAAA,CAAA,EAAG,QAAS,EAAA,IAAA,EACnC,QACH,EAAA,OAAA,EAAA,CAAA;AAAA,EAED,WAAA,IAAe,wBACbH,cAAA,CAAA,WAAA,EAAA,EAAY,KAAK,EAAE,KAAA,EAAO,uBAAwB,EAAA,EAChD,QACH,EAAA,WAAA,EAAA,CAAA;AAAA,EAED,OAAA,IAAW,IACV,oBAAAI,eAAA,CAAC,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAAJ,cAAA,CAAC,gBAAiB,EAAA,EAAA,OAAA,EAAQ,SAAW,EAAA,GAAG,QAAQ,OAAS,EAAA,CAAA;AAAA,IAExD,OAAA,CAAQ,aAAa,IACpB,oBAAAA,cAAA,CAAC,oBAAkB,GAAG,OAAA,CAAQ,SAAW,EAAA,OAAA,EAAQ,OAAQ,EAAA,CAAA;AAAA,GAE7D,EAAA,CAAA;AAAA,CAAA,EAEJ,CACD;;;;"}
package/dist/module.js CHANGED
@@ -33,13 +33,17 @@ const Actions = styled(Box, {
33
33
  gap: "$100",
34
34
  alignItems: "center"
35
35
  });
36
+ const BaseActionButton = ({
37
+ label,
38
+ ...actionProps
39
+ }) => /* @__PURE__ */ jsx(Button, { ...actionProps, children: label });
36
40
  const PatternEmptyState = React.forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => /* @__PURE__ */ jsxs(Container, { ref, ...restProps, children: [
37
41
  illustration != null && /* @__PURE__ */ jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
38
42
  heading != null && /* @__PURE__ */ jsx(Heading, { ref, level: 2, styledAs: "h3", children: heading }),
39
43
  description != null && /* @__PURE__ */ jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
40
44
  actions != null && /* @__PURE__ */ jsxs(Actions, { children: [
41
- /* @__PURE__ */ jsx(Button, { variant: "primary", ...actions.primary, children: actions.primary.label }),
42
- actions.secondary != null && /* @__PURE__ */ jsx(Button, { ...actions.secondary, variant: "ghost", children: actions.secondary.label })
45
+ /* @__PURE__ */ jsx(BaseActionButton, { variant: "primary", ...actions.primary }),
46
+ actions.secondary != null && /* @__PURE__ */ jsx(BaseActionButton, { ...actions.secondary, variant: "ghost" })
43
47
  ] })
44
48
  ] }));
45
49
 
@@ -1 +1 @@
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 variant?: 'primary' | 'secondary'\n }\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: 'transparent',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n minWidth: '304px',\n maxWidth: '480px',\n textAlign: 'center',\n alignItems: 'center',\n})\n\nconst Illustration = styled('img', {\n width: '72px',\n display: 'block',\n marginBottom: '$150',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n marginTop: '$100',\n maxWidth: '304px',\n})\n\nconst Actions = styled(Box, {\n marginTop: '$150',\n paddingY: '$200',\n display: 'flex',\n flexDirection: 'column',\n gap: '$100',\n alignItems: 'center',\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 != null && (\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n )}\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n {actions != null && (\n <Actions>\n <Button variant='primary' {...actions.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":";;;;;;;AA6BA,MAAM,SAAA,GAAY,OAAO,GAAK,EAAA;AAAA,EAC5B,UAAY,EAAA,aAAA;AAAA,EACZ,OAAS,EAAA,MAAA;AAAA,EACT,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,QAAU,EAAA,OAAA;AAAA,EACV,QAAU,EAAA,OAAA;AAAA,EACV,SAAW,EAAA,QAAA;AAAA,EACX,UAAY,EAAA,QAAA;AACd,CAAC,CAAA,CAAA;AAED,MAAM,YAAA,GAAe,OAAO,KAAO,EAAA;AAAA,EACjC,KAAO,EAAA,MAAA;AAAA,EACP,OAAS,EAAA,OAAA;AAAA,EACT,YAAc,EAAA,MAAA;AAChB,CAAC,CAAA,CAAA;AAED,MAAM,WAAA,GAAc,OAAO,GAAK,EAAA;AAAA,EAC9B,KAAO,EAAA,uBAAA;AAAA,EACP,SAAW,EAAA,MAAA;AAAA,EACX,QAAU,EAAA,OAAA;AACZ,CAAC,CAAA,CAAA;AAED,MAAM,OAAA,GAAU,OAAO,GAAK,EAAA;AAAA,EAC1B,SAAW,EAAA,MAAA;AAAA,EACX,QAAU,EAAA,MAAA;AAAA,EACV,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,GAAK,EAAA,MAAA;AAAA,EACL,UAAY,EAAA,QAAA;AACd,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,EAErD,OAAA,IAAW,wBACT,GAAA,CAAA,OAAA,EAAA,EAAQ,KAAU,KAAO,EAAA,CAAA,EAAG,QAAS,EAAA,IAAA,EACnC,QACH,EAAA,OAAA,EAAA,CAAA;AAAA,EAED,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,EAAO,SAAQ,SAAW,EAAA,GAAG,QAAQ,OACnC,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;;;;"}
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 variant?: 'primary' | 'secondary'\n }\n secondary?: ActionButton\n }\n}\n\ntype BaseActionButtonProps = Omit<ButtonProps, 'children'> & {\n label: ReactNode\n}\n\ntype ActionButton = Omit<BaseActionButtonProps, 'variant'>\n\n// Styled\n// -----------------------------------------------------------------------------\nconst Container = styled(Box, {\n background: 'transparent',\n padding: '$500',\n display: 'flex',\n flexDirection: 'column',\n minWidth: '304px',\n maxWidth: '480px',\n textAlign: 'center',\n alignItems: 'center',\n})\n\nconst Illustration = styled('img', {\n width: '72px',\n display: 'block',\n marginBottom: '$150',\n})\n\nconst Description = styled(Box, {\n color: '$text-neutrals-subtle',\n marginTop: '$100',\n maxWidth: '304px',\n})\n\nconst Actions = styled(Box, {\n marginTop: '$150',\n paddingY: '$200',\n display: 'flex',\n flexDirection: 'column',\n gap: '$100',\n alignItems: 'center',\n})\n\nconst BaseActionButton = ({\n label,\n ...actionProps\n}: BaseActionButtonProps): ReactNode => (\n <Button {...actionProps}>{label}</Button>\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 != null && (\n <Heading ref={ref} level={2} styledAs='h3'>\n {heading}\n </Heading>\n )}\n {description != null && (\n <Description css={{ color: '$text-neutrals-subtle' }}>\n {description}\n </Description>\n )}\n {actions != null && (\n <Actions>\n <BaseActionButton variant='primary' {...actions.primary} />\n\n {actions.secondary != null && (\n <BaseActionButton {...actions.secondary} variant='ghost' />\n )}\n </Actions>\n )}\n </Container>\n))\n"],"names":[],"mappings":";;;;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,IAAA,IAAA,wBACd,YAAa,EAAA,EAAA,GAAA,EAAK,cAAc,aAAW,EAAA,IAAA,EAAC,KAAI,EAAG,EAAA,CAAA;AAAA,EAErD,OAAA,IAAW,wBACT,GAAA,CAAA,OAAA,EAAA,EAAQ,KAAU,KAAO,EAAA,CAAA,EAAG,QAAS,EAAA,IAAA,EACnC,QACH,EAAA,OAAA,EAAA,CAAA;AAAA,EAED,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,oBAAA,GAAA,CAAC,gBAAiB,EAAA,EAAA,OAAA,EAAQ,SAAW,EAAA,GAAG,QAAQ,OAAS,EAAA,CAAA;AAAA,IAExD,OAAA,CAAQ,aAAa,IACpB,oBAAA,GAAA,CAAC,oBAAkB,GAAG,OAAA,CAAQ,SAAW,EAAA,OAAA,EAAQ,OAAQ,EAAA,CAAA;AAAA,GAE7D,EAAA,CAAA;AAAA,CAAA,EAEJ,CACD;;;;"}
package/dist/types.d.ts CHANGED
@@ -13,9 +13,10 @@ interface PatternEmptyStateProps extends Omit<BoxProps, 'children'> {
13
13
  secondary?: ActionButton;
14
14
  };
15
15
  }
16
- type ActionButton = Omit<ButtonProps, 'variant' | 'children'> & {
16
+ type BaseActionButtonProps = Omit<ButtonProps, 'children'> & {
17
17
  label: ReactNode;
18
18
  };
19
+ type ActionButton = Omit<BaseActionButtonProps, 'variant'>;
19
20
  declare const PatternEmptyState: React.ForwardRefExoticComponent<Omit<PatternEmptyStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
21
 
21
22
  export { PatternEmptyState, PatternEmptyStateProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-patterns",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -28,11 +28,11 @@
28
28
  "dependencies": {
29
29
  "@mirohq/design-system-box": "^3.0.0",
30
30
  "@mirohq/design-system-button": "^5.0.0",
31
- "@mirohq/design-system-stitches": "^3.0.0",
32
- "@mirohq/design-system-typography": "^1.0.0"
31
+ "@mirohq/design-system-typography": "^1.0.0",
32
+ "@mirohq/design-system-stitches": "^3.0.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@mirohq/brand-assets": "^1.0.0"
35
+ "@mirohq/brand-assets": "^1.0.1"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "rollup -c ../../rollup.config.js",