@cloudtower/eagle 0.33.35 → 0.33.36
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/MediumDialog/MediumDialog.js +54 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.js +144 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.style.js +11 -0
- package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +5 -3
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/cjs/index.js +9 -2
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2393 -2324
- package/dist/esm/core/MediumDialog/MediumDialog.js +48 -0
- package/dist/esm/core/SmallDialog/SmallDialog.js +137 -0
- package/dist/esm/core/SmallDialog/SmallDialog.style.js +6 -0
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +5 -3
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +2875 -2807
- package/dist/src/core/MediumDialog/MediumDialog.d.ts +3 -0
- package/dist/src/core/MediumDialog/index.d.ts +1 -0
- package/dist/src/core/SmallDialog/SmallDialog.d.ts +3 -0
- package/dist/src/core/SmallDialog/SmallDialog.style.d.ts +4 -0
- package/dist/src/{coreX/Dialogs/SmallDialog.d.ts → core/SmallDialog/SmallDialog.type.d.ts} +12 -4
- package/dist/src/core/SmallDialog/index.d.ts +3 -0
- package/dist/src/core/index.d.ts +2 -0
- package/dist/src/coreX/Dialogs/DeleteDialog/DeleteDialog.type.d.ts +2 -0
- package/dist/src/coreX/Dialogs/index.d.ts +0 -1
- package/dist/stories/docs/core/MediumDialog.stories.d.ts +35 -0
- package/dist/stories/docs/core/SmallDialog.stories.d.ts +37 -0
- package/dist/stories/docs/coreX/Dialogs/DeleteDialog.stories.d.ts +5 -0
- package/dist/style.css +2193 -2124
- package/package.json +4 -4
- package/dist/cjs/coreX/Dialogs/SmallDialog.js +0 -86
- package/dist/esm/coreX/Dialogs/SmallDialog.js +0 -80
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var core = require('@linaria/core');
|
|
5
|
+
var index = require('../Typo/index.js');
|
|
6
|
+
var SmallDialog = require('../SmallDialog/SmallDialog.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value
|
|
21
|
+
}) : obj[key] = value;
|
|
22
|
+
var __spreadValues = (a, b) => {
|
|
23
|
+
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
24
|
+
if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
+
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
26
|
+
}
|
|
27
|
+
return a;
|
|
28
|
+
};
|
|
29
|
+
var __objRest = (source, exclude) => {
|
|
30
|
+
var target = {};
|
|
31
|
+
for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
32
|
+
if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
const MediumDialogStyle = "E_m5foqp8";
|
|
38
|
+
const MediumDialog = _a => {
|
|
39
|
+
var _b = _a,
|
|
40
|
+
{
|
|
41
|
+
className
|
|
42
|
+
} = _b,
|
|
43
|
+
restProps = __objRest(_b, ["className"]);
|
|
44
|
+
return /* @__PURE__ */React__default.default.createElement(SmallDialog.SmallDialog, __spreadValues({
|
|
45
|
+
TitleRender: ({
|
|
46
|
+
title
|
|
47
|
+
}) => /* @__PURE__ */React__default.default.createElement("span", {
|
|
48
|
+
className: index.Typo.Display.d1s_bold_title
|
|
49
|
+
}, title),
|
|
50
|
+
className: core.cx(MediumDialogStyle, className)
|
|
51
|
+
}, restProps));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
exports.MediumDialog = MediumDialog;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var iconsReact = require('@cloudtower/icons-react');
|
|
4
|
+
var core = require('@linaria/core');
|
|
5
|
+
var index = require('../KitStoreProvider/index.js');
|
|
6
|
+
var antd = require('antd');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var cs = require('classnames');
|
|
9
|
+
var index$4 = require('../../coreX/OverflowTooltip/index.js');
|
|
10
|
+
var index$1 = require('../../coreX/Show/index.js');
|
|
11
|
+
var SmallDialog_style = require('./SmallDialog.style.js');
|
|
12
|
+
var index$3 = require('../Icon/index.js');
|
|
13
|
+
var index$5 = require('../Button/index.js');
|
|
14
|
+
var antd5 = require('antd5');
|
|
15
|
+
var index$2 = require('../Typo/index.js');
|
|
16
|
+
|
|
17
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
|
|
19
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
20
|
+
var cs__default = /*#__PURE__*/_interopDefault(cs);
|
|
21
|
+
|
|
22
|
+
var __defProp = Object.defineProperty;
|
|
23
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
24
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
25
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
26
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
27
|
+
var __spreadValues = (a, b) => {
|
|
28
|
+
for (var prop in b || (b = {}))
|
|
29
|
+
if (__hasOwnProp.call(b, prop))
|
|
30
|
+
__defNormalProp(a, prop, b[prop]);
|
|
31
|
+
if (__getOwnPropSymbols)
|
|
32
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
33
|
+
if (__propIsEnum.call(b, prop))
|
|
34
|
+
__defNormalProp(a, prop, b[prop]);
|
|
35
|
+
}
|
|
36
|
+
return a;
|
|
37
|
+
};
|
|
38
|
+
const DefaultTitleRender = ({
|
|
39
|
+
title
|
|
40
|
+
}) => {
|
|
41
|
+
return /* @__PURE__ */ React__default.default.createElement("span", { className: cs__default.default(index$2.Typo.Display.d2_bold_title) }, title);
|
|
42
|
+
};
|
|
43
|
+
const SmallDialog = ({
|
|
44
|
+
title,
|
|
45
|
+
TitleRender,
|
|
46
|
+
cancelText = "\u5173\u95ED",
|
|
47
|
+
okText = "\u786E\u5B9A",
|
|
48
|
+
showOk = true,
|
|
49
|
+
onOk,
|
|
50
|
+
onCancel,
|
|
51
|
+
maskClosable = true,
|
|
52
|
+
closable = true,
|
|
53
|
+
className,
|
|
54
|
+
footerClassName,
|
|
55
|
+
okButtonProps,
|
|
56
|
+
cancelButtonProps,
|
|
57
|
+
children,
|
|
58
|
+
showFooterErrorIcon = true,
|
|
59
|
+
error,
|
|
60
|
+
confirmLoading
|
|
61
|
+
}) => {
|
|
62
|
+
const popModal = index.usePopModal();
|
|
63
|
+
const handleClose = () => {
|
|
64
|
+
if (onCancel) {
|
|
65
|
+
onCancel(popModal);
|
|
66
|
+
} else {
|
|
67
|
+
popModal();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const handleOk = () => {
|
|
71
|
+
if (onOk) {
|
|
72
|
+
onOk(popModal);
|
|
73
|
+
} else {
|
|
74
|
+
popModal();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const CustomTitleRender = TitleRender || DefaultTitleRender;
|
|
78
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
79
|
+
antd.Modal,
|
|
80
|
+
{
|
|
81
|
+
visible: true,
|
|
82
|
+
title: /* @__PURE__ */ React__default.default.createElement(CustomTitleRender, { title }),
|
|
83
|
+
footer: /* @__PURE__ */ React__default.default.createElement(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: cs__default.default(SmallDialog_style.FooterStyle, footerClassName, {
|
|
87
|
+
"has-error": !!error
|
|
88
|
+
})
|
|
89
|
+
},
|
|
90
|
+
/* @__PURE__ */ React__default.default.createElement(index$1.Show, { condition: !!error }, /* @__PURE__ */ React__default.default.createElement(
|
|
91
|
+
antd5.Flex,
|
|
92
|
+
{
|
|
93
|
+
gap: 4,
|
|
94
|
+
align: "center",
|
|
95
|
+
className: core.cx(SmallDialog_style.ErrorTextStyle, index$2.Typo.Label.l3_regular)
|
|
96
|
+
},
|
|
97
|
+
/* @__PURE__ */ React__default.default.createElement(index$1.Show, { condition: showFooterErrorIcon }, /* @__PURE__ */ React__default.default.createElement(
|
|
98
|
+
index$3,
|
|
99
|
+
{
|
|
100
|
+
src: iconsReact.ExclamationErrorCircleFill16RedIcon,
|
|
101
|
+
iconHeight: 16,
|
|
102
|
+
iconWidth: 16
|
|
103
|
+
}
|
|
104
|
+
)),
|
|
105
|
+
/* @__PURE__ */ React__default.default.createElement(index$4, { multiLines: 3, content: error, tooltip: error })
|
|
106
|
+
)),
|
|
107
|
+
/* @__PURE__ */ React__default.default.createElement(antd5.Flex, null, /* @__PURE__ */ React__default.default.createElement(
|
|
108
|
+
index$5,
|
|
109
|
+
__spreadValues({
|
|
110
|
+
type: showOk ? "quiet" : "ordinary",
|
|
111
|
+
onClick: handleClose,
|
|
112
|
+
className: index$2.Typo.Label.l2_bold_title
|
|
113
|
+
}, cancelButtonProps),
|
|
114
|
+
cancelText
|
|
115
|
+
), showOk && /* @__PURE__ */ React__default.default.createElement(
|
|
116
|
+
index$5,
|
|
117
|
+
__spreadValues({
|
|
118
|
+
type: "primary",
|
|
119
|
+
onClick: handleOk,
|
|
120
|
+
loading: confirmLoading
|
|
121
|
+
}, okButtonProps),
|
|
122
|
+
okText
|
|
123
|
+
))
|
|
124
|
+
),
|
|
125
|
+
onCancel: handleClose,
|
|
126
|
+
closable,
|
|
127
|
+
maskClosable,
|
|
128
|
+
className: core.cx(SmallDialog_style.DialogStyle, className),
|
|
129
|
+
closeIcon: /* @__PURE__ */ React__default.default.createElement(
|
|
130
|
+
index$3,
|
|
131
|
+
{
|
|
132
|
+
src: iconsReact.XmarkCloseBold24TertiaryIcon,
|
|
133
|
+
className: SmallDialog_style.CloseIconStyle,
|
|
134
|
+
iconHeight: 24,
|
|
135
|
+
iconWidth: 24,
|
|
136
|
+
hoverSrc: iconsReact.XmarkCloseBold24SecondaryIcon
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
},
|
|
140
|
+
children
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
exports.SmallDialog = SmallDialog;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const DialogStyle = "E_dxyv8bv";
|
|
4
|
+
const FooterStyle = "E_fbgo4wr";
|
|
5
|
+
const ErrorTextStyle = "E_ekxnz54";
|
|
6
|
+
const CloseIconStyle = "E_ct1041x";
|
|
7
|
+
|
|
8
|
+
exports.CloseIconStyle = CloseIconStyle;
|
|
9
|
+
exports.DialogStyle = DialogStyle;
|
|
10
|
+
exports.ErrorTextStyle = ErrorTextStyle;
|
|
11
|
+
exports.FooterStyle = FooterStyle;
|
|
@@ -4,7 +4,7 @@ var core = require('@linaria/core');
|
|
|
4
4
|
var index = require('../../../core/Typo/index.js');
|
|
5
5
|
var useParrotTranslation = require('../../../hooks/useParrotTranslation.js');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var SmallDialog = require('
|
|
7
|
+
var SmallDialog = require('../../../core/SmallDialog/SmallDialog.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
|
|
@@ -24,7 +24,8 @@ const DeleteDialog = props => {
|
|
|
24
24
|
okText = t("common.delete"),
|
|
25
25
|
onOk,
|
|
26
26
|
onCancel,
|
|
27
|
-
className
|
|
27
|
+
className,
|
|
28
|
+
confirmLoading
|
|
28
29
|
} = props;
|
|
29
30
|
return /* @__PURE__ */React__default.default.createElement(SmallDialog.SmallDialog, {
|
|
30
31
|
title,
|
|
@@ -36,7 +37,8 @@ const DeleteDialog = props => {
|
|
|
36
37
|
cancelText,
|
|
37
38
|
okButtonProps: {
|
|
38
39
|
danger: true
|
|
39
|
-
}
|
|
40
|
+
},
|
|
41
|
+
confirmLoading
|
|
40
42
|
}, description && /* @__PURE__ */React__default.default.createElement("div", {
|
|
41
43
|
className: core.cx(ContentStyle, index.Typo.Label.l2_regular)
|
|
42
44
|
}, description), secondaryDesc && /* @__PURE__ */React__default.default.createElement("div", {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var core = require('@linaria/core');
|
|
4
4
|
var index = require('../../../core/Typo/index.js');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var SmallDialog = require('
|
|
6
|
+
var SmallDialog = require('../../../core/SmallDialog/SmallDialog.js');
|
|
7
7
|
var RejectDialog_type = require('./RejectDialog.type.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
package/dist/cjs/index.js
CHANGED
|
@@ -120,6 +120,9 @@ var TableWidget = require('./core/Table/TableWidget.js');
|
|
|
120
120
|
var types = require('./core/TableForm/types.js');
|
|
121
121
|
var index$1j = require('./core/Timeline/index.js');
|
|
122
122
|
var index$1k = require('./core/Typo/index.js');
|
|
123
|
+
var SmallDialog = require('./core/SmallDialog/SmallDialog.js');
|
|
124
|
+
var SmallDialog_style = require('./core/SmallDialog/SmallDialog.style.js');
|
|
125
|
+
var MediumDialog = require('./core/MediumDialog/MediumDialog.js');
|
|
123
126
|
var index$1l = require('./coreX/BarChart/index.js');
|
|
124
127
|
var index$1m = require('./coreX/BatchOperation/index.js');
|
|
125
128
|
var index$1n = require('./coreX/ChartWithTooltip/index.js');
|
|
@@ -151,7 +154,6 @@ var RelativeTime = require('./coreX/DateRangePicker/RelativeTime.js');
|
|
|
151
154
|
var DeleteDialog = require('./coreX/Dialogs/DeleteDialog/DeleteDialog.js');
|
|
152
155
|
var RejectDialog = require('./coreX/Dialogs/RejectDialog/RejectDialog.js');
|
|
153
156
|
var RejectDialog_type = require('./coreX/Dialogs/RejectDialog/RejectDialog.type.js');
|
|
154
|
-
var SmallDialog = require('./coreX/Dialogs/SmallDialog.js');
|
|
155
157
|
var InfoRowList = require('./coreX/InfoRowList/InfoRowList.js');
|
|
156
158
|
var index$1I = require('./coreX/Show/index.js');
|
|
157
159
|
var animation = require('./styles/token/animation.js');
|
|
@@ -555,6 +557,12 @@ exports.TableLoading = TableWidget.TableLoading;
|
|
|
555
557
|
exports.ValidateTriggerType = types.ValidateTriggerType;
|
|
556
558
|
exports.Timeline = index$1j.Timeline;
|
|
557
559
|
exports.Typo = index$1k.Typo;
|
|
560
|
+
exports.SmallDialog = SmallDialog.SmallDialog;
|
|
561
|
+
exports.CloseIconStyle = SmallDialog_style.CloseIconStyle;
|
|
562
|
+
exports.DialogStyle = SmallDialog_style.DialogStyle;
|
|
563
|
+
exports.ErrorTextStyle = SmallDialog_style.ErrorTextStyle;
|
|
564
|
+
exports.FooterStyle = SmallDialog_style.FooterStyle;
|
|
565
|
+
exports.MediumDialog = MediumDialog.MediumDialog;
|
|
558
566
|
exports.BarChart = index$1l.default;
|
|
559
567
|
exports.getWidth = index$1l.getWidth;
|
|
560
568
|
exports.BatchOperation = index$1m.default;
|
|
@@ -593,7 +601,6 @@ exports.RelativeTime = RelativeTime;
|
|
|
593
601
|
exports.DeleteDialog = DeleteDialog.DeleteDialog;
|
|
594
602
|
exports.RejectDialog = RejectDialog.RejectDialog;
|
|
595
603
|
exports.RejectDialogType = RejectDialog_type.RejectDialogType;
|
|
596
|
-
exports.SmallDialog = SmallDialog.SmallDialog;
|
|
597
604
|
exports.InfoRowList = InfoRowList.InfoRowList;
|
|
598
605
|
exports.Show = index$1I.Show;
|
|
599
606
|
exports.Animation = animation.Animation;
|