antd3-esm 1.0.1
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/LICENSE +21 -0
- package/dist/Checkbox.js +164 -0
- package/dist/CommonMixin.js +816 -0
- package/dist/Divider.js +646 -0
- package/dist/Notification.js +279 -0
- package/dist/Pagination.js +1106 -0
- package/dist/PortalWrapper.js +347 -0
- package/dist/RowContext.js +5 -0
- package/dist/Sider.js +533 -0
- package/dist/TextArea.js +432 -0
- package/dist/_arrayMap.js +68 -0
- package/dist/_assignValue.js +95 -0
- package/dist/_copyArray.js +31 -0
- package/dist/_hasPath.js +53 -0
- package/dist/_overArg.js +437 -0
- package/dist/_stringToArray.js +136 -0
- package/dist/antd/es/affix.js +12 -0
- package/dist/antd/es/alert.js +5 -0
- package/dist/antd/es/anchor.js +466 -0
- package/dist/antd/es/auto-complete.js +5 -0
- package/dist/antd/es/avatar.js +5 -0
- package/dist/antd/es/back-top.js +5 -0
- package/dist/antd/es/badge.js +5 -0
- package/dist/antd/es/breadcrumb.js +18 -0
- package/dist/antd/es/button.js +12 -0
- package/dist/antd/es/calendar.js +953 -0
- package/dist/antd/es/card.js +5 -0
- package/dist/antd/es/carousel.js +5 -0
- package/dist/antd/es/cascader.js +1275 -0
- package/dist/antd/es/checkbox.js +11 -0
- package/dist/antd/es/col.js +4 -0
- package/dist/antd/es/collapse.js +688 -0
- package/dist/antd/es/comment.js +5 -0
- package/dist/antd/es/config-provider.js +2 -0
- package/dist/antd/es/date-picker.js +4322 -0
- package/dist/antd/es/descriptions.js +342 -0
- package/dist/antd/es/divider.js +53 -0
- package/dist/antd/es/drawer.js +1115 -0
- package/dist/antd/es/dropdown.js +14 -0
- package/dist/antd/es/empty.js +6 -0
- package/dist/antd/es/form.js +5008 -0
- package/dist/antd/es/grid.js +13 -0
- package/dist/antd/es/icon.js +6 -0
- package/dist/antd/es/input-number.js +5 -0
- package/dist/antd/es/input.js +16 -0
- package/dist/antd/es/layout.js +14 -0
- package/dist/antd/es/list.js +5 -0
- package/dist/antd/es/locale/ar_EG.js +102 -0
- package/dist/antd/es/locale/bg_BG.js +98 -0
- package/dist/antd/es/locale/ca_ES.js +96 -0
- package/dist/antd/es/locale/cs_CZ.js +96 -0
- package/dist/antd/es/locale/da_DK.js +98 -0
- package/dist/antd/es/locale/de_DE.js +98 -0
- package/dist/antd/es/locale/default.js +2 -0
- package/dist/antd/es/locale/el_GR.js +98 -0
- package/dist/antd/es/locale/en_GB.js +98 -0
- package/dist/antd/es/locale/en_US.js +2 -0
- package/dist/antd/es/locale/es_ES.js +114 -0
- package/dist/antd/es/locale/et_EE.js +98 -0
- package/dist/antd/es/locale/fa_IR.js +98 -0
- package/dist/antd/es/locale/fi_FI.js +99 -0
- package/dist/antd/es/locale/fr_BE.js +102 -0
- package/dist/antd/es/locale/fr_FR.js +102 -0
- package/dist/antd/es/locale/ga_IE.js +99 -0
- package/dist/antd/es/locale/he_IL.js +99 -0
- package/dist/antd/es/locale/hi_IN.js +107 -0
- package/dist/antd/es/locale/hr_HR.js +113 -0
- package/dist/antd/es/locale/hu_HU.js +99 -0
- package/dist/antd/es/locale/hy_AM.js +109 -0
- package/dist/antd/es/locale/id_ID.js +101 -0
- package/dist/antd/es/locale/is_IS.js +98 -0
- package/dist/antd/es/locale/it_IT.js +111 -0
- package/dist/antd/es/locale/ja_JP.js +96 -0
- package/dist/antd/es/locale/kn_IN.js +107 -0
- package/dist/antd/es/locale/ko_KR.js +98 -0
- package/dist/antd/es/locale/ku_IQ.js +98 -0
- package/dist/antd/es/locale/lv_LV.js +98 -0
- package/dist/antd/es/locale/mk_MK.js +113 -0
- package/dist/antd/es/locale/mn_MN.js +99 -0
- package/dist/antd/es/locale/ms_MY.js +118 -0
- package/dist/antd/es/locale/nb_NO.js +97 -0
- package/dist/antd/es/locale/ne_NP.js +44 -0
- package/dist/antd/es/locale/nl_BE.js +98 -0
- package/dist/antd/es/locale/nl_NL.js +117 -0
- package/dist/antd/es/locale/pl_PL.js +98 -0
- package/dist/antd/es/locale/pt_BR.js +104 -0
- package/dist/antd/es/locale/pt_PT.js +127 -0
- package/dist/antd/es/locale/ro_RO.js +118 -0
- package/dist/antd/es/locale/ru_RU.js +110 -0
- package/dist/antd/es/locale/sk_SK.js +118 -0
- package/dist/antd/es/locale/sl_SI.js +96 -0
- package/dist/antd/es/locale/sr_RS.js +97 -0
- package/dist/antd/es/locale/sv_SE.js +101 -0
- package/dist/antd/es/locale/ta_IN.js +119 -0
- package/dist/antd/es/locale/th_TH.js +117 -0
- package/dist/antd/es/locale/tr_TR.js +112 -0
- package/dist/antd/es/locale/uk_UA.js +97 -0
- package/dist/antd/es/locale/vi_VN.js +99 -0
- package/dist/antd/es/locale/zh_CN.js +104 -0
- package/dist/antd/es/locale/zh_TW.js +100 -0
- package/dist/antd/es/locale-provider.js +6 -0
- package/dist/antd/es/mention.js +23215 -0
- package/dist/antd/es/mentions.js +961 -0
- package/dist/antd/es/menu.js +5 -0
- package/dist/antd/es/message.js +161 -0
- package/dist/antd/es/modal.js +885 -0
- package/dist/antd/es/notification.js +216 -0
- package/dist/antd/es/page-header.js +350 -0
- package/dist/antd/es/pagination.js +15 -0
- package/dist/antd/es/popconfirm.js +215 -0
- package/dist/antd/es/popover.js +5 -0
- package/dist/antd/es/progress.js +10 -0
- package/dist/antd/es/radio.js +10 -0
- package/dist/antd/es/rate.js +5 -0
- package/dist/antd/es/result.js +828 -0
- package/dist/antd/es/row.js +9 -0
- package/dist/antd/es/select.js +5 -0
- package/dist/antd/es/skeleton.js +370 -0
- package/dist/antd/es/slider.js +5 -0
- package/dist/antd/es/spin.js +11 -0
- package/dist/antd/es/statistic.js +650 -0
- package/dist/antd/es/steps.js +5 -0
- package/dist/antd/es/style.js +5 -0
- package/dist/antd/es/switch.js +5 -0
- package/dist/antd/es/table.js +7057 -0
- package/dist/antd/es/tabs.js +5 -0
- package/dist/antd/es/tag.js +12 -0
- package/dist/antd/es/time-picker.js +10 -0
- package/dist/antd/es/timeline.js +206 -0
- package/dist/antd/es/tooltip.js +9 -0
- package/dist/antd/es/transfer.js +2508 -0
- package/dist/antd/es/tree-select.js +5 -0
- package/dist/antd/es/tree.js +10 -0
- package/dist/antd/es/typography.js +1246 -0
- package/dist/antd/es/upload.js +3418 -0
- package/dist/antd/es/version.js +7 -0
- package/dist/col.js +142 -0
- package/dist/config-provider.js +6949 -0
- package/dist/dropdown.js +442 -0
- package/dist/get.js +1043 -0
- package/dist/icon.js +6138 -0
- package/dist/identity.js +230 -0
- package/dist/index.js +462 -0
- package/dist/index10.js +478 -0
- package/dist/index11.js +232 -0
- package/dist/index12.js +2766 -0
- package/dist/index13.js +422 -0
- package/dist/index14.js +283 -0
- package/dist/index15.js +1755 -0
- package/dist/index2.js +374 -0
- package/dist/index3.js +407 -0
- package/dist/index4.js +522 -0
- package/dist/index5.js +601 -0
- package/dist/index6.js +601 -0
- package/dist/index7.js +364 -0
- package/dist/index8.js +436 -0
- package/dist/index9.js +130 -0
- package/dist/input.js +475 -0
- package/dist/isLength.js +402 -0
- package/dist/keys.js +292 -0
- package/dist/menu.js +8138 -0
- package/dist/progress.js +852 -0
- package/dist/raf.js +34 -0
- package/dist/responsiveObserve.js +444 -0
- package/dist/row.js +173 -0
- package/dist/scrollTo.js +66 -0
- package/dist/toInteger.js +123 -0
- package/dist/toString.js +84 -0
- package/dist/transButton.js +121 -0
- package/dist/tree.js +3017 -0
- package/dist/warning.js +55 -0
- package/dist/wave.js +230 -0
- package/dist/zh_CN.js +17 -0
- package/package.json +160 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { n } from '../../config-provider.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { N as Notification } from '../../Notification.js';
|
|
4
|
+
import { I as Icon } from '../../icon.js';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
import '../../menu.js';
|
|
7
|
+
|
|
8
|
+
var css = "/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-notification {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n font-feature-settings: 'tnum';\n position: fixed;\n z-index: 1010;\n width: 384px;\n max-width: calc(100vw - 32px);\n margin-right: 24px;\n}\n.ant-notification-topLeft,\n.ant-notification-bottomLeft {\n margin-right: 0;\n margin-left: 24px;\n}\n.ant-notification-topLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,\n.ant-notification-bottomLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,\n.ant-notification-topLeft .ant-notification-fade-appear.ant-notification-fade-appear-active,\n.ant-notification-bottomLeft .ant-notification-fade-appear.ant-notification-fade-appear-active {\n animation-name: NotificationLeftFadeIn;\n}\n.ant-notification-close-icon {\n font-size: 14px;\n cursor: pointer;\n}\n.ant-notification-notice {\n position: relative;\n margin-bottom: 16px;\n padding: 16px 24px;\n overflow: hidden;\n line-height: 1.5;\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n}\n.ant-notification-notice-message {\n display: inline-block;\n margin-bottom: 8px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 16px;\n line-height: 24px;\n}\n.ant-notification-notice-message-single-line-auto-margin {\n display: block;\n width: calc(384px - 24px * 2 - 24px - 48px - 100%);\n max-width: 4px;\n background-color: transparent;\n pointer-events: none;\n}\n.ant-notification-notice-message-single-line-auto-margin::before {\n display: block;\n content: '';\n}\n.ant-notification-notice-description {\n font-size: 14px;\n}\n.ant-notification-notice-closable .ant-notification-notice-message {\n padding-right: 24px;\n}\n.ant-notification-notice-with-icon .ant-notification-notice-message {\n margin-bottom: 4px;\n margin-left: 48px;\n font-size: 16px;\n}\n.ant-notification-notice-with-icon .ant-notification-notice-description {\n margin-left: 48px;\n font-size: 14px;\n}\n.ant-notification-notice-icon {\n position: absolute;\n margin-left: 4px;\n font-size: 24px;\n line-height: 24px;\n}\n.anticon.ant-notification-notice-icon-success {\n color: #52c41a;\n}\n.anticon.ant-notification-notice-icon-info {\n color: #1890ff;\n}\n.anticon.ant-notification-notice-icon-warning {\n color: #faad14;\n}\n.anticon.ant-notification-notice-icon-error {\n color: #f5222d;\n}\n.ant-notification-notice-close {\n position: absolute;\n top: 16px;\n right: 22px;\n color: rgba(0, 0, 0, 0.45);\n outline: none;\n}\n.ant-notification-notice-close:hover {\n color: rgba(0, 0, 0, 0.67);\n}\n.ant-notification-notice-btn {\n float: right;\n margin-top: 16px;\n}\n.ant-notification .notification-fade-effect {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n}\n.ant-notification-fade-enter,\n.ant-notification-fade-appear {\n opacity: 0;\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n.ant-notification-fade-leave {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n animation-duration: 0.2s;\n animation-play-state: paused;\n}\n.ant-notification-fade-enter.ant-notification-fade-enter-active,\n.ant-notification-fade-appear.ant-notification-fade-appear-active {\n animation-name: NotificationFadeIn;\n animation-play-state: running;\n}\n.ant-notification-fade-leave.ant-notification-fade-leave-active {\n animation-name: NotificationFadeOut;\n animation-play-state: running;\n}\n@keyframes NotificationFadeIn {\n 0% {\n left: 384px;\n opacity: 0;\n }\n 100% {\n left: 0;\n opacity: 1;\n }\n}\n@keyframes NotificationLeftFadeIn {\n 0% {\n right: 384px;\n opacity: 0;\n }\n 100% {\n right: 0;\n opacity: 1;\n }\n}\n@keyframes NotificationFadeOut {\n 0% {\n max-height: 150px;\n margin-bottom: 16px;\n padding-top: 16px 24px;\n padding-bottom: 16px 24px;\n opacity: 1;\n }\n 100% {\n max-height: 0;\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n opacity: 0;\n }\n}\n/*# sourceMappingURL=index.css.map */";
|
|
9
|
+
n(css,{"prepend":true});
|
|
10
|
+
|
|
11
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
var notificationInstance = {};
|
|
13
|
+
var defaultDuration = 4.5;
|
|
14
|
+
var defaultTop = 24;
|
|
15
|
+
var defaultBottom = 24;
|
|
16
|
+
var defaultPlacement = 'topRight';
|
|
17
|
+
var defaultGetContainer;
|
|
18
|
+
var defaultCloseIcon;
|
|
19
|
+
|
|
20
|
+
function setNotificationConfig(options) {
|
|
21
|
+
var duration = options.duration,
|
|
22
|
+
placement = options.placement,
|
|
23
|
+
bottom = options.bottom,
|
|
24
|
+
top = options.top,
|
|
25
|
+
getContainer = options.getContainer,
|
|
26
|
+
closeIcon = options.closeIcon;
|
|
27
|
+
|
|
28
|
+
if (duration !== undefined) {
|
|
29
|
+
defaultDuration = duration;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (placement !== undefined) {
|
|
33
|
+
defaultPlacement = placement;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (bottom !== undefined) {
|
|
37
|
+
defaultBottom = bottom;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (top !== undefined) {
|
|
41
|
+
defaultTop = top;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (getContainer !== undefined) {
|
|
45
|
+
defaultGetContainer = getContainer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (closeIcon !== undefined) {
|
|
49
|
+
defaultCloseIcon = closeIcon;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getPlacementStyle(placement) {
|
|
54
|
+
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
|
|
55
|
+
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
|
|
56
|
+
var style;
|
|
57
|
+
|
|
58
|
+
switch (placement) {
|
|
59
|
+
case 'topLeft':
|
|
60
|
+
style = {
|
|
61
|
+
left: 0,
|
|
62
|
+
top: top,
|
|
63
|
+
bottom: 'auto'
|
|
64
|
+
};
|
|
65
|
+
break;
|
|
66
|
+
|
|
67
|
+
case 'topRight':
|
|
68
|
+
style = {
|
|
69
|
+
right: 0,
|
|
70
|
+
top: top,
|
|
71
|
+
bottom: 'auto'
|
|
72
|
+
};
|
|
73
|
+
break;
|
|
74
|
+
|
|
75
|
+
case 'bottomLeft':
|
|
76
|
+
style = {
|
|
77
|
+
left: 0,
|
|
78
|
+
top: 'auto',
|
|
79
|
+
bottom: bottom
|
|
80
|
+
};
|
|
81
|
+
break;
|
|
82
|
+
|
|
83
|
+
default:
|
|
84
|
+
style = {
|
|
85
|
+
right: 0,
|
|
86
|
+
top: 'auto',
|
|
87
|
+
bottom: bottom
|
|
88
|
+
};
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return style;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function getNotificationInstance(_ref, callback) {
|
|
96
|
+
var prefixCls = _ref.prefixCls,
|
|
97
|
+
_ref$placement = _ref.placement,
|
|
98
|
+
placement = _ref$placement === void 0 ? defaultPlacement : _ref$placement,
|
|
99
|
+
_ref$getContainer = _ref.getContainer,
|
|
100
|
+
getContainer = _ref$getContainer === void 0 ? defaultGetContainer : _ref$getContainer,
|
|
101
|
+
top = _ref.top,
|
|
102
|
+
bottom = _ref.bottom,
|
|
103
|
+
_ref$closeIcon = _ref.closeIcon,
|
|
104
|
+
closeIcon = _ref$closeIcon === void 0 ? defaultCloseIcon : _ref$closeIcon;
|
|
105
|
+
var cacheKey = "".concat(prefixCls, "-").concat(placement);
|
|
106
|
+
|
|
107
|
+
if (notificationInstance[cacheKey]) {
|
|
108
|
+
callback(notificationInstance[cacheKey]);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
var closeIconToRender = /*#__PURE__*/React.createElement("span", {
|
|
113
|
+
className: "".concat(prefixCls, "-close-x")
|
|
114
|
+
}, closeIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
115
|
+
className: "".concat(prefixCls, "-close-icon"),
|
|
116
|
+
type: "close"
|
|
117
|
+
}));
|
|
118
|
+
Notification.newInstance({
|
|
119
|
+
prefixCls: prefixCls,
|
|
120
|
+
className: "".concat(prefixCls, "-").concat(placement),
|
|
121
|
+
style: getPlacementStyle(placement, top, bottom),
|
|
122
|
+
getContainer: getContainer,
|
|
123
|
+
closeIcon: closeIconToRender
|
|
124
|
+
}, function (notification) {
|
|
125
|
+
notificationInstance[cacheKey] = notification;
|
|
126
|
+
callback(notification);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
var typeToIcon = {
|
|
131
|
+
success: 'check-circle-o',
|
|
132
|
+
info: 'info-circle-o',
|
|
133
|
+
error: 'close-circle-o',
|
|
134
|
+
warning: 'exclamation-circle-o'
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
function notice(args) {
|
|
138
|
+
var outerPrefixCls = args.prefixCls || 'ant-notification';
|
|
139
|
+
var prefixCls = "".concat(outerPrefixCls, "-notice");
|
|
140
|
+
var duration = args.duration === undefined ? defaultDuration : args.duration;
|
|
141
|
+
var iconNode = null;
|
|
142
|
+
|
|
143
|
+
if (args.icon) {
|
|
144
|
+
iconNode = /*#__PURE__*/React.createElement("span", {
|
|
145
|
+
className: "".concat(prefixCls, "-icon")
|
|
146
|
+
}, args.icon);
|
|
147
|
+
} else if (args.type) {
|
|
148
|
+
var iconType = typeToIcon[args.type];
|
|
149
|
+
iconNode = /*#__PURE__*/React.createElement(Icon, {
|
|
150
|
+
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(args.type),
|
|
151
|
+
type: iconType
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var autoMarginTag = !args.description && iconNode ? /*#__PURE__*/React.createElement("span", {
|
|
156
|
+
className: "".concat(prefixCls, "-message-single-line-auto-margin")
|
|
157
|
+
}) : null;
|
|
158
|
+
var placement = args.placement,
|
|
159
|
+
top = args.top,
|
|
160
|
+
bottom = args.bottom,
|
|
161
|
+
getContainer = args.getContainer,
|
|
162
|
+
closeIcon = args.closeIcon;
|
|
163
|
+
getNotificationInstance({
|
|
164
|
+
prefixCls: outerPrefixCls,
|
|
165
|
+
placement: placement,
|
|
166
|
+
top: top,
|
|
167
|
+
bottom: bottom,
|
|
168
|
+
getContainer: getContainer,
|
|
169
|
+
closeIcon: closeIcon
|
|
170
|
+
}, function (notification) {
|
|
171
|
+
notification.notice({
|
|
172
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
className: iconNode ? "".concat(prefixCls, "-with-icon") : ''
|
|
174
|
+
}, iconNode, /*#__PURE__*/React.createElement("div", {
|
|
175
|
+
className: "".concat(prefixCls, "-message")
|
|
176
|
+
}, autoMarginTag, args.message), /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
className: "".concat(prefixCls, "-description")
|
|
178
|
+
}, args.description), args.btn ? /*#__PURE__*/React.createElement("span", {
|
|
179
|
+
className: "".concat(prefixCls, "-btn")
|
|
180
|
+
}, args.btn) : null),
|
|
181
|
+
duration: duration,
|
|
182
|
+
closable: true,
|
|
183
|
+
onClose: args.onClose,
|
|
184
|
+
onClick: args.onClick,
|
|
185
|
+
key: args.key,
|
|
186
|
+
style: args.style || {},
|
|
187
|
+
className: args.className
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
var api = {
|
|
193
|
+
open: notice,
|
|
194
|
+
close: function close(key) {
|
|
195
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
196
|
+
return notificationInstance[cacheKey].removeNotice(key);
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
config: setNotificationConfig,
|
|
200
|
+
destroy: function destroy() {
|
|
201
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
202
|
+
notificationInstance[cacheKey].destroy();
|
|
203
|
+
delete notificationInstance[cacheKey];
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
208
|
+
api[type] = function (args) {
|
|
209
|
+
return api.open(_extends(_extends({}, args), {
|
|
210
|
+
type: type
|
|
211
|
+
}));
|
|
212
|
+
};
|
|
213
|
+
});
|
|
214
|
+
api.warn = api.warning;
|
|
215
|
+
|
|
216
|
+
export { api as default };
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import { c as classNames, C as ConfigConsumer, n, L as LocaleReceiver } from '../../config-provider.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { I as Icon } from '../../icon.js';
|
|
4
|
+
import { B as Breadcrumb } from '../../index3.js';
|
|
5
|
+
import { T as TransButton } from '../../transButton.js';
|
|
6
|
+
import '../../tree.js';
|
|
7
|
+
import '../../menu.js';
|
|
8
|
+
import 'react-dom';
|
|
9
|
+
import '../../input.js';
|
|
10
|
+
import '../../dropdown.js';
|
|
11
|
+
import '../../index4.js';
|
|
12
|
+
import '../../Divider.js';
|
|
13
|
+
import '../../index5.js';
|
|
14
|
+
import '../../index6.js';
|
|
15
|
+
import '../../Sider.js';
|
|
16
|
+
import '../../raf.js';
|
|
17
|
+
|
|
18
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
19
|
+
|
|
20
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
22
|
+
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
|
|
26
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
27
|
+
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
|
|
29
|
+
|
|
30
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
|
+
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
+
|
|
34
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
35
|
+
|
|
36
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
37
|
+
|
|
38
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
+
|
|
40
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
+
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
+
|
|
44
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
45
|
+
var t = {};
|
|
46
|
+
|
|
47
|
+
for (var p in s) {
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
58
|
+
_inherits(Avatar, _React$Component);
|
|
59
|
+
|
|
60
|
+
var _super = _createSuper(Avatar);
|
|
61
|
+
|
|
62
|
+
function Avatar() {
|
|
63
|
+
var _this;
|
|
64
|
+
|
|
65
|
+
_classCallCheck(this, Avatar);
|
|
66
|
+
|
|
67
|
+
_this = _super.apply(this, arguments);
|
|
68
|
+
_this.state = {
|
|
69
|
+
scale: 1,
|
|
70
|
+
mounted: false,
|
|
71
|
+
isImgExist: true
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
_this.setScale = function () {
|
|
75
|
+
if (!_this.avatarChildren || !_this.avatarNode) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var childrenWidth = _this.avatarChildren.offsetWidth; // offsetWidth avoid affecting be transform scale
|
|
80
|
+
|
|
81
|
+
var nodeWidth = _this.avatarNode.offsetWidth; // denominator is 0 is no meaning
|
|
82
|
+
|
|
83
|
+
if (childrenWidth === 0 || nodeWidth === 0 || _this.lastChildrenWidth === childrenWidth && _this.lastNodeWidth === nodeWidth) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
_this.lastChildrenWidth = childrenWidth;
|
|
88
|
+
_this.lastNodeWidth = nodeWidth; // add 4px gap for each side to get better performance
|
|
89
|
+
|
|
90
|
+
_this.setState({
|
|
91
|
+
scale: nodeWidth - 8 < childrenWidth ? (nodeWidth - 8) / childrenWidth : 1
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
_this.handleImgLoadError = function () {
|
|
96
|
+
var onError = _this.props.onError;
|
|
97
|
+
var errorFlag = onError ? onError() : undefined;
|
|
98
|
+
|
|
99
|
+
if (errorFlag !== false) {
|
|
100
|
+
_this.setState({
|
|
101
|
+
isImgExist: false
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
_this.renderAvatar = function (_ref) {
|
|
107
|
+
var _classNames, _classNames2;
|
|
108
|
+
|
|
109
|
+
var getPrefixCls = _ref.getPrefixCls;
|
|
110
|
+
|
|
111
|
+
var _a = _this.props,
|
|
112
|
+
customizePrefixCls = _a.prefixCls,
|
|
113
|
+
shape = _a.shape,
|
|
114
|
+
size = _a.size,
|
|
115
|
+
src = _a.src,
|
|
116
|
+
srcSet = _a.srcSet,
|
|
117
|
+
icon = _a.icon,
|
|
118
|
+
className = _a.className,
|
|
119
|
+
alt = _a.alt,
|
|
120
|
+
others = __rest(_a, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "alt"]);
|
|
121
|
+
|
|
122
|
+
var _this$state = _this.state,
|
|
123
|
+
isImgExist = _this$state.isImgExist,
|
|
124
|
+
scale = _this$state.scale,
|
|
125
|
+
mounted = _this$state.mounted;
|
|
126
|
+
var prefixCls = getPrefixCls('avatar', customizePrefixCls);
|
|
127
|
+
var sizeCls = classNames((_classNames = {}, _defineProperty$1(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), _defineProperty$1(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames));
|
|
128
|
+
var classString = classNames(prefixCls, className, sizeCls, (_classNames2 = {}, _defineProperty$1(_classNames2, "".concat(prefixCls, "-").concat(shape), shape), _defineProperty$1(_classNames2, "".concat(prefixCls, "-image"), src && isImgExist), _defineProperty$1(_classNames2, "".concat(prefixCls, "-icon"), icon), _classNames2));
|
|
129
|
+
var sizeStyle = typeof size === 'number' ? {
|
|
130
|
+
width: size,
|
|
131
|
+
height: size,
|
|
132
|
+
lineHeight: "".concat(size, "px"),
|
|
133
|
+
fontSize: icon ? size / 2 : 18
|
|
134
|
+
} : {};
|
|
135
|
+
var children = _this.props.children;
|
|
136
|
+
|
|
137
|
+
if (src && isImgExist) {
|
|
138
|
+
children = /*#__PURE__*/React.createElement("img", {
|
|
139
|
+
src: src,
|
|
140
|
+
srcSet: srcSet,
|
|
141
|
+
onError: _this.handleImgLoadError,
|
|
142
|
+
alt: alt
|
|
143
|
+
});
|
|
144
|
+
} else if (icon) {
|
|
145
|
+
if (typeof icon === 'string') {
|
|
146
|
+
children = /*#__PURE__*/React.createElement(Icon, {
|
|
147
|
+
type: icon
|
|
148
|
+
});
|
|
149
|
+
} else {
|
|
150
|
+
children = icon;
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
var childrenNode = _this.avatarChildren;
|
|
154
|
+
|
|
155
|
+
if (childrenNode || scale !== 1) {
|
|
156
|
+
var transformString = "scale(".concat(scale, ") translateX(-50%)");
|
|
157
|
+
var childrenStyle = {
|
|
158
|
+
msTransform: transformString,
|
|
159
|
+
WebkitTransform: transformString,
|
|
160
|
+
transform: transformString
|
|
161
|
+
};
|
|
162
|
+
var sizeChildrenStyle = typeof size === 'number' ? {
|
|
163
|
+
lineHeight: "".concat(size, "px")
|
|
164
|
+
} : {};
|
|
165
|
+
children = /*#__PURE__*/React.createElement("span", {
|
|
166
|
+
className: "".concat(prefixCls, "-string"),
|
|
167
|
+
ref: function ref(node) {
|
|
168
|
+
return _this.avatarChildren = node;
|
|
169
|
+
},
|
|
170
|
+
style: _extends(_extends({}, sizeChildrenStyle), childrenStyle)
|
|
171
|
+
}, children);
|
|
172
|
+
} else {
|
|
173
|
+
var _childrenStyle = {};
|
|
174
|
+
|
|
175
|
+
if (!mounted) {
|
|
176
|
+
_childrenStyle.opacity = 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
children = /*#__PURE__*/React.createElement("span", {
|
|
180
|
+
className: "".concat(prefixCls, "-string"),
|
|
181
|
+
style: {
|
|
182
|
+
opacity: 0
|
|
183
|
+
},
|
|
184
|
+
ref: function ref(node) {
|
|
185
|
+
return _this.avatarChildren = node;
|
|
186
|
+
}
|
|
187
|
+
}, children);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, others, {
|
|
192
|
+
style: _extends(_extends({}, sizeStyle), others.style),
|
|
193
|
+
className: classString,
|
|
194
|
+
ref: function ref(node) {
|
|
195
|
+
return _this.avatarNode = node;
|
|
196
|
+
}
|
|
197
|
+
}), children);
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
return _this;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
_createClass(Avatar, [{
|
|
204
|
+
key: "componentDidMount",
|
|
205
|
+
value: function componentDidMount() {
|
|
206
|
+
this.setScale();
|
|
207
|
+
this.setState({
|
|
208
|
+
mounted: true
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}, {
|
|
212
|
+
key: "componentDidUpdate",
|
|
213
|
+
value: function componentDidUpdate(prevProps) {
|
|
214
|
+
this.setScale();
|
|
215
|
+
|
|
216
|
+
if (prevProps.src !== this.props.src) {
|
|
217
|
+
this.setState({
|
|
218
|
+
isImgExist: true,
|
|
219
|
+
scale: 1
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}, {
|
|
224
|
+
key: "render",
|
|
225
|
+
value: function render() {
|
|
226
|
+
return /*#__PURE__*/React.createElement(ConfigConsumer, null, this.renderAvatar);
|
|
227
|
+
}
|
|
228
|
+
}]);
|
|
229
|
+
|
|
230
|
+
return Avatar;
|
|
231
|
+
}(React.Component);
|
|
232
|
+
Avatar.defaultProps = {
|
|
233
|
+
shape: 'circle',
|
|
234
|
+
size: 'default'
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
var css = "/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-page-header {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n font-feature-settings: 'tnum';\n position: relative;\n padding: 16px 24px;\n background-color: #fff;\n}\n.ant-page-header-ghost {\n background-color: inherit;\n}\n.ant-page-header.has-breadcrumb {\n padding-top: 12px;\n}\n.ant-page-header.has-footer {\n padding-bottom: 0;\n}\n.ant-page-header-back {\n float: left;\n margin: 8px 0;\n margin-right: 16px;\n font-size: 16px;\n line-height: 1;\n}\n.ant-page-header-back-button {\n color: #1890ff;\n text-decoration: none;\n outline: none;\n transition: color 0.3s;\n color: #000;\n cursor: pointer;\n}\n.ant-page-header-back-button:focus,\n.ant-page-header-back-button:hover {\n color: #40a9ff;\n}\n.ant-page-header-back-button:active {\n color: #096dd9;\n}\n.ant-page-header .ant-divider-vertical {\n height: 14px;\n margin: 0 12px;\n vertical-align: middle;\n}\n.ant-breadcrumb + .ant-page-header-heading {\n margin-top: 8px;\n}\n.ant-page-header-heading {\n width: 100%;\n overflow: hidden;\n}\n.ant-page-header-heading-title {\n display: block;\n float: left;\n margin-bottom: 0;\n padding-right: 12px;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 600;\n font-size: 20px;\n line-height: 32px;\n}\n.ant-page-header-heading .ant-avatar {\n float: left;\n margin-right: 12px;\n}\n.ant-page-header-heading-sub-title {\n float: left;\n margin: 5px 0;\n margin-right: 12px;\n color: rgba(0, 0, 0, 0.45);\n font-size: 14px;\n line-height: 22px;\n}\n.ant-page-header-heading-tags {\n float: left;\n margin: 4px 0;\n}\n.ant-page-header-heading-extra {\n float: right;\n}\n.ant-page-header-heading-extra > * {\n margin-left: 8px;\n}\n.ant-page-header-heading-extra > *:first-child {\n margin-left: 0;\n}\n.ant-page-header-content {\n padding-top: 12px;\n overflow: hidden;\n}\n.ant-page-header-footer {\n margin-top: 16px;\n}\n.ant-page-header-footer .ant-tabs-bar {\n margin-bottom: 1px;\n border-bottom: 0;\n}\n.ant-page-header-footer .ant-tabs-bar .ant-tabs-nav .ant-tabs-tab {\n padding: 8px;\n font-size: 16px;\n}\n@media (max-width: 576px) {\n .ant-page-header-heading-extra {\n display: block;\n float: unset;\n width: 100%;\n padding-top: 12px;\n overflow: hidden;\n }\n}\n/*# sourceMappingURL=index.css.map */";
|
|
238
|
+
n(css,{"prepend":true});
|
|
239
|
+
|
|
240
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
241
|
+
|
|
242
|
+
var renderBack = function renderBack(prefixCls, backIcon, onBack) {
|
|
243
|
+
if (!backIcon || !onBack) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return /*#__PURE__*/React.createElement(LocaleReceiver, {
|
|
248
|
+
componentName: "PageHeader"
|
|
249
|
+
}, function (_ref) {
|
|
250
|
+
var back = _ref.back;
|
|
251
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
252
|
+
className: "".concat(prefixCls, "-back")
|
|
253
|
+
}, /*#__PURE__*/React.createElement(TransButton, {
|
|
254
|
+
onClick: function onClick(e) {
|
|
255
|
+
if (onBack) {
|
|
256
|
+
onBack(e);
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
className: "".concat(prefixCls, "-back-button"),
|
|
260
|
+
"aria-label": back
|
|
261
|
+
}, backIcon));
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
var renderBreadcrumb = function renderBreadcrumb(breadcrumb) {
|
|
266
|
+
return /*#__PURE__*/React.createElement(Breadcrumb, breadcrumb);
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
var renderTitle = function renderTitle(prefixCls, props) {
|
|
270
|
+
var title = props.title,
|
|
271
|
+
avatar = props.avatar,
|
|
272
|
+
subTitle = props.subTitle,
|
|
273
|
+
tags = props.tags,
|
|
274
|
+
extra = props.extra,
|
|
275
|
+
backIcon = props.backIcon,
|
|
276
|
+
onBack = props.onBack;
|
|
277
|
+
var headingPrefixCls = "".concat(prefixCls, "-heading");
|
|
278
|
+
|
|
279
|
+
if (title || subTitle || tags || extra) {
|
|
280
|
+
var backIconDom = renderBack(prefixCls, backIcon, onBack);
|
|
281
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
282
|
+
className: headingPrefixCls
|
|
283
|
+
}, backIconDom, avatar && /*#__PURE__*/React.createElement(Avatar, avatar), title && /*#__PURE__*/React.createElement("span", {
|
|
284
|
+
className: "".concat(headingPrefixCls, "-title")
|
|
285
|
+
}, title), subTitle && /*#__PURE__*/React.createElement("span", {
|
|
286
|
+
className: "".concat(headingPrefixCls, "-sub-title")
|
|
287
|
+
}, subTitle), tags && /*#__PURE__*/React.createElement("span", {
|
|
288
|
+
className: "".concat(headingPrefixCls, "-tags")
|
|
289
|
+
}, tags), extra && /*#__PURE__*/React.createElement("span", {
|
|
290
|
+
className: "".concat(headingPrefixCls, "-extra")
|
|
291
|
+
}, extra));
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return null;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
var renderFooter = function renderFooter(prefixCls, footer) {
|
|
298
|
+
if (footer) {
|
|
299
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
300
|
+
className: "".concat(prefixCls, "-footer")
|
|
301
|
+
}, footer);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
return null;
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
var renderChildren = function renderChildren(prefixCls, children) {
|
|
308
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
309
|
+
className: "".concat(prefixCls, "-content")
|
|
310
|
+
}, children);
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
var PageHeader = function PageHeader(props) {
|
|
314
|
+
return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (_ref2) {
|
|
315
|
+
var getPrefixCls = _ref2.getPrefixCls,
|
|
316
|
+
pageHeader = _ref2.pageHeader;
|
|
317
|
+
var customizePrefixCls = props.prefixCls,
|
|
318
|
+
style = props.style,
|
|
319
|
+
footer = props.footer,
|
|
320
|
+
children = props.children,
|
|
321
|
+
breadcrumb = props.breadcrumb,
|
|
322
|
+
customizeClassName = props.className;
|
|
323
|
+
var ghost = true; // Use `ghost` from `props` or from `ConfigProvider` instead.
|
|
324
|
+
|
|
325
|
+
if ('ghost' in props) {
|
|
326
|
+
ghost = props.ghost;
|
|
327
|
+
} else if (pageHeader && 'ghost' in pageHeader) {
|
|
328
|
+
ghost = pageHeader.ghost;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
var prefixCls = getPrefixCls('page-header', customizePrefixCls);
|
|
332
|
+
var breadcrumbDom = breadcrumb && breadcrumb.routes ? renderBreadcrumb(breadcrumb) : null;
|
|
333
|
+
var className = classNames(prefixCls, customizeClassName, _defineProperty({
|
|
334
|
+
'has-breadcrumb': breadcrumbDom,
|
|
335
|
+
'has-footer': footer
|
|
336
|
+
}, "".concat(prefixCls, "-ghost"), ghost));
|
|
337
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
338
|
+
className: className,
|
|
339
|
+
style: style
|
|
340
|
+
}, breadcrumbDom, renderTitle(prefixCls, props), children && renderChildren(prefixCls, children), renderFooter(prefixCls, footer));
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
PageHeader.defaultProps = {
|
|
345
|
+
backIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
346
|
+
type: "arrow-left"
|
|
347
|
+
})
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
export { PageHeader as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { n } from '../../config-provider.js';
|
|
2
|
+
export { P as default } from '../../Pagination.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../../icon.js';
|
|
5
|
+
import '../../zh_CN.js';
|
|
6
|
+
import '../../menu.js';
|
|
7
|
+
import 'react-dom';
|
|
8
|
+
import '../../index12.js';
|
|
9
|
+
import '../../Divider.js';
|
|
10
|
+
import '../../index5.js';
|
|
11
|
+
import '../../tree.js';
|
|
12
|
+
import '../../input.js';
|
|
13
|
+
|
|
14
|
+
var css = "/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-pagination {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n font-feature-settings: 'tnum';\n}\n.ant-pagination ul,\n.ant-pagination ol {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.ant-pagination::after {\n display: block;\n clear: both;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n content: ' ';\n}\n.ant-pagination-total-text {\n display: inline-block;\n height: 32px;\n margin-right: 8px;\n line-height: 30px;\n vertical-align: middle;\n}\n.ant-pagination-item {\n display: inline-block;\n min-width: 32px;\n height: 32px;\n margin-right: 8px;\n font-family: Arial;\n line-height: 30px;\n text-align: center;\n vertical-align: middle;\n list-style: none;\n background-color: #fff;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n outline: 0;\n cursor: pointer;\n user-select: none;\n}\n.ant-pagination-item a {\n display: block;\n padding: 0 6px;\n color: rgba(0, 0, 0, 0.65);\n transition: none;\n}\n.ant-pagination-item a:hover {\n text-decoration: none;\n}\n.ant-pagination-item:focus,\n.ant-pagination-item:hover {\n border-color: #1890ff;\n transition: all 0.3s;\n}\n.ant-pagination-item:focus a,\n.ant-pagination-item:hover a {\n color: #1890ff;\n}\n.ant-pagination-item-active {\n font-weight: 500;\n background: #fff;\n border-color: #1890ff;\n}\n.ant-pagination-item-active a {\n color: #1890ff;\n}\n.ant-pagination-item-active:focus,\n.ant-pagination-item-active:hover {\n border-color: #40a9ff;\n}\n.ant-pagination-item-active:focus a,\n.ant-pagination-item-active:hover a {\n color: #40a9ff;\n}\n.ant-pagination-jump-prev,\n.ant-pagination-jump-next {\n outline: 0;\n}\n.ant-pagination-jump-prev .ant-pagination-item-container,\n.ant-pagination-jump-next .ant-pagination-item-container {\n position: relative;\n}\n.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon,\n.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon {\n display: inline-block;\n font-size: 12px;\n font-size: 12px \\9;\n transform: scale(1) rotate(0deg);\n color: #1890ff;\n letter-spacing: -1px;\n opacity: 0;\n transition: all 0.2s;\n}\n:root .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon,\n:root .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon {\n font-size: 12px;\n}\n.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon-svg,\n.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon-svg {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n margin: auto;\n}\n.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,\n.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: block;\n margin: auto;\n color: rgba(0, 0, 0, 0.25);\n letter-spacing: 2px;\n text-align: center;\n text-indent: 0.13em;\n opacity: 1;\n transition: all 0.2s;\n}\n.ant-pagination-jump-prev:focus .ant-pagination-item-link-icon,\n.ant-pagination-jump-next:focus .ant-pagination-item-link-icon,\n.ant-pagination-jump-prev:hover .ant-pagination-item-link-icon,\n.ant-pagination-jump-next:hover .ant-pagination-item-link-icon {\n opacity: 1;\n}\n.ant-pagination-jump-prev:focus .ant-pagination-item-ellipsis,\n.ant-pagination-jump-next:focus .ant-pagination-item-ellipsis,\n.ant-pagination-jump-prev:hover .ant-pagination-item-ellipsis,\n.ant-pagination-jump-next:hover .ant-pagination-item-ellipsis {\n opacity: 0;\n}\n.ant-pagination-prev,\n.ant-pagination-jump-prev,\n.ant-pagination-jump-next {\n margin-right: 8px;\n}\n.ant-pagination-prev,\n.ant-pagination-next,\n.ant-pagination-jump-prev,\n.ant-pagination-jump-next {\n display: inline-block;\n min-width: 32px;\n height: 32px;\n color: rgba(0, 0, 0, 0.65);\n font-family: Arial;\n line-height: 32px;\n text-align: center;\n vertical-align: middle;\n list-style: none;\n border-radius: 4px;\n cursor: pointer;\n transition: all 0.3s;\n}\n.ant-pagination-prev,\n.ant-pagination-next {\n outline: 0;\n}\n.ant-pagination-prev a,\n.ant-pagination-next a {\n color: rgba(0, 0, 0, 0.65);\n user-select: none;\n}\n.ant-pagination-prev:hover a,\n.ant-pagination-next:hover a {\n border-color: #40a9ff;\n}\n.ant-pagination-prev .ant-pagination-item-link,\n.ant-pagination-next .ant-pagination-item-link {\n display: block;\n height: 100%;\n font-size: 12px;\n text-align: center;\n background-color: #fff;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n outline: none;\n transition: all 0.3s;\n}\n.ant-pagination-prev:focus .ant-pagination-item-link,\n.ant-pagination-next:focus .ant-pagination-item-link,\n.ant-pagination-prev:hover .ant-pagination-item-link,\n.ant-pagination-next:hover .ant-pagination-item-link {\n color: #1890ff;\n border-color: #1890ff;\n}\n.ant-pagination-disabled,\n.ant-pagination-disabled:hover,\n.ant-pagination-disabled:focus {\n cursor: not-allowed;\n}\n.ant-pagination-disabled a,\n.ant-pagination-disabled:hover a,\n.ant-pagination-disabled:focus a,\n.ant-pagination-disabled .ant-pagination-item-link,\n.ant-pagination-disabled:hover .ant-pagination-item-link,\n.ant-pagination-disabled:focus .ant-pagination-item-link {\n color: rgba(0, 0, 0, 0.25);\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n.ant-pagination-slash {\n margin: 0 10px 0 5px;\n}\n.ant-pagination-options {\n display: inline-block;\n margin-left: 16px;\n vertical-align: middle;\n}\n.ant-pagination-options-size-changer.ant-select {\n display: inline-block;\n width: auto;\n margin-right: 8px;\n}\n.ant-pagination-options-quick-jumper {\n display: inline-block;\n height: 32px;\n line-height: 32px;\n vertical-align: top;\n}\n.ant-pagination-options-quick-jumper input {\n position: relative;\n display: inline-block;\n width: 100%;\n height: 32px;\n padding: 4px 11px;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n line-height: 1.5;\n background-color: #fff;\n background-image: none;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n transition: all 0.3s;\n width: 50px;\n margin: 0 8px;\n}\n.ant-pagination-options-quick-jumper input::-moz-placeholder {\n color: #bfbfbf;\n opacity: 1;\n}\n.ant-pagination-options-quick-jumper input:-ms-input-placeholder {\n color: #bfbfbf;\n}\n.ant-pagination-options-quick-jumper input::-webkit-input-placeholder {\n color: #bfbfbf;\n}\n.ant-pagination-options-quick-jumper input:placeholder-shown {\n text-overflow: ellipsis;\n}\n.ant-pagination-options-quick-jumper input:hover {\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.ant-pagination-options-quick-jumper input:focus {\n border-color: #40a9ff;\n border-right-width: 1px !important;\n outline: 0;\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\n}\n.ant-pagination-options-quick-jumper input-disabled {\n color: rgba(0, 0, 0, 0.25);\n background-color: #f5f5f5;\n cursor: not-allowed;\n opacity: 1;\n}\n.ant-pagination-options-quick-jumper input-disabled:hover {\n border-color: #d9d9d9;\n border-right-width: 1px !important;\n}\n.ant-pagination-options-quick-jumper input[disabled] {\n color: rgba(0, 0, 0, 0.25);\n background-color: #f5f5f5;\n cursor: not-allowed;\n opacity: 1;\n}\n.ant-pagination-options-quick-jumper input[disabled]:hover {\n border-color: #d9d9d9;\n border-right-width: 1px !important;\n}\ntextarea.ant-pagination-options-quick-jumper input {\n max-width: 100%;\n height: auto;\n min-height: 32px;\n line-height: 1.5;\n vertical-align: bottom;\n transition: all 0.3s, height 0s;\n}\n.ant-pagination-options-quick-jumper input-lg {\n height: 40px;\n padding: 6px 11px;\n font-size: 16px;\n}\n.ant-pagination-options-quick-jumper input-sm {\n height: 24px;\n padding: 1px 7px;\n}\n.ant-pagination-simple .ant-pagination-prev,\n.ant-pagination-simple .ant-pagination-next {\n height: 24px;\n line-height: 24px;\n vertical-align: top;\n}\n.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link,\n.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link {\n height: 24px;\n border: 0;\n}\n.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link::after,\n.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link::after {\n height: 24px;\n line-height: 24px;\n}\n.ant-pagination-simple .ant-pagination-simple-pager {\n display: inline-block;\n height: 24px;\n margin-right: 8px;\n}\n.ant-pagination-simple .ant-pagination-simple-pager input {\n box-sizing: border-box;\n height: 100%;\n margin-right: 8px;\n padding: 0 6px;\n text-align: center;\n background-color: #fff;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n outline: none;\n transition: border-color 0.3s;\n}\n.ant-pagination-simple .ant-pagination-simple-pager input:hover {\n border-color: #1890ff;\n}\n.ant-pagination.mini .ant-pagination-total-text,\n.ant-pagination.mini .ant-pagination-simple-pager {\n height: 24px;\n line-height: 24px;\n}\n.ant-pagination.mini .ant-pagination-item {\n min-width: 24px;\n height: 24px;\n margin: 0;\n line-height: 22px;\n}\n.ant-pagination.mini .ant-pagination-item:not(.ant-pagination-item-active) {\n background: transparent;\n border-color: transparent;\n}\n.ant-pagination.mini .ant-pagination-prev,\n.ant-pagination.mini .ant-pagination-next {\n min-width: 24px;\n height: 24px;\n margin: 0;\n line-height: 24px;\n}\n.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link,\n.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link {\n background: transparent;\n border-color: transparent;\n}\n.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link::after,\n.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link::after {\n height: 24px;\n line-height: 24px;\n}\n.ant-pagination.mini .ant-pagination-jump-prev,\n.ant-pagination.mini .ant-pagination-jump-next {\n height: 24px;\n margin-right: 0;\n line-height: 24px;\n}\n.ant-pagination.mini .ant-pagination-options {\n margin-left: 2px;\n}\n.ant-pagination.mini .ant-pagination-options-quick-jumper {\n height: 24px;\n line-height: 24px;\n}\n.ant-pagination.mini .ant-pagination-options-quick-jumper input {\n height: 24px;\n padding: 1px 7px;\n width: 44px;\n}\n.ant-pagination.ant-pagination-disabled {\n cursor: not-allowed;\n}\n.ant-pagination.ant-pagination-disabled .ant-pagination-item {\n background: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n.ant-pagination.ant-pagination-disabled .ant-pagination-item a {\n color: rgba(0, 0, 0, 0.25);\n background: transparent;\n border: none;\n cursor: not-allowed;\n}\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-active {\n background: #dbdbdb;\n border-color: transparent;\n}\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-active a {\n color: #fff;\n}\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-link,\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-link:hover,\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-link:focus {\n color: rgba(0, 0, 0, 0.45);\n background: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-prev:focus .ant-pagination-item-link-icon,\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-next:focus .ant-pagination-item-link-icon,\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-prev:hover .ant-pagination-item-link-icon,\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-next:hover .ant-pagination-item-link-icon {\n opacity: 0;\n}\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-prev:focus .ant-pagination-item-ellipsis,\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-next:focus .ant-pagination-item-ellipsis,\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-prev:hover .ant-pagination-item-ellipsis,\n.ant-pagination.ant-pagination-disabled .ant-pagination-jump-next:hover .ant-pagination-item-ellipsis {\n opacity: 1;\n}\n@media only screen and (max-width: 992px) {\n .ant-pagination-item-after-jump-prev,\n .ant-pagination-item-before-jump-next {\n display: none;\n }\n}\n@media only screen and (max-width: 576px) {\n .ant-pagination-options {\n display: none;\n }\n}\n/*# sourceMappingURL=index.css.map */";
|
|
15
|
+
n(css,{"prepend":true});
|