@douyinfe/semi-ui 2.30.0-alpha.0 → 2.30.0-alpha.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/dist/css/semi.css +38 -4
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +69 -27
- 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/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +2 -2
- package/lib/cjs/datePicker/quickControl.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +4 -4
- package/lib/cjs/form/field.d.ts +4 -4
- package/lib/cjs/overflowList/index.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/select/index.d.ts +1 -1
- package/lib/cjs/steps/basicStep.d.ts +2 -1
- package/lib/cjs/steps/basicStep.js +5 -4
- package/lib/cjs/steps/basicSteps.js +6 -3
- package/lib/cjs/steps/fillStep.d.ts +2 -1
- package/lib/cjs/steps/fillStep.js +2 -1
- package/lib/cjs/steps/fillSteps.js +10 -11
- package/lib/cjs/steps/index.d.ts +59 -0
- package/lib/cjs/steps/index.js +9 -0
- package/lib/cjs/steps/navStep.d.ts +2 -1
- package/lib/cjs/steps/navStep.js +2 -2
- package/lib/cjs/steps/navSteps.js +4 -2
- package/lib/cjs/steps/step.d.ts +0 -1
- package/lib/cjs/steps/step.js +3 -2
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/timeline/item.d.ts +5 -0
- package/lib/cjs/timeline/item.js +31 -3
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/typography/numeral.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/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +2 -2
- package/lib/es/datePicker/quickControl.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +4 -4
- package/lib/es/form/field.d.ts +4 -4
- package/lib/es/overflowList/index.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/select/index.d.ts +1 -1
- package/lib/es/steps/basicStep.d.ts +2 -1
- package/lib/es/steps/basicStep.js +5 -4
- package/lib/es/steps/basicSteps.js +6 -3
- package/lib/es/steps/fillStep.d.ts +2 -1
- package/lib/es/steps/fillStep.js +2 -1
- package/lib/es/steps/fillSteps.js +11 -11
- package/lib/es/steps/index.d.ts +59 -0
- package/lib/es/steps/index.js +6 -0
- package/lib/es/steps/navStep.d.ts +2 -1
- package/lib/es/steps/navStep.js +2 -2
- package/lib/es/steps/navSteps.js +4 -2
- package/lib/es/steps/step.d.ts +0 -1
- package/lib/es/steps/step.js +3 -2
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/timeline/item.d.ts +5 -0
- package/lib/es/timeline/item.js +31 -3
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/typography/numeral.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
|
@@ -78992,8 +78992,8 @@ const BasicStep = props => {
|
|
|
78992
78992
|
onClick,
|
|
78993
78993
|
onChange,
|
|
78994
78994
|
onKeyDown,
|
|
78995
|
-
|
|
78996
|
-
direction:
|
|
78995
|
+
usedInC2D,
|
|
78996
|
+
direction: direction
|
|
78997
78997
|
} = props;
|
|
78998
78998
|
|
|
78999
78999
|
const renderIcon = () => {
|
|
@@ -79055,8 +79055,8 @@ const BasicStep = props => {
|
|
|
79055
79055
|
const classString = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(status), {
|
|
79056
79056
|
["".concat(prefixCls, "-active")]: active,
|
|
79057
79057
|
["".concat(prefixCls, "-done")]: done,
|
|
79058
|
-
["".concat(prefixCls, "-basic")]:
|
|
79059
|
-
["".concat(prefixCls, "-").concat(
|
|
79058
|
+
["".concat(prefixCls, "-basic")]: usedInC2D,
|
|
79059
|
+
["".concat(prefixCls, "-").concat(direction)]: direction,
|
|
79060
79060
|
["".concat(prefixCls, "-small")]: size === 'small'
|
|
79061
79061
|
}, className);
|
|
79062
79062
|
|
|
@@ -79121,6 +79121,7 @@ BasicStep.defaultProps = {
|
|
|
79121
79121
|
status: 'wait',
|
|
79122
79122
|
className: ''
|
|
79123
79123
|
};
|
|
79124
|
+
BasicStep.elementType = 'Steps.BasicStep';
|
|
79124
79125
|
/* harmony default export */ var basicStep = (BasicStep);
|
|
79125
79126
|
// CONCATENATED MODULE: ./steps/fillStep.tsx
|
|
79126
79127
|
|
|
@@ -79223,7 +79224,7 @@ const FillStep = props => {
|
|
|
79223
79224
|
[prefixCls]: true,
|
|
79224
79225
|
["".concat(prefixCls, "-").concat(status)]: Boolean(status),
|
|
79225
79226
|
["".concat(prefixCls, "-clickable")]: onClick,
|
|
79226
|
-
["".concat(prefixCls, "-fill")]: props.
|
|
79227
|
+
["".concat(prefixCls, "-fill")]: props.usedInC2D
|
|
79227
79228
|
}, className),
|
|
79228
79229
|
style: style,
|
|
79229
79230
|
onClick: e => {
|
|
@@ -79258,6 +79259,7 @@ FillStep.defaultProps = {
|
|
|
79258
79259
|
status: 'wait',
|
|
79259
79260
|
className: ''
|
|
79260
79261
|
};
|
|
79262
|
+
FillStep.elementType = 'Steps.FillStep';
|
|
79261
79263
|
/* harmony default export */ var fillStep = (FillStep);
|
|
79262
79264
|
// CONCATENATED MODULE: ./steps/navStep.tsx
|
|
79263
79265
|
|
|
@@ -79281,12 +79283,11 @@ const NavStep = props => {
|
|
|
79281
79283
|
onKeyDown,
|
|
79282
79284
|
onChange,
|
|
79283
79285
|
lastOne,
|
|
79284
|
-
type,
|
|
79285
79286
|
size
|
|
79286
79287
|
} = props;
|
|
79287
79288
|
const classString = classnames_default()(prefixCls, {
|
|
79288
79289
|
["".concat(prefixCls, "-active")]: active,
|
|
79289
|
-
["".concat(prefixCls, "-nav")]:
|
|
79290
|
+
["".concat(prefixCls, "-nav")]: props.usedInC2D,
|
|
79290
79291
|
["".concat(prefixCls, "-small")]: size === 'small'
|
|
79291
79292
|
}, className);
|
|
79292
79293
|
|
|
@@ -79350,6 +79351,7 @@ NavStep.defaultProps = {
|
|
|
79350
79351
|
active: false,
|
|
79351
79352
|
className: ''
|
|
79352
79353
|
};
|
|
79354
|
+
NavStep.elementType = 'Steps.NavStep';
|
|
79353
79355
|
/* harmony default export */ var navStep = (NavStep);
|
|
79354
79356
|
// CONCATENATED MODULE: ./steps/context.ts
|
|
79355
79357
|
|
|
@@ -79362,8 +79364,9 @@ NavStep.defaultProps = {
|
|
|
79362
79364
|
|
|
79363
79365
|
|
|
79364
79366
|
const Step = props => {
|
|
79365
|
-
const
|
|
79366
|
-
|
|
79367
|
+
const {
|
|
79368
|
+
type
|
|
79369
|
+
} = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"])(steps_context);
|
|
79367
79370
|
|
|
79368
79371
|
const renderStep = () => {
|
|
79369
79372
|
switch (type) {
|
|
@@ -79409,19 +79412,20 @@ const fillSteps_Steps = props => {
|
|
|
79409
79412
|
onChange
|
|
79410
79413
|
} = props;
|
|
79411
79414
|
const inner = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => {
|
|
79412
|
-
const filteredChildren = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children).filter(c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c));
|
|
79413
|
-
|
|
79414
|
-
width: "".concat(100 / filteredChildren.length, "%")
|
|
79415
|
-
};
|
|
79415
|
+
const filteredChildren = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children).filter(c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c)); // const colStyle = direction === 'vertical' ? null : { width: `${100 / filteredChildren.length }%` };
|
|
79416
|
+
|
|
79416
79417
|
const content = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].map(filteredChildren, (child, index) => {
|
|
79417
79418
|
if (!child) {
|
|
79418
79419
|
return null;
|
|
79419
79420
|
}
|
|
79420
79421
|
|
|
79421
79422
|
const stepNumber = initial + index;
|
|
79422
|
-
const childProps = Object.assign({
|
|
79423
|
-
stepNumber: "".concat(stepNumber + 1)
|
|
79424
|
-
|
|
79423
|
+
const childProps = Object.assign(Object.assign({
|
|
79424
|
+
stepNumber: "".concat(stepNumber + 1),
|
|
79425
|
+
direction
|
|
79426
|
+
}, child.props), {
|
|
79427
|
+
total: filteredChildren.length
|
|
79428
|
+
});
|
|
79425
79429
|
|
|
79426
79430
|
if (status === 'error' && index === current - 1) {
|
|
79427
79431
|
childProps.className = "".concat(prefixCls, "-next-error");
|
|
@@ -79441,11 +79445,10 @@ const fillSteps_Steps = props => {
|
|
|
79441
79445
|
if (index !== current) {
|
|
79442
79446
|
onChange(index + initial);
|
|
79443
79447
|
}
|
|
79444
|
-
};
|
|
79448
|
+
}; // return <Col style={colStyle}>{cloneElement(child, { ...childProps })}</Col>;
|
|
79445
79449
|
|
|
79446
|
-
|
|
79447
|
-
|
|
79448
|
-
}, /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(child, Object.assign({}, childProps)));
|
|
79450
|
+
|
|
79451
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(grid_col, null, /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(child, Object.assign({}, childProps)));
|
|
79449
79452
|
});
|
|
79450
79453
|
return content;
|
|
79451
79454
|
}, [children, initial, prefixCls, direction, status, current, onChange]);
|
|
@@ -79508,10 +79511,13 @@ const basicSteps_Steps = props => {
|
|
|
79508
79511
|
}
|
|
79509
79512
|
|
|
79510
79513
|
const stepNumber = initial + index;
|
|
79511
|
-
const childProps = Object.assign({
|
|
79514
|
+
const childProps = Object.assign(Object.assign({
|
|
79512
79515
|
stepNumber: "".concat(stepNumber + 1),
|
|
79513
|
-
size
|
|
79514
|
-
|
|
79516
|
+
size,
|
|
79517
|
+
direction
|
|
79518
|
+
}, child.props), {
|
|
79519
|
+
total: filteredChildren.length
|
|
79520
|
+
});
|
|
79515
79521
|
|
|
79516
79522
|
if (status === 'error' && index === current - 1) {
|
|
79517
79523
|
childProps.className = "".concat(prefixCls, "-next-error");
|
|
@@ -79598,10 +79604,12 @@ const navSteps_Steps = props => {
|
|
|
79598
79604
|
return null;
|
|
79599
79605
|
}
|
|
79600
79606
|
|
|
79601
|
-
const childProps = Object.assign({
|
|
79607
|
+
const childProps = Object.assign(Object.assign({
|
|
79602
79608
|
index,
|
|
79603
79609
|
total
|
|
79604
|
-
}, child.props)
|
|
79610
|
+
}, child.props), {
|
|
79611
|
+
size
|
|
79612
|
+
});
|
|
79605
79613
|
childProps.active = index === current;
|
|
79606
79614
|
|
|
79607
79615
|
childProps.onChange = () => {
|
|
@@ -79665,6 +79673,9 @@ var steps_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
79665
79673
|
|
|
79666
79674
|
|
|
79667
79675
|
|
|
79676
|
+
|
|
79677
|
+
|
|
79678
|
+
|
|
79668
79679
|
class steps_Steps extends external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"] {
|
|
79669
79680
|
renderComponent() {
|
|
79670
79681
|
const _a = this.props,
|
|
@@ -79702,6 +79713,9 @@ class steps_Steps extends external_root_React_commonjs2_react_commonjs_react_amd
|
|
|
79702
79713
|
}
|
|
79703
79714
|
|
|
79704
79715
|
steps_Steps.Step = steps_step;
|
|
79716
|
+
steps_Steps.FillStep = fillStep;
|
|
79717
|
+
steps_Steps.BasicStep = basicStep;
|
|
79718
|
+
steps_Steps.NavStep = navStep;
|
|
79705
79719
|
steps_Steps.propTypes = {
|
|
79706
79720
|
onChange: prop_types_default.a.func,
|
|
79707
79721
|
type: prop_types_default.a.oneOf(['fill', 'basic', 'nav']),
|
|
@@ -88432,6 +88446,32 @@ const timeline_constants_strings = {
|
|
|
88432
88446
|
|
|
88433
88447
|
const timeline_item_prefixCls = timeline_constants_cssClasses.ITEM;
|
|
88434
88448
|
class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
88449
|
+
constructor() {
|
|
88450
|
+
super(...arguments); // getC2DCls is used in C2D, it does not work in non-C2D scenes
|
|
88451
|
+
|
|
88452
|
+
this.getC2DCls = () => {
|
|
88453
|
+
const {
|
|
88454
|
+
mode,
|
|
88455
|
+
oddIndex
|
|
88456
|
+
} = this.props;
|
|
88457
|
+
|
|
88458
|
+
if (mode) {
|
|
88459
|
+
switch (mode) {
|
|
88460
|
+
case 'center':
|
|
88461
|
+
return "".concat(timeline_item_prefixCls, "-center ").concat(timeline_item_prefixCls, "-left");
|
|
88462
|
+
|
|
88463
|
+
case 'alternate':
|
|
88464
|
+
return "".concat(timeline_item_prefixCls, "-alternate ").concat(timeline_item_prefixCls, "-").concat(oddIndex ? 'left' : 'right');
|
|
88465
|
+
|
|
88466
|
+
default:
|
|
88467
|
+
return "".concat(timeline_item_prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(timeline_item_prefixCls, "-mode-right") : '');
|
|
88468
|
+
}
|
|
88469
|
+
}
|
|
88470
|
+
|
|
88471
|
+
return '';
|
|
88472
|
+
};
|
|
88473
|
+
}
|
|
88474
|
+
|
|
88435
88475
|
render() {
|
|
88436
88476
|
const {
|
|
88437
88477
|
className,
|
|
@@ -88444,7 +88484,7 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
88444
88484
|
extra,
|
|
88445
88485
|
onClick
|
|
88446
88486
|
} = this.props;
|
|
88447
|
-
const itemCls = classnames_default()(timeline_item_prefixCls, className);
|
|
88487
|
+
const itemCls = classnames_default()(timeline_item_prefixCls, className, this.getC2DCls());
|
|
88448
88488
|
const dotCls = classnames_default()({
|
|
88449
88489
|
["".concat(timeline_item_prefixCls, "-head")]: true,
|
|
88450
88490
|
["".concat(timeline_item_prefixCls, "-head-custom")]: dot,
|
|
@@ -88484,13 +88524,15 @@ timeline_item_Item.propTypes = {
|
|
|
88484
88524
|
position: prop_types_default.a.oneOf(timeline_constants_strings.ITEM_POS),
|
|
88485
88525
|
className: prop_types_default.a.string,
|
|
88486
88526
|
style: prop_types_default.a.object,
|
|
88487
|
-
onClick: prop_types_default.a.func
|
|
88527
|
+
onClick: prop_types_default.a.func,
|
|
88528
|
+
mode: prop_types_default.a.string
|
|
88488
88529
|
};
|
|
88489
88530
|
timeline_item_Item.defaultProps = {
|
|
88490
88531
|
type: 'default',
|
|
88491
88532
|
time: '',
|
|
88492
88533
|
onClick: noop_default.a
|
|
88493
88534
|
};
|
|
88535
|
+
timeline_item_Item.elementType = 'Timeline.Item';
|
|
88494
88536
|
// CONCATENATED MODULE: ./timeline/index.tsx
|
|
88495
88537
|
|
|
88496
88538
|
|