@cloudtower/eagle 0.34.4 → 0.34.5

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 };
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';