niuma-ui 1.1.11 → 1.2.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/CHANGELOG.md +23 -17
- package/README.en.md +13 -10
- package/README.md +18 -11
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/RsAlert.css +111 -0
- package/dist/components/RsAlert.d.ts +32 -0
- package/dist/components/RsAlert.impl.js +83 -0
- package/dist/components/RsAlert.js +8 -0
- package/dist/components/RsAvatar.css +60 -0
- package/dist/components/RsAvatar.d.ts +30 -0
- package/dist/components/RsAvatar.impl.js +59 -0
- package/dist/components/RsAvatar.js +7 -0
- package/dist/components/RsBadge.css +41 -0
- package/dist/components/RsBadge.d.ts +18 -0
- package/dist/components/RsBadge.impl.js +13 -0
- package/dist/components/RsBadge.js +8 -0
- package/dist/components/RsBreadcrumb.css +37 -0
- package/dist/components/RsBreadcrumb.d.ts +11 -0
- package/dist/components/RsBreadcrumb.impl.js +26 -0
- package/dist/components/RsBreadcrumb.js +7 -0
- package/dist/components/RsBreadcrumbItems.d.ts +8 -0
- package/dist/components/RsBreadcrumbItems.impl.js +40 -0
- package/dist/components/RsBreadcrumbItems.js +5 -0
- package/dist/components/RsButton.css +298 -0
- package/dist/components/RsButton.d.ts +56 -0
- package/dist/components/RsButton.impl.js +244 -0
- package/dist/components/RsButton.js +8 -0
- package/dist/components/RsCalendarGrid.css +99 -0
- package/dist/components/RsCalendarGrid.d.ts +30 -0
- package/dist/components/RsCalendarGrid.impl.js +182 -0
- package/dist/components/RsCalendarGrid.js +8 -0
- package/dist/components/RsCard.css +282 -0
- package/dist/components/RsCard.d.ts +78 -0
- package/dist/components/RsCard.impl.js +104 -0
- package/dist/components/RsCard.js +7 -0
- package/dist/components/RsCheckbox.css +104 -0
- package/dist/components/RsCheckbox.d.ts +36 -0
- package/dist/components/RsCheckbox.impl.js +86 -0
- package/dist/components/RsCheckbox.js +7 -0
- package/dist/components/RsCodeBlock.css +102 -0
- package/dist/components/RsCodeBlock.d.ts +34 -0
- package/dist/components/RsCodeBlock.impl.js +173 -0
- package/dist/components/RsCodeBlock.js +8 -0
- package/dist/components/RsCodeEditor.css +214 -0
- package/dist/components/RsCodeEditor.d.ts +88 -0
- package/dist/components/RsCodeEditor.impl.js +308 -0
- package/dist/components/RsCodeEditor.js +8 -0
- package/dist/components/RsConfigProvider.css +7 -0
- package/dist/components/RsConfigProvider.d.ts +36 -0
- package/dist/components/RsConfigProvider.impl.js +49 -0
- package/dist/components/RsConfigProvider.js +8 -0
- package/dist/components/RsConfirmDialog.css +118 -0
- package/dist/components/RsConfirmDialog.d.ts +72 -0
- package/dist/components/RsConfirmDialog.impl.js +207 -0
- package/dist/components/RsConfirmDialog.js +7 -0
- package/dist/components/RsContainer.css +94 -0
- package/dist/components/RsContainer.d.ts +52 -0
- package/dist/components/RsContainer.impl.js +99 -0
- package/dist/components/RsContainer.js +8 -0
- package/dist/components/RsContextMenu.css +178 -0
- package/dist/components/RsContextMenu.d.ts +35 -0
- package/dist/components/RsContextMenu.impl.js +81 -0
- package/dist/components/RsContextMenu.js +7 -0
- package/dist/components/RsContextMenuItems.d.ts +11 -0
- package/dist/components/RsContextMenuItems.impl.js +90 -0
- package/dist/components/RsContextMenuItems.js +5 -0
- package/dist/components/RsDatePicker-1.css +157 -0
- package/dist/components/RsDatePicker.css +100 -0
- package/dist/components/RsDatePicker.d.ts +72 -0
- package/dist/components/RsDatePicker.impl.js +719 -0
- package/dist/components/RsDatePicker.js +10 -0
- package/dist/components/RsDateTimePicker.d.ts +50 -0
- package/dist/components/RsDateTimePicker.impl.js +70 -0
- package/dist/components/RsDateTimePicker.js +5 -0
- package/dist/components/RsDescriptions.css +86 -0
- package/dist/components/RsDescriptions.d.ts +34 -0
- package/dist/components/RsDescriptions.impl.js +69 -0
- package/dist/components/RsDescriptions.js +7 -0
- package/dist/components/RsDescriptionsItem.d.ts +21 -0
- package/dist/components/RsDescriptionsItem.impl.js +26 -0
- package/dist/components/RsDescriptionsItem.js +5 -0
- package/dist/components/RsDialog.css +298 -0
- package/dist/components/RsDialog.d.ts +143 -0
- package/dist/components/RsDialog.impl.js +410 -0
- package/dist/components/RsDialog.js +7 -0
- package/dist/components/RsDivider.css +51 -0
- package/dist/components/RsDivider.d.ts +20 -0
- package/dist/components/RsDivider.impl.js +31 -0
- package/dist/components/RsDivider.js +8 -0
- package/dist/components/RsDrawer.css +368 -0
- package/dist/components/RsDrawer.d.ts +104 -0
- package/dist/components/RsDrawer.impl.js +497 -0
- package/dist/components/RsDrawer.js +7 -0
- package/dist/components/RsDropdown.css +157 -0
- package/dist/components/RsDropdown.d.ts +34 -0
- package/dist/components/RsDropdown.impl.js +100 -0
- package/dist/components/RsDropdown.js +7 -0
- package/dist/components/RsDropdownItems.d.ts +15 -0
- package/dist/components/RsDropdownItems.impl.js +99 -0
- package/dist/components/RsDropdownItems.js +5 -0
- package/dist/components/RsDynamicTags.css +148 -0
- package/dist/components/RsDynamicTags.d.ts +71 -0
- package/dist/components/RsDynamicTags.impl.js +313 -0
- package/dist/components/RsDynamicTags.js +8 -0
- package/dist/components/RsEmpty.css +52 -0
- package/dist/components/RsEmpty.d.ts +32 -0
- package/dist/components/RsEmpty.impl.js +43 -0
- package/dist/components/RsEmpty.js +7 -0
- package/dist/components/RsForm.css +30 -0
- package/dist/components/RsForm.d.ts +80 -0
- package/dist/components/RsForm.impl.js +188 -0
- package/dist/components/RsForm.js +8 -0
- package/dist/components/RsFormItem.css +52 -0
- package/dist/components/RsFormItem.d.ts +78 -0
- package/dist/components/RsFormItem.impl.js +288 -0
- package/dist/components/RsFormItem.js +8 -0
- package/dist/components/RsFormItemControl.d.ts +21 -0
- package/dist/components/RsFormItemControl.impl.js +19 -0
- package/dist/components/RsFormItemControl.js +5 -0
- package/dist/components/RsFormList.d.ts +23 -0
- package/dist/components/RsFormList.impl.js +86 -0
- package/dist/components/RsFormList.js +5 -0
- package/dist/components/RsIcon.css +14 -0
- package/dist/components/RsIcon.d.ts +24 -0
- package/dist/components/RsIcon.impl.js +77 -0
- package/dist/components/RsIcon.js +8 -0
- package/dist/components/RsInput.css +528 -0
- package/dist/components/RsInput.d.ts +147 -0
- package/dist/components/RsInput.impl.js +439 -0
- package/dist/components/RsInput.js +8 -0
- package/dist/components/RsInputNumber.css +163 -0
- package/dist/components/RsInputNumber.d.ts +88 -0
- package/dist/components/RsInputNumber.impl.js +375 -0
- package/dist/components/RsInputNumber.js +8 -0
- package/dist/components/RsLabel.css +33 -0
- package/dist/components/RsLabel.d.ts +25 -0
- package/dist/components/RsLabel.impl.js +45 -0
- package/dist/components/RsLabel.js +8 -0
- package/dist/components/RsLink.css +45 -0
- package/dist/components/RsLink.d.ts +25 -0
- package/dist/components/RsLink.impl.js +59 -0
- package/dist/components/RsLink.js +7 -0
- package/dist/components/RsLoading.css +106 -0
- package/dist/components/RsLoading.d.ts +24 -0
- package/dist/components/RsLoading.impl.js +72 -0
- package/dist/components/RsLoading.js +7 -0
- package/dist/components/RsLoadingBar.css +20 -0
- package/dist/components/RsLoadingBar.d.ts +31 -0
- package/dist/components/RsLoadingBar.impl.js +111 -0
- package/dist/components/RsLoadingBar.js +8 -0
- package/dist/components/RsMarkdown.css +214 -0
- package/dist/components/RsMarkdown.d.ts +36 -0
- package/dist/components/RsMarkdown.impl.js +139 -0
- package/dist/components/RsMarkdown.js +7 -0
- package/dist/components/RsMenu.css +200 -0
- package/dist/components/RsMenu.d.ts +28 -0
- package/dist/components/RsMenu.impl.js +108 -0
- package/dist/components/RsMenu.js +7 -0
- package/dist/components/RsMenuItems.d.ts +25 -0
- package/dist/components/RsMenuItems.impl.js +282 -0
- package/dist/components/RsMenuItems.js +5 -0
- package/dist/components/RsMonacoEditor.css +28 -0
- package/dist/components/RsMonacoEditor.d.ts +105 -0
- package/dist/components/RsMonacoEditor.impl.js +353 -0
- package/dist/components/RsMonacoEditor.js +8 -0
- package/dist/components/RsPagination.css +83 -0
- package/dist/components/RsPagination.d.ts +44 -0
- package/dist/components/RsPagination.impl.js +208 -0
- package/dist/components/RsPagination.js +8 -0
- package/dist/components/RsPopover.css +24 -0
- package/dist/components/RsPopover.d.ts +43 -0
- package/dist/components/RsPopover.impl.js +71 -0
- package/dist/components/RsPopover.js +7 -0
- package/dist/components/RsProseEditor.css +19 -0
- package/dist/components/RsProseEditor.d.ts +38 -0
- package/dist/components/RsProseEditor.impl.js +137 -0
- package/dist/components/RsProseEditor.js +8 -0
- package/dist/components/RsRadio.css +19 -0
- package/dist/components/RsRadio.d.ts +34 -0
- package/dist/components/RsRadio.impl.js +66 -0
- package/dist/components/RsRadio.js +7 -0
- package/dist/components/RsRadioItem.css +90 -0
- package/dist/components/RsRadioItem.d.ts +23 -0
- package/dist/components/RsRadioItem.impl.js +55 -0
- package/dist/components/RsRadioItem.js +7 -0
- package/dist/components/RsScrollbar.css +68 -0
- package/dist/components/RsScrollbar.d.ts +31 -0
- package/dist/components/RsScrollbar.impl.js +81 -0
- package/dist/components/RsScrollbar.js +7 -0
- package/dist/components/RsSelect.css +233 -0
- package/dist/components/RsSelect.d.ts +148 -0
- package/dist/components/RsSelect.impl.js +506 -0
- package/dist/components/RsSelect.js +8 -0
- package/dist/components/RsSidebar.css +61 -0
- package/dist/components/RsSidebar.d.ts +44 -0
- package/dist/components/RsSidebar.impl.js +63 -0
- package/dist/components/RsSidebar.js +8 -0
- package/dist/components/RsSidebarGroup.css +15 -0
- package/dist/components/RsSidebarGroup.d.ts +17 -0
- package/dist/components/RsSidebarGroup.impl.js +22 -0
- package/dist/components/RsSidebarGroup.js +8 -0
- package/dist/components/RsSidebarItem.css +45 -0
- package/dist/components/RsSidebarItem.d.ts +20 -0
- package/dist/components/RsSidebarItem.impl.js +41 -0
- package/dist/components/RsSidebarItem.js +8 -0
- package/dist/components/RsSplitPane.css +183 -0
- package/dist/components/RsSplitPane.d.ts +51 -0
- package/dist/components/RsSplitPane.impl.js +408 -0
- package/dist/components/RsSplitPane.js +7 -0
- package/dist/components/RsStatCard.css +51 -0
- package/dist/components/RsStatCard.d.ts +26 -0
- package/dist/components/RsStatCard.impl.js +41 -0
- package/dist/components/RsStatCard.js +8 -0
- package/dist/components/RsSteps.css +83 -0
- package/dist/components/RsSteps.d.ts +22 -0
- package/dist/components/RsSteps.impl.js +55 -0
- package/dist/components/RsSteps.js +8 -0
- package/dist/components/RsSwitch.css +101 -0
- package/dist/components/RsSwitch.d.ts +41 -0
- package/dist/components/RsSwitch.impl.js +92 -0
- package/dist/components/RsSwitch.js +7 -0
- package/dist/components/RsTable.d.ts +139 -0
- package/dist/components/RsTable.impl.js +676 -0
- package/dist/components/RsTable.js +5 -0
- package/dist/components/RsTabs.css +616 -0
- package/dist/components/RsTabs.d.ts +92 -0
- package/dist/components/RsTabs.impl.js +526 -0
- package/dist/components/RsTabs.js +7 -0
- package/dist/components/RsTag.css +94 -0
- package/dist/components/RsTag.d.ts +33 -0
- package/dist/components/RsTag.impl.js +70 -0
- package/dist/components/RsTag.js +8 -0
- package/dist/components/RsTerminal.css +119 -0
- package/dist/components/RsTerminal.d.ts +85 -0
- package/dist/components/RsTerminal.impl.js +525 -0
- package/dist/components/RsTerminal.js +8 -0
- package/dist/components/RsTimePicker-1.css +98 -0
- package/dist/components/RsTimePicker.css +106 -0
- package/dist/components/RsTimePicker.d.ts +41 -0
- package/dist/components/RsTimePicker.impl.js +374 -0
- package/dist/components/RsTimePicker.js +10 -0
- package/dist/components/RsTimePickerColumns.css +104 -0
- package/dist/components/RsTimePickerColumns.d.ts +30 -0
- package/dist/components/RsTimePickerColumns.impl.js +172 -0
- package/dist/components/RsTimePickerColumns.js +8 -0
- package/dist/components/RsToaster.css +329 -0
- package/dist/components/RsToaster.d.ts +17 -0
- package/dist/components/RsToaster.impl.js +67 -0
- package/dist/components/RsToaster.js +7 -0
- package/dist/components/RsToolbar.css +61 -0
- package/dist/components/RsToolbar.d.ts +43 -0
- package/dist/components/RsToolbar.impl.js +57 -0
- package/dist/components/RsToolbar.js +7 -0
- package/dist/components/RsTooltip.css +59 -0
- package/dist/components/RsTooltip.d.ts +47 -0
- package/dist/components/RsTooltip.impl.js +88 -0
- package/dist/components/RsTooltip.js +7 -0
- package/dist/components/RsTooltipProvider.d.ts +26 -0
- package/dist/components/RsTooltipProvider.impl.js +32 -0
- package/dist/components/RsTooltipProvider.js +5 -0
- package/dist/components/RsTree.css +308 -0
- package/dist/components/RsTree.d.ts +131 -0
- package/dist/components/RsTree.impl.js +762 -0
- package/dist/components/RsTree.js +8 -0
- package/dist/components/RsUpload.css +191 -0
- package/dist/components/RsUpload.d.ts +38 -0
- package/dist/components/RsUpload.impl.js +198 -0
- package/dist/components/RsUpload.js +8 -0
- package/dist/components/RsVNodeHost.d.ts +18 -0
- package/dist/components/RsVNodeHost.impl.js +18 -0
- package/dist/components/RsVNodeHost.js +5 -0
- package/dist/components/RsVirtualList.css +29 -0
- package/dist/components/RsVirtualList.d.ts +37 -0
- package/dist/components/RsVirtualList.impl.js +138 -0
- package/dist/components/RsVirtualList.js +8 -0
- package/dist/components/avatar-utils.d.ts +11 -0
- package/dist/components/avatar-utils.js +13 -0
- package/dist/components/breadcrumb-utils.d.ts +12 -0
- package/dist/components/breadcrumb-utils.js +12 -0
- package/dist/components/button-utils.d.ts +17 -0
- package/dist/components/button-utils.js +13 -0
- package/dist/components/class-utils.d.ts +2 -0
- package/dist/components/code-editor-utils.d.ts +33 -0
- package/dist/components/code-editor-utils.js +64 -0
- package/dist/components/code-mirror-completion.d.ts +5 -0
- package/dist/components/code-mirror-completion.js +37 -0
- package/dist/components/code-mirror-diagnostics.d.ts +6 -0
- package/dist/components/code-mirror-diagnostics.js +35 -0
- package/dist/components/code-mirror-ghost.d.ts +8 -0
- package/dist/components/code-mirror-ghost.js +133 -0
- package/dist/components/code-mirror-inline-edit.d.ts +11 -0
- package/dist/components/code-mirror-inline-edit.js +51 -0
- package/dist/components/code-mirror-intel.d.ts +22 -0
- package/dist/components/code-mirror-intel.js +62 -0
- package/dist/components/code-mirror-lang.d.ts +10 -0
- package/dist/components/code-mirror-lang.js +113 -0
- package/dist/components/context-menu-utils.d.ts +21 -0
- package/dist/components/context-menu-utils.js +8 -0
- package/dist/components/date-picker-utils.d.ts +115 -0
- package/dist/components/date-picker-utils.js +270 -0
- package/dist/components/date-range-validation.d.ts +15 -0
- package/dist/components/date-range-validation.js +16 -0
- package/dist/components/date-validation.d.ts +15 -0
- package/dist/components/date-validation.js +46 -0
- package/dist/components/descriptions-utils.d.ts +18 -0
- package/dist/components/descriptions-utils.js +4 -0
- package/dist/components/dialog-utils.d.ts +95 -0
- package/dist/components/dialog-utils.js +58 -0
- package/dist/components/dialog-viewport.d.ts +14 -0
- package/dist/components/dialog-viewport.js +38 -0
- package/dist/components/dialog-window.d.ts +45 -0
- package/dist/components/dialog-window.js +275 -0
- package/dist/components/drawer-utils.d.ts +37 -0
- package/dist/components/drawer-utils.js +59 -0
- package/dist/components/dropdown-utils.d.ts +13 -0
- package/dist/components/dropdown-utils.js +12 -0
- package/dist/components/form-item-control.d.ts +7 -0
- package/dist/components/form-item-control.js +46 -0
- package/dist/components/form-path.d.ts +29 -0
- package/dist/components/form-path.js +78 -0
- package/dist/components/form-rules.d.ts +82 -0
- package/dist/components/form-rules.js +130 -0
- package/dist/components/form-utils.d.ts +120 -0
- package/dist/components/form-utils.js +67 -0
- package/dist/components/input-number-utils.d.ts +36 -0
- package/dist/components/input-number-utils.js +74 -0
- package/dist/components/input-rules.d.ts +15 -0
- package/dist/components/input-rules.js +59 -0
- package/dist/components/loading-utils.d.ts +6 -0
- package/dist/components/markdown-utils.d.ts +16 -0
- package/dist/components/markdown-utils.js +143 -0
- package/dist/components/menu-utils.d.ts +16 -0
- package/dist/components/menu-utils.js +29 -0
- package/dist/components/overlay-utils.d.ts +23 -0
- package/dist/components/overlay-utils.js +17 -0
- package/dist/components/pagination-utils.d.ts +9 -0
- package/dist/components/pagination-utils.js +53 -0
- package/dist/components/popover-utils.d.ts +6 -0
- package/dist/components/radio-utils.d.ts +9 -0
- package/dist/components/radio-utils.js +4 -0
- package/dist/components/reka.d.ts +2 -0
- package/dist/components/reka.js +2 -0
- package/dist/components/resolve-radius.d.ts +9 -0
- package/dist/components/resolve-radius.js +18 -0
- package/dist/components/resolve-size.d.ts +10 -0
- package/dist/components/resolve-size.js +20 -0
- package/dist/components/scrollbar-utils.d.ts +3 -0
- package/dist/components/scrollbar-utils.js +7 -0
- package/dist/components/select-utils.d.ts +83 -0
- package/dist/components/select-utils.js +211 -0
- package/dist/components/split-pane-utils.d.ts +74 -0
- package/dist/components/split-pane-utils.js +135 -0
- package/dist/components/steps-utils.d.ts +12 -0
- package/dist/components/steps-utils.js +12 -0
- package/dist/components/table/RsTableBody.d.ts +47 -0
- package/dist/components/table/RsTableBody.impl.js +312 -0
- package/dist/components/table/RsTableBody.js +5 -0
- package/dist/components/table/RsTableBodyRow.d.ts +149 -0
- package/dist/components/table/RsTableBodyRow.impl.js +438 -0
- package/dist/components/table/RsTableBodyRow.js +5 -0
- package/dist/components/table/RsTableCell.d.ts +59 -0
- package/dist/components/table/RsTableCell.impl.js +213 -0
- package/dist/components/table/RsTableCell.js +5 -0
- package/dist/components/table/RsTableCellContent.d.ts +19 -0
- package/dist/components/table/RsTableCellContent.js +25 -0
- package/dist/components/table/RsTableCellEditor.d.ts +46 -0
- package/dist/components/table/RsTableCellEditor.impl.js +341 -0
- package/dist/components/table/RsTableCellEditor.js +5 -0
- package/dist/components/table/RsTableColGroup.d.ts +18 -0
- package/dist/components/table/RsTableColGroup.impl.js +58 -0
- package/dist/components/table/RsTableColGroup.js +5 -0
- package/dist/components/table/RsTableEditGutter.d.ts +17 -0
- package/dist/components/table/RsTableEditGutter.impl.js +52 -0
- package/dist/components/table/RsTableEditGutter.js +5 -0
- package/dist/components/table/RsTableHeader.d.ts +22 -0
- package/dist/components/table/RsTableHeader.impl.js +184 -0
- package/dist/components/table/RsTableHeader.js +5 -0
- package/dist/components/table/RsTableHeaderFilter.css +24 -0
- package/dist/components/table/RsTableHeaderFilter.d.ts +19 -0
- package/dist/components/table/RsTableHeaderFilter.impl.js +102 -0
- package/dist/components/table/RsTableHeaderFilter.js +8 -0
- package/dist/components/table/RsTableRowStatus.css +30 -0
- package/dist/components/table/RsTableRowStatus.d.ts +14 -0
- package/dist/components/table/RsTableRowStatus.impl.js +44 -0
- package/dist/components/table/RsTableRowStatus.js +8 -0
- package/dist/components/table/RsTableSummaryRow.d.ts +37 -0
- package/dist/components/table/RsTableSummaryRow.impl.js +57 -0
- package/dist/components/table/RsTableSummaryRow.js +5 -0
- package/dist/components/table/rs-table-api.d.ts +65 -0
- package/dist/components/table/rs-table-api.js +22 -0
- package/dist/components/table/rs-table-compat-matrix.d.ts +24 -0
- package/dist/components/table/rs-table-compat-matrix.js +64 -0
- package/dist/components/table/rs-table-echarts-adapter.d.ts +47 -0
- package/dist/components/table/rs-table-echarts-adapter.js +49 -0
- package/dist/components/table/rs-table-feature-host.d.ts +61 -0
- package/dist/components/table/rs-table-feature-host.js +97 -0
- package/dist/components/table/rs-table-grid-nav.d.ts +22 -0
- package/dist/components/table/rs-table-grid-nav.js +80 -0
- package/dist/components/table/rs-table-header-types.d.ts +45 -0
- package/dist/components/table/rs-table-module-registry.d.ts +37 -0
- package/dist/components/table/rs-table-module-registry.js +51 -0
- package/dist/components/table/rs-table-props.d.ts +315 -0
- package/dist/components/table/rs-table-props.js +64 -0
- package/dist/components/table/rs-table-view-context.d.ts +218 -0
- package/dist/components/table/rs-table-view-context.js +47 -0
- package/dist/components/table/table-chart-utils.d.ts +62 -0
- package/dist/components/table/table-chart-utils.js +91 -0
- package/dist/components/table/table-context-menu.d.ts +13 -0
- package/dist/components/table/table-context-menu.js +30 -0
- package/dist/components/table/table-edit-utils.d.ts +94 -0
- package/dist/components/table/table-edit-utils.js +282 -0
- package/dist/components/table/table-features.d.ts +149 -0
- package/dist/components/table/table-features.js +119 -0
- package/dist/components/table/table-keys.d.ts +5 -0
- package/dist/components/table/table-keys.js +6 -0
- package/dist/components/table/table-summary-utils.d.ts +90 -0
- package/dist/components/table/table-summary-utils.js +97 -0
- package/dist/components/table-drag.d.ts +39 -0
- package/dist/components/table-drag.js +130 -0
- package/dist/components/table-utils.d.ts +440 -0
- package/dist/components/table-utils.js +722 -0
- package/dist/components/tabs-utils.d.ts +71 -0
- package/dist/components/tabs-utils.js +147 -0
- package/dist/components/terminal-utils.d.ts +59 -0
- package/dist/components/terminal-utils.js +210 -0
- package/dist/components/terminal-wheel.d.ts +24 -0
- package/dist/components/terminal-wheel.js +42 -0
- package/dist/components/time-picker-utils.d.ts +51 -0
- package/dist/components/time-picker-utils.js +158 -0
- package/dist/components/time-range-validation.d.ts +11 -0
- package/dist/components/time-range-validation.js +15 -0
- package/dist/components/time-validation.d.ts +11 -0
- package/dist/components/time-validation.js +22 -0
- package/dist/components/tree-utils.d.ts +112 -0
- package/dist/components/tree-utils.js +310 -0
- package/dist/components/upload-utils.d.ts +26 -0
- package/dist/components/upload-utils.js +177 -0
- package/dist/components/use-rs-select.d.ts +78 -0
- package/dist/components/use-rs-select.js +266 -0
- package/dist/components/virtual-list-utils.d.ts +7 -0
- package/dist/components/virtual-list-utils.js +28 -0
- package/dist/composables/assembleRsTableApi.d.ts +34 -0
- package/dist/composables/assembleRsTableApi.js +26 -0
- package/dist/composables/bindRsTableViewContext.d.ts +73 -0
- package/dist/composables/bindRsTableViewContext.js +104 -0
- package/dist/composables/createRsDialog.d.ts +77 -0
- package/dist/composables/createRsDialog.js +263 -0
- package/dist/composables/createRsTableEditEmitBridge.d.ts +16 -0
- package/dist/composables/createRsTableEditEmitBridge.js +25 -0
- package/dist/composables/useClickOutside.d.ts +2 -0
- package/dist/composables/useRsConfig.d.ts +26 -0
- package/dist/composables/useRsConfig.js +55 -0
- package/dist/composables/useRsI18n.d.ts +9 -0
- package/dist/composables/useRsI18n.js +25 -0
- package/dist/composables/useRsLoadingBar.d.ts +13 -0
- package/dist/composables/useRsLoadingBar.js +30 -0
- package/dist/composables/useRsTable.d.ts +61 -0
- package/dist/composables/useRsTable.js +57 -0
- package/dist/composables/useRsTableA11y.d.ts +35 -0
- package/dist/composables/useRsTableA11y.js +34 -0
- package/dist/composables/useRsTableChartBridge.d.ts +37 -0
- package/dist/composables/useRsTableChartBridge.js +47 -0
- package/dist/composables/useRsTableColumnLayout.d.ts +75 -0
- package/dist/composables/useRsTableColumnLayout.js +250 -0
- package/dist/composables/useRsTableColumnResize.d.ts +35 -0
- package/dist/composables/useRsTableColumnResize.js +182 -0
- package/dist/composables/useRsTableColumnVirtual.d.ts +76 -0
- package/dist/composables/useRsTableColumnVirtual.js +116 -0
- package/dist/composables/useRsTableColumns.d.ts +70 -0
- package/dist/composables/useRsTableColumns.js +132 -0
- package/dist/composables/useRsTableContextMenu.d.ts +83 -0
- package/dist/composables/useRsTableContextMenu.js +152 -0
- package/dist/composables/useRsTableCore.d.ts +177 -0
- package/dist/composables/useRsTableCore.js +164 -0
- package/dist/composables/useRsTableEditActions.d.ts +129 -0
- package/dist/composables/useRsTableEditActions.js +376 -0
- package/dist/composables/useRsTableEditLayer.d.ts +228 -0
- package/dist/composables/useRsTableEditLayer.js +146 -0
- package/dist/composables/useRsTableEngine.d.ts +115 -0
- package/dist/composables/useRsTableEngine.js +225 -0
- package/dist/composables/useRsTableGridKeyboard.d.ts +38 -0
- package/dist/composables/useRsTableGridKeyboard.js +70 -0
- package/dist/composables/useRsTableHeadless.d.ts +138 -0
- package/dist/composables/useRsTableHeadless.js +105 -0
- package/dist/composables/useRsTableInteraction.d.ts +145 -0
- package/dist/composables/useRsTableInteraction.js +249 -0
- package/dist/composables/useRsTableScrollHost.d.ts +25 -0
- package/dist/composables/useRsTableScrollHost.js +42 -0
- package/dist/composables/useRsTableScrollLayout.d.ts +42 -0
- package/dist/composables/useRsTableScrollLayout.js +195 -0
- package/dist/composables/useRsTableSelectionSource.d.ts +38 -0
- package/dist/composables/useRsTableSelectionSource.js +57 -0
- package/dist/composables/useRsTableShell.d.ts +380 -0
- package/dist/composables/useRsTableShell.js +237 -0
- package/dist/composables/useRsTableShellChrome.d.ts +126 -0
- package/dist/composables/useRsTableShellChrome.js +110 -0
- package/dist/composables/useRsTableSummary.d.ts +44 -0
- package/dist/composables/useRsTableSummary.js +52 -0
- package/dist/composables/useRsTableViewProvide.d.ts +111 -0
- package/dist/composables/useRsTableViewProvide.js +93 -0
- package/dist/composables/useRsTableVirtual.d.ts +75 -0
- package/dist/composables/useRsTableVirtual.js +83 -0
- package/dist/composables/useRsTabsNav.d.ts +33 -0
- package/dist/composables/useRsTabsNav.js +137 -0
- package/dist/composables/useRsToast.d.ts +15 -0
- package/dist/composables/useRsToast.js +30 -0
- package/dist/composables/useTableCellTooltip.d.ts +28 -0
- package/dist/composables/useTableCellTooltip.js +177 -0
- package/dist/composables/useTableEdit.d.ts +63 -0
- package/dist/composables/useTableEdit.js +176 -0
- package/dist/composables/useTableRowHighlight.d.ts +14 -0
- package/dist/composables/useTableRowHighlight.js +35 -0
- package/dist/dev/vite-codemirror-deps.d.ts +20 -0
- package/dist/dev/vite-codemirror-deps.js +16 -0
- package/dist/dev/vite-xterm-deps.d.ts +8 -0
- package/dist/dev/vite-xterm-deps.js +3 -0
- package/dist/icons/custom/api.d.ts +37 -0
- package/dist/icons/custom/api.js +56 -0
- package/dist/icons/custom/clickhouse.d.ts +37 -0
- package/dist/icons/custom/clickhouse.js +61 -0
- package/dist/icons/custom/dameng.d.ts +37 -0
- package/dist/icons/custom/dameng.js +81 -0
- package/dist/icons/custom/ftp.d.ts +37 -0
- package/dist/icons/custom/ftp.js +62 -0
- package/dist/icons/custom/kingbase.d.ts +37 -0
- package/dist/icons/custom/kingbase.js +61 -0
- package/dist/icons/custom/mongodb.d.ts +37 -0
- package/dist/icons/custom/mongodb.js +59 -0
- package/dist/icons/custom/mysql.d.ts +37 -0
- package/dist/icons/custom/mysql.js +60 -0
- package/dist/icons/custom/oracle.d.ts +37 -0
- package/dist/icons/custom/oracle.js +61 -0
- package/dist/icons/custom/postgres.d.ts +37 -0
- package/dist/icons/custom/postgres.js +61 -0
- package/dist/icons/custom/redis.d.ts +38 -0
- package/dist/icons/custom/redis.js +60 -0
- package/dist/icons/custom/sqlite.d.ts +37 -0
- package/dist/icons/custom/sqlite.js +59 -0
- package/dist/icons/custom/sqlserver.d.ts +37 -0
- package/dist/icons/custom/sqlserver.js +61 -0
- package/dist/icons/custom/vastbase.d.ts +37 -0
- package/dist/icons/custom/vastbase.js +67 -0
- package/dist/icons/lucide.d.ts +7 -0
- package/dist/icons/lucide.js +74 -0
- package/dist/icons/registry.d.ts +3 -0
- package/dist/icons/registry.js +31 -0
- package/dist/index.d.ts +209 -0
- package/dist/index.js +156 -0
- package/dist/lib/iso-local-datetime.d.ts +17 -0
- package/dist/lib/iso-local-datetime.js +103 -0
- package/dist/lib/rs-dayjs.d.ts +15 -0
- package/dist/lib/rs-dayjs.js +41 -0
- package/dist/locale/interpolate.d.ts +14 -0
- package/dist/locale/interpolate.js +24 -0
- package/dist/locale/messages.d.ts +7 -0
- package/dist/locale/messages.js +407 -0
- package/dist/locale/types.d.ts +3 -0
- package/dist/locale/types.js +4 -0
- package/dist/monaco/debug-decorations.d.ts +21 -0
- package/dist/monaco/debug-decorations2.js +44 -0
- package/dist/monaco/index.d.ts +5 -0
- package/dist/monaco/languages/index.d.ts +3 -0
- package/dist/monaco/languages/mongodb-shell.d.ts +7 -0
- package/dist/monaco/languages/mongodb-shell.js +222 -0
- package/dist/monaco/languages/types.d.ts +30 -0
- package/dist/monaco/languages/types.js +25 -0
- package/dist/monaco/setup.d.ts +9 -0
- package/dist/monaco/setup.js +53 -0
- package/dist/styles.css +2005 -0
- package/dist/theme/apply.d.ts +6 -0
- package/dist/theme/apply.js +10 -0
- package/dist/theme/css-token.d.ts +27 -0
- package/dist/theme/css-token.js +72 -0
- package/dist/theme/presets.d.ts +7 -0
- package/dist/theme/presets.js +74 -0
- package/dist/theme/types.d.ts +97 -0
- package/dist/theme/types.js +65 -0
- package/dist/utils/rs-clipboard.d.ts +17 -0
- package/dist/utils/rs-clipboard.js +187 -0
- package/dist/vite-plugins/monaco-zh-nls.d.ts +2 -0
- package/dist/vite-plugins/monaco-zh-nls.js +92 -0
- package/dist/vite-plugins/silence-antlr-parse-console.d.ts +9 -0
- package/dist/vite-plugins/silence-antlr-parse-console.js +26 -0
- package/package.json +38 -15
- package/src/__tests__/RsBadge.spec.ts +0 -40
- package/src/__tests__/RsBreadcrumb.spec.ts +0 -172
- package/src/__tests__/RsButton.spec.ts +0 -188
- package/src/__tests__/RsCalendarGrid.spec.ts +0 -101
- package/src/__tests__/RsCard.spec.ts +0 -256
- package/src/__tests__/RsCheckbox.spec.ts +0 -36
- package/src/__tests__/RsCodeEditor.spec.ts +0 -111
- package/src/__tests__/RsConfirmDialog.spec.ts +0 -285
- package/src/__tests__/RsContainer.spec.ts +0 -89
- package/src/__tests__/RsContextMenu.spec.ts +0 -130
- package/src/__tests__/RsDatePicker.spec.ts +0 -109
- package/src/__tests__/RsDateTimePicker.spec.ts +0 -80
- package/src/__tests__/RsDescriptions.spec.ts +0 -50
- package/src/__tests__/RsDialog.spec.ts +0 -595
- package/src/__tests__/RsDrawer.spec.ts +0 -292
- package/src/__tests__/RsDropdown.spec.ts +0 -135
- package/src/__tests__/RsDynamicTags.spec.ts +0 -52
- package/src/__tests__/RsEmpty.spec.ts +0 -99
- package/src/__tests__/RsForm.spec.ts +0 -417
- package/src/__tests__/RsFormItem.spec.ts +0 -478
- package/src/__tests__/RsFormList.spec.ts +0 -109
- package/src/__tests__/RsIcon.spec.ts +0 -258
- package/src/__tests__/RsInput.spec.ts +0 -377
- package/src/__tests__/RsInputNumber.spec.ts +0 -151
- package/src/__tests__/RsLabel.spec.ts +0 -106
- package/src/__tests__/RsLink.spec.ts +0 -49
- package/src/__tests__/RsLoading.spec.ts +0 -84
- package/src/__tests__/RsMarkdown.spec.ts +0 -180
- package/src/__tests__/RsMenu.spec.ts +0 -511
- package/src/__tests__/RsNewComponents.spec.ts +0 -17
- package/src/__tests__/RsPagination.spec.ts +0 -223
- package/src/__tests__/RsPopover.spec.ts +0 -140
- package/src/__tests__/RsScrollbar.spec.ts +0 -53
- package/src/__tests__/RsSelect.spec.ts +0 -850
- package/src/__tests__/RsSidebar.spec.ts +0 -119
- package/src/__tests__/RsSplitPane.spec.ts +0 -177
- package/src/__tests__/RsStatCard.spec.ts +0 -79
- package/src/__tests__/RsSteps.spec.ts +0 -125
- package/src/__tests__/RsSwitch.spec.ts +0 -74
- package/src/__tests__/RsTable.a11y.spec.ts +0 -83
- package/src/__tests__/RsTable.dom-baseline.spec.ts +0 -87
- package/src/__tests__/RsTable.perf.spec.ts +0 -122
- package/src/__tests__/RsTable.spec.ts +0 -1207
- package/src/__tests__/RsTable.ssr.spec.ts +0 -71
- package/src/__tests__/RsTable.summary.spec.ts +0 -45
- package/src/__tests__/RsTabs.spec.ts +0 -426
- package/src/__tests__/RsTerminal.spec.ts +0 -218
- package/src/__tests__/RsTimePicker.spec.ts +0 -97
- package/src/__tests__/RsToaster.spec.ts +0 -95
- package/src/__tests__/RsToolbar.spec.ts +0 -75
- package/src/__tests__/RsTooltip.spec.ts +0 -154
- package/src/__tests__/RsTree.spec.ts +0 -573
- package/src/__tests__/RsUpload.spec.ts +0 -216
- package/src/__tests__/RsVirtualList.spec.ts +0 -77
- package/src/__tests__/createRsDialog.spec.ts +0 -158
- package/src/__tests__/css-token.spec.ts +0 -51
- package/src/__tests__/date-picker-utils.spec.ts +0 -119
- package/src/__tests__/dialog-utils.spec.ts +0 -43
- package/src/__tests__/dialog-viewport.spec.ts +0 -38
- package/src/__tests__/form-path.spec.ts +0 -46
- package/src/__tests__/form-rules.spec.ts +0 -139
- package/src/__tests__/iso-local-datetime.spec.ts +0 -58
- package/src/__tests__/perf-budgets.ts +0 -32
- package/src/__tests__/rs-clipboard.spec.ts +0 -142
- package/src/__tests__/rs-select-model.types.spec.ts +0 -28
- package/src/__tests__/rs-table-api.spec.ts +0 -206
- package/src/__tests__/rs-table-compat-matrix.spec.ts +0 -108
- package/src/__tests__/rs-table-echarts-adapter.spec.ts +0 -43
- package/src/__tests__/rs-table-grid-nav.spec.ts +0 -63
- package/src/__tests__/rs-table-isolation.spec.ts +0 -158
- package/src/__tests__/rs-table-slots.types.spec.ts +0 -20
- package/src/__tests__/setup.ts +0 -12
- package/src/__tests__/split-pane-utils.spec.ts +0 -157
- package/src/__tests__/table-chart-utils.spec.ts +0 -88
- package/src/__tests__/table-drag.spec.ts +0 -35
- package/src/__tests__/table-edit-utils.spec.ts +0 -194
- package/src/__tests__/table-summary-utils.spec.ts +0 -62
- package/src/__tests__/table-utils.spec.ts +0 -410
- package/src/__tests__/theme.spec.ts +0 -49
- package/src/__tests__/tree-utils.spec.ts +0 -234
- package/src/__tests__/useRsTableColumnResize.spec.ts +0 -25
- package/src/__tests__/useRsTableCore.perf.spec.ts +0 -170
- package/src/__tests__/useTableCellTooltip.spec.ts +0 -101
- package/src/components/RsAlert.vue +0 -212
- package/src/components/RsAvatar.vue +0 -115
- package/src/components/RsBadge.vue +0 -59
- package/src/components/RsBreadcrumb.vue +0 -65
- package/src/components/RsBreadcrumbItems.vue +0 -36
- package/src/components/RsButton.vue +0 -596
- package/src/components/RsCalendarGrid.vue +0 -318
- package/src/components/RsCard.vue +0 -421
- package/src/components/RsCheckbox.vue +0 -189
- package/src/components/RsCodeBlock.vue +0 -327
- package/src/components/RsCodeEditor.vue +0 -597
- package/src/components/RsConfigProvider.vue +0 -92
- package/src/components/RsConfirmDialog.vue +0 -365
- package/src/components/RsContainer.vue +0 -235
- package/src/components/RsContextMenu.vue +0 -277
- package/src/components/RsContextMenuItems.vue +0 -77
- package/src/components/RsDatePicker.vue +0 -1033
- package/src/components/RsDateTimePicker.vue +0 -67
- package/src/components/RsDescriptions.vue +0 -186
- package/src/components/RsDescriptionsItem.vue +0 -32
- package/src/components/RsDialog.vue +0 -813
- package/src/components/RsDivider.vue +0 -89
- package/src/components/RsDrawer.vue +0 -979
- package/src/components/RsDropdown.vue +0 -283
- package/src/components/RsDropdownItems.vue +0 -90
- package/src/components/RsDynamicTags.vue +0 -531
- package/src/components/RsEmpty.vue +0 -107
- package/src/components/RsForm.vue +0 -287
- package/src/components/RsFormItem.vue +0 -423
- package/src/components/RsFormItemControl.vue +0 -21
- package/src/components/RsFormList.vue +0 -117
- package/src/components/RsIcon.vue +0 -104
- package/src/components/RsInput.vue +0 -1508
- package/src/components/RsInputNumber.vue +0 -582
- package/src/components/RsLabel.vue +0 -69
- package/src/components/RsLink.vue +0 -106
- package/src/components/RsLoading.vue +0 -171
- package/src/components/RsLoadingBar.vue +0 -151
- package/src/components/RsMarkdown.vue +0 -348
- package/src/components/RsMenu.vue +0 -314
- package/src/components/RsMenuItems.vue +0 -263
- package/src/components/RsMonacoEditor.vue +0 -567
- package/src/components/RsPagination.vue +0 -263
- package/src/components/RsPopover.vue +0 -79
- package/src/components/RsProseEditor.vue +0 -160
- package/src/components/RsRadio.vue +0 -81
- package/src/components/RsRadioItem.vue +0 -156
- package/src/components/RsScrollbar.vue +0 -171
- package/src/components/RsSelect.vue +0 -786
- package/src/components/RsSidebar.vue +0 -121
- package/src/components/RsSidebarGroup.vue +0 -32
- package/src/components/RsSidebarItem.vue +0 -72
- package/src/components/RsSplitPane.vue +0 -714
- package/src/components/RsStatCard.vue +0 -85
- package/src/components/RsSteps.vue +0 -138
- package/src/components/RsSwitch.vue +0 -192
- package/src/components/RsTable.vue +0 -762
- package/src/components/RsTabs.vue +0 -1283
- package/src/components/RsTag.vue +0 -191
- package/src/components/RsTerminal.vue +0 -840
- package/src/components/RsTimePicker.vue +0 -617
- package/src/components/RsTimePickerColumns.vue +0 -285
- package/src/components/RsToaster.vue +0 -436
- package/src/components/RsToolbar.vue +0 -135
- package/src/components/RsTooltip.vue +0 -151
- package/src/components/RsTooltipProvider.vue +0 -30
- package/src/components/RsTree.vue +0 -1270
- package/src/components/RsUpload.vue +0 -412
- package/src/components/RsVNodeHost.vue +0 -20
- package/src/components/RsVirtualList.vue +0 -217
- package/src/components/avatar-utils.ts +0 -19
- package/src/components/breadcrumb-utils.ts +0 -19
- package/src/components/button-utils.ts +0 -39
- package/src/components/class-utils.ts +0 -29
- package/src/components/code-editor-utils.ts +0 -106
- package/src/components/code-mirror-completion.ts +0 -40
- package/src/components/code-mirror-diagnostics.ts +0 -52
- package/src/components/code-mirror-ghost.ts +0 -158
- package/src/components/code-mirror-inline-edit.ts +0 -55
- package/src/components/code-mirror-intel.ts +0 -81
- package/src/components/code-mirror-lang.ts +0 -128
- package/src/components/context-menu-utils.ts +0 -26
- package/src/components/date-picker-utils.ts +0 -475
- package/src/components/date-range-validation.ts +0 -29
- package/src/components/date-validation.ts +0 -38
- package/src/components/descriptions-utils.ts +0 -24
- package/src/components/dialog-utils.ts +0 -183
- package/src/components/dialog-viewport.ts +0 -48
- package/src/components/dialog-window.ts +0 -318
- package/src/components/drawer-utils.ts +0 -109
- package/src/components/dropdown-utils.ts +0 -31
- package/src/components/form-item-control.ts +0 -55
- package/src/components/form-path.ts +0 -92
- package/src/components/form-rules.ts +0 -311
- package/src/components/form-utils.ts +0 -219
- package/src/components/input-number-utils.ts +0 -128
- package/src/components/input-rules.ts +0 -84
- package/src/components/loading-utils.ts +0 -8
- package/src/components/markdown-utils.ts +0 -174
- package/src/components/menu-utils.ts +0 -59
- package/src/components/overlay-utils.ts +0 -50
- package/src/components/pagination-utils.ts +0 -38
- package/src/components/popover-utils.ts +0 -8
- package/src/components/radio-utils.ts +0 -12
- package/src/components/reka.ts +0 -111
- package/src/components/resolve-radius.ts +0 -22
- package/src/components/resolve-size.ts +0 -29
- package/src/components/scrollbar-utils.ts +0 -10
- package/src/components/select-utils.ts +0 -372
- package/src/components/split-pane-utils.ts +0 -254
- package/src/components/steps-utils.ts +0 -22
- package/src/components/table/RsTableBody.vue +0 -217
- package/src/components/table/RsTableBodyRow.vue +0 -376
- package/src/components/table/RsTableCell.vue +0 -239
- package/src/components/table/RsTableCellContent.ts +0 -18
- package/src/components/table/RsTableCellEditor.vue +0 -352
- package/src/components/table/RsTableColGroup.vue +0 -41
- package/src/components/table/RsTableEditGutter.vue +0 -54
- package/src/components/table/RsTableHeader.vue +0 -158
- package/src/components/table/RsTableHeaderFilter.vue +0 -107
- package/src/components/table/RsTableRowStatus.vue +0 -69
- package/src/components/table/RsTableSummaryRow.vue +0 -52
- package/src/components/table/rs-table-api.ts +0 -99
- package/src/components/table/rs-table-compat-matrix.ts +0 -71
- package/src/components/table/rs-table-echarts-adapter.ts +0 -81
- package/src/components/table/rs-table-feature-host.ts +0 -178
- package/src/components/table/rs-table-grid-nav.ts +0 -122
- package/src/components/table/rs-table-header-types.ts +0 -47
- package/src/components/table/rs-table-module-registry.ts +0 -72
- package/src/components/table/rs-table-props.ts +0 -340
- package/src/components/table/rs-table-view-context.ts +0 -258
- package/src/components/table/table-chart-utils.ts +0 -165
- package/src/components/table/table-context-menu.ts +0 -53
- package/src/components/table/table-edit-utils.ts +0 -496
- package/src/components/table/table-features.ts +0 -284
- package/src/components/table/table-keys.ts +0 -12
- package/src/components/table/table-summary-utils.ts +0 -194
- package/src/components/table-drag.ts +0 -215
- package/src/components/table-utils.ts +0 -1400
- package/src/components/tabs-utils.ts +0 -247
- package/src/components/terminal-utils.ts +0 -323
- package/src/components/terminal-wheel.ts +0 -74
- package/src/components/time-picker-utils.ts +0 -240
- package/src/components/time-range-validation.ts +0 -23
- package/src/components/time-validation.ts +0 -20
- package/src/components/tree-utils.ts +0 -518
- package/src/components/upload-utils.ts +0 -177
- package/src/components/use-rs-select.ts +0 -451
- package/src/components/virtual-list-utils.ts +0 -30
- package/src/composables/assembleRsTableApi.ts +0 -79
- package/src/composables/bindRsTableViewContext.ts +0 -269
- package/src/composables/createRsDialog.ts +0 -408
- package/src/composables/createRsTableEditEmitBridge.ts +0 -38
- package/src/composables/useClickOutside.ts +0 -22
- package/src/composables/useRsConfig.ts +0 -98
- package/src/composables/useRsI18n.ts +0 -33
- package/src/composables/useRsLoadingBar.ts +0 -36
- package/src/composables/useRsTable.ts +0 -134
- package/src/composables/useRsTableA11y.ts +0 -52
- package/src/composables/useRsTableChartBridge.ts +0 -79
- package/src/composables/useRsTableColumnLayout.ts +0 -320
- package/src/composables/useRsTableColumnResize.ts +0 -244
- package/src/composables/useRsTableColumnVirtual.ts +0 -180
- package/src/composables/useRsTableColumns.ts +0 -200
- package/src/composables/useRsTableContextMenu.ts +0 -257
- package/src/composables/useRsTableCore.ts +0 -258
- package/src/composables/useRsTableEditActions.ts +0 -606
- package/src/composables/useRsTableEditLayer.ts +0 -251
- package/src/composables/useRsTableEngine.ts +0 -357
- package/src/composables/useRsTableGridKeyboard.ts +0 -123
- package/src/composables/useRsTableHeadless.ts +0 -145
- package/src/composables/useRsTableInteraction.ts +0 -433
- package/src/composables/useRsTableScrollHost.ts +0 -75
- package/src/composables/useRsTableScrollLayout.ts +0 -255
- package/src/composables/useRsTableSelectionSource.ts +0 -89
- package/src/composables/useRsTableShell.ts +0 -416
- package/src/composables/useRsTableShellChrome.ts +0 -170
- package/src/composables/useRsTableSummary.ts +0 -113
- package/src/composables/useRsTableViewProvide.ts +0 -263
- package/src/composables/useRsTableVirtual.ts +0 -154
- package/src/composables/useRsTabsNav.ts +0 -191
- package/src/composables/useRsToast.ts +0 -48
- package/src/composables/useTableCellTooltip.ts +0 -240
- package/src/composables/useTableEdit.ts +0 -271
- package/src/composables/useTableRowHighlight.ts +0 -50
- package/src/dev/vite-codemirror-deps.ts +0 -20
- package/src/dev/vite-xterm-deps.ts +0 -8
- package/src/icons/custom/api.ts +0 -54
- package/src/icons/custom/clickhouse.ts +0 -52
- package/src/icons/custom/dameng.ts +0 -83
- package/src/icons/custom/ftp.ts +0 -61
- package/src/icons/custom/kingbase.ts +0 -52
- package/src/icons/custom/mongodb.ts +0 -50
- package/src/icons/custom/mysql.ts +0 -51
- package/src/icons/custom/oracle.ts +0 -52
- package/src/icons/custom/postgres.ts +0 -52
- package/src/icons/custom/redis.ts +0 -51
- package/src/icons/custom/sqlite.ts +0 -50
- package/src/icons/custom/sqlserver.ts +0 -52
- package/src/icons/custom/vastbase.ts +0 -57
- package/src/icons/lucide.ts +0 -94
- package/src/icons/registry.ts +0 -35
- package/src/index.ts +0 -813
- package/src/lib/iso-local-datetime.ts +0 -152
- package/src/lib/rs-dayjs.ts +0 -56
- package/src/locale/interpolate.ts +0 -32
- package/src/locale/messages.ts +0 -408
- package/src/locale/types.ts +0 -5
- package/src/monaco/debug-decorations.ts +0 -70
- package/src/monaco/index.ts +0 -23
- package/src/monaco/languages/index.ts +0 -22
- package/src/monaco/languages/mongodb-shell.ts +0 -125
- package/src/monaco/languages/types.ts +0 -59
- package/src/monaco/setup.ts +0 -101
- package/src/styles.css +0 -1364
- package/src/theme/apply.ts +0 -12
- package/src/theme/css-token.ts +0 -107
- package/src/theme/presets.ts +0 -73
- package/src/theme/types.ts +0 -149
- package/src/utils/rs-clipboard.ts +0 -272
- package/src/vite-env.d.ts +0 -7
- package/vite-plugins/monaco-zh-nls.ts +0 -101
- package/vite-plugins/silence-antlr-parse-console.ts +0 -29
- /package/{src → dist}/components/table/rs-table.css +0 -0
- /package/{src → dist}/monaco/debug-decorations.css +0 -0
- /package/{src → dist}/theme/brand.example.css +0 -0
|
@@ -1,1033 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref, useAttrs, useId, watch } from 'vue'
|
|
3
|
-
import { PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from './reka'
|
|
4
|
-
import RsCalendarGrid from './RsCalendarGrid.vue'
|
|
5
|
-
import RsIcon from './RsIcon.vue'
|
|
6
|
-
import RsTimePicker from './RsTimePicker.vue'
|
|
7
|
-
import { useRsI18n } from '../composables/useRsI18n'
|
|
8
|
-
import { RS_COMPONENT_SIZE_ICON_PX, type RsComponentSize } from '../theme/types'
|
|
9
|
-
import { useResolvedRsComponentSize } from './resolve-size'
|
|
10
|
-
import {
|
|
11
|
-
isRsFormItemBoundControl,
|
|
12
|
-
useRsFormContext,
|
|
13
|
-
useRsFormField,
|
|
14
|
-
useRsFormItemContext,
|
|
15
|
-
} from './form-utils'
|
|
16
|
-
import {
|
|
17
|
-
buildLocalInputRules,
|
|
18
|
-
runFormFieldRules,
|
|
19
|
-
type RsFormRuleTrigger,
|
|
20
|
-
} from './form-rules'
|
|
21
|
-
import {
|
|
22
|
-
compareDates,
|
|
23
|
-
EMPTY_DATE_RANGE,
|
|
24
|
-
extractTimeFromDateTime,
|
|
25
|
-
formatDateParts,
|
|
26
|
-
formatDateRangeLabel,
|
|
27
|
-
formatDateDisplay,
|
|
28
|
-
formatDateTimeDisplay,
|
|
29
|
-
formatDateTimeParts,
|
|
30
|
-
formatDateTimeRangeLabel,
|
|
31
|
-
getNextMonth,
|
|
32
|
-
getNowDateTime,
|
|
33
|
-
formatTimestampValue,
|
|
34
|
-
fromInternalPickerValue,
|
|
35
|
-
getTodayDate,
|
|
36
|
-
isDateRangeEmpty,
|
|
37
|
-
isDateRangeOrdered,
|
|
38
|
-
isDateWithinBounds,
|
|
39
|
-
isTimestampRange,
|
|
40
|
-
normalizeShortcutValue,
|
|
41
|
-
parseDateTimeValue,
|
|
42
|
-
parseDateValue,
|
|
43
|
-
parseTimestampValue,
|
|
44
|
-
toInternalPickerValue,
|
|
45
|
-
toRangeEndpointString,
|
|
46
|
-
type RsDatePickerModelValue,
|
|
47
|
-
type RsDatePickerShortcut,
|
|
48
|
-
type RsDatePickerValueFormat,
|
|
49
|
-
type RsDateRangeValue,
|
|
50
|
-
type RsParsedDate,
|
|
51
|
-
} from './date-picker-utils'
|
|
52
|
-
import { formatTimeParts } from './time-picker-utils'
|
|
53
|
-
|
|
54
|
-
export type {
|
|
55
|
-
RsDatePickerModelValue,
|
|
56
|
-
RsDatePickerShortcut,
|
|
57
|
-
RsDatePickerValueFormat,
|
|
58
|
-
RsDateRangeValue,
|
|
59
|
-
} from './date-picker-utils'
|
|
60
|
-
export type RsDatePickerLabelPosition = 'top' | 'left'
|
|
61
|
-
|
|
62
|
-
function isRangeModel(value: RsDatePickerModelValue): value is RsDateRangeValue {
|
|
63
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value) && ('start' in value || 'end' in value)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
defineOptions({ inheritAttrs: false })
|
|
67
|
-
|
|
68
|
-
const model = defineModel<RsDatePickerModelValue>({ default: '' })
|
|
69
|
-
const open = defineModel<boolean>('open', { default: false })
|
|
70
|
-
|
|
71
|
-
const props = withDefaults(
|
|
72
|
-
defineProps<{
|
|
73
|
-
/** 表单字段名,用于 RsForm rules 匹配与校验注册 */
|
|
74
|
-
name?: string
|
|
75
|
-
label?: string
|
|
76
|
-
hint?: string
|
|
77
|
-
placeholder?: string
|
|
78
|
-
disabled?: boolean
|
|
79
|
-
required?: boolean
|
|
80
|
-
range?: boolean
|
|
81
|
-
minDate?: string
|
|
82
|
-
maxDate?: string
|
|
83
|
-
withTime?: boolean
|
|
84
|
-
/**
|
|
85
|
-
* 是否选择秒。未传时:withTime 为 true 则默认带秒,纯日期为 false。
|
|
86
|
-
*/
|
|
87
|
-
withSeconds?: boolean
|
|
88
|
-
/**
|
|
89
|
-
* 绑定值格式(展示仍为墙钟)。
|
|
90
|
-
* string:YYYY-MM-DD[/ HH:mm:ss];timestamp:毫秒;iso:本地偏移 RFC3339;
|
|
91
|
-
* 亦可传入 dayjs 模板(对齐 Element Plus value-format)。
|
|
92
|
-
*/
|
|
93
|
-
valueFormat?: RsDatePickerValueFormat
|
|
94
|
-
labelPosition?: RsDatePickerLabelPosition
|
|
95
|
-
/** 底部快捷选项(有值时替代「今天/现在」链接) */
|
|
96
|
-
shortcuts?: RsDatePickerShortcut[]
|
|
97
|
-
size?: RsComponentSize
|
|
98
|
-
id?: string
|
|
99
|
-
invalid?: boolean
|
|
100
|
-
showValidateMessage?: boolean
|
|
101
|
-
}>(),
|
|
102
|
-
{
|
|
103
|
-
disabled: false,
|
|
104
|
-
required: false,
|
|
105
|
-
range: false,
|
|
106
|
-
withTime: false,
|
|
107
|
-
valueFormat: 'string',
|
|
108
|
-
labelPosition: 'top',
|
|
109
|
-
showValidateMessage: true,
|
|
110
|
-
},
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
const fieldId = useId()
|
|
114
|
-
const attrs = useAttrs()
|
|
115
|
-
const { t } = useRsI18n()
|
|
116
|
-
const resolvedSize = useResolvedRsComponentSize(() => props.size)
|
|
117
|
-
const triggerIconSize = computed(() => RS_COMPONENT_SIZE_ICON_PX[resolvedSize.value])
|
|
118
|
-
/** withTime 默认带秒;显式 withSeconds 优先(勿与 prop 同名,避免模板取到未传 prop) */
|
|
119
|
-
const resolvedWithSeconds = computed(() =>
|
|
120
|
-
props.withSeconds !== undefined ? props.withSeconds : props.withTime,
|
|
121
|
-
)
|
|
122
|
-
const formContext = useRsFormContext()
|
|
123
|
-
const formItem = useRsFormItemContext()
|
|
124
|
-
const boundToItem = computed(() =>
|
|
125
|
-
isRsFormItemBoundControl(formItem, { id: props.id, name: props.name }),
|
|
126
|
-
)
|
|
127
|
-
const autoMessage = ref('')
|
|
128
|
-
const isInvalid = computed(() =>
|
|
129
|
-
Boolean(
|
|
130
|
-
props.invalid ||
|
|
131
|
-
(boundToItem.value && formItem?.invalid.value) ||
|
|
132
|
-
(!boundToItem.value && autoMessage.value),
|
|
133
|
-
),
|
|
134
|
-
)
|
|
135
|
-
const triggerId = computed(() => props.id || fieldId)
|
|
136
|
-
const visibleMessage = computed(() =>
|
|
137
|
-
boundToItem.value || props.showValidateMessage === false ? '' : autoMessage.value,
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
const viewYear = ref(getTodayDate().year)
|
|
141
|
-
const viewMonth = ref(getTodayDate().month)
|
|
142
|
-
const startViewYear = ref(getTodayDate().year)
|
|
143
|
-
const startViewMonth = ref(getTodayDate().month)
|
|
144
|
-
const endViewYear = ref(getTodayDate().year)
|
|
145
|
-
const endViewMonth = ref(getTodayDate().month)
|
|
146
|
-
|
|
147
|
-
const draftDate = ref<RsParsedDate | null>(null)
|
|
148
|
-
const draftStart = ref<RsParsedDate | null>(null)
|
|
149
|
-
const draftEnd = ref<RsParsedDate | null>(null)
|
|
150
|
-
const draftTime = ref('')
|
|
151
|
-
const draftStartTime = ref('')
|
|
152
|
-
const draftEndTime = ref('')
|
|
153
|
-
|
|
154
|
-
const convertOptions = computed(() => ({
|
|
155
|
-
valueFormat: props.valueFormat ?? 'string',
|
|
156
|
-
withTime: props.withTime,
|
|
157
|
-
}))
|
|
158
|
-
|
|
159
|
-
const useTimestamp = computed(() => props.valueFormat === 'timestamp')
|
|
160
|
-
|
|
161
|
-
const rangeModel = computed<RsDateRangeValue>({
|
|
162
|
-
get() {
|
|
163
|
-
if (!props.range) return { ...EMPTY_DATE_RANGE }
|
|
164
|
-
const value = model.value
|
|
165
|
-
const opts = convertOptions.value
|
|
166
|
-
if (isTimestampRange(value)) {
|
|
167
|
-
return {
|
|
168
|
-
start: formatTimestampValue(value[0], opts.withTime),
|
|
169
|
-
end: formatTimestampValue(value[1], opts.withTime),
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (!isRangeModel(value)) return { ...EMPTY_DATE_RANGE }
|
|
173
|
-
return {
|
|
174
|
-
start: toInternalPickerValue(value.start, opts) || undefined,
|
|
175
|
-
end: toInternalPickerValue(value.end, opts) || undefined,
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
set(value) {
|
|
179
|
-
const opts = convertOptions.value
|
|
180
|
-
if (useTimestamp.value) {
|
|
181
|
-
const start = parseTimestampValue(value.start)
|
|
182
|
-
const end = parseTimestampValue(value.end)
|
|
183
|
-
model.value = start != null && end != null ? [start, end] : null
|
|
184
|
-
return
|
|
185
|
-
}
|
|
186
|
-
model.value = {
|
|
187
|
-
start: toRangeEndpointString(fromInternalPickerValue(value.start || '', opts)),
|
|
188
|
-
end: toRangeEndpointString(fromInternalPickerValue(value.end || '', opts)),
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
})
|
|
192
|
-
|
|
193
|
-
const singleModel = computed({
|
|
194
|
-
get() {
|
|
195
|
-
if (props.range) return ''
|
|
196
|
-
return toInternalPickerValue(model.value, convertOptions.value)
|
|
197
|
-
},
|
|
198
|
-
set(value: string) {
|
|
199
|
-
model.value = fromInternalPickerValue(value, convertOptions.value)
|
|
200
|
-
},
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
const startMaxDate = computed(() => {
|
|
204
|
-
if (!draftEnd.value) return props.maxDate
|
|
205
|
-
return formatDateParts(draftEnd.value)
|
|
206
|
-
})
|
|
207
|
-
|
|
208
|
-
const endMinDate = computed(() => {
|
|
209
|
-
if (!draftStart.value) return props.minDate
|
|
210
|
-
return formatDateParts(draftStart.value)
|
|
211
|
-
})
|
|
212
|
-
|
|
213
|
-
const isEmpty = computed(() =>
|
|
214
|
-
props.range ? isDateRangeEmpty(rangeModel.value) : !singleModel.value,
|
|
215
|
-
)
|
|
216
|
-
|
|
217
|
-
const displayValue = computed(() => {
|
|
218
|
-
if (props.range) {
|
|
219
|
-
const formatted = props.withTime
|
|
220
|
-
? formatDateTimeRangeLabel(rangeModel.value, t('datePicker.separator'))
|
|
221
|
-
: formatDateRangeLabel(rangeModel.value, t('datePicker.separator'))
|
|
222
|
-
if (formatted) return formatted
|
|
223
|
-
if (props.placeholder) return props.placeholder
|
|
224
|
-
return props.withTime ? t('dateTimePicker.rangePlaceholder') : t('datePicker.rangePlaceholder')
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (!singleModel.value) {
|
|
228
|
-
return props.placeholder ?? (props.withTime ? t('dateTimePicker.placeholder') : t('datePicker.placeholder'))
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return props.withTime
|
|
232
|
-
? formatDateTimeDisplay(singleModel.value)
|
|
233
|
-
: formatDateDisplay(singleModel.value)
|
|
234
|
-
})
|
|
235
|
-
|
|
236
|
-
const triggerIcon = computed(() => {
|
|
237
|
-
if (props.range || props.withTime) return 'calendar-clock'
|
|
238
|
-
return 'calendar-days'
|
|
239
|
-
})
|
|
240
|
-
|
|
241
|
-
function currentTimeValue(): string {
|
|
242
|
-
const now = getNowDateTime()
|
|
243
|
-
return formatTimeParts(now.hour, now.minute, resolvedWithSeconds.value ? now.second : undefined)
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function resetRangeTimeDrafts(): void {
|
|
247
|
-
const time = currentTimeValue()
|
|
248
|
-
draftStartTime.value = time
|
|
249
|
-
draftEndTime.value = time
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function combineDraftDateTime(date: RsParsedDate, time: string): string | null {
|
|
253
|
-
return formatDateTimeParts(date, time, resolvedWithSeconds.value)
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
function setEndViewFromStart(start: RsParsedDate): void {
|
|
257
|
-
const next = getNextMonth(start.year, start.month)
|
|
258
|
-
endViewYear.value = next.year
|
|
259
|
-
endViewMonth.value = next.month
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
function syncSingleDraft(): void {
|
|
263
|
-
if (props.withTime) {
|
|
264
|
-
const parsed = parseDateTimeValue(singleModel.value)
|
|
265
|
-
if (parsed) {
|
|
266
|
-
draftDate.value = { year: parsed.year, month: parsed.month, day: parsed.day }
|
|
267
|
-
draftTime.value = extractTimeFromDateTime(singleModel.value, resolvedWithSeconds.value)
|
|
268
|
-
viewYear.value = parsed.year
|
|
269
|
-
viewMonth.value = parsed.month
|
|
270
|
-
return
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
const today = getTodayDate()
|
|
274
|
-
draftDate.value = null
|
|
275
|
-
draftTime.value = currentTimeValue()
|
|
276
|
-
viewYear.value = today.year
|
|
277
|
-
viewMonth.value = today.month
|
|
278
|
-
return
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
const parsed = parseDateValue(singleModel.value)
|
|
282
|
-
if (parsed) {
|
|
283
|
-
draftDate.value = parsed
|
|
284
|
-
viewYear.value = parsed.year
|
|
285
|
-
viewMonth.value = parsed.month
|
|
286
|
-
return
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
const today = getTodayDate()
|
|
290
|
-
draftDate.value = null
|
|
291
|
-
viewYear.value = today.year
|
|
292
|
-
viewMonth.value = today.month
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
function syncRangeDraft(): void {
|
|
296
|
-
const today = getTodayDate()
|
|
297
|
-
const value = rangeModel.value
|
|
298
|
-
|
|
299
|
-
if (props.withTime) {
|
|
300
|
-
const start = parseDateTimeValue(value.start)
|
|
301
|
-
const end = parseDateTimeValue(value.end)
|
|
302
|
-
|
|
303
|
-
draftStart.value = start
|
|
304
|
-
? { year: start.year, month: start.month, day: start.day }
|
|
305
|
-
: null
|
|
306
|
-
draftEnd.value = end ? { year: end.year, month: end.month, day: end.day } : null
|
|
307
|
-
|
|
308
|
-
if (start) {
|
|
309
|
-
draftStartTime.value = extractTimeFromDateTime(value.start, resolvedWithSeconds.value)
|
|
310
|
-
startViewYear.value = start.year
|
|
311
|
-
startViewMonth.value = start.month
|
|
312
|
-
} else {
|
|
313
|
-
resetRangeTimeDrafts()
|
|
314
|
-
startViewYear.value = today.year
|
|
315
|
-
startViewMonth.value = today.month
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
if (end) {
|
|
319
|
-
draftEndTime.value = extractTimeFromDateTime(value.end, resolvedWithSeconds.value)
|
|
320
|
-
endViewYear.value = end.year
|
|
321
|
-
endViewMonth.value = end.month
|
|
322
|
-
} else if (start) {
|
|
323
|
-
draftEndTime.value = draftStartTime.value
|
|
324
|
-
setEndViewFromStart(start)
|
|
325
|
-
} else {
|
|
326
|
-
const next = getNextMonth(today.year, today.month)
|
|
327
|
-
endViewYear.value = next.year
|
|
328
|
-
endViewMonth.value = next.month
|
|
329
|
-
}
|
|
330
|
-
return
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
const start = parseDateValue(value.start)
|
|
334
|
-
const end = parseDateValue(value.end)
|
|
335
|
-
|
|
336
|
-
draftStart.value = start
|
|
337
|
-
draftEnd.value = end
|
|
338
|
-
|
|
339
|
-
if (start) {
|
|
340
|
-
startViewYear.value = start.year
|
|
341
|
-
startViewMonth.value = start.month
|
|
342
|
-
} else {
|
|
343
|
-
startViewYear.value = today.year
|
|
344
|
-
startViewMonth.value = today.month
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
if (end) {
|
|
348
|
-
endViewYear.value = end.year
|
|
349
|
-
endViewMonth.value = end.month
|
|
350
|
-
} else if (start) {
|
|
351
|
-
setEndViewFromStart(start)
|
|
352
|
-
} else {
|
|
353
|
-
const next = getNextMonth(today.year, today.month)
|
|
354
|
-
endViewYear.value = next.year
|
|
355
|
-
endViewMonth.value = next.month
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
function syncDraftFromModel(): void {
|
|
360
|
-
if (props.range) {
|
|
361
|
-
syncRangeDraft()
|
|
362
|
-
return
|
|
363
|
-
}
|
|
364
|
-
syncSingleDraft()
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
function confirmSingleSelection(): void {
|
|
368
|
-
if (!draftDate.value) return
|
|
369
|
-
|
|
370
|
-
if (props.withTime) {
|
|
371
|
-
const combined = combineDraftDateTime(draftDate.value, draftTime.value)
|
|
372
|
-
if (!combined) return
|
|
373
|
-
singleModel.value = combined
|
|
374
|
-
open.value = false
|
|
375
|
-
return
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
if (
|
|
379
|
-
!isDateWithinBounds(draftDate.value.year, draftDate.value.month, draftDate.value.day, {
|
|
380
|
-
minDate: props.minDate,
|
|
381
|
-
maxDate: props.maxDate,
|
|
382
|
-
})
|
|
383
|
-
) {
|
|
384
|
-
return
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
singleModel.value = formatDateParts(draftDate.value)
|
|
388
|
-
open.value = false
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
function confirmRangeSelection(): void {
|
|
392
|
-
if (!draftStart.value || !draftEnd.value) return
|
|
393
|
-
|
|
394
|
-
if (props.withTime) {
|
|
395
|
-
const start = combineDraftDateTime(draftStart.value, draftStartTime.value)
|
|
396
|
-
const end = combineDraftDateTime(draftEnd.value, draftEndTime.value)
|
|
397
|
-
if (!start || !end) return
|
|
398
|
-
if (!isDateRangeOrdered({ start, end })) return
|
|
399
|
-
rangeModel.value = { start, end }
|
|
400
|
-
open.value = false
|
|
401
|
-
return
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
const start = formatDateParts(draftStart.value)
|
|
405
|
-
const end = formatDateParts(draftEnd.value)
|
|
406
|
-
if (!isDateRangeOrdered({ start, end })) return
|
|
407
|
-
|
|
408
|
-
if (
|
|
409
|
-
!isDateWithinBounds(draftStart.value.year, draftStart.value.month, draftStart.value.day, {
|
|
410
|
-
minDate: props.minDate,
|
|
411
|
-
maxDate: props.maxDate,
|
|
412
|
-
})
|
|
413
|
-
|| !isDateWithinBounds(draftEnd.value.year, draftEnd.value.month, draftEnd.value.day, {
|
|
414
|
-
minDate: props.minDate,
|
|
415
|
-
maxDate: props.maxDate,
|
|
416
|
-
})
|
|
417
|
-
) {
|
|
418
|
-
return
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
rangeModel.value = { start, end }
|
|
422
|
-
open.value = false
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
function confirmSelection(): void {
|
|
426
|
-
if (props.range) {
|
|
427
|
-
confirmRangeSelection()
|
|
428
|
-
return
|
|
429
|
-
}
|
|
430
|
-
confirmSingleSelection()
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
function applyShortcut(shortcut: RsDatePickerShortcut): void {
|
|
434
|
-
if (props.disabled) return
|
|
435
|
-
const normalized = normalizeShortcutValue(shortcut.value(), { withTime: props.withTime })
|
|
436
|
-
if (!normalized) return
|
|
437
|
-
|
|
438
|
-
if (props.range) {
|
|
439
|
-
const rangeValue: RsDateRangeValue =
|
|
440
|
-
typeof normalized === 'string' ? { start: normalized, end: normalized } : normalized
|
|
441
|
-
if (!rangeValue.start || !rangeValue.end) return
|
|
442
|
-
if (!isDateRangeOrdered(rangeValue)) return
|
|
443
|
-
rangeModel.value = rangeValue
|
|
444
|
-
open.value = false
|
|
445
|
-
return
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
if (typeof normalized !== 'string') return
|
|
449
|
-
singleModel.value = normalized
|
|
450
|
-
open.value = false
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
function clearSelection(): void {
|
|
454
|
-
if (props.range) {
|
|
455
|
-
if (useTimestamp.value) {
|
|
456
|
-
model.value = null
|
|
457
|
-
} else {
|
|
458
|
-
rangeModel.value = { ...EMPTY_DATE_RANGE }
|
|
459
|
-
}
|
|
460
|
-
draftStart.value = null
|
|
461
|
-
draftEnd.value = null
|
|
462
|
-
if (props.withTime) resetRangeTimeDrafts()
|
|
463
|
-
} else {
|
|
464
|
-
singleModel.value = ''
|
|
465
|
-
draftDate.value = null
|
|
466
|
-
if (props.withTime) draftTime.value = currentTimeValue()
|
|
467
|
-
}
|
|
468
|
-
open.value = false
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
function selectToday(): void {
|
|
472
|
-
const today = getTodayDate()
|
|
473
|
-
const now = getNowDateTime()
|
|
474
|
-
|
|
475
|
-
if (props.range) {
|
|
476
|
-
draftStart.value = today
|
|
477
|
-
draftEnd.value = today
|
|
478
|
-
startViewYear.value = today.year
|
|
479
|
-
startViewMonth.value = today.month
|
|
480
|
-
endViewYear.value = today.year
|
|
481
|
-
endViewMonth.value = today.month
|
|
482
|
-
if (props.withTime) {
|
|
483
|
-
const time = formatTimeParts(now.hour, now.minute, resolvedWithSeconds.value ? now.second : undefined)
|
|
484
|
-
draftStartTime.value = time
|
|
485
|
-
draftEndTime.value = time
|
|
486
|
-
}
|
|
487
|
-
confirmRangeSelection()
|
|
488
|
-
return
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
draftDate.value = today
|
|
492
|
-
viewYear.value = today.year
|
|
493
|
-
viewMonth.value = today.month
|
|
494
|
-
if (props.withTime) {
|
|
495
|
-
draftTime.value = formatTimeParts(now.hour, now.minute, resolvedWithSeconds.value ? now.second : undefined)
|
|
496
|
-
}
|
|
497
|
-
confirmSingleSelection()
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
function handleDateSelect(date: RsParsedDate): void {
|
|
501
|
-
draftDate.value = date
|
|
502
|
-
viewYear.value = date.year
|
|
503
|
-
viewMonth.value = date.month
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
function handleStartSelect(date: RsParsedDate): void {
|
|
507
|
-
if (
|
|
508
|
-
!isDateWithinBounds(date.year, date.month, date.day, {
|
|
509
|
-
minDate: props.minDate,
|
|
510
|
-
maxDate: startMaxDate.value,
|
|
511
|
-
})
|
|
512
|
-
) {
|
|
513
|
-
return
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
draftStart.value = date
|
|
517
|
-
startViewYear.value = date.year
|
|
518
|
-
startViewMonth.value = date.month
|
|
519
|
-
|
|
520
|
-
if (draftEnd.value && compareDates(date, draftEnd.value) > 0) {
|
|
521
|
-
draftEnd.value = null
|
|
522
|
-
setEndViewFromStart(date)
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
function handleEndSelect(date: RsParsedDate): void {
|
|
527
|
-
if (
|
|
528
|
-
!isDateWithinBounds(date.year, date.month, date.day, {
|
|
529
|
-
minDate: endMinDate.value,
|
|
530
|
-
maxDate: props.maxDate,
|
|
531
|
-
})
|
|
532
|
-
) {
|
|
533
|
-
return
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
if (draftStart.value && compareDates(date, draftStart.value) < 0) {
|
|
537
|
-
return
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
draftEnd.value = date
|
|
541
|
-
endViewYear.value = date.year
|
|
542
|
-
endViewMonth.value = date.month
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
function clearValidation(): void {
|
|
546
|
-
autoMessage.value = ''
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
function setFieldValue(value: unknown): void {
|
|
550
|
-
if (props.range) {
|
|
551
|
-
if (isRangeModel(value as RsDatePickerModelValue)) {
|
|
552
|
-
model.value = value as RsDateRangeValue
|
|
553
|
-
return
|
|
554
|
-
}
|
|
555
|
-
if (Array.isArray(value) && value.length >= 2) {
|
|
556
|
-
model.value = { start: String(value[0] ?? ''), end: String(value[1] ?? '') }
|
|
557
|
-
return
|
|
558
|
-
}
|
|
559
|
-
model.value = { ...EMPTY_DATE_RANGE }
|
|
560
|
-
return
|
|
561
|
-
}
|
|
562
|
-
model.value = value == null ? '' : (value as RsDatePickerModelValue)
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
async function runValidate(trigger: RsFormRuleTrigger = 'submit') {
|
|
566
|
-
const formRules = formContext?.getFieldRules(props.name) ?? []
|
|
567
|
-
const localRules = buildLocalInputRules({ required: props.required })
|
|
568
|
-
const rules = [...formRules, ...localRules]
|
|
569
|
-
if (!rules.length) {
|
|
570
|
-
autoMessage.value = ''
|
|
571
|
-
return { valid: true as const, name: props.name }
|
|
572
|
-
}
|
|
573
|
-
const result = await runFormFieldRules(model.value, rules, { trigger })
|
|
574
|
-
autoMessage.value = result.message ?? ''
|
|
575
|
-
return { valid: result.valid, message: result.message, name: props.name }
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
useRsFormField(() => ({
|
|
579
|
-
get name() {
|
|
580
|
-
return props.name
|
|
581
|
-
},
|
|
582
|
-
getValue: () => model.value,
|
|
583
|
-
setValue: setFieldValue,
|
|
584
|
-
validate: (trigger) => runValidate(trigger ?? 'submit'),
|
|
585
|
-
clearValidation,
|
|
586
|
-
setError: (message: string) => {
|
|
587
|
-
autoMessage.value = message
|
|
588
|
-
},
|
|
589
|
-
}))
|
|
590
|
-
|
|
591
|
-
defineExpose({
|
|
592
|
-
setValue: setFieldValue,
|
|
593
|
-
clearValidation,
|
|
594
|
-
validate: runValidate,
|
|
595
|
-
})
|
|
596
|
-
|
|
597
|
-
watch(open, (isOpen) => {
|
|
598
|
-
if (isOpen) syncDraftFromModel()
|
|
599
|
-
// 关闭面板后按 change 触发校验(对齐选择类控件)
|
|
600
|
-
if (!isOpen && props.name) void runValidate('change')
|
|
601
|
-
})
|
|
602
|
-
</script>
|
|
603
|
-
|
|
604
|
-
<template>
|
|
605
|
-
<div class="rs-field" :class="`rs-field--label-${labelPosition}`">
|
|
606
|
-
<span v-if="label" class="rs-field__label">
|
|
607
|
-
<label v-if="labelPosition === 'left'" :for="fieldId">{{ label }}</label>
|
|
608
|
-
<template v-else>{{ label }}</template>
|
|
609
|
-
<span v-if="required" class="rs-field__required" aria-hidden="true">*</span>
|
|
610
|
-
</span>
|
|
611
|
-
|
|
612
|
-
<div class="rs-date-picker" :class="`rs-date-picker--${resolvedSize}`">
|
|
613
|
-
<PopoverRoot v-model:open="open">
|
|
614
|
-
<PopoverTrigger
|
|
615
|
-
v-bind="attrs"
|
|
616
|
-
:id="triggerId"
|
|
617
|
-
type="button"
|
|
618
|
-
class="rs-date-picker__trigger"
|
|
619
|
-
:class="{
|
|
620
|
-
'rs-date-picker__trigger--placeholder': isEmpty,
|
|
621
|
-
'rs-date-picker__trigger--invalid': isInvalid,
|
|
622
|
-
}"
|
|
623
|
-
:disabled="disabled"
|
|
624
|
-
:aria-invalid="isInvalid || undefined"
|
|
625
|
-
>
|
|
626
|
-
<span class="rs-date-picker__leading">
|
|
627
|
-
<RsIcon :name="triggerIcon" :size="triggerIconSize" class="rs-date-picker__icon" />
|
|
628
|
-
<span class="rs-date-picker__value">{{ displayValue }}</span>
|
|
629
|
-
</span>
|
|
630
|
-
<RsIcon name="chevron-down" :size="triggerIconSize" class="rs-date-picker__chevron" />
|
|
631
|
-
</PopoverTrigger>
|
|
632
|
-
|
|
633
|
-
<PopoverPortal>
|
|
634
|
-
<PopoverContent
|
|
635
|
-
class="rs-date-picker__content"
|
|
636
|
-
:class="{ 'rs-date-picker__content--range': range }"
|
|
637
|
-
:side-offset="6"
|
|
638
|
-
align="start"
|
|
639
|
-
>
|
|
640
|
-
<div v-if="open" class="rs-date-picker__panel">
|
|
641
|
-
<template v-if="range">
|
|
642
|
-
<div class="rs-date-picker__range-grid">
|
|
643
|
-
<section class="rs-date-picker__range-pane">
|
|
644
|
-
<span class="rs-date-picker__pane-title">
|
|
645
|
-
{{ withTime ? t('dateTimePicker.rangeStart') : t('datePicker.rangeStart') }}
|
|
646
|
-
</span>
|
|
647
|
-
<RsCalendarGrid
|
|
648
|
-
v-model:view-year="startViewYear"
|
|
649
|
-
v-model:view-month="startViewMonth"
|
|
650
|
-
:selected="draftStart"
|
|
651
|
-
:range-start="draftStart"
|
|
652
|
-
:range-end="draftEnd"
|
|
653
|
-
:min-date="minDate"
|
|
654
|
-
:max-date="startMaxDate"
|
|
655
|
-
@select="handleStartSelect"
|
|
656
|
-
/>
|
|
657
|
-
<div v-if="withTime" class="rs-date-picker__time-row">
|
|
658
|
-
<span class="rs-date-picker__time-label">{{ t('dateTimePicker.time') }}</span>
|
|
659
|
-
<RsTimePicker
|
|
660
|
-
v-model="draftStartTime"
|
|
661
|
-
class="rs-date-picker__time-picker"
|
|
662
|
-
embedded
|
|
663
|
-
:size="resolvedSize"
|
|
664
|
-
:with-seconds="resolvedWithSeconds"
|
|
665
|
-
:disabled="!draftStart || disabled"
|
|
666
|
-
/>
|
|
667
|
-
</div>
|
|
668
|
-
</section>
|
|
669
|
-
|
|
670
|
-
<section class="rs-date-picker__range-pane">
|
|
671
|
-
<span class="rs-date-picker__pane-title">
|
|
672
|
-
{{ withTime ? t('dateTimePicker.rangeEnd') : t('datePicker.rangeEnd') }}
|
|
673
|
-
</span>
|
|
674
|
-
<RsCalendarGrid
|
|
675
|
-
v-model:view-year="endViewYear"
|
|
676
|
-
v-model:view-month="endViewMonth"
|
|
677
|
-
:selected="draftEnd"
|
|
678
|
-
:range-start="draftStart"
|
|
679
|
-
:range-end="draftEnd"
|
|
680
|
-
:min-date="endMinDate"
|
|
681
|
-
:max-date="maxDate"
|
|
682
|
-
@select="handleEndSelect"
|
|
683
|
-
/>
|
|
684
|
-
<div v-if="withTime" class="rs-date-picker__time-row">
|
|
685
|
-
<span class="rs-date-picker__time-label">{{ t('dateTimePicker.time') }}</span>
|
|
686
|
-
<RsTimePicker
|
|
687
|
-
v-model="draftEndTime"
|
|
688
|
-
class="rs-date-picker__time-picker"
|
|
689
|
-
embedded
|
|
690
|
-
:size="resolvedSize"
|
|
691
|
-
:with-seconds="resolvedWithSeconds"
|
|
692
|
-
:disabled="!draftEnd || disabled"
|
|
693
|
-
/>
|
|
694
|
-
</div>
|
|
695
|
-
</section>
|
|
696
|
-
</div>
|
|
697
|
-
</template>
|
|
698
|
-
|
|
699
|
-
<template v-else>
|
|
700
|
-
<RsCalendarGrid
|
|
701
|
-
v-model:view-year="viewYear"
|
|
702
|
-
v-model:view-month="viewMonth"
|
|
703
|
-
:selected="draftDate"
|
|
704
|
-
:min-date="minDate"
|
|
705
|
-
:max-date="maxDate"
|
|
706
|
-
@select="handleDateSelect"
|
|
707
|
-
/>
|
|
708
|
-
<div v-if="withTime" class="rs-date-picker__time-row">
|
|
709
|
-
<span class="rs-date-picker__time-label">{{ t('dateTimePicker.time') }}</span>
|
|
710
|
-
<RsTimePicker
|
|
711
|
-
v-model="draftTime"
|
|
712
|
-
class="rs-date-picker__time-picker"
|
|
713
|
-
embedded
|
|
714
|
-
:size="resolvedSize"
|
|
715
|
-
:with-seconds="resolvedWithSeconds"
|
|
716
|
-
:disabled="!draftDate || disabled"
|
|
717
|
-
/>
|
|
718
|
-
</div>
|
|
719
|
-
</template>
|
|
720
|
-
|
|
721
|
-
<footer class="rs-date-picker__footer">
|
|
722
|
-
<div class="rs-date-picker__footer-start">
|
|
723
|
-
<div v-if="shortcuts?.length" class="rs-date-picker__shortcuts">
|
|
724
|
-
<button
|
|
725
|
-
v-for="item in shortcuts"
|
|
726
|
-
:key="item.label"
|
|
727
|
-
type="button"
|
|
728
|
-
class="rs-date-picker__shortcut"
|
|
729
|
-
:disabled="disabled"
|
|
730
|
-
@click="applyShortcut(item)"
|
|
731
|
-
>
|
|
732
|
-
{{ item.label }}
|
|
733
|
-
</button>
|
|
734
|
-
</div>
|
|
735
|
-
<button v-else type="button" class="rs-date-picker__link" @click="selectToday">
|
|
736
|
-
{{
|
|
737
|
-
range
|
|
738
|
-
? withTime
|
|
739
|
-
? t('dateTimePicker.now')
|
|
740
|
-
: t('datePicker.rangeToday')
|
|
741
|
-
: withTime
|
|
742
|
-
? t('dateTimePicker.now')
|
|
743
|
-
: t('datePicker.today')
|
|
744
|
-
}}
|
|
745
|
-
</button>
|
|
746
|
-
</div>
|
|
747
|
-
<div class="rs-date-picker__actions">
|
|
748
|
-
<button type="button" class="rs-date-picker__ghost" @click="clearSelection">
|
|
749
|
-
{{ withTime ? t('dateTimePicker.clear') : t('datePicker.clear') }}
|
|
750
|
-
</button>
|
|
751
|
-
<button
|
|
752
|
-
type="button"
|
|
753
|
-
class="rs-date-picker__confirm"
|
|
754
|
-
:disabled="range ? !draftStart || !draftEnd : !draftDate || (withTime && !draftTime)"
|
|
755
|
-
@click="confirmSelection"
|
|
756
|
-
>
|
|
757
|
-
{{ t('datePicker.confirm') }}
|
|
758
|
-
</button>
|
|
759
|
-
</div>
|
|
760
|
-
</footer>
|
|
761
|
-
</div>
|
|
762
|
-
</PopoverContent>
|
|
763
|
-
</PopoverPortal>
|
|
764
|
-
</PopoverRoot>
|
|
765
|
-
</div>
|
|
766
|
-
|
|
767
|
-
<p v-if="visibleMessage" class="rs-date-picker-field__error" role="alert">
|
|
768
|
-
{{ visibleMessage }}
|
|
769
|
-
</p>
|
|
770
|
-
<span v-if="hint" class="rs-field__hint">{{ hint }}</span>
|
|
771
|
-
</div>
|
|
772
|
-
</template>
|
|
773
|
-
|
|
774
|
-
<style scoped>
|
|
775
|
-
.rs-date-picker {
|
|
776
|
-
width: 100%;
|
|
777
|
-
}
|
|
778
|
-
.rs-date-picker__trigger {
|
|
779
|
-
display: inline-flex;
|
|
780
|
-
align-items: center;
|
|
781
|
-
justify-content: space-between;
|
|
782
|
-
gap: var(--rs-space-sm);
|
|
783
|
-
box-sizing: border-box;
|
|
784
|
-
width: 100%;
|
|
785
|
-
height: var(--rs-control-height-md);
|
|
786
|
-
min-height: var(--rs-control-height-md);
|
|
787
|
-
padding: 0 var(--rs-space-md);
|
|
788
|
-
border: 1px solid var(--rs-input-border, var(--rs-border));
|
|
789
|
-
border-radius: var(--rs-radius-sm);
|
|
790
|
-
background: var(--rs-input-bg);
|
|
791
|
-
color: var(--rs-text);
|
|
792
|
-
font: inherit;
|
|
793
|
-
font-size: var(--rs-font-size-sm);
|
|
794
|
-
line-height: var(--rs-line-height-tight);
|
|
795
|
-
text-align: left;
|
|
796
|
-
cursor: pointer;
|
|
797
|
-
outline: none;
|
|
798
|
-
box-shadow: var(--rs-input-shadow, none);
|
|
799
|
-
transition:
|
|
800
|
-
border-color var(--rs-transition-fast),
|
|
801
|
-
box-shadow var(--rs-transition-fast),
|
|
802
|
-
background var(--rs-transition-fast);
|
|
803
|
-
}
|
|
804
|
-
.rs-date-picker--ssm .rs-date-picker__trigger {
|
|
805
|
-
height: var(--rs-control-height-ssm);
|
|
806
|
-
min-height: var(--rs-control-height-ssm);
|
|
807
|
-
padding: 0 var(--rs-space-xs);
|
|
808
|
-
font-size: var(--rs-font-size-xs);
|
|
809
|
-
}
|
|
810
|
-
.rs-date-picker--sm .rs-date-picker__trigger {
|
|
811
|
-
height: var(--rs-control-height-sm);
|
|
812
|
-
min-height: var(--rs-control-height-sm);
|
|
813
|
-
padding: 0 var(--rs-space-sm);
|
|
814
|
-
font-size: var(--rs-font-size-xs);
|
|
815
|
-
}
|
|
816
|
-
.rs-date-picker--lg .rs-date-picker__trigger {
|
|
817
|
-
height: var(--rs-control-height-lg);
|
|
818
|
-
min-height: var(--rs-control-height-lg);
|
|
819
|
-
padding: 0 var(--rs-space-lg);
|
|
820
|
-
font-size: var(--rs-font-size-base);
|
|
821
|
-
}
|
|
822
|
-
.rs-date-picker__trigger:hover:not(:disabled) {
|
|
823
|
-
border-color: var(--rs-input-border-hover, var(--rs-border));
|
|
824
|
-
}
|
|
825
|
-
.rs-date-picker__trigger:focus-visible {
|
|
826
|
-
outline: none;
|
|
827
|
-
border-color: var(--rs-focus-border, var(--rs-primary));
|
|
828
|
-
background: var(--rs-input-bg);
|
|
829
|
-
box-shadow:
|
|
830
|
-
var(--rs-input-shadow, none),
|
|
831
|
-
0 0 0 var(--rs-focus-ring-width, 2px) var(--rs-focus-ring);
|
|
832
|
-
}
|
|
833
|
-
.rs-date-picker__trigger:disabled {
|
|
834
|
-
opacity: 0.38;
|
|
835
|
-
cursor: not-allowed;
|
|
836
|
-
}
|
|
837
|
-
.rs-date-picker__trigger--placeholder .rs-date-picker__value {
|
|
838
|
-
color: var(--rs-placeholder);
|
|
839
|
-
}
|
|
840
|
-
.rs-date-picker__trigger--invalid {
|
|
841
|
-
border-color: var(--rs-danger, var(--rs-color-danger, #dc2626));
|
|
842
|
-
}
|
|
843
|
-
.rs-date-picker__trigger--invalid:focus-visible {
|
|
844
|
-
border-color: var(--rs-danger, var(--rs-color-danger, #dc2626));
|
|
845
|
-
box-shadow:
|
|
846
|
-
var(--rs-input-shadow, none),
|
|
847
|
-
0 0 0 var(--rs-focus-ring-width, 2px)
|
|
848
|
-
color-mix(in srgb, var(--rs-danger, #dc2626) 14%, transparent);
|
|
849
|
-
}
|
|
850
|
-
.rs-date-picker-field__error {
|
|
851
|
-
margin: var(--rs-space-xs) 0 0;
|
|
852
|
-
color: var(--rs-danger, var(--rs-color-danger, #dc2626));
|
|
853
|
-
font-size: var(--rs-font-size-xs);
|
|
854
|
-
line-height: var(--rs-line-height-tight);
|
|
855
|
-
}
|
|
856
|
-
.rs-date-picker__leading {
|
|
857
|
-
display: inline-flex;
|
|
858
|
-
min-width: 0;
|
|
859
|
-
flex: 1;
|
|
860
|
-
align-items: center;
|
|
861
|
-
gap: var(--rs-space-sm);
|
|
862
|
-
}
|
|
863
|
-
.rs-date-picker__icon,
|
|
864
|
-
.rs-date-picker__chevron {
|
|
865
|
-
flex-shrink: 0;
|
|
866
|
-
color: var(--rs-muted);
|
|
867
|
-
}
|
|
868
|
-
.rs-date-picker__value {
|
|
869
|
-
min-width: 0;
|
|
870
|
-
overflow: hidden;
|
|
871
|
-
text-overflow: ellipsis;
|
|
872
|
-
white-space: nowrap;
|
|
873
|
-
}
|
|
874
|
-
</style>
|
|
875
|
-
|
|
876
|
-
<style>
|
|
877
|
-
.rs-date-picker__content {
|
|
878
|
-
/* 高于 RsDialog,避免在对话框内被遮挡 */
|
|
879
|
-
z-index: calc(var(--rs-z-modal) + 2);
|
|
880
|
-
padding: 0.75rem;
|
|
881
|
-
border: 1px solid var(--rs-border);
|
|
882
|
-
border-radius: var(--rs-radius);
|
|
883
|
-
background: var(--rs-surface-elevated);
|
|
884
|
-
box-shadow: var(--rs-shadow-lg);
|
|
885
|
-
outline: none;
|
|
886
|
-
/* 允许页脚/时间行完整展示,避免被裁切 */
|
|
887
|
-
overflow: visible;
|
|
888
|
-
}
|
|
889
|
-
.rs-date-picker__content--range {
|
|
890
|
-
width: min(42rem, calc(100vw - 2rem));
|
|
891
|
-
}
|
|
892
|
-
.rs-date-picker__content:not(.rs-date-picker__content--range) {
|
|
893
|
-
width: min(20rem, calc(100vw - 2rem));
|
|
894
|
-
}
|
|
895
|
-
.rs-date-picker__panel {
|
|
896
|
-
display: flex;
|
|
897
|
-
flex-direction: column;
|
|
898
|
-
gap: var(--rs-space-sm);
|
|
899
|
-
overflow: visible;
|
|
900
|
-
}
|
|
901
|
-
.rs-date-picker__range-grid {
|
|
902
|
-
display: grid;
|
|
903
|
-
gap: 0.75rem;
|
|
904
|
-
}
|
|
905
|
-
@media (min-width: 40rem) {
|
|
906
|
-
.rs-date-picker__range-grid {
|
|
907
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
.rs-date-picker__range-pane {
|
|
911
|
-
display: flex;
|
|
912
|
-
flex-direction: column;
|
|
913
|
-
gap: var(--rs-space-sm);
|
|
914
|
-
padding: 0.5rem;
|
|
915
|
-
border: 1px solid var(--rs-border-subtle);
|
|
916
|
-
border-radius: var(--rs-radius-sm);
|
|
917
|
-
background: color-mix(in srgb, var(--rs-surface) 72%, transparent);
|
|
918
|
-
}
|
|
919
|
-
.rs-date-picker__pane-title {
|
|
920
|
-
font-size: var(--rs-font-size-xs);
|
|
921
|
-
font-weight: var(--rs-font-weight-semibold);
|
|
922
|
-
color: var(--rs-muted);
|
|
923
|
-
}
|
|
924
|
-
.rs-date-picker__footer {
|
|
925
|
-
position: relative;
|
|
926
|
-
z-index: 1;
|
|
927
|
-
display: flex;
|
|
928
|
-
align-items: center;
|
|
929
|
-
justify-content: space-between;
|
|
930
|
-
gap: var(--rs-space-sm);
|
|
931
|
-
margin-top: var(--rs-space-xs);
|
|
932
|
-
padding-top: 0.75rem;
|
|
933
|
-
border-top: 1px solid var(--rs-border-subtle);
|
|
934
|
-
background: var(--rs-surface-elevated);
|
|
935
|
-
}
|
|
936
|
-
.rs-date-picker__footer-start {
|
|
937
|
-
display: flex;
|
|
938
|
-
flex: 1;
|
|
939
|
-
align-items: center;
|
|
940
|
-
min-width: 0;
|
|
941
|
-
}
|
|
942
|
-
.rs-date-picker__shortcuts {
|
|
943
|
-
display: flex;
|
|
944
|
-
flex-wrap: wrap;
|
|
945
|
-
gap: 0.375rem;
|
|
946
|
-
align-items: center;
|
|
947
|
-
}
|
|
948
|
-
.rs-date-picker__shortcut {
|
|
949
|
-
padding: 0.125rem 0.5rem;
|
|
950
|
-
border: 1px solid var(--rs-border);
|
|
951
|
-
border-radius: var(--rs-radius-xs);
|
|
952
|
-
background: transparent;
|
|
953
|
-
color: var(--rs-text);
|
|
954
|
-
font-size: var(--rs-font-size-xs);
|
|
955
|
-
line-height: 1.5;
|
|
956
|
-
cursor: pointer;
|
|
957
|
-
transition:
|
|
958
|
-
border-color var(--rs-transition-fast),
|
|
959
|
-
color var(--rs-transition-fast),
|
|
960
|
-
background var(--rs-transition-fast);
|
|
961
|
-
}
|
|
962
|
-
.rs-date-picker__shortcut:hover:not(:disabled) {
|
|
963
|
-
border-color: var(--rs-primary);
|
|
964
|
-
color: var(--rs-primary);
|
|
965
|
-
background: color-mix(in srgb, var(--rs-primary) 8%, transparent);
|
|
966
|
-
}
|
|
967
|
-
.rs-date-picker__shortcut:disabled {
|
|
968
|
-
opacity: 0.38;
|
|
969
|
-
cursor: not-allowed;
|
|
970
|
-
}
|
|
971
|
-
.rs-date-picker__link {
|
|
972
|
-
border: 0;
|
|
973
|
-
background: transparent;
|
|
974
|
-
color: var(--rs-primary);
|
|
975
|
-
font-size: var(--rs-font-size-xs);
|
|
976
|
-
cursor: pointer;
|
|
977
|
-
}
|
|
978
|
-
.rs-date-picker__link:hover {
|
|
979
|
-
text-decoration: underline;
|
|
980
|
-
}
|
|
981
|
-
.rs-date-picker__actions {
|
|
982
|
-
display: inline-flex;
|
|
983
|
-
align-items: center;
|
|
984
|
-
gap: var(--rs-space-xs);
|
|
985
|
-
}
|
|
986
|
-
.rs-date-picker__ghost,
|
|
987
|
-
.rs-date-picker__confirm {
|
|
988
|
-
border: 0;
|
|
989
|
-
border-radius: var(--rs-radius-sm);
|
|
990
|
-
padding: 0.375rem 0.625rem;
|
|
991
|
-
font-size: var(--rs-font-size-xs);
|
|
992
|
-
cursor: pointer;
|
|
993
|
-
}
|
|
994
|
-
.rs-date-picker__ghost {
|
|
995
|
-
background: transparent;
|
|
996
|
-
color: var(--rs-muted);
|
|
997
|
-
}
|
|
998
|
-
.rs-date-picker__ghost:hover {
|
|
999
|
-
background: var(--rs-surface-hover);
|
|
1000
|
-
color: var(--rs-text);
|
|
1001
|
-
}
|
|
1002
|
-
.rs-date-picker__confirm {
|
|
1003
|
-
background: var(--rs-primary);
|
|
1004
|
-
color: var(--rs-primary-foreground);
|
|
1005
|
-
}
|
|
1006
|
-
.rs-date-picker__confirm:hover:not(:disabled) {
|
|
1007
|
-
opacity: 0.92;
|
|
1008
|
-
}
|
|
1009
|
-
.rs-date-picker__confirm:disabled {
|
|
1010
|
-
opacity: 0.38;
|
|
1011
|
-
cursor: not-allowed;
|
|
1012
|
-
}
|
|
1013
|
-
.rs-date-picker__time-row {
|
|
1014
|
-
position: relative;
|
|
1015
|
-
z-index: 1;
|
|
1016
|
-
display: flex;
|
|
1017
|
-
align-items: center;
|
|
1018
|
-
gap: var(--rs-space-sm);
|
|
1019
|
-
padding-top: var(--rs-space-sm);
|
|
1020
|
-
border-top: 1px solid var(--rs-border-subtle);
|
|
1021
|
-
background: var(--rs-surface-elevated);
|
|
1022
|
-
}
|
|
1023
|
-
.rs-date-picker__time-label {
|
|
1024
|
-
flex-shrink: 0;
|
|
1025
|
-
font-size: var(--rs-font-size-xs);
|
|
1026
|
-
font-weight: var(--rs-font-weight-medium);
|
|
1027
|
-
color: var(--rs-muted);
|
|
1028
|
-
}
|
|
1029
|
-
.rs-date-picker__time-picker {
|
|
1030
|
-
flex: 1;
|
|
1031
|
-
min-width: 0;
|
|
1032
|
-
}
|
|
1033
|
-
</style>
|