@cloudtower/eagle 0.34.4 → 0.34.6

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.
@@ -0,0 +1,83 @@
1
+ import { cx } from '@linaria/core';
2
+ import { Typo } from '../Typo/index.js';
3
+ import React__default from 'react';
4
+ import { BlankStateWrapper } from './style.js';
5
+ import Button from '../Button/index.js';
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ const SIZE_FONT_MAP = {
24
+ large: {
25
+ title: Typo.Display.d2_bold_title,
26
+ desc: Typo.Label.l2_regular
27
+ },
28
+ medium: {
29
+ title: Typo.Display.d3_bold_title,
30
+ desc: Typo.Label.l3_regular
31
+ },
32
+ small: {
33
+ title: Typo.Heading.h2_bold_title,
34
+ desc: Typo.Label.l4_regular
35
+ },
36
+ area: {
37
+ title: Typo.Heading.h2_bold_title,
38
+ desc: Typo.Label.l4_regular
39
+ },
40
+ xSmall: {
41
+ title: Typo.Heading.h2_regular_title
42
+ }
43
+ };
44
+ const BlankState = (props) => {
45
+ const {
46
+ className,
47
+ style,
48
+ width,
49
+ height,
50
+ title,
51
+ description,
52
+ action,
53
+ backgroundColor,
54
+ size = "medium"
55
+ } = props;
56
+ const fontStyle = SIZE_FONT_MAP[size];
57
+ const buttonSize = size === "large" || size === "medium" ? "middle" : "small";
58
+ return /* @__PURE__ */ React__default.createElement(
59
+ "div",
60
+ {
61
+ className: cx(className, BlankStateWrapper, size, backgroundColor),
62
+ style: __spreadValues({
63
+ width: typeof width === "number" ? `${width}px` : width,
64
+ height: typeof height === "number" ? `${height}px` : height
65
+ }, style || {})
66
+ },
67
+ /* @__PURE__ */ React__default.createElement("div", { className: cx("title", fontStyle.title) }, title),
68
+ size !== "xSmall" && description ? /* @__PURE__ */ React__default.createElement("div", { className: cx("desc", fontStyle.desc) }, description) : null,
69
+ action ? /* @__PURE__ */ React__default.createElement(
70
+ Button,
71
+ {
72
+ type: "ordinary",
73
+ size: buttonSize,
74
+ className: cx("action-button", buttonSize),
75
+ onClick: action.onClick
76
+ },
77
+ action.label
78
+ ) : null
79
+ );
80
+ };
81
+ var BlankState$1 = BlankState;
82
+
83
+ export { BlankState$1 as default };
@@ -0,0 +1,3 @@
1
+ const BlankStateWrapper = "E_b1lj76ty";
2
+
3
+ export { BlankStateWrapper };
@@ -19,7 +19,9 @@ const DeleteDialog = props => {
19
19
  onOk,
20
20
  onCancel,
21
21
  className,
22
- confirmLoading
22
+ confirmLoading,
23
+ error,
24
+ showFooterErrorIcon
23
25
  } = props;
24
26
  return /* @__PURE__ */React__default.createElement(SmallDialog, {
25
27
  title,
@@ -32,7 +34,9 @@ const DeleteDialog = props => {
32
34
  okButtonProps: {
33
35
  danger: true
34
36
  },
35
- confirmLoading
37
+ confirmLoading,
38
+ error,
39
+ showFooterErrorIcon
36
40
  }, description && /* @__PURE__ */React__default.createElement("div", {
37
41
  className: cx(ContentStyle, Typo.Label.l2_regular)
38
42
  }, description), secondaryDesc && /* @__PURE__ */React__default.createElement("div", {
@@ -3,6 +3,7 @@ import { Typo } from '../../../core/Typo/index.js';
3
3
  import React__default from 'react';
4
4
  import { SmallDialog } from '../../../core/SmallDialog/SmallDialog.js';
5
5
  import { RejectDialogType } from './RejectDialog.type.js';
6
+ import useParrotTranslation from '../../../hooks/useParrotTranslation.js';
6
7
 
7
8
  const ContentList = "E_c1ss4prm";
8
9
  const MultiRejectContentList = "E_ms3tlei";
@@ -25,13 +26,19 @@ const SingleRejectContent = ({
25
26
  }, content);
26
27
  };
27
28
  const MultiRejectContent = ({
28
- content
29
- }) => /* @__PURE__ */React__default.createElement("div", {
30
- className: cx(MultiRejectContentList)
31
- }, Object.entries(content).map(([name, reasons], index) => /* @__PURE__ */React__default.createElement("li", {
32
- className: Typo.Label.l4_regular,
33
- key: index
34
- }, name, ": ", reasons.join("; "))));
29
+ content,
30
+ resourceIcon
31
+ }) => {
32
+ const {
33
+ t
34
+ } = useParrotTranslation();
35
+ return /* @__PURE__ */React__default.createElement("div", {
36
+ className: cx(MultiRejectContentList)
37
+ }, Object.entries(content).map(([name, reasons], index) => /* @__PURE__ */React__default.createElement("li", {
38
+ className: Typo.Label.l4_regular,
39
+ key: index
40
+ }, resourceIcon, /* @__PURE__ */React__default.createElement("span", null, name + t("common.colon_with_space") + reasons.join(t("common.semicolon_with_space"))))));
41
+ };
35
42
  const RejectDialog = props => {
36
43
  const {
37
44
  title,
@@ -55,7 +62,8 @@ const RejectDialog = props => {
55
62
  }), /* @__PURE__ */React__default.createElement("div", {
56
63
  className: cx(Description, Typo.Label.l3_regular)
57
64
  }, props.partialDescription)), /* @__PURE__ */React__default.createElement(MultiRejectContent, {
58
- content: props.content
65
+ content: props.content,
66
+ resourceIcon: props.resourceIcon
59
67
  }));
60
68
  case RejectDialogType.Custom:
61
69
  return props.customContent;
package/dist/esm/index.js CHANGED
@@ -17,6 +17,7 @@ export { default as Badge } from './core/Badge/index.js';
17
17
  export { default as BaseIcon } from './core/BaseIcon/index.js';
18
18
  export { default as Bit } from './core/Bit/index.js';
19
19
  export { default as BitPerSecond } from './core/BitPerSecond/index.js';
20
+ export { default as BlankState } from './core/BlankState/index.js';
20
21
  export { default as Bps } from './core/Bps/index.js';
21
22
  export { BreadWrapper, default as Breadcrumb } from './core/Breadcrumb/index.js';
22
23
  export { default as Button } from './core/Button/index.js';