@douyinfe/semi-ui 2.35.0-beta.0 → 2.36.0-alpha.0
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/css/semi.css +494 -25
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +188 -77
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/buttonGroup.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/collapse/item.d.ts +2 -0
- package/lib/cjs/collapse/item.js +3 -2
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/inputGroup.d.ts +1 -1
- package/lib/cjs/modal/confirm.d.ts +17 -17
- package/lib/cjs/navigation/Item.d.ts +4 -0
- package/lib/cjs/navigation/Item.js +29 -10
- package/lib/cjs/navigation/SubNav.d.ts +5 -0
- package/lib/cjs/navigation/SubNav.js +51 -26
- package/lib/cjs/overflowList/index.js +4 -1
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/skeleton/index.d.ts +1 -0
- package/lib/cjs/skeleton/index.js +1 -0
- package/lib/cjs/skeleton/item.d.ts +1 -0
- package/lib/cjs/skeleton/item.js +6 -1
- package/lib/cjs/steps/basicStep.d.ts +3 -0
- package/lib/cjs/steps/basicStep.js +8 -2
- package/lib/cjs/steps/basicSteps.js +2 -1
- package/lib/cjs/steps/fillStep.d.ts +2 -0
- package/lib/cjs/steps/fillStep.js +3 -1
- package/lib/cjs/steps/fillSteps.js +5 -8
- package/lib/cjs/steps/index.d.ts +63 -1
- package/lib/cjs/steps/index.js +9 -0
- package/lib/cjs/steps/navStep.d.ts +3 -0
- package/lib/cjs/steps/navStep.js +6 -2
- package/lib/cjs/steps/navSteps.js +2 -1
- package/lib/cjs/steps/step.d.ts +4 -1
- package/lib/cjs/steps/step.js +1 -0
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +1 -1
- package/lib/cjs/timeline/context.d.ts +8 -0
- package/lib/cjs/timeline/context.js +15 -0
- package/lib/cjs/timeline/index.d.ts +2 -1
- package/lib/cjs/timeline/index.js +8 -2
- package/lib/cjs/timeline/item.d.ts +10 -0
- package/lib/cjs/timeline/item.js +42 -3
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/buttonGroup.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/collapse/item.d.ts +2 -0
- package/lib/es/collapse/item.js +3 -2
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/inputGroup.d.ts +1 -1
- package/lib/es/modal/confirm.d.ts +17 -17
- package/lib/es/navigation/Item.d.ts +4 -0
- package/lib/es/navigation/Item.js +28 -10
- package/lib/es/navigation/SubNav.d.ts +5 -0
- package/lib/es/navigation/SubNav.js +52 -26
- package/lib/es/overflowList/index.js +4 -1
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/skeleton/index.d.ts +1 -0
- package/lib/es/skeleton/index.js +1 -0
- package/lib/es/skeleton/item.d.ts +1 -0
- package/lib/es/skeleton/item.js +6 -1
- package/lib/es/steps/basicStep.d.ts +3 -0
- package/lib/es/steps/basicStep.js +8 -2
- package/lib/es/steps/basicSteps.js +2 -1
- package/lib/es/steps/fillStep.d.ts +2 -0
- package/lib/es/steps/fillStep.js +3 -1
- package/lib/es/steps/fillSteps.js +6 -8
- package/lib/es/steps/index.d.ts +63 -1
- package/lib/es/steps/index.js +6 -0
- package/lib/es/steps/navStep.d.ts +3 -0
- package/lib/es/steps/navStep.js +6 -2
- package/lib/es/steps/navSteps.js +2 -1
- package/lib/es/steps/step.d.ts +4 -1
- package/lib/es/steps/step.js +1 -0
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +1 -1
- package/lib/es/timeline/context.d.ts +8 -0
- package/lib/es/timeline/context.js +3 -0
- package/lib/es/timeline/index.d.ts +2 -1
- package/lib/es/timeline/index.js +7 -2
- package/lib/es/timeline/item.d.ts +10 -0
- package/lib/es/timeline/item.js +41 -3
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -39031,6 +39031,10 @@ const item_Avatar = generator('avatar')(Generic);
|
|
|
39031
39031
|
const item_Image = generator('image')(Generic);
|
|
39032
39032
|
const item_Title = generator('title')(Generic);
|
|
39033
39033
|
const item_Button = generator('button')(Generic);
|
|
39034
|
+
item_Avatar.elementType = 'Skeleton.Avatar';
|
|
39035
|
+
item_Image.elementType = 'Skeleton.Image';
|
|
39036
|
+
item_Title.elementType = 'Skeleton.Title';
|
|
39037
|
+
item_Button.elementType = 'Skeleton.Button';
|
|
39034
39038
|
class item_Paragraph extends external_root_React_commonjs2_react_commonjs_react_amd_react_.PureComponent {
|
|
39035
39039
|
render() {
|
|
39036
39040
|
const {
|
|
@@ -39059,6 +39063,7 @@ item_Paragraph.defaultProps = {
|
|
|
39059
39063
|
prefixCls: skeleton_constants_cssClasses.PREFIX,
|
|
39060
39064
|
rows: 4
|
|
39061
39065
|
};
|
|
39066
|
+
item_Paragraph.elementType = 'Skeleton.Paragraph';
|
|
39062
39067
|
;// CONCATENATED MODULE: ./skeleton/index.tsx
|
|
39063
39068
|
var skeleton_rest = undefined && undefined.__rest || function (s, e) {
|
|
39064
39069
|
var t = {};
|
|
@@ -39129,6 +39134,7 @@ Skeleton.propTypes = {
|
|
|
39129
39134
|
loading: (prop_types_default()).bool,
|
|
39130
39135
|
children: (prop_types_default()).node
|
|
39131
39136
|
};
|
|
39137
|
+
Skeleton.elementType = 'Skeleton';
|
|
39132
39138
|
/* harmony default export */ const skeleton_0 = (Skeleton);
|
|
39133
39139
|
;// CONCATENATED MODULE: ../semi-foundation/space/constants.ts
|
|
39134
39140
|
|
|
@@ -47972,7 +47978,7 @@ class CollapsePanel extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
47972
47978
|
activeSet,
|
|
47973
47979
|
motion
|
|
47974
47980
|
} = this.context;
|
|
47975
|
-
const active = activeSet.has(itemKey);
|
|
47981
|
+
const active = (activeSet === null || activeSet === void 0 ? void 0 : activeSet.has(itemKey)) || this.props.active;
|
|
47976
47982
|
const itemCls = classnames_default()(className, {
|
|
47977
47983
|
[`${collapse_constants_cssClasses.PREFIX}-item`]: true
|
|
47978
47984
|
});
|
|
@@ -48023,6 +48029,7 @@ CollapsePanel.defaultProps = {
|
|
|
48023
48029
|
showArrow: true,
|
|
48024
48030
|
disabled: false
|
|
48025
48031
|
};
|
|
48032
|
+
CollapsePanel.elementType = 'Collapse.Panel';
|
|
48026
48033
|
// EXTERNAL MODULE: ../semi-foundation/collapse/collapse.scss
|
|
48027
48034
|
var collapse = __webpack_require__("HnyD");
|
|
48028
48035
|
;// CONCATENATED MODULE: ./collapse/index.tsx
|
|
@@ -71021,6 +71028,7 @@ const NavContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_rea
|
|
|
71021
71028
|
|
|
71022
71029
|
|
|
71023
71030
|
|
|
71031
|
+
|
|
71024
71032
|
/* eslint-disable max-len */
|
|
71025
71033
|
|
|
71026
71034
|
/* eslint-disable no-nested-ternary */
|
|
@@ -71119,21 +71127,28 @@ class Item_NavItem extends BaseComponent {
|
|
|
71119
71127
|
notifyMouseLeave: function () {
|
|
71120
71128
|
return _this.props.onMouseLeave(...arguments);
|
|
71121
71129
|
},
|
|
71122
|
-
getIsCollapsed: () => this.props.isCollapsed || Boolean(this.context && this.context.isCollapsed)
|
|
71123
|
-
getSelected: () => Boolean(this.context && this.context.selectedKeys && this.context.selectedKeys.includes(this.props.itemKey)),
|
|
71124
|
-
getIsOpen: () => Boolean(this.context && this.context.openKeys && this.context.openKeys.includes(this.props.itemKey))
|
|
71130
|
+
getIsCollapsed: () => this.props.isCollapsed || Boolean(this.context && this.context.isCollapsed),
|
|
71131
|
+
getSelected: () => this.props.selected || Boolean(this.context && this.context.selectedKeys && this.context.selectedKeys.includes(this.props.itemKey)),
|
|
71132
|
+
getIsOpen: () => Boolean(this.context && this.context.openKeys && this.context.openKeys.includes(this.props.itemKey)),
|
|
71133
|
+
getIsInSubNav: () => this.props.isInSubNav || Boolean(this.context && this.context.isInSubNav),
|
|
71134
|
+
getMode: () => {
|
|
71135
|
+
var _a, _b;
|
|
71136
|
+
|
|
71137
|
+
return (_a = this.props.mode) !== null && _a !== void 0 ? _a : (_b = this.context) === null || _b === void 0 ? void 0 : _b.mode;
|
|
71138
|
+
}
|
|
71125
71139
|
});
|
|
71126
71140
|
}
|
|
71127
71141
|
|
|
71128
71142
|
renderIcon(icon, pos) {
|
|
71129
71143
|
let isToggleIcon = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
71130
71144
|
let key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
71145
|
+
const mode = this.adapter.getMode();
|
|
71131
71146
|
|
|
71132
71147
|
if (this.props.isSubNav) {
|
|
71133
71148
|
return null;
|
|
71134
71149
|
}
|
|
71135
71150
|
|
|
71136
|
-
if (!icon &&
|
|
71151
|
+
if (!icon && mode === navigation_constants_strings.MODE_HORIZONTAL) {
|
|
71137
71152
|
return null;
|
|
71138
71153
|
}
|
|
71139
71154
|
|
|
@@ -71156,6 +71171,8 @@ class Item_NavItem extends BaseComponent {
|
|
|
71156
71171
|
}
|
|
71157
71172
|
|
|
71158
71173
|
render() {
|
|
71174
|
+
var _a;
|
|
71175
|
+
|
|
71159
71176
|
const {
|
|
71160
71177
|
text,
|
|
71161
71178
|
children,
|
|
@@ -71171,16 +71188,17 @@ class Item_NavItem extends BaseComponent {
|
|
|
71171
71188
|
linkOptions,
|
|
71172
71189
|
disabled,
|
|
71173
71190
|
level = 0,
|
|
71174
|
-
tabIndex
|
|
71191
|
+
tabIndex,
|
|
71192
|
+
mode: modeInProps
|
|
71175
71193
|
} = this.props;
|
|
71176
71194
|
const {
|
|
71177
|
-
mode,
|
|
71178
|
-
isInSubNav,
|
|
71179
71195
|
prefixCls,
|
|
71180
71196
|
limitIndent
|
|
71181
71197
|
} = this.context;
|
|
71182
71198
|
const isCollapsed = this.adapter.getIsCollapsed();
|
|
71183
71199
|
const selected = this.adapter.getSelected();
|
|
71200
|
+
const isInSubNav = this.adapter.getIsInSubNav();
|
|
71201
|
+
const mode = this.adapter.getMode();
|
|
71184
71202
|
let itemChildren = null;
|
|
71185
71203
|
|
|
71186
71204
|
if (!isNullOrUndefined(children)) {
|
|
@@ -71228,14 +71246,20 @@ class Item_NavItem extends BaseComponent {
|
|
|
71228
71246
|
onKeyDown: this.handleKeyPress
|
|
71229
71247
|
}, itemChildren);
|
|
71230
71248
|
} else {
|
|
71231
|
-
//
|
|
71249
|
+
// isFirstLayer 用于决定 semi-navigation-first-layers(仅在 c2中使用) 是否生效
|
|
71250
|
+
// 当 this.props.isInSubNav 存在是,则由 this.props.isInSubNav 决定
|
|
71251
|
+
// 否则由 this.context?.mode 决定,因为第一层节点无context
|
|
71252
|
+
const isFirstLayer = !isUndefined_default()(this.props.isInSubNav) ? !this.props.isInSubNav : isUndefined_default()((_a = this.context) === null || _a === void 0 ? void 0 : _a.mode); // Items are divided into normal and sub-wrap
|
|
71253
|
+
|
|
71232
71254
|
const popoverItemCls = classnames_default()(`${className || `${Item_clsPrefix}-normal`}`, {
|
|
71233
71255
|
[Item_clsPrefix]: true,
|
|
71234
71256
|
[`${Item_clsPrefix}-sub`]: isSubNav,
|
|
71235
71257
|
[`${Item_clsPrefix}-selected`]: selected && !isSubNav,
|
|
71236
71258
|
[`${Item_clsPrefix}-collapsed`]: isCollapsed,
|
|
71237
71259
|
[`${Item_clsPrefix}-disabled`]: disabled,
|
|
71238
|
-
[`${Item_clsPrefix}-has-link`]: typeof link === 'string'
|
|
71260
|
+
[`${Item_clsPrefix}-has-link`]: typeof link === 'string',
|
|
71261
|
+
[`${navigation_constants_cssClasses.PREFIX}-first-layer`]: isFirstLayer,
|
|
71262
|
+
[`${Item_clsPrefix}-horizontal`]: modeInProps === navigation_constants_strings.MODE_HORIZONTAL
|
|
71239
71263
|
});
|
|
71240
71264
|
const ariaProps = {
|
|
71241
71265
|
'aria-disabled': disabled
|
|
@@ -71314,10 +71338,12 @@ Item_NavItem.defaultProps = {
|
|
|
71314
71338
|
disabled: false,
|
|
71315
71339
|
tabIndex: 0
|
|
71316
71340
|
};
|
|
71341
|
+
Item_NavItem.elementType = 'Nav.Item';
|
|
71317
71342
|
;// CONCATENATED MODULE: ./navigation/SubNav.tsx
|
|
71318
71343
|
|
|
71319
71344
|
|
|
71320
71345
|
|
|
71346
|
+
|
|
71321
71347
|
/* eslint-disable max-len */
|
|
71322
71348
|
|
|
71323
71349
|
/* eslint-disable no-nested-ternary */
|
|
@@ -71422,16 +71448,29 @@ class SubNav extends BaseComponent {
|
|
|
71422
71448
|
|
|
71423
71449
|
return _this._invokeContextFunc('onClick', ...args);
|
|
71424
71450
|
},
|
|
71425
|
-
getIsSelected: itemKey => Boolean(!isNullOrUndefined(itemKey) && get_default()(this.context, 'selectedKeys', []).includes(String(itemKey))),
|
|
71426
|
-
getIsOpen: () => Boolean(this.context && this.context.openKeys && this.context.openKeys.includes(String(this.props.itemKey)))
|
|
71451
|
+
getIsSelected: itemKey => this.props.active || Boolean(!isNullOrUndefined(itemKey) && get_default()(this.context, 'selectedKeys', []).includes(String(itemKey))),
|
|
71452
|
+
getIsOpen: () => this.props.isOpen || Boolean(this.context && this.context.openKeys && this.context.openKeys.includes(String(this.props.itemKey))),
|
|
71453
|
+
getIsCollapsed: () => {
|
|
71454
|
+
var _a;
|
|
71455
|
+
|
|
71456
|
+
return this.props.isCollapsed || Boolean((_a = this.context) === null || _a === void 0 ? void 0 : _a.isCollapsed);
|
|
71457
|
+
},
|
|
71458
|
+
getMode: () => {
|
|
71459
|
+
var _a, _b;
|
|
71460
|
+
|
|
71461
|
+
return (_a = this.props.mode) !== null && _a !== void 0 ? _a : (_b = this.context) === null || _b === void 0 ? void 0 : _b.mode;
|
|
71462
|
+
}
|
|
71427
71463
|
});
|
|
71428
71464
|
}
|
|
71429
71465
|
|
|
71430
71466
|
renderIcon(icon, pos, withTransition) {
|
|
71431
71467
|
let isToggleIcon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
71432
71468
|
let key = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
71469
|
+
|
|
71470
|
+
var _a;
|
|
71471
|
+
|
|
71433
71472
|
const {
|
|
71434
|
-
prefixCls
|
|
71473
|
+
prefixCls = navigation_constants_cssClasses.PREFIX
|
|
71435
71474
|
} = this.context;
|
|
71436
71475
|
let iconSize = 'large';
|
|
71437
71476
|
|
|
@@ -71439,14 +71478,15 @@ class SubNav extends BaseComponent {
|
|
|
71439
71478
|
iconSize = 'default';
|
|
71440
71479
|
}
|
|
71441
71480
|
|
|
71481
|
+
const isOpen = this.adapter.getIsOpen();
|
|
71442
71482
|
const className = classnames_default()(`${prefixCls}-item-icon`, {
|
|
71443
|
-
[`${prefixCls}-item-icon-toggle-${this.context.toggleIconPosition}`]: isToggleIcon,
|
|
71444
|
-
[`${prefixCls}-item-icon-info`]: !isToggleIcon
|
|
71483
|
+
[`${prefixCls}-item-icon-toggle-${(_a = this.context.toggleIconPosition) !== null && _a !== void 0 ? _a : 'right'}`]: isToggleIcon,
|
|
71484
|
+
[`${prefixCls}-item-icon-info`]: !isToggleIcon,
|
|
71485
|
+
[`${prefixCls}-icon-rotate-${isOpen ? "180" : "0"}-no-transition`]: !withTransition && isToggleIcon
|
|
71445
71486
|
});
|
|
71446
|
-
const isOpen = this.adapter.getIsOpen();
|
|
71447
71487
|
const iconElem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(icon) ? withTransition ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_cssAnimation, {
|
|
71448
71488
|
animationState: isOpen ? "enter" : "leave",
|
|
71449
|
-
startClassName: `${
|
|
71489
|
+
startClassName: `${prefixCls}-icon-rotate-${isOpen ? "180" : "0"}`
|
|
71450
71490
|
}, _ref => {
|
|
71451
71491
|
let {
|
|
71452
71492
|
animationClassName
|
|
@@ -71476,17 +71516,22 @@ class SubNav extends BaseComponent {
|
|
|
71476
71516
|
level
|
|
71477
71517
|
} = this.props;
|
|
71478
71518
|
const {
|
|
71479
|
-
mode,
|
|
71480
71519
|
isInSubNav,
|
|
71481
|
-
|
|
71482
|
-
prefixCls,
|
|
71520
|
+
prefixCls = navigation_constants_cssClasses.PREFIX,
|
|
71483
71521
|
subNavMotion,
|
|
71484
71522
|
limitIndent
|
|
71485
71523
|
} = this.context;
|
|
71524
|
+
|
|
71525
|
+
const isFirstLayer = isUndefined_default()(this.context.mode);
|
|
71526
|
+
|
|
71527
|
+
const mode = this.adapter.getMode();
|
|
71486
71528
|
const isOpen = this.adapter.getIsOpen();
|
|
71529
|
+
const isCollapsed = this.adapter.getIsCollapsed();
|
|
71487
71530
|
const titleCls = classnames_default()(`${prefixCls}-sub-title`, {
|
|
71488
71531
|
[`${prefixCls}-sub-title-selected`]: this.adapter.getIsSelected(itemKey),
|
|
71489
|
-
[`${prefixCls}-sub-title-disabled`]: disabled
|
|
71532
|
+
[`${prefixCls}-sub-title-disabled`]: disabled,
|
|
71533
|
+
[`${prefixCls}-first-layer`]: isFirstLayer,
|
|
71534
|
+
[`${prefixCls}-sub-title-horizontal`]: mode === navigation_constants_strings.MODE_HORIZONTAL
|
|
71490
71535
|
});
|
|
71491
71536
|
let withTransition = false;
|
|
71492
71537
|
let toggleIconType = '';
|
|
@@ -71527,6 +71572,7 @@ class SubNav extends BaseComponent {
|
|
|
71527
71572
|
}
|
|
71528
71573
|
|
|
71529
71574
|
const isIconChevronRightShow = !isCollapsed && isInSubNav && mode === navigation_constants_strings.MODE_HORIZONTAL || isCollapsed && isInSubNav;
|
|
71575
|
+
const toggleIconPositionLeft = this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_LEFT;
|
|
71530
71576
|
const titleDiv = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
71531
71577
|
role: "menuitem",
|
|
71532
71578
|
// to avoid nested horizontal navigation be focused
|
|
@@ -71538,9 +71584,9 @@ class SubNav extends BaseComponent {
|
|
|
71538
71584
|
"aria-expanded": isOpen ? 'true' : 'false'
|
|
71539
71585
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
71540
71586
|
className: `${prefixCls}-item-inner`
|
|
71541
|
-
}, placeholderIcons,
|
|
71587
|
+
}, placeholderIcons, toggleIconPositionLeft && this.renderIcon(toggleIconType, navigation_constants_strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-left'), icon || indent || isInSubNav && mode !== navigation_constants_strings.MODE_HORIZONTAL ? this.renderIcon(icon, navigation_constants_strings.ICON_POS_LEFT, false, false, 'key-inSubNav-position-left') : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
71542
71588
|
className: `${prefixCls}-item-text`
|
|
71543
|
-
}, text),
|
|
71589
|
+
}, text), !toggleIconPositionLeft && this.renderIcon(toggleIconType, navigation_constants_strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-right')));
|
|
71544
71590
|
return titleDiv;
|
|
71545
71591
|
}
|
|
71546
71592
|
|
|
@@ -71550,12 +71596,12 @@ class SubNav extends BaseComponent {
|
|
|
71550
71596
|
maxHeight
|
|
71551
71597
|
} = this.props;
|
|
71552
71598
|
const {
|
|
71553
|
-
isCollapsed,
|
|
71554
|
-
mode,
|
|
71555
71599
|
subNavMotion,
|
|
71556
|
-
prefixCls
|
|
71600
|
+
prefixCls = navigation_constants_cssClasses.PREFIX
|
|
71557
71601
|
} = this.context;
|
|
71602
|
+
const isCollapsed = this.adapter.getIsCollapsed();
|
|
71558
71603
|
const isOpen = this.adapter.getIsOpen();
|
|
71604
|
+
const mode = this.adapter.getMode();
|
|
71559
71605
|
const isHorizontal = mode === navigation_constants_strings.MODE_HORIZONTAL;
|
|
71560
71606
|
const subNavCls = classnames_default()(`${prefixCls}-sub`, {
|
|
71561
71607
|
[`${prefixCls}-sub-open`]: isOpen,
|
|
@@ -71584,14 +71630,14 @@ class SubNav extends BaseComponent {
|
|
|
71584
71630
|
disabled
|
|
71585
71631
|
} = this.props;
|
|
71586
71632
|
const {
|
|
71587
|
-
mode,
|
|
71588
71633
|
isInSubNav,
|
|
71589
|
-
isCollapsed,
|
|
71590
71634
|
subNavCloseDelay,
|
|
71591
71635
|
subNavOpenDelay,
|
|
71592
|
-
prefixCls,
|
|
71636
|
+
prefixCls = navigation_constants_cssClasses.PREFIX,
|
|
71593
71637
|
getPopupContainer
|
|
71594
71638
|
} = this.context;
|
|
71639
|
+
const isCollapsed = this.adapter.getIsCollapsed();
|
|
71640
|
+
const mode = this.adapter.getMode();
|
|
71595
71641
|
const isOpen = this.adapter.getIsOpen();
|
|
71596
71642
|
const openKeysIsControlled = this.adapter.getOpenKeysIsControlled();
|
|
71597
71643
|
const subNavCls = classnames_default()({
|
|
@@ -71636,10 +71682,10 @@ class SubNav extends BaseComponent {
|
|
|
71636
71682
|
text
|
|
71637
71683
|
} = this.props;
|
|
71638
71684
|
const {
|
|
71639
|
-
|
|
71640
|
-
isCollapsed,
|
|
71641
|
-
prefixCls
|
|
71685
|
+
prefixCls = navigation_constants_cssClasses.PREFIX
|
|
71642
71686
|
} = this.context;
|
|
71687
|
+
const mode = this.adapter.getMode();
|
|
71688
|
+
const isCollapsed = this.adapter.getIsCollapsed();
|
|
71643
71689
|
let titleDiv = this.renderTitleDiv();
|
|
71644
71690
|
const subUl = this.renderSubUl(); // When mode=horizontal, it is displayed in Dropdown
|
|
71645
71691
|
|
|
@@ -71657,9 +71703,11 @@ class SubNav extends BaseComponent {
|
|
|
71657
71703
|
onMouseEnter: onMouseEnter,
|
|
71658
71704
|
onMouseLeave: onMouseLeave,
|
|
71659
71705
|
disabled: disabled,
|
|
71660
|
-
text: text
|
|
71706
|
+
text: text,
|
|
71707
|
+
mode: mode
|
|
71661
71708
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(nav_context.Provider, {
|
|
71662
71709
|
value: Object.assign(Object.assign({}, this.context), {
|
|
71710
|
+
mode: mode,
|
|
71663
71711
|
isInSubNav: true
|
|
71664
71712
|
})
|
|
71665
71713
|
}, titleDiv, subUl));
|
|
@@ -71720,7 +71768,8 @@ SubNav.propTypes = {
|
|
|
71720
71768
|
onMouseLeave: (prop_types_default()).func,
|
|
71721
71769
|
// Is it disabled
|
|
71722
71770
|
disabled: (prop_types_default()).bool,
|
|
71723
|
-
level: (prop_types_default()).number
|
|
71771
|
+
level: (prop_types_default()).number,
|
|
71772
|
+
active: (prop_types_default()).bool
|
|
71724
71773
|
};
|
|
71725
71774
|
SubNav.defaultProps = {
|
|
71726
71775
|
level: 0,
|
|
@@ -71736,8 +71785,10 @@ SubNav.defaultProps = {
|
|
|
71736
71785
|
"aria-hidden": true
|
|
71737
71786
|
})
|
|
71738
71787
|
},
|
|
71739
|
-
disabled: false
|
|
71788
|
+
disabled: false,
|
|
71789
|
+
active: false
|
|
71740
71790
|
};
|
|
71791
|
+
SubNav.elementType = 'Nav.Sub';
|
|
71741
71792
|
;// CONCATENATED MODULE: ./navigation/CollapseButton.tsx
|
|
71742
71793
|
|
|
71743
71794
|
|
|
@@ -73657,7 +73708,10 @@ class OverflowList extends BaseComponent {
|
|
|
73657
73708
|
}
|
|
73658
73709
|
|
|
73659
73710
|
componentDidUpdate(prevProps, prevState) {
|
|
73660
|
-
|
|
73711
|
+
const prevItemsKeys = prevProps.items.map(item => item.key);
|
|
73712
|
+
const nowItemsKeys = this.props.items.map(item => item.key); // Determine whether to update by comparing key values
|
|
73713
|
+
|
|
73714
|
+
if (!isEqual_default()(prevItemsKeys, nowItemsKeys)) {
|
|
73661
73715
|
this.itemRefs = {};
|
|
73662
73716
|
this.setState({
|
|
73663
73717
|
visibleState: new Map()
|
|
@@ -76349,7 +76403,7 @@ class SelectFoundation extends foundation {
|
|
|
76349
76403
|
|
|
76350
76404
|
const selectedValue = onChangeWithObject && typeof propValue !== 'undefined' ? propValue.value : propValue;
|
|
76351
76405
|
const selectedOptions = originalOptions.filter(option => option.value === selectedValue);
|
|
76352
|
-
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined'; // If the current value, there is a matching option in the optionList
|
|
76406
|
+
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined' && selectedValue !== null; // If the current value, there is a matching option in the optionList
|
|
76353
76407
|
|
|
76354
76408
|
if (selectedOptions.length) {
|
|
76355
76409
|
const selectedOption = selectedOptions[0];
|
|
@@ -83298,7 +83352,7 @@ class SliderFoundation extends foundation {
|
|
|
83298
83352
|
*/
|
|
83299
83353
|
|
|
83300
83354
|
|
|
83301
|
-
this.handleMousePos = (
|
|
83355
|
+
this.handleMousePos = (clientX, clientY) => {
|
|
83302
83356
|
const parentRect = this._adapter.getParentRect();
|
|
83303
83357
|
|
|
83304
83358
|
const scrollParent = this._adapter.getScrollParentVal();
|
|
@@ -83306,8 +83360,8 @@ class SliderFoundation extends foundation {
|
|
|
83306
83360
|
const parentX = parentRect ? parentRect.left : 0;
|
|
83307
83361
|
const parentY = parentRect ? parentRect.top : 0;
|
|
83308
83362
|
return {
|
|
83309
|
-
x:
|
|
83310
|
-
y:
|
|
83363
|
+
x: clientX - parentX + scrollParent.scrollLeft,
|
|
83364
|
+
y: clientY - parentY + scrollParent.scrollTop
|
|
83311
83365
|
};
|
|
83312
83366
|
};
|
|
83313
83367
|
/**
|
|
@@ -83368,9 +83422,9 @@ class SliderFoundation extends foundation {
|
|
|
83368
83422
|
startPos = sliderY + len;
|
|
83369
83423
|
} else {
|
|
83370
83424
|
startPos = vertical ? sliderY : sliderX;
|
|
83371
|
-
}
|
|
83425
|
+
} // startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos;
|
|
83426
|
+
// eslint-disable-next-line one-var
|
|
83372
83427
|
|
|
83373
|
-
startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos; // eslint-disable-next-line one-var
|
|
83374
83428
|
|
|
83375
83429
|
let endPos;
|
|
83376
83430
|
|
|
@@ -83378,9 +83432,8 @@ class SliderFoundation extends foundation {
|
|
|
83378
83432
|
endPos = sliderY;
|
|
83379
83433
|
} else {
|
|
83380
83434
|
endPos = vertical ? sliderY + sliderHeight : sliderX + sliderWidth;
|
|
83381
|
-
}
|
|
83435
|
+
} // endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
83382
83436
|
|
|
83383
|
-
endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
83384
83437
|
|
|
83385
83438
|
if (vertical && verticalReverse) {
|
|
83386
83439
|
if (position >= startPos) {
|
|
@@ -83433,7 +83486,7 @@ class SliderFoundation extends foundation {
|
|
|
83433
83486
|
let stepValue;
|
|
83434
83487
|
|
|
83435
83488
|
if (vertical && verticalReverse) {
|
|
83436
|
-
isMin = !isMin;
|
|
83489
|
+
//isMin = !isMin;
|
|
83437
83490
|
stepValue = (startPos + len - pos) / len * (max - min) + min;
|
|
83438
83491
|
} else {
|
|
83439
83492
|
stepValue = (pos - startPos) / len * (max - min) + min;
|
|
@@ -83455,11 +83508,7 @@ class SliderFoundation extends foundation {
|
|
|
83455
83508
|
}
|
|
83456
83509
|
|
|
83457
83510
|
if (range && stepValue !== compareValue) {
|
|
83458
|
-
|
|
83459
|
-
return isMin ? [currentValue[0], stepValue] : [stepValue, currentValue[1]];
|
|
83460
|
-
} else {
|
|
83461
|
-
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
83462
|
-
}
|
|
83511
|
+
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
83463
83512
|
} else if (!range && stepValue !== compareValue) {
|
|
83464
83513
|
return stepValue;
|
|
83465
83514
|
} else {
|
|
@@ -83496,11 +83545,7 @@ class SliderFoundation extends foundation {
|
|
|
83496
83545
|
const len = vertical ? sliderHeight : sliderWidth;
|
|
83497
83546
|
|
|
83498
83547
|
if (range) {
|
|
83499
|
-
|
|
83500
|
-
return [startPos + len - (value[0] - min) * len / (max - min), startPos + len - (value[1] - min) * len / (max - min)];
|
|
83501
|
-
} else {
|
|
83502
|
-
return [(value[0] - min) * len / (max - min) + startPos, (value[1] - min) * len / (max - min) + startPos];
|
|
83503
|
-
}
|
|
83548
|
+
return [(value[0] - min) * len / (max - min) + startPos, (value[1] - min) * len / (max - min) + startPos];
|
|
83504
83549
|
} else {
|
|
83505
83550
|
return (value - min) * len / (max - min) + startPos;
|
|
83506
83551
|
}
|
|
@@ -83658,7 +83703,7 @@ class SliderFoundation extends foundation {
|
|
|
83658
83703
|
this._adapter.setDragging([dragging[0], true]);
|
|
83659
83704
|
}
|
|
83660
83705
|
|
|
83661
|
-
const mousePos = this.handleMousePos(e.
|
|
83706
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
83662
83707
|
let pos = vertical ? mousePos.y : mousePos.x;
|
|
83663
83708
|
|
|
83664
83709
|
if (!this._adapter.isEventFromHandle(e)) {
|
|
@@ -83694,7 +83739,7 @@ class SliderFoundation extends foundation {
|
|
|
83694
83739
|
}
|
|
83695
83740
|
|
|
83696
83741
|
this.onHandleEnter(chooseMovePos);
|
|
83697
|
-
const mousePos = this.handleMousePos(e.
|
|
83742
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
83698
83743
|
let pagePos = vertical ? mousePos.y : mousePos.x;
|
|
83699
83744
|
pagePos = pagePos - this._dragOffset;
|
|
83700
83745
|
|
|
@@ -83994,7 +84039,7 @@ class SliderFoundation extends foundation {
|
|
|
83994
84039
|
const {
|
|
83995
84040
|
vertical
|
|
83996
84041
|
} = this.getProps();
|
|
83997
|
-
const mousePos = this.handleMousePos(e.
|
|
84042
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
83998
84043
|
const position = vertical ? mousePos.y : mousePos.x;
|
|
83999
84044
|
const isMin = this.checkWhichHandle(position);
|
|
84000
84045
|
const outPutValue = this.calculateOutputValue(position, isMin);
|
|
@@ -84877,7 +84922,9 @@ const BasicStep = props => {
|
|
|
84877
84922
|
stepNumber,
|
|
84878
84923
|
onClick,
|
|
84879
84924
|
onChange,
|
|
84880
|
-
onKeyDown
|
|
84925
|
+
onKeyDown,
|
|
84926
|
+
usedInC2D,
|
|
84927
|
+
direction: direction
|
|
84881
84928
|
} = props;
|
|
84882
84929
|
|
|
84883
84930
|
const renderIcon = () => {
|
|
@@ -84940,7 +84987,10 @@ const BasicStep = props => {
|
|
|
84940
84987
|
[`${prefixCls}-active`]: active,
|
|
84941
84988
|
[`${prefixCls}-done`]: done,
|
|
84942
84989
|
[`${prefixCls}-hover`]: onChange || props.onClick,
|
|
84943
|
-
[`${prefixCls}-${status}-hover`]: onChange || props.onClick
|
|
84990
|
+
[`${prefixCls}-${status}-hover`]: onChange || props.onClick,
|
|
84991
|
+
[`${prefixCls}-basic`]: usedInC2D,
|
|
84992
|
+
[`${prefixCls}-${direction}`]: direction,
|
|
84993
|
+
[`${prefixCls}-small`]: size === 'small'
|
|
84944
84994
|
}, className);
|
|
84945
84995
|
|
|
84946
84996
|
const handleClick = e => {
|
|
@@ -84998,6 +85048,7 @@ BasicStep.defaultProps = {
|
|
|
84998
85048
|
status: 'wait',
|
|
84999
85049
|
className: ''
|
|
85000
85050
|
};
|
|
85051
|
+
BasicStep.elementType = 'Steps.BasicStep';
|
|
85001
85052
|
/* harmony default export */ const basicStep = (BasicStep);
|
|
85002
85053
|
;// CONCATENATED MODULE: ./steps/fillStep.tsx
|
|
85003
85054
|
|
|
@@ -85094,7 +85145,8 @@ const FillStep = props => {
|
|
|
85094
85145
|
[prefixCls]: true,
|
|
85095
85146
|
[`${prefixCls}-${status}`]: Boolean(status),
|
|
85096
85147
|
[`${prefixCls}-${status}-hover`]: Boolean(status) && (onChange || onClick),
|
|
85097
|
-
[`${prefixCls}-clickable`]: onClick
|
|
85148
|
+
[`${prefixCls}-clickable`]: onClick,
|
|
85149
|
+
[`${prefixCls}-fill`]: props.usedInC2D
|
|
85098
85150
|
}, className),
|
|
85099
85151
|
style: style,
|
|
85100
85152
|
onClick: e => {
|
|
@@ -85129,6 +85181,7 @@ FillStep.defaultProps = {
|
|
|
85129
85181
|
status: 'wait',
|
|
85130
85182
|
className: ''
|
|
85131
85183
|
};
|
|
85184
|
+
FillStep.elementType = 'Steps.FillStep';
|
|
85132
85185
|
/* harmony default export */ const fillStep = (FillStep);
|
|
85133
85186
|
;// CONCATENATED MODULE: ./steps/navStep.tsx
|
|
85134
85187
|
|
|
@@ -85148,10 +85201,13 @@ const NavStep = props => {
|
|
|
85148
85201
|
total,
|
|
85149
85202
|
onClick,
|
|
85150
85203
|
onKeyDown,
|
|
85151
|
-
onChange
|
|
85204
|
+
onChange,
|
|
85205
|
+
size
|
|
85152
85206
|
} = props;
|
|
85153
85207
|
const classString = classnames_default()(prefixCls, {
|
|
85154
|
-
[`${prefixCls}-active`]: active
|
|
85208
|
+
[`${prefixCls}-active`]: active,
|
|
85209
|
+
[`${prefixCls}-nav`]: props.usedInC2D,
|
|
85210
|
+
[`${prefixCls}-small`]: size === 'small'
|
|
85155
85211
|
}, className);
|
|
85156
85212
|
|
|
85157
85213
|
const handleClick = e => {
|
|
@@ -85201,6 +85257,7 @@ NavStep.defaultProps = {
|
|
|
85201
85257
|
active: false,
|
|
85202
85258
|
className: ''
|
|
85203
85259
|
};
|
|
85260
|
+
NavStep.elementType = 'Steps.NavStep';
|
|
85204
85261
|
/* harmony default export */ const navStep = (NavStep);
|
|
85205
85262
|
;// CONCATENATED MODULE: ./steps/context.ts
|
|
85206
85263
|
|
|
@@ -85236,6 +85293,7 @@ const Step = props => {
|
|
|
85236
85293
|
return renderStep();
|
|
85237
85294
|
};
|
|
85238
85295
|
|
|
85296
|
+
Step.elementType = 'Steps.Step';
|
|
85239
85297
|
/* harmony default export */ const step = (Step);
|
|
85240
85298
|
// EXTERNAL MODULE: ../semi-foundation/steps/steps.scss
|
|
85241
85299
|
var steps = __webpack_require__("/wkG");
|
|
@@ -85259,10 +85317,8 @@ const Steps = props => {
|
|
|
85259
85317
|
onChange
|
|
85260
85318
|
} = props;
|
|
85261
85319
|
const inner = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
85262
|
-
const filteredChildren = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).filter(c => /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(c));
|
|
85263
|
-
|
|
85264
|
-
width: `${100 / filteredChildren.length}%`
|
|
85265
|
-
};
|
|
85320
|
+
const filteredChildren = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).filter(c => /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(c)); // const colStyle = direction === 'vertical' ? null : { width: `${100 / filteredChildren.length }%` };
|
|
85321
|
+
|
|
85266
85322
|
const content = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.map(filteredChildren, (child, index) => {
|
|
85267
85323
|
if (!child) {
|
|
85268
85324
|
return null;
|
|
@@ -85292,10 +85348,10 @@ const Steps = props => {
|
|
|
85292
85348
|
if (index !== current) {
|
|
85293
85349
|
onChange(index + initial);
|
|
85294
85350
|
}
|
|
85295
|
-
} : undefined;
|
|
85296
|
-
return
|
|
85297
|
-
|
|
85298
|
-
|
|
85351
|
+
} : undefined; // Whether colStyle is set has no effect
|
|
85352
|
+
// return <Col style={colStyle}>{cloneElement(child, { ...childProps })}</Col>;
|
|
85353
|
+
|
|
85354
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(col, null, /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(child, Object.assign({}, childProps)));
|
|
85299
85355
|
});
|
|
85300
85356
|
return content;
|
|
85301
85357
|
}, [children, initial, prefixCls, direction, status, current, onChange]);
|
|
@@ -85360,7 +85416,8 @@ const basicSteps_Steps = props => {
|
|
|
85360
85416
|
const stepNumber = initial + index;
|
|
85361
85417
|
const childProps = Object.assign({
|
|
85362
85418
|
stepNumber: `${stepNumber + 1}`,
|
|
85363
|
-
size
|
|
85419
|
+
size,
|
|
85420
|
+
direction
|
|
85364
85421
|
}, child.props);
|
|
85365
85422
|
|
|
85366
85423
|
if (status === 'error' && index === current - 1) {
|
|
@@ -85448,7 +85505,8 @@ const navSteps_Steps = props => {
|
|
|
85448
85505
|
|
|
85449
85506
|
const childProps = Object.assign({
|
|
85450
85507
|
index,
|
|
85451
|
-
total
|
|
85508
|
+
total,
|
|
85509
|
+
size
|
|
85452
85510
|
}, child.props);
|
|
85453
85511
|
childProps.active = index === current;
|
|
85454
85512
|
childProps.onChange = onChange ? () => {
|
|
@@ -85509,6 +85567,9 @@ var steps_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
85509
85567
|
|
|
85510
85568
|
|
|
85511
85569
|
|
|
85570
|
+
|
|
85571
|
+
|
|
85572
|
+
|
|
85512
85573
|
class steps_Steps extends external_root_React_commonjs2_react_commonjs_react_amd_react_.Component {
|
|
85513
85574
|
renderComponent() {
|
|
85514
85575
|
const _a = this.props,
|
|
@@ -85546,6 +85607,9 @@ class steps_Steps extends external_root_React_commonjs2_react_commonjs_react_amd
|
|
|
85546
85607
|
}
|
|
85547
85608
|
|
|
85548
85609
|
steps_Steps.Step = step;
|
|
85610
|
+
steps_Steps.FillStep = fillStep;
|
|
85611
|
+
steps_Steps.BasicStep = basicStep;
|
|
85612
|
+
steps_Steps.NavStep = navStep;
|
|
85549
85613
|
steps_Steps.propTypes = {
|
|
85550
85614
|
onChange: (prop_types_default()).func,
|
|
85551
85615
|
type: prop_types_default().oneOf(['fill', 'basic', 'nav']),
|
|
@@ -94380,6 +94444,10 @@ const timeline_constants_strings = {
|
|
|
94380
94444
|
ITEM_TYPE: ['ongoing', 'success', 'warning', 'error', 'default']
|
|
94381
94445
|
};
|
|
94382
94446
|
|
|
94447
|
+
;// CONCATENATED MODULE: ./timeline/context.tsx
|
|
94448
|
+
|
|
94449
|
+
const timeline_context_Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
|
94450
|
+
/* harmony default export */ const timeline_context = (timeline_context_Context);
|
|
94383
94451
|
;// CONCATENATED MODULE: ./timeline/item.tsx
|
|
94384
94452
|
|
|
94385
94453
|
|
|
@@ -94387,8 +94455,42 @@ const timeline_constants_strings = {
|
|
|
94387
94455
|
|
|
94388
94456
|
|
|
94389
94457
|
|
|
94458
|
+
|
|
94390
94459
|
const timeline_item_prefixCls = timeline_constants_cssClasses.ITEM;
|
|
94391
94460
|
class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_.PureComponent {
|
|
94461
|
+
constructor() {
|
|
94462
|
+
super(...arguments); // getC2DCls is used in C2D, it does not work in non-C2D scenes
|
|
94463
|
+
|
|
94464
|
+
this.getC2DCls = () => {
|
|
94465
|
+
let c2dCls = '';
|
|
94466
|
+
const {
|
|
94467
|
+
mode,
|
|
94468
|
+
odd,
|
|
94469
|
+
usedInC2D
|
|
94470
|
+
} = this.props;
|
|
94471
|
+
|
|
94472
|
+
if (usedInC2D) {
|
|
94473
|
+
switch (mode) {
|
|
94474
|
+
case 'center':
|
|
94475
|
+
c2dCls = `${timeline_item_prefixCls}-center ${timeline_item_prefixCls}-left`;
|
|
94476
|
+
break;
|
|
94477
|
+
|
|
94478
|
+
case 'alternate':
|
|
94479
|
+
c2dCls = `${timeline_item_prefixCls}-alternate ${timeline_item_prefixCls}-${odd ? 'left' : 'right'}`;
|
|
94480
|
+
break;
|
|
94481
|
+
|
|
94482
|
+
default:
|
|
94483
|
+
c2dCls = `${timeline_item_prefixCls}-${mode} ${mode === 'right' ? `${timeline_item_prefixCls}-mode-right` : ''}`;
|
|
94484
|
+
break;
|
|
94485
|
+
}
|
|
94486
|
+
|
|
94487
|
+
c2dCls += ` ${timeline_item_prefixCls}-not-last-child`;
|
|
94488
|
+
}
|
|
94489
|
+
|
|
94490
|
+
return c2dCls;
|
|
94491
|
+
};
|
|
94492
|
+
}
|
|
94493
|
+
|
|
94392
94494
|
render() {
|
|
94393
94495
|
const {
|
|
94394
94496
|
className,
|
|
@@ -94401,7 +94503,7 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
94401
94503
|
extra,
|
|
94402
94504
|
onClick
|
|
94403
94505
|
} = this.props;
|
|
94404
|
-
const itemCls = classnames_default()(timeline_item_prefixCls, className);
|
|
94506
|
+
const itemCls = classnames_default()(timeline_item_prefixCls, className, this.getC2DCls());
|
|
94405
94507
|
const dotCls = classnames_default()({
|
|
94406
94508
|
[`${timeline_item_prefixCls}-head`]: true,
|
|
94407
94509
|
[`${timeline_item_prefixCls}-head-custom`]: dot,
|
|
@@ -94432,6 +94534,7 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
94432
94534
|
}
|
|
94433
94535
|
|
|
94434
94536
|
}
|
|
94537
|
+
timeline_item_Item.contextType = timeline_context;
|
|
94435
94538
|
timeline_item_Item.propTypes = {
|
|
94436
94539
|
color: (prop_types_default()).string,
|
|
94437
94540
|
time: (prop_types_default()).node,
|
|
@@ -94441,13 +94544,16 @@ timeline_item_Item.propTypes = {
|
|
|
94441
94544
|
position: prop_types_default().oneOf(timeline_constants_strings.ITEM_POS),
|
|
94442
94545
|
className: (prop_types_default()).string,
|
|
94443
94546
|
style: (prop_types_default()).object,
|
|
94444
|
-
onClick: (prop_types_default()).func
|
|
94547
|
+
onClick: (prop_types_default()).func,
|
|
94548
|
+
mode: (prop_types_default()).string,
|
|
94549
|
+
lastChild: (prop_types_default()).bool
|
|
94445
94550
|
};
|
|
94446
94551
|
timeline_item_Item.defaultProps = {
|
|
94447
94552
|
type: 'default',
|
|
94448
94553
|
time: '',
|
|
94449
94554
|
onClick: (noop_default())
|
|
94450
94555
|
};
|
|
94556
|
+
timeline_item_Item.elementType = 'Timeline.Item';
|
|
94451
94557
|
;// CONCATENATED MODULE: ./timeline/index.tsx
|
|
94452
94558
|
|
|
94453
94559
|
|
|
@@ -94456,6 +94562,7 @@ timeline_item_Item.defaultProps = {
|
|
|
94456
94562
|
|
|
94457
94563
|
|
|
94458
94564
|
|
|
94565
|
+
|
|
94459
94566
|
const timeline_prefixCls = timeline_constants_cssClasses.PREFIX;
|
|
94460
94567
|
|
|
94461
94568
|
class Timeline extends external_root_React_commonjs2_react_commonjs_react_amd_react_.PureComponent {
|
|
@@ -94527,11 +94634,15 @@ class Timeline extends external_root_React_commonjs2_react_commonjs_react_amd_re
|
|
|
94527
94634
|
}
|
|
94528
94635
|
|
|
94529
94636
|
const items = childrenList || this.addClassName(children);
|
|
94530
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(
|
|
94637
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(timeline_context.Provider, {
|
|
94638
|
+
value: {
|
|
94639
|
+
mode
|
|
94640
|
+
}
|
|
94641
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
94531
94642
|
"aria-label": this.props['aria-label'],
|
|
94532
94643
|
style: style,
|
|
94533
94644
|
className: classString
|
|
94534
|
-
}, items);
|
|
94645
|
+
}, items));
|
|
94535
94646
|
}
|
|
94536
94647
|
|
|
94537
94648
|
}
|