@astral/ui 0.11.0 → 0.12.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/Placeholder/Placeholder.d.ts +3 -0
- package/Placeholder/Placeholder.js +21 -0
- package/Placeholder/index.d.ts +1 -0
- package/Placeholder/index.js +13 -0
- package/Placeholder/styled.d.ts +27 -0
- package/Placeholder/styled.js +34 -0
- package/Placeholder/types.d.ts +8 -0
- package/Placeholder/types.js +2 -0
- package/esm/Placeholder/Placeholder.d.ts +3 -0
- package/esm/Placeholder/Placeholder.js +17 -0
- package/esm/Placeholder/index.d.ts +1 -0
- package/esm/Placeholder/index.js +1 -0
- package/esm/Placeholder/styled.d.ts +27 -0
- package/esm/Placeholder/styled.js +31 -0
- package/esm/Placeholder/types.d.ts +8 -0
- package/esm/Placeholder/types.js +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Placeholder = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var styled_1 = require("./styled");
|
|
17
|
+
var Placeholder = function (_a) {
|
|
18
|
+
var title = _a.title, imgSrc = _a.imgSrc, imgAlt = _a.imgAlt, description = _a.description, Actions = _a.Actions;
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(styled_1.StyledContainer, { children: [(0, jsx_runtime_1.jsxs)(styled_1.StyledInnerContainer, { children: [imgSrc && (0, jsx_runtime_1.jsx)(styled_1.StyledImage, { src: imgSrc, alt: imgAlt }, void 0), title && (0, jsx_runtime_1.jsx)(styled_1.StyledTitle, __assign({ variant: "h4" }, { children: title }), void 0), description && ((0, jsx_runtime_1.jsx)(styled_1.StyledDescription, __assign({ variant: "ui" }, { children: description }), void 0))] }, void 0), Actions && (0, jsx_runtime_1.jsx)(styled_1.StyledActions, { children: Actions }, void 0)] }, void 0));
|
|
20
|
+
};
|
|
21
|
+
exports.Placeholder = Placeholder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Placeholder';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Placeholder"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const StyledInnerContainer: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const StyledImage: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
14
|
+
export declare const StyledTitle: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").TypographyProps<"span", {}>, "variant"> & {
|
|
15
|
+
variant?: "small" | import("@mui/material").TypographyVariant | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | undefined;
|
|
16
|
+
} & {
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
}, {}, {}>;
|
|
19
|
+
export declare const StyledDescription: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").TypographyProps<"span", {}>, "variant"> & {
|
|
20
|
+
variant?: "small" | import("@mui/material").TypographyVariant | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
+
}, {}, {}>;
|
|
24
|
+
export declare const StyledActions: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.StyledActions = exports.StyledDescription = exports.StyledTitle = exports.StyledImage = exports.StyledInnerContainer = exports.StyledContainer = void 0;
|
|
8
|
+
var styles_1 = require("../styles");
|
|
9
|
+
var Typography_1 = require("../Typography");
|
|
10
|
+
exports.StyledContainer = styles_1.styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n padding: ", ";\n\n background-color: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n padding: ", ";\n\n background-color: ", ";\n"])), function (_a) {
|
|
11
|
+
var theme = _a.theme;
|
|
12
|
+
return theme.spacing(4);
|
|
13
|
+
}, function (_a) {
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return theme.palette.background.paper;
|
|
16
|
+
});
|
|
17
|
+
exports.StyledInnerContainer = styles_1.styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 384px;\n"], ["\n width: 384px;\n"])));
|
|
18
|
+
exports.StyledImage = styles_1.styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: auto;\n height: 162px;\n margin: auto;\n margin-bottom: ", ";\n"], ["\n display: block;\n width: auto;\n height: 162px;\n margin: auto;\n margin-bottom: ", ";\n"])), function (_a) {
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return theme.spacing(8);
|
|
21
|
+
});
|
|
22
|
+
exports.StyledTitle = (0, styles_1.styled)(Typography_1.Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: ", ";\n\n text-align: center;\n"], ["\n margin-bottom: ", ";\n\n text-align: center;\n"])), function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return theme.spacing(4);
|
|
25
|
+
});
|
|
26
|
+
exports.StyledDescription = (0, styles_1.styled)(Typography_1.Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n\n text-align: center;\n"], ["\n display: block;\n\n text-align: center;\n"])));
|
|
27
|
+
exports.StyledActions = styles_1.styled.footer(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n margin-top: ", ";\n\n > * {\n margin: ", ";\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n margin-top: ", ";\n\n > * {\n margin: ", ";\n }\n"])), function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return theme.spacing(5);
|
|
30
|
+
}, function (_a) {
|
|
31
|
+
var theme = _a.theme;
|
|
32
|
+
return theme.spacing(1);
|
|
33
|
+
});
|
|
34
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { StyledActions, StyledContainer, StyledDescription, StyledImage, StyledInnerContainer, StyledTitle, } from './styled';
|
|
14
|
+
export var Placeholder = function (_a) {
|
|
15
|
+
var title = _a.title, imgSrc = _a.imgSrc, imgAlt = _a.imgAlt, description = _a.description, Actions = _a.Actions;
|
|
16
|
+
return (_jsxs(StyledContainer, { children: [_jsxs(StyledInnerContainer, { children: [imgSrc && _jsx(StyledImage, { src: imgSrc, alt: imgAlt }, void 0), title && _jsx(StyledTitle, __assign({ variant: "h4" }, { children: title }), void 0), description && (_jsx(StyledDescription, __assign({ variant: "ui" }, { children: description }), void 0))] }, void 0), Actions && _jsx(StyledActions, { children: Actions }, void 0)] }, void 0));
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Placeholder';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Placeholder';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const StyledInnerContainer: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const StyledImage: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
14
|
+
export declare const StyledTitle: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").TypographyProps<"span", {}>, "variant"> & {
|
|
15
|
+
variant?: "small" | import("@mui/material").TypographyVariant | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | undefined;
|
|
16
|
+
} & {
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
}, {}, {}>;
|
|
19
|
+
export declare const StyledDescription: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").TypographyProps<"span", {}>, "variant"> & {
|
|
20
|
+
variant?: "small" | import("@mui/material").TypographyVariant | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
+
}, {}, {}>;
|
|
24
|
+
export declare const StyledActions: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { styled } from '../styles';
|
|
6
|
+
import { Typography } from '../Typography';
|
|
7
|
+
export var StyledContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n padding: ", ";\n\n background-color: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n padding: ", ";\n\n background-color: ", ";\n"])), function (_a) {
|
|
8
|
+
var theme = _a.theme;
|
|
9
|
+
return theme.spacing(4);
|
|
10
|
+
}, function (_a) {
|
|
11
|
+
var theme = _a.theme;
|
|
12
|
+
return theme.palette.background.paper;
|
|
13
|
+
});
|
|
14
|
+
export var StyledInnerContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 384px;\n"], ["\n width: 384px;\n"])));
|
|
15
|
+
export var StyledImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: auto;\n height: 162px;\n margin: auto;\n margin-bottom: ", ";\n"], ["\n display: block;\n width: auto;\n height: 162px;\n margin: auto;\n margin-bottom: ", ";\n"])), function (_a) {
|
|
16
|
+
var theme = _a.theme;
|
|
17
|
+
return theme.spacing(8);
|
|
18
|
+
});
|
|
19
|
+
export var StyledTitle = styled(Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: ", ";\n\n text-align: center;\n"], ["\n margin-bottom: ", ";\n\n text-align: center;\n"])), function (_a) {
|
|
20
|
+
var theme = _a.theme;
|
|
21
|
+
return theme.spacing(4);
|
|
22
|
+
});
|
|
23
|
+
export var StyledDescription = styled(Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n\n text-align: center;\n"], ["\n display: block;\n\n text-align: center;\n"])));
|
|
24
|
+
export var StyledActions = styled.footer(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n margin-top: ", ";\n\n > * {\n margin: ", ";\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n margin-top: ", ";\n\n > * {\n margin: ", ";\n }\n"])), function (_a) {
|
|
25
|
+
var theme = _a.theme;
|
|
26
|
+
return theme.spacing(5);
|
|
27
|
+
}, function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return theme.spacing(1);
|
|
30
|
+
});
|
|
31
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -47,3 +47,4 @@ __exportStar(require("./ListItemButton"), exports);
|
|
|
47
47
|
__exportStar(require("./ListItemIcon"), exports);
|
|
48
48
|
__exportStar(require("./ListItemSecondaryAction"), exports);
|
|
49
49
|
__exportStar(require("./ListItemText"), exports);
|
|
50
|
+
__exportStar(require("./Placeholder"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"browser": "./src/index.ts",
|
|
5
5
|
"jest": {
|
|
6
6
|
"moduleNameMapper": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@astral/icons": "^0.
|
|
11
|
+
"@astral/icons": "^0.12.0",
|
|
12
12
|
"@emotion/cache": "11.7.1",
|
|
13
13
|
"@emotion/react": "11.8.1",
|
|
14
14
|
"@emotion/server": "11.4.0",
|