rsuite 5.83.0 → 5.83.2
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 +23 -0
- package/Stat/styles/index.css +12 -0
- package/Stat/styles/index.less +12 -0
- package/cjs/CustomProvider/useCustom.js +24 -7
- package/cjs/Progress/ProgressCircle.d.ts +2 -0
- package/cjs/Progress/ProgressCircle.js +5 -2
- package/cjs/Stat/StatTrend.d.ts +1 -1
- package/cjs/Stat/StatTrend.js +9 -2
- package/dist/rsuite-no-reset-rtl.css +12 -0
- 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 +12 -0
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +12 -0
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +12 -0
- package/dist/rsuite.js +275 -286
- package/dist/rsuite.js.map +1 -1
- 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.LICENSE.txt +0 -9
- package/dist/rsuite.min.js.map +1 -1
- package/esm/CustomProvider/useCustom.js +24 -7
- package/esm/Progress/ProgressCircle.d.ts +2 -0
- package/esm/Progress/ProgressCircle.js +5 -2
- package/esm/Stat/StatTrend.d.ts +1 -1
- package/esm/Stat/StatTrend.js +9 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## [5.83.2](https://github.com/rsuite/rsuite/compare/v5.83.1...v5.83.2) (2025-07-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Progress.Circle properties do not include width ([#4352](https://github.com/rsuite/rsuite/issues/4352)) ([#4353](https://github.com/rsuite/rsuite/issues/4353)) ([4bdef97](https://github.com/rsuite/rsuite/commit/4bdef977c96d76695a4b8504808bdfaaf83a79cd))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Stat/StatTrend:** add 'equal' trend indicator ([#4351](https://github.com/rsuite/rsuite/issues/4351)) ([38f95a1](https://github.com/rsuite/rsuite/commit/38f95a1b1cc74adb993bb76899e56ef954014ecd))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [5.83.1](https://github.com/rsuite/rsuite/compare/v5.83.0...v5.83.1) (2025-06-27)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* allow TimePicker and TimeRangePicker locale prop to override global locale ([#4333](https://github.com/rsuite/rsuite/issues/4333)) ([6f66dfd](https://github.com/rsuite/rsuite/commit/6f66dfdc570c930b99e2954bc339446707947b92))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
1
24
|
# [5.83.0](https://github.com/rsuite/rsuite/compare/v5.82.0...v5.83.0) (2025-06-19)
|
|
2
25
|
|
|
3
26
|
|
package/Stat/styles/index.css
CHANGED
|
@@ -1721,6 +1721,10 @@
|
|
|
1721
1721
|
color: #8f1300;
|
|
1722
1722
|
color: var(--rs-red-900);
|
|
1723
1723
|
}
|
|
1724
|
+
.rs-stat-trend-equal {
|
|
1725
|
+
color: #004299;
|
|
1726
|
+
color: var(--rs-primary-900);
|
|
1727
|
+
}
|
|
1724
1728
|
.rs-stat-trend-default {
|
|
1725
1729
|
padding: 2px 6px;
|
|
1726
1730
|
}
|
|
@@ -1732,6 +1736,10 @@
|
|
|
1732
1736
|
background-color: #fccfcf;
|
|
1733
1737
|
background-color: var(--rs-red-100);
|
|
1734
1738
|
}
|
|
1739
|
+
.rs-stat-trend-default.rs-stat-trend-equal {
|
|
1740
|
+
background-color: #cce9ff;
|
|
1741
|
+
background-color: var(--rs-primary-100);
|
|
1742
|
+
}
|
|
1735
1743
|
.rs-stat-trend-subtle.rs-stat-trend-up {
|
|
1736
1744
|
color: #37ab3c;
|
|
1737
1745
|
color: var(--rs-green-600);
|
|
@@ -1740,6 +1748,10 @@
|
|
|
1740
1748
|
color: #eb3626;
|
|
1741
1749
|
color: var(--rs-red-600);
|
|
1742
1750
|
}
|
|
1751
|
+
.rs-stat-trend-subtle.rs-stat-trend-equal {
|
|
1752
|
+
color: #2589f5;
|
|
1753
|
+
color: var(--rs-primary-600);
|
|
1754
|
+
}
|
|
1743
1755
|
.rs-stat-help-text {
|
|
1744
1756
|
color: #717273;
|
|
1745
1757
|
color: var(--rs-text-secondary);
|
package/Stat/styles/index.less
CHANGED
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
color: var(--rs-red-900);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
&-equal {
|
|
79
|
+
color: var(--rs-primary-900);
|
|
80
|
+
}
|
|
81
|
+
|
|
78
82
|
&-default {
|
|
79
83
|
padding: 2px 6px;
|
|
80
84
|
}
|
|
@@ -87,6 +91,10 @@
|
|
|
87
91
|
background-color: var(--rs-red-100);
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
&-default&-equal {
|
|
95
|
+
background-color: var(--rs-primary-100);
|
|
96
|
+
}
|
|
97
|
+
|
|
90
98
|
&-subtle&-up {
|
|
91
99
|
color: var(--rs-green-600);
|
|
92
100
|
}
|
|
@@ -94,6 +102,10 @@
|
|
|
94
102
|
&-subtle&-down {
|
|
95
103
|
color: var(--rs-red-600);
|
|
96
104
|
}
|
|
105
|
+
|
|
106
|
+
&-subtle&-equal {
|
|
107
|
+
color: var(--rs-primary-600);
|
|
108
|
+
}
|
|
97
109
|
}
|
|
98
110
|
|
|
99
111
|
&-help-text {
|
|
@@ -16,12 +16,29 @@ var _excluded = ["locale"];
|
|
|
16
16
|
function getDefaultRTL() {
|
|
17
17
|
return typeof document !== 'undefined' && (document.body.getAttribute('dir') || document.dir) === 'rtl';
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Maps a component name to its corresponding locale key
|
|
22
|
+
* @param componentName - The name of the component
|
|
23
|
+
* @returns The locale key for the component
|
|
24
|
+
*/
|
|
25
|
+
function getComponentLocaleKey(componentName) {
|
|
26
|
+
// Define mappings for components that share locale keys
|
|
27
|
+
var localeKeyMappings = {
|
|
28
|
+
// All picker components use the Combobox locale
|
|
29
|
+
Cascader: 'Combobox',
|
|
30
|
+
CheckTreePicker: 'Combobox',
|
|
31
|
+
MultiCascader: 'Combobox',
|
|
32
|
+
SelectPicker: 'Combobox',
|
|
33
|
+
TreePicker: 'Combobox',
|
|
34
|
+
CheckPicker: 'Combobox',
|
|
35
|
+
// Time components use date components locales
|
|
36
|
+
TimePicker: 'DatePicker',
|
|
37
|
+
TimeRangePicker: 'DateRangePicker'
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Return the mapped locale key or the component name itself if no mapping exists
|
|
41
|
+
return localeKeyMappings[componentName] || componentName;
|
|
25
42
|
}
|
|
26
43
|
|
|
27
44
|
/**
|
|
@@ -69,7 +86,7 @@ function useCustom(componentName, componentProps) {
|
|
|
69
86
|
//Memoize the global default props based on component name
|
|
70
87
|
var globalDefaultProps = ((_components$component = components[componentName]) === null || _components$component === void 0 ? void 0 : _components$component.defaultProps) || {};
|
|
71
88
|
var mergedProps = (0, _assign.default)({}, globalDefaultProps, restProps);
|
|
72
|
-
var localeKey =
|
|
89
|
+
var localeKey = getComponentLocaleKey(componentName);
|
|
73
90
|
|
|
74
91
|
// If the default locale has the component name, then merge the locale.
|
|
75
92
|
if (Object.keys(_en_GB.default).includes(localeKey)) {
|
|
@@ -12,6 +12,8 @@ export interface ProgressCircleProps extends WithAsProps {
|
|
|
12
12
|
strokeWidth?: number;
|
|
13
13
|
/** Tail width */
|
|
14
14
|
trailWidth?: number;
|
|
15
|
+
/** Diameter of the circle */
|
|
16
|
+
width?: number;
|
|
15
17
|
/** Circular progress bar degree */
|
|
16
18
|
gapDegree?: number;
|
|
17
19
|
/** Circular progress bar Notch position */
|
|
@@ -12,7 +12,7 @@ var _statusIcons = require("../internals/constants/statusIcons");
|
|
|
12
12
|
var _hooks = require("../internals/hooks");
|
|
13
13
|
var _propTypes2 = require("../internals/propTypes");
|
|
14
14
|
var _CustomProvider = require("../CustomProvider");
|
|
15
|
-
var _excluded = ["as", "strokeWidth", "trailWidth", "percent", "strokeLinecap", "className", "showInfo", "status", "classPrefix", "style", "gapDegree", "gapPosition", "trailColor", "strokeColor"];
|
|
15
|
+
var _excluded = ["as", "strokeWidth", "trailWidth", "width", "percent", "strokeLinecap", "className", "showInfo", "status", "classPrefix", "style", "gapDegree", "gapPosition", "trailColor", "strokeColor"];
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
/**
|
|
@@ -29,6 +29,7 @@ var ProgressCircle = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
29
29
|
strokeWidth = _propsWithDefaults$st === void 0 ? 6 : _propsWithDefaults$st,
|
|
30
30
|
_propsWithDefaults$tr = propsWithDefaults.trailWidth,
|
|
31
31
|
trailWidth = _propsWithDefaults$tr === void 0 ? 6 : _propsWithDefaults$tr,
|
|
32
|
+
width = propsWithDefaults.width,
|
|
32
33
|
_propsWithDefaults$pe = propsWithDefaults.percent,
|
|
33
34
|
percent = _propsWithDefaults$pe === void 0 ? 0 : _propsWithDefaults$pe,
|
|
34
35
|
_propsWithDefaults$st2 = propsWithDefaults.strokeLinecap,
|
|
@@ -117,7 +118,8 @@ var ProgressCircle = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
117
118
|
className: prefix('circle-info')
|
|
118
119
|
}, info) : null, /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
|
119
120
|
className: prefix('svg'),
|
|
120
|
-
viewBox: "0 0 100 100"
|
|
121
|
+
viewBox: "0 0 100 100",
|
|
122
|
+
width: width
|
|
121
123
|
}, rest), /*#__PURE__*/_react.default.createElement("path", {
|
|
122
124
|
className: prefix('trail'),
|
|
123
125
|
d: pathString,
|
|
@@ -142,6 +144,7 @@ ProgressCircle.propTypes = {
|
|
|
142
144
|
percent: _propTypes.default.number,
|
|
143
145
|
strokeWidth: _propTypes.default.number,
|
|
144
146
|
trailWidth: _propTypes.default.number,
|
|
147
|
+
width: _propTypes.default.number,
|
|
145
148
|
gapDegree: _propTypes.default.number,
|
|
146
149
|
gapPosition: (0, _propTypes2.oneOf)(['top', 'bottom', 'left', 'right']),
|
|
147
150
|
showInfo: _propTypes.default.bool,
|
package/cjs/Stat/StatTrend.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
2
2
|
interface StatTrendProps extends WithAsProps {
|
|
3
|
-
indicator?: 'up' | 'down';
|
|
3
|
+
indicator?: 'up' | 'down' | 'equal';
|
|
4
4
|
appearance?: 'default' | 'subtle';
|
|
5
5
|
}
|
|
6
6
|
declare const StatTrend: RsRefForwardingComponent<'dd', StatTrendProps>;
|
package/cjs/Stat/StatTrend.js
CHANGED
|
@@ -35,6 +35,13 @@ var ArrowDown = function ArrowDown(props) {
|
|
|
35
35
|
d: "M17 8l0 9l-9 0"
|
|
36
36
|
}));
|
|
37
37
|
};
|
|
38
|
+
var ArrowEqual = function ArrowEqual(props) {
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({}, svgProps, props), /*#__PURE__*/_react.default.createElement("path", {
|
|
40
|
+
d: "M7 9l10 0"
|
|
41
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
42
|
+
d: "M7 15l10 0"
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
38
45
|
var StatTrend = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
39
46
|
var _props$as = props.as,
|
|
40
47
|
Component = _props$as === void 0 ? 'span' : _props$as,
|
|
@@ -52,7 +59,7 @@ var StatTrend = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
52
59
|
prefix = _useClassNames.prefix,
|
|
53
60
|
withClassPrefix = _useClassNames.withClassPrefix;
|
|
54
61
|
var classes = merge(className, withClassPrefix(appearance, indicator));
|
|
55
|
-
var IndicatorIcon = indicator === 'up' ? ArrowUp : ArrowDown;
|
|
62
|
+
var IndicatorIcon = indicator === 'up' ? ArrowUp : indicator === 'down' ? ArrowDown : ArrowEqual;
|
|
56
63
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
57
64
|
ref: ref,
|
|
58
65
|
className: classes
|
|
@@ -62,7 +69,7 @@ var StatTrend = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
62
69
|
});
|
|
63
70
|
StatTrend.displayName = 'StatTrend';
|
|
64
71
|
StatTrend.propTypes = {
|
|
65
|
-
indicator: (0, _propTypes.oneOf)(['up', 'down']),
|
|
72
|
+
indicator: (0, _propTypes.oneOf)(['up', 'down', 'equal']),
|
|
66
73
|
appearance: (0, _propTypes.oneOf)(['default', 'subtle'])
|
|
67
74
|
};
|
|
68
75
|
var _default = exports.default = StatTrend;
|
|
@@ -13811,6 +13811,10 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
13811
13811
|
color: #8f1300;
|
|
13812
13812
|
color: var(--rs-red-900);
|
|
13813
13813
|
}
|
|
13814
|
+
.rs-stat-trend-equal {
|
|
13815
|
+
color: #004299;
|
|
13816
|
+
color: var(--rs-primary-900);
|
|
13817
|
+
}
|
|
13814
13818
|
.rs-stat-trend-default {
|
|
13815
13819
|
padding: 2px 6px;
|
|
13816
13820
|
}
|
|
@@ -13822,6 +13826,10 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
13822
13826
|
background-color: #fccfcf;
|
|
13823
13827
|
background-color: var(--rs-red-100);
|
|
13824
13828
|
}
|
|
13829
|
+
.rs-stat-trend-default.rs-stat-trend-equal {
|
|
13830
|
+
background-color: #cce9ff;
|
|
13831
|
+
background-color: var(--rs-primary-100);
|
|
13832
|
+
}
|
|
13825
13833
|
.rs-stat-trend-subtle.rs-stat-trend-up {
|
|
13826
13834
|
color: #37ab3c;
|
|
13827
13835
|
color: var(--rs-green-600);
|
|
@@ -13830,6 +13838,10 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
13830
13838
|
color: #eb3626;
|
|
13831
13839
|
color: var(--rs-red-600);
|
|
13832
13840
|
}
|
|
13841
|
+
.rs-stat-trend-subtle.rs-stat-trend-equal {
|
|
13842
|
+
color: #2589f5;
|
|
13843
|
+
color: var(--rs-primary-600);
|
|
13844
|
+
}
|
|
13833
13845
|
.rs-stat-help-text {
|
|
13834
13846
|
color: #717273;
|
|
13835
13847
|
color: var(--rs-text-secondary);
|