@douyinfe/semi-ui 2.30.0-alpha.1 → 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/css/semi.css +3 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +34 -8
- 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/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +2 -2
- 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 +8 -2
- package/lib/cjs/timeline/item.js +19 -6
- 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/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +2 -2
- 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 +8 -2
- package/lib/es/timeline/item.js +18 -6
- 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,31 +88448,41 @@ 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() {
|
|
88450
88455
|
super(...arguments); // getC2DCls is used in C2D, it does not work in non-C2D scenes
|
|
88451
88456
|
|
|
88452
88457
|
this.getC2DCls = () => {
|
|
88458
|
+
let c2dCls = '';
|
|
88453
88459
|
const {
|
|
88454
88460
|
mode,
|
|
88455
|
-
|
|
88461
|
+
lastChild,
|
|
88462
|
+
odd
|
|
88456
88463
|
} = this.props;
|
|
88457
88464
|
|
|
88458
88465
|
if (mode) {
|
|
88459
88466
|
switch (mode) {
|
|
88460
88467
|
case 'center':
|
|
88461
|
-
|
|
88468
|
+
c2dCls = "".concat(timeline_item_prefixCls, "-center ").concat(timeline_item_prefixCls, "-left");
|
|
88469
|
+
break;
|
|
88462
88470
|
|
|
88463
88471
|
case 'alternate':
|
|
88464
|
-
|
|
88472
|
+
c2dCls = "".concat(timeline_item_prefixCls, "-alternate ").concat(timeline_item_prefixCls, "-").concat(odd ? 'left' : 'right');
|
|
88473
|
+
break;
|
|
88465
88474
|
|
|
88466
88475
|
default:
|
|
88467
|
-
|
|
88476
|
+
c2dCls = "".concat(timeline_item_prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(timeline_item_prefixCls, "-mode-right") : '');
|
|
88477
|
+
break;
|
|
88468
88478
|
}
|
|
88469
88479
|
}
|
|
88470
88480
|
|
|
88471
|
-
|
|
88481
|
+
if (Boolean(lastChild) && !lastChild) {
|
|
88482
|
+
c2dCls += " ".concat(timeline_item_prefixCls, "-not-last-child");
|
|
88483
|
+
}
|
|
88484
|
+
|
|
88485
|
+
return c2dCls;
|
|
88472
88486
|
};
|
|
88473
88487
|
}
|
|
88474
88488
|
|
|
@@ -88515,6 +88529,7 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
88515
88529
|
}
|
|
88516
88530
|
|
|
88517
88531
|
}
|
|
88532
|
+
timeline_item_Item.contextType = timeline_context;
|
|
88518
88533
|
timeline_item_Item.propTypes = {
|
|
88519
88534
|
color: prop_types_default.a.string,
|
|
88520
88535
|
time: prop_types_default.a.node,
|
|
@@ -88525,7 +88540,8 @@ timeline_item_Item.propTypes = {
|
|
|
88525
88540
|
className: prop_types_default.a.string,
|
|
88526
88541
|
style: prop_types_default.a.object,
|
|
88527
88542
|
onClick: prop_types_default.a.func,
|
|
88528
|
-
mode: prop_types_default.a.string
|
|
88543
|
+
mode: prop_types_default.a.string,
|
|
88544
|
+
lastOne: prop_types_default.a.bool
|
|
88529
88545
|
};
|
|
88530
88546
|
timeline_item_Item.defaultProps = {
|
|
88531
88547
|
type: 'default',
|
|
@@ -88541,6 +88557,7 @@ timeline_item_Item.elementType = 'Timeline.Item';
|
|
|
88541
88557
|
|
|
88542
88558
|
|
|
88543
88559
|
|
|
88560
|
+
|
|
88544
88561
|
const timeline_prefixCls = timeline_constants_cssClasses.PREFIX;
|
|
88545
88562
|
|
|
88546
88563
|
class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
@@ -88583,6 +88600,7 @@ class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
88583
88600
|
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(ele)) {
|
|
88584
88601
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(ele, {
|
|
88585
88602
|
// @ts-ignore
|
|
88603
|
+
index: idx,
|
|
88586
88604
|
className: classnames_default()(ele.props.className, this.getPosCls(ele, idx))
|
|
88587
88605
|
});
|
|
88588
88606
|
}
|
|
@@ -88592,6 +88610,8 @@ class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
88592
88610
|
}
|
|
88593
88611
|
|
|
88594
88612
|
render() {
|
|
88613
|
+
var _a;
|
|
88614
|
+
|
|
88595
88615
|
const {
|
|
88596
88616
|
children,
|
|
88597
88617
|
className,
|
|
@@ -88606,17 +88626,23 @@ class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
88606
88626
|
|
|
88607
88627
|
if (dataSource && dataSource.length) {
|
|
88608
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,
|
|
88609
88630
|
key: "timeline-item-".concat(index)
|
|
88610
88631
|
}, item), item.content));
|
|
88611
88632
|
childrenList = this.addClassName(items);
|
|
88612
88633
|
}
|
|
88613
88634
|
|
|
88614
88635
|
const items = childrenList || this.addClassName(children);
|
|
88615
|
-
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", {
|
|
88616
88642
|
"aria-label": this.props['aria-label'],
|
|
88617
88643
|
style: style,
|
|
88618
88644
|
className: classString
|
|
88619
|
-
}, items);
|
|
88645
|
+
}, items));
|
|
88620
88646
|
}
|
|
88621
88647
|
|
|
88622
88648
|
}
|