@cloudtower/eagle 0.26.17 → 0.26.19
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/components/Card/index.d.ts +12 -3
- package/dist/components/Steps/style.d.ts +5 -0
- package/dist/components/Token/index.d.ts +10 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components.css +237 -125
- package/dist/esm/index.js +126 -64
- package/dist/esm/stats1.html +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/spec/base.d.ts +23 -8
- package/dist/style.css +300 -188
- package/dist/umd/index.js +129 -67
- package/dist/umd/stats1.html +1 -1
- package/dist/variables.scss +7 -3
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export * from '@cloudtower/parrot';
|
|
|
10
10
|
import { useTranslation, withTranslation } from 'react-i18next';
|
|
11
11
|
import { cx } from '@linaria/core';
|
|
12
12
|
import { styled } from '@linaria/react';
|
|
13
|
-
import { ArrowRightGrayIcon, ArrowChevronUp16SecondaryIcon, ArrowChevronDown16SecondaryIcon, PlusAddCreateNew16SecondaryIcon, HandlePoint816SecondaryIcon, HandlePoint816BlueIcon, XmarkRemove16SecondaryIcon, XmarkRemove16RegularRedIcon, CheckmarkDoneSuccessCorrect16BlueIcon, XmarkRemoveSmall16RegularInheritIcon } from '@cloudtower/icons-react';
|
|
13
|
+
import { ArrowRightGrayIcon, ArrowChevronUp16SecondaryIcon, ArrowChevronDown16SecondaryIcon, CheckmarkDoneSuccessCorrect16SecondaryIcon, PlusAddCreateNew16SecondaryIcon, HandlePoint816SecondaryIcon, HandlePoint816BlueIcon, XmarkRemove16SecondaryIcon, XmarkRemove16RegularRedIcon, CheckmarkDoneSuccessCorrect16BlueIcon, XmarkRemoveSmall16RegularInheritIcon } from '@cloudtower/icons-react';
|
|
14
14
|
import moment from 'moment';
|
|
15
15
|
import { findDOMNode } from 'react-dom';
|
|
16
16
|
import { isElement } from 'react-is';
|
|
@@ -24,8 +24,8 @@ import RCNotification from '@cloudtower/rc-notification';
|
|
|
24
24
|
import { combineReducers, createStore } from 'redux';
|
|
25
25
|
import { createDispatchHook, createSelectorHook, Provider } from 'react-redux';
|
|
26
26
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
27
|
-
import TimeZones from 'timezones.json';
|
|
28
27
|
import dayjs from 'dayjs';
|
|
28
|
+
import TimeZones from 'timezones.json';
|
|
29
29
|
import 'recharts';
|
|
30
30
|
import enUS from 'antd/lib/locale/en_US';
|
|
31
31
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
@@ -1171,6 +1171,7 @@ const Card = React__default.forwardRef(
|
|
|
1171
1171
|
subInfo,
|
|
1172
1172
|
className,
|
|
1173
1173
|
defaultOpen = false,
|
|
1174
|
+
hoverable,
|
|
1174
1175
|
shadow = true
|
|
1175
1176
|
} = _a, domProps = __objRest$p(_a, [
|
|
1176
1177
|
"collapsible",
|
|
@@ -1178,6 +1179,7 @@ const Card = React__default.forwardRef(
|
|
|
1178
1179
|
"subInfo",
|
|
1179
1180
|
"className",
|
|
1180
1181
|
"defaultOpen",
|
|
1182
|
+
"hoverable",
|
|
1181
1183
|
"shadow"
|
|
1182
1184
|
]);
|
|
1183
1185
|
const [open, setOpen] = useState(defaultOpen);
|
|
@@ -1185,7 +1187,7 @@ const Card = React__default.forwardRef(
|
|
|
1185
1187
|
CardWrapper,
|
|
1186
1188
|
__spreadProps$x(__spreadValues$H({
|
|
1187
1189
|
ref,
|
|
1188
|
-
className: cs(["card-wrapper", className])
|
|
1190
|
+
className: cs(["card-wrapper", className, hoverable && "hoverable"])
|
|
1189
1191
|
}, domProps), {
|
|
1190
1192
|
shadow
|
|
1191
1193
|
}),
|
|
@@ -3603,59 +3605,113 @@ const Speed = ({
|
|
|
3603
3605
|
return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
|
|
3604
3606
|
};
|
|
3605
3607
|
|
|
3608
|
+
const StepsStyle = "sq6vos1";
|
|
3609
|
+
const HorizontalStyle = "hjtnwxg";
|
|
3610
|
+
const VerticalStyle = "v1p8siwu";
|
|
3611
|
+
const HorizontalStepContentStyle = "h1xo7yjb";
|
|
3612
|
+
const VerticalStepContentStyle = "v1f2f7cy";
|
|
3613
|
+
|
|
3606
3614
|
var __defProp$e = Object.defineProperty;
|
|
3607
3615
|
var __defProps$e = Object.defineProperties;
|
|
3608
3616
|
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
3609
3617
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
3610
3618
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
3611
3619
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
3612
|
-
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, {
|
|
3613
|
-
enumerable: true,
|
|
3614
|
-
configurable: true,
|
|
3615
|
-
writable: true,
|
|
3616
|
-
value
|
|
3617
|
-
}) : obj[key] = value;
|
|
3620
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3618
3621
|
var __spreadValues$e = (a, b) => {
|
|
3619
|
-
for (var prop in b || (b = {}))
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3622
|
+
for (var prop in b || (b = {}))
|
|
3623
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
3624
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
3625
|
+
if (__getOwnPropSymbols$e)
|
|
3626
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
3627
|
+
if (__propIsEnum$e.call(b, prop))
|
|
3628
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
3629
|
+
}
|
|
3623
3630
|
return a;
|
|
3624
3631
|
};
|
|
3625
3632
|
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
3626
3633
|
var __objRest$5 = (source, exclude) => {
|
|
3627
3634
|
var target = {};
|
|
3628
|
-
for (var prop in source)
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3635
|
+
for (var prop in source)
|
|
3636
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3637
|
+
target[prop] = source[prop];
|
|
3638
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
3639
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
3640
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
3641
|
+
target[prop] = source[prop];
|
|
3642
|
+
}
|
|
3632
3643
|
return target;
|
|
3633
3644
|
};
|
|
3634
|
-
const
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3645
|
+
const StepTitle = (props) => {
|
|
3646
|
+
const { current, step, index, isVerticalMode } = props;
|
|
3647
|
+
const textRef = useRef(null);
|
|
3648
|
+
const [tooltipEnable, setTooltipEnable] = useState({
|
|
3649
|
+
visible: false
|
|
3650
|
+
});
|
|
3651
|
+
useLayoutEffect(() => {
|
|
3652
|
+
if (textRef.current && textRef.current.offsetWidth < textRef.current.scrollWidth) {
|
|
3653
|
+
setTooltipEnable({});
|
|
3654
|
+
}
|
|
3655
|
+
}, [textRef]);
|
|
3656
|
+
return /* @__PURE__ */ React__default.createElement(Tooltip, __spreadProps$e(__spreadValues$e({}, tooltipEnable), { title: step.title }), /* @__PURE__ */ React__default.createElement(
|
|
3657
|
+
"div",
|
|
3641
3658
|
{
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
}
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
+
className: isVerticalMode ? VerticalStepContentStyle : HorizontalStepContentStyle
|
|
3660
|
+
},
|
|
3661
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "step-item-prefix-container" }, index < current ? /* @__PURE__ */ React__default.createElement(CheckmarkDoneSuccessCorrect16SecondaryIcon, null) : index + 1),
|
|
3662
|
+
/* @__PURE__ */ React__default.createElement("span", { ref: textRef, className: "step-item-title" }, /* @__PURE__ */ React__default.createElement("span", { className: "step-item-title" }, step.title))
|
|
3663
|
+
));
|
|
3664
|
+
};
|
|
3665
|
+
const Steps = (props) => {
|
|
3666
|
+
const _a = props, {
|
|
3667
|
+
stepsConfig,
|
|
3668
|
+
direction,
|
|
3669
|
+
containerClassname,
|
|
3670
|
+
current = 0,
|
|
3671
|
+
disabled
|
|
3672
|
+
} = _a, stepsProps = __objRest$5(_a, [
|
|
3673
|
+
"stepsConfig",
|
|
3674
|
+
"direction",
|
|
3675
|
+
"containerClassname",
|
|
3676
|
+
"current",
|
|
3677
|
+
"disabled"
|
|
3678
|
+
]);
|
|
3679
|
+
const isVerticalMode = direction === "vertical";
|
|
3680
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
3681
|
+
"div",
|
|
3682
|
+
{
|
|
3683
|
+
className: cs(
|
|
3684
|
+
containerClassname,
|
|
3685
|
+
StepsStyle,
|
|
3686
|
+
isVerticalMode ? VerticalStyle : HorizontalStyle
|
|
3687
|
+
)
|
|
3688
|
+
},
|
|
3689
|
+
/* @__PURE__ */ React__default.createElement(
|
|
3690
|
+
Steps$1,
|
|
3691
|
+
__spreadProps$e(__spreadValues$e({}, stepsProps), {
|
|
3692
|
+
direction,
|
|
3693
|
+
current,
|
|
3694
|
+
type: "default"
|
|
3695
|
+
}),
|
|
3696
|
+
(stepsConfig == null ? void 0 : stepsConfig.length) ? stepsConfig.map((step, index) => /* @__PURE__ */ React__default.createElement(
|
|
3697
|
+
Steps$1.Step,
|
|
3698
|
+
__spreadProps$e(__spreadValues$e({
|
|
3699
|
+
key: index
|
|
3700
|
+
}, step), {
|
|
3701
|
+
disabled: disabled || index > current,
|
|
3702
|
+
title: /* @__PURE__ */ React__default.createElement(
|
|
3703
|
+
StepTitle,
|
|
3704
|
+
{
|
|
3705
|
+
index,
|
|
3706
|
+
step,
|
|
3707
|
+
current,
|
|
3708
|
+
isVerticalMode
|
|
3709
|
+
}
|
|
3710
|
+
)
|
|
3711
|
+
})
|
|
3712
|
+
)) : props.children
|
|
3713
|
+
)
|
|
3714
|
+
);
|
|
3659
3715
|
};
|
|
3660
3716
|
|
|
3661
3717
|
var __defProp$d = Object.defineProperty;
|
|
@@ -5032,6 +5088,23 @@ const Tag = (_a) => {
|
|
|
5032
5088
|
};
|
|
5033
5089
|
Tag.SplitTag = SplitTag;
|
|
5034
5090
|
|
|
5091
|
+
const Time = (props) => {
|
|
5092
|
+
const {
|
|
5093
|
+
className,
|
|
5094
|
+
date,
|
|
5095
|
+
dateTemplate = "YYYY-MM-DD",
|
|
5096
|
+
timeTemplate = "HH:mm",
|
|
5097
|
+
plainText
|
|
5098
|
+
} = props;
|
|
5099
|
+
if (!date)
|
|
5100
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, "-");
|
|
5101
|
+
const time = dayjs(date);
|
|
5102
|
+
if (plainText) {
|
|
5103
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, dateTemplate !== null && time.format(dateTemplate), " ", timeTemplate !== null && time.format(timeTemplate));
|
|
5104
|
+
}
|
|
5105
|
+
return /* @__PURE__ */ React__default.createElement("span", { className: `time-wrapper ${className || ""}` }, dateTemplate !== null && /* @__PURE__ */ React__default.createElement("span", { className: "date" }, " ", time.format(dateTemplate)), timeTemplate !== null && /* @__PURE__ */ React__default.createElement("span", { className: "time" }, " ", time.format(timeTemplate)));
|
|
5106
|
+
};
|
|
5107
|
+
|
|
5035
5108
|
const allTimeZones = uniqBy(TimeZones.reduce((sum, zone) => {
|
|
5036
5109
|
const utcZones = zone.utc.map(utc => {
|
|
5037
5110
|
return {
|
|
@@ -5219,7 +5292,7 @@ const Size = {
|
|
|
5219
5292
|
large: "l1d492wb"
|
|
5220
5293
|
};
|
|
5221
5294
|
const TokenStyle = "t1lzavmu";
|
|
5222
|
-
const Token = _a => {
|
|
5295
|
+
const Token = React__default.forwardRef((_a, ref) => {
|
|
5223
5296
|
var _b = _a,
|
|
5224
5297
|
{
|
|
5225
5298
|
size = "small",
|
|
@@ -5227,26 +5300,32 @@ const Token = _a => {
|
|
|
5227
5300
|
className,
|
|
5228
5301
|
icon,
|
|
5229
5302
|
checked,
|
|
5230
|
-
children
|
|
5303
|
+
children,
|
|
5304
|
+
tooltipConfig
|
|
5231
5305
|
} = _b,
|
|
5232
|
-
props = __objRest(_b, ["size", "color", "className", "icon", "checked", "children"]);
|
|
5306
|
+
props = __objRest(_b, ["size", "color", "className", "icon", "checked", "children", "tooltipConfig"]);
|
|
5233
5307
|
return /* @__PURE__ */React__default.createElement(Tag$1, __spreadProps$3(__spreadValues$3({}, props), {
|
|
5308
|
+
ref,
|
|
5234
5309
|
className: cs(className, Size[size], TokenStyle, {
|
|
5235
5310
|
[Typo.Label.l4_regular]: size === "small" || size === "medium",
|
|
5236
5311
|
[Typo.Label.l3_regular]: size === "large",
|
|
5237
5312
|
[`ant-tag-${color}`]: PresetColors.includes(color)
|
|
5238
5313
|
}, "ui-kit-token", checked && "ui-kit-token-checked"),
|
|
5239
|
-
closeIcon: /* @__PURE__ */React__default.createElement(
|
|
5314
|
+
closeIcon: /* @__PURE__ */React__default.createElement(Tooltip, __spreadValues$3({
|
|
5315
|
+
title: tooltipConfig == null ? void 0 : tooltipConfig.title
|
|
5316
|
+
}, !(tooltipConfig == null ? void 0 : tooltipConfig.title) && {
|
|
5317
|
+
visible: false
|
|
5318
|
+
}), /* @__PURE__ */React__default.createElement(Icon, {
|
|
5240
5319
|
className: "selected-icon",
|
|
5241
5320
|
src: XmarkRemoveSmall16RegularInheritIcon,
|
|
5242
5321
|
iconHeight: 16,
|
|
5243
5322
|
iconWidth: 16
|
|
5244
|
-
}),
|
|
5323
|
+
})),
|
|
5245
5324
|
color: color === "gray" ? void 0 : color
|
|
5246
5325
|
}), icon && /* @__PURE__ */React__default.createElement("span", {
|
|
5247
5326
|
className: cs("ui-kit-tag-icon", IconStyle)
|
|
5248
5327
|
}, icon), children);
|
|
5249
|
-
};
|
|
5328
|
+
});
|
|
5250
5329
|
|
|
5251
5330
|
const Inline = "i1e4sgug";
|
|
5252
5331
|
const Truncate = props => {
|
|
@@ -5289,23 +5368,6 @@ const Truncate = props => {
|
|
|
5289
5368
|
}, Text);
|
|
5290
5369
|
};
|
|
5291
5370
|
|
|
5292
|
-
const Time = (props) => {
|
|
5293
|
-
const {
|
|
5294
|
-
className,
|
|
5295
|
-
date,
|
|
5296
|
-
dateTemplate = "YYYY-MM-DD",
|
|
5297
|
-
timeTemplate = "HH:mm",
|
|
5298
|
-
plainText
|
|
5299
|
-
} = props;
|
|
5300
|
-
if (!date)
|
|
5301
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, "-");
|
|
5302
|
-
const time = dayjs(date);
|
|
5303
|
-
if (plainText) {
|
|
5304
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, dateTemplate !== null && time.format(dateTemplate), " ", timeTemplate !== null && time.format(timeTemplate));
|
|
5305
|
-
}
|
|
5306
|
-
return /* @__PURE__ */ React__default.createElement("span", { className: `time-wrapper ${className || ""}` }, dateTemplate !== null && /* @__PURE__ */ React__default.createElement("span", { className: "date" }, " ", time.format(dateTemplate)), timeTemplate !== null && /* @__PURE__ */ React__default.createElement("span", { className: "time" }, " ", time.format(timeTemplate)));
|
|
5307
|
-
};
|
|
5308
|
-
|
|
5309
5371
|
function getAntdKit() {
|
|
5310
5372
|
const kit = {
|
|
5311
5373
|
loading: Loading,
|