niuma-ui 2.0.3 → 2.0.9
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 +96 -0
- package/dist/components/_shared/index.d.ts +2 -2
- package/dist/components/_shared/src/overlay-utils.d.ts +44 -1
- package/dist/components/_shared/src/overlay-utils.js +87 -2
- package/dist/components/_shared/src/reka.d.ts +1 -1
- package/dist/components/_shared/src/reka.js +2 -2
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/src/RsAlert.css +120 -65
- package/dist/components/alert/src/RsAlert.d.ts +24 -5
- package/dist/components/alert/src/RsAlert.impl.js +108 -36
- package/dist/components/alert/src/RsAlert.js +1 -1
- package/dist/components/alert/src/alert-utils.d.ts +37 -0
- package/dist/components/alert/src/alert-utils.js +71 -0
- package/dist/components/anchor/index.d.ts +1 -1
- package/dist/components/anchor/src/RsAnchor.css +63 -32
- package/dist/components/anchor/src/RsAnchor.d.ts +29 -2
- package/dist/components/anchor/src/RsAnchor.impl.js +199 -81
- package/dist/components/anchor/src/RsAnchor.js +1 -1
- package/dist/components/anchor/src/anchor-utils.d.ts +36 -4
- package/dist/components/anchor/src/anchor-utils.js +81 -19
- package/dist/components/auto-complete/index.d.ts +2 -0
- package/dist/components/auto-complete/src/RsAutoComplete.css +122 -0
- package/dist/components/auto-complete/src/RsAutoComplete.d.ts +47 -7
- package/dist/components/auto-complete/src/RsAutoComplete.impl.js +180 -72
- package/dist/components/auto-complete/src/RsAutoComplete.js +4 -1
- package/dist/components/auto-complete/src/auto-complete-utils.d.ts +7 -0
- package/dist/components/auto-complete/src/auto-complete-utils.js +17 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/avatar/src/RsAvatar.css +36 -19
- package/dist/components/avatar/src/RsAvatar.d.ts +9 -3
- package/dist/components/avatar/src/RsAvatar.impl.js +57 -33
- package/dist/components/avatar/src/RsAvatar.js +2 -1
- package/dist/components/avatar/src/avatar-utils.d.ts +16 -7
- package/dist/components/avatar/src/avatar-utils.js +41 -3
- package/dist/components/breadcrumb/index.d.ts +1 -1
- package/dist/components/breadcrumb/src/RsBreadcrumb.css +50 -17
- package/dist/components/breadcrumb/src/RsBreadcrumb.d.ts +45 -6
- package/dist/components/breadcrumb/src/RsBreadcrumb.impl.js +111 -12
- package/dist/components/breadcrumb/src/RsBreadcrumb.js +2 -1
- package/dist/components/breadcrumb/src/breadcrumb-utils.d.ts +37 -5
- package/dist/components/breadcrumb/src/breadcrumb-utils.js +70 -9
- package/dist/components/button/src/RsButton.impl.js +1 -1
- package/dist/components/calendar-grid/index.d.ts +2 -0
- package/dist/components/calendar-grid/src/RsCalendarGrid.css +105 -45
- package/dist/components/calendar-grid/src/RsCalendarGrid.d.ts +62 -2
- package/dist/components/calendar-grid/src/RsCalendarGrid.impl.js +265 -94
- package/dist/components/calendar-grid/src/RsCalendarGrid.js +1 -1
- package/dist/components/calendar-grid/src/calendar-grid-utils.d.ts +72 -0
- package/dist/components/calendar-grid/src/calendar-grid-utils.js +122 -0
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/src/RsCard.css +108 -98
- package/dist/components/card/src/RsCard.d.ts +4 -13
- package/dist/components/card/src/RsCard.impl.js +29 -25
- package/dist/components/card/src/RsCard.js +2 -1
- package/dist/components/card/src/card-utils.d.ts +25 -0
- package/dist/components/card/src/card-utils.js +10 -0
- package/dist/components/cascader/index.d.ts +1 -0
- package/dist/components/cascader/src/RsCascader.css +175 -30
- package/dist/components/cascader/src/RsCascader.d.ts +15 -3
- package/dist/components/cascader/src/RsCascader.impl.js +277 -48
- package/dist/components/cascader/src/RsCascader.js +1 -1
- package/dist/components/cascader/src/cascader-utils.d.ts +2 -0
- package/dist/components/cascader/src/cascader-utils.js +8 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/src/RsCheckbox.css +46 -23
- package/dist/components/checkbox/src/RsCheckbox.d.ts +11 -1
- package/dist/components/checkbox/src/RsCheckbox.impl.js +37 -9
- package/dist/components/checkbox/src/RsCheckbox.js +2 -1
- package/dist/components/checkbox/src/checkbox-utils.d.ts +4 -0
- package/dist/components/checkbox/src/checkbox-utils.js +12 -0
- package/dist/components/code-block/index.d.ts +1 -0
- package/dist/components/code-block/src/RsCodeBlock.css +93 -52
- package/dist/components/code-block/src/RsCodeBlock.d.ts +36 -9
- package/dist/components/code-block/src/RsCodeBlock.impl.js +203 -84
- package/dist/components/code-block/src/RsCodeBlock.js +1 -1
- package/dist/components/code-block/src/code-block-highlight.d.ts +4 -0
- package/dist/components/code-block/src/code-block-highlight.js +34 -0
- package/dist/components/code-block/src/code-block-utils.d.ts +23 -0
- package/dist/components/code-block/src/code-block-utils.js +71 -0
- package/dist/components/code-editor/index.d.ts +1 -1
- package/dist/components/code-editor/src/RsCodeEditor.css +118 -92
- package/dist/components/code-editor/src/RsCodeEditor.d.ts +14 -3
- package/dist/components/code-editor/src/RsCodeEditor.impl.js +261 -94
- package/dist/components/code-editor/src/RsCodeEditor.js +1 -1
- package/dist/components/code-editor/src/code-editor-utils.d.ts +15 -0
- package/dist/components/code-editor/src/code-editor-utils.js +36 -1
- package/dist/components/code-editor/src/code-mirror-completion.d.ts +1 -1
- package/dist/components/code-editor/src/code-mirror-completion.js +8 -5
- package/dist/components/code-editor/src/code-mirror-diagnostics.d.ts +2 -3
- package/dist/components/code-editor/src/code-mirror-diagnostics.js +3 -4
- package/dist/components/code-editor/src/code-mirror-ghost.d.ts +1 -1
- package/dist/components/code-editor/src/code-mirror-ghost.js +12 -3
- package/dist/components/code-editor/src/code-mirror-inline-edit.js +8 -3
- package/dist/components/code-editor/src/code-mirror-intel.d.ts +2 -2
- package/dist/components/code-editor/src/code-mirror-intel.js +50 -39
- package/dist/components/code-editor/src/code-mirror-lang.js +4 -0
- package/dist/components/code-editor/src/code-mirror-session.d.ts +13 -0
- package/dist/components/code-editor/src/code-mirror-session.js +30 -0
- package/dist/components/container/index.d.ts +1 -1
- package/dist/components/container/src/RsContainer.css +11 -11
- package/dist/components/container/src/RsContainer.d.ts +2 -12
- package/dist/components/container/src/RsContainer.impl.js +10 -57
- package/dist/components/container/src/RsContainer.js +1 -1
- package/dist/components/container/src/container-utils.d.ts +23 -0
- package/dist/components/container/src/container-utils.js +51 -0
- package/dist/components/context-menu/index.d.ts +1 -1
- package/dist/components/context-menu/src/RsContextMenu.css +115 -89
- package/dist/components/context-menu/src/RsContextMenu.d.ts +32 -11
- package/dist/components/context-menu/src/RsContextMenu.impl.js +795 -48
- package/dist/components/context-menu/src/RsContextMenuItems.d.ts +25 -1
- package/dist/components/context-menu/src/RsContextMenuItems.impl.js +110 -61
- package/dist/components/context-menu/src/context-menu-utils.d.ts +89 -3
- package/dist/components/context-menu/src/context-menu-utils.js +168 -3
- package/dist/components/date-picker/index.d.ts +4 -2
- package/dist/components/date-picker/src/RsDatePicker.css +42 -22
- package/dist/components/date-picker/src/RsDatePicker.d.ts +44 -20
- package/dist/components/date-picker/src/RsDatePicker.impl.js +484 -222
- package/dist/components/date-picker/src/RsDatePicker.js +1 -3
- package/dist/components/date-picker/src/RsDateTimePicker.d.ts +33 -6
- package/dist/components/date-picker/src/RsDateTimePicker.impl.js +47 -6
- package/dist/components/date-picker/src/date-picker-utils.d.ts +19 -0
- package/dist/components/date-picker/src/date-picker-utils.js +33 -10
- package/dist/components/descriptions/index.d.ts +1 -1
- package/dist/components/descriptions/src/RsDescriptions.css +38 -11
- package/dist/components/descriptions/src/RsDescriptions.d.ts +20 -4
- package/dist/components/descriptions/src/RsDescriptions.impl.js +89 -19
- package/dist/components/descriptions/src/RsDescriptionsItem.impl.js +13 -6
- package/dist/components/descriptions/src/descriptions-utils.d.ts +19 -0
- package/dist/components/descriptions/src/descriptions-utils.js +39 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/src/RsConfirmDialog.css +47 -21
- package/dist/components/dialog/src/RsConfirmDialog.d.ts +19 -7
- package/dist/components/dialog/src/RsConfirmDialog.impl.js +349 -119
- package/dist/components/dialog/src/RsConfirmDialog.js +2 -1
- package/dist/components/dialog/src/RsDialog.css +102 -109
- package/dist/components/dialog/src/RsDialog.d.ts +34 -24
- package/dist/components/dialog/src/RsDialog.impl.js +410 -177
- package/dist/components/dialog/src/RsDialog.js +2 -1
- package/dist/components/dialog/src/dialog-utils.d.ts +40 -1
- package/dist/components/dialog/src/dialog-utils.js +152 -1
- package/dist/components/dialog/src/dialog-window.js +29 -8
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/src/RsDrawer.css +61 -29
- package/dist/components/drawer/src/RsDrawer.d.ts +37 -21
- package/dist/components/drawer/src/RsDrawer.impl.js +441 -223
- package/dist/components/drawer/src/drawer-utils.d.ts +35 -0
- package/dist/components/drawer/src/drawer-utils.js +131 -1
- package/dist/components/dropdown/index.d.ts +1 -1
- package/dist/components/dropdown/src/RsDropdown.css +140 -61
- package/dist/components/dropdown/src/RsDropdown.d.ts +39 -6
- package/dist/components/dropdown/src/RsDropdown.impl.js +693 -63
- package/dist/components/dropdown/src/RsDropdownItemView.impl.js +17 -7
- package/dist/components/dropdown/src/RsDropdownItems.d.ts +32 -3
- package/dist/components/dropdown/src/RsDropdownItems.impl.js +171 -59
- package/dist/components/dropdown/src/dropdown-utils.d.ts +50 -0
- package/dist/components/dropdown/src/dropdown-utils.js +103 -3
- package/dist/components/dynamic-tags/index.d.ts +1 -1
- package/dist/components/dynamic-tags/src/RsDynamicTags.css +115 -38
- package/dist/components/dynamic-tags/src/RsDynamicTags.d.ts +58 -17
- package/dist/components/dynamic-tags/src/RsDynamicTags.impl.js +269 -106
- package/dist/components/dynamic-tags/src/RsDynamicTags.js +1 -1
- package/dist/components/dynamic-tags/src/dynamic-tags-utils.d.ts +19 -0
- package/dist/components/dynamic-tags/src/dynamic-tags-utils.js +60 -0
- package/dist/components/empty/index.d.ts +1 -0
- package/dist/components/empty/src/RsEmpty.css +105 -23
- package/dist/components/empty/src/RsEmpty.d.ts +27 -4
- package/dist/components/empty/src/RsEmpty.impl.js +154 -11
- package/dist/components/empty/src/RsEmpty.js +2 -1
- package/dist/components/empty/src/empty-utils.d.ts +28 -0
- package/dist/components/empty/src/empty-utils.js +55 -0
- package/dist/components/fieldset/src/RsFieldset.css +71 -41
- package/dist/components/fieldset/src/RsFieldset.d.ts +21 -2
- package/dist/components/fieldset/src/RsFieldset.impl.js +93 -26
- package/dist/components/fieldset/src/RsFieldset.js +1 -1
- package/dist/components/fieldset/src/fieldset-utils.d.ts +4 -0
- package/dist/components/fieldset/src/fieldset-utils.js +9 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/src/RsForm.css +15 -12
- package/dist/components/form/src/RsForm.d.ts +21 -23
- package/dist/components/form/src/RsForm.impl.js +33 -20
- package/dist/components/form/src/RsForm.js +1 -1
- package/dist/components/form/src/form-utils.d.ts +7 -0
- package/dist/components/form/src/form-utils.js +28 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/src/RsInput.css +78 -260
- package/dist/components/input/src/RsInput.d.ts +5 -3
- package/dist/components/input/src/RsInput.impl.js +8 -16
- package/dist/components/input/src/RsInput.js +1 -1
- package/dist/components/input/src/input-utils.d.ts +11 -0
- package/dist/components/input/src/input-utils.js +22 -0
- package/dist/components/input-number/index.d.ts +1 -0
- package/dist/components/input-number/src/RsInputNumber.css +31 -31
- package/dist/components/input-number/src/RsInputNumber.d.ts +16 -14
- package/dist/components/input-number/src/RsInputNumber.impl.js +17 -4
- package/dist/components/input-number/src/RsInputNumber.js +1 -1
- package/dist/components/label/src/RsLabel.css +30 -11
- package/dist/components/label/src/RsLabel.d.ts +18 -1
- package/dist/components/label/src/RsLabel.impl.js +63 -10
- package/dist/components/label/src/RsLabel.js +1 -1
- package/dist/components/label/src/label-utils.d.ts +6 -0
- package/dist/components/label/src/label-utils.js +16 -0
- package/dist/components/link/src/RsLink.d.ts +2 -2
- package/dist/components/loading/index.d.ts +1 -0
- package/dist/components/loading/src/RsLoading.css +13 -97
- package/dist/components/loading/src/RsLoading.d.ts +53 -3
- package/dist/components/loading/src/RsLoading.impl.js +216 -33
- package/dist/components/loading/src/RsLoading.js +2 -1
- package/dist/components/loading/src/loading-status.css +210 -0
- package/dist/components/loading/src/loading-status.d.ts +34 -0
- package/dist/components/loading/src/loading-status.impl.js +84 -0
- package/dist/components/loading/src/loading-status.js +8 -0
- package/dist/components/loading/src/loading-utils.d.ts +51 -4
- package/dist/components/loading/src/loading-utils.js +122 -0
- package/dist/components/loading-bar/index.d.ts +1 -0
- package/dist/components/loading-bar/src/RsLoadingBar.css +72 -8
- package/dist/components/loading-bar/src/RsLoadingBar.d.ts +55 -11
- package/dist/components/loading-bar/src/RsLoadingBar.impl.js +298 -57
- package/dist/components/loading-bar/src/RsLoadingBar.js +1 -1
- package/dist/components/loading-bar/src/loading-bar-utils.d.ts +69 -0
- package/dist/components/loading-bar/src/loading-bar-utils.js +97 -0
- package/dist/components/log/src/RsLog.css +52 -144
- package/dist/components/log/src/RsLog.d.ts +12 -11
- package/dist/components/log/src/RsLog.impl.js +181 -148
- package/dist/components/log/src/RsLog.js +1 -1
- package/dist/components/log/src/RsLogRow.css +152 -0
- package/dist/components/log/src/RsLogRow.d.ts +35 -0
- package/dist/components/log/src/RsLogRow.impl.js +91 -0
- package/dist/components/log/src/RsLogRow.js +8 -0
- package/dist/components/log/src/log-utils.d.ts +8 -0
- package/dist/components/log/src/log-utils.js +71 -10
- package/dist/components/markdown/index.d.ts +1 -1
- package/dist/components/markdown/src/RsMarkdown.css +75 -32
- package/dist/components/markdown/src/RsMarkdown.d.ts +6 -2
- package/dist/components/markdown/src/RsMarkdown.impl.js +185 -17
- package/dist/components/markdown/src/markdown-utils.d.ts +26 -0
- package/dist/components/markdown/src/markdown-utils.js +114 -12
- package/dist/components/mentions/index.d.ts +2 -1
- package/dist/components/mentions/src/RsMentions.css +119 -3
- package/dist/components/mentions/src/RsMentions.d.ts +57 -5
- package/dist/components/mentions/src/RsMentions.impl.js +298 -79
- package/dist/components/mentions/src/RsMentions.js +1 -3
- package/dist/components/mentions/src/mentions-utils.d.ts +5 -1
- package/dist/components/mentions/src/mentions-utils.js +28 -9
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/src/RsMenu.css +70 -29
- package/dist/components/menu/src/RsMenu.d.ts +58 -4
- package/dist/components/menu/src/RsMenu.impl.js +93 -46
- package/dist/components/menu/src/RsMenuItems.d.ts +22 -5
- package/dist/components/menu/src/RsMenuItems.impl.js +506 -154
- package/dist/components/menu/src/menu-utils.d.ts +56 -0
- package/dist/components/menu/src/menu-utils.js +139 -6
- package/dist/components/monaco-editor/index.d.ts +1 -1
- package/dist/components/monaco-editor/src/RsMonacoEditor.css +28 -16
- package/dist/components/monaco-editor/src/RsMonacoEditor.d.ts +39 -41
- package/dist/components/monaco-editor/src/RsMonacoEditor.impl.js +212 -133
- package/dist/components/monaco-editor/src/RsMonacoEditor.js +1 -1
- package/dist/components/monaco-editor/src/monaco-editor-utils.d.ts +126 -0
- package/dist/components/monaco-editor/src/monaco-editor-utils.js +302 -0
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/src/RsPagination.css +93 -46
- package/dist/components/pagination/src/RsPagination.d.ts +68 -8
- package/dist/components/pagination/src/RsPagination.impl.js +229 -86
- package/dist/components/pagination/src/RsPagination.js +1 -1
- package/dist/components/pagination/src/pagination-utils.d.ts +59 -0
- package/dist/components/pagination/src/pagination-utils.js +105 -1
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/src/RsPopover.css +124 -14
- package/dist/components/popover/src/RsPopover.d.ts +38 -7
- package/dist/components/popover/src/RsPopover.impl.js +546 -35
- package/dist/components/popover/src/RsPopover.js +2 -1
- package/dist/components/popover/src/popover-utils.d.ts +24 -2
- package/dist/components/popover/src/popover-utils.js +55 -0
- package/dist/components/radio/index.d.ts +1 -1
- package/dist/components/radio/src/RsRadio.css +7 -6
- package/dist/components/radio/src/RsRadio.d.ts +8 -5
- package/dist/components/radio/src/RsRadio.impl.js +34 -24
- package/dist/components/radio/src/RsRadio.js +2 -1
- package/dist/components/radio/src/RsRadioItem.css +61 -44
- package/dist/components/radio/src/RsRadioItem.d.ts +2 -2
- package/dist/components/radio/src/RsRadioItem.impl.js +53 -20
- package/dist/components/radio/src/RsRadioItem.js +2 -1
- package/dist/components/radio/src/radio-utils.d.ts +12 -1
- package/dist/components/radio/src/radio-utils.js +15 -1
- package/dist/components/scrollbar/src/RsScrollbar.css +71 -24
- package/dist/components/scrollbar/src/RsScrollbar.d.ts +9 -5
- package/dist/components/scrollbar/src/RsScrollbar.impl.js +372 -47
- package/dist/components/scrollbar/src/RsScrollbar.js +2 -1
- package/dist/components/scrollbar/src/scrollbar-utils.d.ts +34 -2
- package/dist/components/scrollbar/src/scrollbar-utils.js +64 -1
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/src/RsSelect.css +54 -42
- package/dist/components/select/src/RsSelect.d.ts +19 -2
- package/dist/components/select/src/RsSelect.impl.js +727 -312
- package/dist/components/select/src/RsSelect.js +1 -1
- package/dist/components/select/src/select-utils.d.ts +4 -2
- package/dist/components/select/src/select-utils.js +8 -3
- package/dist/components/select/src/use-rs-select.d.ts +1 -0
- package/dist/components/select/src/use-rs-select.js +23 -17
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/sidebar/src/RsSidebar.css +91 -33
- package/dist/components/sidebar/src/RsSidebar.d.ts +17 -9
- package/dist/components/sidebar/src/RsSidebar.impl.js +124 -22
- package/dist/components/sidebar/src/RsSidebar.js +1 -1
- package/dist/components/sidebar/src/RsSidebarGroup.css +23 -6
- package/dist/components/sidebar/src/RsSidebarGroup.d.ts +6 -2
- package/dist/components/sidebar/src/RsSidebarGroup.impl.js +17 -4
- package/dist/components/sidebar/src/RsSidebarGroup.js +1 -1
- package/dist/components/sidebar/src/RsSidebarItem.css +50 -20
- package/dist/components/sidebar/src/RsSidebarItem.d.ts +21 -3
- package/dist/components/sidebar/src/RsSidebarItem.impl.js +71 -20
- package/dist/components/sidebar/src/RsSidebarItem.js +1 -1
- package/dist/components/sidebar/src/sidebar-utils.d.ts +47 -0
- package/dist/components/sidebar/src/sidebar-utils.js +72 -0
- package/dist/components/split-pane/index.d.ts +2 -2
- package/dist/components/split-pane/src/RsSplitPane.css +41 -30
- package/dist/components/split-pane/src/RsSplitPane.d.ts +6 -2
- package/dist/components/split-pane/src/RsSplitPane.impl.js +153 -45
- package/dist/components/split-pane/src/split-pane-utils.d.ts +23 -0
- package/dist/components/split-pane/src/split-pane-utils.js +18 -1
- package/dist/components/stat-card/index.d.ts +1 -0
- package/dist/components/stat-card/src/RsStatCard.css +129 -25
- package/dist/components/stat-card/src/RsStatCard.d.ts +40 -4
- package/dist/components/stat-card/src/RsStatCard.impl.js +106 -12
- package/dist/components/stat-card/src/RsStatCard.js +1 -1
- package/dist/components/stat-card/src/stat-card-utils.d.ts +39 -0
- package/dist/components/stat-card/src/stat-card-utils.js +113 -0
- package/dist/components/steps/index.d.ts +1 -1
- package/dist/components/steps/src/RsSteps.css +158 -37
- package/dist/components/steps/src/RsSteps.d.ts +69 -5
- package/dist/components/steps/src/RsSteps.impl.js +168 -28
- package/dist/components/steps/src/RsSteps.js +1 -1
- package/dist/components/steps/src/steps-utils.d.ts +51 -1
- package/dist/components/steps/src/steps-utils.js +67 -1
- package/dist/components/switch/index.d.ts +2 -1
- package/dist/components/switch/src/RsSwitch.css +36 -18
- package/dist/components/switch/src/RsSwitch.d.ts +18 -5
- package/dist/components/switch/src/RsSwitch.impl.js +61 -29
- package/dist/components/switch/src/RsSwitch.js +2 -1
- package/dist/components/switch/src/switch-utils.d.ts +4 -0
- package/dist/components/switch/src/switch-utils.js +9 -0
- package/dist/components/table/src/RsTable.impl.js +4 -2
- package/dist/components/table/src/composables/useRsTableContextMenu.d.ts +16 -0
- package/dist/components/table/src/composables/useRsTableContextMenu.js +1 -1
- package/dist/components/table/src/composables/useRsTableEngine.js +6 -2
- package/dist/components/table/src/composables/useRsTableScrollLayout.js +2 -0
- package/dist/components/table/src/composables/useRsTableShell.d.ts +16 -0
- package/dist/components/table/src/rs-table-props.d.ts +1 -1
- package/dist/components/table/src/rs-table-props.js +0 -1
- package/dist/components/table/src/table-body/RsTableBody.impl.js +1 -0
- package/dist/components/table/src/table-body/RsTableCellEditor.impl.js +10 -2
- package/dist/components/table/src/table-body/RsTableColGroup.impl.js +1 -0
- package/dist/components/table/src/table-footer/RsTableSummaryRow.impl.js +1 -0
- package/dist/components/table/src/table-header/RsTableHeader.impl.js +1 -0
- package/dist/components/table/src/utils/table-utils.d.ts +10 -6
- package/dist/components/table/src/utils/table-utils.js +27 -25
- package/dist/components/table/style/rs-table.css +34 -20
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/src/RsTabs.css +225 -101
- package/dist/components/tabs/src/RsTabs.d.ts +37 -8
- package/dist/components/tabs/src/RsTabs.impl.js +400 -270
- package/dist/components/tabs/src/tabs-utils.d.ts +41 -2
- package/dist/components/tabs/src/tabs-utils.js +55 -1
- package/dist/components/terminal/index.d.ts +1 -1
- package/dist/components/terminal/src/RsTerminal.css +60 -37
- package/dist/components/terminal/src/RsTerminal.d.ts +36 -4
- package/dist/components/terminal/src/RsTerminal.impl.js +288 -68
- package/dist/components/terminal/src/RsTerminal.js +1 -1
- package/dist/components/terminal/src/terminal-utils.d.ts +42 -4
- package/dist/components/terminal/src/terminal-utils.js +113 -10
- package/dist/components/textarea/src/RsTextarea.css +23 -23
- package/dist/components/textarea/src/RsTextarea.d.ts +7 -13
- package/dist/components/textarea/src/RsTextarea.impl.js +37 -46
- package/dist/components/textarea/src/RsTextarea.js +1 -1
- package/dist/components/textarea/src/textarea-utils.d.ts +27 -0
- package/dist/components/textarea/src/textarea-utils.js +61 -0
- package/dist/components/time-picker/index.d.ts +3 -2
- package/dist/components/time-picker/src/RsTimePicker.css +41 -24
- package/dist/components/time-picker/src/RsTimePicker.d.ts +52 -7
- package/dist/components/time-picker/src/RsTimePicker.impl.js +520 -156
- package/dist/components/time-picker/src/RsTimePicker.js +1 -3
- package/dist/components/time-picker/src/RsTimePickerColumns.css +26 -18
- package/dist/components/time-picker/src/RsTimePickerColumns.d.ts +3 -1
- package/dist/components/time-picker/src/RsTimePickerColumns.impl.js +62 -9
- package/dist/components/time-picker/src/RsTimePickerColumns.js +1 -1
- package/dist/components/time-picker/src/time-picker-utils.d.ts +38 -0
- package/dist/components/time-picker/src/time-picker-utils.js +97 -5
- package/dist/components/toaster/src/RsToaster.css +156 -203
- package/dist/components/toaster/src/RsToaster.d.ts +33 -3
- package/dist/components/toaster/src/RsToaster.impl.js +309 -34
- package/dist/components/toaster/src/toast-store.d.ts +95 -0
- package/dist/components/toaster/src/toast-store.js +177 -0
- package/dist/components/toaster/src/toast-utils.d.ts +60 -0
- package/dist/components/toaster/src/toast-utils.js +86 -0
- package/dist/components/toolbar/index.d.ts +1 -1
- package/dist/components/toolbar/src/RsToolbar.css +206 -32
- package/dist/components/toolbar/src/RsToolbar.d.ts +41 -16
- package/dist/components/toolbar/src/RsToolbar.impl.js +146 -18
- package/dist/components/toolbar/src/RsToolbar.js +2 -1
- package/dist/components/toolbar/src/toolbar-utils.d.ts +20 -0
- package/dist/components/toolbar/src/toolbar-utils.js +105 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/src/RsTooltip.css +104 -26
- package/dist/components/tooltip/src/RsTooltip.d.ts +39 -17
- package/dist/components/tooltip/src/RsTooltip.impl.js +420 -51
- package/dist/components/tooltip/src/RsTooltip.js +2 -1
- package/dist/components/tooltip/src/RsTooltipProvider.d.ts +4 -4
- package/dist/components/tooltip/src/RsTooltipProvider.impl.js +51 -14
- package/dist/components/tooltip/src/tooltip-utils.d.ts +30 -0
- package/dist/components/tooltip/src/tooltip-utils.js +23 -0
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/src/RsTree.css +84 -75
- package/dist/components/tree/src/RsTree.d.ts +23 -23
- package/dist/components/tree/src/RsTree.impl.js +292 -66
- package/dist/components/tree/src/RsTree.js +1 -1
- package/dist/components/tree/src/tree-utils.d.ts +22 -0
- package/dist/components/tree/src/tree-utils.js +18 -4
- package/dist/components/tree-select/index.d.ts +2 -0
- package/dist/components/tree-select/src/RsTreeSelect.css +100 -25
- package/dist/components/tree-select/src/RsTreeSelect.d.ts +91 -7
- package/dist/components/tree-select/src/RsTreeSelect.impl.js +464 -79
- package/dist/components/tree-select/src/RsTreeSelect.js +1 -1
- package/dist/components/tree-select/src/tree-select-utils.d.ts +20 -0
- package/dist/components/tree-select/src/tree-select-utils.js +60 -0
- package/dist/components/upload/index.d.ts +2 -1
- package/dist/components/upload/src/RsUpload.css +223 -75
- package/dist/components/upload/src/RsUpload.d.ts +77 -1
- package/dist/components/upload/src/RsUpload.impl.js +404 -90
- package/dist/components/upload/src/RsUpload.js +1 -1
- package/dist/components/upload/src/upload-utils.d.ts +21 -2
- package/dist/components/upload/src/upload-utils.js +139 -9
- package/dist/components/virtual-list/index.d.ts +1 -1
- package/dist/components/virtual-list/src/RsVirtualList.css +64 -9
- package/dist/components/virtual-list/src/RsVirtualList.d.ts +31 -5
- package/dist/components/virtual-list/src/RsVirtualList.impl.js +425 -76
- package/dist/components/virtual-list/src/RsVirtualList.js +1 -1
- package/dist/components/virtual-list/src/virtual-list-utils.d.ts +64 -1
- package/dist/components/virtual-list/src/virtual-list-utils.js +215 -1
- package/dist/composables/useRsLoadingBar.d.ts +2 -5
- package/dist/composables/useRsLoadingBar.js +21 -5
- package/dist/composables/useRsTabsNav.d.ts +3 -1
- package/dist/composables/useRsTabsNav.js +96 -28
- package/dist/composables/useRsToast.d.ts +11 -13
- package/dist/composables/useRsToast.js +66 -17
- package/dist/index.d.ts +51 -32
- package/dist/index.js +20 -0
- package/dist/locale/apply.js +6 -1
- package/dist/locale/messages.js +174 -4
- package/dist/styles.css +1007 -980
- package/dist/theme/brand.example.css +3 -2
- package/dist/vite-plugins/niuma-ui-host.js +1 -1
- package/package.json +2 -3
- package/dist/components/breadcrumb/src/RsBreadcrumbItems.d.ts +0 -8
- package/dist/components/breadcrumb/src/RsBreadcrumbItems.impl.js +0 -40
- package/dist/components/breadcrumb/src/RsBreadcrumbItems.js +0 -5
- package/dist/components/date-picker/src/RsDatePicker-1.css +0 -157
- package/dist/components/mentions/src/RsMentions-1.css +0 -29
- package/dist/components/time-picker/src/RsTimePicker-1.css +0 -98
|
@@ -1,22 +1,86 @@
|
|
|
1
|
-
import type { RsStepItem, RsStepsOrientation, RsStepsSize } from './steps-utils';
|
|
1
|
+
import type { RsStepItem, RsStepStatus, RsStepsLabelPlacement, RsStepsOrientation, RsStepsSize, RsStepsType } from './steps-utils';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
items: RsStepItem[];
|
|
4
4
|
orientation?: RsStepsOrientation;
|
|
5
5
|
size?: RsStepsSize;
|
|
6
6
|
clickable?: boolean;
|
|
7
|
+
/** 标题在指示器旁(end)或下方(bottom)。竖排时仍在旁。 */
|
|
8
|
+
labelPlacement?: RsStepsLabelPlacement;
|
|
9
|
+
/** default 数字/图标;dot 圆点。 */
|
|
10
|
+
type?: RsStepsType;
|
|
11
|
+
/** 覆盖当前步状态(单项 status 仍优先)。 */
|
|
12
|
+
status?: RsStepStatus;
|
|
13
|
+
/** 当前步完成百分比 0–100。只影响 default + process 指示器。 */
|
|
14
|
+
percent?: number;
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
id?: string;
|
|
7
17
|
};
|
|
18
|
+
declare function goTo(value: string): boolean;
|
|
19
|
+
declare function next(): string | undefined;
|
|
20
|
+
declare function prev(): string | undefined;
|
|
21
|
+
declare function focus(value?: string): void;
|
|
8
22
|
type __VLS_ModelProps = {
|
|
9
23
|
modelValue?: string;
|
|
10
24
|
};
|
|
11
25
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare
|
|
13
|
-
|
|
26
|
+
declare var __VLS_9: {
|
|
27
|
+
item: RsStepItem;
|
|
28
|
+
index: number;
|
|
29
|
+
status: RsStepStatus;
|
|
30
|
+
active: boolean;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
}, __VLS_11: {
|
|
33
|
+
item: RsStepItem;
|
|
34
|
+
index: number;
|
|
35
|
+
status: RsStepStatus;
|
|
36
|
+
active: boolean;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
}, __VLS_28: {
|
|
39
|
+
item: RsStepItem;
|
|
40
|
+
index: number;
|
|
41
|
+
status: RsStepStatus;
|
|
42
|
+
active: boolean;
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
}, __VLS_30: {
|
|
45
|
+
item: RsStepItem;
|
|
46
|
+
index: number;
|
|
47
|
+
status: RsStepStatus;
|
|
48
|
+
active: boolean;
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
};
|
|
51
|
+
type __VLS_Slots = {} & {
|
|
52
|
+
item?: (props: typeof __VLS_9) => any;
|
|
53
|
+
} & {
|
|
54
|
+
icon?: (props: typeof __VLS_11) => any;
|
|
55
|
+
} & {
|
|
56
|
+
title?: (props: typeof __VLS_28) => any;
|
|
57
|
+
} & {
|
|
58
|
+
description?: (props: typeof __VLS_30) => any;
|
|
59
|
+
};
|
|
60
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
61
|
+
next: typeof next;
|
|
62
|
+
prev: typeof prev;
|
|
63
|
+
goTo: typeof goTo;
|
|
64
|
+
focus: typeof focus;
|
|
65
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
66
|
+
change: (value: string, item: RsStepItem) => any;
|
|
67
|
+
click: (item: RsStepItem, event: MouseEvent) => any;
|
|
68
|
+
"update:modelValue": (value: string) => any;
|
|
14
69
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
|
|
70
|
+
onChange?: ((value: string, item: RsStepItem) => any) | undefined;
|
|
71
|
+
onClick?: ((item: RsStepItem, event: MouseEvent) => any) | undefined;
|
|
72
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
73
|
}>, {
|
|
17
|
-
|
|
74
|
+
type: RsStepsType;
|
|
18
75
|
orientation: RsStepsOrientation;
|
|
76
|
+
labelPlacement: RsStepsLabelPlacement;
|
|
19
77
|
clickable: boolean;
|
|
20
78
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
79
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
80
|
declare const _default: typeof __VLS_export;
|
|
22
81
|
export default _default;
|
|
82
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
@@ -1,53 +1,193 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useRsConfigOptional } from "../../../composables/useRsConfig.js";
|
|
2
|
+
import { resolveDirMode } from "../../../locale/apply.js";
|
|
3
|
+
import { useRsI18n } from "../../../composables/useRsI18n.js";
|
|
4
|
+
import RsIcon_default from "../../icon/src/RsIcon.js";
|
|
5
|
+
import { useResolvedRsComponentSize } from "../../_shared/src/resolve-size.js";
|
|
6
|
+
import { buildStepRenderItems, clampStepPercent, resolveActiveStepIndex, resolveAdjacentStepValue, resolveSelectableStepValues, resolveStepKeyboardMove } from "./steps-utils.js";
|
|
7
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeModels, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
3
8
|
//#region src/components/steps/src/RsSteps.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var _hoisted_1 = ["
|
|
5
|
-
var _hoisted_2 = { class: "rs-
|
|
6
|
-
var _hoisted_3 =
|
|
7
|
-
var _hoisted_4 = { class: "rs-
|
|
8
|
-
var _hoisted_5 = {
|
|
9
|
+
var _hoisted_1 = ["id", "aria-label"];
|
|
10
|
+
var _hoisted_2 = { class: "rs-steps__list" };
|
|
11
|
+
var _hoisted_3 = ["aria-current"];
|
|
12
|
+
var _hoisted_4 = { class: "rs-steps__mark" };
|
|
13
|
+
var _hoisted_5 = { class: "rs-steps__body" };
|
|
14
|
+
var _hoisted_6 = { class: "rs-steps__title" };
|
|
15
|
+
var _hoisted_7 = {
|
|
9
16
|
key: 0,
|
|
10
17
|
class: "rs-steps__description"
|
|
11
18
|
};
|
|
12
|
-
var
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "rs-steps__separator"
|
|
15
|
-
};
|
|
19
|
+
var _hoisted_8 = { class: "rs-steps__status" };
|
|
16
20
|
var RsSteps_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
21
|
+
name: "RsSteps",
|
|
17
22
|
__name: "RsSteps",
|
|
18
23
|
props: /*@__PURE__*/ mergeModels({
|
|
19
24
|
items: {},
|
|
20
25
|
orientation: { default: "horizontal" },
|
|
21
|
-
size: {
|
|
26
|
+
size: {},
|
|
22
27
|
clickable: {
|
|
23
28
|
type: Boolean,
|
|
24
29
|
default: false
|
|
25
|
-
}
|
|
30
|
+
},
|
|
31
|
+
labelPlacement: { default: "end" },
|
|
32
|
+
type: { default: "default" },
|
|
33
|
+
status: {},
|
|
34
|
+
percent: {},
|
|
35
|
+
ariaLabel: {},
|
|
36
|
+
id: {}
|
|
26
37
|
}, {
|
|
27
|
-
"modelValue": {},
|
|
38
|
+
"modelValue": { default: "" },
|
|
28
39
|
"modelModifiers": {}
|
|
29
40
|
}),
|
|
30
|
-
emits: ["update:modelValue"],
|
|
31
|
-
setup(__props) {
|
|
41
|
+
emits: /*@__PURE__*/ mergeModels(["change", "click"], ["update:modelValue"]),
|
|
42
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
32
43
|
const model = useModel(__props, "modelValue");
|
|
33
44
|
const props = __props;
|
|
34
|
-
const
|
|
35
|
-
|
|
45
|
+
const emit = __emit;
|
|
46
|
+
const { t, locale } = useRsI18n();
|
|
47
|
+
const config = useRsConfigOptional();
|
|
48
|
+
const rootRef = ref(null);
|
|
49
|
+
const resolvedSize = useResolvedRsComponentSize(() => props.size);
|
|
50
|
+
const writingDir = computed(() => resolveDirMode(config?.dir.value ?? "auto", locale.value));
|
|
51
|
+
const activeIndex = computed(() => resolveActiveStepIndex(props.items, model.value));
|
|
52
|
+
const rows = computed(() => buildStepRenderItems(props.items, activeIndex.value, props.type, props.status));
|
|
53
|
+
const selectableValues = computed(() => resolveSelectableStepValues(props.items));
|
|
54
|
+
const resolvedPercent = computed(() => clampStepPercent(props.percent));
|
|
55
|
+
const navLabel = computed(() => props.ariaLabel || t("steps.label"));
|
|
56
|
+
const currentValue = computed(() => props.items[activeIndex.value]?.value);
|
|
57
|
+
function statusLabel(status) {
|
|
58
|
+
return t(`steps.${status}`);
|
|
59
|
+
}
|
|
60
|
+
function slotProps(row) {
|
|
61
|
+
return {
|
|
62
|
+
item: row.item,
|
|
63
|
+
index: row.index,
|
|
64
|
+
status: row.status,
|
|
65
|
+
active: row.active,
|
|
66
|
+
disabled: row.disabled
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function showPercent(row) {
|
|
70
|
+
return props.type === "default" && row.status === "process" && resolvedPercent.value != null;
|
|
71
|
+
}
|
|
72
|
+
function findTrigger(value) {
|
|
73
|
+
const root = rootRef.value;
|
|
74
|
+
if (!root) return null;
|
|
75
|
+
const nodes = root.querySelectorAll("[data-rs-step]");
|
|
76
|
+
for (const node of nodes) if (node.dataset.rsStep === value) return node;
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
function goTo(value) {
|
|
80
|
+
const item = props.items.find((entry) => entry.value === value);
|
|
81
|
+
if (!item || item.disabled) return false;
|
|
82
|
+
if (model.value === value) return true;
|
|
83
|
+
model.value = value;
|
|
84
|
+
emit("change", value, item);
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
function next() {
|
|
88
|
+
const value = resolveAdjacentStepValue(selectableValues.value, currentValue.value, 1);
|
|
89
|
+
return value && goTo(value) ? value : void 0;
|
|
90
|
+
}
|
|
91
|
+
function prev() {
|
|
92
|
+
const value = resolveAdjacentStepValue(selectableValues.value, currentValue.value, -1);
|
|
93
|
+
return value && goTo(value) ? value : void 0;
|
|
94
|
+
}
|
|
95
|
+
function focus(value) {
|
|
96
|
+
const target = value || currentValue.value || selectableValues.value[0];
|
|
97
|
+
if (!target) return;
|
|
98
|
+
findTrigger(target)?.focus();
|
|
99
|
+
}
|
|
100
|
+
function selectStep(item, event) {
|
|
101
|
+
emit("click", item, event);
|
|
36
102
|
if (!props.clickable || item.disabled) return;
|
|
37
|
-
|
|
103
|
+
goTo(item.value);
|
|
104
|
+
}
|
|
105
|
+
function onKeydown(event) {
|
|
106
|
+
if (!props.clickable) return;
|
|
107
|
+
const target = event.target;
|
|
108
|
+
if (!(target instanceof HTMLElement) || !target.closest("[data-rs-step]")) return;
|
|
109
|
+
if (target.closest("input, textarea, select, [contenteditable=\"true\"]")) return;
|
|
110
|
+
const move = resolveStepKeyboardMove(event.key, props.orientation, writingDir.value === "rtl");
|
|
111
|
+
if (move == null) return;
|
|
112
|
+
const values = selectableValues.value;
|
|
113
|
+
if (values.length === 0) return;
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
const focused = target.closest("[data-rs-step]")?.dataset.rsStep;
|
|
116
|
+
let nextValue;
|
|
117
|
+
if (move === "start") nextValue = values[0];
|
|
118
|
+
else if (move === "end") nextValue = values[values.length - 1];
|
|
119
|
+
else nextValue = resolveAdjacentStepValue(values, focused, move);
|
|
120
|
+
if (nextValue) focus(nextValue);
|
|
38
121
|
}
|
|
122
|
+
__expose({
|
|
123
|
+
next,
|
|
124
|
+
prev,
|
|
125
|
+
goTo,
|
|
126
|
+
focus
|
|
127
|
+
});
|
|
39
128
|
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("
|
|
129
|
+
return openBlock(), createElementBlock("nav", {
|
|
130
|
+
id: __props.id,
|
|
131
|
+
ref_key: "rootRef",
|
|
132
|
+
ref: rootRef,
|
|
133
|
+
class: normalizeClass(["rs-steps", [
|
|
134
|
+
`rs-steps--${__props.orientation}`,
|
|
135
|
+
`rs-steps--${unref(resolvedSize)}`,
|
|
136
|
+
`rs-steps--label-${__props.labelPlacement}`,
|
|
137
|
+
`rs-steps--${__props.type}`,
|
|
138
|
+
{ "rs-steps--clickable": __props.clickable }
|
|
139
|
+
]]),
|
|
140
|
+
"aria-label": navLabel.value,
|
|
141
|
+
onKeydown
|
|
142
|
+
}, [createElementVNode("ol", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, index) => {
|
|
41
143
|
return openBlock(), createElementBlock("li", {
|
|
42
|
-
key: item.value,
|
|
43
|
-
class: normalizeClass(["rs-steps__item", `rs-steps__item--${
|
|
44
|
-
|
|
45
|
-
|
|
144
|
+
key: row.item.value,
|
|
145
|
+
class: normalizeClass(["rs-steps__item", [`rs-steps__item--${row.status}`, {
|
|
146
|
+
"rs-steps__item--active": row.active,
|
|
147
|
+
"rs-steps__item--disabled": row.disabled
|
|
148
|
+
}]]),
|
|
149
|
+
"aria-current": row.active ? "step" : void 0
|
|
150
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(__props.clickable ? "button" : "div"), {
|
|
151
|
+
type: __props.clickable ? "button" : void 0,
|
|
46
152
|
class: "rs-steps__trigger",
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
153
|
+
"data-rs-step": row.item.value,
|
|
154
|
+
tabindex: __props.clickable && !row.disabled ? 0 : -1,
|
|
155
|
+
"aria-disabled": row.disabled ? "true" : void 0,
|
|
156
|
+
onClick: ($event) => selectStep(row.item, $event)
|
|
157
|
+
}, {
|
|
158
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, slotProps(row)), () => [createElementVNode("span", {
|
|
159
|
+
class: normalizeClass(["rs-steps__indicator", { "rs-steps__indicator--percent": showPercent(row) }]),
|
|
160
|
+
style: normalizeStyle(showPercent(row) ? { "--rs-steps-percent": String(resolvedPercent.value) } : void 0)
|
|
161
|
+
}, [createElementVNode("span", _hoisted_4, [renderSlot(_ctx.$slots, "icon", mergeProps({ ref_for: true }, slotProps(row)), () => [row.indicator === "icon" && row.item.icon ? (openBlock(), createBlock(RsIcon_default, {
|
|
162
|
+
key: 0,
|
|
163
|
+
name: row.item.icon,
|
|
164
|
+
size: unref(resolvedSize)
|
|
165
|
+
}, null, 8, ["name", "size"])) : row.indicator === "check" ? (openBlock(), createBlock(RsIcon_default, {
|
|
166
|
+
key: 1,
|
|
167
|
+
name: "check",
|
|
168
|
+
size: unref(resolvedSize)
|
|
169
|
+
}, null, 8, ["size"])) : row.indicator === "error" ? (openBlock(), createBlock(RsIcon_default, {
|
|
170
|
+
key: 2,
|
|
171
|
+
name: "x",
|
|
172
|
+
size: unref(resolvedSize)
|
|
173
|
+
}, null, 8, ["size"])) : row.indicator !== "dot" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(row.index + 1), 1)], 64)) : createCommentVNode("", true)], true)])], 6), createElementVNode("span", _hoisted_5, [
|
|
174
|
+
createElementVNode("span", _hoisted_6, [renderSlot(_ctx.$slots, "title", mergeProps({ ref_for: true }, slotProps(row)), () => [createTextVNode(toDisplayString(row.item.title), 1)], true)]),
|
|
175
|
+
row.item.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", _hoisted_7, [renderSlot(_ctx.$slots, "description", mergeProps({ ref_for: true }, slotProps(row)), () => [createTextVNode(toDisplayString(row.item.description), 1)], true)])) : createCommentVNode("", true),
|
|
176
|
+
createElementVNode("span", _hoisted_8, toDisplayString(statusLabel(row.status)), 1)
|
|
177
|
+
])], true)]),
|
|
178
|
+
_: 2
|
|
179
|
+
}, 1032, [
|
|
180
|
+
"type",
|
|
181
|
+
"data-rs-step",
|
|
182
|
+
"tabindex",
|
|
183
|
+
"aria-disabled",
|
|
184
|
+
"onClick"
|
|
185
|
+
])), index < rows.value.length - 1 ? (openBlock(), createElementBlock("span", {
|
|
186
|
+
key: 0,
|
|
187
|
+
class: normalizeClass(["rs-steps__separator", { "rs-steps__separator--finish": row.completedSeparator }]),
|
|
188
|
+
"aria-hidden": "true"
|
|
189
|
+
}, null, 2)) : createCommentVNode("", true)], 10, _hoisted_3);
|
|
190
|
+
}), 128))])], 42, _hoisted_1);
|
|
51
191
|
};
|
|
52
192
|
}
|
|
53
193
|
});
|
|
@@ -3,6 +3,6 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
|
|
|
3
3
|
import RsSteps_vue_vue_type_script_setup_true_lang_default from "./RsSteps.impl.js";
|
|
4
4
|
|
|
5
5
|
//#region src/components/steps/src/RsSteps.vue
|
|
6
|
-
var RsSteps_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsSteps_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
6
|
+
var RsSteps_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsSteps_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-773a38b0"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { RsSteps_default as default };
|
|
@@ -1,12 +1,62 @@
|
|
|
1
|
+
import type { RsComponentSize } from '../../../theme/types';
|
|
1
2
|
export type RsStepStatus = 'wait' | 'process' | 'finish' | 'error';
|
|
2
3
|
export type RsStepsOrientation = 'horizontal' | 'vertical';
|
|
3
|
-
export type RsStepsSize =
|
|
4
|
+
export type RsStepsSize = RsComponentSize;
|
|
5
|
+
export type RsStepsLabelPlacement = 'end' | 'bottom';
|
|
6
|
+
export type RsStepsType = 'default' | 'dot';
|
|
4
7
|
export interface RsStepItem {
|
|
5
8
|
value: string;
|
|
6
9
|
title: string;
|
|
7
10
|
description?: string;
|
|
8
11
|
status?: RsStepStatus;
|
|
9
12
|
disabled?: boolean;
|
|
13
|
+
/** Lucide kebab-case。有值时覆盖默认数字 / 勾 / 叉。 */
|
|
14
|
+
icon?: string;
|
|
10
15
|
}
|
|
16
|
+
export interface RsStepsRenderItem {
|
|
17
|
+
item: RsStepItem;
|
|
18
|
+
index: number;
|
|
19
|
+
status: RsStepStatus;
|
|
20
|
+
active: boolean;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
completedSeparator: boolean;
|
|
23
|
+
indicator: 'number' | 'icon' | 'check' | 'error' | 'dot';
|
|
24
|
+
}
|
|
25
|
+
export interface RsStepsItemSlot {
|
|
26
|
+
item: RsStepItem;
|
|
27
|
+
index: number;
|
|
28
|
+
status: RsStepStatus;
|
|
29
|
+
active: boolean;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface RsStepsExpose {
|
|
33
|
+
/** 跳到下一个未禁用步骤。已在末级或没有可选项时返回 undefined。 */
|
|
34
|
+
next: () => string | undefined;
|
|
35
|
+
/** 跳到上一个未禁用步骤。已在首级或没有可选项时返回 undefined。 */
|
|
36
|
+
prev: () => string | undefined;
|
|
37
|
+
/** 跳到指定 value。找不到或禁用时返回 false。 */
|
|
38
|
+
goTo: (value: string) => boolean;
|
|
39
|
+
/** 焦点落到指定步骤;未传则落到当前步。不可点时也能落(tabindex=-1)。 */
|
|
40
|
+
focus: (value?: string) => void;
|
|
41
|
+
}
|
|
42
|
+
export type RsStepsInstance = RsStepsExpose & {
|
|
43
|
+
$el: HTMLElement;
|
|
44
|
+
};
|
|
11
45
|
export declare function resolveStepStatus(index: number, activeIndex: number, explicit?: RsStepStatus): RsStepStatus;
|
|
12
46
|
export declare function isStepSeparatorCompleted(status: RsStepStatus): boolean;
|
|
47
|
+
/** model 对不上任一项时回退 0,与原先 Math.max(0, findIndex) 一致。 */
|
|
48
|
+
export declare function resolveActiveStepIndex(items: readonly RsStepItem[], value?: string): number;
|
|
49
|
+
/**
|
|
50
|
+
* 单项 status 优先;当前步可用组件级 status 覆盖自动推导(对标 Ant Design status)。
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveCurrentStepStatus(index: number, activeIndex: number, itemStatus?: RsStepStatus, currentStatus?: RsStepStatus): RsStepStatus;
|
|
53
|
+
export declare function clampStepPercent(percent?: number): number | undefined;
|
|
54
|
+
export declare function resolveSelectableStepValues(items: readonly RsStepItem[]): string[];
|
|
55
|
+
export declare function resolveAdjacentStepValue(values: readonly string[], current: string | undefined, delta: number): string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* 可点步骤的键盘位移。竖排只用上下;横排左右在 RTL 下对调。
|
|
58
|
+
* Home / End 返回端点;不处理的键返回 null。
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveStepKeyboardMove(key: string, orientation: RsStepsOrientation, rtl?: boolean): number | 'start' | 'end' | null;
|
|
61
|
+
export declare function resolveStepIndicator(status: RsStepStatus, type: RsStepsType, icon?: string): RsStepsRenderItem['indicator'];
|
|
62
|
+
export declare function buildStepRenderItems(items: readonly RsStepItem[], activeIndex: number, type?: RsStepsType, currentStatus?: RsStepStatus): RsStepsRenderItem[];
|
|
@@ -8,5 +8,71 @@ function resolveStepStatus(index, activeIndex, explicit) {
|
|
|
8
8
|
function isStepSeparatorCompleted(status) {
|
|
9
9
|
return status === "finish";
|
|
10
10
|
}
|
|
11
|
+
/** model 对不上任一项时回退 0,与原先 Math.max(0, findIndex) 一致。 */
|
|
12
|
+
function resolveActiveStepIndex(items, value) {
|
|
13
|
+
return Math.max(0, items.findIndex((item) => item.value === value));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 单项 status 优先;当前步可用组件级 status 覆盖自动推导(对标 Ant Design status)。
|
|
17
|
+
*/
|
|
18
|
+
function resolveCurrentStepStatus(index, activeIndex, itemStatus, currentStatus) {
|
|
19
|
+
if (itemStatus) return itemStatus;
|
|
20
|
+
if (index === activeIndex && currentStatus) return currentStatus;
|
|
21
|
+
return resolveStepStatus(index, activeIndex);
|
|
22
|
+
}
|
|
23
|
+
function clampStepPercent(percent) {
|
|
24
|
+
if (percent == null || Number.isNaN(Number(percent))) return void 0;
|
|
25
|
+
return Math.min(100, Math.max(0, Number(percent)));
|
|
26
|
+
}
|
|
27
|
+
function resolveSelectableStepValues(items) {
|
|
28
|
+
const values = [];
|
|
29
|
+
for (const item of items) if (!item.disabled) values.push(item.value);
|
|
30
|
+
return values;
|
|
31
|
+
}
|
|
32
|
+
function resolveAdjacentStepValue(values, current, delta) {
|
|
33
|
+
if (values.length === 0) return void 0;
|
|
34
|
+
const index = current ? values.indexOf(current) : -1;
|
|
35
|
+
let next = index + delta;
|
|
36
|
+
if (index < 0) next = delta > 0 ? 0 : values.length - 1;
|
|
37
|
+
if (next < 0 || next >= values.length) return void 0;
|
|
38
|
+
return values[next];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 可点步骤的键盘位移。竖排只用上下;横排左右在 RTL 下对调。
|
|
42
|
+
* Home / End 返回端点;不处理的键返回 null。
|
|
43
|
+
*/
|
|
44
|
+
function resolveStepKeyboardMove(key, orientation, rtl = false) {
|
|
45
|
+
if (key === "Home") return "start";
|
|
46
|
+
if (key === "End") return "end";
|
|
47
|
+
if (orientation === "vertical") {
|
|
48
|
+
if (key === "ArrowUp") return -1;
|
|
49
|
+
if (key === "ArrowDown") return 1;
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
if (key === "ArrowLeft") return rtl ? 1 : -1;
|
|
53
|
+
if (key === "ArrowRight") return rtl ? -1 : 1;
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
function resolveStepIndicator(status, type, icon) {
|
|
57
|
+
if (type === "dot") return "dot";
|
|
58
|
+
if (icon) return "icon";
|
|
59
|
+
if (status === "finish") return "check";
|
|
60
|
+
if (status === "error") return "error";
|
|
61
|
+
return "number";
|
|
62
|
+
}
|
|
63
|
+
function buildStepRenderItems(items, activeIndex, type = "default", currentStatus) {
|
|
64
|
+
return items.map((item, index) => {
|
|
65
|
+
const status = resolveCurrentStepStatus(index, activeIndex, item.status, currentStatus);
|
|
66
|
+
return {
|
|
67
|
+
item,
|
|
68
|
+
index,
|
|
69
|
+
status,
|
|
70
|
+
active: index === activeIndex,
|
|
71
|
+
disabled: Boolean(item.disabled),
|
|
72
|
+
completedSeparator: isStepSeparatorCompleted(status),
|
|
73
|
+
indicator: resolveStepIndicator(status, type, item.icon)
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
}
|
|
11
77
|
//#endregion
|
|
12
|
-
export { isStepSeparatorCompleted, resolveStepStatus };
|
|
78
|
+
export { buildStepRenderItems, clampStepPercent, isStepSeparatorCompleted, resolveActiveStepIndex, resolveAdjacentStepValue, resolveCurrentStepStatus, resolveSelectableStepValues, resolveStepIndicator, resolveStepKeyboardMove, resolveStepStatus };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* 轨道高度 = control-height * 2/3
|
|
3
|
+
* 轨道高度 = control-height * 2/3(与 Input SM 24 / Switch SM 16 同比例)。
|
|
4
4
|
* 宽高、内边距、滑块均由 token / calc 推导,不写死档位 px。
|
|
5
5
|
* 外层 min-height = control-height,保证与同排输入垂直居中对齐。
|
|
6
6
|
*/
|
|
7
|
-
.rs-switch {
|
|
7
|
+
.rs-switch[data-v-ba0ee1d6] {
|
|
8
8
|
--rs-switch-pad: calc(var(--rs-switch-track-h) * 0.12);
|
|
9
9
|
--rs-switch-track-w: calc(var(--rs-switch-track-h) * 1.75);
|
|
10
10
|
--rs-switch-thumb: calc(var(--rs-switch-track-h) - var(--rs-switch-pad) * 2 - 2px);
|
|
11
|
+
position: relative;
|
|
11
12
|
display: inline-flex;
|
|
12
13
|
align-items: center;
|
|
13
14
|
gap: var(--rs-space-xs);
|
|
@@ -17,11 +18,22 @@
|
|
|
17
18
|
user-select: none;
|
|
18
19
|
color: var(--rs-text);
|
|
19
20
|
}
|
|
20
|
-
.rs-switch--disabled {
|
|
21
|
+
.rs-switch--disabled[data-v-ba0ee1d6] {
|
|
21
22
|
cursor: not-allowed;
|
|
22
23
|
opacity: 0.55;
|
|
23
24
|
}
|
|
24
|
-
.rs-
|
|
25
|
+
.rs-switch__input[data-v-ba0ee1d6] {
|
|
26
|
+
position: absolute;
|
|
27
|
+
width: 1px;
|
|
28
|
+
height: 1px;
|
|
29
|
+
margin: -1px;
|
|
30
|
+
padding: 0;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
clip: rect(0, 0, 0, 0);
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
border: 0;
|
|
35
|
+
}
|
|
36
|
+
.rs-switch__root[data-v-ba0ee1d6] {
|
|
25
37
|
position: relative;
|
|
26
38
|
display: inline-flex;
|
|
27
39
|
flex-shrink: 0;
|
|
@@ -39,36 +51,36 @@
|
|
|
39
51
|
background-color var(--rs-transition-fast),
|
|
40
52
|
border-color var(--rs-transition-fast);
|
|
41
53
|
}
|
|
42
|
-
.rs-switch--disabled .rs-switch__root {
|
|
54
|
+
.rs-switch--disabled .rs-switch__root[data-v-ba0ee1d6] {
|
|
43
55
|
cursor: not-allowed;
|
|
44
56
|
}
|
|
45
|
-
.rs-switch:hover:not(.rs-switch--disabled):not(.rs-switch--checked) .rs-switch__root {
|
|
57
|
+
.rs-switch:hover:not(.rs-switch--disabled):not(.rs-switch--checked) .rs-switch__root[data-v-ba0ee1d6] {
|
|
46
58
|
border-color: var(--rs-primary);
|
|
47
59
|
}
|
|
48
|
-
.rs-
|
|
60
|
+
.rs-switch__input:focus-visible + .rs-switch__root[data-v-ba0ee1d6] {
|
|
49
61
|
box-shadow: 0 0 0 var(--rs-focus-ring-width, 2px) var(--rs-focus-ring);
|
|
50
62
|
}
|
|
51
|
-
.rs-switch--checked .rs-switch__root {
|
|
63
|
+
.rs-switch--checked .rs-switch__root[data-v-ba0ee1d6] {
|
|
52
64
|
background: var(--rs-primary);
|
|
53
65
|
border-color: var(--rs-primary);
|
|
54
66
|
}
|
|
55
|
-
.rs-switch--ssm {
|
|
67
|
+
.rs-switch--ssm[data-v-ba0ee1d6] {
|
|
56
68
|
--rs-switch-track-h: calc(var(--rs-control-height-ssm) * 2 / 3);
|
|
57
69
|
min-height: var(--rs-control-height-ssm);
|
|
58
70
|
}
|
|
59
|
-
.rs-switch--sm {
|
|
71
|
+
.rs-switch--sm[data-v-ba0ee1d6] {
|
|
60
72
|
--rs-switch-track-h: calc(var(--rs-control-height-sm) * 2 / 3);
|
|
61
73
|
min-height: var(--rs-control-height-sm);
|
|
62
74
|
}
|
|
63
|
-
.rs-switch--md {
|
|
75
|
+
.rs-switch--md[data-v-ba0ee1d6] {
|
|
64
76
|
--rs-switch-track-h: calc(var(--rs-control-height-md) * 2 / 3);
|
|
65
77
|
min-height: var(--rs-control-height-md);
|
|
66
78
|
}
|
|
67
|
-
.rs-switch--lg {
|
|
79
|
+
.rs-switch--lg[data-v-ba0ee1d6] {
|
|
68
80
|
--rs-switch-track-h: calc(var(--rs-control-height-lg) * 2 / 3);
|
|
69
81
|
min-height: var(--rs-control-height-lg);
|
|
70
82
|
}
|
|
71
|
-
.rs-switch__thumb {
|
|
83
|
+
.rs-switch__thumb[data-v-ba0ee1d6] {
|
|
72
84
|
position: absolute;
|
|
73
85
|
top: 50%;
|
|
74
86
|
inset-inline-start: var(--rs-switch-pad);
|
|
@@ -81,19 +93,25 @@
|
|
|
81
93
|
transform: translateY(-50%);
|
|
82
94
|
transition: inset-inline var(--rs-transition-fast);
|
|
83
95
|
}
|
|
84
|
-
.rs-switch--checked .rs-switch__thumb {
|
|
96
|
+
.rs-switch--checked .rs-switch__thumb[data-v-ba0ee1d6] {
|
|
85
97
|
inset-inline-start: auto;
|
|
86
98
|
inset-inline-end: var(--rs-switch-pad);
|
|
87
99
|
}
|
|
88
|
-
.rs-switch__label {
|
|
100
|
+
.rs-switch__label[data-v-ba0ee1d6] {
|
|
89
101
|
font-size: var(--rs-font-size-sm);
|
|
90
102
|
line-height: var(--rs-line-height-normal);
|
|
91
103
|
cursor: pointer;
|
|
92
104
|
}
|
|
93
|
-
.rs-switch--disabled .rs-switch__label {
|
|
105
|
+
.rs-switch--disabled .rs-switch__label[data-v-ba0ee1d6] {
|
|
94
106
|
cursor: not-allowed;
|
|
95
107
|
}
|
|
96
|
-
.rs-switch--ssm .rs-switch__label,
|
|
97
|
-
.rs-switch--sm .rs-switch__label {
|
|
108
|
+
.rs-switch--ssm .rs-switch__label[data-v-ba0ee1d6],
|
|
109
|
+
.rs-switch--sm .rs-switch__label[data-v-ba0ee1d6] {
|
|
98
110
|
font-size: var(--rs-font-size-xs);
|
|
99
111
|
}
|
|
112
|
+
@media (prefers-reduced-motion: reduce) {
|
|
113
|
+
.rs-switch__root[data-v-ba0ee1d6],
|
|
114
|
+
.rs-switch__thumb[data-v-ba0ee1d6] {
|
|
115
|
+
transition: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import type { RsComponentSize } from '../../../theme/types';
|
|
2
|
-
|
|
3
|
-
export type RsSwitchValue
|
|
2
|
+
import { type RsSwitchValue } from './switch-utils';
|
|
3
|
+
export type { RsSwitchValue };
|
|
4
|
+
/**
|
|
5
|
+
* RsSwitch 模板 ref 请用此类型。
|
|
6
|
+
* 不要写 `InstanceType<typeof RsSwitch>`:组件实例类型过深,vue-tsc 会报 Excessive stack depth。
|
|
7
|
+
*/
|
|
8
|
+
export interface RsSwitchExpose {
|
|
9
|
+
focus: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** 模板 ref 实例:expose + 根节点 */
|
|
12
|
+
export type RsSwitchInstance = RsSwitchExpose & {
|
|
13
|
+
$el: HTMLElement;
|
|
14
|
+
};
|
|
4
15
|
type __VLS_Props = {
|
|
5
16
|
disabled?: boolean;
|
|
6
17
|
size?: RsComponentSize;
|
|
7
18
|
/** 无障碍名称;有默认插槽文案时可省略 */
|
|
8
19
|
ariaLabel?: string;
|
|
9
20
|
id?: string;
|
|
21
|
+
/** 原生 name,供表单提交 */
|
|
22
|
+
name?: string;
|
|
10
23
|
/** 打开时写入 v-model 的值,默认 true */
|
|
11
24
|
checkedValue?: RsSwitchValue;
|
|
12
25
|
/** 关闭时写入 v-model 的值,默认 false */
|
|
@@ -16,11 +29,11 @@ type __VLS_ModelProps = {
|
|
|
16
29
|
modelValue?: RsSwitchValue;
|
|
17
30
|
};
|
|
18
31
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
-
declare var
|
|
32
|
+
declare var __VLS_1: {};
|
|
20
33
|
type __VLS_Slots = {} & {
|
|
21
|
-
default?: (props: typeof
|
|
34
|
+
default?: (props: typeof __VLS_1) => any;
|
|
22
35
|
};
|
|
23
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps,
|
|
36
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, RsSwitchExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
37
|
change: (value: RsSwitchValue) => any;
|
|
25
38
|
"update:modelValue": (value: RsSwitchValue) => any;
|
|
26
39
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|