@douyinfe/semi-ui 2.30.0-alpha.2 → 2.30.0-alpha.3
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/umd/semi-ui.js +22 -6
- 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/breadcrumb/item.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/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/cascader/index.d.ts +1 -1
- package/lib/cjs/cascader/item.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.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/popover/index.d.ts +1 -1
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +3 -3
- 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 +3 -2
- package/lib/cjs/timeline/index.js +13 -2
- package/lib/cjs/timeline/item.d.ts +7 -3
- package/lib/cjs/timeline/item.js +7 -4
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/breadcrumb/item.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/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/cascader/index.d.ts +1 -1
- package/lib/es/cascader/item.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.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/popover/index.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +3 -3
- 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 +3 -2
- package/lib/es/timeline/index.js +12 -2
- package/lib/es/timeline/item.d.ts +7 -3
- package/lib/es/timeline/item.js +6 -4
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -88437,6 +88437,10 @@ const timeline_constants_strings = {
|
|
|
88437
88437
|
ITEM_TYPE: ['ongoing', 'success', 'warning', 'error', 'default']
|
|
88438
88438
|
};
|
|
88439
88439
|
|
|
88440
|
+
// CONCATENATED MODULE: ./timeline/context.tsx
|
|
88441
|
+
|
|
88442
|
+
const timeline_context_Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createContext(null);
|
|
88443
|
+
/* harmony default export */ var timeline_context = (timeline_context_Context);
|
|
88440
88444
|
// CONCATENATED MODULE: ./timeline/item.tsx
|
|
88441
88445
|
|
|
88442
88446
|
|
|
@@ -88444,6 +88448,7 @@ const timeline_constants_strings = {
|
|
|
88444
88448
|
|
|
88445
88449
|
|
|
88446
88450
|
|
|
88451
|
+
|
|
88447
88452
|
const timeline_item_prefixCls = timeline_constants_cssClasses.ITEM;
|
|
88448
88453
|
class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
88449
88454
|
constructor() {
|
|
@@ -88453,8 +88458,8 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
88453
88458
|
let c2dCls = '';
|
|
88454
88459
|
const {
|
|
88455
88460
|
mode,
|
|
88456
|
-
|
|
88457
|
-
|
|
88461
|
+
lastChild,
|
|
88462
|
+
odd
|
|
88458
88463
|
} = this.props;
|
|
88459
88464
|
|
|
88460
88465
|
if (mode) {
|
|
@@ -88464,7 +88469,7 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
88464
88469
|
break;
|
|
88465
88470
|
|
|
88466
88471
|
case 'alternate':
|
|
88467
|
-
c2dCls = "".concat(timeline_item_prefixCls, "-alternate ").concat(timeline_item_prefixCls, "-").concat(
|
|
88472
|
+
c2dCls = "".concat(timeline_item_prefixCls, "-alternate ").concat(timeline_item_prefixCls, "-").concat(odd ? 'left' : 'right');
|
|
88468
88473
|
break;
|
|
88469
88474
|
|
|
88470
88475
|
default:
|
|
@@ -88473,7 +88478,7 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
88473
88478
|
}
|
|
88474
88479
|
}
|
|
88475
88480
|
|
|
88476
|
-
if (!
|
|
88481
|
+
if (Boolean(lastChild) && !lastChild) {
|
|
88477
88482
|
c2dCls += " ".concat(timeline_item_prefixCls, "-not-last-child");
|
|
88478
88483
|
}
|
|
88479
88484
|
|
|
@@ -88524,6 +88529,7 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
88524
88529
|
}
|
|
88525
88530
|
|
|
88526
88531
|
}
|
|
88532
|
+
timeline_item_Item.contextType = timeline_context;
|
|
88527
88533
|
timeline_item_Item.propTypes = {
|
|
88528
88534
|
color: prop_types_default.a.string,
|
|
88529
88535
|
time: prop_types_default.a.node,
|
|
@@ -88551,6 +88557,7 @@ timeline_item_Item.elementType = 'Timeline.Item';
|
|
|
88551
88557
|
|
|
88552
88558
|
|
|
88553
88559
|
|
|
88560
|
+
|
|
88554
88561
|
const timeline_prefixCls = timeline_constants_cssClasses.PREFIX;
|
|
88555
88562
|
|
|
88556
88563
|
class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
@@ -88593,6 +88600,7 @@ class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
88593
88600
|
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(ele)) {
|
|
88594
88601
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(ele, {
|
|
88595
88602
|
// @ts-ignore
|
|
88603
|
+
index: idx,
|
|
88596
88604
|
className: classnames_default()(ele.props.className, this.getPosCls(ele, idx))
|
|
88597
88605
|
});
|
|
88598
88606
|
}
|
|
@@ -88602,6 +88610,8 @@ class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
88602
88610
|
}
|
|
88603
88611
|
|
|
88604
88612
|
render() {
|
|
88613
|
+
var _a;
|
|
88614
|
+
|
|
88605
88615
|
const {
|
|
88606
88616
|
children,
|
|
88607
88617
|
className,
|
|
@@ -88616,17 +88626,23 @@ class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
88616
88626
|
|
|
88617
88627
|
if (dataSource && dataSource.length) {
|
|
88618
88628
|
const items = dataSource.map((item, index) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(timeline_item_Item, Object.assign({
|
|
88629
|
+
index: index,
|
|
88619
88630
|
key: "timeline-item-".concat(index)
|
|
88620
88631
|
}, item), item.content));
|
|
88621
88632
|
childrenList = this.addClassName(items);
|
|
88622
88633
|
}
|
|
88623
88634
|
|
|
88624
88635
|
const items = childrenList || this.addClassName(children);
|
|
88625
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
88636
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(timeline_context.Provider, {
|
|
88637
|
+
value: {
|
|
88638
|
+
mode,
|
|
88639
|
+
sum: (_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0
|
|
88640
|
+
}
|
|
88641
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
88626
88642
|
"aria-label": this.props['aria-label'],
|
|
88627
88643
|
style: style,
|
|
88628
88644
|
className: classString
|
|
88629
|
-
}, items);
|
|
88645
|
+
}, items));
|
|
88630
88646
|
}
|
|
88631
88647
|
|
|
88632
88648
|
}
|