niuma-ui 2.1.0 → 2.1.3
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 +25 -0
- package/dist/components/auto-complete/src/RsAutoComplete.d.ts +2 -2
- package/dist/components/code-block/src/RsCodeBlock.css +26 -26
- package/dist/components/code-block/src/RsCodeBlock.impl.js +2 -2
- package/dist/components/code-block/src/RsCodeBlock.js +1 -1
- package/dist/components/code-block/src/code-block-utils.js +2 -1
- package/dist/components/code-editor/src/code-editor-utils.js +2 -1
- package/dist/components/context-menu/src/RsContextMenu.css +19 -19
- 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/dialog/src/RsConfirmDialog.css +25 -25
- package/dist/components/dialog/src/RsConfirmDialog.impl.js +4 -4
- package/dist/components/dialog/src/RsConfirmDialog.js +1 -1
- package/dist/components/dialog/src/RsDialog.css +63 -63
- package/dist/components/dialog/src/RsDialog.impl.js +56 -11
- package/dist/components/dialog/src/RsDialog.js +1 -1
- package/dist/components/dialog/src/dialog-window.d.ts +1 -0
- package/dist/components/dialog/src/dialog-window.js +1 -0
- package/dist/components/dynamic-tags/src/RsDynamicTags.d.ts +2 -2
- package/dist/components/icon/src/RsIcon.css +5 -5
- package/dist/components/icon/src/RsIcon.d.ts +1 -1
- package/dist/components/icon/src/RsIcon.impl.js +1 -1
- package/dist/components/icon/src/RsIcon.js +1 -1
- package/dist/components/input/src/RsInput.d.ts +2 -2
- package/dist/components/mentions/src/RsMentions.d.ts +2 -2
- package/dist/components/monaco-editor/src/monaco-editor-utils.js +2 -1
- package/dist/components/select/src/RsSelect.d.ts +2 -2
- package/dist/components/tabs/src/RsTabs.d.ts +3 -3
- package/dist/components/tabs/src/RsTabs.impl.js +1 -1
- package/dist/components/terminal/src/terminal-utils.js +2 -1
- package/dist/components/textarea/src/RsTextarea.d.ts +2 -2
- package/dist/components/time-picker/src/RsTimePicker.d.ts +2 -2
- package/dist/components/tree/src/RsTree.css +74 -74
- package/dist/components/tree/src/RsTree.js +1 -1
- package/dist/components/tree-select/src/RsTreeSelect.d.ts +2 -2
- package/dist/icons/host.d.ts +11 -0
- package/dist/icons/host.js +30 -0
- package/dist/icons/lucide.js +10 -3
- package/dist/icons/registry.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +7 -0
- package/dist/styles.css +27 -11
- package/dist/theme/color-theme.d.ts +64 -0
- package/dist/theme/color-theme.js +100 -0
- package/dist/utils/rs-clipboard.d.ts +1 -1
- package/dist/utils/rs-clipboard.js +17 -7
- package/dist/vite-plugins/niuma-ui-host.d.ts +2 -1
- package/dist/vite-plugins/niuma-ui-host.js +25 -6
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { documentThemeAttributes } from "../../../theme/color-theme.js";
|
|
1
2
|
//#region src/components/terminal/src/terminal-utils.ts
|
|
2
3
|
var TERMINAL_CSS_KEYS = [
|
|
3
4
|
["background", "--rs-terminal-bg"],
|
|
@@ -235,7 +236,7 @@ function ensureTerminalThemeObserver() {
|
|
|
235
236
|
});
|
|
236
237
|
sharedThemeObserver.observe(document.documentElement, {
|
|
237
238
|
attributes: true,
|
|
238
|
-
attributeFilter: [
|
|
239
|
+
attributeFilter: [...documentThemeAttributes],
|
|
239
240
|
subtree: true
|
|
240
241
|
});
|
|
241
242
|
}
|
|
@@ -66,9 +66,9 @@ type __VLS_Slots = {} & {
|
|
|
66
66
|
error?: (props: typeof __VLS_8) => any;
|
|
67
67
|
};
|
|
68
68
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, RsTextareaExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
69
|
+
clear: () => any;
|
|
69
70
|
blur: (event: FocusEvent) => any;
|
|
70
71
|
focus: (event: FocusEvent) => any;
|
|
71
|
-
clear: () => any;
|
|
72
72
|
"update:modelValue": (value: string) => any;
|
|
73
73
|
validate: (payload: {
|
|
74
74
|
valid: boolean;
|
|
@@ -76,9 +76,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, RsTex
|
|
|
76
76
|
}) => any;
|
|
77
77
|
pressEnter: (event: KeyboardEvent) => any;
|
|
78
78
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
79
|
+
onClear?: (() => any) | undefined;
|
|
79
80
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
80
81
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
81
|
-
onClear?: (() => any) | undefined;
|
|
82
82
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
83
83
|
onValidate?: ((payload: {
|
|
84
84
|
valid: boolean;
|
|
@@ -55,17 +55,17 @@ type __VLS_ModelProps = {
|
|
|
55
55
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
56
56
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, RsTimePickerExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
57
57
|
change: (value: RsTimePickerModelValue) => any;
|
|
58
|
+
clear: () => any;
|
|
58
59
|
blur: () => any;
|
|
59
60
|
focus: () => any;
|
|
60
|
-
clear: () => any;
|
|
61
61
|
"update:modelValue": (value: RsTimePickerModelValue) => any;
|
|
62
62
|
openChange: (open: boolean) => any;
|
|
63
63
|
"update:open": (value: boolean) => any;
|
|
64
64
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
65
65
|
onChange?: ((value: RsTimePickerModelValue) => any) | undefined;
|
|
66
|
+
onClear?: (() => any) | undefined;
|
|
66
67
|
onBlur?: (() => any) | undefined;
|
|
67
68
|
onFocus?: (() => any) | undefined;
|
|
68
|
-
onClear?: (() => any) | undefined;
|
|
69
69
|
"onUpdate:modelValue"?: ((value: RsTimePickerModelValue) => any) | undefined;
|
|
70
70
|
onOpenChange?: ((open: boolean) => any) | undefined;
|
|
71
71
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
|
|
2
|
-
.rs-tree[data-v-
|
|
2
|
+
.rs-tree[data-v-2c7a1313] {
|
|
3
3
|
outline: none;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
/* 限定高度 / 虚拟滚动:铺满父级,::before 捕获节点列表下方空白区右键 */
|
|
7
|
-
.rs-tree--fill-capture[data-v-
|
|
7
|
+
.rs-tree--fill-capture[data-v-2c7a1313] {
|
|
8
8
|
position: relative;
|
|
9
9
|
height: 100%;
|
|
10
10
|
min-height: 0;
|
|
11
11
|
}
|
|
12
|
-
.rs-tree--fill-capture[data-v-
|
|
12
|
+
.rs-tree--fill-capture[data-v-2c7a1313]::before {
|
|
13
13
|
content: '';
|
|
14
14
|
position: absolute;
|
|
15
15
|
inset: 0;
|
|
16
16
|
z-index: 0;
|
|
17
17
|
}
|
|
18
|
-
.rs-tree--fill-capture > .rs-tree__empty[data-v-
|
|
19
|
-
.rs-tree--fill-capture > .rs-tree__viewport[data-v-
|
|
18
|
+
.rs-tree--fill-capture > .rs-tree__empty[data-v-2c7a1313],
|
|
19
|
+
.rs-tree--fill-capture > .rs-tree__viewport[data-v-2c7a1313] {
|
|
20
20
|
position: relative;
|
|
21
21
|
z-index: 1;
|
|
22
22
|
height: 100%;
|
|
23
23
|
min-height: 0;
|
|
24
24
|
box-sizing: border-box;
|
|
25
25
|
}
|
|
26
|
-
.rs-tree[data-v-
|
|
26
|
+
.rs-tree[data-v-2c7a1313]:focus-visible {
|
|
27
27
|
box-shadow: 0 0 0 var(--rs-focus-ring-width, 2px) var(--rs-focus-ring);
|
|
28
28
|
border-radius: var(--rs-radius-sm);
|
|
29
29
|
}
|
|
30
|
-
.rs-tree__viewport--scroll[data-v-
|
|
30
|
+
.rs-tree__viewport--scroll[data-v-2c7a1313] {
|
|
31
31
|
overflow: auto;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/* 虚拟模式下组件自动撑满父容器,使内置 ResizeObserver 能测到真实可用高度 */
|
|
35
|
-
.rs-tree--virtual[data-v-
|
|
35
|
+
.rs-tree--virtual[data-v-2c7a1313] {
|
|
36
36
|
height: 100%;
|
|
37
37
|
}
|
|
38
|
-
.rs-tree--virtual .rs-tree__viewport--scroll[data-v-
|
|
39
|
-
.rs-tree__viewport--scroll[data-v-
|
|
38
|
+
.rs-tree--virtual .rs-tree__viewport--scroll[data-v-2c7a1313],
|
|
39
|
+
.rs-tree__viewport--scroll[data-v-2c7a1313] {
|
|
40
40
|
border-radius: var(--rs-radius-sm);
|
|
41
41
|
}
|
|
42
|
-
.rs-tree__empty[data-v-
|
|
42
|
+
.rs-tree__empty[data-v-2c7a1313] {
|
|
43
43
|
padding: var(--rs-space-xl) var(--rs-space-md);
|
|
44
44
|
}
|
|
45
|
-
.rs-tree__list[data-v-
|
|
46
|
-
.rs-tree__item[data-v-
|
|
45
|
+
.rs-tree__list[data-v-2c7a1313],
|
|
46
|
+
.rs-tree__item[data-v-2c7a1313] {
|
|
47
47
|
margin: 0;
|
|
48
48
|
padding: 0;
|
|
49
49
|
list-style: none;
|
|
50
50
|
}
|
|
51
|
-
.rs-tree__row[data-v-
|
|
51
|
+
.rs-tree__row[data-v-2c7a1313] {
|
|
52
52
|
position: relative;
|
|
53
53
|
display: flex;
|
|
54
54
|
align-items: center;
|
|
@@ -59,34 +59,34 @@
|
|
|
59
59
|
box-sizing: border-box;
|
|
60
60
|
transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
|
|
61
61
|
}
|
|
62
|
-
.rs-tree__row[data-v-
|
|
62
|
+
.rs-tree__row[data-v-2c7a1313]:hover:not(.rs-tree__row--disabled):not(.rs-tree__row--selected) {
|
|
63
63
|
background: var(--rs-tree-row-hover);
|
|
64
64
|
}
|
|
65
|
-
.rs-tree__row--selected[data-v-
|
|
65
|
+
.rs-tree__row--selected[data-v-2c7a1313] {
|
|
66
66
|
background: var(--rs-tree-selected-bg);
|
|
67
67
|
}
|
|
68
|
-
.rs-tree__row--selected .rs-tree__label[data-v-
|
|
69
|
-
.rs-tree__row--selected .rs-tree__label--block[data-v-
|
|
68
|
+
.rs-tree__row--selected .rs-tree__label[data-v-2c7a1313],
|
|
69
|
+
.rs-tree__row--selected .rs-tree__label--block[data-v-2c7a1313] {
|
|
70
70
|
color: var(--rs-tree-selected-fg);
|
|
71
71
|
font-weight: inherit;
|
|
72
72
|
}
|
|
73
|
-
.rs-tree__row--focused[data-v-
|
|
73
|
+
.rs-tree__row--focused[data-v-2c7a1313] {
|
|
74
74
|
background: var(--rs-tree-focused-bg);
|
|
75
75
|
box-shadow: inset 0 0 0 1px var(--rs-tree-focused-ring);
|
|
76
76
|
}
|
|
77
|
-
.rs-tree__row--selected.rs-tree__row--focused[data-v-
|
|
77
|
+
.rs-tree__row--selected.rs-tree__row--focused[data-v-2c7a1313] {
|
|
78
78
|
background: var(--rs-tree-selected-focused-bg);
|
|
79
79
|
box-shadow: inset 0 0 0 1px var(--rs-tree-selected-focused-ring);
|
|
80
80
|
}
|
|
81
|
-
.rs-tree--block .rs-tree__row[data-v-
|
|
81
|
+
.rs-tree--block .rs-tree__row[data-v-2c7a1313] {
|
|
82
82
|
cursor: pointer;
|
|
83
83
|
}
|
|
84
|
-
.rs-tree__row--disabled[data-v-
|
|
84
|
+
.rs-tree__row--disabled[data-v-2c7a1313] {
|
|
85
85
|
opacity: 0.38;
|
|
86
86
|
cursor: not-allowed;
|
|
87
87
|
}
|
|
88
|
-
.rs-tree__row--drop-before[data-v-
|
|
89
|
-
.rs-tree__row--drop-after[data-v-
|
|
88
|
+
.rs-tree__row--drop-before[data-v-2c7a1313]::before,
|
|
89
|
+
.rs-tree__row--drop-after[data-v-2c7a1313]::after {
|
|
90
90
|
content: '';
|
|
91
91
|
position: absolute;
|
|
92
92
|
inset-inline: 0;
|
|
@@ -94,50 +94,50 @@
|
|
|
94
94
|
background: var(--rs-tree-drop-indicator);
|
|
95
95
|
pointer-events: none;
|
|
96
96
|
}
|
|
97
|
-
.rs-tree__row--drop-before[data-v-
|
|
97
|
+
.rs-tree__row--drop-before[data-v-2c7a1313]::before {
|
|
98
98
|
top: 0;
|
|
99
99
|
}
|
|
100
|
-
.rs-tree__row--drop-after[data-v-
|
|
100
|
+
.rs-tree__row--drop-after[data-v-2c7a1313]::after {
|
|
101
101
|
bottom: 0;
|
|
102
102
|
}
|
|
103
|
-
.rs-tree__row--drop-inside[data-v-
|
|
103
|
+
.rs-tree__row--drop-inside[data-v-2c7a1313] {
|
|
104
104
|
background: var(--rs-tree-drop-inside-bg);
|
|
105
105
|
}
|
|
106
|
-
.rs-tree--disabled[data-v-
|
|
106
|
+
.rs-tree--disabled[data-v-2c7a1313] {
|
|
107
107
|
cursor: not-allowed;
|
|
108
108
|
}
|
|
109
|
-
.rs-tree--line .rs-tree__lines[data-v-
|
|
109
|
+
.rs-tree--line .rs-tree__lines[data-v-2c7a1313] {
|
|
110
110
|
position: absolute;
|
|
111
111
|
inset: 0;
|
|
112
112
|
pointer-events: none;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/* 导航线:半透明字色 token,避免宿主把 --rs-border-subtle 桥成实色灰后过深 */
|
|
116
|
-
.rs-tree--line .rs-tree__line-vert[data-v-
|
|
116
|
+
.rs-tree--line .rs-tree__line-vert[data-v-2c7a1313] {
|
|
117
117
|
position: absolute;
|
|
118
118
|
top: 0;
|
|
119
119
|
bottom: 0;
|
|
120
120
|
width: var(--rs-tree-line-width, 1px);
|
|
121
121
|
background: var(--rs-tree-line);
|
|
122
122
|
}
|
|
123
|
-
.rs-tree--line .rs-tree__line-vert--self.rs-tree__line-vert--end[data-v-
|
|
123
|
+
.rs-tree--line .rs-tree__line-vert--self.rs-tree__line-vert--end[data-v-2c7a1313] {
|
|
124
124
|
bottom: 50%;
|
|
125
125
|
}
|
|
126
|
-
.rs-tree--line .rs-tree__line-horz[data-v-
|
|
126
|
+
.rs-tree--line .rs-tree__line-horz[data-v-2c7a1313] {
|
|
127
127
|
position: absolute;
|
|
128
128
|
top: 50%;
|
|
129
129
|
height: var(--rs-tree-line-width, 1px);
|
|
130
130
|
background: var(--rs-tree-line);
|
|
131
131
|
}
|
|
132
|
-
.rs-tree__drag-handle[data-v-
|
|
132
|
+
.rs-tree__drag-handle[data-v-2c7a1313] {
|
|
133
133
|
display: inline-flex;
|
|
134
134
|
align-items: center;
|
|
135
135
|
color: var(--rs-muted);
|
|
136
136
|
cursor: move;
|
|
137
137
|
flex: 0 0 auto;
|
|
138
138
|
}
|
|
139
|
-
.rs-tree__toggle[data-v-
|
|
140
|
-
.rs-tree__spacer[data-v-
|
|
139
|
+
.rs-tree__toggle[data-v-2c7a1313],
|
|
140
|
+
.rs-tree__spacer[data-v-2c7a1313] {
|
|
141
141
|
display: inline-flex;
|
|
142
142
|
align-items: center;
|
|
143
143
|
justify-content: center;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
height: 1.25rem;
|
|
146
146
|
flex: 0 0 auto;
|
|
147
147
|
}
|
|
148
|
-
.rs-tree__toggle[data-v-
|
|
148
|
+
.rs-tree__toggle[data-v-2c7a1313] {
|
|
149
149
|
border: 0;
|
|
150
150
|
padding: 0;
|
|
151
151
|
border-radius: var(--rs-radius-xs);
|
|
@@ -155,16 +155,16 @@
|
|
|
155
155
|
outline: none;
|
|
156
156
|
transition: color var(--rs-transition-fast);
|
|
157
157
|
}
|
|
158
|
-
.rs-tree__toggle[data-v-
|
|
158
|
+
.rs-tree__toggle[data-v-2c7a1313]:hover:not(:disabled) {
|
|
159
159
|
color: var(--rs-text);
|
|
160
160
|
}
|
|
161
|
-
.rs-tree__toggle[data-v-
|
|
161
|
+
.rs-tree__toggle[data-v-2c7a1313]:focus-visible {
|
|
162
162
|
box-shadow: 0 0 0 var(--rs-focus-ring-width, 2px) var(--rs-focus-ring);
|
|
163
163
|
}
|
|
164
|
-
.rs-tree__toggle[data-v-
|
|
164
|
+
.rs-tree__toggle[data-v-2c7a1313]:disabled {
|
|
165
165
|
cursor: default;
|
|
166
166
|
}
|
|
167
|
-
.rs-tree__toggle-caret[data-v-
|
|
167
|
+
.rs-tree__toggle-caret[data-v-2c7a1313] {
|
|
168
168
|
display: block;
|
|
169
169
|
font-size: var(--rs-font-size-lg);
|
|
170
170
|
font-weight: var(--rs-font-weight-medium);
|
|
@@ -172,32 +172,32 @@
|
|
|
172
172
|
transform: translateY(-0.5px);
|
|
173
173
|
transition: transform var(--rs-transition-fast);
|
|
174
174
|
}
|
|
175
|
-
[dir='rtl'] .rs-tree__toggle-caret[data-v-
|
|
175
|
+
[dir='rtl'] .rs-tree__toggle-caret[data-v-2c7a1313] {
|
|
176
176
|
transform: translateY(-0.5px) scaleX(-1);
|
|
177
177
|
}
|
|
178
|
-
.rs-tree__toggle--expanded .rs-tree__toggle-caret[data-v-
|
|
178
|
+
.rs-tree__toggle--expanded .rs-tree__toggle-caret[data-v-2c7a1313] {
|
|
179
179
|
transform: translateY(-0.5px) rotate(90deg);
|
|
180
180
|
}
|
|
181
|
-
[dir='rtl'] .rs-tree__toggle--expanded .rs-tree__toggle-caret[data-v-
|
|
181
|
+
[dir='rtl'] .rs-tree__toggle--expanded .rs-tree__toggle-caret[data-v-2c7a1313] {
|
|
182
182
|
transform: translateY(-0.5px) scaleX(-1) rotate(-90deg);
|
|
183
183
|
}
|
|
184
|
-
.rs-tree__loading-icon[data-v-
|
|
184
|
+
.rs-tree__loading-icon[data-v-2c7a1313] {
|
|
185
185
|
color: var(--rs-primary);
|
|
186
186
|
}
|
|
187
|
-
.rs-tree__checkbox[data-v-
|
|
187
|
+
.rs-tree__checkbox[data-v-2c7a1313] {
|
|
188
188
|
position: relative;
|
|
189
189
|
display: inline-flex;
|
|
190
190
|
align-items: center;
|
|
191
191
|
flex: 0 0 auto;
|
|
192
192
|
cursor: pointer;
|
|
193
193
|
}
|
|
194
|
-
.rs-tree__checkbox-spacer[data-v-
|
|
194
|
+
.rs-tree__checkbox-spacer[data-v-2c7a1313] {
|
|
195
195
|
display: inline-block;
|
|
196
196
|
width: 1rem;
|
|
197
197
|
height: 1rem;
|
|
198
198
|
flex: 0 0 auto;
|
|
199
199
|
}
|
|
200
|
-
.rs-tree__checkbox-input[data-v-
|
|
200
|
+
.rs-tree__checkbox-input[data-v-2c7a1313] {
|
|
201
201
|
position: absolute;
|
|
202
202
|
width: 1px;
|
|
203
203
|
height: 1px;
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
white-space: nowrap;
|
|
209
209
|
border: 0;
|
|
210
210
|
}
|
|
211
|
-
.rs-tree__checkbox-box[data-v-
|
|
211
|
+
.rs-tree__checkbox-box[data-v-2c7a1313] {
|
|
212
212
|
display: inline-flex;
|
|
213
213
|
align-items: center;
|
|
214
214
|
justify-content: center;
|
|
@@ -219,12 +219,12 @@
|
|
|
219
219
|
background: var(--rs-surface);
|
|
220
220
|
transition: background 0.15s ease, border-color 0.15s ease;
|
|
221
221
|
}
|
|
222
|
-
.rs-tree__checkbox--checked .rs-tree__checkbox-box[data-v-
|
|
223
|
-
.rs-tree__checkbox--indeterminate .rs-tree__checkbox-box[data-v-
|
|
222
|
+
.rs-tree__checkbox--checked .rs-tree__checkbox-box[data-v-2c7a1313],
|
|
223
|
+
.rs-tree__checkbox--indeterminate .rs-tree__checkbox-box[data-v-2c7a1313] {
|
|
224
224
|
border-color: var(--rs-primary);
|
|
225
225
|
background: var(--rs-primary);
|
|
226
226
|
}
|
|
227
|
-
.rs-tree__checkbox--checked .rs-tree__checkbox-box[data-v-
|
|
227
|
+
.rs-tree__checkbox--checked .rs-tree__checkbox-box[data-v-2c7a1313]::after {
|
|
228
228
|
content: '';
|
|
229
229
|
width: 0.3rem;
|
|
230
230
|
height: 0.55rem;
|
|
@@ -232,18 +232,18 @@
|
|
|
232
232
|
border-width: 0 2px 2px 0;
|
|
233
233
|
transform: rotate(45deg) translate(-1px, -1px);
|
|
234
234
|
}
|
|
235
|
-
.rs-tree__checkbox--indeterminate .rs-tree__checkbox-box[data-v-
|
|
235
|
+
.rs-tree__checkbox--indeterminate .rs-tree__checkbox-box[data-v-2c7a1313]::after {
|
|
236
236
|
content: '';
|
|
237
237
|
width: 0.5rem;
|
|
238
238
|
height: 2px;
|
|
239
239
|
background: var(--rs-tree-check-fg, var(--rs-primary-foreground));
|
|
240
240
|
border-radius: 1px;
|
|
241
241
|
}
|
|
242
|
-
.rs-tree__node-icon[data-v-
|
|
242
|
+
.rs-tree__node-icon[data-v-2c7a1313] {
|
|
243
243
|
flex: 0 0 auto;
|
|
244
244
|
color: var(--rs-muted);
|
|
245
245
|
}
|
|
246
|
-
.rs-tree__label[data-v-
|
|
246
|
+
.rs-tree__label[data-v-2c7a1313] {
|
|
247
247
|
flex: 1 1 auto;
|
|
248
248
|
min-width: 0;
|
|
249
249
|
border: 0;
|
|
@@ -254,20 +254,20 @@
|
|
|
254
254
|
text-align: start;
|
|
255
255
|
cursor: pointer;
|
|
256
256
|
}
|
|
257
|
-
.rs-tree__label-text[data-v-
|
|
257
|
+
.rs-tree__label-text[data-v-2c7a1313] {
|
|
258
258
|
display: block;
|
|
259
259
|
overflow: hidden;
|
|
260
260
|
text-overflow: ellipsis;
|
|
261
261
|
white-space: nowrap;
|
|
262
262
|
}
|
|
263
|
-
.rs-tree__label--block[data-v-
|
|
263
|
+
.rs-tree__label--block[data-v-2c7a1313] {
|
|
264
264
|
cursor: inherit;
|
|
265
265
|
}
|
|
266
|
-
.rs-tree__label[data-v-
|
|
267
|
-
.rs-tree__label--disabled[data-v-
|
|
266
|
+
.rs-tree__label[data-v-2c7a1313]:disabled,
|
|
267
|
+
.rs-tree__label--disabled[data-v-2c7a1313] {
|
|
268
268
|
cursor: not-allowed;
|
|
269
269
|
}
|
|
270
|
-
.rs-tree__highlight[data-v-
|
|
270
|
+
.rs-tree__highlight[data-v-2c7a1313] {
|
|
271
271
|
padding: 0 0.125rem;
|
|
272
272
|
border: 0;
|
|
273
273
|
border-radius: 2px;
|
|
@@ -275,42 +275,42 @@
|
|
|
275
275
|
color: inherit;
|
|
276
276
|
font-weight: var(--rs-font-weight-semibold);
|
|
277
277
|
}
|
|
278
|
-
.rs-tree__pad[data-v-
|
|
278
|
+
.rs-tree__pad[data-v-2c7a1313] {
|
|
279
279
|
flex: 0 0 auto;
|
|
280
280
|
pointer-events: none;
|
|
281
281
|
}
|
|
282
|
-
.rs-tree--ssm .rs-tree__label[data-v-
|
|
283
|
-
.rs-tree--ssm .rs-tree__toggle[data-v-
|
|
282
|
+
.rs-tree--ssm .rs-tree__label[data-v-2c7a1313],
|
|
283
|
+
.rs-tree--ssm .rs-tree__toggle[data-v-2c7a1313] {
|
|
284
284
|
font-size: var(--rs-font-size-xs);
|
|
285
285
|
}
|
|
286
|
-
.rs-tree--ssm .rs-tree__toggle[data-v-
|
|
287
|
-
.rs-tree--ssm .rs-tree__spacer[data-v-
|
|
286
|
+
.rs-tree--ssm .rs-tree__toggle[data-v-2c7a1313],
|
|
287
|
+
.rs-tree--ssm .rs-tree__spacer[data-v-2c7a1313] {
|
|
288
288
|
width: 0.875rem;
|
|
289
289
|
height: 0.875rem;
|
|
290
290
|
}
|
|
291
|
-
.rs-tree--ssm .rs-tree__toggle-caret[data-v-
|
|
291
|
+
.rs-tree--ssm .rs-tree__toggle-caret[data-v-2c7a1313] {
|
|
292
292
|
font-size: var(--rs-font-size-sm);
|
|
293
293
|
}
|
|
294
|
-
.rs-tree--sm .rs-tree__label[data-v-
|
|
295
|
-
.rs-tree--sm .rs-tree__toggle[data-v-
|
|
294
|
+
.rs-tree--sm .rs-tree__label[data-v-2c7a1313],
|
|
295
|
+
.rs-tree--sm .rs-tree__toggle[data-v-2c7a1313] {
|
|
296
296
|
font-size: var(--rs-font-size-xs);
|
|
297
297
|
}
|
|
298
|
-
.rs-tree--sm .rs-tree__toggle[data-v-
|
|
299
|
-
.rs-tree--sm .rs-tree__spacer[data-v-
|
|
298
|
+
.rs-tree--sm .rs-tree__toggle[data-v-2c7a1313],
|
|
299
|
+
.rs-tree--sm .rs-tree__spacer[data-v-2c7a1313] {
|
|
300
300
|
width: 1rem;
|
|
301
301
|
height: 1rem;
|
|
302
302
|
}
|
|
303
|
-
.rs-tree--sm .rs-tree__toggle-caret[data-v-
|
|
303
|
+
.rs-tree--sm .rs-tree__toggle-caret[data-v-2c7a1313] {
|
|
304
304
|
font-size: var(--rs-font-size-base);
|
|
305
305
|
}
|
|
306
|
-
.rs-tree--lg .rs-tree__label[data-v-
|
|
306
|
+
.rs-tree--lg .rs-tree__label[data-v-2c7a1313] {
|
|
307
307
|
font-size: var(--rs-font-size-sm);
|
|
308
308
|
}
|
|
309
|
-
.rs-tree--lg .rs-tree__toggle[data-v-
|
|
310
|
-
.rs-tree--lg .rs-tree__spacer[data-v-
|
|
309
|
+
.rs-tree--lg .rs-tree__toggle[data-v-2c7a1313],
|
|
310
|
+
.rs-tree--lg .rs-tree__spacer[data-v-2c7a1313] {
|
|
311
311
|
width: 1.5rem;
|
|
312
312
|
height: 1.5rem;
|
|
313
313
|
}
|
|
314
|
-
.rs-tree--lg .rs-tree__toggle-caret[data-v-
|
|
314
|
+
.rs-tree--lg .rs-tree__toggle-caret[data-v-2c7a1313] {
|
|
315
315
|
font-size: var(--rs-font-size-xl);
|
|
316
316
|
}
|
|
@@ -3,6 +3,6 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
|
|
|
3
3
|
import RsTree_vue_vue_type_script_setup_true_lang_default from "./RsTree.impl.js";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tree/src/RsTree.vue
|
|
6
|
-
var RsTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsTree_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
6
|
+
var RsTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsTree_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-2c7a1313"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { RsTree_default as default };
|
|
@@ -72,9 +72,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, RsTre
|
|
|
72
72
|
change: (value: RsTreeSelectModelValue) => any;
|
|
73
73
|
search: (query: string) => any;
|
|
74
74
|
select: (key: string, node?: RsTreeNode | undefined) => any;
|
|
75
|
+
clear: () => any;
|
|
75
76
|
blur: (event: FocusEvent) => any;
|
|
76
77
|
focus: (event: FocusEvent) => any;
|
|
77
|
-
clear: () => any;
|
|
78
78
|
"update:modelValue": (value: RsTreeSelectModelValue) => any;
|
|
79
79
|
"update:open": (value: boolean) => any;
|
|
80
80
|
dropdownVisibleChange: (open: boolean) => any;
|
|
@@ -82,9 +82,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, RsTre
|
|
|
82
82
|
onChange?: ((value: RsTreeSelectModelValue) => any) | undefined;
|
|
83
83
|
onSearch?: ((query: string) => any) | undefined;
|
|
84
84
|
onSelect?: ((key: string, node?: RsTreeNode | undefined) => any) | undefined;
|
|
85
|
+
onClear?: (() => any) | undefined;
|
|
85
86
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
86
87
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
87
|
-
onClear?: (() => any) | undefined;
|
|
88
88
|
"onUpdate:modelValue"?: ((value: RsTreeSelectModelValue) => any) | undefined;
|
|
89
89
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
90
90
|
onDropdownVisibleChange?: ((open: boolean) => any) | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 登记业务自己的图标,供 `RsIcon` 以及页签 / 菜单 / 树 / 右键的 `icon` 字符串使用。
|
|
4
|
+
* 同名再次调用会换成新组件。内置品牌 mark 不能覆盖。
|
|
5
|
+
* Lucide 已有的名字仍渲染内置图形,开发环境会警告一次。
|
|
6
|
+
* 组件会收到 `size`、`strokeWidth`、`color`(默认 `currentColor`)。
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerRsIcon(name: string, component: Component): void;
|
|
9
|
+
export declare function resolveHostIcon(name: string): Component | undefined;
|
|
10
|
+
/** 测试里撤掉登记,避免盖住后续用例。不从包入口导出。 */
|
|
11
|
+
export declare function unregisterRsIcon(name: string): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isRsBrandIconName } from "./brand.js";
|
|
2
|
+
//#region src/icons/host.ts
|
|
3
|
+
/**
|
|
4
|
+
* 业务登记的图标。本文件不引入 Lucide。
|
|
5
|
+
* `import { registerRsIcon } from '@niuma/ui'` 只应落到这里。
|
|
6
|
+
*/
|
|
7
|
+
var hostIcons = /* @__PURE__ */ new Map();
|
|
8
|
+
/** kebab-case,与 Lucide / 品牌 mark 同一套名字。 */
|
|
9
|
+
var ICON_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
10
|
+
function isVueComponent(value) {
|
|
11
|
+
return typeof value === "function" || typeof value === "object" && value !== null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 登记业务自己的图标,供 `RsIcon` 以及页签 / 菜单 / 树 / 右键的 `icon` 字符串使用。
|
|
15
|
+
* 同名再次调用会换成新组件。内置品牌 mark 不能覆盖。
|
|
16
|
+
* Lucide 已有的名字仍渲染内置图形,开发环境会警告一次。
|
|
17
|
+
* 组件会收到 `size`、`strokeWidth`、`color`(默认 `currentColor`)。
|
|
18
|
+
*/
|
|
19
|
+
function registerRsIcon(name, component) {
|
|
20
|
+
const id = name.trim();
|
|
21
|
+
if (!ICON_NAME.test(id)) throw new Error(`registerRsIcon: "${name}" must be kebab-case (for example "my-product")`);
|
|
22
|
+
if (isRsBrandIconName(id)) throw new Error(`registerRsIcon: "${id}" is a built-in brand mark and cannot be replaced`);
|
|
23
|
+
if (!isVueComponent(component)) throw new Error("registerRsIcon: component must be a Vue component");
|
|
24
|
+
hostIcons.set(id, component);
|
|
25
|
+
}
|
|
26
|
+
function resolveHostIcon(name) {
|
|
27
|
+
return hostIcons.get(name);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { registerRsIcon, resolveHostIcon };
|
package/dist/icons/lucide.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveHostIcon } from "./host.js";
|
|
1
2
|
import { ApiIcon } from "./custom/api.js";
|
|
2
3
|
import { FtpIcon } from "./custom/ftp.js";
|
|
3
4
|
import { MongodbIcon } from "./custom/mongodb.js";
|
|
@@ -56,17 +57,23 @@ function resolveIconName(name) {
|
|
|
56
57
|
return iconAliases.get(name) ?? name;
|
|
57
58
|
}
|
|
58
59
|
var iconCache = /* @__PURE__ */ new Map();
|
|
60
|
+
function hasBuiltinIcon(resolvedName) {
|
|
61
|
+
return customIconMap.has(resolvedName) || getLucideComponent(resolvedName) !== void 0;
|
|
62
|
+
}
|
|
59
63
|
function isRsIconName(name) {
|
|
60
64
|
const resolvedName = resolveIconName(name);
|
|
61
|
-
return
|
|
65
|
+
return hasBuiltinIcon(resolvedName) || resolveHostIcon(name) !== void 0 || resolveHostIcon(resolvedName) !== void 0;
|
|
62
66
|
}
|
|
63
67
|
function resolveLucideIcon(name) {
|
|
64
68
|
const resolvedName = resolveIconName(name);
|
|
65
69
|
const cached = iconCache.get(resolvedName);
|
|
66
70
|
if (cached) return cached;
|
|
67
71
|
const icon = customIconMap.get(resolvedName) ?? getLucideComponent(resolvedName);
|
|
68
|
-
if (icon)
|
|
69
|
-
|
|
72
|
+
if (icon) {
|
|
73
|
+
iconCache.set(resolvedName, icon);
|
|
74
|
+
return icon;
|
|
75
|
+
}
|
|
76
|
+
return resolveHostIcon(name) ?? resolveHostIcon(resolvedName);
|
|
70
77
|
}
|
|
71
78
|
/** 可解析的图标数量(自定义 + Lucide 命名导出) */
|
|
72
79
|
var lucideIconCount = customIconMap.size + Object.keys(lucideExports).filter((key) => !SKIP_LUCIDE_EXPORTS.has(key) && isVueComponent(lucideExports[key])).length;
|
package/dist/icons/registry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LUCIDE_ATTRIBUTION, LUCIDE_LICENSE, isRsIconName, lucideIconCount, resolveLucideIcon } from "./lucide.js";
|
|
2
1
|
import { isRsBrandIconName, rsBrandIconAccentVar, rsBrandIconNames } from "./brand.js";
|
|
2
|
+
import { LUCIDE_ATTRIBUTION, LUCIDE_LICENSE, isRsIconName, lucideIconCount, resolveLucideIcon } from "./lucide.js";
|
|
3
3
|
//#region src/icons/registry.ts
|
|
4
4
|
/** Playground / 文档常用图标(Lucide 全库约 1600+;kebab-case,如 `house`、`trash-2`) */
|
|
5
5
|
var rsCommonIconNames = [
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { RsDivider } from './components/divider';
|
|
|
27
27
|
export type { RsDividerOrientation } from './components/divider';
|
|
28
28
|
export { RsDescriptions } from './components/descriptions';
|
|
29
29
|
export { RsDescriptionsItem } from './components/descriptions';
|
|
30
|
-
export type {
|
|
30
|
+
export type { RsDescriptionsItemData, RsDescriptionsLabelAlign, RsDescriptionsLabelPlacement, RsDescriptionsSize, } from './components/descriptions';
|
|
31
31
|
export { RsLoadingBar } from './components/loading-bar';
|
|
32
32
|
export type { RsLoadingBarAttach, RsLoadingBarExpose, RsLoadingBarInstance, RsLoadingBarPosition, RsLoadingBarTone, } from './components/loading-bar';
|
|
33
33
|
export { useRsLoadingBar } from './composables/useRsLoadingBar';
|
|
@@ -237,8 +237,10 @@ export type { RsTranslateFn } from './composables/useRsI18n';
|
|
|
237
237
|
export { useRsToast } from './composables/useRsToast';
|
|
238
238
|
export type { RsToastAction, RsToastInput, RsToastKind, RsToastOptions, RsToastPromiseMessages, } from './composables/useRsToast';
|
|
239
239
|
export { rsCommonIconNames, rsBrandIconNames, rsBrandIconAccentVar, LUCIDE_ATTRIBUTION, LUCIDE_LICENSE, lucideIconCount, isRsIconName, isRsBrandIconName, } from './icons/registry';
|
|
240
|
+
export { registerRsIcon } from './icons/host';
|
|
240
241
|
export type { RsBrandIconName } from './icons/registry';
|
|
241
242
|
export type { RsThemeMode, RsResolvedTheme, RsThemeTokens, RsComponentSize, RsRadius, RsFontSize, RsFontWeight, } from './theme/types';
|
|
243
|
+
export type { RsColorTheme, RsColorThemeToken } from './theme/color-theme';
|
|
242
244
|
export { RS_COMPONENT_SIZES, RS_COMPONENT_SIZE_ICON_PX, RS_RADII, RS_RADIUS_CSS, RS_FONT_SIZES, RS_FONT_SIZE_CSS, RS_FONT_WEIGHTS, RS_FONT_WEIGHT_CSS, } from './theme/types';
|
|
243
245
|
export type { RsBuiltinLocale, RsDirMode, RsLocale, RsLocaleMessages, RsTextDirection, } from './locale/types';
|
|
244
246
|
export { defaultLocale, fallbackLocale } from './locale/types';
|
|
@@ -249,4 +251,5 @@ export { useResolvedRsComponentSize, resolveRsComponentSize } from './components
|
|
|
249
251
|
export { useResolvedRsRadius, rsRadiusCss } from './components/_shared';
|
|
250
252
|
export { themePresets } from './theme/presets';
|
|
251
253
|
export { applyTheme, prefersColorSchemeDark, readResolvedTheme, resolveThemeMode, subscribePreferredColorScheme, } from './theme/apply';
|
|
254
|
+
export { RS_COLOR_THEME_VARS, applyColorTheme, clearColorTheme, colorThemeAttribute, isSafeColorThemeId, isSafeColorThemeValue, } from './theme/color-theme';
|
|
252
255
|
export { parseCssLengthToPx, readCodeFontFamily, readCodeFontSizePx, readCssLengthPx, readCssVar, readRootFontSizePx, readTerminalFontFamily, readTerminalFontSizePx, readTerminalFontWeight, readTerminalFontWeightBold, } from './theme/css-token';
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { MONACO_MYSQL_LANGUAGE } from './monaco/languages/types.js'
|
|
|
11
11
|
export { MONACO_PGSQL_LANGUAGE } from './monaco/languages/types.js'
|
|
12
12
|
export { MONACO_POSTGRESQL_LANGUAGE } from './monaco/languages/types.js'
|
|
13
13
|
export { MONACO_SQLITE_LANGUAGE } from './monaco/languages/types.js'
|
|
14
|
+
export { RS_COLOR_THEME_VARS } from './theme/color-theme.js'
|
|
14
15
|
export { RS_COMPONENT_SIZES } from './theme/types.js'
|
|
15
16
|
export { RS_COMPONENT_SIZE_ICON_PX } from './theme/types.js'
|
|
16
17
|
export { RS_DATETIME_FORMAT } from './utils/rs-dayjs.js'
|
|
@@ -130,6 +131,7 @@ export { TIME_HOUR12_OPTIONS } from './components/time-picker/src/time-picker-ut
|
|
|
130
131
|
export { TIME_HOUR_OPTIONS } from './components/time-picker/src/time-picker-utils.js'
|
|
131
132
|
export { TIME_SECOND_OPTIONS } from './components/time-picker/src/time-picker-utils.js'
|
|
132
133
|
export { aggregateColumnSummary } from './components/table/src/utils/table-summary-utils.js'
|
|
134
|
+
export { applyColorTheme } from './theme/color-theme.js'
|
|
133
135
|
export { applyLocale } from './locale/apply.js'
|
|
134
136
|
export { applyMonacoDebugDecorations } from './monaco/debug-decorations2.js'
|
|
135
137
|
export { applySplitResize } from './components/split-pane/src/split-pane-utils.js'
|
|
@@ -155,6 +157,7 @@ export { clampLogCount } from './components/log/src/log-utils.js'
|
|
|
155
157
|
export { clampNumber } from './components/input-number/src/input-number-utils.js'
|
|
156
158
|
export { clampPage } from './components/pagination/src/pagination-utils.js'
|
|
157
159
|
export { clampRsDrawerSize } from './components/drawer/src/drawer-utils.js'
|
|
160
|
+
export { clearColorTheme } from './theme/color-theme.js'
|
|
158
161
|
export { cloneFormFieldValue } from './components/form/src/form-utils.js'
|
|
159
162
|
export { codeEditorLanguageLabel } from './components/code-editor/src/code-editor-utils.js'
|
|
160
163
|
export { collapseSplitPane } from './components/split-pane/src/split-pane-utils.js'
|
|
@@ -164,6 +167,7 @@ export { collectHalfCheckedKeys } from './components/tree/src/tree-utils.js'
|
|
|
164
167
|
export { collectTableTreeDescendantKeys } from './components/table/src/utils/table-utils.js'
|
|
165
168
|
export { collectTableTreeExpandableKeys } from './components/table/src/utils/table-utils.js'
|
|
166
169
|
export { collectTableTreeHalfCheckedKeys } from './components/table/src/utils/table-utils.js'
|
|
170
|
+
export { colorThemeAttribute } from './theme/color-theme.js'
|
|
167
171
|
export { compareTableValues } from './components/table/src/utils/table-utils.js'
|
|
168
172
|
export { concatNamePath } from './components/form/src/form-path.js'
|
|
169
173
|
export { containsEscapeSequence } from './components/terminal/src/terminal-utils.js'
|
|
@@ -270,6 +274,8 @@ export { isRsLocaleRegistered } from './locale/registry.js'
|
|
|
270
274
|
export { isRsLogLevel } from './components/log/src/log-utils.js'
|
|
271
275
|
export { isRsSplitPaneAutoSize } from './components/split-pane/src/split-pane-utils.js'
|
|
272
276
|
export { isRsTableApi } from './components/table/src/rs-table-api.js'
|
|
277
|
+
export { isSafeColorThemeId } from './theme/color-theme.js'
|
|
278
|
+
export { isSafeColorThemeValue } from './theme/color-theme.js'
|
|
273
279
|
export { isSafeHref } from './components/markdown/src/markdown-utils.js'
|
|
274
280
|
export { isSafeImageSrc } from './components/markdown/src/markdown-utils.js'
|
|
275
281
|
export { isSelectLabeledValue } from './components/select/src/select-utils.js'
|
|
@@ -340,6 +346,7 @@ export { readTerminalFontSizePx } from './theme/css-token.js'
|
|
|
340
346
|
export { readTerminalFontWeight } from './theme/css-token.js'
|
|
341
347
|
export { readTerminalFontWeightBold } from './theme/css-token.js'
|
|
342
348
|
export { readTerminalThemeFromCss } from './components/terminal/src/terminal-utils.js'
|
|
349
|
+
export { registerRsIcon } from './icons/host.js'
|
|
343
350
|
export { registerRsLocale } from './locale/registry.js'
|
|
344
351
|
export { removeUploadFileAt } from './components/upload/src/upload-utils.js'
|
|
345
352
|
export { renderMarkdown } from './components/markdown/src/markdown-utils.js'
|