rsuite 5.33.1 → 5.34.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/CHANGELOG.md +18 -0
- package/Checkbox/styles/mixin.less +1 -1
- package/CheckboxGroup/styles/index.less +4 -1
- package/DatePicker/styles/index.less +1 -0
- package/RadioGroup/styles/index.less +4 -1
- package/Timeline/styles/index.less +1 -1
- package/cjs/InputPicker/InputPicker.js +1 -1
- package/cjs/Timeline/Timeline.d.ts +9 -0
- package/cjs/Timeline/Timeline.js +12 -1
- package/cjs/Timeline/TimelineItem.d.ts +18 -1
- package/cjs/Timeline/TimelineItem.js +5 -3
- package/cjs/Windowing/List.js +11 -2
- package/dist/rsuite-no-reset-rtl.css +9 -5
- package/dist/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
- package/dist/rsuite-no-reset.css +9 -5
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +9 -5
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +9 -5
- package/dist/rsuite.js +4 -4
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/InputPicker/InputPicker.js +1 -1
- package/esm/Timeline/Timeline.d.ts +9 -0
- package/esm/Timeline/Timeline.js +13 -1
- package/esm/Timeline/TimelineItem.d.ts +18 -1
- package/esm/Timeline/TimelineItem.js +5 -3
- package/esm/Windowing/List.js +12 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [5.34.1](https://github.com/rsuite/rsuite/compare/v5.34.0...v5.34.1) (2023-05-26)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **InputPicker:** add missing top padding of listbox ([#3214](https://github.com/rsuite/rsuite/issues/3214)) ([f6df23c](https://github.com/rsuite/rsuite/commit/f6df23c085c4d7944c5817b0a9f8a1168c41f0b9))
|
|
6
|
+
- **Radio,Checkbox:** remove leading space for Radio/Checkbox in groups ([#3215](https://github.com/rsuite/rsuite/issues/3215)) ([27c1495](https://github.com/rsuite/rsuite/commit/27c14952da87c21612a8e822295eefc0908b08d6))
|
|
7
|
+
|
|
8
|
+
# [5.34.0](https://github.com/rsuite/rsuite/compare/v5.33.1...v5.34.0) (2023-05-19)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **DatePicker:** added stack styles to datepicker styles ([#3195](https://github.com/rsuite/rsuite/issues/3195)) ([b3ed580](https://github.com/rsuite/rsuite/commit/b3ed580867db2e5205e71475c593e7d17ff04b49))
|
|
13
|
+
- **SelectPicker:** prevent error when listProps.itemSize is a number ([#3193](https://github.com/rsuite/rsuite/issues/3193)) ([151df47](https://github.com/rsuite/rsuite/commit/151df474b15ab4651d4ee5777b66018e58837816))
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- **Timeline:** add isItemActive prop ([#3198](https://github.com/rsuite/rsuite/issues/3198)) ([377930f](https://github.com/rsuite/rsuite/commit/377930f3498c59834a424417c136499866aacec2))
|
|
18
|
+
|
|
1
19
|
## [5.33.1](https://github.com/rsuite/rsuite/compare/v5.33.0...v5.33.1) (2023-05-12)
|
|
2
20
|
|
|
3
21
|
### Bug Fixes
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
vertical-align: middle;
|
|
46
46
|
font-weight: normal;
|
|
47
47
|
margin-top: 0;
|
|
48
|
-
margin-
|
|
48
|
+
margin-right: @radio-sense-width; // space out consecutive inline controls
|
|
49
49
|
|
|
50
50
|
.rs-plaintext &:first-child {
|
|
51
51
|
margin-left: 0;
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
.rs-radio-group {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
|
+
|
|
7
|
+
> .rs-radio {
|
|
8
|
+
margin-left: -1 * @radio-sense-width;
|
|
9
|
+
}
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
.rs-radio-group-inline {
|
|
9
13
|
flex-direction: row;
|
|
10
|
-
margin-left: -1 * @radio-sense-width;
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
// Radio Group - picker appearance
|
|
@@ -616,7 +616,7 @@ var InputPicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
616
616
|
top = positionProps.top,
|
|
617
617
|
className = positionProps.className;
|
|
618
618
|
var menuClassPrefix = multi ? 'picker-check-menu' : 'picker-select-menu';
|
|
619
|
-
var classes = merge(className, menuClassName, prefix(
|
|
619
|
+
var classes = merge(className, menuClassName, prefix(multi ? 'check-menu' : 'select-menu'));
|
|
620
620
|
var styles = (0, _extends2.default)({}, menuStyle, {
|
|
621
621
|
left: left,
|
|
622
622
|
top: top
|
|
@@ -8,9 +8,18 @@ export interface TimelineProps extends WithAsProps {
|
|
|
8
8
|
align?: 'left' | 'right' | 'alternate';
|
|
9
9
|
/** Timeline endless **/
|
|
10
10
|
endless?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether an item is active (with highlighted dot).
|
|
13
|
+
*
|
|
14
|
+
* @default
|
|
15
|
+
* The last item is marked active.
|
|
16
|
+
*/
|
|
17
|
+
isItemActive?: (index: number, totalItemsCount: number) => boolean;
|
|
11
18
|
}
|
|
12
19
|
interface TimelineComponent extends RsRefForwardingComponent<'div', TimelineProps> {
|
|
13
20
|
Item: typeof TimelineItem;
|
|
21
|
+
ACTIVE_FIRST: (index: number, totalItemsCount: number) => boolean;
|
|
22
|
+
ACTIVE_LAST: (index: number, totalItemsCount: number) => boolean;
|
|
14
23
|
}
|
|
15
24
|
declare const Timeline: TimelineComponent;
|
|
16
25
|
export default Timeline;
|
package/cjs/Timeline/Timeline.js
CHANGED
|
@@ -29,7 +29,9 @@ var Timeline = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
29
29
|
_props$align = props.align,
|
|
30
30
|
align = _props$align === void 0 ? 'left' : _props$align,
|
|
31
31
|
endless = props.endless,
|
|
32
|
-
|
|
32
|
+
_props$isItemActive = props.isItemActive,
|
|
33
|
+
isItemActive = _props$isItemActive === void 0 ? Timeline.ACTIVE_LAST : _props$isItemActive,
|
|
34
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, ["children", "as", "classPrefix", "className", "align", "endless", "isItemActive"]);
|
|
33
35
|
|
|
34
36
|
var _useClassNames = (0, _utils.useClassNames)(classPrefix),
|
|
35
37
|
merge = _useClassNames.merge,
|
|
@@ -52,11 +54,20 @@ var Timeline = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
52
54
|
}), _utils.ReactChildren.mapCloneElement(children, function (_child, index) {
|
|
53
55
|
return {
|
|
54
56
|
last: index + 1 === count,
|
|
57
|
+
INTERNAL_active: isItemActive(index, count),
|
|
55
58
|
align: align
|
|
56
59
|
};
|
|
57
60
|
}));
|
|
58
61
|
});
|
|
59
62
|
|
|
63
|
+
Timeline.ACTIVE_FIRST = function (index) {
|
|
64
|
+
return index === 0;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
Timeline.ACTIVE_LAST = function (index, totalItemsCount) {
|
|
68
|
+
return index === totalItemsCount - 1;
|
|
69
|
+
};
|
|
70
|
+
|
|
60
71
|
Timeline.Item = _TimelineItem.default;
|
|
61
72
|
Timeline.displayName = 'Timeline';
|
|
62
73
|
Timeline.propTypes = {
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithAsProps, RsRefForwardingComponent } from '../@types/common';
|
|
3
3
|
export interface TimelineItemProps extends WithAsProps {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Whether the last item
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
* This props is supposed to be used only by Timeline component internally
|
|
9
|
+
* User should never rely on this prop
|
|
10
|
+
*
|
|
11
|
+
* @deprecated
|
|
12
|
+
* This prop was used to indicate whether an item is the last item so that it gets highlighted.
|
|
13
|
+
* Now we can specify whether an item should be highlighted individually.
|
|
14
|
+
* Use {@link INTERNAL_active} instead
|
|
15
|
+
*/
|
|
5
16
|
last?: boolean;
|
|
6
17
|
/** Customizing the Timeline item */
|
|
7
18
|
dot?: React.ReactNode;
|
|
@@ -11,6 +22,12 @@ export interface TimelineItemProps extends WithAsProps {
|
|
|
11
22
|
as?: React.ElementType;
|
|
12
23
|
/** Customized time of timeline **/
|
|
13
24
|
time?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* This props is supposed to be used only by Timeline component internally
|
|
28
|
+
* User should never rely on this prop
|
|
29
|
+
*/
|
|
30
|
+
INTERNAL_active?: boolean;
|
|
14
31
|
}
|
|
15
32
|
declare const TimelineItem: RsRefForwardingComponent<'div', TimelineItemProps>;
|
|
16
33
|
export default TimelineItem;
|
|
@@ -21,11 +21,12 @@ var TimelineItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
21
21
|
children = props.children,
|
|
22
22
|
_props$classPrefix = props.classPrefix,
|
|
23
23
|
classPrefix = _props$classPrefix === void 0 ? 'timeline-item' : _props$classPrefix,
|
|
24
|
-
|
|
24
|
+
DEPRECATED_last = props.last,
|
|
25
25
|
className = props.className,
|
|
26
26
|
dot = props.dot,
|
|
27
27
|
time = props.time,
|
|
28
|
-
|
|
28
|
+
INTERNAL_active = props.INTERNAL_active,
|
|
29
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, ["as", "children", "classPrefix", "last", "className", "dot", "time", "INTERNAL_active"]);
|
|
29
30
|
|
|
30
31
|
var _useClassNames = (0, _utils.useClassNames)(classPrefix),
|
|
31
32
|
merge = _useClassNames.merge,
|
|
@@ -33,7 +34,8 @@ var TimelineItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
33
34
|
prefix = _useClassNames.prefix;
|
|
34
35
|
|
|
35
36
|
var classes = merge(className, withClassPrefix({
|
|
36
|
-
last:
|
|
37
|
+
last: DEPRECATED_last,
|
|
38
|
+
active: INTERNAL_active
|
|
37
39
|
}));
|
|
38
40
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
|
|
39
41
|
ref: ref,
|
package/cjs/Windowing/List.js
CHANGED
|
@@ -21,7 +21,8 @@ var List = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
21
21
|
var rowHeight = props.rowHeight,
|
|
22
22
|
_props$as = props.as,
|
|
23
23
|
Component = _props$as === void 0 ? _reactWindow.VariableSizeList : _props$as,
|
|
24
|
-
|
|
24
|
+
itemSizeProp = props.itemSize,
|
|
25
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, ["rowHeight", "as", "itemSize"]);
|
|
25
26
|
var listRef = (0, _react.useRef)(null);
|
|
26
27
|
|
|
27
28
|
var _useCustom = (0, _utils.useCustom)(),
|
|
@@ -56,7 +57,15 @@ var List = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
56
57
|
index: index
|
|
57
58
|
}) : rowHeight || 0;
|
|
58
59
|
}, [rowHeight]);
|
|
59
|
-
var
|
|
60
|
+
var itemSize = (0, _react.useMemo)(function () {
|
|
61
|
+
if (typeof itemSizeProp === 'function') return itemSizeProp;
|
|
62
|
+
return function () {
|
|
63
|
+
return itemSizeProp;
|
|
64
|
+
};
|
|
65
|
+
}, [itemSizeProp]);
|
|
66
|
+
var compatibleProps = (0, _extends2.default)({
|
|
67
|
+
itemSize: itemSize
|
|
68
|
+
}, rest);
|
|
60
69
|
|
|
61
70
|
if (rowHeight) {
|
|
62
71
|
compatibleProps.itemSize = Component === _reactWindow.VariableSizeList ? setRowHeight : rowHeight;
|
|
@@ -3890,7 +3890,7 @@ tbody.rs-anim-collapse.rs-anim-in {
|
|
|
3890
3890
|
vertical-align: middle;
|
|
3891
3891
|
font-weight: normal;
|
|
3892
3892
|
margin-top: 0;
|
|
3893
|
-
margin-
|
|
3893
|
+
margin-left: 10px;
|
|
3894
3894
|
}
|
|
3895
3895
|
.rs-plaintext .rs-checkbox-inline:first-child {
|
|
3896
3896
|
margin-right: 0;
|
|
@@ -4053,12 +4053,14 @@ label:hover .rs-checkbox-wrapper .rs-checkbox-inner::before {
|
|
|
4053
4053
|
-ms-flex-direction: column;
|
|
4054
4054
|
flex-direction: column;
|
|
4055
4055
|
}
|
|
4056
|
+
.rs-checkbox-group > .rs-checkbox {
|
|
4057
|
+
margin-right: -10px;
|
|
4058
|
+
}
|
|
4056
4059
|
.rs-checkbox-group-inline {
|
|
4057
4060
|
-webkit-box-orient: horizontal;
|
|
4058
4061
|
-webkit-box-direction: normal;
|
|
4059
4062
|
-ms-flex-direction: row;
|
|
4060
4063
|
flex-direction: row;
|
|
4061
|
-
margin-right: -10px;
|
|
4062
4064
|
}
|
|
4063
4065
|
.rs-picker-check-menu-items {
|
|
4064
4066
|
margin-bottom: 6px;
|
|
@@ -12492,7 +12494,7 @@ textarea.rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input {
|
|
|
12492
12494
|
vertical-align: middle;
|
|
12493
12495
|
font-weight: normal;
|
|
12494
12496
|
margin-top: 0;
|
|
12495
|
-
margin-
|
|
12497
|
+
margin-left: 10px;
|
|
12496
12498
|
}
|
|
12497
12499
|
.rs-plaintext .rs-radio-inline:first-child {
|
|
12498
12500
|
margin-right: 0;
|
|
@@ -12642,12 +12644,14 @@ textarea.rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input {
|
|
|
12642
12644
|
-ms-flex-direction: column;
|
|
12643
12645
|
flex-direction: column;
|
|
12644
12646
|
}
|
|
12647
|
+
.rs-radio-group > .rs-radio {
|
|
12648
|
+
margin-right: -10px;
|
|
12649
|
+
}
|
|
12645
12650
|
.rs-radio-group-inline {
|
|
12646
12651
|
-webkit-box-orient: horizontal;
|
|
12647
12652
|
-webkit-box-direction: normal;
|
|
12648
12653
|
-ms-flex-direction: row;
|
|
12649
12654
|
flex-direction: row;
|
|
12650
|
-
margin-right: -10px;
|
|
12651
12655
|
}
|
|
12652
12656
|
.rs-radio-group-picker {
|
|
12653
12657
|
display: -webkit-inline-box;
|
|
@@ -14770,7 +14774,7 @@ textarea.rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input {
|
|
|
14770
14774
|
.rs-timeline-item-custom-dot::before {
|
|
14771
14775
|
display: none;
|
|
14772
14776
|
}
|
|
14773
|
-
.rs-timeline-item-
|
|
14777
|
+
.rs-timeline-item-active .rs-timeline-item-dot::before {
|
|
14774
14778
|
background-color: #3498ff;
|
|
14775
14779
|
background-color: var(--rs-timeline-indicator-active-bg);
|
|
14776
14780
|
}
|