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