x-next 1.16.1 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI_USAGE/catalog.md +3 -2
- package/AI_USAGE/components/alert-api.md +1 -1
- package/AI_USAGE/components/alert.md +33 -1
- package/AI_USAGE/components/bar-chart-api.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/boxicons.md +1 -1
- package/AI_USAGE/components/button-api.md +13 -16
- package/AI_USAGE/components/button.md +242 -31
- package/AI_USAGE/components/charts.md +1 -1
- package/AI_USAGE/components/checkbox-api.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker-api.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider-api.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker-api.md +1 -1
- package/AI_USAGE/components/date-picker.md +1 -1
- package/AI_USAGE/components/dialog-api.md +1 -1
- package/AI_USAGE/components/dialog.md +1 -1
- package/AI_USAGE/components/draggable-api.md +1 -1
- package/AI_USAGE/components/draggable.md +1 -1
- package/AI_USAGE/components/drawer-api.md +3 -3
- package/AI_USAGE/components/drawer.md +1 -1
- package/AI_USAGE/components/dropdown-api.md +3 -3
- package/AI_USAGE/components/dropdown.md +1 -1
- package/AI_USAGE/components/empty-api.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/finicon.md +1 -1
- package/AI_USAGE/components/form-api.md +1 -1
- package/AI_USAGE/components/form.md +1 -1
- package/AI_USAGE/components/grid-api.md +1 -1
- package/AI_USAGE/components/grid.md +1 -1
- package/AI_USAGE/components/heatmap-api.md +1 -1
- package/AI_USAGE/components/heatmap.md +1 -1
- package/AI_USAGE/components/icon-api.md +1 -1
- package/AI_USAGE/components/icon.md +1 -1
- package/AI_USAGE/components/image-api.md +1 -1
- package/AI_USAGE/components/image.md +1 -1
- package/AI_USAGE/components/input-api.md +2 -2
- package/AI_USAGE/components/input-number-api.md +1 -1
- package/AI_USAGE/components/input-number.md +1 -1
- package/AI_USAGE/components/input-tag-api.md +1 -1
- package/AI_USAGE/components/input-tag.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/layout-api.md +1 -1
- package/AI_USAGE/components/layout.md +1 -1
- package/AI_USAGE/components/line-chart-api.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/link-api.md +1 -1
- package/AI_USAGE/components/link.md +1 -1
- package/AI_USAGE/components/menu-api.md +1 -1
- package/AI_USAGE/components/menu.md +1 -1
- package/AI_USAGE/components/message-api.md +1 -1
- package/AI_USAGE/components/message-box-api.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/network-api.md +1 -1
- package/AI_USAGE/components/network.md +1 -1
- package/AI_USAGE/components/notification-api.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination-api.md +1 -1
- package/AI_USAGE/components/pagination.md +1 -1
- package/AI_USAGE/components/pie-chart-api.md +1 -1
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm-api.md +3 -3
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover-api.md +1 -1
- package/AI_USAGE/components/popover.md +1 -1
- package/AI_USAGE/components/popup-api.md +1 -1
- package/AI_USAGE/components/popup.md +1 -1
- package/AI_USAGE/components/progress-api.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio-api.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate-api.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/resize-box-api.md +1 -1
- package/AI_USAGE/components/resize-box.md +1 -1
- package/AI_USAGE/components/scrollbar-api.md +1 -1
- package/AI_USAGE/components/scrollbar.md +1 -1
- package/AI_USAGE/components/select-api.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/skeleton-api.md +1 -1
- package/AI_USAGE/components/skeleton.md +1 -1
- package/AI_USAGE/components/slider-api.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/space-api.md +1 -1
- package/AI_USAGE/components/space.md +1 -1
- package/AI_USAGE/components/spin-api.md +1 -1
- package/AI_USAGE/components/spin.md +1 -1
- package/AI_USAGE/components/steps-api.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch-api.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/table-api.md +1 -1
- package/AI_USAGE/components/table.md +1 -1
- package/AI_USAGE/components/tabs-api.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/tag-api.md +1 -1
- package/AI_USAGE/components/tag.md +1 -1
- package/AI_USAGE/components/textarea-api.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker-api.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/time-range-selector-api.md +1 -1
- package/AI_USAGE/components/time-range-selector.md +1 -1
- package/AI_USAGE/components/timeline-api.md +3 -3
- package/AI_USAGE/components/timeline.md +1 -1
- package/AI_USAGE/components/tooltip-api.md +1 -1
- package/AI_USAGE/components/tooltip.md +1 -1
- package/AI_USAGE/components/transfer-api.md +165 -0
- package/AI_USAGE/components/transfer.md +515 -0
- package/AI_USAGE/components/tree-select-api.md +1 -1
- package/AI_USAGE/components/tree-select.md +1 -1
- package/AI_USAGE/components/trend-chart-api.md +1 -1
- package/AI_USAGE/components/trend-chart.md +1 -1
- package/AI_USAGE/components/trigger-api.md +1 -1
- package/AI_USAGE/components/trigger.md +1 -1
- package/AI_USAGE/components/upload-api.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/components/watermark-api.md +1 -1
- package/AI_USAGE/components/watermark.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +3 -2
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +957 -57
- package/CHANGELOG.md +40 -0
- package/dist/_styles/palette-aliases.d.ts +1 -0
- package/dist/components/button/Button.d.ts +0 -9
- package/dist/components/button/appearance.d.ts +7 -0
- package/dist/components/button/index.d.ts +0 -16
- package/dist/components/button/props.d.ts +2 -6
- package/dist/components/color-picker/panel.d.ts +0 -9
- package/dist/components/date-picker/DatePicker.vue.d.ts +0 -15
- package/dist/components/date-picker/index.d.ts +0 -30
- package/dist/components/drawer/index.d.ts +0 -30
- package/dist/components/drawer/src/Drawer.vue.d.ts +0 -15
- package/dist/components/dropdown/DropdownButton.vue.d.ts +0 -15
- package/dist/components/dropdown/index.d.ts +0 -30
- package/dist/components/index.d.ts +1 -0
- package/dist/components/popconfirm/src/popup.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePanel.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePicker.vue.d.ts +0 -15
- package/dist/components/time-picker/index.d.ts +0 -30
- package/dist/components/transfer/Transfer.d.ts +211 -0
- package/dist/components/transfer/index.d.ts +299 -0
- package/dist/components/transfer/interface.d.ts +80 -0
- package/dist/components/transfer/transfer-panel.d.ts +82 -0
- package/dist/components/transfer/utils.d.ts +5 -0
- package/dist/es/_styles/palette-aliases.js +102 -17
- package/dist/es/_utils/palette.js +54 -54
- package/dist/es/components/button/Button.js +77 -49
- package/dist/es/components/button/appearance.js +7 -0
- package/dist/es/components/button/props.js +0 -4
- package/dist/es/components/index.js +47 -45
- package/dist/es/components/transfer/Transfer.js +267 -0
- package/dist/es/components/transfer/index.js +7 -0
- package/dist/es/components/transfer/transfer-panel.js +251 -0
- package/dist/es/components/transfer/utils.js +9 -0
- package/dist/es/directives/wave.js +14 -8
- package/dist/es/index.js +46 -44
- package/dist/es/locale/en-US.js +16 -0
- package/dist/es/locale/zh-CN.js +16 -0
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/locale/interface.d.ts +16 -0
- package/dist/style/alert.css +1 -1
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -1
- package/dist/style/dependencies.json +14 -0
- package/dist/style/link.css +1 -1
- package/dist/style/transfer.css +1 -0
- package/dist/style/transfer.js +12 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +3 -1
- package/volar.d.ts +1 -0
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
const r = {
|
|
2
|
+
primary: "rgb(28 97 255 / 100%)",
|
|
3
|
+
success: "rgb(0 168 9 / 100%)",
|
|
4
|
+
danger: "rgb(224 34 37 / 100%)",
|
|
5
|
+
strong: "rgb(255 130 0 / 100%)",
|
|
6
|
+
warning: "rgb(255 184 0 / 100%)"
|
|
7
|
+
}, o = {
|
|
2
8
|
primary: {
|
|
9
|
+
"--x-alert-color-focus-ring": "var(--x-color-primary-text)",
|
|
10
|
+
"--x-alert-info-color-bg": "var(--x-color-primary-light-1)",
|
|
11
|
+
"--x-alert-info-color-icon": "var(--x-color-primary-text)",
|
|
12
|
+
"--x-button-color-bg-primary-outline-active": "color-mix(in srgb, var(--x-button-color-text-primary) 5%, var(--x-color-transparent))",
|
|
13
|
+
"--x-button-color-bg-primary-outline-hover": "color-mix(in srgb, var(--x-button-color-text-primary) 3%, var(--x-color-transparent))",
|
|
3
14
|
"--x-button-color-bg-primary-solid": "var(--x-color-primary-solid)",
|
|
4
15
|
"--x-button-color-bg-primary-solid-active": "var(--x-color-primary-solid-active)",
|
|
5
16
|
"--x-button-color-bg-primary-solid-hover": "var(--x-color-primary-solid-hover)",
|
|
@@ -8,12 +19,16 @@ const r = {
|
|
|
8
19
|
"--x-button-color-bg-primary-subtle-hover": "var(--x-color-primary-subtle-hover)",
|
|
9
20
|
"--x-button-color-border-primary": "var(--x-color-primary-solid)",
|
|
10
21
|
"--x-button-color-text-primary": "var(--x-color-primary-button-text)",
|
|
22
|
+
"--x-button-color-text-primary-active": "color-mix(in srgb, var(--x-button-color-text-primary) 84%, var(--x-color-black))",
|
|
23
|
+
"--x-button-color-text-primary-hover": "color-mix(in srgb, var(--x-button-color-text-primary) 92%, var(--x-color-black))",
|
|
24
|
+
"--x-button-color-wave-primary": "var(--x-button-color-bg-primary-solid)",
|
|
11
25
|
"--x-chart-color-series-1": "var(--x-color-primary-solid)",
|
|
12
26
|
"--x-checkbox-mask-color-bg_checked": "var(--x-color-primary-6)",
|
|
13
27
|
"--x-checkbox-mask-color-bg_checked_disabled": "var(--x-color-primary-light-3)",
|
|
14
28
|
"--x-color-border-focus": "var(--x-color-primary-6)",
|
|
15
29
|
"--x-color-menu-dark-hover": "var(--x-color-primary)",
|
|
16
30
|
"--x-color-menu-dark-submenu-selected-bg": "color-mix(in srgb, var(--x-color-primary) 45%, transparent)",
|
|
31
|
+
"--x-color-picker-color-mode-bg_active": "var(--x-color-primary-subtle)",
|
|
17
32
|
"--x-color-picker-color-swatch_active": "var(--x-color-primary-text)",
|
|
18
33
|
"--x-color-picker-color-text_active": "var(--x-color-primary-text)",
|
|
19
34
|
"--x-color-primary-button-text": "var(--x-color-primary-text)",
|
|
@@ -54,7 +69,7 @@ const r = {
|
|
|
54
69
|
"--x-input-feedback-icon-color_validating": "var(--x-field-status-validating-icon)",
|
|
55
70
|
"--x-input-tag-color-border_default_focus": "var(--x-field-color-border-focus)",
|
|
56
71
|
"--x-input-tag-color-shadow_default_focus": "var(--x-field-color-shadow-focus)",
|
|
57
|
-
"--x-link-background-color": "var(--x-color-primary-
|
|
72
|
+
"--x-link-background-color": "var(--x-color-primary-subtle)",
|
|
58
73
|
"--x-link-color-focus": "var(--x-color-primary-text)",
|
|
59
74
|
"--x-link-color-text": "var(--x-color-primary-text)",
|
|
60
75
|
"--x-menu-color-label-item-selected": "var(--x-color-primary-6)",
|
|
@@ -110,6 +125,9 @@ const r = {
|
|
|
110
125
|
"--x-upload-color-border-hover": "var(--x-color-primary)"
|
|
111
126
|
},
|
|
112
127
|
success: {
|
|
128
|
+
"--x-alert-success-color-bg": "var(--x-color-success-light-1)",
|
|
129
|
+
"--x-button-color-bg-success-outline-active": "color-mix(in srgb, var(--x-button-color-text-success) 5%, var(--x-color-transparent))",
|
|
130
|
+
"--x-button-color-bg-success-outline-hover": "color-mix(in srgb, var(--x-button-color-text-success) 3%, var(--x-color-transparent))",
|
|
113
131
|
"--x-button-color-bg-success-solid": "var(--x-color-success-solid)",
|
|
114
132
|
"--x-button-color-bg-success-solid-active": "var(--x-color-success-solid-active)",
|
|
115
133
|
"--x-button-color-bg-success-solid-hover": "var(--x-color-success-solid-hover)",
|
|
@@ -118,6 +136,9 @@ const r = {
|
|
|
118
136
|
"--x-button-color-bg-success-subtle-hover": "var(--x-color-success-subtle-hover)",
|
|
119
137
|
"--x-button-color-border-success": "var(--x-color-success-solid)",
|
|
120
138
|
"--x-button-color-text-success": "var(--x-color-success-button-text)",
|
|
139
|
+
"--x-button-color-text-success-active": "color-mix(in srgb, var(--x-button-color-text-success) 84%, var(--x-color-black))",
|
|
140
|
+
"--x-button-color-text-success-hover": "color-mix(in srgb, var(--x-button-color-text-success) 92%, var(--x-color-black))",
|
|
141
|
+
"--x-button-color-wave-success": "var(--x-button-color-bg-success-solid)",
|
|
121
142
|
"--x-chart-color-series-2": "var(--x-color-success-solid)",
|
|
122
143
|
"--x-color-success-button-text": "var(--x-color-success-text)",
|
|
123
144
|
"--x-color-success-light-1": "var(--x-color-success-1)",
|
|
@@ -136,13 +157,16 @@ const r = {
|
|
|
136
157
|
"--x-field-status-success-text": "var(--x-color-success-text)",
|
|
137
158
|
"--x-input-feedback-icon-color_success": "var(--x-field-status-success-icon)",
|
|
138
159
|
"--x-link-color-text-success": "var(--x-color-success-text)",
|
|
139
|
-
"--x-link-success-background-color": "var(--x-color-success-
|
|
160
|
+
"--x-link-success-background-color": "var(--x-color-success-subtle)",
|
|
140
161
|
"--x-message-color-accent-success": "var(--x-color-success-solid)",
|
|
141
162
|
"--x-message-color-icon-bg-success": "var(--x-color-success-subtle)",
|
|
142
163
|
"--x-notification-color-accent-success": "var(--x-color-success-solid)",
|
|
143
164
|
"--x-notification-color-icon-bg-success": "var(--x-color-success-subtle)"
|
|
144
165
|
},
|
|
145
166
|
danger: {
|
|
167
|
+
"--x-alert-error-color-bg": "var(--x-color-danger-light-1)",
|
|
168
|
+
"--x-button-color-bg-danger-outline-active": "color-mix(in srgb, var(--x-button-color-text-danger) 5%, var(--x-color-transparent))",
|
|
169
|
+
"--x-button-color-bg-danger-outline-hover": "color-mix(in srgb, var(--x-button-color-text-danger) 3%, var(--x-color-transparent))",
|
|
146
170
|
"--x-button-color-bg-danger-solid": "var(--x-color-danger-solid)",
|
|
147
171
|
"--x-button-color-bg-danger-solid-active": "var(--x-color-danger-solid-active)",
|
|
148
172
|
"--x-button-color-bg-danger-solid-hover": "var(--x-color-danger-solid-hover)",
|
|
@@ -151,6 +175,9 @@ const r = {
|
|
|
151
175
|
"--x-button-color-bg-danger-subtle-hover": "var(--x-color-danger-subtle-hover)",
|
|
152
176
|
"--x-button-color-border-danger": "var(--x-color-danger-solid)",
|
|
153
177
|
"--x-button-color-text-danger": "var(--x-color-danger-button-text)",
|
|
178
|
+
"--x-button-color-text-danger-active": "color-mix(in srgb, var(--x-button-color-text-danger) 84%, var(--x-color-black))",
|
|
179
|
+
"--x-button-color-text-danger-hover": "color-mix(in srgb, var(--x-button-color-text-danger) 92%, var(--x-color-black))",
|
|
180
|
+
"--x-button-color-wave-danger": "var(--x-button-color-bg-danger-solid)",
|
|
154
181
|
"--x-chart-color-series-4": "var(--x-color-danger-solid)",
|
|
155
182
|
"--x-color-danger-button-text": "var(--x-color-danger-text)",
|
|
156
183
|
"--x-color-danger-light-1": "var(--x-color-danger-1)",
|
|
@@ -183,7 +210,7 @@ const r = {
|
|
|
183
210
|
"--x-input-tag-color-border_error_focus": "var(--x-field-color-border-error)",
|
|
184
211
|
"--x-input-tag-color-shadow_error_focus": "var(--x-field-status-error-shadow-color-focus)",
|
|
185
212
|
"--x-link-color-text-danger": "var(--x-color-danger-text)",
|
|
186
|
-
"--x-link-danger-background-color": "var(--x-color-danger-
|
|
213
|
+
"--x-link-danger-background-color": "var(--x-color-danger-subtle)",
|
|
187
214
|
"--x-message-color-accent-error": "var(--x-color-danger-solid)",
|
|
188
215
|
"--x-message-color-icon-bg-error": "var(--x-color-danger-subtle)",
|
|
189
216
|
"--x-notification-color-accent-error": "var(--x-color-danger-solid)",
|
|
@@ -194,6 +221,9 @@ const r = {
|
|
|
194
221
|
"--x-picker-color-shadow_error_focus": "var(--x-field-status-error-shadow-color-focus)"
|
|
195
222
|
},
|
|
196
223
|
strong: {
|
|
224
|
+
"--x-alert-strong-color-bg": "var(--x-color-strong-subtle)",
|
|
225
|
+
"--x-button-color-bg-strong-outline-active": "color-mix(in srgb, var(--x-button-color-text-strong) 5%, var(--x-color-transparent))",
|
|
226
|
+
"--x-button-color-bg-strong-outline-hover": "color-mix(in srgb, var(--x-button-color-text-strong) 3%, var(--x-color-transparent))",
|
|
197
227
|
"--x-button-color-bg-strong-solid": "var(--x-color-strong-solid)",
|
|
198
228
|
"--x-button-color-bg-strong-solid-active": "var(--x-color-strong-solid-active)",
|
|
199
229
|
"--x-button-color-bg-strong-solid-hover": "var(--x-color-strong-solid-hover)",
|
|
@@ -202,6 +232,9 @@ const r = {
|
|
|
202
232
|
"--x-button-color-bg-strong-subtle-hover": "var(--x-color-strong-subtle-hover)",
|
|
203
233
|
"--x-button-color-border-strong": "var(--x-color-strong-solid)",
|
|
204
234
|
"--x-button-color-text-strong": "var(--x-color-strong-button-text)",
|
|
235
|
+
"--x-button-color-text-strong-active": "color-mix(in srgb, var(--x-button-color-text-strong) 84%, var(--x-color-black))",
|
|
236
|
+
"--x-button-color-text-strong-hover": "color-mix(in srgb, var(--x-button-color-text-strong) 92%, var(--x-color-black))",
|
|
237
|
+
"--x-button-color-wave-strong": "var(--x-button-color-bg-strong-solid)",
|
|
205
238
|
"--x-chart-color-series-3": "var(--x-color-strong-solid)",
|
|
206
239
|
"--x-color-strong-button-text": "var(--x-color-strong-text)",
|
|
207
240
|
"--x-color-strong-solid": "var(--x-color-strong-6)",
|
|
@@ -212,13 +245,16 @@ const r = {
|
|
|
212
245
|
"--x-color-strong-subtle-hover": "color-mix(in srgb, var(--x-color-strong-subtle) 90%, var(--x-color-strong-button-text))",
|
|
213
246
|
"--x-color-strong-text": "var(--x-color-strong)",
|
|
214
247
|
"--x-link-color-text-strong": "var(--x-color-strong-text)",
|
|
215
|
-
"--x-link-strong-background-color": "var(--x-color-strong-
|
|
248
|
+
"--x-link-strong-background-color": "var(--x-color-strong-subtle)",
|
|
216
249
|
"--x-message-color-accent-strong": "var(--x-color-strong-solid)",
|
|
217
250
|
"--x-message-color-icon-bg-strong": "var(--x-color-strong-subtle)",
|
|
218
251
|
"--x-notification-color-accent-strong": "var(--x-color-strong-solid)",
|
|
219
252
|
"--x-notification-color-icon-bg-strong": "var(--x-color-strong-subtle)"
|
|
220
253
|
},
|
|
221
254
|
warning: {
|
|
255
|
+
"--x-alert-warning-color-bg": "var(--x-color-warning-light-1)",
|
|
256
|
+
"--x-button-color-bg-warning-outline-active": "color-mix(in srgb, var(--x-button-color-text-warning) 5%, var(--x-color-transparent))",
|
|
257
|
+
"--x-button-color-bg-warning-outline-hover": "color-mix(in srgb, var(--x-button-color-text-warning) 3%, var(--x-color-transparent))",
|
|
222
258
|
"--x-button-color-bg-warning-solid": "var(--x-color-warning-solid)",
|
|
223
259
|
"--x-button-color-bg-warning-solid-active": "var(--x-color-warning-solid-active)",
|
|
224
260
|
"--x-button-color-bg-warning-solid-hover": "var(--x-color-warning-solid-hover)",
|
|
@@ -227,6 +263,9 @@ const r = {
|
|
|
227
263
|
"--x-button-color-bg-warning-subtle-hover": "var(--x-color-warning-subtle-hover)",
|
|
228
264
|
"--x-button-color-border-warning": "var(--x-color-warning-solid)",
|
|
229
265
|
"--x-button-color-text-warning": "var(--x-color-warning-button-text)",
|
|
266
|
+
"--x-button-color-text-warning-active": "color-mix(in srgb, var(--x-button-color-text-warning) 84%, var(--x-color-black))",
|
|
267
|
+
"--x-button-color-text-warning-hover": "color-mix(in srgb, var(--x-button-color-text-warning) 92%, var(--x-color-black))",
|
|
268
|
+
"--x-button-color-wave-warning": "var(--x-button-color-bg-warning-solid)",
|
|
230
269
|
"--x-chart-color-series-5": "var(--x-color-warning-solid)",
|
|
231
270
|
"--x-color-warning-button-text": "var(--x-color-warning-text)",
|
|
232
271
|
"--x-color-warning-light-1": "var(--x-color-warning-1)",
|
|
@@ -245,42 +284,88 @@ const r = {
|
|
|
245
284
|
"--x-field-status-warning-text": "var(--x-color-warning-text)",
|
|
246
285
|
"--x-input-feedback-icon-color_warning": "var(--x-field-status-warning-icon)",
|
|
247
286
|
"--x-link-color-text-warning": "var(--x-color-warning-text)",
|
|
248
|
-
"--x-link-warning-background-color": "var(--x-color-warning-
|
|
287
|
+
"--x-link-warning-background-color": "var(--x-color-warning-subtle)",
|
|
249
288
|
"--x-message-color-accent-warning": "var(--x-color-warning-solid)",
|
|
250
289
|
"--x-message-color-icon-bg-warning": "var(--x-color-warning-subtle)",
|
|
251
290
|
"--x-notification-color-accent-warning": "var(--x-color-warning-solid)",
|
|
252
291
|
"--x-notification-color-icon-bg-warning": "var(--x-color-warning-subtle)"
|
|
253
292
|
}
|
|
254
|
-
},
|
|
293
|
+
}, c = {
|
|
255
294
|
primary: {
|
|
256
|
-
"--x-color-
|
|
257
|
-
"--x-color-
|
|
295
|
+
"--x-alert-color-focus-ring": "var(--x-color-text-1)",
|
|
296
|
+
"--x-alert-info-color-bg": "var(--x-color-primary-subtle)",
|
|
297
|
+
"--x-alert-info-color-icon": "var(--x-color-primary-8)",
|
|
298
|
+
"--x-button-color-text-primary-active": "color-mix(in srgb, var(--x-button-color-text-primary) 92%, var(--x-color-black))",
|
|
299
|
+
"--x-button-color-text-primary-hover": "color-mix(in srgb, var(--x-button-color-text-primary) 92%, var(--x-color-white))",
|
|
300
|
+
"--x-color-picker-color-mode-bg_active": "color-mix(in srgb, var(--x-color-primary-subtle) 20%, var(--x-color-bg-surface))",
|
|
301
|
+
"--x-color-primary-button-text": "var(--x-color-primary-8)",
|
|
302
|
+
"--x-color-primary-subtle": "#39479f",
|
|
303
|
+
"--x-color-primary-text": "var(--x-color-primary-8)",
|
|
304
|
+
"--x-field-status-validating-bg": "color-mix(in srgb, var(--x-color-primary-subtle) 12%, var(--x-color-bg-surface))",
|
|
305
|
+
"--x-field-status-validating-bg-hover": "color-mix(in srgb, var(--x-color-primary-subtle) 20%, var(--x-color-bg-surface))",
|
|
258
306
|
"--x-heatmap-color-level-1": "var(--x-color-primary-3)",
|
|
259
307
|
"--x-heatmap-color-level-2": "var(--x-color-primary-4)",
|
|
260
308
|
"--x-heatmap-color-level-3": "var(--x-color-primary-5)",
|
|
261
309
|
"--x-heatmap-color-level-4": "var(--x-color-primary-6)",
|
|
262
310
|
"--x-heatmap-color-level-5": "var(--x-color-primary-7)",
|
|
263
|
-
"--x-
|
|
264
|
-
"--x-
|
|
311
|
+
"--x-message-color-accent-info": "var(--x-color-primary-text)",
|
|
312
|
+
"--x-message-color-accent-loading": "var(--x-color-primary-text)",
|
|
313
|
+
"--x-notification-color-accent-info": "var(--x-color-primary-text)",
|
|
314
|
+
"--x-table-color-bg-body-row_active": "color-mix(in srgb, var(--x-color-primary-subtle) 20%, var(--x-color-bg-surface))",
|
|
315
|
+
"--x-tag-color-better-blue-border-hover": "color-mix(in srgb, var(--x-color-primary-subtle) 88%, var(--x-color-primary-text))"
|
|
265
316
|
},
|
|
266
317
|
success: {
|
|
267
|
-
"--x-
|
|
268
|
-
"--x-color-success-
|
|
318
|
+
"--x-alert-success-color-bg": "var(--x-color-success-subtle)",
|
|
319
|
+
"--x-button-color-text-success-active": "color-mix(in srgb, var(--x-button-color-text-success) 92%, var(--x-color-black))",
|
|
320
|
+
"--x-button-color-text-success-hover": "color-mix(in srgb, var(--x-button-color-text-success) 92%, var(--x-color-white))",
|
|
321
|
+
"--x-color-success-button-text": "var(--x-color-success-8)",
|
|
322
|
+
"--x-color-success-subtle": "#2d733d",
|
|
323
|
+
"--x-color-success-text": "var(--x-color-success-8)",
|
|
324
|
+
"--x-field-status-success-bg": "color-mix(in srgb, var(--x-color-success-subtle) 12%, var(--x-color-bg-surface))",
|
|
325
|
+
"--x-field-status-success-bg-hover": "color-mix(in srgb, var(--x-color-success-subtle) 20%, var(--x-color-bg-surface))",
|
|
326
|
+
"--x-message-color-accent-success": "var(--x-color-success-text)",
|
|
327
|
+
"--x-notification-color-accent-success": "var(--x-color-success-text)"
|
|
269
328
|
},
|
|
270
329
|
danger: {
|
|
330
|
+
"--x-alert-error-color-bg": "var(--x-color-danger-subtle)",
|
|
331
|
+
"--x-button-color-text-danger-active": "color-mix(in srgb, var(--x-button-color-text-danger) 92%, var(--x-color-black))",
|
|
332
|
+
"--x-button-color-text-danger-hover": "color-mix(in srgb, var(--x-button-color-text-danger) 92%, var(--x-color-white))",
|
|
271
333
|
"--x-color-danger-button-text": "var(--x-color-danger-8)",
|
|
272
|
-
"--x-color-danger-
|
|
334
|
+
"--x-color-danger-subtle": "#4d212a",
|
|
335
|
+
"--x-color-danger-text": "var(--x-color-danger-8)",
|
|
336
|
+
"--x-field-color-bg-error": "var(--x-field-status-error-bg)",
|
|
337
|
+
"--x-field-color-bg-error-hover": "var(--x-field-status-error-bg-hover)",
|
|
338
|
+
"--x-field-status-error-bg": "color-mix(in srgb, var(--x-color-danger-subtle) 12%, var(--x-color-bg-surface))",
|
|
339
|
+
"--x-field-status-error-bg-hover": "color-mix(in srgb, var(--x-color-danger-subtle) 20%, var(--x-color-bg-surface))",
|
|
340
|
+
"--x-message-color-accent-error": "var(--x-color-danger-text)",
|
|
341
|
+
"--x-notification-color-accent-error": "var(--x-color-danger-text)"
|
|
273
342
|
},
|
|
274
343
|
strong: {
|
|
344
|
+
"--x-button-color-text-strong-active": "color-mix(in srgb, var(--x-button-color-text-strong) 92%, var(--x-color-black))",
|
|
345
|
+
"--x-button-color-text-strong-hover": "color-mix(in srgb, var(--x-button-color-text-strong) 92%, var(--x-color-white))",
|
|
275
346
|
"--x-color-strong-button-text": "var(--x-color-strong-7)",
|
|
276
|
-
"--x-color-strong-
|
|
347
|
+
"--x-color-strong-subtle": "#70432b",
|
|
348
|
+
"--x-color-strong-text": "var(--x-color-strong-7)",
|
|
349
|
+
"--x-message-color-accent-strong": "var(--x-color-strong-text)",
|
|
350
|
+
"--x-notification-color-accent-strong": "var(--x-color-strong-text)"
|
|
277
351
|
},
|
|
278
352
|
warning: {
|
|
353
|
+
"--x-alert-warning-color-bg": "var(--x-color-warning-subtle)",
|
|
354
|
+
"--x-button-color-text-warning-active": "color-mix(in srgb, var(--x-button-color-text-warning) 92%, var(--x-color-black))",
|
|
355
|
+
"--x-button-color-text-warning-hover": "color-mix(in srgb, var(--x-button-color-text-warning) 92%, var(--x-color-white))",
|
|
279
356
|
"--x-color-warning-button-text": "var(--x-color-warning-7)",
|
|
280
|
-
"--x-color-warning-
|
|
357
|
+
"--x-color-warning-subtle": "#7b582d",
|
|
358
|
+
"--x-color-warning-subtle-active": "color-mix(in srgb, var(--x-color-warning-subtle) 84%, var(--x-color-warning-button-text))",
|
|
359
|
+
"--x-color-warning-subtle-hover": "color-mix(in srgb, var(--x-color-warning-subtle) 90%, var(--x-color-warning-button-text))",
|
|
360
|
+
"--x-color-warning-text": "var(--x-color-warning-7)",
|
|
361
|
+
"--x-field-status-warning-bg": "color-mix(in srgb, var(--x-color-warning-subtle) 12%, var(--x-color-bg-surface))",
|
|
362
|
+
"--x-field-status-warning-bg-hover": "color-mix(in srgb, var(--x-color-warning-subtle) 20%, var(--x-color-bg-surface))",
|
|
363
|
+
"--x-message-color-accent-warning": "var(--x-color-warning-text)",
|
|
364
|
+
"--x-notification-color-accent-warning": "var(--x-color-warning-text)"
|
|
281
365
|
}
|
|
282
366
|
};
|
|
283
367
|
export {
|
|
284
|
-
r as
|
|
285
|
-
o as
|
|
368
|
+
r as DEFAULT_PALETTE_SEEDS,
|
|
369
|
+
o as PALETTE_ALIASES,
|
|
370
|
+
c as PALETTE_ALIASES_DARK
|
|
286
371
|
};
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { PALETTE_ALIASES as
|
|
2
|
-
const
|
|
3
|
-
if (typeof
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
const
|
|
7
|
-
if (!/^(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(
|
|
8
|
-
const
|
|
9
|
-
return
|
|
1
|
+
import { PALETTE_ALIASES as y, PALETTE_ALIASES_DARK as A, DEFAULT_PALETTE_SEEDS as d } from "../_styles/palette-aliases.js";
|
|
2
|
+
const _ = 2.05, g = 95.5, E = 22, S = [1, 0.8, 0.6, 0.4, 0.2], $ = [1 / 3, 2 / 3, 1], H = 90, L = 300, m = (s, i, c) => Math.min(c, Math.max(i, s)), p = (s) => {
|
|
3
|
+
if (typeof s != "string") return null;
|
|
4
|
+
const i = s.trim();
|
|
5
|
+
if (i.startsWith("#")) {
|
|
6
|
+
const e = i.slice(1);
|
|
7
|
+
if (!/^(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e)) return null;
|
|
8
|
+
const u = e.length === 3 ? [...e].map((a) => a + a).join("") : e.length === 6 || e.length === 8 ? e.slice(0, 6) : null;
|
|
9
|
+
return u ? [0, 2, 4].map((a) => parseInt(u.slice(a, a + 2), 16)) : null;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const l =
|
|
18
|
-
return l.some((
|
|
19
|
-
},
|
|
20
|
-
const
|
|
11
|
+
const c = i.match(/^rgba?\(([^)]+)\)$/i);
|
|
12
|
+
if (!c) return null;
|
|
13
|
+
const r = c[1].trim(), o = r.includes(",") ? r.split(",").map((e) => e.trim()) : r.split(/\s*\/\s*/)[0].split(/\s+/), t = r.includes(",") ? o[3] : r.includes("/") ? r.split("/")[1].trim() : void 0;
|
|
14
|
+
if (r.split("/").length > 2 || o.length < 3 || o.length > (r.includes(",") ? 4 : 3)) return null;
|
|
15
|
+
const n = /^[+-]?(?:\d+\.?\d*|\.\d+)%?$/;
|
|
16
|
+
if (o.slice(0, 3).some((e) => !n.test(e)) || t !== void 0 && !n.test(t)) return null;
|
|
17
|
+
const l = o.slice(0, 3).map((e) => e.endsWith("%") ? Math.round(parseFloat(e) / 100 * 255) : Number(e));
|
|
18
|
+
return l.some((e) => !Number.isFinite(e)) ? null : l.map((e) => m(Math.round(e), 0, 255));
|
|
19
|
+
}, P = ([s, i, c]) => {
|
|
20
|
+
const r = s / 255, o = i / 255, t = c / 255, n = Math.max(r, o, t), l = Math.min(r, o, t), e = n - l, u = (n + l) / 2;
|
|
21
21
|
let a = 0, h = 0;
|
|
22
|
-
return
|
|
23
|
-
}, I = ({ h:
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
return
|
|
27
|
-
},
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
30
|
-
throw new Error(`[x-next] generatePalette: 无法解析种子色 "${
|
|
31
|
-
const { h:
|
|
22
|
+
return e !== 0 && (h = u > 0.5 ? e / (2 - n - l) : e / (n + l), n === r ? a = (o - t) / e + (o < t ? 6 : 0) : n === o ? a = (t - r) / e + 2 : a = (r - o) / e + 4, a *= 60), { h: a, s: h * 100, l: u * 100 };
|
|
23
|
+
}, I = ({ h: s, s: i, l: c }) => {
|
|
24
|
+
const r = m(i, 0, 100) / 100, o = m(c, 0, 100) / 100, t = (s % 360 + 360) % 360, n = (1 - Math.abs(2 * o - 1)) * r, l = n * (1 - Math.abs(t / 60 % 2 - 1)), e = o - n / 2;
|
|
25
|
+
let u;
|
|
26
|
+
return t < 60 ? u = [n, l, 0] : t < 120 ? u = [l, n, 0] : t < 180 ? u = [0, n, l] : t < 240 ? u = [0, l, n] : t < 300 ? u = [l, 0, n] : u = [n, 0, l], u.map((a) => m(Math.round((a + e) * 255), 0, 255));
|
|
27
|
+
}, R = (s) => `#${s.map((i) => m(Math.round(i), 0, 255).toString(16).padStart(2, "0")).join("")}`, v = (s) => s <= H || s >= L ? 1 : -1, T = (s, i = {}) => {
|
|
28
|
+
const c = p(s);
|
|
29
|
+
if (!c)
|
|
30
|
+
throw new Error(`[x-next] generatePalette: 无法解析种子色 "${s}"`);
|
|
31
|
+
const { h: r, s: o, l: t } = P(c), n = v(r), { dark: l = !1 } = i, e = l ? Math.min(E, t) : Math.max(g, t), u = l ? Math.max(g, t) : Math.min(E, t), a = [];
|
|
32
32
|
for (let h = 0; h < 9; h += 1) {
|
|
33
33
|
let f;
|
|
34
|
-
h < 5 ? f =
|
|
35
|
-
const
|
|
36
|
-
a.push(
|
|
34
|
+
h < 5 ? f = t + (e - t) * S[h] : h === 5 ? f = t : f = t + (u - t) * $[h - 6];
|
|
35
|
+
const M = 5 - h, b = n * _ * M * (l ? -1 : 1);
|
|
36
|
+
a.push(R(I({ h: r + b, s: o, l: m(f, 0, 100) })));
|
|
37
37
|
}
|
|
38
38
|
return a;
|
|
39
|
-
}, G = (
|
|
40
|
-
const { name:
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
}, G = (s, i = {}) => {
|
|
40
|
+
const { name: c = "primary", target: r, dark: o } = i, t = T(s, { dark: o }), n = r ?? (typeof document < "u" ? document.documentElement : null);
|
|
41
|
+
if (n) {
|
|
42
|
+
n.style.setProperty(`--x-color-${c}`, t[5]), t.forEach((l, e) => {
|
|
43
|
+
n.style.setProperty(`--x-color-${c}-${e + 1}`, l);
|
|
44
44
|
});
|
|
45
|
-
for (const [l,
|
|
46
|
-
|
|
45
|
+
for (const [l, e] of Object.entries(x(c, o, t[5])))
|
|
46
|
+
n.style.setProperty(l, e);
|
|
47
47
|
}
|
|
48
|
-
return
|
|
49
|
-
},
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
Object.entries(i).map(([s, e]) => [s, (n == null ? void 0 : n[s]) ?? e])
|
|
48
|
+
return t;
|
|
49
|
+
}, x = (s, i, c) => {
|
|
50
|
+
const r = y[s] ?? {}, o = i ? A[s] : void 0, t = Object.fromEntries(
|
|
51
|
+
Object.entries(r).map(([n, l]) => [n, (o == null ? void 0 : o[n]) ?? l])
|
|
53
52
|
);
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
return i && c && d[s] && JSON.stringify(p(c)) !== JSON.stringify(p(d[s])) && (t[`--x-color-${s}-subtle`] = `color-mix(in srgb, var(--x-color-${s}-1) 72%, var(--x-color-${s}-8))`), t;
|
|
54
|
+
}, O = (s, i = !1) => {
|
|
55
|
+
const c = T(s, { dark: i });
|
|
56
56
|
return {
|
|
57
|
-
"--x-color-primary":
|
|
58
|
-
...Object.fromEntries(
|
|
59
|
-
...
|
|
57
|
+
"--x-color-primary": c[5],
|
|
58
|
+
...Object.fromEntries(c.map((r, o) => [`--x-color-primary-${o + 1}`, r])),
|
|
59
|
+
...x("primary", i, c[5])
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
export {
|
|
63
63
|
G as applyThemeColor,
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
T as generatePalette,
|
|
65
|
+
O as getThemeColorStyles,
|
|
66
66
|
I as hslToRgb,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
p as parseColor,
|
|
68
|
+
P as rgbToHsl,
|
|
69
|
+
R as toHex
|
|
70
70
|
};
|
|
@@ -1,84 +1,112 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getClassNameMixin as
|
|
3
|
-
import { buttonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { buttonGroupInjectionKey as
|
|
7
|
-
import { useSize as
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { defineComponent as M, getCurrentInstance as R, inject as U, reactive as Z, computed as c, onBeforeUnmount as q, withDirectives as H, createVNode as u, resolveDirective as J, isVNode as Q, Comment as W, Fragment as X, Text as Y } from "vue";
|
|
2
|
+
import { getClassNameMixin as _ } from "../../_utils/config.js";
|
|
3
|
+
import { buttonProps as G } from "./props.js";
|
|
4
|
+
import ee from "../../icons/animation/animation-loading.js";
|
|
5
|
+
import ie from "../../directives/wave.js";
|
|
6
|
+
import { buttonGroupInjectionKey as ae } from "./context.js";
|
|
7
|
+
import { useSize as te } from "../../_hooks/use-size.js";
|
|
8
|
+
import { resolveButtonAppearance as ne } from "./appearance.js";
|
|
9
|
+
const d = (e) => {
|
|
10
|
+
if (Array.isArray(e)) return e.some(d);
|
|
10
11
|
if (e == null || typeof e == "boolean") return !1;
|
|
11
12
|
if (typeof e == "string") return e.trim().length > 0;
|
|
12
|
-
if (
|
|
13
|
-
if (e.type ===
|
|
14
|
-
if (e.type ===
|
|
15
|
-
return
|
|
13
|
+
if (Q(e)) {
|
|
14
|
+
if (e.type === W) return !1;
|
|
15
|
+
if (e.type === X || e.type === Y)
|
|
16
|
+
return d(e.children);
|
|
16
17
|
}
|
|
17
18
|
return !0;
|
|
18
|
-
},
|
|
19
|
+
}, se = /* @__PURE__ */ M({
|
|
19
20
|
name: "Button",
|
|
20
|
-
props:
|
|
21
|
+
props: G,
|
|
21
22
|
// 显式导入插槽
|
|
22
23
|
slots: Object,
|
|
23
24
|
directives: {
|
|
24
|
-
wave:
|
|
25
|
+
wave: ie
|
|
25
26
|
},
|
|
26
27
|
emits: ["click"],
|
|
27
28
|
setup(e, {
|
|
28
|
-
slots:
|
|
29
|
-
emit:
|
|
29
|
+
slots: t,
|
|
30
|
+
emit: F
|
|
30
31
|
}) {
|
|
31
|
-
const
|
|
32
|
-
mergedSize:
|
|
33
|
-
} =
|
|
32
|
+
const b = R(), a = U(ae, void 0), {
|
|
33
|
+
mergedSize: L
|
|
34
|
+
} = te(void 0, {
|
|
34
35
|
defaultValue: "medium"
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}), i =
|
|
39
|
-
const
|
|
40
|
-
return Object.prototype.hasOwnProperty.call(
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
}), o = Z({
|
|
37
|
+
isDebounce: !1,
|
|
38
|
+
nativeActivation: !1
|
|
39
|
+
}), i = _("button"), N = (n) => n.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`), f = (n) => {
|
|
40
|
+
const r = (b == null ? void 0 : b.vnode.props) ?? {};
|
|
41
|
+
return Object.prototype.hasOwnProperty.call(r, n) || Object.prototype.hasOwnProperty.call(r, N(n));
|
|
42
|
+
}, m = c(() => f("type") ? e.type : (a == null ? void 0 : a.type) ?? e.type), S = c(() => f("size") ? e.size : (a == null ? void 0 : a.size) ?? L.value), y = c(() => f("status") ? e.status : (a == null ? void 0 : a.status) ?? e.status), h = c(() => f("shape") ? e.shape : (a == null ? void 0 : a.shape) ?? e.shape), s = c(() => f("disabled") ? e.disabled : (a == null ? void 0 : a.disabled) ?? e.disabled), v = c(() => ne(m.value, y.value, e.plain)), V = c(() => [
|
|
43
|
+
i.block,
|
|
44
|
+
m.value && m.value !== "default" && i.modifier(m.value),
|
|
45
|
+
S.value && i.modifier(S.value),
|
|
46
|
+
// Keep legacy semantic classes, but use separate namespaces for style decisions.
|
|
47
|
+
y.value !== "primary" && i.modifier(y.value),
|
|
48
|
+
i.modifier(`appearance-${v.value.appearance}`),
|
|
49
|
+
i.modifier(`color-${v.value.color}`),
|
|
50
|
+
s.value && i.is("disabled"),
|
|
51
|
+
e.block && i.modifier("block"),
|
|
52
|
+
e.plain && i.modifier("plain"),
|
|
53
|
+
h.value && i.modifier(h.value),
|
|
54
|
+
e.border && ["default", "solid", "outline", "dashed"].includes(v.value.appearance) && i.modifier("has-border"),
|
|
55
|
+
!e.border && i.modifier("hide-border"),
|
|
56
|
+
l.value && i.modifier("loading"),
|
|
57
|
+
e.narrow && i.modifier("narrow")
|
|
58
|
+
]);
|
|
59
|
+
let k, p;
|
|
60
|
+
q(() => {
|
|
61
|
+
clearTimeout(k), clearTimeout(p);
|
|
62
|
+
});
|
|
63
|
+
const $ = () => {
|
|
64
|
+
e.debounce > 0 && !o.isDebounce && (o.isDebounce = !0, k = setTimeout(() => {
|
|
65
|
+
o.isDebounce = !1;
|
|
44
66
|
}, e.debounce));
|
|
45
|
-
}, l =
|
|
46
|
-
var
|
|
47
|
-
|
|
67
|
+
}, l = c(() => e.loading || o.isDebounce), K = c(() => s.value || l.value || v.value.appearance === "text"), C = (n) => {
|
|
68
|
+
var r;
|
|
69
|
+
if (n.detail > 0 && ((r = n.currentTarget) == null || r.blur()), s.value || l.value) {
|
|
70
|
+
n.preventDefault();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
e.htmlType !== "button" && (o.nativeActivation = !0, clearTimeout(p), p = setTimeout(() => {
|
|
74
|
+
o.nativeActivation = !1;
|
|
75
|
+
}, 0)), $(), F("click", n);
|
|
48
76
|
};
|
|
49
77
|
return () => {
|
|
50
|
-
var
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
class: [
|
|
78
|
+
var j, I, O, B;
|
|
79
|
+
const n = (j = t.default) == null ? void 0 : j.call(t), r = (I = t.prefix) == null ? void 0 : I.call(t), x = (O = t.icon) == null ? void 0 : O.call(t), z = (B = t.suffix) == null ? void 0 : B.call(t), g = d(n), w = d(r), T = d(x), D = d(z), P = !g && !w && T && !D, A = e.loadingFill || l.value && (h.value === "circle" || P), E = l.value && !A && (g || w || T || D);
|
|
80
|
+
return H(u("button", {
|
|
81
|
+
class: [V.value, !g && i.modifier("empty-content"), P && i.modifier("only-icon"), A && i.modifier("loading-fill")],
|
|
54
82
|
type: e.htmlType,
|
|
55
|
-
disabled:
|
|
83
|
+
disabled: s.value || l.value && !o.nativeActivation,
|
|
56
84
|
"aria-busy": l.value || void 0,
|
|
57
|
-
onClick:
|
|
58
|
-
}, [
|
|
85
|
+
onClick: C
|
|
86
|
+
}, [u("span", {
|
|
59
87
|
class: i.element("loading"),
|
|
60
88
|
"aria-hidden": "true",
|
|
61
89
|
style: {
|
|
62
90
|
display: "flex",
|
|
63
91
|
opacity: l.value ? 1 : 0,
|
|
64
|
-
width:
|
|
65
|
-
marginRight:
|
|
92
|
+
width: A ? void 0 : l.value ? "1em" : 0,
|
|
93
|
+
marginRight: E ? "4px" : "0",
|
|
66
94
|
overflow: "hidden"
|
|
67
95
|
}
|
|
68
|
-
}, [l.value &&
|
|
96
|
+
}, [l.value && u(ee, null, null)]), w && u("span", {
|
|
69
97
|
class: i.element("prefix")
|
|
70
|
-
}, [
|
|
98
|
+
}, [r]), T && u("span", {
|
|
71
99
|
class: i.element("prefix")
|
|
72
|
-
}, [
|
|
100
|
+
}, [x]), u("span", {
|
|
73
101
|
class: i.element("content")
|
|
74
|
-
}, [
|
|
102
|
+
}, [n]), D && u("span", {
|
|
75
103
|
class: i.element("suffix")
|
|
76
|
-
}, [
|
|
77
|
-
disabled:
|
|
104
|
+
}, [z])]), [[J("wave"), {
|
|
105
|
+
disabled: K.value
|
|
78
106
|
}]]);
|
|
79
107
|
};
|
|
80
108
|
}
|
|
81
109
|
});
|
|
82
110
|
export {
|
|
83
|
-
|
|
111
|
+
se as default
|
|
84
112
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function c(r, e, o) {
|
|
2
|
+
const a = r === "primary" && e === "default" ? "primary" : e, n = r === "primary" ? "solid" : r;
|
|
3
|
+
return o && ["default", "solid"].includes(n) ? { appearance: "subtle", color: a } : { appearance: n, color: a };
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
c as resolveButtonAppearance
|
|
7
|
+
};
|