antd-solid 0.0.11 → 0.0.12
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/css/index.css +9 -5
- package/dist/index.esm.js +232 -135
- package/dist/index.umd.js +1 -1
- package/es/{Button.d.ts → Button/index.d.ts} +3 -2
- package/es/{Button.js → Button/index.js} +11 -9
- package/es/Button/index.scss.js +6 -0
- package/es/{Compact.js → Compact/index.js} +4 -4
- package/es/Drawer/index.js +2 -3
- package/es/Empty/index.d.ts +6 -2
- package/es/Empty/index.js +7 -2
- package/es/Input.js +3 -3
- package/es/InputNumber.js +1 -1
- package/es/Modal.d.ts +4 -5
- package/es/Modal.js +10 -9
- package/es/Popconfirm.js +1 -1
- package/es/Progress/index.d.ts +1 -2
- package/es/Progress/index.js +18 -8
- package/es/Radio.js +2 -2
- package/es/Result.js +1 -1
- package/es/Select.js +2 -2
- package/es/Spin.d.ts +1 -0
- package/es/Spin.js +12 -6
- package/es/Switch.js +1 -1
- package/es/Tabs.js +2 -2
- package/es/Timeline.js +1 -1
- package/es/Tree.js +2 -2
- package/es/Upload.d.ts +56 -10
- package/es/Upload.js +93 -3
- package/es/index.js +2 -2
- package/package.json +1 -1
- package/src/Button/index.scss +9 -0
- package/src/{Button.tsx → Button/index.tsx} +18 -9
- package/src/Compact/index.tsx +20 -0
- package/src/Drawer/index.tsx +1 -2
- package/src/Empty/index.tsx +11 -6
- package/src/Input.tsx +2 -2
- package/src/InputNumber.tsx +34 -20
- package/src/Modal.tsx +14 -13
- package/src/Progress/index.tsx +17 -9
- package/src/Radio.tsx +3 -3
- package/src/Result.tsx +1 -1
- package/src/Select.tsx +14 -4
- package/src/Spin.tsx +16 -5
- package/src/Switch.tsx +1 -1
- package/src/Tabs.tsx +2 -2
- package/src/Timeline.tsx +1 -1
- package/src/Tree.tsx +4 -3
- package/src/Upload.tsx +138 -5
- package/src/Compact.tsx +0 -15
- /package/es/{Compact.d.ts → Compact/index.d.ts} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,28 +1,69 @@
|
|
|
1
|
-
import { delegateEvents, use,
|
|
2
|
-
import { mergeProps, createSignal, createMemo, Show, createEffect, on, splitProps,
|
|
1
|
+
import { insert, template, delegateEvents, use, createComponent, effect, className, style, mergeProps as mergeProps$1, Dynamic, render, memo, Portal, setAttribute, spread } from 'solid-js/web';
|
|
2
|
+
import { mergeProps, createSignal, createMemo, untrack, Show, createEffect, on, splitProps, For, onMount, onCleanup, children, createSelector, createContext, useContext, Index, Switch as Switch$1, Match } from 'solid-js';
|
|
3
3
|
import cs from 'classnames';
|
|
4
4
|
import { omit, isNil, clamp, compact, isEmpty, max, get, set, mapValues } from 'lodash-es';
|
|
5
5
|
import React, { useRef, useEffect } from 'react';
|
|
6
6
|
import { Transition } from 'solid-transition-group';
|
|
7
|
-
import { ConfigProvider, DatePicker as DatePicker$1, ColorPicker as ColorPicker$1,
|
|
7
|
+
import { ConfigProvider, DatePicker as DatePicker$1, ColorPicker as ColorPicker$1, Skeleton as Skeleton$1, Image as Image$2 } from 'antd';
|
|
8
8
|
export { message } from 'antd';
|
|
9
9
|
import { createRoot } from 'react-dom/client';
|
|
10
10
|
import { nanoid } from 'nanoid';
|
|
11
11
|
|
|
12
|
+
const _tmpl$$t = /*#__PURE__*/template(`<div class="ant-compact ant-flex child[:first-child]>:ant-rounded-l-6px child[:last-child]>:ant-rounded-r-6px">`);
|
|
13
|
+
function Compact(props) {
|
|
14
|
+
return (() => {
|
|
15
|
+
const _el$ = _tmpl$$t();
|
|
16
|
+
insert(_el$, () => props.children);
|
|
17
|
+
return _el$;
|
|
18
|
+
})();
|
|
19
|
+
}
|
|
20
|
+
Compact.compactItemClass = 'p[.ant-compact]:ant-ml--1px p[.ant-compact]:first:ant-ml-0';
|
|
21
|
+
Compact.compactItemRounded0Class = 'p[.ant-compact]:ant-rounded-0';
|
|
22
|
+
Compact.compactItemRoundedLeftClass = 'p[.ant-compact>:first-child]:ant-rounded-l-6px';
|
|
23
|
+
Compact.compactItemRoundedRightClass = 'p[.ant-compact>:last-child]:ant-rounded-r-6px';
|
|
24
|
+
Compact.compactItemZIndexClass = 'p[.ant-compact]:hover:ant-z-10 p[.ant-compact]:focus:ant-z-10 p[.ant-compact]:focus-within:ant-z-10';
|
|
25
|
+
|
|
26
|
+
function styleInject(css, ref) {
|
|
27
|
+
if (ref === void 0) ref = {};
|
|
28
|
+
var insertAt = ref.insertAt;
|
|
29
|
+
if (!css || typeof document === 'undefined') {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
33
|
+
var style = document.createElement('style');
|
|
34
|
+
style.type = 'text/css';
|
|
35
|
+
if (insertAt === 'top') {
|
|
36
|
+
if (head.firstChild) {
|
|
37
|
+
head.insertBefore(style, head.firstChild);
|
|
38
|
+
} else {
|
|
39
|
+
head.appendChild(style);
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
head.appendChild(style);
|
|
43
|
+
}
|
|
44
|
+
if (style.styleSheet) {
|
|
45
|
+
style.styleSheet.cssText = css;
|
|
46
|
+
} else {
|
|
47
|
+
style.appendChild(document.createTextNode(css));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
var css_248z$1 = ".ant-compact .ant-btn-primary:not(:first-child) {\n border-left: 1px solid white;\n}\n.ant-compact .ant-btn-primary:not(:last-child) {\n border-right: 1px solid white;\n}";
|
|
52
|
+
styleInject(css_248z$1);
|
|
53
|
+
|
|
12
54
|
const _tmpl$$s = /*#__PURE__*/template(`<span class="i-ant-design:loading ant-[vertical-align:-0.125em] keyframes-spin ant-[animation:spin_1s_linear_infinite] ant-mr-8px">`),
|
|
13
55
|
_tmpl$2$f = /*#__PURE__*/template(`<button><span>`);
|
|
14
56
|
const sizeClassMap = {
|
|
15
57
|
large: 'ant-px-15px ant-py-6px ant-h-40px ant-rounded-8px',
|
|
16
58
|
middle: 'ant-px-15px ant-py-4px ant-h-32px ant-rounded-6px',
|
|
17
|
-
small: 'ant-px-7px ant-h-24px ant-rounded-4px'
|
|
18
|
-
plain: 'ant-p-0'
|
|
59
|
+
small: 'ant-px-7px ant-h-24px ant-rounded-4px'
|
|
19
60
|
};
|
|
20
61
|
const typeClassMap = {
|
|
21
|
-
default: danger => cs('ant-bg-white', danger ? 'ant-[border:1px_solid_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-[border:1px_solid_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--
|
|
22
|
-
primary: danger => cs('ant-text-white', danger ? 'ant-[border:1px_solid_var(--ant-color-error)] ant-bg-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-bg-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-bg-[var(--dark-error-color)]' : 'ant-[border:1px_solid_var(--
|
|
23
|
-
dashed: danger => cs(' ant-bg-white', danger ? 'ant-[border:1px_dashed_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-[border:1px_dashed_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--
|
|
62
|
+
default: danger => cs('ant-bg-white', danger ? 'ant-[border:1px_solid_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-[border:1px_solid_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--ant-color-primary-hover)] hover:ant-text-[var(--ant-color-primary-hover)] active:ant-[border-color:var(--ant-color-primary-active)] active:ant-text-[var(--ant-color-primary-active)]'),
|
|
63
|
+
primary: danger => cs('ant-text-white', danger ? 'ant-[border:1px_solid_var(--ant-color-error)] ant-bg-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-bg-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-bg-[var(--dark-error-color)]' : 'ant-[border:1px_solid_var(--ant-color-primary)] ant-bg-[var(--ant-color-primary)] hover:ant-[border-color:var(--ant-color-primary-hover)] hover:ant-bg-[var(--ant-color-primary-hover)] active:ant-[border-color:var(--ant-color-primary-active)] active:ant-bg-[var(--ant-color-primary-active)]'),
|
|
64
|
+
dashed: danger => cs(' ant-bg-white', danger ? 'ant-[border:1px_dashed_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-[border:1px_dashed_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--ant-color-primary-hover)] hover:ant-text-[var(--ant-color-primary-hover)] active:ant-[border-color:var(--ant-color-primary-active)] active:ant-text-[var(--ant-color-primary-active)]'),
|
|
24
65
|
text: danger => cs('ant-border-none ant-bg-transparent', danger ? 'ant-text-[var(--ant-color-error)] hover:ant-bg-[var(--error-bg-color)] active:ant-bg-[var(--error-bg-color)]' : 'ant-text-[var(--dark-color)] hover:ant-bg-[rgba(0,0,0,0.06)] active:ant-bg-[rgba(0,0,0,.15)]'),
|
|
25
|
-
link: danger => cs('ant-border-none ant-bg-transparent', danger ? 'ant-text-[var(--ant-color-error)] hover:ant-text-[var(--light-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-text-[var(--
|
|
66
|
+
link: danger => cs('ant-border-none ant-bg-transparent', danger ? 'ant-text-[var(--ant-color-error)] hover:ant-text-[var(--light-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-text-[var(--ant-color-primary)] hover:ant-text-[var(--ant-color-primary-hover)] active:ant-text-[var(--ant-color-primary-active)]')
|
|
26
67
|
};
|
|
27
68
|
const Button = props => {
|
|
28
69
|
const mergedProps = mergeProps({
|
|
@@ -42,7 +83,7 @@ const Button = props => {
|
|
|
42
83
|
}
|
|
43
84
|
if (mergedProps.type === 'default' || mergedProps.type === 'primary' || mergedProps.type === 'dashed') {
|
|
44
85
|
const div = document.createElement('div');
|
|
45
|
-
div.className = cs(props.danger ? 'ant-[--color:var(--light-error-color)]' : 'ant-[--color:var(--
|
|
86
|
+
div.className = cs(props.danger ? 'ant-[--color:var(--light-error-color)]' : 'ant-[--color:var(--ant-color-primary-hover)]', 'ant-absolute ant-inset-0 ant-rounded-inherit ant-[background:radial-gradient(var(--color),rgba(0,0,0,0))] ant-z--1 ant-keyframes-button-border[inset:0px][inset:-6px] ant-[animation:button-border_ease-out_0.3s]');
|
|
46
87
|
const onAnimationEnd = () => {
|
|
47
88
|
div.remove();
|
|
48
89
|
div.removeEventListener('animationend', onAnimationEnd);
|
|
@@ -53,6 +94,7 @@ const Button = props => {
|
|
|
53
94
|
};
|
|
54
95
|
const _ref$ = mergedProps.ref;
|
|
55
96
|
typeof _ref$ === "function" ? use(_ref$, _el$) : mergedProps.ref = _el$;
|
|
97
|
+
_el$.addEventListener("click", untrack(() => props['on:click']));
|
|
56
98
|
insert(_el$, createComponent(Show, {
|
|
57
99
|
get when() {
|
|
58
100
|
return loading();
|
|
@@ -63,7 +105,7 @@ const Button = props => {
|
|
|
63
105
|
}), _el$3);
|
|
64
106
|
insert(_el$3, () => mergedProps.children);
|
|
65
107
|
effect(_p$ => {
|
|
66
|
-
const _v$ = cs('ant-relative ant-cursor-pointer', 'focus-visible:ant-[outline:4px_solid_var(--ant-color-primary-border)] focus-visible:ant-[outline-offset:1px]', mergedProps.class, sizeClassMap[mergedProps.size], typeClassMap[mergedProps.type](props.danger ?? false), loading() && 'ant-opacity-65', 'ant-[--color:--
|
|
108
|
+
const _v$ = cs(`ant-btn ant-btn-${mergedProps.type}`, 'ant-relative ant-cursor-pointer', 'focus-visible:ant-[outline:4px_solid_var(--ant-color-primary-border)] focus-visible:ant-[outline-offset:1px]', mergedProps.class, sizeClassMap[mergedProps.size], typeClassMap[mergedProps.type](props.danger ?? false), loading() && 'ant-opacity-65', 'ant-[--color:--ant-color-primary-hover]', Compact.compactItemRounded0Class, Compact.compactItemZIndexClass, Compact.compactItemClass),
|
|
67
109
|
_v$2 = mergedProps.style;
|
|
68
110
|
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
69
111
|
_p$._v$2 = style(_el$, _v$2, _p$._v$2);
|
|
@@ -123,26 +165,12 @@ function createControllableValue(props, options = {}) {
|
|
|
123
165
|
return [value, setValue];
|
|
124
166
|
}
|
|
125
167
|
|
|
126
|
-
const _tmpl$$r = /*#__PURE__*/template(`<div
|
|
127
|
-
function Compact(props) {
|
|
128
|
-
return (() => {
|
|
129
|
-
const _el$ = _tmpl$$r();
|
|
130
|
-
insert(_el$, () => props.children);
|
|
131
|
-
return _el$;
|
|
132
|
-
})();
|
|
133
|
-
}
|
|
134
|
-
Compact.compactItemClass = 'p[.ant-compact]:ant-ml--1px';
|
|
135
|
-
Compact.compactItemRounded0Class = 'p[.ant-compact>*]:ant-rounded-0';
|
|
136
|
-
Compact.compactItemRoundedLeftClass = 'p[.ant-compact>:first-child]:ant-rounded-l-6px';
|
|
137
|
-
Compact.compactItemRoundedRightClass = 'p[.ant-compact>:last-child]:ant-rounded-r-6px';
|
|
138
|
-
Compact.compactItemZIndexClass = 'p[.ant-compact>*]:focus:ant-z-10 p[.ant-compact>*]:focus-within:ant-z-10';
|
|
139
|
-
|
|
140
|
-
const _tmpl$$q = /*#__PURE__*/template(`<div>`),
|
|
168
|
+
const _tmpl$$r = /*#__PURE__*/template(`<div>`),
|
|
141
169
|
_tmpl$2$e = /*#__PURE__*/template(`<div class="ant-mr-4px">`),
|
|
142
170
|
_tmpl$3$a = /*#__PURE__*/template(`<div class="ant-ml-4px">`),
|
|
143
171
|
_tmpl$4$6 = /*#__PURE__*/template(`<div class="ant-[display:var(--input-after-display)] ant-absolute ant-top-0 ant-bottom-0 ant-right-0 ant-h-[calc(100%-2px)] ant-translate-y-1px -ant-translate-x-1px">`);
|
|
144
172
|
const statusClassDict = {
|
|
145
|
-
default: disabled => cs('ant-[border:1px_solid_var(--ant-color-border)]', !disabled && 'hover:ant-border-[var(--
|
|
173
|
+
default: disabled => cs('ant-[border:1px_solid_var(--ant-color-border)]', !disabled && 'hover:ant-border-[var(--ant-color-primary)] focus-within:ant-border-[var(--ant-color-primary)] focus-within:ant-[box-shadow:0_0_0_2px_rgba(5,145,255,0.1)]'),
|
|
146
174
|
error: disabled => cs('ant-[border:1px_solid_var(--ant-color-error)]', !disabled && 'hover:ant-border-[var(--light-error-color)] focus-within:ant-[box-shadow:0_0_0_2px_rgba(255,38,5,.06)]'),
|
|
147
175
|
warning: disabled => cs('ant-[border:1px_solid_var(--warning-color)]', !disabled && 'hover:ant-border-[var(--color-warning-border-hover)] focus-within:ant-[box-shadow:0_0_0_2px_rgba(255,215,5,.1)]')
|
|
148
176
|
};
|
|
@@ -186,13 +214,13 @@ function CommonInput(props) {
|
|
|
186
214
|
}
|
|
187
215
|
}));
|
|
188
216
|
return (() => {
|
|
189
|
-
const _el$ = _tmpl$$
|
|
217
|
+
const _el$ = _tmpl$$r();
|
|
190
218
|
insert(_el$, createComponent(Show, {
|
|
191
219
|
get when() {
|
|
192
220
|
return props.addonBefore;
|
|
193
221
|
},
|
|
194
222
|
get children() {
|
|
195
|
-
const _el$2 = _tmpl$$
|
|
223
|
+
const _el$2 = _tmpl$$r();
|
|
196
224
|
insert(_el$2, () => props.addonBefore);
|
|
197
225
|
effect(() => className(_el$2, cs('ant-shrink-0 ant-flex ant-justify-center ant-items-center ant-px-11px ant-bg-[rgba(0,0,0,.02)] ant-[border:1px_solid_var(--ant-color-border)] ant-border-r-0 ant-rounded-l-6px ant-text-14px', Compact.compactItemRounded0Class, Compact.compactItemRoundedLeftClass)));
|
|
198
226
|
return _el$2;
|
|
@@ -204,7 +232,7 @@ function CommonInput(props) {
|
|
|
204
232
|
},
|
|
205
233
|
fallback: inputJSX,
|
|
206
234
|
get children() {
|
|
207
|
-
const _el$3 = _tmpl$$
|
|
235
|
+
const _el$3 = _tmpl$$r();
|
|
208
236
|
insert(_el$3, createComponent(Show, {
|
|
209
237
|
get when() {
|
|
210
238
|
return props.prefix;
|
|
@@ -236,7 +264,7 @@ function CommonInput(props) {
|
|
|
236
264
|
return _el$6;
|
|
237
265
|
}
|
|
238
266
|
}), null);
|
|
239
|
-
effect(() => className(_el$3, cs('ant-flex ant-items-center ant-w-full ant-relative ant-[--input-after-display:none] hover:ant-[--input-after-display:block] p:hover-child[input]:ant-border-[var(--
|
|
267
|
+
effect(() => className(_el$3, cs('ant-flex ant-items-center ant-w-full ant-relative ant-[--input-after-display:none] hover:ant-[--input-after-display:block] p:hover-child[input]:ant-border-[var(--ant-color-primary)]', inputWrapClass())));
|
|
240
268
|
return _el$3;
|
|
241
269
|
}
|
|
242
270
|
}), null);
|
|
@@ -245,7 +273,7 @@ function CommonInput(props) {
|
|
|
245
273
|
return props.addonAfter;
|
|
246
274
|
},
|
|
247
275
|
get children() {
|
|
248
|
-
const _el$7 = _tmpl$$
|
|
276
|
+
const _el$7 = _tmpl$$r();
|
|
249
277
|
insert(_el$7, () => props.addonAfter);
|
|
250
278
|
effect(() => className(_el$7, cs('ant-shrink-0 ant-flex ant-justify-center ant-items-center ant-px-11px ant-bg-[rgba(0,0,0,.02)] ant-[border:1px_solid_var(--ant-color-border)] ant-border-l-0 ant-rounded-r-6px ant-text-14px', Compact.compactItemRounded0Class, Compact.compactItemRoundedRightClass)));
|
|
251
279
|
return _el$7;
|
|
@@ -326,7 +354,7 @@ function setRef(props, value) {
|
|
|
326
354
|
});
|
|
327
355
|
}
|
|
328
356
|
|
|
329
|
-
const _tmpl$$
|
|
357
|
+
const _tmpl$$q = /*#__PURE__*/template(`<div class="ant-flex ant-flex-col ant-h-full ant-w-24px ant-[border-left:1px_solid_var(--ant-color-border)]"><div class="ant-text-12px ant-flex ant-justify-center ant-items-center ant-h-1/2 ant-cursor-pointer ant-opacity-70 hover:ant-h-100% hover:ant-text-[var(--ant-color-primary)] ant-transition-color ant-transition-height ant-transition-duration-500"><div class="i-ant-design:up-outlined"></div></div><div class="ant-[border-top:1px_solid_var(--ant-color-border)] ant-text-12px ant-flex ant-justify-center ant-items-center ant-h-1/2 ant-cursor-pointer ant-opacity-70 hover:ant-h-100% hover:ant-text-[var(--ant-color-primary)] ant-transition-color ant-transition-height ant-transition-duration-500"><div class="i-ant-design:down-outlined">`);
|
|
330
358
|
const isEmptyValue = value => isNil(value) || value === '';
|
|
331
359
|
const InputNumber = _props => {
|
|
332
360
|
const props = mergeProps({
|
|
@@ -369,7 +397,7 @@ const InputNumber = _props => {
|
|
|
369
397
|
return createComponent(CommonInput, mergeProps$1(inputProps, {
|
|
370
398
|
get actions() {
|
|
371
399
|
return (() => {
|
|
372
|
-
const _el$ = _tmpl$$
|
|
400
|
+
const _el$ = _tmpl$$q(),
|
|
373
401
|
_el$2 = _el$.firstChild,
|
|
374
402
|
_el$3 = _el$2.nextSibling;
|
|
375
403
|
_el$2.$$click = up;
|
|
@@ -411,12 +439,12 @@ const InputNumber = _props => {
|
|
|
411
439
|
};
|
|
412
440
|
delegateEvents(["click"]);
|
|
413
441
|
|
|
414
|
-
const _tmpl$$
|
|
415
|
-
_tmpl$2$d = /*#__PURE__*/template(`<div class="ant-flex ant-relative"><div class="ant-w-[10px] ant-h-[10px] ant-border-solid ant-border-width-[3px] ant-border-[var(--
|
|
442
|
+
const _tmpl$$p = /*#__PURE__*/template(`<div class="ant-flex ant-flex-col ant-gap-[16px]">`),
|
|
443
|
+
_tmpl$2$d = /*#__PURE__*/template(`<div class="ant-flex ant-relative"><div class="ant-w-[10px] ant-h-[10px] ant-border-solid ant-border-width-[3px] ant-border-[var(--ant-color-primary)] ant-bg-white ant-rounded-[50%] ant-mt-[8px]"></div><div class="ant-ml-[8px]">`),
|
|
416
444
|
_tmpl$3$9 = /*#__PURE__*/template(`<div class="ant-absolute ant-top-[8px] ant-bottom-[-24px] ant-left-[4px] ant-w-[2px] ant-bg-[rgba(5,5,5,.06)]">`);
|
|
417
445
|
const Timeline = props => {
|
|
418
446
|
return (() => {
|
|
419
|
-
const _el$ = _tmpl$$
|
|
447
|
+
const _el$ = _tmpl$$p();
|
|
420
448
|
insert(_el$, createComponent(For, {
|
|
421
449
|
get each() {
|
|
422
450
|
return props.items;
|
|
@@ -437,7 +465,7 @@ const Timeline = props => {
|
|
|
437
465
|
})();
|
|
438
466
|
};
|
|
439
467
|
|
|
440
|
-
const _tmpl$$
|
|
468
|
+
const _tmpl$$o = /*#__PURE__*/template(`<span class="i-ant-design:close-outlined">`),
|
|
441
469
|
_tmpl$2$c = /*#__PURE__*/template(`<div class="ant-flex ant-gap-8px ant-justify-end">`),
|
|
442
470
|
_tmpl$3$8 = /*#__PURE__*/template(`<div class="ant-mt-12px">`),
|
|
443
471
|
_tmpl$4$5 = /*#__PURE__*/template(`<div><div class="ant-text-[rgba(0,0,0,.88)] ant-text-16px ant-font-600 ant-mb-8px"></div><div class="ant-grow">`),
|
|
@@ -469,14 +497,15 @@ function Modal(_props) {
|
|
|
469
497
|
};
|
|
470
498
|
},
|
|
471
499
|
close() {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
500
|
+
untrack(() => {
|
|
501
|
+
if (props.destroyOnClose) {
|
|
502
|
+
setOpen(false);
|
|
503
|
+
} else {
|
|
504
|
+
setHide(true);
|
|
505
|
+
}
|
|
506
|
+
cleanup();
|
|
507
|
+
props.afterClose?.();
|
|
508
|
+
});
|
|
480
509
|
}
|
|
481
510
|
};
|
|
482
511
|
untrack(() => {
|
|
@@ -526,7 +555,7 @@ function Modal(_props) {
|
|
|
526
555
|
instance.close();
|
|
527
556
|
},
|
|
528
557
|
get children() {
|
|
529
|
-
return _tmpl$$
|
|
558
|
+
return _tmpl$$o();
|
|
530
559
|
}
|
|
531
560
|
});
|
|
532
561
|
}
|
|
@@ -640,31 +669,6 @@ Modal.warning = props => {
|
|
|
640
669
|
};
|
|
641
670
|
delegateEvents(["click"]);
|
|
642
671
|
|
|
643
|
-
function styleInject(css, ref) {
|
|
644
|
-
if (ref === void 0) ref = {};
|
|
645
|
-
var insertAt = ref.insertAt;
|
|
646
|
-
if (!css || typeof document === 'undefined') {
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
650
|
-
var style = document.createElement('style');
|
|
651
|
-
style.type = 'text/css';
|
|
652
|
-
if (insertAt === 'top') {
|
|
653
|
-
if (head.firstChild) {
|
|
654
|
-
head.insertBefore(style, head.firstChild);
|
|
655
|
-
} else {
|
|
656
|
-
head.appendChild(style);
|
|
657
|
-
}
|
|
658
|
-
} else {
|
|
659
|
-
head.appendChild(style);
|
|
660
|
-
}
|
|
661
|
-
if (style.styleSheet) {
|
|
662
|
-
style.styleSheet.cssText = css;
|
|
663
|
-
} else {
|
|
664
|
-
style.appendChild(document.createTextNode(css));
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
|
|
668
672
|
var css_248z = ".ant-drawer-content-right {\n top: 0;\n bottom: 0;\n right: 0;\n}\n\n.ant-drawer-content-left {\n top: 0;\n bottom: 0;\n left: 0;\n}\n\n.ant-drawer-content-top {\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ant-drawer-content-bottom {\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.ant-drawer-fade-enter-active,\n.ant-drawer-fade-exit-active {\n transition: opacity 0.3s;\n}\n.ant-drawer-fade-enter-active .ant-drawer-content,\n.ant-drawer-fade-exit-active .ant-drawer-content {\n transition: transform 0.3s;\n}\n\n.ant-drawer-fade-enter,\n.ant-drawer-fade-exit-to {\n opacity: 0;\n}\n.ant-drawer-fade-enter .ant-drawer-content-right,\n.ant-drawer-fade-exit-to .ant-drawer-content-right {\n transform: translateX(100%);\n}\n.ant-drawer-fade-enter .ant-drawer-content-left,\n.ant-drawer-fade-exit-to .ant-drawer-content-left {\n transform: translateX(-100%);\n}\n.ant-drawer-fade-enter .ant-drawer-content-top,\n.ant-drawer-fade-exit-to .ant-drawer-content-top {\n transform: translateY(-100%);\n}\n.ant-drawer-fade-enter .ant-drawer-content-bottom,\n.ant-drawer-fade-exit-to .ant-drawer-content-bottom {\n transform: translateY(100%);\n}";
|
|
669
673
|
styleInject(css_248z);
|
|
670
674
|
|
|
@@ -704,7 +708,7 @@ function createTransition(target, when, className) {
|
|
|
704
708
|
}));
|
|
705
709
|
}
|
|
706
710
|
|
|
707
|
-
const _tmpl$$
|
|
711
|
+
const _tmpl$$n = /*#__PURE__*/template(`<span class="i-ant-design:close-outlined">`),
|
|
708
712
|
_tmpl$2$b = /*#__PURE__*/template(`<div><div><div class="ant-px-[var(--ant-padding-lg)] ant-py-[var(--ant-padding)] ant-flex ant-justify-between ant-items-center ant-[border-bottom:var(--ant-line-width)_solid_var(--ant-color-split)]"><div class="ant-flex ant-items-center"><span class="ant-text-[var(--ant-color-text)] ant-text-size-[var(--ant-font-size-lg)] ant-[font-weight:var(--ant-font-weight-strong)] ant-leading-[var(--ant-line-height-lg)]"></span></div><div></div></div><div class="ant-p-[var(--ant-padding-lg)] ant-overflow-auto">`);
|
|
709
713
|
const Drawer = _props => {
|
|
710
714
|
const props = mergeProps({
|
|
@@ -800,13 +804,12 @@ const Drawer = _props => {
|
|
|
800
804
|
get children() {
|
|
801
805
|
return createComponent(Button, {
|
|
802
806
|
type: "text",
|
|
803
|
-
|
|
804
|
-
"class": "ant-mr-[var(--ant-margin-sm)] ant-text-size-[var(--ant-font-size-lg)] ant-h-[var(--ant-font-size-lg)] ant-leading-[var(--ant-font-size-lg)] hover:!ant-bg-transparent !ant-text-[var(--ant-color-icon)] hover:!ant-text-[var(--ant-color-icon-hover)]",
|
|
807
|
+
"class": "ant-mr-[var(--ant-margin-sm)] ant-text-size-[var(--ant-font-size-lg)] ant-h-[var(--ant-font-size-lg)] ant-leading-[var(--ant-font-size-lg)] hover:!ant-bg-transparent !ant-text-[var(--ant-color-icon)] hover:!ant-text-[var(--ant-color-icon-hover)] !ant-p-0",
|
|
805
808
|
onClick: () => {
|
|
806
809
|
instance?.close();
|
|
807
810
|
},
|
|
808
811
|
get children() {
|
|
809
|
-
return _tmpl$$
|
|
812
|
+
return _tmpl$$n();
|
|
810
813
|
}
|
|
811
814
|
});
|
|
812
815
|
}
|
|
@@ -857,10 +860,10 @@ const Drawer = _props => {
|
|
|
857
860
|
};
|
|
858
861
|
delegateEvents(["click"]);
|
|
859
862
|
|
|
860
|
-
const _tmpl$$
|
|
863
|
+
const _tmpl$$m = /*#__PURE__*/template(`<div role="ReactToSolid">`);
|
|
861
864
|
function ReactToSolid(props) {
|
|
862
865
|
let root;
|
|
863
|
-
const rootEle = createMemo(() => props.container ?? _tmpl$$
|
|
866
|
+
const rootEle = createMemo(() => props.container ?? _tmpl$$m());
|
|
864
867
|
onMount(() => {
|
|
865
868
|
root = createRoot(rootEle());
|
|
866
869
|
onCleanup(() => {
|
|
@@ -1132,22 +1135,6 @@ function replaceClassName(C) {
|
|
|
1132
1135
|
return createComponent(C, mergeProps$1(props));
|
|
1133
1136
|
};
|
|
1134
1137
|
}
|
|
1135
|
-
/**
|
|
1136
|
-
* 将组件 props 中的 children 替换为 JSXElement
|
|
1137
|
-
* @param C
|
|
1138
|
-
* @returns
|
|
1139
|
-
*/
|
|
1140
|
-
function replaceChildren(C) {
|
|
1141
|
-
return function (_props) {
|
|
1142
|
-
const props = createMemo(() => {
|
|
1143
|
-
return {
|
|
1144
|
-
..._props,
|
|
1145
|
-
children: solidToReact(_props.children)
|
|
1146
|
-
};
|
|
1147
|
-
});
|
|
1148
|
-
return createComponent(C, mergeProps$1(props));
|
|
1149
|
-
};
|
|
1150
|
-
}
|
|
1151
1138
|
function reactToSolidComponent(component, container) {
|
|
1152
1139
|
return function (props) {
|
|
1153
1140
|
return createComponent(ReactToSolid, {
|
|
@@ -1201,7 +1188,7 @@ function useClickAway(onClickAway, target) {
|
|
|
1201
1188
|
});
|
|
1202
1189
|
}
|
|
1203
1190
|
|
|
1204
|
-
const _tmpl$$
|
|
1191
|
+
const _tmpl$$l = /*#__PURE__*/template(`<div>`);
|
|
1205
1192
|
const Content = props => {
|
|
1206
1193
|
return createComponent(Show, {
|
|
1207
1194
|
get when() {
|
|
@@ -1439,7 +1426,7 @@ const Tooltip = _props => {
|
|
|
1439
1426
|
get children() {
|
|
1440
1427
|
return createComponent(Portal, {
|
|
1441
1428
|
get children() {
|
|
1442
|
-
const _el$ = _tmpl$$
|
|
1429
|
+
const _el$ = _tmpl$$l();
|
|
1443
1430
|
_el$.$$click = e => {
|
|
1444
1431
|
e.stopPropagation();
|
|
1445
1432
|
};
|
|
@@ -1456,7 +1443,7 @@ const Tooltip = _props => {
|
|
|
1456
1443
|
return props.arrow;
|
|
1457
1444
|
},
|
|
1458
1445
|
get children() {
|
|
1459
|
-
const _el$2 = _tmpl$$
|
|
1446
|
+
const _el$2 = _tmpl$$l();
|
|
1460
1447
|
effect(_p$ => {
|
|
1461
1448
|
const _v$ = cs('ant-w-8px ant-h-8px ant-absolute ant-border-solid ant-border-4px ant-border-transparent'),
|
|
1462
1449
|
_v$2 = {
|
|
@@ -1494,7 +1481,7 @@ const Tooltip = _props => {
|
|
|
1494
1481
|
};
|
|
1495
1482
|
delegateEvents(["click"]);
|
|
1496
1483
|
|
|
1497
|
-
const _tmpl$$
|
|
1484
|
+
const _tmpl$$k = /*#__PURE__*/template(`<div>`),
|
|
1498
1485
|
_tmpl$2$a = /*#__PURE__*/template(`<span class="i-ant-design:close-circle-filled ant-cursor-pointer ant-text-[var(--ant-clear-color)] hover:ant-text-[var(--ant-clear-color-hover)]">`),
|
|
1499
1486
|
_tmpl$3$7 = /*#__PURE__*/template(`<div tabindex="0"><div class="ant-relative ant-h-full"><div class="ant-absolute ant-top-0 ant-bottom-0 ant-right-0">`),
|
|
1500
1487
|
_tmpl$4$4 = /*#__PURE__*/template(`<div class="ant-bg-white ant-w-200px">`),
|
|
@@ -1529,13 +1516,13 @@ const Select = props => {
|
|
|
1529
1516
|
return props.options;
|
|
1530
1517
|
},
|
|
1531
1518
|
children: item => (() => {
|
|
1532
|
-
const _el$7 = _tmpl$$
|
|
1519
|
+
const _el$7 = _tmpl$$k();
|
|
1533
1520
|
_el$7.$$click = () => {
|
|
1534
1521
|
setValue(item.value);
|
|
1535
1522
|
close();
|
|
1536
1523
|
};
|
|
1537
1524
|
insert(_el$7, () => item.label);
|
|
1538
|
-
effect(() => className(_el$7, cs('ant-box-content ant-px-12px ant-py-5px ant-h-22px ant-leading-22px hover:ant-bg-[var(--hover-bg-color)]', selectedValue(item.value) ? '!ant-bg-[var(--
|
|
1525
|
+
effect(() => className(_el$7, cs('ant-box-content ant-px-12px ant-py-5px ant-h-22px ant-leading-22px hover:ant-bg-[var(--hover-bg-color)]', selectedValue(item.value) ? '!ant-bg-[var(--ant-select-option-selected-bg)]' : '')));
|
|
1539
1526
|
return _el$7;
|
|
1540
1527
|
})()
|
|
1541
1528
|
}));
|
|
@@ -1570,7 +1557,7 @@ const Select = props => {
|
|
|
1570
1557
|
})();
|
|
1571
1558
|
},
|
|
1572
1559
|
get children() {
|
|
1573
|
-
const _el$3 = _tmpl$$
|
|
1560
|
+
const _el$3 = _tmpl$$k();
|
|
1574
1561
|
insert(_el$3, () => selectedOption().label ?? value());
|
|
1575
1562
|
return _el$3;
|
|
1576
1563
|
}
|
|
@@ -1591,14 +1578,14 @@ const Select = props => {
|
|
|
1591
1578
|
return _el$5;
|
|
1592
1579
|
}
|
|
1593
1580
|
}));
|
|
1594
|
-
effect(() => className(_el$, cs('ant-h-32px ant-leading-32px ant-rounded-6px ant-[border:1px_solid_var(--ant-color-border)] ant-px-11px focus:ant-[border-color:var(--
|
|
1581
|
+
effect(() => className(_el$, cs('ant-h-32px ant-leading-32px ant-rounded-6px ant-[border:1px_solid_var(--ant-color-border)] ant-px-11px focus:ant-[border-color:var(--ant-color-primary)]', props.class)));
|
|
1595
1582
|
return _el$;
|
|
1596
1583
|
}
|
|
1597
1584
|
});
|
|
1598
1585
|
};
|
|
1599
1586
|
delegateEvents(["click"]);
|
|
1600
1587
|
|
|
1601
|
-
const _tmpl$$
|
|
1588
|
+
const _tmpl$$j = /*#__PURE__*/template(`<span class="i-ant-design:minus-square-outlined">`),
|
|
1602
1589
|
_tmpl$2$9 = /*#__PURE__*/template(`<div><div class="flex-shrink-0" role="indent"></div><div class="ant-flex-shrink-0 ant-w-24px ant-h-24px ant-flex ant-items-center ant-justify-center"><span class="i-ant-design:holder-outlined"></span></div><div></div><div>`),
|
|
1603
1590
|
_tmpl$3$6 = /*#__PURE__*/template(`<span class="ant-inline-block ant-w-24px">`),
|
|
1604
1591
|
_tmpl$4$3 = /*#__PURE__*/template(`<span class="i-ant-design:plus-square-outlined">`);
|
|
@@ -1679,7 +1666,7 @@ function SingleLevelTree(props) {
|
|
|
1679
1666
|
})();
|
|
1680
1667
|
},
|
|
1681
1668
|
get children() {
|
|
1682
|
-
const _el$5 = _tmpl$$
|
|
1669
|
+
const _el$5 = _tmpl$$j();
|
|
1683
1670
|
_el$5.$$click = setExpanded;
|
|
1684
1671
|
_el$5.$$clickData = false;
|
|
1685
1672
|
return _el$5;
|
|
@@ -1693,9 +1680,9 @@ function SingleLevelTree(props) {
|
|
|
1693
1680
|
indexes
|
|
1694
1681
|
}));
|
|
1695
1682
|
effect(_p$ => {
|
|
1696
|
-
const _v$ = cs('ant-flex ant-items-center ant-h-28px ant-pb-4px', isDraggable(item()) && 'ant-[border:1px_solid_var(--
|
|
1683
|
+
const _v$ = cs('ant-flex ant-items-center ant-h-28px ant-pb-4px', isDraggable(item()) && 'ant-[border:1px_solid_var(--ant-color-primary)] ant-bg-white', draggableNode() && 'child[]:ant-pointer-events-none'),
|
|
1697
1684
|
_v$2 = cs('ant-flex-shrink-0 ant-w-24px ant-h-24px ant-flex ant-items-center ant-justify-center ant-cursor-pointer', isEmpty(props.children(item())) && 'opacity-0'),
|
|
1698
|
-
_v$3 = cs('ant-h-full ant-leading-24px hover:ant-bg-[var(--hover-bg-color)] ant-rounded-1 ant-px-1 ant-cursor-pointer ant-relative', props.blockNode && 'w-full', selectedNodes()?.includes(item()) && '!ant-bg-[var(--
|
|
1685
|
+
_v$3 = cs('ant-h-full ant-leading-24px hover:ant-bg-[var(--hover-bg-color)] ant-rounded-1 ant-px-1 ant-cursor-pointer ant-relative', props.blockNode && 'w-full', selectedNodes()?.includes(item()) && '!ant-bg-[var(--ant-tree-node-selected-bg)]', isTarget(item()) && "before:ant-content-[''] before:ant-inline-block before:ant-w-8px before:ant-h-8px before:ant-absolute before:ant-bottom-0 before:ant-left-0 before:-ant-translate-x-full before:ant-translate-y-1/2 before:ant-rounded-1/2 before:ant-[border:2px_solid_var(--ant-color-primary)] after:ant-content-[''] after:ant-inline-block after:ant-h-2px after:ant-absolute after:ant-left-0 after:ant-right-0 after:ant-bottom--1px after:ant-bg-[var(--ant-color-primary)]");
|
|
1699
1686
|
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
1700
1687
|
_v$2 !== _p$._v$2 && className(_el$4, _p$._v$2 = _v$2);
|
|
1701
1688
|
_v$3 !== _p$._v$3 && className(_el$6, _p$._v$3 = _v$3);
|
|
@@ -1790,7 +1777,7 @@ function Tree(props) {
|
|
|
1790
1777
|
}
|
|
1791
1778
|
delegateEvents(["click"]);
|
|
1792
1779
|
|
|
1793
|
-
const _tmpl$$
|
|
1780
|
+
const _tmpl$$i = /*#__PURE__*/template(`<div class="ant-mb-8px ant-flex ant-items-center"><span class="ant-text-[rgba(0,0,0,0.88)] ant-font-600">`),
|
|
1794
1781
|
_tmpl$2$8 = /*#__PURE__*/template(`<div><div class="ant-text-[rgba(0,0,0,0.88)]">`);
|
|
1795
1782
|
const Popover = props => {
|
|
1796
1783
|
return createComponent(Tooltip, mergeProps$1({
|
|
@@ -1804,7 +1791,7 @@ const Popover = props => {
|
|
|
1804
1791
|
return props.title;
|
|
1805
1792
|
},
|
|
1806
1793
|
get children() {
|
|
1807
|
-
const _el$2 = _tmpl$$
|
|
1794
|
+
const _el$2 = _tmpl$$i(),
|
|
1808
1795
|
_el$3 = _el$2.firstChild;
|
|
1809
1796
|
insert(_el$3, () => props.title);
|
|
1810
1797
|
return _el$2;
|
|
@@ -1823,16 +1810,16 @@ const Popover = props => {
|
|
|
1823
1810
|
|
|
1824
1811
|
var ColorPicker = reactToSolidComponent(ColorPicker$1);
|
|
1825
1812
|
|
|
1826
|
-
const _tmpl$$
|
|
1813
|
+
const _tmpl$$h = /*#__PURE__*/template(`<div class="ant-text-center ant-px-32px ant-py-48px"><div class="ant-mb-24px"><span></span></div><div class="ant-my-8px ant-text-[rgba(0,0,0,.88)] ant-text-24px"></div><div class="ant-text-[rgba(0,0,0,.45)] ant-text-14px"></div><div class="ant-mt-24px"></div><div class="ant-mt-24px">`);
|
|
1827
1814
|
const statusIconMap = {
|
|
1828
1815
|
success: 'ant-text-#52c41a i-ant-design:check-circle-filled',
|
|
1829
|
-
info: 'ant-text-[var(--
|
|
1816
|
+
info: 'ant-text-[var(--ant-color-primary)] i-ant-design:exclamation-circle-filled',
|
|
1830
1817
|
warning: 'ant-text-#faad14 i-ant-design:warning-filled',
|
|
1831
1818
|
error: 'ant-text-#ff4d4f i-ant-design:close-circle-filled'
|
|
1832
1819
|
};
|
|
1833
1820
|
const Result = props => {
|
|
1834
1821
|
return (() => {
|
|
1835
|
-
const _el$ = _tmpl$$
|
|
1822
|
+
const _el$ = _tmpl$$h(),
|
|
1836
1823
|
_el$2 = _el$.firstChild,
|
|
1837
1824
|
_el$3 = _el$2.firstChild,
|
|
1838
1825
|
_el$4 = _el$2.nextSibling,
|
|
@@ -1848,17 +1835,20 @@ const Result = props => {
|
|
|
1848
1835
|
})();
|
|
1849
1836
|
};
|
|
1850
1837
|
|
|
1851
|
-
const _tmpl$$
|
|
1838
|
+
const _tmpl$$g = /*#__PURE__*/template(`<span class="i-ant-design:check-circle-filled ant-text-[var(--ant-color-success)]">`),
|
|
1852
1839
|
_tmpl$2$7 = /*#__PURE__*/template(`<span class="i-ant-design:close-circle-filled ant-text-[var(--ant-color-error)]">`),
|
|
1853
1840
|
_tmpl$3$5 = /*#__PURE__*/template(`<span class="ant-shrink-0 ant-min-w-40px ant-ml-8px ant-text-center">`),
|
|
1854
1841
|
_tmpl$4$2 = /*#__PURE__*/template(`<div class="ant-flex ant-items-center"><div>`);
|
|
1855
1842
|
const Progress = _props => {
|
|
1856
1843
|
const props = mergeProps({
|
|
1857
1844
|
percent: 0,
|
|
1858
|
-
status: 'default',
|
|
1859
1845
|
height: 8,
|
|
1860
1846
|
showInfo: true
|
|
1861
1847
|
}, _props);
|
|
1848
|
+
const status = createMemo(() => {
|
|
1849
|
+
if (props.status) return props.status;
|
|
1850
|
+
return props.percent >= 100 ? 'success' : 'normal';
|
|
1851
|
+
});
|
|
1862
1852
|
return (() => {
|
|
1863
1853
|
const _el$ = _tmpl$4$2(),
|
|
1864
1854
|
_el$2 = _el$.firstChild;
|
|
@@ -1876,14 +1866,14 @@ const Progress = _props => {
|
|
|
1876
1866
|
get children() {
|
|
1877
1867
|
return [createComponent(Match, {
|
|
1878
1868
|
get when() {
|
|
1879
|
-
return
|
|
1869
|
+
return status() === 'success';
|
|
1880
1870
|
},
|
|
1881
1871
|
get children() {
|
|
1882
|
-
return _tmpl$$
|
|
1872
|
+
return _tmpl$$g();
|
|
1883
1873
|
}
|
|
1884
1874
|
}), createComponent(Match, {
|
|
1885
1875
|
get when() {
|
|
1886
|
-
return
|
|
1876
|
+
return status() === 'error';
|
|
1887
1877
|
},
|
|
1888
1878
|
get children() {
|
|
1889
1879
|
return _tmpl$2$7();
|
|
@@ -1895,26 +1885,33 @@ const Progress = _props => {
|
|
|
1895
1885
|
}
|
|
1896
1886
|
}), null);
|
|
1897
1887
|
effect(_p$ => {
|
|
1898
|
-
const _v$ = cs('ant-w-full ant-bg-[var(--ant-progress-remaining-color)]', 'before:ant-content-empty before:ant-block before:ant-bg-[var(--
|
|
1888
|
+
const _v$ = cs('ant-w-full ant-bg-[var(--ant-progress-remaining-color)]', 'before:ant-content-empty before:ant-block before:ant-bg-[var(--color)] before:ant-w-[var(--percent)] before:ant-h-full before:ant-rounded-inherit'),
|
|
1899
1889
|
_v$2 = `${props.height}px`,
|
|
1900
1890
|
_v$3 = `${props.height / 2}px`,
|
|
1901
|
-
_v$4 = `${props.percent}
|
|
1891
|
+
_v$4 = `${props.percent}%`,
|
|
1892
|
+
_v$5 = {
|
|
1893
|
+
normal: 'var(--ant-color-primary)',
|
|
1894
|
+
success: 'var(--ant-color-success)',
|
|
1895
|
+
error: 'var(--ant-color-error)'
|
|
1896
|
+
}[status()];
|
|
1902
1897
|
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
1903
1898
|
_v$2 !== _p$._v$2 && ((_p$._v$2 = _v$2) != null ? _el$2.style.setProperty("height", _v$2) : _el$2.style.removeProperty("height"));
|
|
1904
1899
|
_v$3 !== _p$._v$3 && ((_p$._v$3 = _v$3) != null ? _el$2.style.setProperty("border-radius", _v$3) : _el$2.style.removeProperty("border-radius"));
|
|
1905
1900
|
_v$4 !== _p$._v$4 && ((_p$._v$4 = _v$4) != null ? _el$2.style.setProperty("--percent", _v$4) : _el$2.style.removeProperty("--percent"));
|
|
1901
|
+
_v$5 !== _p$._v$5 && ((_p$._v$5 = _v$5) != null ? _el$2.style.setProperty("--color", _v$5) : _el$2.style.removeProperty("--color"));
|
|
1906
1902
|
return _p$;
|
|
1907
1903
|
}, {
|
|
1908
1904
|
_v$: undefined,
|
|
1909
1905
|
_v$2: undefined,
|
|
1910
1906
|
_v$3: undefined,
|
|
1911
|
-
_v$4: undefined
|
|
1907
|
+
_v$4: undefined,
|
|
1908
|
+
_v$5: undefined
|
|
1912
1909
|
});
|
|
1913
1910
|
return _el$;
|
|
1914
1911
|
})();
|
|
1915
1912
|
};
|
|
1916
1913
|
|
|
1917
|
-
const _tmpl$$
|
|
1914
|
+
const _tmpl$$f = /*#__PURE__*/template(`<div>`),
|
|
1918
1915
|
_tmpl$2$6 = /*#__PURE__*/template(`<div><div>`);
|
|
1919
1916
|
const unWarpValue = value => typeof value === 'object' ? value.value : value;
|
|
1920
1917
|
const Segmented = props => {
|
|
@@ -1927,7 +1924,7 @@ const Segmented = props => {
|
|
|
1927
1924
|
return typeof v === 'object' ? v.disabled : false;
|
|
1928
1925
|
};
|
|
1929
1926
|
return (() => {
|
|
1930
|
-
const _el$ = _tmpl$$
|
|
1927
|
+
const _el$ = _tmpl$$f();
|
|
1931
1928
|
insert(_el$, createComponent(For, {
|
|
1932
1929
|
get each() {
|
|
1933
1930
|
return props.options;
|
|
@@ -1979,7 +1976,7 @@ const Segmented = props => {
|
|
|
1979
1976
|
};
|
|
1980
1977
|
delegateEvents(["click"]);
|
|
1981
1978
|
|
|
1982
|
-
const _tmpl$$
|
|
1979
|
+
const _tmpl$$e = /*#__PURE__*/template(`<div><div role="selected-bar" class="ant-absolute ant-bottom-0 ant-bg-[var(--ant-color-primary)] ant-h-2px ant-transition-left">`),
|
|
1983
1980
|
_tmpl$2$5 = /*#__PURE__*/template(`<div><div>`),
|
|
1984
1981
|
_tmpl$3$4 = /*#__PURE__*/template(`<div>`);
|
|
1985
1982
|
const Tabs = _props => {
|
|
@@ -2023,7 +2020,7 @@ const Tabs = _props => {
|
|
|
2023
2020
|
return props.type === 'line';
|
|
2024
2021
|
},
|
|
2025
2022
|
get children() {
|
|
2026
|
-
const _el$2 = _tmpl$$
|
|
2023
|
+
const _el$2 = _tmpl$$e(),
|
|
2027
2024
|
_el$3 = _el$2.firstChild;
|
|
2028
2025
|
const _ref$ = nav;
|
|
2029
2026
|
typeof _ref$ === "function" ? use(_ref$, _el$2) : nav = _el$2;
|
|
@@ -2038,7 +2035,7 @@ const Tabs = _props => {
|
|
|
2038
2035
|
updateSelectedBarStyle();
|
|
2039
2036
|
};
|
|
2040
2037
|
insert(_el$5, () => unwrapStringOrJSXElement(item.label));
|
|
2041
|
-
effect(() => className(_el$5, cs('ant-py-12px ant-cursor-pointer', props.navItemClass, isSelectedItem(item.key) && 'ant-text-[var(--
|
|
2038
|
+
effect(() => className(_el$5, cs('ant-py-12px ant-cursor-pointer', props.navItemClass, isSelectedItem(item.key) && 'ant-text-[var(--ant-color-primary)] selected')));
|
|
2042
2039
|
return _el$5;
|
|
2043
2040
|
})()
|
|
2044
2041
|
}), _el$3);
|
|
@@ -2089,7 +2086,7 @@ const Tabs = _props => {
|
|
|
2089
2086
|
};
|
|
2090
2087
|
delegateEvents(["click"]);
|
|
2091
2088
|
|
|
2092
|
-
const _tmpl$$
|
|
2089
|
+
const _tmpl$$d = /*#__PURE__*/template(`<div><div class="ant-mb-8px ant-flex ant-items-center"><span class="i-ant-design:exclamation-circle-fill ant-text-#faad14"></span><span class="ant-ml-8px ant-text-[rgba(0,0,0,0.88)] ant-font-600"></span></div><div class="ant-ml-22px ant-mb-8px ant-text-[rgba(0,0,0,0.88)]"></div><div class="ant-text-right">`);
|
|
2093
2090
|
const Popconfirm = props => {
|
|
2094
2091
|
const mergedProps = mergeProps({
|
|
2095
2092
|
okText: '确定',
|
|
@@ -2106,7 +2103,7 @@ const Popconfirm = props => {
|
|
|
2106
2103
|
onOpenChange: setOpen,
|
|
2107
2104
|
get content() {
|
|
2108
2105
|
return (() => {
|
|
2109
|
-
const _el$ = _tmpl$$
|
|
2106
|
+
const _el$ = _tmpl$$d(),
|
|
2110
2107
|
_el$2 = _el$.firstChild,
|
|
2111
2108
|
_el$3 = _el$2.firstChild,
|
|
2112
2109
|
_el$4 = _el$3.nextSibling,
|
|
@@ -2147,7 +2144,96 @@ const Popconfirm = props => {
|
|
|
2147
2144
|
}));
|
|
2148
2145
|
};
|
|
2149
2146
|
|
|
2150
|
-
const
|
|
2147
|
+
const _tmpl$$c = /*#__PURE__*/template(`<span><input class="hidden" type="file">`);
|
|
2148
|
+
function request(file, customRequest) {
|
|
2149
|
+
const id = `upload-${nanoid()}`;
|
|
2150
|
+
// eslint-disable-next-line solid/reactivity
|
|
2151
|
+
const uploadFileSignal = createSignal({
|
|
2152
|
+
id,
|
|
2153
|
+
file,
|
|
2154
|
+
name: file.name,
|
|
2155
|
+
type: file.type,
|
|
2156
|
+
size: file.size,
|
|
2157
|
+
status: 'pending',
|
|
2158
|
+
percent: 0
|
|
2159
|
+
});
|
|
2160
|
+
const [, setUploadFile] = uploadFileSignal;
|
|
2161
|
+
customRequest?.({
|
|
2162
|
+
file,
|
|
2163
|
+
onProgress(event) {
|
|
2164
|
+
setUploadFile(value => ({
|
|
2165
|
+
...value,
|
|
2166
|
+
status: 'uploading',
|
|
2167
|
+
percent: event.percent ?? 0
|
|
2168
|
+
}));
|
|
2169
|
+
},
|
|
2170
|
+
onSuccess(response) {
|
|
2171
|
+
setUploadFile(value => ({
|
|
2172
|
+
...value,
|
|
2173
|
+
status: 'finished',
|
|
2174
|
+
response
|
|
2175
|
+
}));
|
|
2176
|
+
},
|
|
2177
|
+
onError() {
|
|
2178
|
+
setUploadFile(value => ({
|
|
2179
|
+
...value,
|
|
2180
|
+
status: 'error'
|
|
2181
|
+
}));
|
|
2182
|
+
}
|
|
2183
|
+
});
|
|
2184
|
+
return uploadFileSignal;
|
|
2185
|
+
}
|
|
2186
|
+
const Upload = _props => {
|
|
2187
|
+
let input;
|
|
2188
|
+
const props = mergeProps({
|
|
2189
|
+
customRequest: ({
|
|
2190
|
+
file,
|
|
2191
|
+
onSuccess,
|
|
2192
|
+
onError
|
|
2193
|
+
}) => {
|
|
2194
|
+
if (!_props.action) return;
|
|
2195
|
+
const formData = new FormData();
|
|
2196
|
+
formData.append('file', file);
|
|
2197
|
+
fetch(_props.action, {
|
|
2198
|
+
method: _props.method ?? 'post',
|
|
2199
|
+
body: formData
|
|
2200
|
+
}).then(onSuccess).catch(onError);
|
|
2201
|
+
}
|
|
2202
|
+
}, _props);
|
|
2203
|
+
return (() => {
|
|
2204
|
+
const _el$ = _tmpl$$c(),
|
|
2205
|
+
_el$2 = _el$.firstChild;
|
|
2206
|
+
_el$.$$click = () => input?.click();
|
|
2207
|
+
insert(_el$, () => props.children, _el$2);
|
|
2208
|
+
_el$2.$$input = e => {
|
|
2209
|
+
const fileList = [];
|
|
2210
|
+
for (const file of e.target.files ?? []) {
|
|
2211
|
+
const uploadFileSignal = request(file, props.customRequest);
|
|
2212
|
+
fileList.push(uploadFileSignal);
|
|
2213
|
+
}
|
|
2214
|
+
props.onAdd?.(fileList);
|
|
2215
|
+
e.target.value = '';
|
|
2216
|
+
};
|
|
2217
|
+
const _ref$ = input;
|
|
2218
|
+
typeof _ref$ === "function" ? use(_ref$, _el$2) : input = _el$2;
|
|
2219
|
+
effect(_p$ => {
|
|
2220
|
+
const _v$ = props.class,
|
|
2221
|
+
_v$2 = props.accept,
|
|
2222
|
+
_v$3 = props.multiple;
|
|
2223
|
+
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
2224
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$2, "accept", _p$._v$2 = _v$2);
|
|
2225
|
+
_v$3 !== _p$._v$3 && (_el$2.multiple = _p$._v$3 = _v$3);
|
|
2226
|
+
return _p$;
|
|
2227
|
+
}, {
|
|
2228
|
+
_v$: undefined,
|
|
2229
|
+
_v$2: undefined,
|
|
2230
|
+
_v$3: undefined
|
|
2231
|
+
});
|
|
2232
|
+
return _el$;
|
|
2233
|
+
})();
|
|
2234
|
+
};
|
|
2235
|
+
Upload.request = request;
|
|
2236
|
+
delegateEvents(["click", "input"]);
|
|
2151
2237
|
|
|
2152
2238
|
const _tmpl$$b = /*#__PURE__*/template(`<label class="ant-inline-flex ant-gap-4px ant-cursor-pointer ant-inline-flex ant-items-center"><span><input class="ant-m-0 ant-hidden" type="radio">`),
|
|
2153
2239
|
_tmpl$2$4 = /*#__PURE__*/template(`<label><input class="ant-w-0 ant-h-0" type="radio">`),
|
|
@@ -2168,7 +2254,7 @@ const Radio = props => {
|
|
|
2168
2254
|
untrack(() => props.onChange?.(e));
|
|
2169
2255
|
};
|
|
2170
2256
|
insert(_el$, () => props.children, null);
|
|
2171
|
-
effect(() => className(_el$2, cs('ant-w-16px ant-h-16px ant-rounded-50% ant-[border:1px_solid_var(--ant-color-border)]', checked() && 'ant-[border:5px_solid_var(--
|
|
2257
|
+
effect(() => className(_el$2, cs('ant-w-16px ant-h-16px ant-rounded-50% ant-[border:1px_solid_var(--ant-color-border)]', checked() && 'ant-[border:5px_solid_var(--ant-color-primary)]')));
|
|
2172
2258
|
effect(() => _el$3.checked = checked());
|
|
2173
2259
|
effect(() => _el$3.value = props.value ?? '');
|
|
2174
2260
|
return _el$;
|
|
@@ -2189,7 +2275,7 @@ Radio.Button = props => {
|
|
|
2189
2275
|
untrack(() => props.onChange?.(e));
|
|
2190
2276
|
};
|
|
2191
2277
|
insert(_el$4, () => props.children, null);
|
|
2192
|
-
effect(() => className(_el$4, cs('ant-px-15px ant-[border:1px_solid_rgb(217,217,217)] first:ant-rounded-l-6px last:ant-rounded-r-6px ant-h-32px ant-inline-flex ant-items-center hover:ant-text-[var(--
|
|
2278
|
+
effect(() => className(_el$4, cs('ant-px-15px ant-[border:1px_solid_rgb(217,217,217)] first:ant-rounded-l-6px last:ant-rounded-r-6px ant-h-32px ant-inline-flex ant-items-center hover:ant-text-[var(--ant-color-primary)] not[:last-child]:ant-border-r-transparent ant-cursor-pointer ant-flex-grow ant-justify-center', checked() && 'ant-text-[var(--ant-color-primary)] ant-[border:1px_solid_var(--ant-color-primary)] !ant-border-r-[var(--ant-color-primary)]')));
|
|
2193
2279
|
effect(() => _el$5.checked = checked());
|
|
2194
2280
|
effect(() => _el$5.value = props.value ?? '');
|
|
2195
2281
|
return _el$4;
|
|
@@ -2449,7 +2535,7 @@ const Switch = props => {
|
|
|
2449
2535
|
_el$2 = _el$.firstChild;
|
|
2450
2536
|
_el$.$$click = () => setChecked(c => !c);
|
|
2451
2537
|
effect(_p$ => {
|
|
2452
|
-
const _v$ = cs('ant-w-44px ant-h-22px ant-rounded-100px ant-relative', checked() ? 'ant-bg-[var(--
|
|
2538
|
+
const _v$ = cs('ant-w-44px ant-h-22px ant-rounded-100px ant-relative', checked() ? 'ant-bg-[var(--ant-color-primary)]' : 'ant-bg-[rgba(0,0,0,0.45)]'),
|
|
2453
2539
|
_v$2 = cs('ant-w-18px ant-h-18px ant-rounded-50% ant-bg-white ant-absolute ant-top-1/2 -ant-translate-y-1/2 ant-transition-left', checked() ? 'ant-left-[calc(100%-20px)]' : 'ant-left-2px');
|
|
2454
2540
|
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
2455
2541
|
_v$2 !== _p$._v$2 && className(_el$2, _p$._v$2 = _v$2);
|
|
@@ -2468,9 +2554,12 @@ const Image$1 = replaceClassName(reactToSolidComponent(Skeleton$1.Image));
|
|
|
2468
2554
|
const Skeleton = _Skeleton;
|
|
2469
2555
|
Skeleton.Image = Image$1;
|
|
2470
2556
|
|
|
2471
|
-
const _tmpl$$7 = /*#__PURE__*/template(`<div class="ant-
|
|
2472
|
-
_tmpl$2$2 = /*#__PURE__*/template(`<div
|
|
2473
|
-
const Spin =
|
|
2557
|
+
const _tmpl$$7 = /*#__PURE__*/template(`<div class="ant-flex ant-items-center ant-justify-center ant-bg-[rgba(255,255,255,.5)]"><span class="i-ant-design:loading keyframes-spin ant-[animation:spin_1s_linear_infinite] ant-text-[var(--ant-color-primary)]">`),
|
|
2558
|
+
_tmpl$2$2 = /*#__PURE__*/template(`<div>`);
|
|
2559
|
+
const Spin = _props => {
|
|
2560
|
+
const props = mergeProps({
|
|
2561
|
+
size: 20
|
|
2562
|
+
}, _props);
|
|
2474
2563
|
return (() => {
|
|
2475
2564
|
const _el$ = _tmpl$2$2();
|
|
2476
2565
|
insert(_el$, () => props.children, null);
|
|
@@ -2479,7 +2568,10 @@ const Spin = props => {
|
|
|
2479
2568
|
return props.spinning;
|
|
2480
2569
|
},
|
|
2481
2570
|
get children() {
|
|
2482
|
-
|
|
2571
|
+
const _el$2 = _tmpl$$7(),
|
|
2572
|
+
_el$3 = _el$2.firstChild;
|
|
2573
|
+
effect(() => `${props.size}px` != null ? _el$3.style.setProperty("font-size", `${props.size}px`) : _el$3.style.removeProperty("font-size"));
|
|
2574
|
+
return _el$2;
|
|
2483
2575
|
}
|
|
2484
2576
|
}), null);
|
|
2485
2577
|
return _el$;
|
|
@@ -2517,10 +2609,15 @@ const _tmpl$$3 = /*#__PURE__*/template(`<svg width="184" height="100" viewBox="0
|
|
|
2517
2609
|
const EmptySvg = () => _tmpl$$3();
|
|
2518
2610
|
|
|
2519
2611
|
const _tmpl$$2 = /*#__PURE__*/template(`<div><div class="ant-mb-[var(--ant-margin-xs)] ant-flex ant-justify-center"></div><div class="ant-text-[var(--ant-color-text)] ant-text-center">暂无数据`);
|
|
2520
|
-
const Empty =
|
|
2612
|
+
const Empty = props => {
|
|
2521
2613
|
return (() => {
|
|
2522
2614
|
const _el$ = _tmpl$$2(),
|
|
2523
2615
|
_el$2 = _el$.firstChild;
|
|
2616
|
+
spread(_el$, mergeProps$1(props, {
|
|
2617
|
+
get style() {
|
|
2618
|
+
return props.style;
|
|
2619
|
+
}
|
|
2620
|
+
}), false, true);
|
|
2524
2621
|
insert(_el$2, createComponent(EmptySvg, {}));
|
|
2525
2622
|
return _el$;
|
|
2526
2623
|
})();
|