@mirohq/design-system-empty-state 0.1.0
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 +63 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +61 -0
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +23 -0
- package/package.json +43 -0
package/dist/main.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
6
|
+
var designSystemBox = require('@mirohq/design-system-box');
|
|
7
|
+
var designSystemButton = require('@mirohq/design-system-button');
|
|
8
|
+
var designSystemTypography = require('@mirohq/design-system-typography');
|
|
9
|
+
var designSystemExperiments = require('@mirohq/design-system-experiments');
|
|
10
|
+
|
|
11
|
+
const Container = designSystemStitches.styled(designSystemBox.Box, {
|
|
12
|
+
background: "transparent",
|
|
13
|
+
padding: "$500",
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
minWidth: "304px",
|
|
17
|
+
maxWidth: "480px",
|
|
18
|
+
textAlign: "center",
|
|
19
|
+
alignItems: "center"
|
|
20
|
+
});
|
|
21
|
+
const Illustration = designSystemStitches.styled("img", {
|
|
22
|
+
width: "72px",
|
|
23
|
+
minHeight: "72px",
|
|
24
|
+
display: "block",
|
|
25
|
+
marginBottom: "$150"
|
|
26
|
+
});
|
|
27
|
+
const Description = designSystemStitches.styled(designSystemBox.Box, {
|
|
28
|
+
color: "$text-neutrals-subtle",
|
|
29
|
+
marginTop: "$100",
|
|
30
|
+
maxWidth: "304px"
|
|
31
|
+
});
|
|
32
|
+
const Actions = designSystemStitches.styled(designSystemBox.Box, {
|
|
33
|
+
marginTop: "$150",
|
|
34
|
+
paddingY: "$200",
|
|
35
|
+
display: "flex",
|
|
36
|
+
flexDirection: "column",
|
|
37
|
+
gap: "$100",
|
|
38
|
+
alignItems: "center"
|
|
39
|
+
});
|
|
40
|
+
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
|
+
});
|
|
61
|
+
|
|
62
|
+
exports.PatternEmptyState = PatternEmptyState;
|
|
63
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +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,C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,EAAS,CAAA;AAAA,MAExD,OAAA,CAAQ,aAAa,IAAA,oBACpBA,cAAA,CAAC,oBAAkB,GAAG,OAAA,CAAQ,SAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ;AAAA,KAAA,EAE7D;AAAA,GAAA,EAEJ,CAAA;AAEJ,CAAC;;;;"}
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { styled } from '@mirohq/design-system-stitches';
|
|
4
|
+
import { Box } from '@mirohq/design-system-box';
|
|
5
|
+
import { Button } from '@mirohq/design-system-button';
|
|
6
|
+
import { Heading } from '@mirohq/design-system-typography';
|
|
7
|
+
import { useCanvas26 } from '@mirohq/design-system-experiments';
|
|
8
|
+
|
|
9
|
+
const Container = styled(Box, {
|
|
10
|
+
background: "transparent",
|
|
11
|
+
padding: "$500",
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "column",
|
|
14
|
+
minWidth: "304px",
|
|
15
|
+
maxWidth: "480px",
|
|
16
|
+
textAlign: "center",
|
|
17
|
+
alignItems: "center"
|
|
18
|
+
});
|
|
19
|
+
const Illustration = styled("img", {
|
|
20
|
+
width: "72px",
|
|
21
|
+
minHeight: "72px",
|
|
22
|
+
display: "block",
|
|
23
|
+
marginBottom: "$150"
|
|
24
|
+
});
|
|
25
|
+
const Description = styled(Box, {
|
|
26
|
+
color: "$text-neutrals-subtle",
|
|
27
|
+
marginTop: "$100",
|
|
28
|
+
maxWidth: "304px"
|
|
29
|
+
});
|
|
30
|
+
const Actions = styled(Box, {
|
|
31
|
+
marginTop: "$150",
|
|
32
|
+
paddingY: "$200",
|
|
33
|
+
display: "flex",
|
|
34
|
+
flexDirection: "column",
|
|
35
|
+
gap: "$100",
|
|
36
|
+
alignItems: "center"
|
|
37
|
+
});
|
|
38
|
+
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
|
+
});
|
|
59
|
+
|
|
60
|
+
export { PatternEmptyState };
|
|
61
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +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,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,iBAAA,GAAoB,KAAA,CAAM,UAAA,CAGrC,CAAC,EAAE,OAAA,EAAS,WAAA,EAAa,YAAA,EAAc,OAAA,EAAS,GAAG,SAAA,EAAU,EAAG,GA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
+
import { BoxProps } from '@mirohq/design-system-box';
|
|
4
|
+
|
|
5
|
+
interface PatternEmptyStateProps extends Omit<BoxProps, 'children'> {
|
|
6
|
+
heading?: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
illustration?: string;
|
|
9
|
+
actions?: {
|
|
10
|
+
primary: ActionButton & {
|
|
11
|
+
variant?: 'primary' | 'secondary';
|
|
12
|
+
};
|
|
13
|
+
secondary?: ActionButton;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
type BaseActionButtonProps = Omit<ButtonProps, 'children'> & {
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
type ActionButton = Omit<BaseActionButtonProps, 'variant'>;
|
|
20
|
+
declare const PatternEmptyState: React.ForwardRefExoticComponent<Omit<PatternEmptyStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
|
|
22
|
+
export { PatternEmptyState };
|
|
23
|
+
export type { PatternEmptyStateProps };
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mirohq/design-system-empty-state",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Empty state pattern for the Miro Design System",
|
|
5
|
+
"author": "Miro",
|
|
6
|
+
"source": "src/index.ts",
|
|
7
|
+
"main": "dist/main.js",
|
|
8
|
+
"module": "dist/module.js",
|
|
9
|
+
"types": "dist/types.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"require": "./dist/main.js",
|
|
14
|
+
"import": "./dist/module.js",
|
|
15
|
+
"types": "./dist/types.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@stitches/react": "^1.2.8",
|
|
26
|
+
"react": "^16.14 || ^17 || ^18 || ^19"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@mirohq/design-system-box": "^3.2.34",
|
|
30
|
+
"@mirohq/design-system-experiments": "^1.1.0",
|
|
31
|
+
"@mirohq/design-system-stitches": "^3.3.32",
|
|
32
|
+
"@mirohq/design-system-typography": "^1.3.34",
|
|
33
|
+
"@mirohq/design-system-button": "^5.3.14"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@mirohq/brand-assets": "^1.1.1"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "rollup -c ../../../rollup.config.js",
|
|
40
|
+
"clean": "rm -rf dist",
|
|
41
|
+
"prebuild": "pnpm clean"
|
|
42
|
+
}
|
|
43
|
+
}
|