rsuite 5.71.0 → 5.73.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/Accordion/styles/index.css +20 -6
- package/Animation/styles/collapse.less +2 -1
- package/Animation/styles/fade.less +1 -1
- package/Animation/styles/index.css +8 -0
- package/Animation/styles/index.less +1 -0
- package/Animation/styles/variables.less +4 -0
- package/AutoComplete/styles/index.css +11 -0
- package/CHANGELOG.md +34 -0
- package/Calendar/styles/index.css +71 -44
- package/Calendar/styles/index.less +54 -28
- package/Cascader/styles/index.css +11 -0
- package/CheckPicker/styles/index.css +11 -1
- package/CheckTree/styles/index.css +11 -0
- package/CheckTreePicker/styles/index.css +11 -0
- package/DatePicker/styles/index.css +89 -49
- package/DatePicker/styles/index.less +8 -5
- package/DateRangePicker/styles/index.css +93 -54
- package/DateRangePicker/styles/index.less +7 -6
- package/InputPicker/styles/index.css +11 -1
- package/MultiCascadeTree/styles/index.css +11 -0
- package/MultiCascader/styles/index.css +11 -0
- package/Pagination/styles/index.css +11 -1
- package/Panel/styles/index.css +20 -6
- package/SelectPicker/styles/index.css +11 -1
- package/TagInput/styles/index.css +11 -1
- package/TagPicker/styles/index.css +11 -1
- package/TimePicker/package.json +7 -0
- package/TimePicker/styles/index.css +4155 -0
- package/TimePicker/styles/index.less +1 -0
- package/TimeRangePicker/package.json +7 -0
- package/TimeRangePicker/styles/index.css +4255 -0
- package/TimeRangePicker/styles/index.less +1 -0
- package/cjs/Calendar/Calendar.d.ts +1 -1
- package/cjs/Calendar/Calendar.js +22 -26
- package/cjs/Calendar/CalendarBody.js +9 -9
- package/cjs/Calendar/CalendarContainer.d.ts +10 -2
- package/cjs/Calendar/CalendarContainer.js +40 -68
- package/cjs/Calendar/CalendarHeader.d.ts +0 -2
- package/cjs/Calendar/CalendarHeader.js +28 -46
- package/cjs/Calendar/{CalendarContext.d.ts → CalendarProvider.d.ts} +3 -22
- package/cjs/Calendar/CalendarProvider.js +13 -0
- package/cjs/Calendar/Grid/Grid.d.ts +6 -0
- package/cjs/Calendar/{Table.js → Grid/Grid.js} +11 -17
- package/{esm/Calendar/TableCell.d.ts → cjs/Calendar/Grid/GridCell.d.ts} +4 -4
- package/cjs/Calendar/{TableCell.js → Grid/GridCell.js} +13 -13
- package/cjs/Calendar/Grid/GridHeaderRow.d.ts +4 -0
- package/cjs/Calendar/{TableHeaderRow.js → Grid/GridHeaderRow.js} +11 -11
- package/cjs/Calendar/Grid/GridRow.d.ts +7 -0
- package/cjs/Calendar/{TableRow.js → Grid/GridRow.js} +21 -21
- package/cjs/Calendar/Grid/index.d.ts +2 -0
- package/cjs/Calendar/Grid/index.js +8 -0
- package/cjs/Calendar/MonthDropdown/MonthDropdown.d.ts +11 -0
- package/cjs/Calendar/{MonthDropdown.js → MonthDropdown/MonthDropdown.js} +19 -25
- package/cjs/Calendar/{MonthDropdownItem.d.ts → MonthDropdown/MonthDropdownItem.d.ts} +1 -1
- package/cjs/Calendar/{MonthDropdownItem.js → MonthDropdown/MonthDropdownItem.js} +11 -11
- package/cjs/Calendar/MonthDropdown/index.d.ts +2 -0
- package/cjs/Calendar/MonthDropdown/index.js +8 -0
- package/cjs/Calendar/TimeDropdown/TimeColumn.d.ts +8 -0
- package/cjs/Calendar/TimeDropdown/TimeColumn.js +27 -0
- package/{esm/Calendar → cjs/Calendar/TimeDropdown}/TimeDropdown.d.ts +2 -25
- package/cjs/Calendar/{TimeDropdown.js → TimeDropdown/TimeDropdown.js} +79 -112
- package/cjs/Calendar/TimeDropdown/index.d.ts +2 -0
- package/cjs/Calendar/TimeDropdown/index.js +8 -0
- package/cjs/Calendar/TimeDropdown/utils/formatWithLeadingZero.d.ts +1 -0
- package/cjs/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +8 -0
- package/cjs/Calendar/TimeDropdown/utils/getClockTime.d.ts +11 -0
- package/cjs/Calendar/TimeDropdown/utils/getClockTime.js +43 -0
- package/cjs/Calendar/TimeDropdown/utils/getTimeLimits.d.ts +11 -0
- package/cjs/Calendar/TimeDropdown/utils/getTimeLimits.js +24 -0
- package/cjs/Calendar/TimeDropdown/utils/index.d.ts +4 -0
- package/cjs/Calendar/TimeDropdown/utils/index.js +23 -0
- package/cjs/Calendar/TimeDropdown/utils/scrollToTime.d.ts +2 -0
- package/cjs/Calendar/TimeDropdown/utils/scrollToTime.js +28 -0
- package/cjs/Calendar/hooks/index.d.ts +3 -0
- package/cjs/Calendar/hooks/index.js +24 -0
- package/cjs/Calendar/hooks/useCalendar.d.ts +2 -0
- package/cjs/Calendar/hooks/useCalendar.js +10 -0
- package/cjs/Calendar/{useCalendarDate.d.ts → hooks/useCalendarDate.d.ts} +1 -2
- package/cjs/Calendar/{useCalendarDate.js → hooks/useCalendarDate.js} +8 -8
- package/cjs/Calendar/hooks/useCalendarState.d.ts +22 -0
- package/cjs/Calendar/hooks/useCalendarState.js +60 -0
- package/cjs/Calendar/index.d.ts +2 -4
- package/cjs/Calendar/index.js +2 -4
- package/cjs/Calendar/types.d.ts +19 -0
- package/cjs/Calendar/types.js +4 -0
- package/cjs/Calendar/{utils.js → utils/getAriaLabel.js} +1 -1
- package/cjs/Calendar/utils/index.d.ts +2 -0
- package/cjs/Calendar/utils/index.js +9 -0
- 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 +38 -4
- package/cjs/CustomProvider/CustomProvider.js +20 -6
- package/cjs/DateInput/DateField.js +2 -2
- package/cjs/DateInput/DateInput.js +17 -6
- package/cjs/DateInput/hooks/useDateInputState.js +1 -1
- package/cjs/DatePicker/DatePicker.d.ts +6 -2
- package/cjs/DatePicker/DatePicker.js +58 -67
- package/cjs/DatePicker/utils.js +1 -1
- package/cjs/DateRangeInput/DateRangeInput.js +16 -5
- package/cjs/DateRangePicker/Calendar.d.ts +4 -5
- package/cjs/DateRangePicker/Calendar.js +18 -44
- package/cjs/DateRangePicker/DateRangePicker.d.ts +21 -4
- package/cjs/DateRangePicker/DateRangePicker.js +98 -72
- package/cjs/DateRangePicker/DateRangePickerProvider.d.ts +10 -0
- package/cjs/DateRangePicker/{DateRangePickerContext.js → DateRangePickerProvider.js} +3 -3
- package/cjs/DateRangePicker/hooks/index.d.ts +3 -0
- package/cjs/DateRangePicker/hooks/index.js +11 -0
- package/cjs/DateRangePicker/hooks/useCalendarHandlers.d.ts +17 -0
- package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +43 -0
- package/cjs/DateRangePicker/hooks/useDateDisabled.d.ts +1 -1
- package/cjs/DateRangePicker/hooks/useDateDisabled.js +1 -0
- package/cjs/DateRangePicker/hooks/useDateRangePicker.d.ts +2 -0
- package/cjs/DateRangePicker/hooks/useDateRangePicker.js +10 -0
- package/cjs/DateRangePicker/utils.js +1 -1
- 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/FormHelpText/FormHelpText.js +2 -2
- package/cjs/IconButton/IconButton.d.ts +1 -1
- package/cjs/InlineEdit/renderChildren.d.ts +1 -1
- package/cjs/InlineEdit/renderChildren.js +13 -4
- package/cjs/InlineEdit/useFocusEvent.d.ts +2 -2
- package/cjs/InlineEdit/useFocusEvent.js +9 -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/TimePicker/TimePicker.d.ts +81 -0
- package/cjs/TimePicker/TimePicker.js +31 -0
- package/cjs/TimePicker/index.d.ts +3 -0
- package/cjs/TimePicker/index.js +8 -0
- package/cjs/TimeRangePicker/TimeRangePicker.d.ts +77 -0
- package/cjs/TimeRangePicker/TimeRangePicker.js +23 -0
- package/cjs/TimeRangePicker/index.d.ts +3 -0
- package/cjs/TimeRangePicker/index.js +8 -0
- package/cjs/index.d.ts +4 -0
- package/cjs/index.js +6 -1
- package/cjs/internals/Picker/ListItemGroup.js +1 -1
- package/cjs/internals/Picker/Listbox.js +4 -2
- 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/useCustom.js +2 -2
- package/cjs/internals/hooks/useToggleCaret.d.ts +1 -1
- package/cjs/internals/utils/date/extractTimeFormat.d.ts +4 -0
- package/cjs/internals/utils/date/extractTimeFormat.js +12 -0
- package/cjs/internals/utils/date/formatCheck.d.ts +4 -0
- package/cjs/internals/utils/date/formatCheck.js +8 -1
- package/cjs/internals/utils/date/index.d.ts +4 -2
- package/cjs/internals/utils/date/index.js +72 -7
- package/cjs/internals/utils/date/useDateMode.d.ts +16 -0
- package/cjs/internals/utils/date/useDateMode.js +57 -0
- package/cjs/internals/utils/index.d.ts +0 -1
- package/cjs/internals/utils/index.js +1 -4
- package/cjs/locales/ar_EG.d.ts +10 -0
- package/cjs/locales/ar_EG.js +8 -4
- package/cjs/locales/ca_ES.d.ts +10 -0
- package/cjs/locales/ca_ES.js +8 -4
- package/cjs/locales/cs_CZ.d.ts +10 -0
- package/cjs/locales/cs_CZ.js +8 -4
- package/cjs/locales/da_DK.d.ts +10 -0
- package/cjs/locales/da_DK.js +8 -4
- package/cjs/locales/de_DE.d.ts +10 -0
- package/cjs/locales/de_DE.js +8 -4
- package/cjs/locales/en_GB.d.ts +130 -2
- package/cjs/locales/en_GB.js +85 -2
- package/cjs/locales/en_US.d.ts +10 -0
- package/cjs/locales/en_US.js +8 -4
- package/cjs/locales/es_AR.d.ts +10 -0
- package/cjs/locales/es_AR.js +8 -4
- package/cjs/locales/es_ES.d.ts +10 -0
- package/cjs/locales/es_ES.js +8 -4
- package/cjs/locales/fa_IR.d.ts +10 -0
- package/cjs/locales/fa_IR.js +8 -4
- package/cjs/locales/fi_FI.d.ts +10 -0
- package/cjs/locales/fi_FI.js +8 -4
- package/cjs/locales/fr_FR.d.ts +10 -0
- package/cjs/locales/fr_FR.js +8 -4
- package/cjs/locales/hu_HU.d.ts +12 -0
- package/cjs/locales/hu_HU.js +11 -5
- package/cjs/locales/index.d.ts +1 -1
- package/cjs/locales/it_IT.d.ts +10 -0
- package/cjs/locales/it_IT.js +8 -4
- package/cjs/locales/ja_JP.d.ts +10 -0
- package/cjs/locales/ja_JP.js +8 -4
- package/cjs/locales/kk_KZ.d.ts +10 -0
- package/cjs/locales/kk_KZ.js +8 -4
- package/cjs/locales/ko_KR.d.ts +10 -0
- package/cjs/locales/ko_KR.js +8 -4
- package/cjs/locales/ne_NP.d.ts +10 -0
- package/cjs/locales/ne_NP.js +8 -4
- package/cjs/locales/nl_NL.d.ts +10 -0
- package/cjs/locales/nl_NL.js +8 -4
- package/cjs/locales/pt_BR.d.ts +10 -0
- package/cjs/locales/pt_BR.js +8 -4
- package/cjs/locales/ru_RU.d.ts +10 -0
- package/cjs/locales/ru_RU.js +8 -4
- package/cjs/locales/sv_SE.d.ts +10 -0
- package/cjs/locales/sv_SE.js +8 -4
- package/cjs/locales/tr_TR.d.ts +10 -0
- package/cjs/locales/tr_TR.js +8 -4
- package/cjs/locales/zh_CN.d.ts +10 -0
- package/cjs/locales/zh_CN.js +8 -4
- package/cjs/locales/zh_TW.d.ts +10 -0
- package/cjs/locales/zh_TW.js +8 -4
- package/dist/rsuite-no-reset-rtl.css +116 -60
- 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 +116 -60
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +116 -60
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +116 -60
- package/dist/rsuite.js +822 -5375
- 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/Calendar.d.ts +1 -1
- package/esm/Calendar/Calendar.js +21 -23
- package/esm/Calendar/CalendarBody.js +9 -9
- package/esm/Calendar/CalendarContainer.d.ts +10 -2
- package/esm/Calendar/CalendarContainer.js +42 -70
- package/esm/Calendar/CalendarHeader.d.ts +0 -2
- package/esm/Calendar/CalendarHeader.js +29 -47
- package/esm/Calendar/{CalendarContext.d.ts → CalendarProvider.d.ts} +3 -22
- package/esm/Calendar/CalendarProvider.js +9 -0
- package/esm/Calendar/Grid/Grid.d.ts +6 -0
- package/esm/Calendar/{Table.js → Grid/Grid.js} +11 -17
- package/{cjs/Calendar/TableCell.d.ts → esm/Calendar/Grid/GridCell.d.ts} +4 -4
- package/esm/Calendar/{TableCell.js → Grid/GridCell.js} +13 -13
- package/esm/Calendar/Grid/GridHeaderRow.d.ts +4 -0
- package/esm/Calendar/{TableHeaderRow.js → Grid/GridHeaderRow.js} +11 -11
- package/esm/Calendar/Grid/GridRow.d.ts +7 -0
- package/esm/Calendar/{TableRow.js → Grid/GridRow.js} +21 -21
- package/esm/Calendar/Grid/index.d.ts +2 -0
- package/esm/Calendar/Grid/index.js +3 -0
- package/esm/Calendar/MonthDropdown/MonthDropdown.d.ts +11 -0
- package/esm/Calendar/{MonthDropdown.js → MonthDropdown/MonthDropdown.js} +18 -23
- package/esm/Calendar/{MonthDropdownItem.d.ts → MonthDropdown/MonthDropdownItem.d.ts} +1 -1
- package/esm/Calendar/{MonthDropdownItem.js → MonthDropdown/MonthDropdownItem.js} +12 -12
- package/esm/Calendar/MonthDropdown/index.d.ts +2 -0
- package/esm/Calendar/MonthDropdown/index.js +3 -0
- package/esm/Calendar/TimeDropdown/TimeColumn.d.ts +8 -0
- package/esm/Calendar/TimeDropdown/TimeColumn.js +22 -0
- package/{cjs/Calendar → esm/Calendar/TimeDropdown}/TimeDropdown.d.ts +2 -25
- package/esm/Calendar/TimeDropdown/TimeDropdown.js +161 -0
- package/esm/Calendar/TimeDropdown/index.d.ts +2 -0
- package/esm/Calendar/TimeDropdown/index.js +3 -0
- package/esm/Calendar/TimeDropdown/utils/formatWithLeadingZero.d.ts +1 -0
- package/esm/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +4 -0
- package/esm/Calendar/TimeDropdown/utils/getClockTime.d.ts +11 -0
- package/esm/Calendar/TimeDropdown/utils/getClockTime.js +39 -0
- package/esm/Calendar/TimeDropdown/utils/getTimeLimits.d.ts +11 -0
- package/esm/Calendar/TimeDropdown/utils/getTimeLimits.js +20 -0
- package/esm/Calendar/TimeDropdown/utils/index.d.ts +4 -0
- package/esm/Calendar/TimeDropdown/utils/index.js +5 -0
- package/esm/Calendar/TimeDropdown/utils/scrollToTime.d.ts +2 -0
- package/esm/Calendar/TimeDropdown/utils/scrollToTime.js +23 -0
- package/esm/Calendar/hooks/index.d.ts +3 -0
- package/esm/Calendar/hooks/index.js +4 -0
- package/esm/Calendar/hooks/useCalendar.d.ts +2 -0
- package/esm/Calendar/hooks/useCalendar.js +6 -0
- package/esm/Calendar/{useCalendarDate.d.ts → hooks/useCalendarDate.d.ts} +1 -2
- package/esm/Calendar/{useCalendarDate.js → hooks/useCalendarDate.js} +7 -7
- package/esm/Calendar/hooks/useCalendarState.d.ts +22 -0
- package/esm/Calendar/hooks/useCalendarState.js +56 -0
- package/esm/Calendar/index.d.ts +2 -4
- package/esm/Calendar/index.js +2 -3
- package/esm/Calendar/types.d.ts +19 -0
- package/esm/Calendar/types.js +2 -0
- package/esm/Calendar/{utils.js → utils/getAriaLabel.js} +1 -1
- package/esm/Calendar/utils/index.d.ts +2 -0
- package/esm/Calendar/utils/index.js +3 -0
- 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 +38 -4
- package/esm/CustomProvider/CustomProvider.js +20 -6
- package/esm/DateInput/DateField.js +2 -2
- package/esm/DateInput/DateInput.js +17 -6
- package/esm/DateInput/hooks/useDateInputState.js +1 -1
- package/esm/DatePicker/DatePicker.d.ts +6 -2
- package/esm/DatePicker/DatePicker.js +30 -38
- package/esm/DatePicker/hooks/useFocus.js +1 -1
- package/esm/DatePicker/utils.js +2 -2
- package/esm/DateRangeInput/DateRangeInput.js +16 -5
- package/esm/DateRangePicker/Calendar.d.ts +4 -5
- package/esm/DateRangePicker/Calendar.js +19 -47
- package/esm/DateRangePicker/DateRangePicker.d.ts +21 -4
- package/esm/DateRangePicker/DateRangePicker.js +99 -73
- package/esm/DateRangePicker/DateRangePickerProvider.d.ts +10 -0
- package/esm/DateRangePicker/{DateRangePickerContext.js → DateRangePickerProvider.js} +2 -2
- package/esm/DateRangePicker/hooks/index.d.ts +3 -0
- package/esm/DateRangePicker/hooks/index.js +4 -0
- package/esm/DateRangePicker/hooks/useCalendarHandlers.d.ts +17 -0
- package/esm/DateRangePicker/hooks/useCalendarHandlers.js +38 -0
- package/esm/DateRangePicker/hooks/useDateDisabled.d.ts +1 -1
- package/esm/DateRangePicker/hooks/useDateDisabled.js +1 -1
- package/esm/DateRangePicker/hooks/useDateRangePicker.d.ts +2 -0
- package/esm/DateRangePicker/hooks/useDateRangePicker.js +6 -0
- package/esm/DateRangePicker/utils.js +2 -2
- 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/FormHelpText/FormHelpText.js +2 -2
- package/esm/IconButton/IconButton.d.ts +1 -1
- package/esm/InlineEdit/renderChildren.d.ts +1 -1
- package/esm/InlineEdit/renderChildren.js +13 -4
- package/esm/InlineEdit/useFocusEvent.d.ts +2 -2
- package/esm/InlineEdit/useFocusEvent.js +9 -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/TimePicker/TimePicker.d.ts +81 -0
- package/esm/TimePicker/TimePicker.js +24 -0
- package/esm/TimePicker/index.d.ts +3 -0
- package/esm/TimePicker/index.js +3 -0
- package/esm/TimeRangePicker/TimeRangePicker.d.ts +77 -0
- package/esm/TimeRangePicker/TimeRangePicker.js +18 -0
- package/esm/TimeRangePicker/index.d.ts +3 -0
- package/esm/TimeRangePicker/index.js +3 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +2 -0
- package/esm/internals/Picker/ListItemGroup.js +2 -2
- package/esm/internals/Picker/Listbox.js +4 -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/useCustom.js +1 -1
- package/esm/internals/hooks/useToggleCaret.d.ts +1 -1
- package/esm/internals/utils/date/extractTimeFormat.d.ts +4 -0
- package/esm/internals/utils/date/extractTimeFormat.js +8 -0
- package/esm/internals/utils/date/formatCheck.d.ts +4 -0
- package/esm/internals/utils/date/formatCheck.js +7 -0
- package/esm/internals/utils/date/index.d.ts +4 -2
- package/esm/internals/utils/date/index.js +4 -2
- package/esm/internals/utils/date/useDateMode.d.ts +16 -0
- package/esm/internals/utils/date/useDateMode.js +54 -0
- package/esm/internals/utils/index.d.ts +0 -1
- package/esm/internals/utils/index.js +0 -1
- package/esm/locales/ar_EG.d.ts +10 -0
- package/esm/locales/ar_EG.js +8 -4
- package/esm/locales/ca_ES.d.ts +10 -0
- package/esm/locales/ca_ES.js +8 -4
- package/esm/locales/cs_CZ.d.ts +10 -0
- package/esm/locales/cs_CZ.js +8 -4
- package/esm/locales/da_DK.d.ts +10 -0
- package/esm/locales/da_DK.js +8 -4
- package/esm/locales/de_DE.d.ts +10 -0
- package/esm/locales/de_DE.js +8 -4
- package/esm/locales/en_GB.d.ts +130 -2
- package/esm/locales/en_GB.js +85 -2
- package/esm/locales/en_US.d.ts +10 -0
- package/esm/locales/en_US.js +8 -4
- package/esm/locales/es_AR.d.ts +10 -0
- package/esm/locales/es_AR.js +8 -4
- package/esm/locales/es_ES.d.ts +10 -0
- package/esm/locales/es_ES.js +8 -4
- package/esm/locales/fa_IR.d.ts +10 -0
- package/esm/locales/fa_IR.js +8 -4
- package/esm/locales/fi_FI.d.ts +10 -0
- package/esm/locales/fi_FI.js +8 -4
- package/esm/locales/fr_FR.d.ts +10 -0
- package/esm/locales/fr_FR.js +8 -4
- package/esm/locales/hu_HU.d.ts +12 -0
- package/esm/locales/hu_HU.js +11 -5
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/it_IT.d.ts +10 -0
- package/esm/locales/it_IT.js +8 -4
- package/esm/locales/ja_JP.d.ts +10 -0
- package/esm/locales/ja_JP.js +8 -4
- package/esm/locales/kk_KZ.d.ts +10 -0
- package/esm/locales/kk_KZ.js +8 -4
- package/esm/locales/ko_KR.d.ts +10 -0
- package/esm/locales/ko_KR.js +8 -4
- package/esm/locales/ne_NP.d.ts +10 -0
- package/esm/locales/ne_NP.js +8 -4
- package/esm/locales/nl_NL.d.ts +10 -0
- package/esm/locales/nl_NL.js +8 -4
- package/esm/locales/pt_BR.d.ts +10 -0
- package/esm/locales/pt_BR.js +8 -4
- package/esm/locales/ru_RU.d.ts +10 -0
- package/esm/locales/ru_RU.js +8 -4
- package/esm/locales/sv_SE.d.ts +10 -0
- package/esm/locales/sv_SE.js +8 -4
- package/esm/locales/tr_TR.d.ts +10 -0
- package/esm/locales/tr_TR.js +8 -4
- package/esm/locales/zh_CN.d.ts +10 -0
- package/esm/locales/zh_CN.js +8 -4
- package/esm/locales/zh_TW.d.ts +10 -0
- package/esm/locales/zh_TW.js +8 -4
- package/internals/Picker/styles/index.less +17 -0
- package/internals/Picker/styles/mixin.less +0 -1
- package/internals/ScrollView/styles/index.less +1 -5
- package/package.json +2 -2
- package/styles/color-modes/dark.less +5 -0
- package/styles/color-modes/high-contrast.less +5 -0
- package/styles/color-modes/light.less +5 -0
- package/styles/common.less +3 -3
- package/styles/variables.less +3 -3
- package/cjs/Calendar/CalendarContext.js +0 -22
- package/cjs/Calendar/MonthDropdown.d.ts +0 -27
- package/cjs/Calendar/Table.d.ts +0 -6
- package/cjs/Calendar/TableHeaderRow.d.ts +0 -4
- package/cjs/Calendar/TableRow.d.ts +0 -7
- package/cjs/Calendar/useCalendarState.d.ts +0 -11
- package/cjs/Calendar/useCalendarState.js +0 -32
- package/cjs/DateRangePicker/DateRangePickerContext.d.ts +0 -10
- package/cjs/internals/utils/date/getReversedTimeMeridian.d.ts +0 -8
- package/cjs/internals/utils/date/getReversedTimeMeridian.js +0 -21
- package/cjs/internals/utils/scrollTopAnimation.d.ts +0 -5
- package/cjs/internals/utils/scrollTopAnimation.js +0 -32
- package/cjs/locales/default.d.ts +0 -120
- package/cjs/locales/default.js +0 -87
- package/esm/Calendar/CalendarContext.js +0 -17
- package/esm/Calendar/MonthDropdown.d.ts +0 -27
- package/esm/Calendar/Table.d.ts +0 -6
- package/esm/Calendar/TableHeaderRow.d.ts +0 -4
- package/esm/Calendar/TableRow.d.ts +0 -7
- package/esm/Calendar/TimeDropdown.js +0 -192
- package/esm/Calendar/useCalendarState.d.ts +0 -11
- package/esm/Calendar/useCalendarState.js +0 -28
- package/esm/DateRangePicker/DateRangePickerContext.d.ts +0 -10
- package/esm/internals/utils/date/getReversedTimeMeridian.d.ts +0 -8
- package/esm/internals/utils/date/getReversedTimeMeridian.js +0 -17
- package/esm/internals/utils/scrollTopAnimation.d.ts +0 -5
- package/esm/internals/utils/scrollTopAnimation.js +0 -27
- package/esm/locales/default.d.ts +0 -120
- package/esm/locales/default.js +0 -82
- package/locales/default/package.json +0 -7
- /package/cjs/Calendar/{utils.d.ts → utils/getAriaLabel.d.ts} +0 -0
- /package/esm/Calendar/{utils.d.ts → utils/getAriaLabel.d.ts} +0 -0
|
@@ -4,12 +4,13 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
var _excluded = ["onBlur"];
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import Input from "../Input/index.js";
|
|
7
|
+
import { createChainedFunction } from "../internals/utils/index.js";
|
|
7
8
|
export function defaultRenderInput(props, ref) {
|
|
8
9
|
return /*#__PURE__*/React.createElement(Input, _extends({
|
|
9
10
|
ref: ref
|
|
10
11
|
}, props));
|
|
11
12
|
}
|
|
12
|
-
var pickers = ['DatePicker', 'DateRangePicker', 'InputPicker', 'TagPicker', 'Cascader', 'MultiCascader', 'SelectPicker', 'CheckPicker', 'CheckTreePicker', 'TreePicker'];
|
|
13
|
+
var pickers = ['DatePicker', 'DateRangePicker', 'TimePicker', 'TimeRangePicker', 'InputPicker', 'TagPicker', 'Cascader', 'MultiCascader', 'SelectPicker', 'CheckPicker', 'CheckTreePicker', 'TreePicker'];
|
|
13
14
|
function getDisplayName(Component) {
|
|
14
15
|
var _Component$type;
|
|
15
16
|
if (typeof (Component === null || Component === void 0 ? void 0 : Component.type) === 'string') {
|
|
@@ -24,10 +25,18 @@ export function renderChildren(children, props, ref) {
|
|
|
24
25
|
if (pickers.includes(getDisplayName(children))) {
|
|
25
26
|
var onBlur = props.onBlur,
|
|
26
27
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
var _children$props = children.props,
|
|
29
|
+
onExit = _children$props.onExit,
|
|
30
|
+
onClean = _children$props.onClean;
|
|
29
31
|
return /*#__PURE__*/React.cloneElement(children, _extends({}, rest, {
|
|
30
|
-
|
|
32
|
+
// Pass onBlur to the child component to automatically save or cancel after the focus event is processed.
|
|
33
|
+
// Special handling in the Picker component, call onBlur when onExit and onClean
|
|
34
|
+
onExit: createChainedFunction(function () {
|
|
35
|
+
return onBlur === null || onBlur === void 0 ? void 0 : onBlur();
|
|
36
|
+
}, onExit),
|
|
37
|
+
onClean: createChainedFunction(function () {
|
|
38
|
+
return onBlur === null || onBlur === void 0 ? void 0 : onBlur();
|
|
39
|
+
}, onClean),
|
|
31
40
|
ref: ref
|
|
32
41
|
}));
|
|
33
42
|
}
|
|
@@ -3,8 +3,8 @@ import { PickerHandle } from '../internals/Picker/types';
|
|
|
3
3
|
interface FocusEventProps {
|
|
4
4
|
isEditing: boolean;
|
|
5
5
|
stateOnBlur?: 'save' | 'cancel';
|
|
6
|
-
onSave?: (event?: React.FocusEvent) => void;
|
|
7
|
-
onCancel?: (event?: React.FocusEvent) => void;
|
|
6
|
+
onSave?: (event?: React.FocusEvent | null) => void;
|
|
7
|
+
onCancel?: (event?: React.FocusEvent | null) => void;
|
|
8
8
|
}
|
|
9
9
|
declare const useFocusEvent: ({ isEditing, stateOnBlur, onSave, onCancel }: FocusEventProps) => {
|
|
10
10
|
target: import("react").RefObject<HTMLInputElement | PickerHandle>;
|
|
@@ -15,12 +15,17 @@ var useFocusEvent = function useFocusEvent(_ref) {
|
|
|
15
15
|
var focus = function focus() {
|
|
16
16
|
if (isPicker) {
|
|
17
17
|
setTimeout(function () {
|
|
18
|
-
var
|
|
19
|
-
|
|
18
|
+
var _picker$target, _picker$target$focus, _picker$open;
|
|
19
|
+
var picker = ref.current;
|
|
20
|
+
// Auto focus the search input
|
|
21
|
+
picker === null || picker === void 0 ? void 0 : (_picker$target = picker.target) === null || _picker$target === void 0 ? void 0 : (_picker$target$focus = _picker$target.focus) === null || _picker$target$focus === void 0 ? void 0 : _picker$target$focus.call(_picker$target);
|
|
22
|
+
|
|
23
|
+
// Open the picker
|
|
24
|
+
picker === null || picker === void 0 ? void 0 : (_picker$open = picker.open) === null || _picker$open === void 0 ? void 0 : _picker$open.call(picker);
|
|
20
25
|
}, 100);
|
|
21
26
|
} else {
|
|
22
|
-
var _ref$
|
|
23
|
-
(_ref$
|
|
27
|
+
var _ref$current2, _ref$current2$focus;
|
|
28
|
+
(_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : (_ref$current2$focus = _ref$current2.focus) === null || _ref$current2$focus === void 0 ? void 0 : _ref$current2$focus.call(_ref$current2);
|
|
24
29
|
}
|
|
25
30
|
};
|
|
26
31
|
var handleBlur = useEventCallback(function (event) {
|
|
@@ -4,8 +4,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "classPrefix", "className", "cascade", "cascadeData", "cascadePaths", "childrenKey", "disabledItemValues", "columnWidth", "columnHeight", "uncheckableItemValues", "value", "valueKey", "labelKey", "style", "renderTreeNode", "renderColumn", "onCheck", "onSelect"];
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import SpinnerIcon from '@rsuite/icons/legacy/Spinner';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
8
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
9
9
|
import { useClassNames, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
10
10
|
import { shallowEqual } from "../internals/utils/index.js";
|
|
11
11
|
import { ListCheckItem, useCombobox } from "../internals/Picker/index.js";
|
|
@@ -84,7 +84,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
84
84
|
|
|
85
85
|
// Use `value` in keys when If `value` is string or number
|
|
86
86
|
var onlyKey = typeof value === 'number' || typeof value === 'string' ? value : index;
|
|
87
|
-
var Icon = node.loading ? SpinnerIcon : rtl ?
|
|
87
|
+
var Icon = node.loading ? SpinnerIcon : rtl ? PagePreviousIcon : PageNextIcon;
|
|
88
88
|
var active = value.some(function (v) {
|
|
89
89
|
return v === nodeValue;
|
|
90
90
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface NavDropdownItemProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Active the current option */
|
|
6
6
|
active?: boolean;
|
|
@@ -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 NavDropdownMenuProps<T = any> extends StandardProps {
|
|
5
5
|
/** Define the title as a submenu */
|
|
6
6
|
title?: React.ReactNode;
|
|
@@ -16,8 +16,8 @@ import MenuItem from "../internals/Menu/MenuItem.js";
|
|
|
16
16
|
import { useClassNames, useCustom } from "../internals/hooks/index.js";
|
|
17
17
|
import { mergeRefs } from "../internals/utils/index.js";
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
19
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
20
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
21
21
|
import NavContext from "./NavContext.js";
|
|
22
22
|
import { deprecatePropType, oneOf } from "../internals/propTypes/index.js";
|
|
23
23
|
/**
|
|
@@ -60,7 +60,7 @@ var NavDropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
60
60
|
className = _omit.className,
|
|
61
61
|
disabled = _omit.disabled,
|
|
62
62
|
menuProps = _objectWithoutPropertiesLoose(_omit, _excluded2);
|
|
63
|
-
var Icon = rtl ?
|
|
63
|
+
var Icon = rtl ? PagePreviousIcon : PageNextIcon;
|
|
64
64
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
65
65
|
openMenuOn: ['mouseover', 'click'],
|
|
66
66
|
renderMenuButton: function renderMenuButton(_ref, buttonRef) {
|
package/esm/Nav/NavItem.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface NavItemProps<T = string | number> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Activation status */
|
|
6
6
|
active?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypeAttributes, WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
import Button from '../Button';
|
|
5
5
|
import NavDropdownItem from '../Nav/NavDropdownItem';
|
|
6
6
|
import NavDropdownMenu from '../Nav/NavDropdownMenu';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface NavbarDropdownItemProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Active the current option */
|
|
6
6
|
active?: boolean;
|
|
@@ -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 NavbarDropdownMenuProps<T = any> extends StandardProps {
|
|
5
5
|
/** Define the title as a submenu */
|
|
6
6
|
title?: React.ReactNode;
|
|
@@ -11,8 +11,8 @@ import React, { useContext } from 'react';
|
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import omit from 'lodash/omit';
|
|
13
13
|
import isNil from 'lodash/isNil';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
15
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
16
16
|
import { mergeRefs } from "../internals/utils/index.js";
|
|
17
17
|
import { useClassNames, useCustom } from "../internals/hooks/index.js";
|
|
18
18
|
import { NavbarContext } from '.';
|
|
@@ -66,7 +66,7 @@ var NavbarDropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
66
66
|
className = _omit.className,
|
|
67
67
|
disabled = _omit.disabled,
|
|
68
68
|
menuProps = _objectWithoutPropertiesLoose(_omit, _excluded2);
|
|
69
|
-
var Icon = rtl ?
|
|
69
|
+
var Icon = rtl ? PagePreviousIcon : PageNextIcon;
|
|
70
70
|
return /*#__PURE__*/React.createElement(Disclosure, {
|
|
71
71
|
hideOnClickOutside: true,
|
|
72
72
|
trigger: ['click', 'hover'],
|
|
@@ -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, WithAsProps } from '../internals/types';
|
|
4
4
|
export interface NavbarItemProps<T = string | number> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Activation status */
|
|
@@ -7,19 +7,19 @@ var _excluded = ["as", "className", "classPrefix", "disabled", "locale", "active
|
|
|
7
7
|
_excluded2 = ["eventKey", "disabled"];
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
10
|
+
import MoreIcon from '@rsuite/icons/More';
|
|
11
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
12
|
+
import PageTopIcon from '@rsuite/icons/PageTop';
|
|
13
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
14
|
+
import PageEndIcon from '@rsuite/icons/PageEnd';
|
|
15
15
|
import PaginationButton from "./PaginationButton.js";
|
|
16
16
|
import { useClassNames, useCustom } from "../internals/hooks/index.js";
|
|
17
17
|
var PAGINATION_ICONS = {
|
|
18
|
-
more: /*#__PURE__*/React.createElement(
|
|
19
|
-
prev: /*#__PURE__*/React.createElement(
|
|
20
|
-
next: /*#__PURE__*/React.createElement(
|
|
21
|
-
first: /*#__PURE__*/React.createElement(
|
|
22
|
-
last: /*#__PURE__*/React.createElement(
|
|
18
|
+
more: /*#__PURE__*/React.createElement(MoreIcon, null),
|
|
19
|
+
prev: /*#__PURE__*/React.createElement(PagePreviousIcon, null),
|
|
20
|
+
next: /*#__PURE__*/React.createElement(PageNextIcon, null),
|
|
21
|
+
first: /*#__PURE__*/React.createElement(PageTopIcon, null),
|
|
22
|
+
last: /*#__PURE__*/React.createElement(PageEndIcon, null)
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Pagination component for displaying page numbers.
|
|
@@ -5,7 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
var _templateObject;
|
|
6
6
|
var _excluded = ["classPrefix", "expanded", "id", "className", "controlId", "children", "disabled", "caretAs"];
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
8
|
+
import Icon from '@rsuite/icons/Icon';
|
|
9
9
|
import AngleDownIcon from '@rsuite/icons/legacy/AngleDown';
|
|
10
10
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
11
11
|
var AccordionButton = function AccordionButton(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypeAttributes, WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface SidenavDropdownProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
5
5
|
/** Define the title as a submenu */
|
|
6
6
|
title?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface SidenavDropdownItemProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Active the current option */
|
|
6
6
|
active?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface SidenavDropdownMenuProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLLIElement>, 'title' | 'onSelect'> {
|
|
5
5
|
/** Primary content */
|
|
6
6
|
children?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypeAttributes, WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
import Button from '../Button';
|
|
5
5
|
import NavDropdownItem from '../Nav/NavDropdownItem';
|
|
6
6
|
import NavDropdownMenu from '../Nav/NavDropdownMenu';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface SidenavDropdownItemProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Active the current option */
|
|
6
6
|
active?: boolean;
|
|
@@ -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 SidenavDropdownMenuProps<T = any> extends StandardProps {
|
|
5
5
|
/** Define the title as a submenu */
|
|
6
6
|
title?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
-
import { IconProps } from '@rsuite/icons/
|
|
3
|
+
import { IconProps } from '@rsuite/icons/Icon';
|
|
4
4
|
export interface SidenavItemProps<T = any> extends WithAsProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
5
5
|
/** Activation status */
|
|
6
6
|
active?: boolean;
|
|
@@ -4,10 +4,10 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "expanded", "className", "classPrefix", "onToggle"];
|
|
5
5
|
import React, { useContext } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
+
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
8
|
+
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
7
9
|
import IconButton from "../IconButton/index.js";
|
|
8
10
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
9
|
-
import AngleLeft from '@rsuite/icons/legacy/AngleLeft';
|
|
10
|
-
import AngleRight from '@rsuite/icons/legacy/AngleRight';
|
|
11
11
|
import { deprecatePropType } from "../internals/propTypes/index.js";
|
|
12
12
|
import { SidenavContext } from "./Sidenav.js";
|
|
13
13
|
var SidenavToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -33,7 +33,7 @@ var SidenavToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
33
33
|
var classes = merge(className, withClassPrefix({
|
|
34
34
|
collapsed: !expanded
|
|
35
35
|
}));
|
|
36
|
-
var Icon = expanded ?
|
|
36
|
+
var Icon = expanded ? PagePreviousIcon : PageNextIcon;
|
|
37
37
|
var handleToggle = function handleToggle(event) {
|
|
38
38
|
onToggle === null || onToggle === void 0 ? void 0 : onToggle(!expanded, event);
|
|
39
39
|
};
|
package/esm/Steps/StepItem.d.ts
CHANGED
|
@@ -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 { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
4
4
|
export interface StepItemProps extends WithAsProps {
|
|
5
5
|
/** The width of each item. */
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RangeType } from '../DatePicker';
|
|
3
|
+
import type { FormControlBaseProps, PickerBaseProps } from '../internals/types';
|
|
4
|
+
import type { PickerComponent } from '../internals/Picker/types';
|
|
5
|
+
import type { DatePickerLocale } from '../locales';
|
|
6
|
+
export interface TimePickerProps extends PickerBaseProps<DatePickerLocale>, FormControlBaseProps<Date | null> {
|
|
7
|
+
/**
|
|
8
|
+
* Custom caret component
|
|
9
|
+
*/
|
|
10
|
+
caretAs?: React.ElementType | null;
|
|
11
|
+
/**
|
|
12
|
+
* Calendar panel default presentation date and time
|
|
13
|
+
*/
|
|
14
|
+
calendarDefaultDate?: Date;
|
|
15
|
+
/**
|
|
16
|
+
* Whether disabled the component
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Rendered as an input, the date can be entered via the keyboard
|
|
21
|
+
*/
|
|
22
|
+
editable?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Format date string
|
|
25
|
+
*/
|
|
26
|
+
format?: string;
|
|
27
|
+
/**
|
|
28
|
+
* A label displayed at the beginning of toggle button
|
|
29
|
+
*/
|
|
30
|
+
label?: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to display a loading state indicator
|
|
33
|
+
*/
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether plaintext the component
|
|
37
|
+
*/
|
|
38
|
+
plaintext?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether read only the component
|
|
41
|
+
*/
|
|
42
|
+
readOnly?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Meridiem format for 12-hour time
|
|
45
|
+
*/
|
|
46
|
+
showMeridiem?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Hide specific hour options
|
|
49
|
+
*/
|
|
50
|
+
hideHours?: (hour: number, date: Date) => boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Hide specific minute options
|
|
53
|
+
*/
|
|
54
|
+
hideMinutes?: (minute: number, date: Date) => boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Hide specific second options
|
|
57
|
+
*/
|
|
58
|
+
hideSeconds?: (second: number, date: Date) => boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Called when the option is selected
|
|
61
|
+
*/
|
|
62
|
+
onSelect?: (date: Date, event?: React.SyntheticEvent) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Called after clicking the OK button
|
|
65
|
+
*/
|
|
66
|
+
onOk?: (date: Date, event: React.SyntheticEvent) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Called after clicking the shortcut button
|
|
69
|
+
*/
|
|
70
|
+
onShortcutClick?: (range: RangeType<Date>, event: React.MouseEvent) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Called when clean
|
|
73
|
+
*/
|
|
74
|
+
onClean?: (event: React.MouseEvent) => void;
|
|
75
|
+
/**
|
|
76
|
+
* Custom rendering of the selected date.
|
|
77
|
+
*/
|
|
78
|
+
renderValue?: (value: Date, format: string) => string;
|
|
79
|
+
}
|
|
80
|
+
declare const TimePicker: PickerComponent<TimePickerProps>;
|
|
81
|
+
export default TimePicker;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import DatePicker from "../DatePicker/index.js";
|
|
5
|
+
import { useCustom } from "../internals/hooks/index.js";
|
|
6
|
+
var TimePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7
|
+
var _useCustom = useCustom('Calendar'),
|
|
8
|
+
locale = _useCustom.locale;
|
|
9
|
+
var defaultRanges = useMemo(function () {
|
|
10
|
+
return [{
|
|
11
|
+
label: locale.now,
|
|
12
|
+
value: function value() {
|
|
13
|
+
return new Date();
|
|
14
|
+
}
|
|
15
|
+
}];
|
|
16
|
+
}, [locale]);
|
|
17
|
+
return /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
18
|
+
ref: ref,
|
|
19
|
+
format: locale.shortTimeFormat,
|
|
20
|
+
ranges: defaultRanges
|
|
21
|
+
}, props));
|
|
22
|
+
});
|
|
23
|
+
TimePicker.displayName = 'TimePicker';
|
|
24
|
+
export default TimePicker;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RangeType, DateRange } from '../DateRangePicker';
|
|
3
|
+
import type { FormControlBaseProps, PickerBaseProps } from '../internals/types';
|
|
4
|
+
import type { PickerComponent } from '../internals/Picker/types';
|
|
5
|
+
import type { DatePickerLocale } from '../locales';
|
|
6
|
+
export interface TimeRangePickerProps extends PickerBaseProps<DatePickerLocale>, FormControlBaseProps<DateRange | null> {
|
|
7
|
+
/**
|
|
8
|
+
* Custom caret component
|
|
9
|
+
*/
|
|
10
|
+
caretAs?: React.ElementType | null;
|
|
11
|
+
/** Predefined date ranges */
|
|
12
|
+
ranges?: RangeType[];
|
|
13
|
+
/**
|
|
14
|
+
* Format of the date displayed in the input box
|
|
15
|
+
*/
|
|
16
|
+
format?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Rendered as an input, the date can be entered via the keyboard.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A label displayed at the beginning of toggle button
|
|
24
|
+
*/
|
|
25
|
+
label?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to display a loading state indicator
|
|
28
|
+
*/
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Meridiem format for 12-hour time
|
|
32
|
+
*/
|
|
33
|
+
showMeridiem?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to display the formatted date range at the header of the calendar
|
|
36
|
+
*/
|
|
37
|
+
showHeader?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The character that separates two dates
|
|
40
|
+
* @default ' ~ '
|
|
41
|
+
*/
|
|
42
|
+
character?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Hide specific hour options
|
|
45
|
+
*/
|
|
46
|
+
hideHours?: (hour: number, date: Date) => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Hide specific minute options
|
|
49
|
+
*/
|
|
50
|
+
hideMinutes?: (minute: number, date: Date) => boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Hide specific second options
|
|
53
|
+
*/
|
|
54
|
+
hideSeconds?: (second: number, date: Date) => boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Called after clicking the OK button
|
|
57
|
+
*/
|
|
58
|
+
onOk?: (date: DateRange, event: React.SyntheticEvent) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Called after clicking the shortcut button
|
|
61
|
+
*/
|
|
62
|
+
onShortcutClick?: (range: RangeType, event: React.MouseEvent) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Called when the value is cleared
|
|
65
|
+
*/
|
|
66
|
+
onClean?: (event: React.MouseEvent) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Custom rendering of the selected date range.
|
|
69
|
+
*/
|
|
70
|
+
renderValue?: (value: DateRange, format: string) => string;
|
|
71
|
+
/**
|
|
72
|
+
* Custom render for calendar title
|
|
73
|
+
*/
|
|
74
|
+
renderTitle?: (date: Date) => React.ReactNode;
|
|
75
|
+
}
|
|
76
|
+
declare const TimeRangePicker: PickerComponent<TimeRangePickerProps>;
|
|
77
|
+
export default TimeRangePicker;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useCustom } from "../internals/hooks/index.js";
|
|
5
|
+
import DateRangePicker from "../DateRangePicker/index.js";
|
|
6
|
+
var defaultRanges = [];
|
|
7
|
+
var TimeRangePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
8
|
+
var _useCustom = useCustom('Calendar'),
|
|
9
|
+
locale = _useCustom.locale;
|
|
10
|
+
return /*#__PURE__*/React.createElement(DateRangePicker, _extends({
|
|
11
|
+
ref: ref,
|
|
12
|
+
showHeader: false,
|
|
13
|
+
format: locale.shortTimeFormat,
|
|
14
|
+
ranges: defaultRanges
|
|
15
|
+
}, props));
|
|
16
|
+
});
|
|
17
|
+
TimeRangePicker.displayName = 'TimeRangePicker';
|
|
18
|
+
export default TimeRangePicker;
|
package/esm/index.d.ts
CHANGED
|
@@ -105,10 +105,14 @@ export { default as DateInput } from './DateInput';
|
|
|
105
105
|
export type { DateInputProps } from './DateInput';
|
|
106
106
|
export { default as DatePicker } from './DatePicker';
|
|
107
107
|
export type { DatePickerProps } from './DatePicker';
|
|
108
|
+
export { default as TimePicker } from './TimePicker';
|
|
109
|
+
export type { TimePickerProps } from './TimePicker';
|
|
108
110
|
export { default as DateRangeInput } from './DateRangeInput';
|
|
109
111
|
export type { DateRangeInputProps } from './DateRangeInput';
|
|
110
112
|
export { default as DateRangePicker } from './DateRangePicker';
|
|
111
113
|
export type { DateRangePickerProps } from './DateRangePicker';
|
|
114
|
+
export { default as TimeRangePicker } from './TimeRangePicker';
|
|
115
|
+
export type { TimeRangePickerProps } from './TimeRangePicker';
|
|
112
116
|
export { default as AutoComplete } from './AutoComplete';
|
|
113
117
|
export type { AutoCompleteProps } from './AutoComplete';
|
|
114
118
|
export { default as Uploader } from './Uploader';
|
package/esm/index.js
CHANGED
|
@@ -69,8 +69,10 @@ export { default as Cascader } from "./Cascader/index.js";
|
|
|
69
69
|
export { default as MultiCascader } from "./MultiCascader/index.js";
|
|
70
70
|
export { default as DateInput } from "./DateInput/index.js";
|
|
71
71
|
export { default as DatePicker } from "./DatePicker/index.js";
|
|
72
|
+
export { default as TimePicker } from "./TimePicker/index.js";
|
|
72
73
|
export { default as DateRangeInput } from "./DateRangeInput/index.js";
|
|
73
74
|
export { default as DateRangePicker } from "./DateRangePicker/index.js";
|
|
75
|
+
export { default as TimeRangePicker } from "./TimeRangePicker/index.js";
|
|
74
76
|
export { default as AutoComplete } from "./AutoComplete/index.js";
|
|
75
77
|
export { default as Uploader } from "./Uploader/index.js";
|
|
76
78
|
export { default as Slider } from "./Slider/index.js";
|
|
@@ -6,7 +6,7 @@ var _templateObject, _templateObject2;
|
|
|
6
6
|
var _excluded = ["as", "classPrefix", "children", "className"];
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useClassNames } from "../hooks/index.js";
|
|
9
|
-
import
|
|
9
|
+
import ArrowDownIcon from '@rsuite/icons/ArrowDown';
|
|
10
10
|
var ListItemGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
11
11
|
var _props$as = props.as,
|
|
12
12
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -28,7 +28,7 @@ var ListItemGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
28
28
|
}), /*#__PURE__*/React.createElement("div", {
|
|
29
29
|
className: prefix(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["title"]))),
|
|
30
30
|
tabIndex: -1
|
|
31
|
-
}, /*#__PURE__*/React.createElement("span", null, children), /*#__PURE__*/React.createElement(
|
|
31
|
+
}, /*#__PURE__*/React.createElement("span", null, children), /*#__PURE__*/React.createElement(ArrowDownIcon, {
|
|
32
32
|
"aria-hidden": true,
|
|
33
33
|
className: prefix(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["caret"])))
|
|
34
34
|
})));
|
|
@@ -69,7 +69,8 @@ var Listbox = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
69
69
|
var _useClassNames = useClassNames(classPrefix),
|
|
70
70
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
71
71
|
prefix = _useClassNames.prefix,
|
|
72
|
-
merge = _useClassNames.merge
|
|
72
|
+
merge = _useClassNames.merge,
|
|
73
|
+
rootPrefix = _useClassNames.rootPrefix;
|
|
73
74
|
var groupable = typeof groupBy !== 'undefined';
|
|
74
75
|
var classes = merge(className, withClassPrefix('items', {
|
|
75
76
|
grouped: groupable
|
|
@@ -230,7 +231,8 @@ var Listbox = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
230
231
|
height: height || maxHeight,
|
|
231
232
|
itemCount: rowCount,
|
|
232
233
|
itemData: filteredItems,
|
|
233
|
-
itemSize: getRowHeight.bind(_this, filteredItems)
|
|
234
|
+
itemSize: getRowHeight.bind(_this, filteredItems),
|
|
235
|
+
className: rootPrefix('virt-list')
|
|
234
236
|
}, listProps), renderItem);
|
|
235
237
|
}) : filteredItems.map(function (item, index) {
|
|
236
238
|
return renderItem({
|