@cloudtower/eagle 0.34.9 → 0.34.11
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/dist/cjs/core/Progress/progress.widgets.js +2 -2
- package/dist/cjs/coreX/CheckPointList/index.js +39 -13
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2518 -2503
- package/dist/esm/core/Progress/progress.widgets.js +2 -2
- package/dist/esm/coreX/CheckPointList/index.js +37 -12
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +2862 -2841
- package/dist/src/coreX/CheckPointList/checkpointlist.type.d.ts +17 -1
- package/dist/stories/docs/core/MediumDialog.stories.d.ts +4 -0
- package/dist/stories/docs/coreX/CheckPointList.stories.d.ts +1 -1
- package/dist/style.css +2518 -2503
- package/package.json +4 -4
|
@@ -34,13 +34,13 @@ var __objRest = (source, exclude) => {
|
|
|
34
34
|
return target;
|
|
35
35
|
};
|
|
36
36
|
const titleAreaStyle = "E_t1gvlxt5";
|
|
37
|
-
const
|
|
37
|
+
const _exp2 = /*#__PURE__*/() => props => props.gap;
|
|
38
38
|
const AreaWrapper = /*#__PURE__*/styled('div')({
|
|
39
39
|
name: "AreaWrapper",
|
|
40
40
|
class: "E_a1ji6r68",
|
|
41
41
|
propsAsIs: false,
|
|
42
42
|
vars: {
|
|
43
|
-
"a1ji6r68-0": [
|
|
43
|
+
"a1ji6r68-0": [_exp2(), "px"]
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
const Area = ({
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { XmarkFailedSeriousWarningFill16RedIcon, CheckmarkDoneSuccessCircleFill16GreenIcon, Loading16GradientBlueIcon, NoticeTriangleFill16YellowIcon } from '@cloudtower/icons-react';
|
|
1
|
+
import { XmarkFailedSeriousWarningFill16RedIcon, CheckmarkDoneSuccessCircleFill16GreenIcon, Loading16GradientBlueIcon, NoticeTriangleFill16YellowIcon, TimelineNotStart16GrayIcon } from '@cloudtower/icons-react';
|
|
2
2
|
import { cx } from '@linaria/core';
|
|
3
3
|
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
4
|
-
import { List } from 'antd5';
|
|
4
|
+
import { List, Flex } from 'antd5';
|
|
5
5
|
import React__default, { useState, useCallback } from 'react';
|
|
6
|
+
import cs from 'classnames';
|
|
6
7
|
import { CheckPointItemStyle, CheckPointListStyle, EmptyWrapper } from './checkpointlist.style.js';
|
|
7
8
|
import { Show } from '../Show/index.js';
|
|
8
9
|
import Icon from '../../core/Icon/index.js';
|
|
9
10
|
import { Typo } from '../../core/Typo/index.js';
|
|
11
|
+
import Button from '../../core/Button/index.js';
|
|
12
|
+
import Link from '../../core/Link/index.js';
|
|
10
13
|
import Tag from '../../core/Tag/index.js';
|
|
11
14
|
import Alert from '../../core/Alert/index.js';
|
|
12
15
|
import Switch from '../../core/Switch/index.js';
|
|
@@ -35,13 +38,15 @@ const CheckPointItem = ({
|
|
|
35
38
|
status,
|
|
36
39
|
key,
|
|
37
40
|
tagProps,
|
|
38
|
-
alertProps
|
|
41
|
+
alertProps,
|
|
42
|
+
actions
|
|
39
43
|
}) => {
|
|
40
44
|
const icon = {
|
|
41
45
|
failed: XmarkFailedSeriousWarningFill16RedIcon,
|
|
42
46
|
success: CheckmarkDoneSuccessCircleFill16GreenIcon,
|
|
43
47
|
loading: Loading16GradientBlueIcon,
|
|
44
|
-
warning: NoticeTriangleFill16YellowIcon
|
|
48
|
+
warning: NoticeTriangleFill16YellowIcon,
|
|
49
|
+
idle: TimelineNotStart16GrayIcon
|
|
45
50
|
};
|
|
46
51
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(List.Item, { className: cx(CheckPointItemStyle), key }, /* @__PURE__ */ React__default.createElement(Show, { condition: Boolean(icon) }, /* @__PURE__ */ React__default.createElement(
|
|
47
52
|
Icon,
|
|
@@ -50,7 +55,17 @@ const CheckPointItem = ({
|
|
|
50
55
|
className: "icon-wrapper",
|
|
51
56
|
isRotate: status === "loading"
|
|
52
57
|
}
|
|
53
|
-
)), /* @__PURE__ */ React__default.createElement("span", { className: cx(Typo.Label.l4_regular, "description") }, description), /* @__PURE__ */ React__default.createElement(
|
|
58
|
+
)), /* @__PURE__ */ React__default.createElement("span", { className: cx(Typo.Label.l4_regular, "description") }, description), /* @__PURE__ */ React__default.createElement(Flex, { gap: 8 }, /* @__PURE__ */ React__default.createElement(Show, { condition: Boolean(actions == null ? void 0 : actions.length) }, actions == null ? void 0 : actions.map((action) => {
|
|
59
|
+
if (action.type === "button") {
|
|
60
|
+
return /* @__PURE__ */ React__default.createElement(Button, __spreadValues({}, action.props));
|
|
61
|
+
}
|
|
62
|
+
if (action.type === "link") {
|
|
63
|
+
return /* @__PURE__ */ React__default.createElement(Link, __spreadValues({}, action.props));
|
|
64
|
+
}
|
|
65
|
+
if (action.type === "icon") {
|
|
66
|
+
return /* @__PURE__ */ React__default.createElement(Icon, __spreadValues({}, action.props));
|
|
67
|
+
}
|
|
68
|
+
})), /* @__PURE__ */ React__default.createElement(Show, { condition: Boolean(tagProps) }, /* @__PURE__ */ React__default.createElement(Tag, __spreadValues({}, tagProps))))), /* @__PURE__ */ React__default.createElement(Show, { condition: Boolean(alertProps) }, /* @__PURE__ */ React__default.createElement(Alert, __spreadValues({ showIcon: false }, alertProps))));
|
|
54
69
|
};
|
|
55
70
|
const CheckPointList = ({
|
|
56
71
|
items = [],
|
|
@@ -62,7 +77,8 @@ const CheckPointList = ({
|
|
|
62
77
|
emptyTextClassName,
|
|
63
78
|
onClickSwitch,
|
|
64
79
|
defaultChecked = false,
|
|
65
|
-
className
|
|
80
|
+
className,
|
|
81
|
+
border = true
|
|
66
82
|
}) => {
|
|
67
83
|
const { t } = useParrotTranslation();
|
|
68
84
|
const [checked, setChecked] = useState(defaultChecked);
|
|
@@ -72,14 +88,23 @@ const CheckPointList = ({
|
|
|
72
88
|
onClickSwitch == null ? void 0 : onClickSwitch(nextChecked);
|
|
73
89
|
}, [onClickSwitch, checked]);
|
|
74
90
|
const isEmpty = !items.length;
|
|
75
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
76
|
-
|
|
91
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
92
|
+
"div",
|
|
77
93
|
{
|
|
78
|
-
|
|
79
|
-
|
|
94
|
+
className: cs(CheckPointListStyle, className, {
|
|
95
|
+
border
|
|
96
|
+
})
|
|
80
97
|
},
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
/* @__PURE__ */ React__default.createElement("header", { className: cx(Typo.Label.l4_bold) }, title, /* @__PURE__ */ React__default.createElement(Show, { condition: showSwitchControl }, /* @__PURE__ */ React__default.createElement("span", { className: "switch-text" }, /* @__PURE__ */ React__default.createElement(Switch, { checked, onChange: onClickSwitchFn, size: "small" }), /* @__PURE__ */ React__default.createElement("span", null, switchText || t("common.show_unpassed"))))),
|
|
99
|
+
/* @__PURE__ */ React__default.createElement(
|
|
100
|
+
Show,
|
|
101
|
+
{
|
|
102
|
+
condition: isEmpty,
|
|
103
|
+
fallback: /* @__PURE__ */ React__default.createElement(List, { split: false, bordered: false }, items.map((item, index) => /* @__PURE__ */ React__default.createElement(CheckPointItem, __spreadProps(__spreadValues({}, item), { key: `checklist-item-${index}` }))))
|
|
104
|
+
},
|
|
105
|
+
emptyRender ? emptyRender(emptyText) : /* @__PURE__ */ React__default.createElement("div", { className: cx(EmptyWrapper, emptyTextClassName) }, emptyText)
|
|
106
|
+
)
|
|
107
|
+
);
|
|
83
108
|
};
|
|
84
109
|
|
|
85
110
|
export { CheckPointItem, CheckPointList };
|