@mirohq/design-system-empty-state 0.1.5 → 0.2.0-kill-new-lightdark-themes.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 +16 -27
- package/dist/main.js.map +1 -1
- package/dist/module.js +16 -27
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/package.json +5 -6
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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'\
|
|
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 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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
package/dist/module.js.map
CHANGED
|
@@ -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'\
|
|
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,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;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
|
|
3
|
+
"version": "0.2.0-kill-new-lightdark-themes.1",
|
|
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-
|
|
30
|
-
"@mirohq/design-system-stitches": "^3.3.
|
|
31
|
-
"@mirohq/design-system-button": "^5.3.
|
|
32
|
-
"@mirohq/design-system-typography": "^1.3.
|
|
33
|
-
"@mirohq/design-system-box": "^3.2.37"
|
|
29
|
+
"@mirohq/design-system-box": "^3.2.38-kill-new-lightdark-themes.1",
|
|
30
|
+
"@mirohq/design-system-stitches": "^3.3.36-kill-new-lightdark-themes.1",
|
|
31
|
+
"@mirohq/design-system-button": "^5.3.20-kill-new-lightdark-themes.1",
|
|
32
|
+
"@mirohq/design-system-typography": "^1.3.38-kill-new-lightdark-themes.1"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@mirohq/brand-assets": "^1.1.2"
|