niuma-ui 2.0.4 → 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 +58 -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.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/auto-complete/src/RsAutoComplete.d.ts +1 -1
- package/dist/components/button/src/RsButton.impl.js +1 -1
- package/dist/components/card/src/RsCard.d.ts +1 -1
- 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/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/src/RsDatePicker.d.ts +2 -2
- package/dist/components/date-picker/src/RsDateTimePicker.d.ts +2 -2
- 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/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/form/src/RsForm.d.ts +1 -1
- package/dist/components/input-number/src/RsInputNumber.d.ts +1 -1
- package/dist/components/label/src/RsLabel.d.ts +1 -1
- 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 +52 -2
- 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/src/RsMentions.d.ts +2 -2
- 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/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/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.d.ts +1 -1
- package/dist/components/time-picker/src/RsTimePicker.d.ts +2 -2
- package/dist/components/toaster/src/RsToaster.css +156 -203
- package/dist/components/toaster/src/RsToaster.d.ts +32 -2
- 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 +38 -16
- 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 +20 -20
- 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/src/RsTreeSelect.d.ts +1 -1
- 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 +30 -21
- package/dist/index.js +14 -0
- package/dist/locale/apply.js +6 -1
- package/dist/locale/messages.js +128 -2
- package/dist/styles.css +460 -797
- package/dist/theme/brand.example.css +2 -1
- package/dist/vite-plugins/niuma-ui-host.js +1 -1
- package/package.json +2 -3
|
@@ -1,18 +1,53 @@
|
|
|
1
1
|
|
|
2
|
-
.rs-empty {
|
|
2
|
+
.rs-empty[data-v-15fa5815] {
|
|
3
|
+
--rs-empty-pad-block: calc(var(--rs-space-xl) + var(--rs-space-xl) + var(--rs-space-sm));
|
|
4
|
+
--rs-empty-pad-inline: var(--rs-space-xl);
|
|
5
|
+
--rs-empty-gap: var(--rs-space-md);
|
|
6
|
+
--rs-empty-border: var(--rs-border);
|
|
7
|
+
--rs-empty-bg: color-mix(in srgb, var(--rs-surface) 80%, var(--rs-bg));
|
|
8
|
+
--rs-empty-title: var(--rs-text-primary);
|
|
9
|
+
--rs-empty-description: var(--rs-text-secondary);
|
|
10
|
+
--rs-empty-icon-border: var(--rs-border);
|
|
11
|
+
--rs-empty-icon-bg: var(--rs-surface);
|
|
12
|
+
--rs-empty-icon-fg: var(--rs-text-secondary);
|
|
13
|
+
--rs-empty-icon-shadow: var(--rs-shadow-sm);
|
|
14
|
+
--rs-empty-icon-size: 3.5rem;
|
|
15
|
+
--rs-empty-figure-size: 5rem;
|
|
16
|
+
--rs-empty-title-size: var(--rs-font-size-sm);
|
|
17
|
+
--rs-empty-title-weight: var(--rs-font-weight-medium);
|
|
18
|
+
--rs-empty-desc-size: var(--rs-font-size-sm);
|
|
19
|
+
--rs-empty-illustration: var(--rs-text-tertiary);
|
|
20
|
+
box-sizing: border-box;
|
|
3
21
|
display: flex;
|
|
4
22
|
flex-direction: column;
|
|
5
23
|
align-items: center;
|
|
6
24
|
justify-content: center;
|
|
7
|
-
gap:
|
|
8
|
-
padding:
|
|
25
|
+
gap: var(--rs-empty-gap);
|
|
26
|
+
padding-block: var(--rs-empty-pad-block);
|
|
27
|
+
padding-inline: var(--rs-empty-pad-inline);
|
|
9
28
|
border-radius: var(--rs-empty-radius, var(--rs-radius));
|
|
10
|
-
border: 1px dashed var(--rs-border);
|
|
11
|
-
background:
|
|
29
|
+
border: 1px dashed var(--rs-empty-border);
|
|
30
|
+
background: var(--rs-empty-bg);
|
|
31
|
+
color: var(--rs-empty-description);
|
|
12
32
|
text-align: center;
|
|
13
|
-
box-sizing: border-box;
|
|
14
33
|
}
|
|
15
|
-
.rs-empty--
|
|
34
|
+
.rs-empty--sm[data-v-15fa5815] {
|
|
35
|
+
--rs-empty-pad-block: var(--rs-space-xl);
|
|
36
|
+
--rs-empty-gap: var(--rs-space-sm);
|
|
37
|
+
--rs-empty-icon-size: 2.5rem;
|
|
38
|
+
--rs-empty-figure-size: 3.5rem;
|
|
39
|
+
--rs-empty-title-size: var(--rs-font-size-xs);
|
|
40
|
+
--rs-empty-desc-size: var(--rs-font-size-xs);
|
|
41
|
+
}
|
|
42
|
+
.rs-empty--lg[data-v-15fa5815] {
|
|
43
|
+
--rs-empty-pad-block: calc(var(--rs-space-xl) * 3);
|
|
44
|
+
--rs-empty-gap: var(--rs-space-lg);
|
|
45
|
+
--rs-empty-icon-size: 4.5rem;
|
|
46
|
+
--rs-empty-figure-size: 6.5rem;
|
|
47
|
+
--rs-empty-title-size: var(--rs-font-size-base);
|
|
48
|
+
--rs-empty-desc-size: var(--rs-font-size-base);
|
|
49
|
+
}
|
|
50
|
+
.rs-empty--fill[data-v-15fa5815] {
|
|
16
51
|
flex: 1 1 auto;
|
|
17
52
|
align-self: stretch;
|
|
18
53
|
width: 100%;
|
|
@@ -23,30 +58,77 @@
|
|
|
23
58
|
border-color: transparent;
|
|
24
59
|
background: transparent;
|
|
25
60
|
}
|
|
26
|
-
.rs-empty__icon {
|
|
61
|
+
.rs-empty__icon[data-v-15fa5815] {
|
|
27
62
|
display: flex;
|
|
28
63
|
align-items: center;
|
|
29
64
|
justify-content: center;
|
|
30
|
-
|
|
31
|
-
|
|
65
|
+
color: var(--rs-empty-icon-fg);
|
|
66
|
+
}
|
|
67
|
+
.rs-empty__icon--badge[data-v-15fa5815] {
|
|
68
|
+
width: var(--rs-empty-icon-size);
|
|
69
|
+
height: var(--rs-empty-icon-size);
|
|
32
70
|
border-radius: var(--rs-empty-icon-radius, var(--rs-radius-full));
|
|
33
|
-
border: 1px solid var(--rs-border);
|
|
34
|
-
background: var(--rs-
|
|
35
|
-
|
|
36
|
-
|
|
71
|
+
border: 1px solid var(--rs-empty-icon-border);
|
|
72
|
+
background: var(--rs-empty-icon-bg);
|
|
73
|
+
box-shadow: var(--rs-empty-icon-shadow);
|
|
74
|
+
}
|
|
75
|
+
.rs-empty__icon--figure[data-v-15fa5815] {
|
|
76
|
+
width: var(--rs-empty-figure-size);
|
|
77
|
+
height: var(--rs-empty-figure-size);
|
|
78
|
+
color: var(--rs-empty-illustration);
|
|
79
|
+
}
|
|
80
|
+
.rs-empty__svg[data-v-15fa5815],
|
|
81
|
+
.rs-empty__remote[data-v-15fa5815] {
|
|
82
|
+
display: block;
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 100%;
|
|
85
|
+
}
|
|
86
|
+
.rs-empty__remote[data-v-15fa5815] {
|
|
87
|
+
object-fit: contain;
|
|
37
88
|
}
|
|
38
|
-
.rs-
|
|
89
|
+
.rs-empty__text[data-v-15fa5815] {
|
|
90
|
+
max-width: 28rem;
|
|
91
|
+
}
|
|
92
|
+
.rs-empty__title[data-v-15fa5815] {
|
|
39
93
|
margin: 0;
|
|
40
|
-
font-size: var(--rs-
|
|
41
|
-
font-weight: var(--rs-
|
|
42
|
-
color: var(--rs-
|
|
94
|
+
font-size: var(--rs-empty-title-size);
|
|
95
|
+
font-weight: var(--rs-empty-title-weight);
|
|
96
|
+
color: var(--rs-empty-title);
|
|
43
97
|
}
|
|
44
|
-
.rs-empty__description {
|
|
98
|
+
.rs-empty__description[data-v-15fa5815] {
|
|
45
99
|
margin: 0;
|
|
46
|
-
font-size: var(--rs-
|
|
47
|
-
color: var(--rs-
|
|
100
|
+
font-size: var(--rs-empty-desc-size);
|
|
101
|
+
color: var(--rs-empty-description);
|
|
48
102
|
line-height: var(--rs-line-height-normal);
|
|
49
103
|
}
|
|
50
|
-
.rs-empty__description--offset {
|
|
51
|
-
margin-
|
|
104
|
+
.rs-empty__description--offset[data-v-15fa5815] {
|
|
105
|
+
margin-block-start: var(--rs-space-xs);
|
|
106
|
+
}
|
|
107
|
+
.rs-empty__actions[data-v-15fa5815] {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-wrap: wrap;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: var(--rs-space-sm);
|
|
113
|
+
}
|
|
114
|
+
@media (forced-colors: active) {
|
|
115
|
+
.rs-empty[data-v-15fa5815] {
|
|
116
|
+
border-color: CanvasText;
|
|
117
|
+
background: Canvas;
|
|
118
|
+
color: CanvasText;
|
|
119
|
+
}
|
|
120
|
+
.rs-empty--fill[data-v-15fa5815] {
|
|
121
|
+
border-color: transparent;
|
|
122
|
+
background: transparent;
|
|
123
|
+
}
|
|
124
|
+
.rs-empty__icon--badge[data-v-15fa5815] {
|
|
125
|
+
border-color: CanvasText;
|
|
126
|
+
background: Canvas;
|
|
127
|
+
box-shadow: none;
|
|
128
|
+
}
|
|
129
|
+
.rs-empty__title[data-v-15fa5815],
|
|
130
|
+
.rs-empty__description[data-v-15fa5815],
|
|
131
|
+
.rs-empty__icon[data-v-15fa5815] {
|
|
132
|
+
color: CanvasText;
|
|
133
|
+
}
|
|
52
134
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { RsRadius } from '../../../theme/types';
|
|
2
|
+
import { type RsEmptyPreset, type RsEmptySize } from './empty-utils';
|
|
2
3
|
type __VLS_Props = {
|
|
3
|
-
description: string;
|
|
4
4
|
title?: string;
|
|
5
|
+
/** 未传走 locale;显式空字符串隐藏描述。 */
|
|
6
|
+
description?: string;
|
|
5
7
|
/**
|
|
6
8
|
* 占满父级可用空间,并去除外层虚线框 / 背景。
|
|
7
9
|
* 适合嵌在面板、列表、结果区内的空态。
|
|
@@ -12,15 +14,36 @@ type __VLS_Props = {
|
|
|
12
14
|
radius?: RsRadius;
|
|
13
15
|
/** 图标区圆角。默认 full(圆形);直角 UI 传 `none`。 */
|
|
14
16
|
iconRadius?: RsRadius;
|
|
17
|
+
/** 内置插图。`#image` / `#icon` / `image` 优先。 */
|
|
18
|
+
preset?: RsEmptyPreset;
|
|
19
|
+
/** 密度:sm 表格内 / md 默认 / lg 整页。不是控件四档,没有 ssm。 */
|
|
20
|
+
size?: RsEmptySize;
|
|
21
|
+
/** 自定义插图 URL。失败时回退 preset。不要传入 object URL 除非调用方自己 revoke。 */
|
|
22
|
+
image?: string;
|
|
23
|
+
/** 插图替代文本。装饰图请留空。 */
|
|
24
|
+
imageAlt?: string;
|
|
25
|
+
/** 覆盖插图边长。数字按 px。 */
|
|
26
|
+
imageSize?: number | string;
|
|
27
|
+
/** 无插槽且无 image 时是否画内置插图。 */
|
|
28
|
+
showImage?: boolean;
|
|
29
|
+
id?: string;
|
|
30
|
+
ariaLabel?: string;
|
|
15
31
|
};
|
|
16
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
32
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {};
|
|
17
33
|
type __VLS_Slots = {} & {
|
|
18
|
-
|
|
34
|
+
image?: (props: typeof __VLS_1) => any;
|
|
19
35
|
} & {
|
|
20
|
-
|
|
36
|
+
icon?: (props: typeof __VLS_3) => any;
|
|
37
|
+
} & {
|
|
38
|
+
title?: (props: typeof __VLS_5) => any;
|
|
39
|
+
} & {
|
|
40
|
+
description?: (props: typeof __VLS_7) => any;
|
|
41
|
+
} & {
|
|
42
|
+
default?: (props: typeof __VLS_9) => any;
|
|
21
43
|
};
|
|
22
44
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
45
|
fill: boolean;
|
|
46
|
+
showImage: boolean;
|
|
24
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
48
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
49
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,41 +1,184 @@
|
|
|
1
|
+
import { useRsI18n } from "../../../composables/useRsI18n.js";
|
|
1
2
|
import { rsRadiusCss, useResolvedRsRadius } from "../../_shared/src/resolve-radius.js";
|
|
2
|
-
import {
|
|
3
|
+
import { resolveRsEmptyDescription, resolveRsEmptyImageSizeCss, resolveRsEmptyLocaleKey, resolveRsEmptyPreset, resolveRsEmptySize, shouldShowRsEmptyDescription, shouldShowRsEmptyIllustration, shouldShowRsEmptyRemoteImage, shouldShowRsEmptyTitle, shouldUseRsEmptyBadgeChrome } from "./empty-utils.js";
|
|
4
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, useSlots, watch } from "vue";
|
|
3
5
|
//#region src/components/empty/src/RsEmpty.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var _hoisted_1 =
|
|
5
|
-
var _hoisted_2 =
|
|
6
|
+
var _hoisted_1 = ["id", "aria-label"];
|
|
7
|
+
var _hoisted_2 = ["src", "alt"];
|
|
6
8
|
var _hoisted_3 = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "rs-empty__svg",
|
|
11
|
+
viewBox: "0 0 64 64",
|
|
12
|
+
fill: "none"
|
|
13
|
+
};
|
|
14
|
+
var _hoisted_4 = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "rs-empty__svg",
|
|
17
|
+
viewBox: "0 0 64 64",
|
|
18
|
+
fill: "none"
|
|
19
|
+
};
|
|
20
|
+
var _hoisted_5 = {
|
|
21
|
+
key: 3,
|
|
22
|
+
class: "rs-empty__svg",
|
|
23
|
+
viewBox: "0 0 64 64",
|
|
24
|
+
fill: "none"
|
|
25
|
+
};
|
|
26
|
+
var _hoisted_6 = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "rs-empty__text"
|
|
29
|
+
};
|
|
30
|
+
var _hoisted_7 = {
|
|
7
31
|
key: 0,
|
|
8
32
|
class: "rs-empty__title"
|
|
9
33
|
};
|
|
34
|
+
var _hoisted_8 = {
|
|
35
|
+
key: 2,
|
|
36
|
+
class: "rs-empty__actions"
|
|
37
|
+
};
|
|
10
38
|
var RsEmpty_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
39
|
+
name: "RsEmpty",
|
|
11
40
|
__name: "RsEmpty",
|
|
12
41
|
props: {
|
|
13
|
-
description: {},
|
|
14
42
|
title: {},
|
|
43
|
+
description: {},
|
|
15
44
|
fill: {
|
|
16
45
|
type: Boolean,
|
|
17
46
|
default: false
|
|
18
47
|
},
|
|
19
48
|
radius: {},
|
|
20
|
-
iconRadius: {}
|
|
49
|
+
iconRadius: {},
|
|
50
|
+
preset: {},
|
|
51
|
+
size: {},
|
|
52
|
+
image: {},
|
|
53
|
+
imageAlt: {},
|
|
54
|
+
imageSize: {},
|
|
55
|
+
showImage: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
59
|
+
id: {},
|
|
60
|
+
ariaLabel: {}
|
|
21
61
|
},
|
|
22
62
|
setup(__props) {
|
|
23
63
|
const props = __props;
|
|
64
|
+
const slots = useSlots();
|
|
65
|
+
const { t } = useRsI18n();
|
|
66
|
+
const failedImageSrc = ref(null);
|
|
67
|
+
const resolvedPreset = computed(() => resolveRsEmptyPreset(props.preset));
|
|
68
|
+
const resolvedSize = computed(() => resolveRsEmptySize(props.size));
|
|
24
69
|
const resolvedRadius = useResolvedRsRadius(() => props.radius, "md");
|
|
25
70
|
const resolvedIconRadius = useResolvedRsRadius(() => props.iconRadius, "full");
|
|
71
|
+
const hasIconSlot = computed(() => Boolean(slots.icon));
|
|
72
|
+
const hasImageSlot = computed(() => Boolean(slots.image));
|
|
73
|
+
const hasTitleSlot = computed(() => Boolean(slots.title));
|
|
74
|
+
const hasDescriptionSlot = computed(() => Boolean(slots.description));
|
|
75
|
+
const localeDescription = computed(() => t(resolveRsEmptyLocaleKey(resolvedPreset.value)));
|
|
76
|
+
const resolvedDescription = computed(() => resolveRsEmptyDescription(props.description, localeDescription.value));
|
|
77
|
+
const showTitle = computed(() => shouldShowRsEmptyTitle(props.title, hasTitleSlot.value));
|
|
78
|
+
const showDescription = computed(() => shouldShowRsEmptyDescription(resolvedDescription.value, hasDescriptionSlot.value));
|
|
79
|
+
const showText = computed(() => showTitle.value || showDescription.value);
|
|
80
|
+
const showIllustration = computed(() => shouldShowRsEmptyIllustration({
|
|
81
|
+
showImage: props.showImage,
|
|
82
|
+
hasIconSlot: hasIconSlot.value,
|
|
83
|
+
hasImageSlot: hasImageSlot.value
|
|
84
|
+
}));
|
|
85
|
+
const useBadgeChrome = computed(() => shouldUseRsEmptyBadgeChrome(hasIconSlot.value, hasImageSlot.value));
|
|
86
|
+
const showRemoteImage = computed(() => shouldShowRsEmptyRemoteImage({
|
|
87
|
+
image: props.image,
|
|
88
|
+
failedSrc: failedImageSrc.value,
|
|
89
|
+
hasIconSlot: hasIconSlot.value,
|
|
90
|
+
hasImageSlot: hasImageSlot.value
|
|
91
|
+
}));
|
|
92
|
+
const rootClass = computed(() => [
|
|
93
|
+
"rs-empty",
|
|
94
|
+
`rs-empty--${resolvedSize.value}`,
|
|
95
|
+
{ "rs-empty--fill": props.fill }
|
|
96
|
+
]);
|
|
97
|
+
const iconClass = computed(() => ({
|
|
98
|
+
"rs-empty__icon--badge": useBadgeChrome.value,
|
|
99
|
+
"rs-empty__icon--figure": !useBadgeChrome.value
|
|
100
|
+
}));
|
|
101
|
+
const figureStyle = computed(() => {
|
|
102
|
+
const size = resolveRsEmptyImageSizeCss(props.imageSize);
|
|
103
|
+
return size ? {
|
|
104
|
+
width: size,
|
|
105
|
+
height: size
|
|
106
|
+
} : void 0;
|
|
107
|
+
});
|
|
26
108
|
const rootStyle = computed(() => ({
|
|
27
109
|
"--rs-empty-radius": props.fill ? "0" : rsRadiusCss(resolvedRadius.value),
|
|
28
110
|
"--rs-empty-icon-radius": rsRadiusCss(resolvedIconRadius.value)
|
|
29
111
|
}));
|
|
112
|
+
const rootAriaLabel = computed(() => {
|
|
113
|
+
if (props.ariaLabel) return props.ariaLabel;
|
|
114
|
+
if (!showText.value) return t("empty.label");
|
|
115
|
+
});
|
|
116
|
+
const remoteAlt = computed(() => props.imageAlt ?? "");
|
|
117
|
+
watch(() => props.image, () => {
|
|
118
|
+
failedImageSrc.value = null;
|
|
119
|
+
});
|
|
120
|
+
function onImageError() {
|
|
121
|
+
failedImageSrc.value = props.image?.trim() || null;
|
|
122
|
+
}
|
|
30
123
|
return (_ctx, _cache) => {
|
|
31
124
|
return openBlock(), createElementBlock("div", {
|
|
32
|
-
|
|
33
|
-
|
|
125
|
+
id: __props.id,
|
|
126
|
+
class: normalizeClass(rootClass.value),
|
|
127
|
+
style: normalizeStyle(rootStyle.value),
|
|
128
|
+
role: "status",
|
|
129
|
+
"aria-label": rootAriaLabel.value
|
|
34
130
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
131
|
+
showIllustration.value ? (openBlock(), createElementBlock("div", {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: normalizeClass(["rs-empty__icon", iconClass.value]),
|
|
134
|
+
style: normalizeStyle(figureStyle.value),
|
|
135
|
+
"aria-hidden": "true"
|
|
136
|
+
}, [renderSlot(_ctx.$slots, "image", {}, () => [renderSlot(_ctx.$slots, "icon", {}, () => [showRemoteImage.value ? (openBlock(), createElementBlock("img", {
|
|
137
|
+
key: 0,
|
|
138
|
+
class: "rs-empty__remote",
|
|
139
|
+
src: __props.image,
|
|
140
|
+
alt: remoteAlt.value,
|
|
141
|
+
onError: onImageError
|
|
142
|
+
}, null, 40, _hoisted_2)) : resolvedPreset.value === "simple" ? (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [createElementVNode("rect", {
|
|
143
|
+
x: "14",
|
|
144
|
+
y: "18",
|
|
145
|
+
width: "36",
|
|
146
|
+
height: "28",
|
|
147
|
+
rx: "4",
|
|
148
|
+
stroke: "currentColor",
|
|
149
|
+
"stroke-width": "1.75",
|
|
150
|
+
"stroke-dasharray": "3.5 2.5"
|
|
151
|
+
}, null, -1)])])) : resolvedPreset.value === "search" ? (openBlock(), createElementBlock("svg", _hoisted_4, [..._cache[1] || (_cache[1] = [createElementVNode("circle", {
|
|
152
|
+
cx: "28",
|
|
153
|
+
cy: "28",
|
|
154
|
+
r: "12",
|
|
155
|
+
stroke: "currentColor",
|
|
156
|
+
"stroke-width": "1.75"
|
|
157
|
+
}, null, -1), createElementVNode("path", {
|
|
158
|
+
d: "M37 37 48 48",
|
|
159
|
+
stroke: "currentColor",
|
|
160
|
+
"stroke-width": "1.75",
|
|
161
|
+
"stroke-linecap": "round"
|
|
162
|
+
}, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_5, [..._cache[2] || (_cache[2] = [createElementVNode("rect", {
|
|
163
|
+
x: "13",
|
|
164
|
+
y: "16",
|
|
165
|
+
width: "38",
|
|
166
|
+
height: "32",
|
|
167
|
+
rx: "5",
|
|
168
|
+
stroke: "currentColor",
|
|
169
|
+
"stroke-width": "1.75"
|
|
170
|
+
}, null, -1), createElementVNode("path", {
|
|
171
|
+
d: "M22 28h20M22 36h14",
|
|
172
|
+
stroke: "currentColor",
|
|
173
|
+
"stroke-width": "1.75",
|
|
174
|
+
"stroke-linecap": "round"
|
|
175
|
+
}, null, -1)])]))], true)], true)], 6)) : createCommentVNode("", true),
|
|
176
|
+
showText.value ? (openBlock(), createElementBlock("div", _hoisted_6, [showTitle.value ? (openBlock(), createElementBlock("p", _hoisted_7, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)], true)])) : createCommentVNode("", true), showDescription.value ? (openBlock(), createElementBlock("p", {
|
|
177
|
+
key: 1,
|
|
178
|
+
class: normalizeClass(["rs-empty__description", { "rs-empty__description--offset": showTitle.value }])
|
|
179
|
+
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(resolvedDescription.value), 1)], true)], 2)) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
180
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])) : createCommentVNode("", true)
|
|
181
|
+
], 14, _hoisted_1);
|
|
39
182
|
};
|
|
40
183
|
}
|
|
41
184
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import './RsEmpty.css'
|
|
2
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
3
|
import RsEmpty_vue_vue_type_script_setup_true_lang_default from "./RsEmpty.impl.js";
|
|
3
4
|
|
|
4
5
|
//#region src/components/empty/src/RsEmpty.vue
|
|
5
|
-
var RsEmpty_default = RsEmpty_vue_vue_type_script_setup_true_lang_default;
|
|
6
|
+
var RsEmpty_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsEmpty_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-15fa5815"]]);
|
|
6
7
|
//#endregion
|
|
7
8
|
export { RsEmpty_default as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const RS_EMPTY_PRESETS: readonly ["default", "simple", "search"];
|
|
2
|
+
export type RsEmptyPreset = (typeof RS_EMPTY_PRESETS)[number];
|
|
3
|
+
export declare const RS_EMPTY_SIZES: readonly ["sm", "md", "lg"];
|
|
4
|
+
export type RsEmptySize = (typeof RS_EMPTY_SIZES)[number];
|
|
5
|
+
export type RsEmptyLocaleKey = 'empty.description' | 'empty.search';
|
|
6
|
+
export declare function isRsEmptyPreset(value: unknown): value is RsEmptyPreset;
|
|
7
|
+
export declare function isRsEmptySize(value: unknown): value is RsEmptySize;
|
|
8
|
+
export declare function resolveRsEmptyPreset(preset?: RsEmptyPreset | null): RsEmptyPreset;
|
|
9
|
+
export declare function resolveRsEmptySize(size?: RsEmptySize | null): RsEmptySize;
|
|
10
|
+
export declare function resolveRsEmptyLocaleKey(preset: RsEmptyPreset): RsEmptyLocaleKey;
|
|
11
|
+
/** 未传走 locale;显式 `''` 表示隐藏描述。 */
|
|
12
|
+
export declare function resolveRsEmptyDescription(description: string | undefined, fallback: string): string;
|
|
13
|
+
export declare function shouldShowRsEmptyTitle(title: string | undefined, hasTitleSlot: boolean): boolean;
|
|
14
|
+
export declare function shouldShowRsEmptyDescription(description: string, hasDescriptionSlot: boolean): boolean;
|
|
15
|
+
export declare function shouldShowRsEmptyIllustration(options: {
|
|
16
|
+
showImage: boolean;
|
|
17
|
+
hasIconSlot: boolean;
|
|
18
|
+
hasImageSlot: boolean;
|
|
19
|
+
}): boolean;
|
|
20
|
+
/** `#image` 整图替换;仅 `#icon` 时保留圆形徽章底。 */
|
|
21
|
+
export declare function shouldUseRsEmptyBadgeChrome(hasIconSlot: boolean, hasImageSlot: boolean): boolean;
|
|
22
|
+
export declare function shouldShowRsEmptyRemoteImage(options: {
|
|
23
|
+
image?: string;
|
|
24
|
+
failedSrc: string | null;
|
|
25
|
+
hasIconSlot: boolean;
|
|
26
|
+
hasImageSlot: boolean;
|
|
27
|
+
}): boolean;
|
|
28
|
+
export declare function resolveRsEmptyImageSizeCss(size?: number | string): string | undefined;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region src/components/empty/src/empty-utils.ts
|
|
2
|
+
var RS_EMPTY_PRESETS = [
|
|
3
|
+
"default",
|
|
4
|
+
"simple",
|
|
5
|
+
"search"
|
|
6
|
+
];
|
|
7
|
+
var RS_EMPTY_SIZES = [
|
|
8
|
+
"sm",
|
|
9
|
+
"md",
|
|
10
|
+
"lg"
|
|
11
|
+
];
|
|
12
|
+
function isRsEmptyPreset(value) {
|
|
13
|
+
return typeof value === "string" && RS_EMPTY_PRESETS.includes(value);
|
|
14
|
+
}
|
|
15
|
+
function isRsEmptySize(value) {
|
|
16
|
+
return typeof value === "string" && RS_EMPTY_SIZES.includes(value);
|
|
17
|
+
}
|
|
18
|
+
function resolveRsEmptyPreset(preset) {
|
|
19
|
+
return isRsEmptyPreset(preset) ? preset : "default";
|
|
20
|
+
}
|
|
21
|
+
function resolveRsEmptySize(size) {
|
|
22
|
+
return isRsEmptySize(size) ? size : "md";
|
|
23
|
+
}
|
|
24
|
+
function resolveRsEmptyLocaleKey(preset) {
|
|
25
|
+
return preset === "search" ? "empty.search" : "empty.description";
|
|
26
|
+
}
|
|
27
|
+
/** 未传走 locale;显式 `''` 表示隐藏描述。 */
|
|
28
|
+
function resolveRsEmptyDescription(description, fallback) {
|
|
29
|
+
return description ?? fallback;
|
|
30
|
+
}
|
|
31
|
+
function shouldShowRsEmptyTitle(title, hasTitleSlot) {
|
|
32
|
+
return hasTitleSlot || Boolean(title);
|
|
33
|
+
}
|
|
34
|
+
function shouldShowRsEmptyDescription(description, hasDescriptionSlot) {
|
|
35
|
+
return hasDescriptionSlot || description !== "";
|
|
36
|
+
}
|
|
37
|
+
function shouldShowRsEmptyIllustration(options) {
|
|
38
|
+
return options.hasImageSlot || options.hasIconSlot || options.showImage;
|
|
39
|
+
}
|
|
40
|
+
/** `#image` 整图替换;仅 `#icon` 时保留圆形徽章底。 */
|
|
41
|
+
function shouldUseRsEmptyBadgeChrome(hasIconSlot, hasImageSlot) {
|
|
42
|
+
return hasIconSlot && !hasImageSlot;
|
|
43
|
+
}
|
|
44
|
+
function shouldShowRsEmptyRemoteImage(options) {
|
|
45
|
+
const src = options.image?.trim();
|
|
46
|
+
if (!src || options.hasIconSlot || options.hasImageSlot) return false;
|
|
47
|
+
return src !== options.failedSrc;
|
|
48
|
+
}
|
|
49
|
+
function resolveRsEmptyImageSizeCss(size) {
|
|
50
|
+
if (size == null || size === "") return void 0;
|
|
51
|
+
if (typeof size === "number" && Number.isFinite(size)) return `${size}px`;
|
|
52
|
+
return String(size).trim() || void 0;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { RS_EMPTY_PRESETS, RS_EMPTY_SIZES, isRsEmptyPreset, isRsEmptySize, resolveRsEmptyDescription, resolveRsEmptyImageSizeCss, resolveRsEmptyLocaleKey, resolveRsEmptyPreset, resolveRsEmptySize, shouldShowRsEmptyDescription, shouldShowRsEmptyIllustration, shouldShowRsEmptyRemoteImage, shouldShowRsEmptyTitle, shouldUseRsEmptyBadgeChrome };
|
|
@@ -63,9 +63,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, RsFormExpos
|
|
|
63
63
|
gap: RsFormGap;
|
|
64
64
|
size: RsFormSize;
|
|
65
65
|
disabled: boolean;
|
|
66
|
-
labelPosition: RsFormLabelPosition;
|
|
67
66
|
labelWidth: string;
|
|
68
67
|
labelAlign: RsFormLabelAlign;
|
|
68
|
+
labelPosition: RsFormLabelPosition;
|
|
69
69
|
validateOnSubmit: boolean;
|
|
70
70
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
71
71
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -79,11 +79,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, RsI
|
|
|
79
79
|
required: boolean;
|
|
80
80
|
disabled: boolean;
|
|
81
81
|
step: number | string;
|
|
82
|
+
keyboard: boolean;
|
|
82
83
|
readonly: boolean;
|
|
83
84
|
autocomplete: string;
|
|
84
85
|
stringMode: boolean;
|
|
85
86
|
controls: boolean;
|
|
86
|
-
keyboard: boolean;
|
|
87
87
|
changeOnWheel: boolean;
|
|
88
88
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
89
89
|
declare const _default: typeof __VLS_export;
|
|
@@ -28,9 +28,9 @@ type __VLS_Slots = {} & {
|
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
29
29
|
required: boolean;
|
|
30
30
|
disabled: boolean;
|
|
31
|
+
colon: boolean;
|
|
31
32
|
optional: boolean;
|
|
32
33
|
nowrap: boolean;
|
|
33
|
-
colon: boolean;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
36
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,106 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
.rs-loading {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
font-size: var(--rs-font-size-sm);
|
|
8
|
-
}
|
|
9
|
-
.rs-loading--block {
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
width: 100%;
|
|
13
|
-
padding: 1.5rem;
|
|
2
|
+
.rs-loading-host[data-v-a0afaad1] {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: block;
|
|
5
|
+
inline-size: 100%;
|
|
6
|
+
min-inline-size: 0;
|
|
14
7
|
}
|
|
15
|
-
.rs-loading--
|
|
16
|
-
position: absolute;
|
|
17
|
-
inset: 0;
|
|
18
|
-
z-index: 1;
|
|
8
|
+
.rs-loading-host--block[data-v-a0afaad1] {
|
|
19
9
|
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
10
|
justify-content: center;
|
|
22
|
-
background: color-mix(in srgb, var(--rs-surface) 72%, transparent);
|
|
23
|
-
}
|
|
24
|
-
.rs-loading__spinner {
|
|
25
|
-
display: inline-block;
|
|
26
|
-
border-radius: var(--rs-radius-full);
|
|
27
|
-
border: 2px solid color-mix(in srgb, var(--rs-muted) 30%, transparent);
|
|
28
|
-
border-top-color: var(--rs-primary);
|
|
29
|
-
animation: rs-loading-spin 0.7s linear infinite;
|
|
30
|
-
}
|
|
31
|
-
.rs-loading__spinner--sm {
|
|
32
|
-
width: 0.875rem;
|
|
33
|
-
height: 0.875rem;
|
|
34
|
-
}
|
|
35
|
-
.rs-loading__spinner--md {
|
|
36
|
-
width: 1.125rem;
|
|
37
|
-
height: 1.125rem;
|
|
38
|
-
}
|
|
39
|
-
.rs-loading__spinner--lg {
|
|
40
|
-
width: 1.5rem;
|
|
41
|
-
height: 1.5rem;
|
|
42
|
-
}
|
|
43
|
-
.rs-loading__dots {
|
|
44
|
-
display: inline-flex;
|
|
45
|
-
gap: 0.25rem;
|
|
46
|
-
}
|
|
47
|
-
.rs-loading__dot {
|
|
48
|
-
width: 0.375rem;
|
|
49
|
-
height: 0.375rem;
|
|
50
|
-
border-radius: var(--rs-radius-full);
|
|
51
|
-
background: var(--rs-primary);
|
|
52
|
-
animation: rs-loading-bounce 1s ease-in-out infinite;
|
|
53
|
-
}
|
|
54
|
-
.rs-loading__dot:nth-child(2) {
|
|
55
|
-
animation-delay: 0.15s;
|
|
56
|
-
}
|
|
57
|
-
.rs-loading__dot:nth-child(3) {
|
|
58
|
-
animation-delay: 0.3s;
|
|
59
|
-
}
|
|
60
|
-
.rs-loading__skeleton {
|
|
61
|
-
display: flex;
|
|
62
|
-
width: 100%;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
gap: 0.5rem;
|
|
65
|
-
}
|
|
66
|
-
.rs-loading__skeleton-line {
|
|
67
|
-
display: block;
|
|
68
|
-
height: 0.75rem;
|
|
69
|
-
border-radius: var(--rs-radius-xs);
|
|
70
|
-
background: linear-gradient(
|
|
71
|
-
90deg,
|
|
72
|
-
var(--rs-surface-hover) 25%,
|
|
73
|
-
color-mix(in srgb, var(--rs-border) 60%, transparent) 50%,
|
|
74
|
-
var(--rs-surface-hover) 75%
|
|
75
|
-
);
|
|
76
|
-
background-size: 200% 100%;
|
|
77
|
-
animation: rs-loading-shimmer 1.2s ease-in-out infinite;
|
|
78
|
-
}
|
|
79
|
-
.rs-loading__skeleton-line:last-child {
|
|
80
|
-
width: 70%;
|
|
81
|
-
}
|
|
82
|
-
@keyframes rs-loading-spin {
|
|
83
|
-
to {
|
|
84
|
-
transform: rotate(360deg);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
@keyframes rs-loading-bounce {
|
|
88
|
-
0%,
|
|
89
|
-
80%,
|
|
90
|
-
100% {
|
|
91
|
-
opacity: 0.35;
|
|
92
|
-
transform: translateY(0);
|
|
93
|
-
}
|
|
94
|
-
40% {
|
|
95
|
-
opacity: 1;
|
|
96
|
-
transform: translateY(-2px);
|
|
97
11
|
}
|
|
12
|
+
.rs-loading-host__content[data-v-a0afaad1] {
|
|
13
|
+
min-inline-size: 0;
|
|
98
14
|
}
|
|
99
|
-
|
|
100
|
-
0
|
|
101
|
-
background-position: 200% 0;
|
|
15
|
+
.rs-loading-host--blur > .rs-loading-host__content[data-v-a0afaad1] {
|
|
16
|
+
filter: blur(var(--rs-loading-blur, 0.125rem));
|
|
102
17
|
}
|
|
103
|
-
|
|
104
|
-
|
|
18
|
+
@media (prefers-reduced-motion: reduce) {
|
|
19
|
+
.rs-loading-host--blur > .rs-loading-host__content[data-v-a0afaad1] {
|
|
20
|
+
filter: none;
|
|
105
21
|
}
|
|
106
22
|
}
|