rsuite 5.64.1 → 5.65.0
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/AutoComplete/styles/index.css +14 -6
- package/CHANGELOG.md +30 -0
- package/Cascader/styles/index.css +14 -6
- package/CheckPicker/styles/index.css +14 -6
- package/CheckTree/styles/index.css +14 -6
- package/CheckTreePicker/styles/index.css +14 -6
- package/DatePicker/styles/index.css +14 -6
- package/DateRangePicker/styles/index.css +14 -6
- package/Divider/styles/index.css +3 -1
- package/Divider/styles/index.less +3 -1
- package/HStack/package.json +7 -0
- package/InputPicker/styles/index.css +14 -6
- package/MultiCascadeTree/styles/index.css +14 -6
- package/MultiCascader/styles/index.css +14 -6
- package/Pagination/styles/index.css +17 -7
- package/Radio/styles/index.css +3 -0
- package/Radio/styles/index.less +4 -0
- package/SelectPicker/styles/index.css +14 -6
- package/Table/styles/index.css +14 -7
- package/Table/styles/index.less +11 -7
- package/TagInput/styles/index.css +14 -6
- package/TagPicker/styles/index.css +14 -6
- package/Uploader/styles/index.css +3 -0
- package/Uploader/styles/index.less +4 -0
- package/VStack/package.json +7 -0
- package/cjs/DatePicker/DatePicker.js +3 -2
- package/cjs/DateRangePicker/DateRangePicker.js +3 -2
- package/cjs/Message/Message.js +10 -6
- package/cjs/Notification/Notification.d.ts +9 -5
- package/cjs/Notification/Notification.js +10 -6
- package/cjs/Panel/PanelBody.js +4 -3
- package/cjs/Stack/HStack.d.ts +10 -0
- package/cjs/Stack/HStack.js +29 -0
- package/cjs/Stack/VStack.d.ts +7 -0
- package/cjs/Stack/VStack.js +32 -0
- package/cjs/Stack/index.d.ts +4 -0
- package/cjs/Stack/index.js +5 -1
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +4 -2
- package/cjs/internals/types/index.d.ts +1 -0
- package/cjs/toaster/ToastContainer.d.ts +11 -2
- package/cjs/toaster/ToastContainer.js +28 -18
- package/cjs/toaster/ToastContext.d.ts +2 -0
- package/cjs/toaster/hooks/useDelayedClosure.d.ts +27 -0
- package/cjs/toaster/hooks/useDelayedClosure.js +47 -0
- package/dist/rsuite-no-reset-rtl.css +37 -14
- 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 +37 -14
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +37 -14
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +37 -14
- package/dist/rsuite.js +43 -10
- 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.map +1 -1
- package/esm/DatePicker/DatePicker.js +3 -2
- package/esm/DateRangePicker/DateRangePicker.js +3 -2
- package/esm/Message/Message.js +12 -8
- package/esm/Notification/Notification.d.ts +9 -5
- package/esm/Notification/Notification.js +12 -8
- package/esm/Panel/PanelBody.js +4 -3
- package/esm/Stack/HStack.d.ts +10 -0
- package/esm/Stack/HStack.js +24 -0
- package/esm/Stack/VStack.d.ts +7 -0
- package/esm/Stack/VStack.js +27 -0
- package/esm/Stack/index.d.ts +4 -0
- package/esm/Stack/index.js +2 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/types/index.d.ts +1 -0
- package/esm/toaster/ToastContainer.d.ts +11 -2
- package/esm/toaster/ToastContainer.js +28 -18
- package/esm/toaster/ToastContext.d.ts +2 -0
- package/esm/toaster/hooks/useDelayedClosure.d.ts +27 -0
- package/esm/toaster/hooks/useDelayedClosure.js +42 -0
- package/internals/Picker/styles/index.less +9 -4
- package/package.json +1 -3
- package/styles/color-modes/dark.less +1 -0
- package/styles/color-modes/high-contrast.less +1 -0
- package/styles/color-modes/light.less +3 -0
- package/styles/color-modes.less +4 -3
- package/styles/mixins/color-modes.less +4 -2
- package/styles/variables.less +3 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface UseDelayedClosureProps {
|
|
3
|
+
/**
|
|
4
|
+
* Callback function to be called when the closure is triggered.
|
|
5
|
+
*/
|
|
6
|
+
onClose?: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
/**
|
|
8
|
+
* The duration (in milliseconds) after which the closure should be triggered.
|
|
9
|
+
*/
|
|
10
|
+
duration: number;
|
|
11
|
+
/**
|
|
12
|
+
* Optional reference to the target element.
|
|
13
|
+
*/
|
|
14
|
+
targetRef?: React.RefObject<HTMLElement>;
|
|
15
|
+
/**
|
|
16
|
+
* Reset the hide timer if the mouse moves over the target element.
|
|
17
|
+
*/
|
|
18
|
+
mouseReset?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A hook that delays the closure of the message box.
|
|
22
|
+
*/
|
|
23
|
+
declare function useDelayedClosure(props: UseDelayedClosureProps): {
|
|
24
|
+
clear: () => void;
|
|
25
|
+
reset: () => void;
|
|
26
|
+
};
|
|
27
|
+
export default useDelayedClosure;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _on = _interopRequireDefault(require("dom-lib/on"));
|
|
9
|
+
var _hooks = require("../../internals/hooks");
|
|
10
|
+
var _ToastContext = _interopRequireDefault(require("../ToastContext"));
|
|
11
|
+
/**
|
|
12
|
+
* A hook that delays the closure of the message box.
|
|
13
|
+
*/
|
|
14
|
+
function useDelayedClosure(props) {
|
|
15
|
+
var onClose = props.onClose,
|
|
16
|
+
durationProp = props.duration,
|
|
17
|
+
targetRef = props.targetRef;
|
|
18
|
+
var _useContext = (0, _react.useContext)(_ToastContext.default),
|
|
19
|
+
usedToaster = _useContext.usedToaster,
|
|
20
|
+
_useContext$duration = _useContext.duration,
|
|
21
|
+
duration = _useContext$duration === void 0 ? durationProp : _useContext$duration,
|
|
22
|
+
mouseReset = _useContext.mouseReset;
|
|
23
|
+
var mouseEnterRef = (0, _react.useRef)();
|
|
24
|
+
var mouseLeaveRef = (0, _react.useRef)();
|
|
25
|
+
var _useTimeout = (0, _hooks.useTimeout)(onClose, duration, usedToaster && duration > 0),
|
|
26
|
+
clear = _useTimeout.clear,
|
|
27
|
+
reset = _useTimeout.reset;
|
|
28
|
+
(0, _hooks.useMount)(function () {
|
|
29
|
+
if (targetRef !== null && targetRef !== void 0 && targetRef.current && mouseReset) {
|
|
30
|
+
if (mouseEnterRef.current || mouseLeaveRef.current) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
mouseEnterRef.current = (0, _on.default)(targetRef.current, 'mouseenter', clear);
|
|
34
|
+
mouseLeaveRef.current = (0, _on.default)(targetRef.current, 'mouseleave', reset);
|
|
35
|
+
return function () {
|
|
36
|
+
var _mouseEnterRef$curren, _mouseLeaveRef$curren;
|
|
37
|
+
(_mouseEnterRef$curren = mouseEnterRef.current) === null || _mouseEnterRef$curren === void 0 ? void 0 : _mouseEnterRef$curren.off();
|
|
38
|
+
(_mouseLeaveRef$curren = mouseLeaveRef.current) === null || _mouseLeaveRef$curren === void 0 ? void 0 : _mouseLeaveRef$curren.off();
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
clear: clear,
|
|
44
|
+
reset: reset
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
var _default = exports.default = useDelayedClosure;
|
|
@@ -340,6 +340,7 @@
|
|
|
340
340
|
--rs-list-placeholder-border: var(--rs-primary-500);
|
|
341
341
|
--rs-timeline-indicator-bg: var(--rs-gray-300);
|
|
342
342
|
--rs-timeline-indicator-active-bg: var(--rs-primary-500);
|
|
343
|
+
--rs-table-border-color: var(--rs-border-secondary);
|
|
343
344
|
--rs-table-shadow: rgba(9, 9, 9, 0.08);
|
|
344
345
|
--rs-table-sort: var(--rs-primary-500);
|
|
345
346
|
--rs-table-resize: var(--rs-primary-500);
|
|
@@ -355,6 +356,8 @@
|
|
|
355
356
|
--rs-picker-value: var(--rs-primary-700);
|
|
356
357
|
--rs-picker-count-bg: var(--rs-primary-500);
|
|
357
358
|
--rs-picker-count-text: #fff;
|
|
359
|
+
--rs-picker-state-error: var(--rs-state-error);
|
|
360
|
+
--rs-picker-state-error-outline: var(--rs-state-error-outline);
|
|
358
361
|
--rs-calendar-today-bg: var(--rs-primary-500);
|
|
359
362
|
--rs-calendar-today-text: #fff;
|
|
360
363
|
--rs-calendar-range-bg: rgb(from var(--rs-primary-100) r g b / 50%);
|
|
@@ -713,6 +716,7 @@
|
|
|
713
716
|
--rs-list-placeholder-border: var(--rs-primary-500);
|
|
714
717
|
--rs-timeline-indicator-bg: var(--rs-gray-500);
|
|
715
718
|
--rs-timeline-indicator-active-bg: var(--rs-primary-500);
|
|
719
|
+
--rs-table-border-color: var(--rs-border-secondary);
|
|
716
720
|
--rs-table-shadow: rgba(9, 9, 9, 0.99);
|
|
717
721
|
--rs-table-sort: var(--rs-primary-500);
|
|
718
722
|
--rs-table-resize: var(--rs-primary-500);
|
|
@@ -1089,6 +1093,7 @@
|
|
|
1089
1093
|
--rs-list-placeholder-border: var(--rs-primary-500);
|
|
1090
1094
|
--rs-timeline-indicator-bg: var(--rs-gray-500);
|
|
1091
1095
|
--rs-timeline-indicator-active-bg: var(--rs-primary-500);
|
|
1096
|
+
--rs-table-border-color: var(--rs-border-secondary);
|
|
1092
1097
|
--rs-table-shadow: rgba(9, 9, 9, 0.99);
|
|
1093
1098
|
--rs-table-sort: var(--rs-primary-500);
|
|
1094
1099
|
--rs-table-resize: var(--rs-primary-500);
|
|
@@ -4742,13 +4747,15 @@ label:hover .rs-checkbox-control .rs-checkbox-inner::before {
|
|
|
4742
4747
|
}
|
|
4743
4748
|
.rs-divider-vertical {
|
|
4744
4749
|
display: inline-block;
|
|
4745
|
-
height: 1em;
|
|
4750
|
+
min-height: 1em;
|
|
4751
|
+
height: 100%;
|
|
4746
4752
|
width: 1px;
|
|
4747
4753
|
vertical-align: middle;
|
|
4748
4754
|
margin: 0 12px;
|
|
4749
4755
|
}
|
|
4750
4756
|
.rs-divider-horizontal {
|
|
4751
4757
|
height: 1px;
|
|
4758
|
+
width: 100%;
|
|
4752
4759
|
margin: 24px 0;
|
|
4753
4760
|
}
|
|
4754
4761
|
.rs-divider-horizontal.rs-divider-with-text {
|
|
@@ -12101,6 +12108,9 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
12101
12108
|
bottom: -10px;
|
|
12102
12109
|
right: -10px;
|
|
12103
12110
|
}
|
|
12111
|
+
.rs-radio-control [type='radio']:disabled {
|
|
12112
|
+
cursor: not-allowed;
|
|
12113
|
+
}
|
|
12104
12114
|
.rs-radio-control::before,
|
|
12105
12115
|
.rs-radio-control .rs-radio-inner::before,
|
|
12106
12116
|
.rs-radio-control .rs-radio-inner::after {
|
|
@@ -13706,7 +13716,7 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
13706
13716
|
width: 100%;
|
|
13707
13717
|
z-index: 4;
|
|
13708
13718
|
border-top: 1px solid #f2f2f5;
|
|
13709
|
-
border-top: 1px solid var(--rs-border-
|
|
13719
|
+
border-top: 1px solid var(--rs-table-border-color);
|
|
13710
13720
|
padding: 10px;
|
|
13711
13721
|
background-color: #fff;
|
|
13712
13722
|
background-color: var(--rs-bg-card);
|
|
@@ -13852,7 +13862,7 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
13852
13862
|
background-color: #fff;
|
|
13853
13863
|
background-color: var(--rs-bg-card);
|
|
13854
13864
|
border-bottom: 1px solid #f2f2f5;
|
|
13855
|
-
border-bottom: 1px solid var(--rs-border-
|
|
13865
|
+
border-bottom: 1px solid var(--rs-table-border-color);
|
|
13856
13866
|
}
|
|
13857
13867
|
.rs-table-cell.first {
|
|
13858
13868
|
border-right-width: 0;
|
|
@@ -13891,7 +13901,7 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
13891
13901
|
}
|
|
13892
13902
|
.rs-table-cell-rowspan {
|
|
13893
13903
|
border-bottom: 1px solid #f2f2f5 !important;
|
|
13894
|
-
border-bottom: 1px solid var(--rs-border-
|
|
13904
|
+
border-bottom: 1px solid var(--rs-table-border-color) !important;
|
|
13895
13905
|
}
|
|
13896
13906
|
.rs-table-cell-full-text:hover {
|
|
13897
13907
|
z-index: 1 !important;
|
|
@@ -13999,11 +14009,11 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
13999
14009
|
}
|
|
14000
14010
|
.rs-table-bordered {
|
|
14001
14011
|
border: 1px solid #f2f2f5;
|
|
14002
|
-
border: 1px solid var(--rs-border-
|
|
14012
|
+
border: 1px solid var(--rs-table-border-color);
|
|
14003
14013
|
}
|
|
14004
14014
|
.rs-table-cell-bordered .rs-table-cell {
|
|
14005
14015
|
border-left: 1px solid #f2f2f5;
|
|
14006
|
-
border-left: 1px solid var(--rs-border-
|
|
14016
|
+
border-left: 1px solid var(--rs-table-border-color);
|
|
14007
14017
|
}
|
|
14008
14018
|
.rs-table-column-group {
|
|
14009
14019
|
position: absolute;
|
|
@@ -14014,7 +14024,7 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
14014
14024
|
}
|
|
14015
14025
|
.rs-table-column-group-header {
|
|
14016
14026
|
border-bottom: 1px solid #f2f2f5;
|
|
14017
|
-
border-bottom: 1px solid var(--rs-border-
|
|
14027
|
+
border-bottom: 1px solid var(--rs-table-border-color);
|
|
14018
14028
|
position: absolute;
|
|
14019
14029
|
width: 100%;
|
|
14020
14030
|
}
|
|
@@ -14025,7 +14035,11 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
14025
14035
|
.rs-table-column-group-cell {
|
|
14026
14036
|
position: absolute;
|
|
14027
14037
|
border-left: 1px solid #f2f2f5;
|
|
14028
|
-
border-left: 1px solid var(--rs-border-
|
|
14038
|
+
border-left: 1px solid var(--rs-table-border-color);
|
|
14039
|
+
}
|
|
14040
|
+
.rs-table-row:not(.rs-table-row-rowspan) {
|
|
14041
|
+
border-bottom: 1px solid #f2f2f5;
|
|
14042
|
+
border-bottom: 1px solid var(--rs-table-border-color);
|
|
14029
14043
|
}
|
|
14030
14044
|
.rs-table-cell-expand-wrapper {
|
|
14031
14045
|
margin-left: 10px;
|
|
@@ -15419,6 +15433,9 @@ textarea.rs-inline-edit-sm .rs-plaintext {
|
|
|
15419
15433
|
opacity: 0.3;
|
|
15420
15434
|
cursor: not-allowed;
|
|
15421
15435
|
}
|
|
15436
|
+
.rs-uploader-file-item-disabled:hover {
|
|
15437
|
+
background-color: transparent !important;
|
|
15438
|
+
}
|
|
15422
15439
|
.rs-uploader-picture .rs-uploader-file-item-disabled .rs-uploader-file-item-status {
|
|
15423
15440
|
cursor: not-allowed;
|
|
15424
15441
|
}
|
|
@@ -16667,13 +16684,19 @@ kbd.rs-text {
|
|
|
16667
16684
|
-ms-flex-align: center;
|
|
16668
16685
|
align-items: center;
|
|
16669
16686
|
}
|
|
16670
|
-
.rs-picker-error > .rs-input-group {
|
|
16671
|
-
border-color: #f44336
|
|
16672
|
-
border-color: var(--rs-state-error)
|
|
16687
|
+
.rs-picker-error > .rs-picker-input-group {
|
|
16688
|
+
border-color: #f44336;
|
|
16689
|
+
border-color: var(--rs-picker-state-error);
|
|
16673
16690
|
}
|
|
16674
|
-
.rs-picker-error > .rs-input-group:
|
|
16675
|
-
|
|
16676
|
-
|
|
16691
|
+
.rs-picker-error > .rs-picker-input-group:hover {
|
|
16692
|
+
border-color: #f44336;
|
|
16693
|
+
border-color: var(--rs-picker-state-error);
|
|
16694
|
+
}
|
|
16695
|
+
.rs-picker-error > .rs-picker-input-group:focus-within {
|
|
16696
|
+
border-color: #f44336;
|
|
16697
|
+
border-color: var(--rs-picker-state-error);
|
|
16698
|
+
outline: 3px solid rgb(from #f44336 r g b / 25%);
|
|
16699
|
+
outline: var(--rs-picker-state-error-outline);
|
|
16677
16700
|
}
|
|
16678
16701
|
.rs-picker-toggle {
|
|
16679
16702
|
display: -webkit-inline-box;
|