rsuite 5.72.0 → 5.73.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 +33 -0
- package/Calendar/styles/index.css +28 -31
- package/Calendar/styles/index.less +21 -27
- package/CheckPicker/styles/index.css +0 -1
- package/CheckTree/styles/index.css +0 -1
- package/CheckTree/styles/index.less +0 -1
- package/CheckTreePicker/styles/index.css +0 -1
- package/Checkbox/styles/mixin.less +1 -1
- package/DatePicker/styles/index.css +28 -34
- package/DatePicker/styles/index.less +0 -4
- package/DateRangePicker/styles/index.css +28 -37
- package/DateRangePicker/styles/index.less +0 -4
- package/InputPicker/styles/index.css +0 -1
- package/Pagination/styles/index.css +0 -1
- package/RadioTile/styles/index.css +69 -0
- package/RadioTile/styles/index.less +3 -1
- package/Rate/styles/index.less +1 -1
- package/SelectPicker/styles/index.css +0 -1
- package/Slider/styles/index.less +1 -1
- package/TagInput/styles/index.css +0 -4
- package/TagPicker/styles/index.css +0 -4
- package/TagPicker/styles/index.less +0 -2
- package/TimePicker/styles/index.css +28 -34
- package/TimeRangePicker/styles/index.css +28 -37
- package/Tree/styles/index.css +0 -3
- package/Tree/styles/index.less +0 -6
- package/TreePicker/styles/index.css +0 -3
- package/cjs/Calendar/CalendarHeader.js +4 -4
- package/cjs/Calendar/{MonthDropdown.d.ts → MonthDropdown/MonthDropdown.d.ts} +1 -2
- package/cjs/Calendar/{MonthDropdown.js → MonthDropdown/MonthDropdown.js} +14 -20
- package/{esm/Calendar → cjs/Calendar/MonthDropdown}/MonthDropdownItem.d.ts +1 -1
- package/cjs/Calendar/{MonthDropdownItem.js → MonthDropdown/MonthDropdownItem.js} +6 -6
- package/cjs/Calendar/MonthDropdown/index.d.ts +2 -0
- package/cjs/Calendar/MonthDropdown/index.js +8 -0
- package/cjs/Calendar/hooks/useCalendarState.d.ts +1 -1
- package/cjs/Calendar/hooks/useCalendarState.js +15 -8
- package/cjs/Calendar/utils/index.d.ts +1 -0
- package/cjs/Calendar/utils/index.js +4 -2
- package/cjs/Calendar/utils/isEveryDateInMonth.d.ts +1 -0
- package/cjs/Calendar/utils/isEveryDateInMonth.js +15 -0
- package/cjs/CascadeTree/TreeView.js +3 -3
- package/cjs/CustomProvider/CustomProvider.d.ts +31 -13
- package/cjs/CustomProvider/CustomProvider.js +20 -6
- package/cjs/DatePicker/DatePicker.js +12 -12
- package/cjs/DateRangePicker/DateRangePicker.js +1 -1
- package/cjs/Drawer/Drawer.js +6 -15
- package/cjs/Dropdown/Dropdown.d.ts +1 -1
- package/cjs/Dropdown/DropdownItem.d.ts +1 -1
- package/cjs/Dropdown/DropdownMenu.d.ts +1 -1
- package/cjs/Dropdown/DropdownMenu.js +3 -3
- package/cjs/Dropdown/DropdownToggle.d.ts +1 -1
- package/cjs/FormControl/hooks/useField.js +3 -0
- package/cjs/FormHelpText/FormHelpText.js +2 -2
- package/cjs/IconButton/IconButton.d.ts +1 -1
- package/cjs/Modal/Modal.d.ts +4 -0
- package/cjs/Modal/Modal.js +12 -13
- package/cjs/Modal/ModalBody.js +6 -5
- package/cjs/Modal/ModalContext.d.ts +4 -0
- package/cjs/Modal/ModalHeader.js +4 -4
- package/cjs/MultiCascadeTree/TreeView.js +3 -3
- package/cjs/Nav/NavDropdownItem.d.ts +1 -1
- package/cjs/Nav/NavDropdownMenu.d.ts +1 -1
- package/cjs/Nav/NavDropdownMenu.js +3 -3
- package/cjs/Nav/NavItem.d.ts +1 -1
- package/cjs/Navbar/NavbarDropdown.d.ts +1 -1
- package/cjs/Navbar/NavbarDropdownItem.d.ts +1 -1
- package/cjs/Navbar/NavbarDropdownMenu.d.ts +1 -1
- package/cjs/Navbar/NavbarDropdownMenu.js +3 -3
- package/cjs/Navbar/NavbarItem.d.ts +1 -1
- package/cjs/Pagination/Pagination.js +5 -5
- package/cjs/Panel/AccordionButton.js +2 -2
- package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
- package/cjs/Sidenav/ExpandedSidenavDropdownItem.d.ts +1 -1
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.d.ts +1 -1
- package/cjs/Sidenav/SidenavDropdown.d.ts +1 -1
- package/cjs/Sidenav/SidenavDropdownItem.d.ts +1 -1
- package/cjs/Sidenav/SidenavDropdownMenu.d.ts +1 -1
- package/cjs/Sidenav/SidenavItem.d.ts +1 -1
- package/cjs/Sidenav/SidenavToggle.js +3 -3
- package/cjs/Steps/StepItem.d.ts +1 -1
- package/cjs/internals/Picker/ListItemGroup.js +1 -1
- package/cjs/internals/Picker/PickerIndicator.js +2 -2
- package/cjs/internals/Picker/PickerToggle.d.ts +1 -1
- package/cjs/internals/SearchBox/SearchBox.js +1 -1
- package/cjs/internals/constants/statusIcons.js +7 -7
- package/cjs/internals/hooks/useFocusVirtualListItem.d.ts +5 -2
- package/cjs/internals/hooks/useFocusVirtualListItem.js +23 -7
- package/cjs/internals/hooks/useToggleCaret.d.ts +1 -1
- package/cjs/locales/hu_HU.d.ts +2 -0
- package/cjs/locales/hu_HU.js +3 -1
- package/dist/rsuite-no-reset-rtl.css +28 -46
- 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 +28 -46
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +28 -46
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +28 -46
- package/dist/rsuite.js +450 -5234
- 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/Calendar/CalendarContainer.js +1 -1
- package/esm/Calendar/CalendarHeader.js +4 -4
- package/esm/Calendar/{MonthDropdown.d.ts → MonthDropdown/MonthDropdown.d.ts} +1 -2
- package/esm/Calendar/{MonthDropdown.js → MonthDropdown/MonthDropdown.js} +13 -18
- package/{cjs/Calendar → esm/Calendar/MonthDropdown}/MonthDropdownItem.d.ts +1 -1
- package/esm/Calendar/{MonthDropdownItem.js → MonthDropdown/MonthDropdownItem.js} +6 -6
- package/esm/Calendar/MonthDropdown/index.d.ts +2 -0
- package/esm/Calendar/MonthDropdown/index.js +3 -0
- package/esm/Calendar/hooks/useCalendarState.d.ts +1 -1
- package/esm/Calendar/hooks/useCalendarState.js +16 -9
- package/esm/Calendar/utils/index.d.ts +1 -0
- package/esm/Calendar/utils/index.js +2 -1
- package/esm/Calendar/utils/isEveryDateInMonth.d.ts +1 -0
- package/esm/Calendar/utils/isEveryDateInMonth.js +11 -0
- package/esm/CascadeTree/TreeView.js +3 -3
- package/esm/CustomProvider/CustomProvider.d.ts +31 -13
- package/esm/CustomProvider/CustomProvider.js +20 -6
- package/esm/DatePicker/DatePicker.js +3 -3
- package/esm/DateRangePicker/DateRangePicker.js +2 -2
- package/esm/Drawer/Drawer.js +6 -13
- package/esm/Dropdown/Dropdown.d.ts +1 -1
- package/esm/Dropdown/DropdownItem.d.ts +1 -1
- package/esm/Dropdown/DropdownMenu.d.ts +1 -1
- package/esm/Dropdown/DropdownMenu.js +3 -3
- package/esm/Dropdown/DropdownToggle.d.ts +1 -1
- package/esm/FormControl/hooks/useField.js +4 -1
- package/esm/FormHelpText/FormHelpText.js +2 -2
- package/esm/IconButton/IconButton.d.ts +1 -1
- package/esm/Modal/Modal.d.ts +4 -0
- package/esm/Modal/Modal.js +13 -14
- package/esm/Modal/ModalBody.js +6 -5
- package/esm/Modal/ModalContext.d.ts +4 -0
- package/esm/Modal/ModalHeader.js +4 -4
- package/esm/MultiCascadeTree/TreeView.js +3 -3
- package/esm/Nav/NavDropdownItem.d.ts +1 -1
- package/esm/Nav/NavDropdownMenu.d.ts +1 -1
- package/esm/Nav/NavDropdownMenu.js +3 -3
- package/esm/Nav/NavItem.d.ts +1 -1
- package/esm/Navbar/NavbarDropdown.d.ts +1 -1
- package/esm/Navbar/NavbarDropdownItem.d.ts +1 -1
- package/esm/Navbar/NavbarDropdownMenu.d.ts +1 -1
- package/esm/Navbar/NavbarDropdownMenu.js +3 -3
- package/esm/Navbar/NavbarItem.d.ts +1 -1
- package/esm/Pagination/Pagination.js +10 -10
- package/esm/Panel/AccordionButton.js +1 -1
- package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
- package/esm/Sidenav/ExpandedSidenavDropdownItem.d.ts +1 -1
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.d.ts +1 -1
- package/esm/Sidenav/SidenavDropdown.d.ts +1 -1
- package/esm/Sidenav/SidenavDropdownItem.d.ts +1 -1
- package/esm/Sidenav/SidenavDropdownMenu.d.ts +1 -1
- package/esm/Sidenav/SidenavItem.d.ts +1 -1
- package/esm/Sidenav/SidenavToggle.js +3 -3
- package/esm/Steps/StepItem.d.ts +1 -1
- package/esm/internals/Picker/ListItemGroup.js +2 -2
- package/esm/internals/Picker/PickerIndicator.js +1 -1
- package/esm/internals/Picker/PickerToggle.d.ts +1 -1
- package/esm/internals/SearchBox/SearchBox.js +2 -2
- package/esm/internals/constants/statusIcons.js +7 -7
- package/esm/internals/hooks/useFocusVirtualListItem.d.ts +5 -2
- package/esm/internals/hooks/useFocusVirtualListItem.js +23 -7
- package/esm/internals/hooks/useToggleCaret.d.ts +1 -1
- package/esm/locales/hu_HU.d.ts +2 -0
- package/esm/locales/hu_HU.js +3 -1
- package/internals/Picker/styles/mixin.less +0 -1
- package/package.json +2 -2
- package/styles/variables.less +1 -1
- package/cjs/Drawer/DrawerContext.d.ts +0 -9
- package/cjs/Drawer/DrawerContext.js +0 -9
- package/esm/Drawer/DrawerContext.d.ts +0 -9
- package/esm/Drawer/DrawerContext.js +0 -4
|
@@ -4,7 +4,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "className", "classPrefix", "calendarDate", "dateRange", "disabledBackward", "defaultState", "disabledForward", "format", "hoverRangeValue", "inline", "isoWeek", "weekStart", "targetId", "limitEndYear", "limitStartYear", "locale", "monthDropdownProps", "showMeridiem", "showWeekNumbers", "cellClassName", "disabledDate", "onChangeMonth", "onChangeTime", "onMouseMove", "onMoveBackward", "onMoveForward", "onSelect", "onToggleMonthDropdown", "onToggleTimeDropdown", "renderCell", "renderCellOnPicker", "renderTitle", "renderToolbar"];
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import pick from 'lodash/pick';
|
|
7
|
-
import MonthDropdown from "./MonthDropdown.js";
|
|
7
|
+
import MonthDropdown from "./MonthDropdown/index.js";
|
|
8
8
|
import TimeDropdown from "./TimeDropdown/index.js";
|
|
9
9
|
import CalendarBody from "./CalendarBody.js";
|
|
10
10
|
import CalendarHeader from "./CalendarHeader.js";
|
|
@@ -3,8 +3,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
var _excluded = ["as", "className", "classPrefix", "disabledBackward", "disabledForward", "showDate", "showMonth", "showTime", "disabledTime", "onMoveBackward", "onMoveForward", "onToggleMonthDropdown", "onToggleTimeDropdown", "renderTitle", "renderToolbar"];
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
7
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
8
8
|
import IconButton from "../IconButton/index.js";
|
|
9
9
|
import Button from "../Button/index.js";
|
|
10
10
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
@@ -88,7 +88,7 @@ var CalendarHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
88
88
|
"aria-label": "Previous month",
|
|
89
89
|
className: backwardClass,
|
|
90
90
|
onClick: disabledBackward ? undefined : onMoveBackward,
|
|
91
|
-
icon: /*#__PURE__*/React.createElement(
|
|
91
|
+
icon: /*#__PURE__*/React.createElement(PagePreviousIcon, null)
|
|
92
92
|
})), /*#__PURE__*/React.createElement(Button, _extends({}, btnProps, {
|
|
93
93
|
"aria-label": "Select month",
|
|
94
94
|
id: targetId ? targetId + "-grid-label" : undefined,
|
|
@@ -98,7 +98,7 @@ var CalendarHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
98
98
|
"aria-label": "Next month",
|
|
99
99
|
className: forwardClass,
|
|
100
100
|
onClick: disabledForward ? undefined : onMoveForward,
|
|
101
|
-
icon: /*#__PURE__*/React.createElement(
|
|
101
|
+
icon: /*#__PURE__*/React.createElement(PageNextIcon, null)
|
|
102
102
|
})));
|
|
103
103
|
var hasMonth = showDate || showMonth;
|
|
104
104
|
var classes = merge(className, withClassPrefix({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RsRefForwardingComponent, WithAsProps } from '
|
|
1
|
+
import { RsRefForwardingComponent, WithAsProps } from '../../internals/types';
|
|
2
2
|
export interface MonthDropdownProps extends WithAsProps {
|
|
3
3
|
show?: boolean;
|
|
4
4
|
limitStartYear?: number;
|
|
@@ -7,6 +7,5 @@ export interface MonthDropdownProps extends WithAsProps {
|
|
|
7
7
|
width?: number;
|
|
8
8
|
disabledMonth?: (date: Date) => boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function isEveryDateInMonth(year: number, month: number, predicate: (date: Date) => boolean): boolean;
|
|
11
10
|
declare const MonthDropdown: RsRefForwardingComponent<'div', MonthDropdownProps>;
|
|
12
11
|
export default MonthDropdown;
|
|
@@ -4,21 +4,17 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "className", "classPrefix", "limitStartYear", "limitEndYear", "show", "height", "width", "disabledMonth"],
|
|
5
5
|
_excluded2 = ["className", "itemClassName", "as", "itemAs"];
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import { AutoSizer, FixedSizeList } from "
|
|
9
|
-
import { useClassNames } from "
|
|
7
|
+
import { getMonth, getYear } from "../../internals/utils/date/index.js";
|
|
8
|
+
import { AutoSizer, FixedSizeList } from "../../internals/Windowing/index.js";
|
|
9
|
+
import { useClassNames } from "../../internals/hooks/index.js";
|
|
10
10
|
import MonthDropdownItem from "./MonthDropdownItem.js";
|
|
11
|
-
import { useCalendar } from "
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
11
|
+
import { useCalendar } from "../hooks/index.js";
|
|
12
|
+
import { isEveryDateInMonth } from "../utils/index.js";
|
|
13
|
+
// Array representing the index of each month
|
|
14
|
+
var MONTHS_INDEX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
15
|
+
|
|
16
|
+
// The height of each item
|
|
17
|
+
var ITEM_SIZE = 108;
|
|
22
18
|
var MonthDropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
23
19
|
var _props$as = props.as,
|
|
24
20
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -86,7 +82,7 @@ var MonthDropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
86
82
|
role: "rowheader"
|
|
87
83
|
}, year), /*#__PURE__*/React.createElement("div", {
|
|
88
84
|
className: prefix('list')
|
|
89
|
-
},
|
|
85
|
+
}, MONTHS_INDEX.map(function (item, month) {
|
|
90
86
|
return /*#__PURE__*/React.createElement(MonthDropdownItem, {
|
|
91
87
|
disabled: isMonthDisabled(year, month),
|
|
92
88
|
active: isSelectedYear && month === selectedMonth,
|
|
@@ -99,9 +95,8 @@ var MonthDropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
99
95
|
var classes = merge(className, withClassPrefix(), {
|
|
100
96
|
show: show
|
|
101
97
|
});
|
|
102
|
-
var itemSize = 75;
|
|
103
98
|
var initialItemIndex = getYear(date) - startYear;
|
|
104
|
-
var initialScrollOffset =
|
|
99
|
+
var initialScrollOffset = ITEM_SIZE * initialItemIndex;
|
|
105
100
|
if (!show) {
|
|
106
101
|
return null;
|
|
107
102
|
}
|
|
@@ -125,7 +120,7 @@ var MonthDropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
125
120
|
className: merge(prefix('row-wrapper'), listClassName),
|
|
126
121
|
width: width || defaultWidth,
|
|
127
122
|
height: height || defaultHeight,
|
|
128
|
-
itemSize:
|
|
123
|
+
itemSize: ITEM_SIZE,
|
|
129
124
|
itemCount: rowCount,
|
|
130
125
|
initialScrollOffset: initialScrollOffset,
|
|
131
126
|
innerElementType: List
|
|
@@ -3,11 +3,11 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
var _excluded = ["as", "className", "classPrefix", "active", "disabled", "month", "year"];
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
|
-
import { setMonth, setYear } from "
|
|
7
|
-
import { useClassNames, useCustom, useEventCallback } from "
|
|
8
|
-
import { composeFunctions } from "
|
|
9
|
-
import { useCalendar } from "
|
|
10
|
-
import { getAriaLabel } from "
|
|
6
|
+
import { setMonth, setYear } from "../../internals/utils/date/index.js";
|
|
7
|
+
import { useClassNames, useCustom, useEventCallback } from "../../internals/hooks/index.js";
|
|
8
|
+
import { composeFunctions } from "../../internals/utils/index.js";
|
|
9
|
+
import { useCalendar } from "../hooks/index.js";
|
|
10
|
+
import { getAriaLabel } from "../utils/index.js";
|
|
11
11
|
var MonthDropdownItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
12
12
|
var _props$as = props.as,
|
|
13
13
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -65,7 +65,7 @@ var MonthDropdownItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
65
65
|
onClick: handleClick
|
|
66
66
|
}, rest), /*#__PURE__*/React.createElement("span", {
|
|
67
67
|
className: prefix('content')
|
|
68
|
-
},
|
|
68
|
+
}, formatDate(currentMonth, 'MMM')));
|
|
69
69
|
});
|
|
70
70
|
MonthDropdownItem.displayName = 'MonthDropdownItem';
|
|
71
71
|
export default MonthDropdownItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
3
|
import { addMonths } from "../../internals/utils/date/index.js";
|
|
4
4
|
import { useEventCallback } from "../../internals/hooks/index.js";
|
|
5
5
|
export var CalendarState = /*#__PURE__*/function (CalendarState) {
|
|
@@ -11,9 +11,16 @@ export var useCalendarState = function useCalendarState(props) {
|
|
|
11
11
|
var _useState = useState(props.defaultState),
|
|
12
12
|
calendarState = _useState[0],
|
|
13
13
|
setCalendarState = _useState[1];
|
|
14
|
-
var reset =
|
|
14
|
+
var reset = useEventCallback(function () {
|
|
15
15
|
setCalendarState(undefined);
|
|
16
|
-
|
|
16
|
+
if (calendarState === CalendarState.TIME) {
|
|
17
|
+
var _props$onToggleTimeDr;
|
|
18
|
+
(_props$onToggleTimeDr = props.onToggleTimeDropdown) === null || _props$onToggleTimeDr === void 0 ? void 0 : _props$onToggleTimeDr.call(props, false);
|
|
19
|
+
} else if (calendarState === CalendarState.MONTH) {
|
|
20
|
+
var _props$onToggleMonthD;
|
|
21
|
+
(_props$onToggleMonthD = props.onToggleMonthDropdown) === null || _props$onToggleMonthD === void 0 ? void 0 : _props$onToggleMonthD.call(props, false);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
17
24
|
var onMoveForward = useEventCallback(function () {
|
|
18
25
|
var _props$onMoveForward;
|
|
19
26
|
(_props$onMoveForward = props.onMoveForward) === null || _props$onMoveForward === void 0 ? void 0 : _props$onMoveForward.call(props, addMonths(props.calendarDate, 1));
|
|
@@ -23,22 +30,22 @@ export var useCalendarState = function useCalendarState(props) {
|
|
|
23
30
|
(_props$onMoveBackward = props.onMoveBackward) === null || _props$onMoveBackward === void 0 ? void 0 : _props$onMoveBackward.call(props, addMonths(props.calendarDate, -1));
|
|
24
31
|
});
|
|
25
32
|
var onToggleTimeDropdown = useEventCallback(function () {
|
|
26
|
-
var _props$
|
|
33
|
+
var _props$onToggleTimeDr2;
|
|
27
34
|
if (calendarState === CalendarState.TIME) {
|
|
28
|
-
|
|
35
|
+
setCalendarState(undefined);
|
|
29
36
|
} else {
|
|
30
37
|
setCalendarState(CalendarState.TIME);
|
|
31
38
|
}
|
|
32
|
-
(_props$
|
|
39
|
+
(_props$onToggleTimeDr2 = props.onToggleTimeDropdown) === null || _props$onToggleTimeDr2 === void 0 ? void 0 : _props$onToggleTimeDr2.call(props, calendarState !== CalendarState.TIME);
|
|
33
40
|
});
|
|
34
41
|
var onToggleMonthDropdown = useEventCallback(function () {
|
|
35
|
-
var _props$
|
|
42
|
+
var _props$onToggleMonthD2;
|
|
36
43
|
if (calendarState === CalendarState.MONTH) {
|
|
37
|
-
|
|
44
|
+
setCalendarState(undefined);
|
|
38
45
|
} else {
|
|
39
46
|
setCalendarState(CalendarState.MONTH);
|
|
40
47
|
}
|
|
41
|
-
(_props$
|
|
48
|
+
(_props$onToggleMonthD2 = props.onToggleMonthDropdown) === null || _props$onToggleMonthD2 === void 0 ? void 0 : _props$onToggleMonthD2.call(props, calendarState !== CalendarState.MONTH);
|
|
42
49
|
});
|
|
43
50
|
var handlers = useMemo(function () {
|
|
44
51
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEveryDateInMonth(year: number, month: number, predicate: (date: Date) => boolean): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { getDaysInMonth } from "../../internals/utils/date/index.js";
|
|
3
|
+
export function isEveryDateInMonth(year, month, predicate) {
|
|
4
|
+
var days = getDaysInMonth(new Date(year, month));
|
|
5
|
+
for (var i = 1; i <= days; i++) {
|
|
6
|
+
if (!predicate(new Date(year, month, i))) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
@@ -9,8 +9,8 @@ import isNil from 'lodash/isNil';
|
|
|
9
9
|
import { shallowEqual, mergeRefs } from "../internals/utils/index.js";
|
|
10
10
|
import { useClassNames, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
11
11
|
import { ListItem, useCombobox } from "../internals/Picker/index.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
13
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
14
14
|
import getPosition from 'dom-lib/getPosition';
|
|
15
15
|
import scrollTop from 'dom-lib/scrollTop';
|
|
16
16
|
var emptyArray = [];
|
|
@@ -110,7 +110,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
110
110
|
|
|
111
111
|
// Use `value` in keys when If `value` is string or number
|
|
112
112
|
var onlyKey = typeof value === 'number' || typeof value === 'string' ? value : index;
|
|
113
|
-
var Icon = loading ? SpinnerIcon : rtl ?
|
|
113
|
+
var Icon = loading ? SpinnerIcon : rtl ? PagePreviousIcon : PageNextIcon;
|
|
114
114
|
return /*#__PURE__*/React.createElement(ListItem, {
|
|
115
115
|
as: 'li',
|
|
116
116
|
role: "treeitem",
|
|
@@ -102,14 +102,38 @@ export interface CustomValue<T = Locale> {
|
|
|
102
102
|
disableRipple?: boolean;
|
|
103
103
|
}
|
|
104
104
|
export interface CustomProviderProps<T = Locale> extends Partial<CustomValue<T>> {
|
|
105
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Supported themes
|
|
107
|
+
*/
|
|
106
108
|
theme?: 'light' | 'dark' | 'high-contrast';
|
|
107
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* The prefix of the component CSS class
|
|
111
|
+
*/
|
|
108
112
|
classPrefix?: string;
|
|
109
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* The prefix of the icon CSS class
|
|
115
|
+
*/
|
|
116
|
+
iconClassPrefix?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Primary content
|
|
119
|
+
*/
|
|
110
120
|
children?: React.ReactNode;
|
|
111
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Sets a container for toast rendering
|
|
123
|
+
*/
|
|
112
124
|
toastContainer?: HTMLElement | (() => HTMLElement | null) | null;
|
|
125
|
+
csp?: {
|
|
126
|
+
/**
|
|
127
|
+
* Content Security Policy nonce
|
|
128
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce
|
|
129
|
+
*/
|
|
130
|
+
nonce?: string;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Disable inline styles
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
disableInlineStyles?: boolean;
|
|
113
137
|
}
|
|
114
138
|
declare const CustomContext: React.Context<CustomProviderProps<{
|
|
115
139
|
code?: string | undefined;
|
|
@@ -149,9 +173,7 @@ declare const CustomContext: React.Context<CustomProviderProps<{
|
|
|
149
173
|
hours: string;
|
|
150
174
|
minutes: string;
|
|
151
175
|
seconds: string;
|
|
152
|
-
formattedMonthPattern: string;
|
|
153
|
-
* The locale object that contains the language and formatting rules for the date.
|
|
154
|
-
*/
|
|
176
|
+
formattedMonthPattern: string;
|
|
155
177
|
formattedDayPattern: string;
|
|
156
178
|
shortDateFormat: string;
|
|
157
179
|
shortTimeFormat: string;
|
|
@@ -172,9 +194,7 @@ declare const CustomContext: React.Context<CustomProviderProps<{
|
|
|
172
194
|
hours: string;
|
|
173
195
|
minutes: string;
|
|
174
196
|
seconds: string;
|
|
175
|
-
formattedMonthPattern: string;
|
|
176
|
-
* The locale object that contains the language and formatting rules for the date.
|
|
177
|
-
*/
|
|
197
|
+
formattedMonthPattern: string;
|
|
178
198
|
formattedDayPattern: string;
|
|
179
199
|
shortDateFormat: string;
|
|
180
200
|
shortTimeFormat: string;
|
|
@@ -196,9 +216,7 @@ declare const CustomContext: React.Context<CustomProviderProps<{
|
|
|
196
216
|
hours: string;
|
|
197
217
|
minutes: string;
|
|
198
218
|
seconds: string;
|
|
199
|
-
formattedMonthPattern: string;
|
|
200
|
-
* The locale object that contains the language and formatting rules for the date.
|
|
201
|
-
*/
|
|
219
|
+
formattedMonthPattern: string;
|
|
202
220
|
formattedDayPattern: string;
|
|
203
221
|
shortDateFormat: string;
|
|
204
222
|
shortTimeFormat: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
-
var _excluded = ["children", "classPrefix", "theme", "toastContainer", "disableRipple"];
|
|
5
|
-
import React from 'react';
|
|
4
|
+
var _excluded = ["children", "classPrefix", "iconClassPrefix", "theme", "toastContainer", "disableRipple", "csp", "disableInlineStyles"];
|
|
5
|
+
import React, { useRef, useMemo } from 'react';
|
|
6
|
+
import IconProvider from '@rsuite/icons/IconProvider';
|
|
6
7
|
import { usePortal, useIsomorphicLayoutEffect } from "../internals/hooks/index.js";
|
|
7
8
|
import { getClassNamePrefix, prefix } from "../internals/utils/prefix.js";
|
|
8
9
|
import { addClass, removeClass, canUseDOM } from "../DOMHelper/index.js";
|
|
@@ -19,17 +20,21 @@ var CustomProvider = function CustomProvider(props) {
|
|
|
19
20
|
var children = props.children,
|
|
20
21
|
_props$classPrefix = props.classPrefix,
|
|
21
22
|
classPrefix = _props$classPrefix === void 0 ? getClassNamePrefix() : _props$classPrefix,
|
|
23
|
+
_props$iconClassPrefi = props.iconClassPrefix,
|
|
24
|
+
iconClassPrefix = _props$iconClassPrefi === void 0 ? classPrefix : _props$iconClassPrefi,
|
|
22
25
|
theme = props.theme,
|
|
23
26
|
container = props.toastContainer,
|
|
24
27
|
disableRipple = props.disableRipple,
|
|
28
|
+
csp = props.csp,
|
|
29
|
+
disableInlineStyles = props.disableInlineStyles,
|
|
25
30
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
26
|
-
var toasters =
|
|
31
|
+
var toasters = useRef(new Map());
|
|
27
32
|
var _usePortal = usePortal({
|
|
28
33
|
container: container,
|
|
29
34
|
waitMount: true
|
|
30
35
|
}),
|
|
31
36
|
Portal = _usePortal.Portal;
|
|
32
|
-
var value =
|
|
37
|
+
var value = useMemo(function () {
|
|
33
38
|
return _extends({
|
|
34
39
|
classPrefix: classPrefix,
|
|
35
40
|
theme: theme,
|
|
@@ -37,6 +42,13 @@ var CustomProvider = function CustomProvider(props) {
|
|
|
37
42
|
disableRipple: disableRipple
|
|
38
43
|
}, rest);
|
|
39
44
|
}, [classPrefix, theme, disableRipple, rest]);
|
|
45
|
+
var iconContext = useMemo(function () {
|
|
46
|
+
return {
|
|
47
|
+
classPrefix: iconClassPrefix,
|
|
48
|
+
csp: csp,
|
|
49
|
+
disableInlineStyles: disableInlineStyles
|
|
50
|
+
};
|
|
51
|
+
}, [iconClassPrefix, csp, disableInlineStyles]);
|
|
40
52
|
useIsomorphicLayoutEffect(function () {
|
|
41
53
|
if (canUseDOM && theme) {
|
|
42
54
|
addClass(document.body, prefix(classPrefix, "theme-" + theme));
|
|
@@ -51,8 +63,10 @@ var CustomProvider = function CustomProvider(props) {
|
|
|
51
63
|
}, [classPrefix, theme]);
|
|
52
64
|
return /*#__PURE__*/React.createElement(CustomContext.Provider, {
|
|
53
65
|
value: value
|
|
66
|
+
}, /*#__PURE__*/React.createElement(IconProvider, {
|
|
67
|
+
value: iconContext
|
|
54
68
|
}, children, /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: "
|
|
69
|
+
className: classPrefix + "toast-provider"
|
|
56
70
|
}, toastPlacements.map(function (placement) {
|
|
57
71
|
return /*#__PURE__*/React.createElement(ToastContainer, {
|
|
58
72
|
key: placement,
|
|
@@ -61,7 +75,7 @@ var CustomProvider = function CustomProvider(props) {
|
|
|
61
75
|
toasters.current.set(placement, _ref);
|
|
62
76
|
}
|
|
63
77
|
});
|
|
64
|
-
}))));
|
|
78
|
+
})))));
|
|
65
79
|
};
|
|
66
80
|
export { CustomContext };
|
|
67
81
|
export default CustomProvider;
|
|
@@ -8,10 +8,11 @@ import React, { useMemo } from 'react';
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import mapValues from 'lodash/mapValues';
|
|
10
10
|
import pick from 'lodash/pick';
|
|
11
|
-
import
|
|
11
|
+
import CalendarIcon from '@rsuite/icons/Calendar';
|
|
12
12
|
import TimeIcon from '@rsuite/icons/Time';
|
|
13
13
|
import CalendarContainer from "../Calendar/CalendarContainer.js";
|
|
14
14
|
import { useCalendarDate } from "../Calendar/hooks/index.js";
|
|
15
|
+
import { isEveryDateInMonth } from "../Calendar/utils/index.js";
|
|
15
16
|
import Toolbar from "./Toolbar.js";
|
|
16
17
|
import Stack from "../Stack/index.js";
|
|
17
18
|
import PredefinedRanges from "./PredefinedRanges.js";
|
|
@@ -20,7 +21,6 @@ import InputGroup from "../InputGroup/index.js";
|
|
|
20
21
|
import useMonthView from "./hooks/useMonthView.js";
|
|
21
22
|
import useFocus from "./hooks/useFocus.js";
|
|
22
23
|
import useCustomizedInput from "./hooks/useCustomizedInput.js";
|
|
23
|
-
import { isEveryDateInMonth } from "../Calendar/MonthDropdown.js";
|
|
24
24
|
import { mergeRefs, partitionHTMLProps, createChainedFunction } from "../internals/utils/index.js";
|
|
25
25
|
import { useClassNames, useControlled, useCustom, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
26
26
|
import { isValid, copyTime, disableTime, DateMode, useDateMode, calendarOnlyProps } from "../internals/utils/date/index.js";
|
|
@@ -441,7 +441,7 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
441
441
|
if (caretAsProp === null) {
|
|
442
442
|
return null;
|
|
443
443
|
}
|
|
444
|
-
return caretAsProp || (mode === DateMode.Time ? TimeIcon :
|
|
444
|
+
return caretAsProp || (mode === DateMode.Time ? TimeIcon : CalendarIcon);
|
|
445
445
|
}, [caretAsProp, mode]);
|
|
446
446
|
var handleTriggerClose = useEventCallback(function (cause) {
|
|
447
447
|
var _props$onClose;
|
|
@@ -9,7 +9,7 @@ import isNil from 'lodash/isNil';
|
|
|
9
9
|
import omit from 'lodash/omit';
|
|
10
10
|
import pick from 'lodash/pick';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
|
-
import
|
|
12
|
+
import CalendarIcon from '@rsuite/icons/Calendar';
|
|
13
13
|
import TimeIcon from '@rsuite/icons/Time';
|
|
14
14
|
import Toolbar from "../DatePicker/Toolbar.js";
|
|
15
15
|
import PredefinedRanges from "../DatePicker/PredefinedRanges.js";
|
|
@@ -745,7 +745,7 @@ var DateRangePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
745
745
|
if (caretAsProp === null) {
|
|
746
746
|
return null;
|
|
747
747
|
}
|
|
748
|
-
return caretAsProp || (onlyShowTime ? TimeIcon :
|
|
748
|
+
return caretAsProp || (onlyShowTime ? TimeIcon : CalendarIcon);
|
|
749
749
|
}, [caretAsProp, onlyShowTime]);
|
|
750
750
|
var isErrorValue = function isErrorValue(value) {
|
|
751
751
|
if (!value) {
|
package/esm/Drawer/Drawer.js
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
var _excluded = ["className", "placement", "classPrefix", "animation", "closeButton"];
|
|
5
|
-
import React
|
|
5
|
+
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import Slide from "../Animation/Slide.js";
|
|
8
8
|
import Modal from "../Modal/index.js";
|
|
9
9
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
10
10
|
import { deprecateComponent } from "../internals/utils/index.js";
|
|
11
|
-
import DrawerContext from "./DrawerContext.js";
|
|
12
11
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
13
12
|
import DrawerBody from "./DrawerBody.js";
|
|
14
13
|
import DrawerHeader from "./DrawerHeader.js";
|
|
@@ -37,22 +36,16 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
37
36
|
var animationProps = {
|
|
38
37
|
placement: placement
|
|
39
38
|
};
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
closeButton: closeButton,
|
|
43
|
-
isDrawer: true
|
|
44
|
-
};
|
|
45
|
-
}, [closeButton]);
|
|
46
|
-
return /*#__PURE__*/React.createElement(DrawerContext.Provider, {
|
|
47
|
-
value: contextValue
|
|
48
|
-
}, /*#__PURE__*/React.createElement(Modal, _extends({}, rest, {
|
|
39
|
+
return /*#__PURE__*/React.createElement(Modal, _extends({}, rest, {
|
|
49
40
|
ref: ref,
|
|
50
41
|
overflow: false,
|
|
51
42
|
classPrefix: classPrefix,
|
|
52
43
|
className: classes,
|
|
53
44
|
animation: animation,
|
|
54
|
-
animationProps: animationProps
|
|
55
|
-
|
|
45
|
+
animationProps: animationProps,
|
|
46
|
+
isDrawer: true,
|
|
47
|
+
closeButton: closeButton
|
|
48
|
+
}));
|
|
56
49
|
});
|
|
57
50
|
DrawerBody.displayName = 'DrawerBody';
|
|
58
51
|
DrawerHeader.displayName = 'DrawerHeader';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import DropdownMenu from './DropdownMenu';
|
|
3
3
|
import { TypeAttributes, WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
4
|
-
import { IconProps } from '@rsuite/icons/
|
|
4
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
5
5
|
import DropdownItem from './DropdownItem';
|
|
6
6
|
import Button from '../Button';
|
|
7
7
|
import DropdownSeparator from './DropdownSeparator';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IconProps } from '@rsuite/icons/
|
|
2
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
3
3
|
import type { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
4
4
|
export interface DropdownMenuItemProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Active the current option */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StandardProps } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface DropdownMenuProps<T = string> extends StandardProps {
|
|
5
5
|
/** Define the title as a submenu */
|
|
6
6
|
title?: React.ReactNode;
|
|
@@ -18,8 +18,8 @@ import { oneOf } from "../internals/propTypes/index.js";
|
|
|
18
18
|
import { useClassNames, useCustom } from "../internals/hooks/index.js";
|
|
19
19
|
import { mergeRefs, warnOnce } from "../internals/utils/index.js";
|
|
20
20
|
import PropTypes from 'prop-types';
|
|
21
|
-
import
|
|
22
|
-
import
|
|
21
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
22
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
23
23
|
import DropdownContext from "./DropdownContext.js";
|
|
24
24
|
import Nav from "../Nav/index.js";
|
|
25
25
|
import NavContext from "../Nav/NavContext.js";
|
|
@@ -108,7 +108,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
108
108
|
icon = _omit.icon,
|
|
109
109
|
disabled = _omit.disabled,
|
|
110
110
|
menuProps = _objectWithoutPropertiesLoose(_omit, _excluded2);
|
|
111
|
-
var Icon = rtl ?
|
|
111
|
+
var Icon = rtl ? PagePreviousIcon : PageNextIcon;
|
|
112
112
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
113
113
|
openMenuOn: ['mouseover', 'click'],
|
|
114
114
|
renderMenuButton: function renderMenuButton(_ref, buttonRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '../Button';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
import { WithAsProps, RsRefForwardingComponent, TypeAttributes } from '../internals/types';
|
|
5
5
|
export interface DropdownToggleProps extends WithAsProps {
|
|
6
6
|
icon?: React.ReactElement<IconProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { isValidElement, useCallback, useMemo } from 'react';
|
|
4
4
|
import get from 'lodash/get';
|
|
5
5
|
import set from 'lodash/set';
|
|
6
6
|
import { nameToPath } from "../utils.js";
|
|
@@ -17,6 +17,9 @@ function getErrorMessage(error) {
|
|
|
17
17
|
if (error !== null && error !== void 0 && error.array && ((_error$array = error.array) === null || _error$array === void 0 ? void 0 : _error$array.length) > 0) {
|
|
18
18
|
return error.array[0].errorMessage;
|
|
19
19
|
}
|
|
20
|
+
if ( /*#__PURE__*/isValidElement(error)) {
|
|
21
|
+
return error;
|
|
22
|
+
}
|
|
20
23
|
return error === null || error === void 0 ? void 0 : error.errorMessage;
|
|
21
24
|
}
|
|
22
25
|
function useField(props) {
|
|
@@ -8,7 +8,7 @@ import Tooltip from "../Tooltip/index.js";
|
|
|
8
8
|
import Whisper from "../Whisper/index.js";
|
|
9
9
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
10
10
|
import { useFormGroup } from "../FormGroup/index.js";
|
|
11
|
-
import
|
|
11
|
+
import HelpOutlineIcon from '@rsuite/icons/HelpOutline';
|
|
12
12
|
/**
|
|
13
13
|
* The `<Form.HelpText>` component is used to display help information in the form.
|
|
14
14
|
* @see https://rsuitejs.com/components/form/
|
|
@@ -43,7 +43,7 @@ var FormHelpText = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
43
43
|
role: "img",
|
|
44
44
|
"aria-label": "help",
|
|
45
45
|
className: classes
|
|
46
|
-
}, /*#__PURE__*/React.createElement(
|
|
46
|
+
}, /*#__PURE__*/React.createElement(HelpOutlineIcon, {
|
|
47
47
|
"aria-hidden": true
|
|
48
48
|
})));
|
|
49
49
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IconProps } from '@rsuite/icons/
|
|
2
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
3
3
|
import { RsRefForwardingComponent } from '../internals/types';
|
|
4
4
|
import Button, { ButtonProps } from '../Button';
|
|
5
5
|
export interface IconButtonProps extends ButtonProps {
|
package/esm/Modal/Modal.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ export interface ModalProps extends BaseModalProps, Pick<React.HTMLAttributes<HT
|
|
|
27
27
|
dialogAs?: React.ElementType;
|
|
28
28
|
/** Automatically sets the height when the body content is too long. */
|
|
29
29
|
overflow?: boolean;
|
|
30
|
+
/** Indicates if the component should be displayed as a drawer */
|
|
31
|
+
isDrawer?: boolean;
|
|
32
|
+
/** Custom close button, used when rendered as a Drawer */
|
|
33
|
+
closeButton?: React.ReactNode | boolean;
|
|
30
34
|
}
|
|
31
35
|
interface ModalComponent extends RsRefForwardingComponent<'div', ModalProps> {
|
|
32
36
|
Body: typeof ModalBody;
|