@astral/ui 1.16.2 → 1.16.3

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.
@@ -8,6 +8,14 @@ export declare type PlaceholderProps = {
8
8
  * Описание изображения
9
9
  */
10
10
  imgAlt: string;
11
+ /**
12
+ * ширина изображения
13
+ */
14
+ imgWidth?: string;
15
+ /**
16
+ * высота изображения
17
+ */
18
+ imgHeight?: string;
11
19
  /**
12
20
  * Заголовок
13
21
  */
@@ -21,4 +29,4 @@ export declare type PlaceholderProps = {
21
29
  */
22
30
  Actions?: ReactNode;
23
31
  };
24
- export declare const Placeholder: ({ title, imgSrc, imgAlt, description, Actions, }: PlaceholderProps) => JSX.Element;
32
+ export declare const Placeholder: ({ title, imgSrc, imgAlt, imgWidth, imgHeight, description, Actions, }: PlaceholderProps) => JSX.Element;
@@ -15,7 +15,7 @@ exports.Placeholder = void 0;
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
16
  var styles_1 = require("./styles");
17
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)(styles_1.PlaceholderRoot, { children: [(0, jsx_runtime_1.jsxs)(styles_1.PlaceholderInnerContainer, { children: [(0, jsx_runtime_1.jsx)(styles_1.PlaceholderImage, { src: imgSrc, alt: imgAlt }), (0, jsx_runtime_1.jsx)(styles_1.PlaceholderTitle, __assign({ variant: "h4" }, { children: title })), description && ((0, jsx_runtime_1.jsx)(styles_1.PlaceholderDescription, __assign({ variant: "ui" }, { children: description })))] }), Actions && (0, jsx_runtime_1.jsx)(styles_1.PlaceholderActions, { children: Actions })] }));
18
+ var title = _a.title, imgSrc = _a.imgSrc, imgAlt = _a.imgAlt, imgWidth = _a.imgWidth, imgHeight = _a.imgHeight, description = _a.description, Actions = _a.Actions;
19
+ return ((0, jsx_runtime_1.jsxs)(styles_1.PlaceholderRoot, { children: [(0, jsx_runtime_1.jsxs)(styles_1.PlaceholderInnerContainer, { children: [(0, jsx_runtime_1.jsx)(styles_1.PlaceholderImage, { src: imgSrc, alt: imgAlt, width: imgWidth, height: imgHeight }), (0, jsx_runtime_1.jsx)(styles_1.PlaceholderTitle, __assign({ variant: "h4" }, { children: title })), description && ((0, jsx_runtime_1.jsx)(styles_1.PlaceholderDescription, __assign({ variant: "ui" }, { children: description })))] }), Actions && (0, jsx_runtime_1.jsx)(styles_1.PlaceholderActions, { children: Actions })] }));
20
20
  };
21
21
  exports.Placeholder = Placeholder;
@@ -15,7 +15,13 @@ exports.PlaceholderRoot = styles_1.styled.div(templateObject_1 || (templateObjec
15
15
  return theme.palette.background.paper;
16
16
  });
17
17
  exports.PlaceholderInnerContainer = styles_1.styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-width: 384px;\n"], ["\n max-width: 384px;\n"])));
18
- exports.PlaceholderImage = styles_1.styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
18
+ exports.PlaceholderImage = styles_1.styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: ", ";\n height: ", ";\n margin: auto auto ", ";\n object-fit: contain;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: block;\n width: ", ";\n height: ", ";\n margin: auto auto ", ";\n object-fit: contain;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
19
+ var width = _a.width;
20
+ return width || '100%';
21
+ }, function (_a) {
22
+ var height = _a.height;
23
+ return height || 'auto';
24
+ }, function (_a) {
19
25
  var theme = _a.theme;
20
26
  return theme.spacing(6);
21
27
  }, function (_a) {
@@ -8,6 +8,14 @@ export declare type PlaceholderProps = {
8
8
  * Описание изображения
9
9
  */
10
10
  imgAlt: string;
11
+ /**
12
+ * ширина изображения
13
+ */
14
+ imgWidth?: string;
15
+ /**
16
+ * высота изображения
17
+ */
18
+ imgHeight?: string;
11
19
  /**
12
20
  * Заголовок
13
21
  */
@@ -21,4 +29,4 @@ export declare type PlaceholderProps = {
21
29
  */
22
30
  Actions?: ReactNode;
23
31
  };
24
- export declare const Placeholder: ({ title, imgSrc, imgAlt, description, Actions, }: PlaceholderProps) => JSX.Element;
32
+ export declare const Placeholder: ({ title, imgSrc, imgAlt, imgWidth, imgHeight, description, Actions, }: PlaceholderProps) => JSX.Element;
@@ -12,6 +12,6 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { PlaceholderActions, PlaceholderDescription, PlaceholderImage, PlaceholderInnerContainer, PlaceholderRoot, PlaceholderTitle, } from './styles';
14
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(PlaceholderRoot, { children: [_jsxs(PlaceholderInnerContainer, { children: [_jsx(PlaceholderImage, { src: imgSrc, alt: imgAlt }), _jsx(PlaceholderTitle, __assign({ variant: "h4" }, { children: title })), description && (_jsx(PlaceholderDescription, __assign({ variant: "ui" }, { children: description })))] }), Actions && _jsx(PlaceholderActions, { children: Actions })] }));
15
+ var title = _a.title, imgSrc = _a.imgSrc, imgAlt = _a.imgAlt, imgWidth = _a.imgWidth, imgHeight = _a.imgHeight, description = _a.description, Actions = _a.Actions;
16
+ return (_jsxs(PlaceholderRoot, { children: [_jsxs(PlaceholderInnerContainer, { children: [_jsx(PlaceholderImage, { src: imgSrc, alt: imgAlt, width: imgWidth, height: imgHeight }), _jsx(PlaceholderTitle, __assign({ variant: "h4" }, { children: title })), description && (_jsx(PlaceholderDescription, __assign({ variant: "ui" }, { children: description })))] }), Actions && _jsx(PlaceholderActions, { children: Actions })] }));
17
17
  };
@@ -12,7 +12,13 @@ export var PlaceholderRoot = styled.div(templateObject_1 || (templateObject_1 =
12
12
  return theme.palette.background.paper;
13
13
  });
14
14
  export var PlaceholderInnerContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-width: 384px;\n"], ["\n max-width: 384px;\n"])));
15
- export var PlaceholderImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
15
+ export var PlaceholderImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: ", ";\n height: ", ";\n margin: auto auto ", ";\n object-fit: contain;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: block;\n width: ", ";\n height: ", ";\n margin: auto auto ", ";\n object-fit: contain;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
16
+ var width = _a.width;
17
+ return width || '100%';
18
+ }, function (_a) {
19
+ var height = _a.height;
20
+ return height || 'auto';
21
+ }, function (_a) {
16
22
  var theme = _a.theme;
17
23
  return theme.spacing(6);
18
24
  }, function (_a) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@astral/ui",
3
3
  "browser": "./src/index.ts",
4
4
  "dependencies": {
5
- "@astral/icons": "^1.16.2",
5
+ "@astral/icons": "^1.16.3",
6
6
  "@emotion/cache": "11.7.1",
7
7
  "@emotion/react": "11.9.0",
8
8
  "@emotion/server": "11.4.0",
@@ -31,7 +31,7 @@
31
31
  "require": "./server/index.js"
32
32
  }
33
33
  },
34
- "version": "1.16.2",
34
+ "version": "1.16.3",
35
35
  "author": "Astral.Soft",
36
36
  "license": "MIT",
37
37
  "repository": {