ant-design-x-vue 1.2.1 → 1.2.2
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/README.md +7 -1
- package/dist/index.umd.js +9 -43
- package/es/attachments/Attachments2.mjs +50 -51
- package/es/attachments/FileList/FileList2.mjs +724 -942
- package/es/attachments/PlaceholderUploader.mjs +30 -27
- package/es/attachments/SilentUploader.mjs +12 -9
- package/es/bubble/Bubble.mjs +36 -36
- package/es/theme/useToken.mjs +54 -310
- package/es/x-provider/hooks/use-x-provider-context.mjs +11 -16
- package/lib/attachments/Attachments2.js +2 -2
- package/lib/attachments/FileList/FileList2.js +4 -4
- package/lib/attachments/PlaceholderUploader.js +1 -1
- package/lib/attachments/SilentUploader.js +1 -1
- package/lib/bubble/Bubble.js +1 -1
- package/lib/theme/useToken.js +1 -35
- package/lib/x-provider/hooks/use-x-provider-context.js +1 -1
- package/package.json +1 -1
- package/typings/attachments/PlaceholderUploader.vue.d.ts +1 -446
- package/typings/attachments/SilentUploader.vue.d.ts +1 -446
- package/typings/bubble/Bubble.vue.d.ts +2 -2
- package/typings/bubble/index.d.ts +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as D, mergeDefaults as x, computed as o, useTemplateRef as $, isVNode as c, createVNode as t, mergeProps as C } from "vue";
|
|
2
2
|
import { c as T } from "./Attachments2.mjs";
|
|
3
|
-
import { useAttachmentContextInject as
|
|
4
|
-
import
|
|
5
|
-
import { Flex as
|
|
6
|
-
const
|
|
3
|
+
import { useAttachmentContextInject as A } from "./context.mjs";
|
|
4
|
+
import b from "../_util/hooks/use-state.mjs";
|
|
5
|
+
import { Flex as N, Typography as s, Upload as U } from "ant-design-vue";
|
|
6
|
+
const L = /* @__PURE__ */ D({
|
|
7
7
|
name: "AXAttachmentsPlaceholderUploader",
|
|
8
8
|
__name: "PlaceholderUploader",
|
|
9
|
-
props:
|
|
9
|
+
props: x({
|
|
10
10
|
prefixCls: null,
|
|
11
11
|
placeholder: null,
|
|
12
12
|
upload: null,
|
|
@@ -18,49 +18,52 @@ const E = /* @__PURE__ */ y({
|
|
|
18
18
|
setup(e, {
|
|
19
19
|
expose: i
|
|
20
20
|
}) {
|
|
21
|
-
const
|
|
21
|
+
const l = `${e.prefixCls}-placeholder`, r = o(() => e.placeholder || {}), u = $("upload-dragger"), d = A(), [p, n] = b(!1), f = () => {
|
|
22
22
|
n(!0);
|
|
23
|
-
}, m = (
|
|
24
|
-
|
|
23
|
+
}, m = (a) => {
|
|
24
|
+
a.currentTarget.contains(a.relatedTarget) || n(!1);
|
|
25
25
|
}, g = () => {
|
|
26
26
|
n(!1);
|
|
27
|
-
}
|
|
27
|
+
}, h = o(() => {
|
|
28
|
+
var a;
|
|
29
|
+
return (a = u.value) == null ? void 0 : a.$el;
|
|
30
|
+
});
|
|
28
31
|
i({
|
|
29
|
-
nativeElement:
|
|
32
|
+
nativeElement: h
|
|
30
33
|
});
|
|
31
|
-
const
|
|
34
|
+
const v = (a) => Array.isArray(a) && a.every(c), y = o(() => c(e.placeholder) || v(e.placeholder) ? e.placeholder : t(N, {
|
|
32
35
|
align: "center",
|
|
33
36
|
justify: "center",
|
|
34
37
|
vertical: !0,
|
|
35
|
-
class: `${
|
|
38
|
+
class: `${l}-inner`
|
|
36
39
|
}, {
|
|
37
|
-
default: () => [
|
|
38
|
-
class: `${
|
|
40
|
+
default: () => [t(s.Text, {
|
|
41
|
+
class: `${l}-icon`
|
|
39
42
|
}, {
|
|
40
43
|
default: () => [r.value.icon]
|
|
41
|
-
}),
|
|
42
|
-
class: `${
|
|
44
|
+
}), t(s.Title, {
|
|
45
|
+
class: `${l}-title`,
|
|
43
46
|
level: 5
|
|
44
47
|
}, {
|
|
45
48
|
default: () => [r.value.title]
|
|
46
|
-
}),
|
|
47
|
-
class: `${
|
|
49
|
+
}), t(s.Text, {
|
|
50
|
+
class: `${l}-description`,
|
|
48
51
|
type: "secondary"
|
|
49
52
|
}, {
|
|
50
53
|
default: () => [r.value.description]
|
|
51
54
|
})]
|
|
52
55
|
}));
|
|
53
|
-
return () =>
|
|
54
|
-
class: T(
|
|
55
|
-
[`${
|
|
56
|
-
[`${
|
|
56
|
+
return () => t("div", {
|
|
57
|
+
class: T(l, {
|
|
58
|
+
[`${l}-drag-in`]: p.value,
|
|
59
|
+
[`${l}-disabled`]: d.value.disabled
|
|
57
60
|
}, e.className),
|
|
58
61
|
onDragenter: f,
|
|
59
62
|
onDragleave: m,
|
|
60
63
|
onDrop: g,
|
|
61
|
-
"aria-hidden":
|
|
64
|
+
"aria-hidden": d.value.disabled,
|
|
62
65
|
style: e.style
|
|
63
|
-
}, [
|
|
66
|
+
}, [t(U.Dragger, C({
|
|
64
67
|
showUploadList: !1
|
|
65
68
|
}, e.upload, {
|
|
66
69
|
ref: "upload-dragger",
|
|
@@ -70,10 +73,10 @@ const E = /* @__PURE__ */ y({
|
|
|
70
73
|
background: "transparent"
|
|
71
74
|
}
|
|
72
75
|
}), {
|
|
73
|
-
default: () => [
|
|
76
|
+
default: () => [y.value]
|
|
74
77
|
})]);
|
|
75
78
|
}
|
|
76
79
|
});
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
L as default
|
|
79
82
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Upload as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as n, useTemplateRef as p, computed as r, createVNode as d, mergeProps as u } from "vue";
|
|
2
|
+
import { Upload as s } from "ant-design-vue";
|
|
3
|
+
const i = /* @__PURE__ */ n({
|
|
4
4
|
name: "AXAttachmentsSilentUploader",
|
|
5
5
|
__name: "SilentUploader",
|
|
6
6
|
props: {
|
|
@@ -9,12 +9,15 @@ const u = /* @__PURE__ */ a({
|
|
|
9
9
|
rootClassName: null
|
|
10
10
|
},
|
|
11
11
|
setup(e, {
|
|
12
|
-
expose:
|
|
12
|
+
expose: o
|
|
13
13
|
}) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
14
|
+
const t = p("upload"), a = r(() => {
|
|
15
|
+
var l;
|
|
16
|
+
return (l = t.value) == null ? void 0 : l.$el;
|
|
17
|
+
});
|
|
18
|
+
return o({
|
|
19
|
+
nativeElement: a
|
|
20
|
+
}), () => d(s, u(e.upload, {
|
|
18
21
|
showUploadList: !1,
|
|
19
22
|
ref: "upload"
|
|
20
23
|
}), {
|
|
@@ -23,5 +26,5 @@ const u = /* @__PURE__ */ a({
|
|
|
23
26
|
}
|
|
24
27
|
});
|
|
25
28
|
export {
|
|
26
|
-
|
|
29
|
+
i as default
|
|
27
30
|
};
|
package/es/bubble/Bubble.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as j, mergeDefaults as D, toRef as
|
|
1
|
+
import { defineComponent as j, mergeDefaults as D, toRef as h, useSlots as H, ref as d, watch as N, unref as k, watchEffect as q, computed as r, createVNode as l, isVNode as z, Fragment as G, toValue as i, mergeProps as J } from "vue";
|
|
2
2
|
import { a as K } from "../attachments/Attachments2.mjs";
|
|
3
3
|
import { Avatar as L } from "ant-design-vue";
|
|
4
4
|
import M from "../_util/hooks/use-x-component-config.mjs";
|
|
@@ -46,36 +46,36 @@ const ce = /* @__PURE__ */ j({
|
|
|
46
46
|
variant: "filled"
|
|
47
47
|
}),
|
|
48
48
|
setup(e, {
|
|
49
|
-
expose:
|
|
49
|
+
expose: x
|
|
50
50
|
}) {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const a = H(),
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
const $ = K(e, ["prefixCls", "rootClassName", "classNames", "styles", "avatar", "placement", "loading", "loadingRender", "typing", "content", "messageRender", "variant", "shape", "onTypingComplete", "header", "footer"]);
|
|
52
|
+
h(e, "content"), h(e, "prefixCls");
|
|
53
|
+
const a = H(), g = d(e.content);
|
|
54
|
+
N(() => e.content, () => {
|
|
55
|
+
g.value = e.content;
|
|
56
56
|
});
|
|
57
57
|
const {
|
|
58
58
|
onUpdate: c
|
|
59
|
-
} = k(U()),
|
|
60
|
-
direction:
|
|
61
|
-
getPrefixCls:
|
|
62
|
-
} = O(), t =
|
|
63
|
-
|
|
59
|
+
} = k(U()), y = d(null), {
|
|
60
|
+
direction: b,
|
|
61
|
+
getPrefixCls: R
|
|
62
|
+
} = O(), t = R("bubble", e.prefixCls), n = M("bubble"), [T, P, S, C] = W(() => e.typing), [s, u] = Q(g, T, P, S), m = d(!1);
|
|
63
|
+
N(s, () => {
|
|
64
64
|
c == null || c();
|
|
65
65
|
}), q(() => {
|
|
66
|
-
var
|
|
67
|
-
!u.value && !e.loading ? m.value || (m.value = !0, (
|
|
66
|
+
var o;
|
|
67
|
+
!u.value && !e.loading ? m.value || (m.value = !0, (o = e.onTypingComplete) == null || o.call(e)) : m.value = !1;
|
|
68
68
|
});
|
|
69
|
-
const [w, B
|
|
70
|
-
[`${t}-rtl`]:
|
|
69
|
+
const [V, w, B] = Z(() => t), E = r(() => [t, e.rootClassName, n.value.className, w.value, B, `${t}-${e.placement}`, {
|
|
70
|
+
[`${t}-rtl`]: b.value === "rtl"
|
|
71
71
|
}, {
|
|
72
|
-
[`${t}-typing`]: u.value && !e.loading && !e.messageRender && !a.message && !
|
|
73
|
-
}]),
|
|
74
|
-
content:
|
|
75
|
-
}) : e.messageRender ? e.messageRender(
|
|
72
|
+
[`${t}-typing`]: u.value && !e.loading && !e.messageRender && !a.message && !C.value
|
|
73
|
+
}]), F = r(() => a.avatar ? a.avatar() : z(e.avatar) ? e.avatar : l(L, e.avatar, null)), I = r(() => a.message ? a.message({
|
|
74
|
+
content: s.value
|
|
75
|
+
}) : e.messageRender ? e.messageRender(s.value) : s.value), X = r(() => e.loading ? a.loading ? a.loading() : e.loadingRender ? e.loadingRender() : l(Y, {
|
|
76
76
|
prefixCls: t
|
|
77
|
-
}, null) : l(G, null, [
|
|
78
|
-
const
|
|
77
|
+
}, null) : l(G, null, [I.value, u.value && i(C)])), A = r(() => {
|
|
78
|
+
const o = l("div", {
|
|
79
79
|
style: {
|
|
80
80
|
...n.value.styles.content,
|
|
81
81
|
...e.styles.content
|
|
@@ -83,42 +83,42 @@ const ce = /* @__PURE__ */ j({
|
|
|
83
83
|
class: [`${t}-content`, `${t}-content-${e.variant}`, {
|
|
84
84
|
[`${t}-content-${e.shape}`]: e.shape
|
|
85
85
|
}, n.value.classNames.content, e.classNames.content]
|
|
86
|
-
}, [
|
|
87
|
-
content:
|
|
88
|
-
}) : typeof e.footer == "function" ? e.footer(
|
|
89
|
-
return
|
|
86
|
+
}, [i(X)]), f = a.header ? a.header() : e.header, v = a.footer ? a.footer({
|
|
87
|
+
content: s.value
|
|
88
|
+
}) : typeof e.footer == "function" ? e.footer(s.value) : e.footer;
|
|
89
|
+
return f || v ? l("div", {
|
|
90
90
|
class: `${t}-content-wrapper`
|
|
91
|
-
}, [
|
|
91
|
+
}, [f && l("div", {
|
|
92
92
|
class: [`${t}-header`, n.value.classNames.header, e.classNames.header],
|
|
93
93
|
style: {
|
|
94
94
|
...n.value.styles.header,
|
|
95
95
|
...e.styles.header
|
|
96
96
|
}
|
|
97
|
-
}, [
|
|
97
|
+
}, [f]), o, v && l("div", {
|
|
98
98
|
class: [`${t}-footer`, n.value.classNames.footer, e.classNames.footer],
|
|
99
99
|
style: {
|
|
100
100
|
...n.value.styles.footer,
|
|
101
101
|
...e.styles.footer
|
|
102
102
|
}
|
|
103
|
-
}, [
|
|
103
|
+
}, [v])]) : o;
|
|
104
104
|
});
|
|
105
|
-
return
|
|
106
|
-
nativeElement:
|
|
107
|
-
}), () =>
|
|
105
|
+
return x({
|
|
106
|
+
nativeElement: y
|
|
107
|
+
}), () => V(l("div", J({
|
|
108
108
|
style: {
|
|
109
109
|
...n.value.style
|
|
110
110
|
// ...(style as object),
|
|
111
111
|
},
|
|
112
|
-
class:
|
|
113
|
-
},
|
|
114
|
-
ref:
|
|
112
|
+
class: i(E)
|
|
113
|
+
}, $, {
|
|
114
|
+
ref: y
|
|
115
115
|
}), [(a.avatar || e.avatar) && l("div", {
|
|
116
116
|
style: {
|
|
117
117
|
...n.value.styles.avatar,
|
|
118
118
|
...e.styles.avatar
|
|
119
119
|
},
|
|
120
120
|
class: [`${t}-avatar`, n.value.classNames.avatar, e.classNames.avatar]
|
|
121
|
-
}, [
|
|
121
|
+
}, [i(F)]), i(A)]));
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
export {
|
package/es/theme/useToken.mjs
CHANGED
|
@@ -1,271 +1,15 @@
|
|
|
1
|
-
import { u as
|
|
1
|
+
import { u as M } from "../_util/cssinjs/hooks/useCacheToken.tsx2.mjs";
|
|
2
2
|
import "../_util/cssinjs/StyleContext.mjs";
|
|
3
|
-
import
|
|
3
|
+
import X from "../_util/cssinjs/theme/createTheme.mjs";
|
|
4
4
|
import "../_util/warning.mjs";
|
|
5
5
|
import "../_util/cssinjs/theme/ThemeCache.mjs";
|
|
6
|
-
import { computed as
|
|
6
|
+
import { computed as e, unref as v } from "vue";
|
|
7
7
|
import "../_util/cssinjs/transformers/legacyLogicalProperties.mjs";
|
|
8
|
-
import { theme as
|
|
9
|
-
import { ignore as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
return d = Object.assign ? Object.assign.bind() : function(r) {
|
|
14
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
15
|
-
var t = arguments[i];
|
|
16
|
-
for (var o in t) ({}).hasOwnProperty.call(t, o) && (r[o] = t[o]);
|
|
17
|
-
}
|
|
18
|
-
return r;
|
|
19
|
-
}, d.apply(null, arguments);
|
|
20
|
-
}
|
|
21
|
-
function f(r) {
|
|
22
|
-
return r >= 0 && r <= 255;
|
|
23
|
-
}
|
|
24
|
-
function m(r, i) {
|
|
25
|
-
const {
|
|
26
|
-
r: t,
|
|
27
|
-
g: o,
|
|
28
|
-
b: e,
|
|
29
|
-
a: c
|
|
30
|
-
} = new u(r).toRgb();
|
|
31
|
-
if (c < 1)
|
|
32
|
-
return r;
|
|
33
|
-
const {
|
|
34
|
-
r: a,
|
|
35
|
-
g: s,
|
|
36
|
-
b: p
|
|
37
|
-
} = new u(i).toRgb();
|
|
38
|
-
for (let n = 0.01; n <= 1; n += 0.01) {
|
|
39
|
-
const l = Math.round((t - a * (1 - n)) / n), g = Math.round((o - s * (1 - n)) / n), b = Math.round((e - p * (1 - n)) / n);
|
|
40
|
-
if (f(l) && f(g) && f(b))
|
|
41
|
-
return new u({
|
|
42
|
-
r: l,
|
|
43
|
-
g,
|
|
44
|
-
b,
|
|
45
|
-
a: Math.round(n * 100) / 100
|
|
46
|
-
}).toRgbString();
|
|
47
|
-
}
|
|
48
|
-
return new u({
|
|
49
|
-
r: t,
|
|
50
|
-
g: o,
|
|
51
|
-
b: e,
|
|
52
|
-
a: 1
|
|
53
|
-
}).toRgbString();
|
|
54
|
-
}
|
|
55
|
-
const w = {
|
|
56
|
-
blue: "#1677ff",
|
|
57
|
-
purple: "#722ED1",
|
|
58
|
-
cyan: "#13C2C2",
|
|
59
|
-
green: "#52C41A",
|
|
60
|
-
magenta: "#EB2F96",
|
|
61
|
-
pink: "#eb2f96",
|
|
62
|
-
red: "#F5222D",
|
|
63
|
-
orange: "#FA8C16",
|
|
64
|
-
yellow: "#FADB14",
|
|
65
|
-
volcano: "#FA541C",
|
|
66
|
-
geekblue: "#2F54EB",
|
|
67
|
-
gold: "#FAAD14",
|
|
68
|
-
lime: "#A0D911"
|
|
69
|
-
}, B = d(d({}, w), {
|
|
70
|
-
// Color
|
|
71
|
-
colorPrimary: "#1677ff",
|
|
72
|
-
colorSuccess: "#52c41a",
|
|
73
|
-
colorWarning: "#faad14",
|
|
74
|
-
colorError: "#ff4d4f",
|
|
75
|
-
colorInfo: "#1677ff",
|
|
76
|
-
colorTextBase: "",
|
|
77
|
-
colorBgBase: "",
|
|
78
|
-
// Font
|
|
79
|
-
fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
80
|
-
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
81
|
-
'Noto Color Emoji'`,
|
|
82
|
-
fontSize: 14,
|
|
83
|
-
// Line
|
|
84
|
-
lineWidth: 1,
|
|
85
|
-
lineType: "solid",
|
|
86
|
-
// Motion
|
|
87
|
-
motionUnit: 0.1,
|
|
88
|
-
motionBase: 0,
|
|
89
|
-
motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
|
|
90
|
-
motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
|
|
91
|
-
motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
|
|
92
|
-
motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
|
|
93
|
-
motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
|
|
94
|
-
motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
|
|
95
|
-
motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
|
|
96
|
-
motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
|
|
97
|
-
// Radius
|
|
98
|
-
borderRadius: 6,
|
|
99
|
-
// Size
|
|
100
|
-
sizeUnit: 4,
|
|
101
|
-
sizeStep: 4,
|
|
102
|
-
sizePopupArrow: 16,
|
|
103
|
-
// Control Base
|
|
104
|
-
controlHeight: 32,
|
|
105
|
-
// zIndex
|
|
106
|
-
zIndexBase: 0,
|
|
107
|
-
zIndexPopupBase: 1e3,
|
|
108
|
-
// Image
|
|
109
|
-
opacityImage: 1,
|
|
110
|
-
// Wireframe
|
|
111
|
-
wireframe: !1
|
|
112
|
-
});
|
|
113
|
-
var C = function(r, i) {
|
|
114
|
-
var t = {};
|
|
115
|
-
for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && i.indexOf(o) < 0 && (t[o] = r[o]);
|
|
116
|
-
if (r != null && typeof Object.getOwnPropertySymbols == "function") for (var e = 0, o = Object.getOwnPropertySymbols(r); e < o.length; e++)
|
|
117
|
-
i.indexOf(o[e]) < 0 && Object.prototype.propertyIsEnumerable.call(r, o[e]) && (t[o[e]] = r[o[e]]);
|
|
118
|
-
return t;
|
|
119
|
-
};
|
|
120
|
-
function D(r) {
|
|
121
|
-
const {
|
|
122
|
-
override: i
|
|
123
|
-
} = r, t = C(r, ["override"]), o = d({}, i);
|
|
124
|
-
Object.keys(B).forEach((S) => {
|
|
125
|
-
delete o[S];
|
|
126
|
-
});
|
|
127
|
-
const e = d(d({}, t), o), c = 480, a = 576, s = 768, p = 992, n = 1200, l = 1600, g = 2e3;
|
|
128
|
-
return d(d(d({}, e), {
|
|
129
|
-
colorLink: e.colorInfoText,
|
|
130
|
-
colorLinkHover: e.colorInfoHover,
|
|
131
|
-
colorLinkActive: e.colorInfoActive,
|
|
132
|
-
// ============== Background ============== //
|
|
133
|
-
colorFillContent: e.colorFillSecondary,
|
|
134
|
-
colorFillContentHover: e.colorFill,
|
|
135
|
-
colorFillAlter: e.colorFillQuaternary,
|
|
136
|
-
colorBgContainerDisabled: e.colorFillTertiary,
|
|
137
|
-
// ============== Split ============== //
|
|
138
|
-
colorBorderBg: e.colorBgContainer,
|
|
139
|
-
colorSplit: m(e.colorBorderSecondary, e.colorBgContainer),
|
|
140
|
-
// ============== Text ============== //
|
|
141
|
-
colorTextPlaceholder: e.colorTextQuaternary,
|
|
142
|
-
colorTextDisabled: e.colorTextQuaternary,
|
|
143
|
-
colorTextHeading: e.colorText,
|
|
144
|
-
colorTextLabel: e.colorTextSecondary,
|
|
145
|
-
colorTextDescription: e.colorTextTertiary,
|
|
146
|
-
colorTextLightSolid: e.colorWhite,
|
|
147
|
-
colorHighlight: e.colorError,
|
|
148
|
-
colorBgTextHover: e.colorFillSecondary,
|
|
149
|
-
colorBgTextActive: e.colorFill,
|
|
150
|
-
colorIcon: e.colorTextTertiary,
|
|
151
|
-
colorIconHover: e.colorText,
|
|
152
|
-
colorErrorOutline: m(e.colorErrorBg, e.colorBgContainer),
|
|
153
|
-
colorWarningOutline: m(e.colorWarningBg, e.colorBgContainer),
|
|
154
|
-
// Font
|
|
155
|
-
fontSizeIcon: e.fontSizeSM,
|
|
156
|
-
// Control
|
|
157
|
-
lineWidth: e.lineWidth,
|
|
158
|
-
controlOutlineWidth: e.lineWidth * 2,
|
|
159
|
-
// Checkbox size and expand icon size
|
|
160
|
-
controlInteractiveSize: e.controlHeight / 2,
|
|
161
|
-
controlItemBgHover: e.colorFillTertiary,
|
|
162
|
-
controlItemBgActive: e.colorPrimaryBg,
|
|
163
|
-
controlItemBgActiveHover: e.colorPrimaryBgHover,
|
|
164
|
-
controlItemBgActiveDisabled: e.colorFill,
|
|
165
|
-
controlTmpOutline: e.colorFillQuaternary,
|
|
166
|
-
controlOutline: m(e.colorPrimaryBg, e.colorBgContainer),
|
|
167
|
-
lineType: e.lineType,
|
|
168
|
-
borderRadius: e.borderRadius,
|
|
169
|
-
borderRadiusXS: e.borderRadiusXS,
|
|
170
|
-
borderRadiusSM: e.borderRadiusSM,
|
|
171
|
-
borderRadiusLG: e.borderRadiusLG,
|
|
172
|
-
fontWeightStrong: 600,
|
|
173
|
-
opacityLoading: 0.65,
|
|
174
|
-
linkDecoration: "none",
|
|
175
|
-
linkHoverDecoration: "none",
|
|
176
|
-
linkFocusDecoration: "none",
|
|
177
|
-
controlPaddingHorizontal: 12,
|
|
178
|
-
controlPaddingHorizontalSM: 8,
|
|
179
|
-
paddingXXS: e.sizeXXS,
|
|
180
|
-
paddingXS: e.sizeXS,
|
|
181
|
-
paddingSM: e.sizeSM,
|
|
182
|
-
padding: e.size,
|
|
183
|
-
paddingMD: e.sizeMD,
|
|
184
|
-
paddingLG: e.sizeLG,
|
|
185
|
-
paddingXL: e.sizeXL,
|
|
186
|
-
paddingContentHorizontalLG: e.sizeLG,
|
|
187
|
-
paddingContentVerticalLG: e.sizeMS,
|
|
188
|
-
paddingContentHorizontal: e.sizeMS,
|
|
189
|
-
paddingContentVertical: e.sizeSM,
|
|
190
|
-
paddingContentHorizontalSM: e.size,
|
|
191
|
-
paddingContentVerticalSM: e.sizeXS,
|
|
192
|
-
marginXXS: e.sizeXXS,
|
|
193
|
-
marginXS: e.sizeXS,
|
|
194
|
-
marginSM: e.sizeSM,
|
|
195
|
-
margin: e.size,
|
|
196
|
-
marginMD: e.sizeMD,
|
|
197
|
-
marginLG: e.sizeLG,
|
|
198
|
-
marginXL: e.sizeXL,
|
|
199
|
-
marginXXL: e.sizeXXL,
|
|
200
|
-
boxShadow: `
|
|
201
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
202
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
203
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
204
|
-
`,
|
|
205
|
-
boxShadowSecondary: `
|
|
206
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
207
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
208
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
209
|
-
`,
|
|
210
|
-
boxShadowTertiary: `
|
|
211
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
212
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
213
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
214
|
-
`,
|
|
215
|
-
screenXS: c,
|
|
216
|
-
screenXSMin: c,
|
|
217
|
-
screenXSMax: a - 1,
|
|
218
|
-
screenSM: a,
|
|
219
|
-
screenSMMin: a,
|
|
220
|
-
screenSMMax: s - 1,
|
|
221
|
-
screenMD: s,
|
|
222
|
-
screenMDMin: s,
|
|
223
|
-
screenMDMax: p - 1,
|
|
224
|
-
screenLG: p,
|
|
225
|
-
screenLGMin: p,
|
|
226
|
-
screenLGMax: n - 1,
|
|
227
|
-
screenXL: n,
|
|
228
|
-
screenXLMin: n,
|
|
229
|
-
screenXLMax: l - 1,
|
|
230
|
-
screenXXL: l,
|
|
231
|
-
screenXXLMin: l,
|
|
232
|
-
screenXXLMax: g - 1,
|
|
233
|
-
screenXXXL: g,
|
|
234
|
-
screenXXXLMin: g,
|
|
235
|
-
// FIXME: component box-shadow, should be removed
|
|
236
|
-
boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
|
|
237
|
-
boxShadowCard: `
|
|
238
|
-
0 1px 2px -2px ${new u("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
239
|
-
0 3px 6px 0 ${new u("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
240
|
-
0 5px 12px 4px ${new u("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
241
|
-
`,
|
|
242
|
-
boxShadowDrawerRight: `
|
|
243
|
-
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
244
|
-
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
245
|
-
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
246
|
-
`,
|
|
247
|
-
boxShadowDrawerLeft: `
|
|
248
|
-
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
249
|
-
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
250
|
-
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
251
|
-
`,
|
|
252
|
-
boxShadowDrawerUp: `
|
|
253
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
254
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
255
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
256
|
-
`,
|
|
257
|
-
boxShadowDrawerDown: `
|
|
258
|
-
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
259
|
-
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
260
|
-
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
261
|
-
`,
|
|
262
|
-
boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
|
|
263
|
-
boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
|
|
264
|
-
boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
|
|
265
|
-
boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
|
|
266
|
-
}), o);
|
|
267
|
-
}
|
|
268
|
-
const O = y(h.defaultAlgorithm), I = {
|
|
8
|
+
import { theme as l } from "ant-design-vue";
|
|
9
|
+
import { ignore as g, unitless as x } from "./patch-antd.mjs";
|
|
10
|
+
import L from "ant-design-vue/es/theme/util/alias";
|
|
11
|
+
import S from "../version/version.mjs";
|
|
12
|
+
const D = X(l.defaultAlgorithm), y = {
|
|
269
13
|
screenXS: !0,
|
|
270
14
|
screenXSMin: !0,
|
|
271
15
|
screenXSMax: !0,
|
|
@@ -283,69 +27,69 @@ const O = y(h.defaultAlgorithm), I = {
|
|
|
283
27
|
screenXLMax: !0,
|
|
284
28
|
screenXXL: !0,
|
|
285
29
|
screenXXLMin: !0
|
|
286
|
-
},
|
|
287
|
-
const
|
|
288
|
-
let
|
|
289
|
-
...
|
|
290
|
-
override:
|
|
30
|
+
}, d = (s, c, u) => {
|
|
31
|
+
const n = u.getDerivativeToken(s), { override: h, ...t } = c;
|
|
32
|
+
let r = {
|
|
33
|
+
...n,
|
|
34
|
+
override: h
|
|
291
35
|
};
|
|
292
|
-
return
|
|
293
|
-
const { theme:
|
|
294
|
-
let
|
|
295
|
-
|
|
36
|
+
return r = L(r), t && Object.entries(t).forEach(([a, m]) => {
|
|
37
|
+
const { theme: o, ...i } = m;
|
|
38
|
+
let k = i;
|
|
39
|
+
o && (k = d(
|
|
296
40
|
{
|
|
297
|
-
...
|
|
298
|
-
...
|
|
41
|
+
...r,
|
|
42
|
+
...i
|
|
299
43
|
},
|
|
300
44
|
{
|
|
301
|
-
override:
|
|
45
|
+
override: i
|
|
302
46
|
},
|
|
303
|
-
|
|
304
|
-
)), a
|
|
305
|
-
}),
|
|
47
|
+
o
|
|
48
|
+
)), r[a] = k;
|
|
49
|
+
}), r;
|
|
306
50
|
};
|
|
307
|
-
function
|
|
308
|
-
const { token:
|
|
309
|
-
token:
|
|
310
|
-
hashed:
|
|
311
|
-
theme:
|
|
51
|
+
function I() {
|
|
52
|
+
const { token: s, hashId: c, theme: u } = l.useToken(), n = e(() => ({
|
|
53
|
+
token: s.value,
|
|
54
|
+
hashed: c.value,
|
|
55
|
+
theme: u.value
|
|
312
56
|
})), {
|
|
313
57
|
// @ts-expect-error
|
|
314
|
-
override:
|
|
58
|
+
override: h,
|
|
315
59
|
// @ts-expect-error
|
|
316
|
-
cssVar:
|
|
317
|
-
} =
|
|
60
|
+
cssVar: t
|
|
61
|
+
} = v(n), r = e(() => n.value.token), a = e(() => n.value.hashed), m = e(() => n.value.theme ?? D), o = M(
|
|
318
62
|
// @ts-expect-error
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
salt: `${
|
|
323
|
-
override:
|
|
324
|
-
getComputedToken:
|
|
325
|
-
cssVar:
|
|
326
|
-
prefix:
|
|
327
|
-
key:
|
|
328
|
-
unitless:
|
|
329
|
-
ignore:
|
|
330
|
-
preserve:
|
|
63
|
+
e(() => m.value),
|
|
64
|
+
e(() => [l.defaultSeed, r.value]),
|
|
65
|
+
e(() => ({
|
|
66
|
+
salt: `${S}-${a.value || ""}`,
|
|
67
|
+
override: h,
|
|
68
|
+
getComputedToken: d,
|
|
69
|
+
cssVar: t && {
|
|
70
|
+
prefix: t.prefix,
|
|
71
|
+
key: t.key,
|
|
72
|
+
unitless: x,
|
|
73
|
+
ignore: g,
|
|
74
|
+
preserve: y
|
|
331
75
|
}
|
|
332
76
|
}))
|
|
333
77
|
), [
|
|
334
|
-
|
|
78
|
+
i,
|
|
335
79
|
// token
|
|
336
|
-
|
|
80
|
+
k,
|
|
337
81
|
// hashId
|
|
338
82
|
// @ts-expect-error
|
|
339
|
-
|
|
340
|
-
] =
|
|
341
|
-
return [
|
|
83
|
+
p
|
|
84
|
+
] = v(o), f = e(() => o.value[0]), T = e(() => a.value ? o.value[1] : "");
|
|
85
|
+
return [m, p, T, f, t];
|
|
342
86
|
}
|
|
343
|
-
function
|
|
344
|
-
const [
|
|
345
|
-
return { theme:
|
|
87
|
+
function q() {
|
|
88
|
+
const [s, c, u] = I();
|
|
89
|
+
return { theme: s, token: c, hashId: u };
|
|
346
90
|
}
|
|
347
91
|
export {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
92
|
+
q as default,
|
|
93
|
+
d as getComputedToken,
|
|
94
|
+
I as useInternalToken
|
|
351
95
|
};
|