@mirohq/design-system-empty-state 0.1.6 → 0.2.0-kill-new-lightdark-themes.2

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
@@ -6,7 +6,6 @@ var designSystemStitches = require('@mirohq/design-system-stitches');
6
6
  var designSystemBox = require('@mirohq/design-system-box');
7
7
  var designSystemButton = require('@mirohq/design-system-button');
8
8
  var designSystemTypography = require('@mirohq/design-system-typography');
9
- var designSystemExperiments = require('@mirohq/design-system-experiments');
10
9
 
11
10
  const Container = designSystemStitches.styled(designSystemBox.Box, {
12
11
  background: "transparent",
@@ -18,12 +17,6 @@ const Container = designSystemStitches.styled(designSystemBox.Box, {
18
17
  textAlign: "center",
19
18
  alignItems: "center"
20
19
  });
21
- const Illustration = designSystemStitches.styled("img", {
22
- width: "72px",
23
- minHeight: "72px",
24
- display: "block",
25
- marginBottom: "$150"
26
- });
27
20
  const Description = designSystemStitches.styled(designSystemBox.Box, {
28
21
  color: "$text-neutrals-subtle",
29
22
  marginTop: "$100",
@@ -38,26 +31,22 @@ const Actions = designSystemStitches.styled(designSystemBox.Box, {
38
31
  alignItems: "center"
39
32
  });
40
33
  const BaseActionButton = React.forwardRef(({ label, ...actionProps }, ref) => /* @__PURE__ */ jsxRuntime.jsx(designSystemButton.Button, { ref, ...actionProps, children: label }));
41
- const PatternEmptyState = React.forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => {
42
- const [isCanvas26] = designSystemExperiments.useCanvas26();
43
- return /* @__PURE__ */ jsxRuntime.jsxs(Container, { ref, ...restProps, children: [
44
- illustration != null && !isCanvas26 && /* @__PURE__ */ jsxRuntime.jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
45
- heading != null && /* @__PURE__ */ jsxRuntime.jsx(
46
- designSystemTypography.Heading,
47
- {
48
- ref,
49
- level: 2,
50
- ...isCanvas26 ? { css: { fontFamily: "$display", fontSize: "$350" } } : { styledAs: "h3" },
51
- children: heading
52
- }
53
- ),
54
- description != null && /* @__PURE__ */ jsxRuntime.jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
55
- actions != null && /* @__PURE__ */ jsxRuntime.jsxs(Actions, { children: [
56
- /* @__PURE__ */ jsxRuntime.jsx(BaseActionButton, { variant: "primary", ...actions.primary }),
57
- actions.secondary != null && /* @__PURE__ */ jsxRuntime.jsx(BaseActionButton, { ...actions.secondary, variant: "ghost" })
58
- ] })
59
- ] });
60
- });
34
+ const PatternEmptyState = React.forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Container, { ref, ...restProps, children: [
35
+ heading != null && /* @__PURE__ */ jsxRuntime.jsx(
36
+ designSystemTypography.Heading,
37
+ {
38
+ ref,
39
+ level: 2,
40
+ css: { fontFamily: "$display", fontSize: "$350" },
41
+ children: heading
42
+ }
43
+ ),
44
+ description != null && /* @__PURE__ */ jsxRuntime.jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
45
+ actions != null && /* @__PURE__ */ jsxRuntime.jsxs(Actions, { children: [
46
+ /* @__PURE__ */ jsxRuntime.jsx(BaseActionButton, { variant: "primary", ...actions.primary }),
47
+ actions.secondary != null && /* @__PURE__ */ jsxRuntime.jsx(BaseActionButton, { ...actions.secondary, variant: "ghost" })
48
+ ] })
49
+ ] }));
61
50
 
62
51
  exports.PatternEmptyState = PatternEmptyState;
63
52
  //# 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'\nimport { useCanvas26 } from '@mirohq/design-system-experiments'\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 minHeight: '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 = React.forwardRef<\n ElementRef<typeof Button>,\n BaseActionButtonProps\n>(({ label, ...actionProps }, ref) => (\n <Button ref={ref} {...actionProps}>\n {label}\n </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 const [isCanvas26] = useCanvas26()\n\n return (\n <Container ref={ref} {...restProps}>\n {illustration != null && !isCanvas26 && (\n <Illustration src={illustration} aria-hidden alt='' />\n )}\n {heading != null && (\n <Heading\n ref={ref}\n level={2}\n {...(isCanvas26\n ? { css: { fontFamily: '$display', fontSize: '$350' } }\n : { styledAs: 'h3' })}\n >\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})\n"],"names":["styled","Box","Button","useCanvas26","jsxs","jsx","Heading"],"mappings":";;;;;;;;;;AAgCA,MAAM,SAAA,GAAYA,4BAAOC,mBAAA,EAAK;AAAA,EAC5B,UAAA,EAAY,aAAA;AAAA,EACZ,OAAA,EAAS,MAAA;AAAA,EACT,OAAA,EAAS,MAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,QAAA,EAAU,OAAA;AAAA,EACV,QAAA,EAAU,OAAA;AAAA,EACV,SAAA,EAAW,QAAA;AAAA,EACX,UAAA,EAAY;AACd,CAAC,CAAA;AAED,MAAM,YAAA,GAAeD,4BAAO,KAAA,EAAO;AAAA,EACjC,KAAA,EAAO,MAAA;AAAA,EACP,SAAA,EAAW,MAAA;AAAA,EACX,OAAA,EAAS,OAAA;AAAA,EACT,YAAA,EAAc;AAChB,CAAC,CAAA;AAED,MAAM,WAAA,GAAcA,4BAAOC,mBAAA,EAAK;AAAA,EAC9B,KAAA,EAAO,uBAAA;AAAA,EACP,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU;AACZ,CAAC,CAAA;AAED,MAAM,OAAA,GAAUD,4BAAOC,mBAAA,EAAK;AAAA,EAC1B,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU,MAAA;AAAA,EACV,OAAA,EAAS,MAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,GAAA,EAAK,MAAA;AAAA,EACL,UAAA,EAAY;AACd,CAAC,CAAA;AAED,MAAM,mBAAmB,KAAA,CAAM,UAAA,CAG7B,CAAC,EAAE,OAAO,GAAG,WAAA,EAAY,EAAG,GAAA,oCAC3BC,yBAAA,EAAA,EAAO,GAAA,EAAW,GAAG,WAAA,EACnB,iBACH,CACD,CAAA;AAIM,MAAM,iBAAA,GAAoB,KAAA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":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 PatternEmptyStateProps extends Omit<BoxProps, 'children'> {\n heading?: ReactNode\n description?: ReactNode\n /**\n * @deprecated No longer rendered.\n */\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 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 = React.forwardRef<\n ElementRef<typeof Button>,\n BaseActionButtonProps\n>(({ label, ...actionProps }, ref) => (\n <Button ref={ref} {...actionProps}>\n {label}\n </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 {heading != null && (\n <Heading\n ref={ref}\n level={2}\n css={{ fontFamily: '$display', fontSize: '$350' }}\n >\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","Button","jsx","Heading","jsxs"],"mappings":";;;;;;;;;AAkCA,MAAM,SAAA,GAAYA,4BAAOC,mBAAA,EAAK;AAAA,EAC5B,UAAA,EAAY,aAAA;AAAA,EACZ,OAAA,EAAS,MAAA;AAAA,EACT,OAAA,EAAS,MAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,QAAA,EAAU,OAAA;AAAA,EACV,QAAA,EAAU,OAAA;AAAA,EACV,SAAA,EAAW,QAAA;AAAA,EACX,UAAA,EAAY;AACd,CAAC,CAAA;AAED,MAAM,WAAA,GAAcD,4BAAOC,mBAAA,EAAK;AAAA,EAC9B,KAAA,EAAO,uBAAA;AAAA,EACP,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU;AACZ,CAAC,CAAA;AAED,MAAM,OAAA,GAAUD,4BAAOC,mBAAA,EAAK;AAAA,EAC1B,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU,MAAA;AAAA,EACV,OAAA,EAAS,MAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,GAAA,EAAK,MAAA;AAAA,EACL,UAAA,EAAY;AACd,CAAC,CAAA;AAED,MAAM,mBAAmB,KAAA,CAAM,UAAA,CAG7B,CAAC,EAAE,OAAO,GAAG,WAAA,EAAY,EAAG,GAAA,oCAC3BC,yBAAA,EAAA,EAAO,GAAA,EAAW,GAAG,WAAA,EACnB,iBACH,CACD,CAAA;AAIM,MAAM,oBAAoB,KAAA,CAAM,UAAA,CAGrC,CAAC,EAAE,SAAS,WAAA,EAAa,YAAA,EAAc,OAAA,EAAS,GAAG,WAAU,EAAG,GAAA,qCAC/D,SAAA,EAAA,EAAU,GAAA,EAAW,GAAG,SAAA,EACtB,QAAA,EAAA;AAAA,EAAA,OAAA,IAAW,IAAA,oBACVC,cAAA;AAAA,IAACC,8BAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,KAAA,EAAO,CAAA;AAAA,MACP,GAAA,EAAK,EAAE,UAAA,EAAY,UAAA,EAAY,UAAU,MAAA,EAAO;AAAA,MAE/C,QAAA,EAAA;AAAA;AAAA,GACH;AAAA,EAED,WAAA,IAAe,wBACdD,cAAA,CAAC,WAAA,EAAA,EAAY,KAAK,EAAE,KAAA,EAAO,uBAAA,EAAwB,EAChD,QAAA,EAAA,WAAA,EACH,CAAA;AAAA,EAED,OAAA,IAAW,IAAA,oBACVE,eAAA,CAAC,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAAF,cAAA,CAAC,gBAAA,EAAA,EAAiB,OAAA,EAAQ,SAAA,EAAW,GAAG,QAAQ,OAAA,EAAS,CAAA;AAAA,IAExD,OAAA,CAAQ,aAAa,IAAA,oBACpBA,cAAA,CAAC,oBAAkB,GAAG,OAAA,CAAQ,SAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ;AAAA,GAAA,EAE7D;AAAA,CAAA,EAEJ,CACD;;;;"}
package/dist/module.js CHANGED
@@ -4,7 +4,6 @@ import { styled } from '@mirohq/design-system-stitches';
4
4
  import { Box } from '@mirohq/design-system-box';
5
5
  import { Button } from '@mirohq/design-system-button';
6
6
  import { Heading } from '@mirohq/design-system-typography';
7
- import { useCanvas26 } from '@mirohq/design-system-experiments';
8
7
 
9
8
  const Container = styled(Box, {
10
9
  background: "transparent",
@@ -16,12 +15,6 @@ const Container = styled(Box, {
16
15
  textAlign: "center",
17
16
  alignItems: "center"
18
17
  });
19
- const Illustration = styled("img", {
20
- width: "72px",
21
- minHeight: "72px",
22
- display: "block",
23
- marginBottom: "$150"
24
- });
25
18
  const Description = styled(Box, {
26
19
  color: "$text-neutrals-subtle",
27
20
  marginTop: "$100",
@@ -36,26 +29,22 @@ const Actions = styled(Box, {
36
29
  alignItems: "center"
37
30
  });
38
31
  const BaseActionButton = React.forwardRef(({ label, ...actionProps }, ref) => /* @__PURE__ */ jsx(Button, { ref, ...actionProps, children: label }));
39
- const PatternEmptyState = React.forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => {
40
- const [isCanvas26] = useCanvas26();
41
- return /* @__PURE__ */ jsxs(Container, { ref, ...restProps, children: [
42
- illustration != null && !isCanvas26 && /* @__PURE__ */ jsx(Illustration, { src: illustration, "aria-hidden": true, alt: "" }),
43
- heading != null && /* @__PURE__ */ jsx(
44
- Heading,
45
- {
46
- ref,
47
- level: 2,
48
- ...isCanvas26 ? { css: { fontFamily: "$display", fontSize: "$350" } } : { styledAs: "h3" },
49
- children: heading
50
- }
51
- ),
52
- description != null && /* @__PURE__ */ jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
53
- actions != null && /* @__PURE__ */ jsxs(Actions, { children: [
54
- /* @__PURE__ */ jsx(BaseActionButton, { variant: "primary", ...actions.primary }),
55
- actions.secondary != null && /* @__PURE__ */ jsx(BaseActionButton, { ...actions.secondary, variant: "ghost" })
56
- ] })
57
- ] });
58
- });
32
+ const PatternEmptyState = React.forwardRef(({ heading, description, illustration, actions, ...restProps }, ref) => /* @__PURE__ */ jsxs(Container, { ref, ...restProps, children: [
33
+ heading != null && /* @__PURE__ */ jsx(
34
+ Heading,
35
+ {
36
+ ref,
37
+ level: 2,
38
+ css: { fontFamily: "$display", fontSize: "$350" },
39
+ children: heading
40
+ }
41
+ ),
42
+ description != null && /* @__PURE__ */ jsx(Description, { css: { color: "$text-neutrals-subtle" }, children: description }),
43
+ actions != null && /* @__PURE__ */ jsxs(Actions, { children: [
44
+ /* @__PURE__ */ jsx(BaseActionButton, { variant: "primary", ...actions.primary }),
45
+ actions.secondary != null && /* @__PURE__ */ jsx(BaseActionButton, { ...actions.secondary, variant: "ghost" })
46
+ ] })
47
+ ] }));
59
48
 
60
49
  export { PatternEmptyState };
61
50
  //# 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'\nimport { useCanvas26 } from '@mirohq/design-system-experiments'\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 minHeight: '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 = React.forwardRef<\n ElementRef<typeof Button>,\n BaseActionButtonProps\n>(({ label, ...actionProps }, ref) => (\n <Button ref={ref} {...actionProps}>\n {label}\n </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 const [isCanvas26] = useCanvas26()\n\n return (\n <Container ref={ref} {...restProps}>\n {illustration != null && !isCanvas26 && (\n <Illustration src={illustration} aria-hidden alt='' />\n )}\n {heading != null && (\n <Heading\n ref={ref}\n level={2}\n {...(isCanvas26\n ? { css: { fontFamily: '$display', fontSize: '$350' } }\n : { styledAs: 'h3' })}\n >\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})\n"],"names":[],"mappings":";;;;;;;;AAgCA,MAAM,SAAA,GAAY,OAAO,GAAA,EAAK;AAAA,EAC5B,UAAA,EAAY,aAAA;AAAA,EACZ,OAAA,EAAS,MAAA;AAAA,EACT,OAAA,EAAS,MAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,QAAA,EAAU,OAAA;AAAA,EACV,QAAA,EAAU,OAAA;AAAA,EACV,SAAA,EAAW,QAAA;AAAA,EACX,UAAA,EAAY;AACd,CAAC,CAAA;AAED,MAAM,YAAA,GAAe,OAAO,KAAA,EAAO;AAAA,EACjC,KAAA,EAAO,MAAA;AAAA,EACP,SAAA,EAAW,MAAA;AAAA,EACX,OAAA,EAAS,OAAA;AAAA,EACT,YAAA,EAAc;AAChB,CAAC,CAAA;AAED,MAAM,WAAA,GAAc,OAAO,GAAA,EAAK;AAAA,EAC9B,KAAA,EAAO,uBAAA;AAAA,EACP,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU;AACZ,CAAC,CAAA;AAED,MAAM,OAAA,GAAU,OAAO,GAAA,EAAK;AAAA,EAC1B,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU,MAAA;AAAA,EACV,OAAA,EAAS,MAAA;AAAA,EACT,aAA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A,EAAA,EAAiB,OAAA,EAAQ,SAAA,EAAW,GAAG,QAAQ,OAAA,EAAS,CAAA;AAAA,MAExD,OAAA,CAAQ,aAAa,IAAA,oBACpB,GAAA,CAAC,oBAAkB,GAAG,OAAA,CAAQ,SAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ;AAAA,KAAA,EAE7D;AAAA,GAAA,EAEJ,CAAA;AAEJ,CAAC;;;;"}
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 PatternEmptyStateProps extends Omit<BoxProps, 'children'> {\n heading?: ReactNode\n description?: ReactNode\n /**\n * @deprecated No longer rendered.\n */\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 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 = React.forwardRef<\n ElementRef<typeof Button>,\n BaseActionButtonProps\n>(({ label, ...actionProps }, ref) => (\n <Button ref={ref} {...actionProps}>\n {label}\n </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 {heading != null && (\n <Heading\n ref={ref}\n level={2}\n css={{ fontFamily: '$display', fontSize: '$350' }}\n >\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":";;;;;;;AAkCA,MAAM,SAAA,GAAY,OAAO,GAAA,EAAK;AAAA,EAC5B,UAAA,EAAY,aAAA;AAAA,EACZ,OAAA,EAAS,MAAA;AAAA,EACT,OAAA,EAAS,MAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,QAAA,EAAU,OAAA;AAAA,EACV,QAAA,EAAU,OAAA;AAAA,EACV,SAAA,EAAW,QAAA;AAAA,EACX,UAAA,EAAY;AACd,CAAC,CAAA;AAED,MAAM,WAAA,GAAc,OAAO,GAAA,EAAK;AAAA,EAC9B,KAAA,EAAO,uBAAA;AAAA,EACP,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU;AACZ,CAAC,CAAA;AAED,MAAM,OAAA,GAAU,OAAO,GAAA,EAAK;AAAA,EAC1B,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU,MAAA;AAAA,EACV,OAAA,EAAS,MAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,GAAA,EAAK,MAAA;AAAA,EACL,UAAA,EAAY;AACd,CAAC,CAAA;AAED,MAAM,mBAAmB,KAAA,CAAM,UAAA,CAG7B,CAAC,EAAE,OAAO,GAAG,WAAA,EAAY,EAAG,GAAA,yBAC3B,MAAA,EAAA,EAAO,GAAA,EAAW,GAAG,WAAA,EACnB,iBACH,CACD,CAAA;AAIM,MAAM,oBAAoB,KAAA,CAAM,UAAA,CAGrC,CAAC,EAAE,SAAS,WAAA,EAAa,YAAA,EAAc,OAAA,EAAS,GAAG,WAAU,EAAG,GAAA,0BAC/D,SAAA,EAAA,EAAU,GAAA,EAAW,GAAG,SAAA,EACtB,QAAA,EAAA;AAAA,EAAA,OAAA,IAAW,IAAA,oBACV,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,KAAA,EAAO,CAAA;AAAA,MACP,GAAA,EAAK,EAAE,UAAA,EAAY,UAAA,EAAY,UAAU,MAAA,EAAO;AAAA,MAE/C,QAAA,EAAA;AAAA;AAAA,GACH;AAAA,EAED,WAAA,IAAe,wBACd,GAAA,CAAC,WAAA,EAAA,EAAY,KAAK,EAAE,KAAA,EAAO,uBAAA,EAAwB,EAChD,QAAA,EAAA,WAAA,EACH,CAAA;AAAA,EAED,OAAA,IAAW,IAAA,oBACV,IAAA,CAAC,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,gBAAA,EAAA,EAAiB,OAAA,EAAQ,SAAA,EAAW,GAAG,QAAQ,OAAA,EAAS,CAAA;AAAA,IAExD,OAAA,CAAQ,aAAa,IAAA,oBACpB,GAAA,CAAC,oBAAkB,GAAG,OAAA,CAAQ,SAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ;AAAA,GAAA,EAE7D;AAAA,CAAA,EAEJ,CACD;;;;"}
package/dist/types.d.ts CHANGED
@@ -5,6 +5,9 @@ import { BoxProps } from '@mirohq/design-system-box';
5
5
  interface PatternEmptyStateProps extends Omit<BoxProps, 'children'> {
6
6
  heading?: ReactNode;
7
7
  description?: ReactNode;
8
+ /**
9
+ * @deprecated No longer rendered.
10
+ */
8
11
  illustration?: string;
9
12
  actions?: {
10
13
  primary: ActionButton & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-empty-state",
3
- "version": "0.1.6",
3
+ "version": "0.2.0-kill-new-lightdark-themes.2",
4
4
  "description": "Empty state pattern for the Miro Design System",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -26,11 +26,10 @@
26
26
  "react": "^16.14 || ^17 || ^18 || ^19"
27
27
  },
28
28
  "dependencies": {
29
- "@mirohq/design-system-button": "^5.3.20",
30
- "@mirohq/design-system-experiments": "^1.1.0",
31
- "@mirohq/design-system-typography": "^1.3.37",
32
- "@mirohq/design-system-stitches": "^3.3.35",
33
- "@mirohq/design-system-box": "^3.2.37"
29
+ "@mirohq/design-system-button": "^5.3.21-kill-new-lightdark-themes.2",
30
+ "@mirohq/design-system-stitches": "^3.3.36-kill-new-lightdark-themes.2",
31
+ "@mirohq/design-system-box": "^3.2.38-kill-new-lightdark-themes.2",
32
+ "@mirohq/design-system-typography": "^1.3.38-kill-new-lightdark-themes.2"
34
33
  },
35
34
  "devDependencies": {
36
35
  "@mirohq/brand-assets": "^1.1.2"